ultra-builder-pro-cli 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ultra-template/delivery-report.json +9 -0
- package/.ultra-template/docs/research/README.md +53 -0
- package/.ultra-template/specs/architecture.md +250 -0
- package/.ultra-template/specs/discovery.md +248 -0
- package/.ultra-template/specs/product.md +223 -0
- package/.ultra-template/tasks/contexts/TEMPLATE.md +57 -0
- package/.ultra-template/tasks/tasks.json +33 -0
- package/.ultra-template/test-report.json +8 -0
- package/CHANGELOG.md +194 -0
- package/LICENSE +21 -0
- package/README.md +187 -0
- package/adapters/_shared/codex-assets.cjs +1128 -0
- package/adapters/_shared/codex-ultra-tools-entry.cjs +11 -0
- package/adapters/_shared/file-ops.cjs +115 -0
- package/adapters/_shared/frontmatter.cjs +52 -0
- package/adapters/_shared/handbook.cjs +144 -0
- package/adapters/_shared/md-to-toml.cjs +54 -0
- package/adapters/_shared/path-rewrite.cjs +79 -0
- package/adapters/_shared/rtk-detect.cjs +86 -0
- package/adapters/_shared/runtime-assets.cjs +70 -0
- package/adapters/_shared/settings-merge.cjs +76 -0
- package/adapters/_shared/tests/file-ops.test.cjs +54 -0
- package/adapters/_shared/tests/frontmatter.test.cjs +47 -0
- package/adapters/_shared/tests/handbook.test.cjs +86 -0
- package/adapters/_shared/tests/md-to-toml.test.cjs +48 -0
- package/adapters/_shared/tests/path-rewrite.test.cjs +60 -0
- package/adapters/_shared/tests/resolve-target.test.cjs +85 -0
- package/adapters/_shared/tests/rtk-detect.test.cjs +116 -0
- package/adapters/_shared/tests/runtime-assets.test.cjs +107 -0
- package/adapters/_shared/tests/settings-merge.test.cjs +85 -0
- package/adapters/_shared/tests/validate.test.cjs +30 -0
- package/adapters/_shared/validate.cjs +24 -0
- package/adapters/claude.js +182 -0
- package/adapters/codex.js +385 -0
- package/adapters/gemini.js +204 -0
- package/adapters/opencode.js +506 -0
- package/adapters/tests/claude.test.cjs +117 -0
- package/adapters/tests/codex-hook.test.cjs +90 -0
- package/adapters/tests/codex.test.cjs +356 -0
- package/adapters/tests/gemini.test.cjs +112 -0
- package/adapters/tests/opencode.test.cjs +246 -0
- package/agents/code-reviewer.md +102 -0
- package/agents/debugger.md +127 -0
- package/agents/review-code.md +125 -0
- package/agents/review-comments.md +98 -0
- package/agents/review-coordinator.md +146 -0
- package/agents/review-design.md +133 -0
- package/agents/review-errors.md +87 -0
- package/agents/review-tests.md +93 -0
- package/agents/tdd-runner.md +92 -0
- package/bin/handbook.js +54 -0
- package/bin/install.js +254 -0
- package/bin/orchestrator.js +214 -0
- package/commands/learn.md +41 -0
- package/commands/ultra-deliver.md +45 -0
- package/commands/ultra-dev.md +50 -0
- package/commands/ultra-init.md +51 -0
- package/commands/ultra-plan.md +49 -0
- package/commands/ultra-research.md +59 -0
- package/commands/ultra-status.md +46 -0
- package/commands/ultra-test.md +48 -0
- package/commands/ultra-think.md +45 -0
- package/docs/AGENT-CONTEXT.md +143 -0
- package/docs/ARCHITECTURE.md +197 -0
- package/docs/COMMIT-HASH-BACKFILL.md +101 -0
- package/docs/LEGACY-HERMES.md +1175 -0
- package/docs/PLAN.zh-CN.md +1683 -0
- package/docs/ROADMAP.md +102 -0
- package/docs/RUNTIME-COMPAT-MATRIX.md +98 -0
- package/docs/STATE-DB-ACCESS-POLICY.md +109 -0
- package/docs/USER-HANDBOOK-CONTRACT.md +61 -0
- package/hooks/README.md +24 -0
- package/hooks/active_task_context.py +44 -0
- package/hooks/adapters/codex.py +302 -0
- package/hooks/health_check.py +61 -0
- package/hooks/pre_stop_check.py +56 -0
- package/hooks/subagent_tracker.py +116 -0
- package/hooks/workflow_checkpoint.py +56 -0
- package/hooks/workflow_context.py +63 -0
- package/hooks/workflow_resume.py +50 -0
- package/mcp-server/lib/init-project.cjs +162 -0
- package/mcp-server/lib/llm-client.cjs +157 -0
- package/mcp-server/lib/llm-client.test.cjs +156 -0
- package/mcp-server/lib/plan-store.cjs +96 -0
- package/mcp-server/lib/plan-store.test.cjs +132 -0
- package/mcp-server/lib/prd-parser.cjs +110 -0
- package/mcp-server/lib/prd-parser.test.cjs +171 -0
- package/mcp-server/lib/pricing.cjs +53 -0
- package/mcp-server/lib/projector.cjs +158 -0
- package/mcp-server/lib/state-db.cjs +113 -0
- package/mcp-server/lib/state-db.test.cjs +116 -0
- package/mcp-server/lib/state-ops.cjs +725 -0
- package/mcp-server/lib/task-expander.cjs +123 -0
- package/mcp-server/lib/task-expander.test.cjs +253 -0
- package/mcp-server/lib/telemetry.cjs +72 -0
- package/mcp-server/lib/topo.cjs +131 -0
- package/mcp-server/lib/topo.test.cjs +158 -0
- package/mcp-server/server.cjs +482 -0
- package/mcp-server/tests/circuit-breaker.test.cjs +125 -0
- package/mcp-server/tests/commit-hash-flow.test.cjs +117 -0
- package/mcp-server/tests/concurrency-update.test.cjs +96 -0
- package/mcp-server/tests/concurrency.test.cjs +112 -0
- package/mcp-server/tests/db-ops.test.cjs +117 -0
- package/mcp-server/tests/init-project.test.cjs +141 -0
- package/mcp-server/tests/migrate.test.cjs +144 -0
- package/mcp-server/tests/projector.test.cjs +130 -0
- package/mcp-server/tests/server-contract.test.cjs +750 -0
- package/mcp-server/tests/staleness.test.cjs +190 -0
- package/mcp-server/tests/state-ops.test.cjs +286 -0
- package/mcp-server/tests/tagged-tasks.test.cjs +163 -0
- package/mcp-server/tests/telemetry.test.cjs +205 -0
- package/orchestrator/auto-merge.cjs +109 -0
- package/orchestrator/code-graph-watcher.cjs +121 -0
- package/orchestrator/daemon.cjs +112 -0
- package/orchestrator/dispatch-rules.cjs +93 -0
- package/orchestrator/parallel-orchestrator.cjs +195 -0
- package/orchestrator/planner/expand-prompt.cjs +62 -0
- package/orchestrator/planner/expand-prompt.test.cjs +52 -0
- package/orchestrator/planner/plan-builder.cjs +116 -0
- package/orchestrator/planner/plan-builder.test.cjs +165 -0
- package/orchestrator/planner/prd-prompt.cjs +44 -0
- package/orchestrator/planner/prd-prompt.test.cjs +30 -0
- package/orchestrator/recovery.cjs +70 -0
- package/orchestrator/session-runner.cjs +224 -0
- package/orchestrator/skill-miner.cjs +133 -0
- package/orchestrator/tests/auto-merge.test.cjs +216 -0
- package/orchestrator/tests/code-graph-watcher.test.cjs +183 -0
- package/orchestrator/tests/daemon.test.cjs +260 -0
- package/orchestrator/tests/dispatch-rules.test.cjs +122 -0
- package/orchestrator/tests/parallel-orchestrator.test.cjs +233 -0
- package/orchestrator/tests/phase-8b-gate.test.cjs +183 -0
- package/orchestrator/tests/recovery.test.cjs +190 -0
- package/orchestrator/tests/session-runner.test.cjs +314 -0
- package/orchestrator/tests/skill-miner.test.cjs +147 -0
- package/orchestrator/tests/worktree-manager.test.cjs +148 -0
- package/orchestrator/worktree-manager.cjs +131 -0
- package/output-styles/coding-vibes.md +67 -0
- package/output-styles/structural-thinking.md +61 -0
- package/package.json +109 -0
- package/settings.json +8 -0
- package/skills/cc-collab/SKILL.md +41 -0
- package/skills/code-review-expert/SKILL.md +118 -0
- package/skills/code-review-expert/references/code-quality-checklist.md +112 -0
- package/skills/code-review-expert/references/integration-checklist.md +46 -0
- package/skills/code-review-expert/references/removal-plan.md +52 -0
- package/skills/code-review-expert/references/security-checklist.md +100 -0
- package/skills/code-review-expert/references/solid-checklist.md +65 -0
- package/skills/codex-collab/SKILL.md +52 -0
- package/skills/codex-collab/evals/evals.json +40 -0
- package/skills/gemini-collab/SKILL.md +51 -0
- package/skills/gemini-collab/evals/evals.json +42 -0
- package/skills/integration-rules/SKILL.md +71 -0
- package/skills/learn/SKILL.md +117 -0
- package/skills/security-rules/SKILL.md +60 -0
- package/skills/testing-rules/SKILL.md +56 -0
- package/skills/ultra-deliver/SKILL.md +171 -0
- package/skills/ultra-dev/SKILL.md +324 -0
- package/skills/ultra-init/SKILL.md +148 -0
- package/skills/ultra-plan/SKILL.md +314 -0
- package/skills/ultra-research/SKILL.md +156 -0
- package/skills/ultra-research/steps/step-00-problem-validation.md +154 -0
- package/skills/ultra-research/steps/step-01-opportunity-discovery.md +172 -0
- package/skills/ultra-research/steps/step-02-market-assessment.md +195 -0
- package/skills/ultra-research/steps/step-03-competitive-landscape.md +197 -0
- package/skills/ultra-research/steps/step-04-product-strategy.md +196 -0
- package/skills/ultra-research/steps/step-05-assumptions-validation.md +234 -0
- package/skills/ultra-research/steps/step-10-user-personas.md +169 -0
- package/skills/ultra-research/steps/step-11-user-scenarios.md +181 -0
- package/skills/ultra-research/steps/step-20-user-stories.md +156 -0
- package/skills/ultra-research/steps/step-21-features-scope.md +157 -0
- package/skills/ultra-research/steps/step-22-success-metrics.md +195 -0
- package/skills/ultra-research/steps/step-30-architecture-context.md +154 -0
- package/skills/ultra-research/steps/step-31-solution-strategy.md +172 -0
- package/skills/ultra-research/steps/step-32-building-blocks.md +188 -0
- package/skills/ultra-research/steps/step-40-deployment.md +123 -0
- package/skills/ultra-research/steps/step-41-quality-risks.md +135 -0
- package/skills/ultra-research/steps/step-99-synthesis.md +188 -0
- package/skills/ultra-review/SKILL.md +437 -0
- package/skills/ultra-review/references/unified-schema.md +127 -0
- package/skills/ultra-review/scripts/review_verdict_update.py +99 -0
- package/skills/ultra-review/scripts/review_wait.py +120 -0
- package/skills/ultra-status/SKILL.md +162 -0
- package/skills/ultra-test/SKILL.md +195 -0
- package/skills/ultra-think/SKILL.md +109 -0
- package/skills/ultra-verify/SKILL.md +111 -0
- package/skills/ultra-verify/evals/evals.json +51 -0
- package/skills/ultra-verify/references/confidence-system.md +38 -0
- package/skills/ultra-verify/references/cross-verify-modes.md +73 -0
- package/skills/ultra-verify/scripts/verify_wait.py +131 -0
- package/spec/cli-protocol.md +118 -0
- package/spec/mcp-tools.yaml +658 -0
- package/spec/schemas/command-manifest.schema.json +47 -0
- package/spec/schemas/context-file.v4.5.schema.json +54 -0
- package/spec/schemas/mcp-tools.schema.json +136 -0
- package/spec/schemas/skill-manifest.schema.json +94 -0
- package/spec/schemas/state-db.sql +154 -0
- package/spec/schemas/tasks.v4.5.schema.json +66 -0
- package/ultra-tools/cli.cjs +121 -0
- package/ultra-tools/commands/db.cjs +175 -0
- package/ultra-tools/commands/legacy-memory.cjs +159 -0
- package/ultra-tools/commands/migrate.cjs +354 -0
- package/ultra-tools/commands/session.cjs +180 -0
- package/ultra-tools/commands/status.cjs +158 -0
- package/ultra-tools/commands/task.cjs +95 -0
- package/ultra-tools/legacy-memory.test.cjs +80 -0
- package/ultra-tools/status-command.test.cjs +132 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Step 22: Success Metrics
|
|
2
|
+
|
|
3
|
+
## MANDATORY EXECUTION RULES
|
|
4
|
+
|
|
5
|
+
- EVERY METRIC must have a specific numerical TARGET — not "improve X"
|
|
6
|
+
- INCLUDE both business AND user metrics
|
|
7
|
+
- DEFINE how each metric is MEASURED — not just what to measure
|
|
8
|
+
- BASELINE required — you can't improve what you haven't measured
|
|
9
|
+
- WRITE output to spec file BEFORE presenting to user
|
|
10
|
+
- ALL output in English (spec files); conversation in Chinese
|
|
11
|
+
|
|
12
|
+
## PREREQUISITES
|
|
13
|
+
|
|
14
|
+
- Step 21 (Features & Scope) completed with [C]
|
|
15
|
+
- `.ultra/specs/product.md` §1-5 exist
|
|
16
|
+
|
|
17
|
+
## CONTEXT BOUNDARIES
|
|
18
|
+
|
|
19
|
+
- Focus: How will we know if this product is succeeding?
|
|
20
|
+
- Metrics must be measurable, specific, and time-bound
|
|
21
|
+
- Connect metrics to strategic goals from step-04
|
|
22
|
+
- This is the LAST step of Round 2
|
|
23
|
+
|
|
24
|
+
## SEARCH STRATEGY (MANDATORY)
|
|
25
|
+
|
|
26
|
+
Execute these web searches:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Search: "{{product_domain}} key metrics KPIs benchmarks"
|
|
30
|
+
Search: "{{product_domain}} SaaS metrics success benchmarks"
|
|
31
|
+
Search: "{{product_domain}} user engagement retention benchmarks"
|
|
32
|
+
Search: "{{product_domain}} north star metric examples"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## EXECUTION SEQUENCE
|
|
36
|
+
|
|
37
|
+
### 1. Define North Star Metric
|
|
38
|
+
|
|
39
|
+
Ask user via AskUserQuestion:
|
|
40
|
+
"What single metric best captures whether this product is delivering value? (e.g., 'Weekly active workflows completed', 'Time saved per user per week')"
|
|
41
|
+
|
|
42
|
+
The North Star Metric should:
|
|
43
|
+
- Reflect core value delivery
|
|
44
|
+
- Be leading (not lagging)
|
|
45
|
+
- Be actionable (team can influence it)
|
|
46
|
+
|
|
47
|
+
### 2. Define Business Metrics
|
|
48
|
+
|
|
49
|
+
| Metric | What to define |
|
|
50
|
+
|--------|---------------|
|
|
51
|
+
| Revenue/adoption targets | Month 1, 3, 6, 12 |
|
|
52
|
+
| Growth rate | MoM or WoW targets |
|
|
53
|
+
| Retention | Day 1, Day 7, Day 30 |
|
|
54
|
+
| Conversion | Free → Paid (if applicable) |
|
|
55
|
+
| Unit economics | CAC, LTV, LTV/CAC ratio |
|
|
56
|
+
|
|
57
|
+
Use web search benchmarks for realistic targets.
|
|
58
|
+
|
|
59
|
+
### 3. Define User Metrics
|
|
60
|
+
|
|
61
|
+
| Metric | What to define |
|
|
62
|
+
|--------|---------------|
|
|
63
|
+
| Task completion | Success rate for key scenarios |
|
|
64
|
+
| Time on task | vs baseline (current workflow) |
|
|
65
|
+
| User satisfaction | NPS or CSAT target |
|
|
66
|
+
| Feature adoption | % of users using key features |
|
|
67
|
+
| Error rate | Failure frequency |
|
|
68
|
+
|
|
69
|
+
### 4. Write Output
|
|
70
|
+
|
|
71
|
+
**WRITE IMMEDIATELY** to `.ultra/specs/product.md` §6:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
## §6 Success Metrics
|
|
75
|
+
|
|
76
|
+
### North Star Metric
|
|
77
|
+
- **Metric**: [Name]
|
|
78
|
+
- **Definition**: [Exactly what is measured]
|
|
79
|
+
- **Current baseline**: [Current state or industry benchmark]
|
|
80
|
+
- **Target**: [Specific number]
|
|
81
|
+
- **Timeline**: [When to achieve]
|
|
82
|
+
- **Measurement method**: [How to collect this data]
|
|
83
|
+
|
|
84
|
+
### Business Metrics
|
|
85
|
+
|
|
86
|
+
| Metric | Baseline | Target (M3) | Target (M6) | Target (M12) | How Measured |
|
|
87
|
+
|--------|----------|-------------|-------------|--------------|-------------|
|
|
88
|
+
| [Revenue/Users] | [N/A or current] | [Target] | [Target] | [Target] | [Method] |
|
|
89
|
+
| [Growth rate] | [Benchmark] | [Target] | [Target] | [Target] | [Method] |
|
|
90
|
+
| [Retention D30] | [Benchmark] | [Target] | [Target] | [Target] | [Method] |
|
|
91
|
+
| [Conversion] | [Benchmark] | [Target] | [Target] | [Target] | [Method] |
|
|
92
|
+
|
|
93
|
+
_Benchmark sources: [URLs]_
|
|
94
|
+
|
|
95
|
+
### User Metrics
|
|
96
|
+
|
|
97
|
+
| Metric | Baseline | Target | How Measured |
|
|
98
|
+
|--------|----------|--------|-------------|
|
|
99
|
+
| Task completion rate | [Current %] | [Target %] | [Method] |
|
|
100
|
+
| Time on task | [Current min] | [Target min] | [Method] |
|
|
101
|
+
| User satisfaction (NPS) | [Industry avg] | [Target] | [Survey] |
|
|
102
|
+
| Feature adoption | [N/A] | [Target %] | [Analytics] |
|
|
103
|
+
| Error rate | [Current %] | [Target %] | [Logging] |
|
|
104
|
+
|
|
105
|
+
### Metric Prioritization
|
|
106
|
+
|
|
107
|
+
| Priority | Metric | Why |
|
|
108
|
+
|----------|--------|-----|
|
|
109
|
+
| P0 (check daily) | [North Star] | [Core value signal] |
|
|
110
|
+
| P0 (check daily) | [Critical metric] | [Business health] |
|
|
111
|
+
| P1 (check weekly) | [Important metric] | [Growth signal] |
|
|
112
|
+
| P2 (check monthly) | [Supporting metric] | [Quality signal] |
|
|
113
|
+
|
|
114
|
+
### Anti-Metrics (What NOT to Optimize)
|
|
115
|
+
|
|
116
|
+
| Anti-Metric | Why Not | What It Could Sacrifice |
|
|
117
|
+
|------------|---------|------------------------|
|
|
118
|
+
| [e.g., Page views] | [Vanity metric] | [Could sacrifice quality for clicks] |
|
|
119
|
+
| [e.g., Time in app] | [Could mean confusion] | [Could sacrifice efficiency] |
|
|
120
|
+
|
|
121
|
+
### Round 2 Summary
|
|
122
|
+
|
|
123
|
+
**Feature Definition Confidence**:
|
|
124
|
+
- **Story completeness**: [X]% — [One-line assessment]
|
|
125
|
+
- **Scope clarity**: [X]% — [One-line assessment]
|
|
126
|
+
- **Metric measurability**: [X]% — [One-line assessment]
|
|
127
|
+
- **Overall R2 confidence**: [X]%
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 5. Write Round 2 Research Report
|
|
131
|
+
|
|
132
|
+
**WRITE** to `.ultra/docs/research/feature-definition-{date}.md`:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
# Round 2: Feature Definition
|
|
136
|
+
|
|
137
|
+
> **Confidence**: [X]%
|
|
138
|
+
> **Steps completed**: 20-22
|
|
139
|
+
> **Completed**: [date]
|
|
140
|
+
|
|
141
|
+
## Key Findings
|
|
142
|
+
[3-5 bullet points]
|
|
143
|
+
|
|
144
|
+
## Stories Created
|
|
145
|
+
[Count by priority: Must/Should/Could]
|
|
146
|
+
|
|
147
|
+
## Scope Decisions
|
|
148
|
+
[Key inclusions and exclusions]
|
|
149
|
+
|
|
150
|
+
## Metrics Defined
|
|
151
|
+
[North Star + top 3 metrics]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 6. Present to User and Gate
|
|
155
|
+
|
|
156
|
+
Show the Success Metrics summary. Ask:
|
|
157
|
+
- Are the targets realistic?
|
|
158
|
+
- Is the North Star metric right?
|
|
159
|
+
- Any metrics missing?
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
[C] Continue — Metrics defined, proceed to Round 3 (Architecture Design)
|
|
163
|
+
[R] Revise — Adjust targets or metrics
|
|
164
|
+
[D] Discuss — Explore specific metric benchmarks
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**HALT — wait for user response before proceeding.**
|
|
168
|
+
|
|
169
|
+
### 7. Handle Response
|
|
170
|
+
|
|
171
|
+
- **[C]**: Load next step: `./step-30-architecture-context.md`
|
|
172
|
+
- **[R]**: Revise metrics, update product.md §6, re-present
|
|
173
|
+
- **[D]**: Deep-dive specific benchmarks, then re-present gate
|
|
174
|
+
|
|
175
|
+
## SUCCESS METRICS
|
|
176
|
+
|
|
177
|
+
- North Star metric defined with baseline and target
|
|
178
|
+
- Business metrics have specific targets at M3/M6/M12
|
|
179
|
+
- User metrics have baselines and targets
|
|
180
|
+
- Benchmark sources cited from web search
|
|
181
|
+
- Anti-metrics defined (what NOT to optimize)
|
|
182
|
+
- Round 2 research report written
|
|
183
|
+
- Output written to product.md §6
|
|
184
|
+
|
|
185
|
+
## FAILURE MODES
|
|
186
|
+
|
|
187
|
+
- Metrics without specific targets ("improve retention")
|
|
188
|
+
- No baseline or benchmark for comparison
|
|
189
|
+
- Only business metrics, no user metrics (or vice versa)
|
|
190
|
+
- Unrealistic targets (100% retention, 0% error rate)
|
|
191
|
+
- Not writing output before presenting to user
|
|
192
|
+
|
|
193
|
+
## NEXT STEP
|
|
194
|
+
|
|
195
|
+
After user selects [C], read and follow: `./step-30-architecture-context.md`
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Step 30: Architecture Context
|
|
2
|
+
|
|
3
|
+
## MANDATORY EXECUTION RULES
|
|
4
|
+
|
|
5
|
+
- WEB SEARCH REQUIRED — verify technology claims against official docs
|
|
6
|
+
- USE Context7 MCP for framework/library documentation lookups
|
|
7
|
+
- ARCHITECTURE FOLLOWS PRODUCT — decisions must trace to product requirements
|
|
8
|
+
- WRITE output to spec file BEFORE presenting to user
|
|
9
|
+
- ALL output in English (spec files); conversation in Chinese
|
|
10
|
+
|
|
11
|
+
## PREREQUISITES
|
|
12
|
+
|
|
13
|
+
- Round 2 completed (steps 20-22) with [C], OR user chose "Architecture Change" starting at step-30
|
|
14
|
+
- `.ultra/specs/architecture.md` exists
|
|
15
|
+
|
|
16
|
+
## CONTEXT BOUNDARIES
|
|
17
|
+
|
|
18
|
+
- Focus: Quality goals, constraints, and system context (arc42 §1-3)
|
|
19
|
+
- Decisions must be grounded in product requirements from product.md
|
|
20
|
+
- This is about WHAT the system must achieve, not HOW to build it (that's step-31)
|
|
21
|
+
|
|
22
|
+
## SEARCH STRATEGY (MANDATORY)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Search: "{{product_domain}} architecture quality attributes"
|
|
26
|
+
Search: "{{product_domain}} system integration patterns"
|
|
27
|
+
Search: "{{product_domain}} technical constraints regulations"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use Context7 MCP for specific framework/library documentation.
|
|
31
|
+
|
|
32
|
+
## EXECUTION SEQUENCE
|
|
33
|
+
|
|
34
|
+
### 1. Define Quality Goals
|
|
35
|
+
|
|
36
|
+
Derive from product.md §6 (Success Metrics) and user scenarios:
|
|
37
|
+
|
|
38
|
+
| Quality Attribute | Concrete Scenario | Priority |
|
|
39
|
+
|------------------|-------------------|----------|
|
|
40
|
+
| Performance | [e.g., "API response < 200ms for 95th percentile"] | [1-3] |
|
|
41
|
+
| Scalability | [e.g., "Handle 10K concurrent users"] | [1-3] |
|
|
42
|
+
| Security | [e.g., "SOC 2 compliance, encrypted at rest"] | [1-3] |
|
|
43
|
+
| Availability | [e.g., "99.9% uptime, < 5min recovery"] | [1-3] |
|
|
44
|
+
| Maintainability | [e.g., "New developer productive in < 1 week"] | [1-3] |
|
|
45
|
+
|
|
46
|
+
Ask user via AskUserQuestion: "Which quality attributes matter most? Performance? Security? Scalability?"
|
|
47
|
+
|
|
48
|
+
### 2. Identify Constraints
|
|
49
|
+
|
|
50
|
+
**Technical constraints**:
|
|
51
|
+
- Required platforms/browsers
|
|
52
|
+
- Mandatory integrations
|
|
53
|
+
- Technology restrictions (e.g., "must use Python for ML team compatibility")
|
|
54
|
+
|
|
55
|
+
**Organizational constraints**:
|
|
56
|
+
- Team size and skill profile
|
|
57
|
+
- Budget limitations
|
|
58
|
+
- Timeline constraints
|
|
59
|
+
|
|
60
|
+
**Regulatory constraints**:
|
|
61
|
+
- Data privacy (GDPR, CCPA)
|
|
62
|
+
- Industry regulations
|
|
63
|
+
- Compliance requirements
|
|
64
|
+
|
|
65
|
+
### 3. Map System Context
|
|
66
|
+
|
|
67
|
+
Identify all external systems and interfaces:
|
|
68
|
+
|
|
69
|
+
**Users**: Who interacts with the system?
|
|
70
|
+
**External systems**: What APIs, services, databases does it connect to?
|
|
71
|
+
**Data flows**: What data enters and leaves the system?
|
|
72
|
+
|
|
73
|
+
### 4. Write Output
|
|
74
|
+
|
|
75
|
+
**WRITE IMMEDIATELY** to `.ultra/specs/architecture.md` §1-3:
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
## §1 Quality Goals
|
|
79
|
+
|
|
80
|
+
| Priority | Quality Attribute | Scenario | Metric |
|
|
81
|
+
|----------|------------------|----------|--------|
|
|
82
|
+
| 1 | [Attribute] | [Concrete scenario] | [Measurable target] |
|
|
83
|
+
| 2 | [Attribute] | [Concrete scenario] | [Measurable target] |
|
|
84
|
+
| 3 | [Attribute] | [Concrete scenario] | [Measurable target] |
|
|
85
|
+
|
|
86
|
+
## §2 Constraints
|
|
87
|
+
|
|
88
|
+
### Technical Constraints
|
|
89
|
+
| Constraint | Rationale | Impact |
|
|
90
|
+
|-----------|-----------|--------|
|
|
91
|
+
| [Constraint] | [Why this exists] | [What it limits] |
|
|
92
|
+
|
|
93
|
+
### Organizational Constraints
|
|
94
|
+
| Constraint | Rationale | Impact |
|
|
95
|
+
|-----------|-----------|--------|
|
|
96
|
+
| [Constraint] | [Why this exists] | [What it limits] |
|
|
97
|
+
|
|
98
|
+
### Regulatory Constraints
|
|
99
|
+
| Constraint | Rationale | Impact |
|
|
100
|
+
|-----------|-----------|--------|
|
|
101
|
+
| [Constraint] | [Why this exists] | [What it limits] |
|
|
102
|
+
|
|
103
|
+
## §3 System Context
|
|
104
|
+
|
|
105
|
+
### Context Diagram
|
|
106
|
+
|
|
107
|
+
**Users**:
|
|
108
|
+
- [User type 1]: [How they interact]
|
|
109
|
+
- [User type 2]: [How they interact]
|
|
110
|
+
|
|
111
|
+
**External Systems**:
|
|
112
|
+
| System | Direction | Data | Protocol | Notes |
|
|
113
|
+
|--------|-----------|------|----------|-------|
|
|
114
|
+
| [System A] | Inbound | [What data] | [REST/gRPC/etc] | [Notes] |
|
|
115
|
+
| [System B] | Outbound | [What data] | [Protocol] | [Notes] |
|
|
116
|
+
| [System C] | Bidirectional | [What data] | [Protocol] | [Notes] |
|
|
117
|
+
|
|
118
|
+
**Data Flows**:
|
|
119
|
+
- [User] → [System] → [External]: [Description of flow]
|
|
120
|
+
- [External] → [System] → [User]: [Description of flow]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 5. Present to User and Gate
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
[C] Continue — Context defined, proceed to Solution Strategy
|
|
127
|
+
[R] Revise — Adjust quality goals, constraints, or context
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**HALT — wait for user response before proceeding.**
|
|
131
|
+
|
|
132
|
+
### 6. Handle Response
|
|
133
|
+
|
|
134
|
+
- **[C]**: Load next step: `./step-31-solution-strategy.md`
|
|
135
|
+
- **[R]**: Revise, update architecture.md §1-3, re-present
|
|
136
|
+
|
|
137
|
+
## SUCCESS METRICS
|
|
138
|
+
|
|
139
|
+
- Quality goals are specific and measurable (not "good performance")
|
|
140
|
+
- Constraints identified across technical/organizational/regulatory
|
|
141
|
+
- System context shows all external interfaces
|
|
142
|
+
- All quality goals trace to product requirements
|
|
143
|
+
- Output written to architecture.md §1-3
|
|
144
|
+
|
|
145
|
+
## FAILURE MODES
|
|
146
|
+
|
|
147
|
+
- Vague quality goals ("system should be fast")
|
|
148
|
+
- Missing regulatory constraints
|
|
149
|
+
- System context missing key external integrations
|
|
150
|
+
- Quality goals not derived from product requirements
|
|
151
|
+
|
|
152
|
+
## NEXT STEP
|
|
153
|
+
|
|
154
|
+
After user selects [C], read and follow: `./step-31-solution-strategy.md`
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Step 31: Solution Strategy & Tech Stack
|
|
2
|
+
|
|
3
|
+
## MANDATORY EXECUTION RULES
|
|
4
|
+
|
|
5
|
+
- WEB SEARCH REQUIRED — verify all technology claims
|
|
6
|
+
- USE Context7 MCP for framework documentation
|
|
7
|
+
- COMPARE TOP 3 OPTIONS for every major tech decision
|
|
8
|
+
- EVERY CHOICE needs RATIONALE — "it's popular" is not enough
|
|
9
|
+
- WRITE output to spec file BEFORE presenting to user
|
|
10
|
+
- ALL output in English (spec files); conversation in Chinese
|
|
11
|
+
|
|
12
|
+
## PREREQUISITES
|
|
13
|
+
|
|
14
|
+
- Step 30 (Architecture Context) completed with [C]
|
|
15
|
+
- `.ultra/specs/architecture.md` §1-3 exist
|
|
16
|
+
|
|
17
|
+
## CONTEXT BOUNDARIES
|
|
18
|
+
|
|
19
|
+
- Focus: Tech stack selection with evidence-based rationale (arc42 §4)
|
|
20
|
+
- Decisions must satisfy quality goals from §1
|
|
21
|
+
- Decisions must respect constraints from §2
|
|
22
|
+
- Compare options — never recommend without alternatives analyzed
|
|
23
|
+
|
|
24
|
+
## SEARCH STRATEGY (MANDATORY)
|
|
25
|
+
|
|
26
|
+
For each major technology decision:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Search: "[option A] vs [option B] vs [option C] {{product_domain}} 2024 2025"
|
|
30
|
+
Search: "[chosen framework] production performance benchmarks"
|
|
31
|
+
Search: "[chosen framework] scalability limitations"
|
|
32
|
+
Search: "[chosen database] vs alternatives for {{use_case}}"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use Context7 MCP: Query official docs for each selected technology.
|
|
36
|
+
|
|
37
|
+
## EXECUTION SEQUENCE
|
|
38
|
+
|
|
39
|
+
### 1. Identify Key Technology Decisions
|
|
40
|
+
|
|
41
|
+
Based on system context (§3) and quality goals (§1):
|
|
42
|
+
|
|
43
|
+
| Decision Area | What to Decide |
|
|
44
|
+
|--------------|---------------|
|
|
45
|
+
| Language/Runtime | Primary programming language |
|
|
46
|
+
| Web Framework | API/web framework |
|
|
47
|
+
| Database | Primary data store |
|
|
48
|
+
| Caching | Caching layer (if needed) |
|
|
49
|
+
| Authentication | Auth approach |
|
|
50
|
+
| Hosting | Cloud/infrastructure |
|
|
51
|
+
| CI/CD | Build and deploy pipeline |
|
|
52
|
+
| Monitoring | Observability stack |
|
|
53
|
+
|
|
54
|
+
### 2. Compare Options (Top 3 per Decision)
|
|
55
|
+
|
|
56
|
+
For each decision, research and compare 3 options:
|
|
57
|
+
|
|
58
|
+
| Criterion | Option A | Option B | Option C |
|
|
59
|
+
|-----------|---------|---------|---------|
|
|
60
|
+
| Quality goal fit | [How it meets §1 goals] | ... | ... |
|
|
61
|
+
| Constraint fit | [How it respects §2] | ... | ... |
|
|
62
|
+
| Community/maturity | [Stars, contributors, releases] | ... | ... |
|
|
63
|
+
| Performance | [Benchmarks with source] | ... | ... |
|
|
64
|
+
| Learning curve | [Team skill match] | ... | ... |
|
|
65
|
+
| Cost | [Licensing, hosting costs] | ... | ... |
|
|
66
|
+
|
|
67
|
+
### 3. Make Decisions with Rationale
|
|
68
|
+
|
|
69
|
+
For each decision:
|
|
70
|
+
- **Chosen**: [Option]
|
|
71
|
+
- **Rationale**: [Why this one — reference quality goals and constraints]
|
|
72
|
+
- **Trade-off accepted**: [What we give up]
|
|
73
|
+
- **Risk**: [What could go wrong]
|
|
74
|
+
- **Migration path**: [How to change if this doesn't work]
|
|
75
|
+
|
|
76
|
+
### 4. Write Output
|
|
77
|
+
|
|
78
|
+
**WRITE IMMEDIATELY** to `.ultra/specs/architecture.md` §4:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
## §4 Solution Strategy
|
|
82
|
+
|
|
83
|
+
### Technology Decisions
|
|
84
|
+
|
|
85
|
+
#### Language & Runtime
|
|
86
|
+
- **Chosen**: [Language/Runtime]
|
|
87
|
+
- **Alternatives considered**: [Option B], [Option C]
|
|
88
|
+
- **Rationale**: [Why — reference §1 quality goals]
|
|
89
|
+
- **Trade-off**: [What we give up]
|
|
90
|
+
- **Source**: [Benchmark/doc URL]
|
|
91
|
+
|
|
92
|
+
#### Web Framework
|
|
93
|
+
- **Chosen**: [Framework]
|
|
94
|
+
- **Alternatives considered**: [Option B], [Option C]
|
|
95
|
+
- **Rationale**: [Why]
|
|
96
|
+
- **Trade-off**: [What we give up]
|
|
97
|
+
- **Source**: [URL]
|
|
98
|
+
|
|
99
|
+
#### Database
|
|
100
|
+
- **Chosen**: [Database]
|
|
101
|
+
- **Alternatives considered**: [Option B], [Option C]
|
|
102
|
+
- **Rationale**: [Why]
|
|
103
|
+
- **Trade-off**: [What we give up]
|
|
104
|
+
- **Source**: [URL]
|
|
105
|
+
|
|
106
|
+
#### Authentication
|
|
107
|
+
- **Chosen**: [Approach]
|
|
108
|
+
- **Alternatives considered**: [Option B], [Option C]
|
|
109
|
+
- **Rationale**: [Why]
|
|
110
|
+
- **Source**: [URL]
|
|
111
|
+
|
|
112
|
+
#### Hosting & Infrastructure
|
|
113
|
+
- **Chosen**: [Platform]
|
|
114
|
+
- **Alternatives considered**: [Option B], [Option C]
|
|
115
|
+
- **Rationale**: [Why]
|
|
116
|
+
- **Estimated cost**: [$X/month at launch scale]
|
|
117
|
+
- **Source**: [URL]
|
|
118
|
+
|
|
119
|
+
### Tech Stack Summary
|
|
120
|
+
|
|
121
|
+
| Layer | Technology | Version | Purpose |
|
|
122
|
+
|-------|-----------|---------|---------|
|
|
123
|
+
| Frontend | [Tech] | [Ver] | [What it does] |
|
|
124
|
+
| Backend | [Tech] | [Ver] | [What it does] |
|
|
125
|
+
| Database | [Tech] | [Ver] | [What it does] |
|
|
126
|
+
| Cache | [Tech] | [Ver] | [What it does] |
|
|
127
|
+
| Auth | [Tech] | [Ver] | [What it does] |
|
|
128
|
+
| Hosting | [Tech] | - | [What it does] |
|
|
129
|
+
| CI/CD | [Tech] | - | [What it does] |
|
|
130
|
+
| Monitoring | [Tech] | - | [What it does] |
|
|
131
|
+
|
|
132
|
+
### Decision Confidence
|
|
133
|
+
- **Overall**: [X]%
|
|
134
|
+
- **Most confident**: [Decision] — [Why]
|
|
135
|
+
- **Least confident**: [Decision] — [Risk]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 5. Present to User and Gate
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
[C] Continue — Tech stack defined, proceed to Building Blocks
|
|
142
|
+
[R] Revise — Reconsider specific technology choices
|
|
143
|
+
[D] Discuss — Deep-dive on a specific decision
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**HALT — wait for user response before proceeding.**
|
|
147
|
+
|
|
148
|
+
### 6. Handle Response
|
|
149
|
+
|
|
150
|
+
- **[C]**: Load next step: `./step-32-building-blocks.md`
|
|
151
|
+
- **[R]**: Revise decisions, update architecture.md §4, re-present
|
|
152
|
+
- **[D]**: Deep-dive with additional research, then re-present
|
|
153
|
+
|
|
154
|
+
## SUCCESS METRICS
|
|
155
|
+
|
|
156
|
+
- Top 3 options compared for every major decision
|
|
157
|
+
- Every choice has explicit rationale referencing quality goals
|
|
158
|
+
- Trade-offs stated honestly
|
|
159
|
+
- All claims verified via web search or Context7
|
|
160
|
+
- Output written to architecture.md §4
|
|
161
|
+
|
|
162
|
+
## FAILURE MODES
|
|
163
|
+
|
|
164
|
+
- Single option considered ("just use React")
|
|
165
|
+
- No rationale beyond popularity
|
|
166
|
+
- Ignoring constraints from §2
|
|
167
|
+
- Not verifying version compatibility
|
|
168
|
+
- Technology choices that conflict with quality goals
|
|
169
|
+
|
|
170
|
+
## NEXT STEP
|
|
171
|
+
|
|
172
|
+
After user selects [C], read and follow: `./step-32-building-blocks.md`
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Step 32: Building Blocks & Runtime Scenarios
|
|
2
|
+
|
|
3
|
+
## MANDATORY EXECUTION RULES
|
|
4
|
+
|
|
5
|
+
- MODULE DECOMPOSITION must follow Functional Core / Imperative Shell pattern
|
|
6
|
+
- EVERY MODULE must trace to at least one feature from product.md §5
|
|
7
|
+
- RUNTIME SCENARIOS must cover the top 3 user scenarios from product.md §3
|
|
8
|
+
- WRITE output to spec file BEFORE presenting to user
|
|
9
|
+
- ALL output in English (spec files); conversation in Chinese
|
|
10
|
+
|
|
11
|
+
## PREREQUISITES
|
|
12
|
+
|
|
13
|
+
- Step 31 (Solution Strategy) completed with [C]
|
|
14
|
+
- `.ultra/specs/architecture.md` §1-4 exist
|
|
15
|
+
|
|
16
|
+
## CONTEXT BOUNDARIES
|
|
17
|
+
|
|
18
|
+
- Focus: Module decomposition and runtime behavior (arc42 §5-6)
|
|
19
|
+
- Structure follows: `src/{domain/, application/usecases/, infrastructure/}`
|
|
20
|
+
- Domain logic is pure (no IO); Infrastructure handles IO
|
|
21
|
+
- This step bridges product (WHAT) to code (HOW)
|
|
22
|
+
|
|
23
|
+
## EXECUTION SEQUENCE
|
|
24
|
+
|
|
25
|
+
### 1. Module Decomposition
|
|
26
|
+
|
|
27
|
+
Based on features from product.md §5 and tech stack from §4:
|
|
28
|
+
|
|
29
|
+
**Layer structure**:
|
|
30
|
+
```
|
|
31
|
+
src/
|
|
32
|
+
├── domain/ # Functional Core (pure logic)
|
|
33
|
+
│ ├── entities/ # Domain objects
|
|
34
|
+
│ ├── values/ # Value objects
|
|
35
|
+
│ └── services/ # Domain services (pure functions)
|
|
36
|
+
├── application/ # Use cases (orchestration)
|
|
37
|
+
│ └── usecases/ # One file per use case
|
|
38
|
+
├── infrastructure/ # Imperative Shell (IO)
|
|
39
|
+
│ ├── http/ # HTTP handlers/routes
|
|
40
|
+
│ ├── persistence/ # Database repositories
|
|
41
|
+
│ └── external/ # External API clients
|
|
42
|
+
└── config/ # Configuration
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Map each feature to modules:
|
|
46
|
+
- Feature 1 → domain/entities/X, application/usecases/Y, infrastructure/http/Z
|
|
47
|
+
|
|
48
|
+
### 2. Define Key Interfaces
|
|
49
|
+
|
|
50
|
+
For each module boundary, define the contract:
|
|
51
|
+
|
|
52
|
+
| Interface | Provider | Consumer | Data |
|
|
53
|
+
|-----------|---------|----------|------|
|
|
54
|
+
| [Interface A] | [Module] | [Module] | [DTO/Entity] |
|
|
55
|
+
|
|
56
|
+
### 3. Runtime Scenarios
|
|
57
|
+
|
|
58
|
+
For the top 3 user scenarios from product.md §3, describe the runtime flow:
|
|
59
|
+
|
|
60
|
+
**Scenario S1**: [Name]
|
|
61
|
+
```
|
|
62
|
+
User → HTTP Handler → Use Case → Domain Service → Repository → Database
|
|
63
|
+
↓
|
|
64
|
+
User ← HTTP Response ← Use Case ← Domain Entity ← Repository ← Query Result
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 4. Write Output
|
|
68
|
+
|
|
69
|
+
**WRITE IMMEDIATELY** to `.ultra/specs/architecture.md` §5-6:
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## §5 Building Block View
|
|
73
|
+
|
|
74
|
+
### Level 1: System Decomposition
|
|
75
|
+
|
|
76
|
+
| Module | Layer | Responsibility | Dependencies |
|
|
77
|
+
|--------|-------|---------------|-------------|
|
|
78
|
+
| [Module A] | Domain | [What it does] | None (pure) |
|
|
79
|
+
| [Module B] | Application | [What it orchestrates] | [Module A] |
|
|
80
|
+
| [Module C] | Infrastructure | [What IO it handles] | [Module B] |
|
|
81
|
+
|
|
82
|
+
### Module Details
|
|
83
|
+
|
|
84
|
+
#### domain/
|
|
85
|
+
- **entities/[Entity]**: [Description, key fields, business rules]
|
|
86
|
+
- **values/[ValueObject]**: [Description, validation rules]
|
|
87
|
+
- **services/[Service]**: [Pure functions, input → output]
|
|
88
|
+
|
|
89
|
+
#### application/usecases/
|
|
90
|
+
- **[UseCase1]**: [Input → orchestration → output]
|
|
91
|
+
- **[UseCase2]**: [Input → orchestration → output]
|
|
92
|
+
|
|
93
|
+
#### infrastructure/
|
|
94
|
+
- **http/[Handler]**: [Routes, request/response mapping]
|
|
95
|
+
- **persistence/[Repository]**: [Database operations]
|
|
96
|
+
- **external/[Client]**: [External API integration]
|
|
97
|
+
|
|
98
|
+
### Feature → Module Mapping
|
|
99
|
+
|
|
100
|
+
| Feature | Domain | Application | Infrastructure |
|
|
101
|
+
|---------|--------|------------|---------------|
|
|
102
|
+
| [Feature 1] | [Entities] | [UseCases] | [Handlers, Repos] |
|
|
103
|
+
| [Feature 2] | [Entities] | [UseCases] | [Handlers, Repos] |
|
|
104
|
+
|
|
105
|
+
## §6 Runtime Scenarios
|
|
106
|
+
|
|
107
|
+
### Scenario 1: [S1 Name from product.md]
|
|
108
|
+
|
|
109
|
+
**Trigger**: [User action]
|
|
110
|
+
**Flow**:
|
|
111
|
+
1. User sends [request type] to [endpoint]
|
|
112
|
+
2. [Handler] validates input, maps to [DTO]
|
|
113
|
+
3. [UseCase] orchestrates: loads [Entity] via [Repository]
|
|
114
|
+
4. [DomainService] applies business logic (pure)
|
|
115
|
+
5. [Repository] persists result
|
|
116
|
+
6. [Handler] returns [response]
|
|
117
|
+
|
|
118
|
+
**Data flow**: [Input] → [Transformation] → [Output]
|
|
119
|
+
**Error paths**: [What can go wrong and how it's handled]
|
|
120
|
+
|
|
121
|
+
### Scenario 2: [S2 Name]
|
|
122
|
+
[Same structure]
|
|
123
|
+
|
|
124
|
+
### Scenario 3: [S3 Name]
|
|
125
|
+
[Same structure]
|
|
126
|
+
|
|
127
|
+
### Round 3 Summary
|
|
128
|
+
|
|
129
|
+
**Architecture Design Confidence**:
|
|
130
|
+
- **Quality goal coverage**: [X]%
|
|
131
|
+
- **Tech stack confidence**: [X]%
|
|
132
|
+
- **Module clarity**: [X]%
|
|
133
|
+
- **Overall R3 confidence**: [X]%
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 5. Write Round 3 Research Report
|
|
137
|
+
|
|
138
|
+
**WRITE** to `.ultra/docs/research/architecture-design-{date}.md`:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
# Round 3: Architecture Design
|
|
142
|
+
|
|
143
|
+
> **Confidence**: [X]%
|
|
144
|
+
> **Steps completed**: 30-32
|
|
145
|
+
> **Completed**: [date]
|
|
146
|
+
|
|
147
|
+
## Key Decisions
|
|
148
|
+
[Tech stack choices with rationale]
|
|
149
|
+
|
|
150
|
+
## Architecture Pattern
|
|
151
|
+
[Functional Core / Imperative Shell overview]
|
|
152
|
+
|
|
153
|
+
## Risk Areas
|
|
154
|
+
[Where architecture is weakest]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 6. Present to User and Gate
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
[C] Continue — Architecture defined, proceed to Round 4 (Deployment & Quality)
|
|
161
|
+
[R] Revise — Adjust modules or scenarios
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**HALT — wait for user response before proceeding.**
|
|
165
|
+
|
|
166
|
+
### 7. Handle Response
|
|
167
|
+
|
|
168
|
+
- **[C]**: Load next step: `./step-40-deployment.md`
|
|
169
|
+
- **[R]**: Revise, update architecture.md §5-6, re-present
|
|
170
|
+
|
|
171
|
+
## SUCCESS METRICS
|
|
172
|
+
|
|
173
|
+
- Every module traces to a feature
|
|
174
|
+
- Functional Core / Imperative Shell separation clear
|
|
175
|
+
- Top 3 runtime scenarios documented with data flow
|
|
176
|
+
- Error paths identified
|
|
177
|
+
- Round 3 research report written
|
|
178
|
+
|
|
179
|
+
## FAILURE MODES
|
|
180
|
+
|
|
181
|
+
- Modules that don't map to any feature (orphan code)
|
|
182
|
+
- Business logic in infrastructure layer
|
|
183
|
+
- Missing error paths in runtime scenarios
|
|
184
|
+
- No interface contracts between modules
|
|
185
|
+
|
|
186
|
+
## NEXT STEP
|
|
187
|
+
|
|
188
|
+
After user selects [C], read and follow: `./step-40-deployment.md`
|