Phase 9 Artifact — This plan enables vertical slice delivery per ENGINEERING.SOP.md.
[Brief description of what this feature delivers and why it matters. 1-2 sentences.]
STOP. Before writing this plan, validate all input specifications. Each checkbox must pass.
| Check | Requirement | Pass |
|---|---|---|
| ADR-### exists | File: docs/specs/shared/adr/###-<slug>.md |
[ ] |
| Has Context section | Explains the problem domain | [ ] |
| Has Decision section | Lists concrete choices made | [ ] |
| Has Constraints section | Contains MUST/MUST NOT statements | [ ] |
| Has Consequences section | Documents trade-offs | [ ] |
| References prior ADRs | If superseding or extending | [ ] |
If any ADR check fails: Create or fix the ADR before proceeding. See develop-software.md § Step 2.
| Check | Requirement | Pass |
|---|---|---|
| PRD-### exists | File: docs/specs/shared/prd/###-<slug>.md |
[ ] |
Has Satisfies: ADR-### |
Traces to architectural decision | [ ] |
| Uses EARS notation | When/If/While/The [system] shall… | [ ] |
| Each REQ has ID | Format: REQ-### |
[ ] |
| REQs are testable | Can write acceptance criteria | [ ] |
| REQs are atomic | One behavior per requirement | [ ] |
If any PRD check fails: Create or fix the PRD before proceeding. See develop-software.md § Step 3.
| Check | Requirement | Pass |
|---|---|---|
| SDS file exists | docs/specs/<ctx>/<ctx>.sds.yaml |
[ ] |
| Schema valid | just sds-validate <file> passes |
[ ] |
Has metadata.namespace |
Matches bounded context name | [ ] |
Has metadata.satisfies |
Lists PRD IDs | [ ] |
| Entities defined | With properties, types, required flags | [ ] |
| Flows defined | With type (command/query), input, output | [ ] |
If any SDS check fails: Run just sds-validate <file> and fix errors. See develop-software.md § Step 4.
| Check | Requirement | Pass |
|---|---|---|
| SEA™ file exists | docs/specs/<ctx>/<ctx>.sea |
[ ] |
| Syntax valid | just sea-validate <file> passes |
[ ] |
Has namespace declaration |
First statement in file | [ ] |
All flows have @cqrs |
{ "kind": "command" \| "query" \| "event" } |
[ ] |
Commands have @idempotency |
{ "enabled": true, "key": "<field>" } |
[ ] |
Transactional flows have @tx |
{ "transactional": true } |
[ ] |
Event flows have @outbox |
If using outbox pattern | [ ] |
If any SEA™ check fails: Run just sea-validate <file> and fix errors. Reference SEA-DSL language docs.
1
2
3
4
# Run full pipeline to verify all specs compile
just pipeline <context-name>
# Expected: All steps pass, manifest generated
<ctx>.manifest.json generatedjust regen-check <ctx>.manifest.json passes (determinism)Establish complete traceability from ADR → PRD → SDS → Implementation.
graph TD
ADR[ADR-###: Decision Title] --> PRD1[PRD-###: Requirement 1]
ADR --> PRD2[PRD-###: Requirement 2]
PRD1 --> SDS1[SDS: Entity/Flow A]
PRD2 --> SDS2[SDS: Entity/Flow B]
SDS1 --> C1[Cycle C1A: Implementation]
SDS2 --> C2[Cycle C2A: Implementation]
style ADR fill:#e1f5ff
style PRD1 fill:#fff4e1
style PRD2 fill:#fff4e1
style SDS1 fill:#e8f5e9
style SDS2 fill:#e8f5e9
| ADR ID | PRD ID | SDS Element | Cycle |
|---|---|---|---|
| ADR-### | PRD-### | Entity: X |
C1A |
| ADR-### | PRD-### | Flow: Y |
C1A |
| ADR-### | PRD-### | Flow: Z |
C2A |
Required sequence per ENGINEERING.SOP.md Phase 9. Do not skip steps.
For each vertical slice:
sea.domain, sea.concept)Each cycle = one branch + one worktree. Waves enable parallel work.
| Cycle | Worktree | Branch | Wave | Implements |
|---|---|---|---|---|
| C1A | ../SEA-p9-c1A |
cycle/p9-c1A-<slug> |
1 | SDS: Entity X |
| C1B | ../SEA-p9-c1B |
cycle/p9-c1B-<slug> |
1 | SDS: Flow Y |
| C2AA | ../SEA-p9-c2AA |
cycle/p9-c2AA-<slug> |
2 | Adapter for Port Z |
1
2
3
4
5
6
7
# Creates branch + worktree in one command
just cycle-start 9 1 A entity-order
# Output:
# Branch: cycle/p9-c1A-entity-order
# Worktree: ../SEA-p9-c1A
# cd ../SEA-p9-c1A
../SEA-p9-c1Ajust generator-bc <ctx> (if new context)../SEA-p9-c1B../SEA-p9-c2AA1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 1. Start cycle (creates branch + worktree)
just cycle-start 9 1 A entity-order
cd ../SEA-p9-c1A
# 2. Do work in the worktree
just pipeline <ctx>
just test
git add . && git commit -m "feat: implement Entity X"
# 3. Complete cycle (pushes, prepares for PR)
just cycle-complete 9 1 A
# 4. Create PR from worktree
gh pr create --base dev
# 5. After PR merged, cleanup
cd /path/to/main/SEA™
just cycle-worktree-remove 9 1 A
# Or clean all merged worktrees at once
just worktrees-clean
| Generator | Command | When to Use |
|---|---|---|
| Bounded Context | just generator-bc <name> |
New domain context |
| Adapter | just generator-adapter <name> <ctx> |
New port+fake+real |
| API Surface | just generator-api <name> <ctx> |
New API endpoint |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
libs/<context>/
├── domain/
│ └── src/
│ ├── index.ts
│ └── lib/
│ ├── <entity>.ts # [SDS: Entity X]
│ └── <value-object>.ts # [SDS: VO Y]
├── ports/
│ └── src/
│ └── lib/
│ └── <port>.port.ts # [SDS: Port Z]
├── adapters/
│ └── src/
│ └── lib/
│ ├── <adapter>.adapter.ts # Real implementation
│ └── <adapter>.fake.ts # Fake for testing
└── application/
└── src/
└── lib/
├── <command>.handler.ts # [SDS: Flow Command]
└── <query>.handler.ts # [SDS: Flow Query]
just spec-guard passesjust test passesjust nx-run workspace check passesgit diff --exit-code (repo clean after generation)Only list if this plan introduces NEW dependencies.
| Dependency | Type | Version | Justification |
|---|---|---|---|
| (none expected for generated code) | — | — | — |
If adding dependencies, complete the Dependency Review Checklist.
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Spec validation fails | Low | Blocks plan | Run pre-flight checks first |
| Generator output doesn’t match spec | Medium | Rework | Review generated code against SDS |
| Integration tests flaky | Medium | CI delays | Use Testcontainers for isolation |
Document 1-3 unresolved items that need clarification before or during implementation.
Do not duplicate content from these documents. Read them for full context.
| Document | Purpose |
|---|---|
| develop-software.md | Full workflow, just commands, pipeline steps |
| ENGINEERING.SOP.md | Phase definitions, acceptance criteria |
| AGENTS.md | Allowed edits, sequencing rules |
| SEA-DSL Reference | Language grammar and syntax |
| Traceability Matrix | ADR→PRD→SDS chains |