Skip to content

feat(examples): forge-eda-example reference project (B.6.8)#47

Merged
Bogala merged 2 commits into
mainfrom
b6-8-example
Jul 12, 2026
Merged

feat(examples): forge-eda-example reference project (B.6.8)#47
Bogala merged 2 commits into
mainfrom
b6-8-example

Conversation

@Bogala

@Bogala Bogala commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds examples/forge-eda-example/ — the third archetype reference project under examples/, demonstrating the now-promoted event-driven-eu archetype. It is the event-driven sibling of forge-fsm-example/ (c1, full-stack-monorepo) and forge-rag-example/ (b7-7, ai-native-rag), and closes brick B.6.8 of the B.6 chain.

Key divergence from b7-7-example (ADR-B6-8-001)

b7-7-example had to render its RAG tree via overlay.sh directly because ai-native-rag was still a candidate (scaffoldable: false) at its creation time. b6-8 is different and simpler: b6-7-harness already promoted event-driven-eu to stage: stable / scaffoldable: true on main, so this example is rendered through the real public CLIforge init --archetype event-driven-eu — exactly as an adopter would. This is a stronger demonstration: it proves the promoted archetype scaffolds end-to-end through the public path, not just through the internal renderer.

What ships

  • examples/forge-eda-example/ — a full event-driven-eu/1.0.0 tree (backend/{events,eventstore,saga,bin-server}, infra/ NATS JetStream + Postgres event store + Temporal cluster, shared/asyncapi/ AsyncAPI 3.1 + shared/protos/v1/events/) rendered via the real CLI, plus its own .forge/ framework assets + .claude/ so it self-validates, and an authored navigation README.md (4 canonical H2 sections, replacing the archetype-rendered README).
  • 3 archived demo changes (the 3 demos required by the B.6.8 plan item):
    1. demo-001-ingestion-http-nats [backend] — HTTP ingestion → NATS JetStream publish (versioned idempotent EventEnvelope, Nats-Msg-Id dedup).
    2. demo-002-projection-readmodel [backend] — Postgres event store → deterministic, replayable read-model projection + inbox dedup (outbox/inbox).
    3. demo-003-order-saga [backend, infra] — multi-layer (Janus) Temporal activity-only 3-step saga (reserve stock → charge payment → confirm shipment) with reverse-order compensation (Article VIII.2). Per-layer designs/ + tasks/.
  • .forge/changes/b6-8-example/ — the full Forge spec pipeline (proposal, specs, design with 4 ADRs, tasks, open-questions), archived; consolidated into .forge/specs/example-reference.md (FR-EDAEX-001..010 / NFR-EDAEX-001..005) and .forge/specs/forge-ci.md (MODIFIED FR-CI-012).
  • .forge/scripts/tests/b6-8.test.sh — new harness (23 checks, manifest pattern, L1 + L2 opt-in via --require-example-tools), registered in forge-ci.yml's harness loop.
  • forge-ci.yml example job — a third parse-only / own-gates-only EDA gate block under the existing examples/** filter (ADR-B6-8-004); FSM + RAG blocks byte-preserved.

Design decisions (ADRs)

  • ADR-B6-8-001 — render through the real forge init CLI (the archetype is promoted/scaffoldable) — the divergence from b7-7's overlay.sh workaround.
  • ADR-B6-8-002 — demo-003 is the multi-layer (Janus) saga spanning [backend, infra]; the archetype's frontend layer is deferred (ADR-B6-1-004), so there is no [backend, frontend] demo.
  • ADR-B6-8-003 — exactly 3 archived demos (no 4th specified, mirroring b7-7).
  • ADR-B6-8-004 — CI is parse-only / own-gates-only for all three trees; forge-ci.yml line budget bumped 400→420 in lockstep.

[NEEDS CLARIFICATION] decisions

All three open questions were resolved at design and recorded in open-questions.md (real-CLI render → ADR-B6-8-001; multi-layer axis [backend, infra] → ADR-B6-8-002; 3 archived demos → ADR-B6-8-003). None left open.

Scope discipline

No archetype template, schema, standard, constitution, or CLI code is edited — B.6.8 consumes the archetype, it does not modify it. Coupled lockstep edits (same commit): the four budget-asserting harnesses (c1, g1, t5-1, t5-otel-live-run) + forge-self-ci.md for the 400→420 bump, and b8-signoz.test.sh to exclude forge-eda-example/ from its repo-wide docker-compose mirror-count scan (exactly as b7-7 excluded forge-rag-example/).

CI budget (before / after)

Lines Cap
Before 384 400
After 409 420 (bumped in lockstep across c1/g1/t5-1/t5-otel-live-run + forge-self-ci.md)

Test plan

Live render (reproducible):

cd cli && npm ci && npm run bundle && cd ..
node cli/dist/index.js init forge-eda-example \
  --target "$PWD/examples/forge-eda-example" \
  --archetype event-driven-eu \
  --org io.forge.example --force
# → "overlay.sh: 48 templates rendered", scaffold-manifest written, cargo fetch OK, exit 0

Gates (all GREEN locally):

  • Full forge-ci harness sweep — 76/76 harnesses GREEN.
  • b6-8.test.sh23/23 (L1) and 23/23 (L2 --require-example-tools).
  • Root verify.sh564 passed / 0 failed (PASS).
  • Root constitution-linter.sh83 pass / 0 fail (PASS).
  • validate-foundations.sh — PASS (event-driven-eu 1.0.0 confirmed stage=stable).
  • The EDA tree's own verify.sh (18/0) + constitution-linter.sh (2/0) PASS standalone.
  • Budget-coupled harnesses after the bump: c1 30/0, g1 14/0, t5-1 17/0, t5-otel-live-run 8/0.
  • b8-signoz.test.sh 21/0 after the mirror-count exclusion fix.

Plan doc

docs/new-archetypes-plan.md updated: §0.13 B.6 brick table row 10 flipped ⏸️ Pending → ✅ archived, and the §11 T7 row updated to reflect B.6 event-driven-eu COMPLET (10/10).

🤖 Generated with Claude Code

Bogala and others added 2 commits July 12, 2026 17:10
Ship the third archetype reference project under examples/ —
forge-eda-example/ — demonstrating the now-promoted event-driven-eu
archetype, mirroring the b7-7-example (RAG) and c1 (FSM) precedents.

Key divergence from b7-7-example (recorded as ADR-B6-8-001): because
b6-7-harness already promoted event-driven-eu to stage: stable /
scaffoldable: true on main, the tree is rendered through the REAL public
CLI — `forge init --archetype event-driven-eu` — exactly as an adopter
would, rather than through the overlay.sh workaround b7-7 needed while
ai-native-rag was still a candidate. This is a stronger demonstration: it
proves the promoted archetype scaffolds end-to-end through the public
path.

What ships:
- examples/forge-eda-example/: a full event-driven-eu/1.0.0 tree
  (backend events/eventstore/saga/bin-server, infra NATS+Postgres+Temporal,
  shared AsyncAPI 3.1 + protos) rendered via the real forge init CLI, plus
  its own .forge/ framework assets + .claude/ so it self-validates, and an
  authored navigation README (4 canonical H2 sections).
- 3 archived demo changes: demo-001-ingestion-http-nats ([backend], HTTP
  -> NATS JetStream publish with Nats-Msg-Id dedup), demo-002-projection-
  readmodel ([backend], event store -> deterministic read-model projection
  + inbox dedup), demo-003-order-saga ([backend, infra] multi-layer/Janus,
  Temporal activity-only 3-step saga with reverse-order compensation,
  Article VIII.2). demo-003 is [backend, infra] rather than
  [backend, frontend] because the archetype's frontend layer is deferred
  (ADR-B6-8-002).
- .forge/changes/b6-8-example/: the full Forge spec pipeline (proposal,
  specs, design with 4 ADRs, tasks, open-questions), archived; consolidated
  into .forge/specs/example-reference.md (FR-EDAEX-001..010) and
  .forge/specs/forge-ci.md (MODIFIED FR-CI-012).
- .forge/scripts/tests/b6-8.test.sh: new harness (23 checks, manifest
  pattern, L1 + L2 opt-in), registered in forge-ci.yml's harness loop.
- forge-ci.yml example job: a third parse-only / own-gates-only EDA gate
  block under the existing examples/** filter (ADR-B6-8-004); FSM + RAG
  blocks byte-preserved.

Coupled lockstep changes (same commit):
- forge-ci.yml line budget bumped 400 -> 420 (the third gate block + the
  b6-8.test.sh loop entry push it to 409 lines), updated in lockstep across
  the four asserting harnesses (c1, g1, t5-1, t5-otel-live-run) and the
  forge-self-ci.md standard.
- b8-signoz.test.sh: exclude examples/forge-eda-example/ from the repo-wide
  docker-compose mirror-count scan, exactly as b7-7 excluded
  forge-rag-example (the EDA example ships its own NATS/Postgres + Temporal
  compose files that are not SigNoz mirror copies).

No archetype template, schema, standard, constitution, or CLI code is
edited — B.6.8 consumes the archetype, it does not modify it.

Gates: full 76-harness forge-ci sweep GREEN; verify.sh (564/0),
constitution-linter.sh (83/0), validate-foundations.sh all PASS;
b6-8.test.sh 23/0 (L1 + L2); the EDA tree's own gates PASS standalone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Bogala Bogala merged commit b05842a into main Jul 12, 2026
7 checks passed
@Bogala Bogala deleted the b6-8-example branch July 12, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant