ultra-builder-pro-cli 0.10.0 → 0.11.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +1 -1
  3. package/adapters/_shared/codex-assets.cjs +23 -341
  4. package/adapters/_shared/runtime-assets.cjs +24 -0
  5. package/adapters/_shared/tests/runtime-assets.test.cjs +11 -4
  6. package/adapters/claude.js +28 -5
  7. package/adapters/kimi.js +15 -138
  8. package/adapters/opencode.js +14 -47
  9. package/adapters/tests/claude.test.cjs +22 -8
  10. package/adapters/tests/codex.test.cjs +19 -6
  11. package/adapters/tests/kimi.test.cjs +11 -11
  12. package/adapters/tests/opencode.test.cjs +11 -7
  13. package/agents/code-reviewer.md +24 -85
  14. package/agents/debugger.md +30 -132
  15. package/agents/review-code.md +24 -104
  16. package/agents/review-comments.md +20 -83
  17. package/agents/review-coordinator.md +40 -137
  18. package/agents/review-design.md +21 -118
  19. package/agents/review-errors.md +22 -70
  20. package/agents/review-spec.md +36 -0
  21. package/agents/review-tests.md +20 -76
  22. package/agents/tdd-runner.md +26 -84
  23. package/commands/learn.md +5 -36
  24. package/commands/ultra-change.md +5 -43
  25. package/commands/ultra-deliver.md +4 -46
  26. package/commands/ultra-dev.md +4 -48
  27. package/commands/ultra-doctor.md +4 -30
  28. package/commands/ultra-init.md +5 -47
  29. package/commands/ultra-plan.md +5 -48
  30. package/commands/ultra-research.md +5 -54
  31. package/commands/ultra-status.md +5 -44
  32. package/commands/ultra-test.md +5 -45
  33. package/commands/ultra-think.md +5 -40
  34. package/docs/PLAN.zh-CN.md +3 -3
  35. package/docs/ROADMAP.md +1 -1
  36. package/docs/SKILL-AUTHORING.md +75 -0
  37. package/package.json +3 -2
  38. package/skills/cc-collab/SKILL.md +16 -18
  39. package/skills/code-review-expert/SKILL.md +39 -114
  40. package/skills/code-review-expert/references/correctness-reliability.md +30 -0
  41. package/skills/code-review-expert/references/design-boundaries.md +26 -0
  42. package/skills/code-review-expert/references/removal-plan.md +17 -45
  43. package/skills/codex-collab/SKILL.md +23 -28
  44. package/skills/codex-collab/evals/evals.json +18 -23
  45. package/skills/integration-rules/SKILL.md +28 -67
  46. package/skills/learn/SKILL.md +46 -106
  47. package/skills/security-rules/SKILL.md +34 -56
  48. package/skills/testing-rules/SKILL.md +28 -52
  49. package/skills/ultra-change/SKILL.md +57 -114
  50. package/skills/ultra-deliver/SKILL.md +49 -87
  51. package/skills/ultra-dev/SKILL.md +42 -105
  52. package/skills/ultra-doctor/SKILL.md +39 -72
  53. package/skills/ultra-init/SKILL.md +59 -140
  54. package/skills/ultra-plan/SKILL.md +48 -88
  55. package/skills/ultra-research/SKILL.md +59 -152
  56. package/skills/ultra-research/references/architecture.md +38 -0
  57. package/skills/ultra-research/references/problem-product.md +39 -0
  58. package/skills/ultra-research/references/quality-delivery.md +34 -0
  59. package/skills/ultra-research/references/synthesis.md +38 -0
  60. package/skills/ultra-research/references/users-scope.md +40 -0
  61. package/skills/ultra-review/SKILL.md +54 -98
  62. package/skills/ultra-review/references/unified-schema.md +76 -101
  63. package/skills/ultra-review/scripts/review_wait.py +242 -77
  64. package/skills/ultra-status/SKILL.md +29 -51
  65. package/skills/ultra-test/SKILL.md +37 -72
  66. package/skills/ultra-think/SKILL.md +43 -102
  67. package/skills/ultra-verify/SKILL.md +44 -84
  68. package/skills/ultra-verify/evals/evals.json +24 -27
  69. package/spec/schemas/command-manifest.schema.json +7 -25
  70. package/spec/schemas/skill-manifest.schema.json +9 -79
  71. package/skills/code-review-expert/references/code-quality-checklist.md +0 -112
  72. package/skills/code-review-expert/references/integration-checklist.md +0 -46
  73. package/skills/code-review-expert/references/security-checklist.md +0 -100
  74. package/skills/code-review-expert/references/solid-checklist.md +0 -65
  75. package/skills/ultra-research/steps/step-00-problem-validation.md +0 -154
  76. package/skills/ultra-research/steps/step-01-opportunity-discovery.md +0 -172
  77. package/skills/ultra-research/steps/step-02-market-assessment.md +0 -195
  78. package/skills/ultra-research/steps/step-03-competitive-landscape.md +0 -197
  79. package/skills/ultra-research/steps/step-04-product-strategy.md +0 -196
  80. package/skills/ultra-research/steps/step-05-assumptions-validation.md +0 -234
  81. package/skills/ultra-research/steps/step-10-user-personas.md +0 -169
  82. package/skills/ultra-research/steps/step-11-user-scenarios.md +0 -181
  83. package/skills/ultra-research/steps/step-20-user-stories.md +0 -156
  84. package/skills/ultra-research/steps/step-21-features-scope.md +0 -157
  85. package/skills/ultra-research/steps/step-22-success-metrics.md +0 -195
  86. package/skills/ultra-research/steps/step-30-architecture-context.md +0 -154
  87. package/skills/ultra-research/steps/step-31-solution-strategy.md +0 -172
  88. package/skills/ultra-research/steps/step-32-building-blocks.md +0 -188
  89. package/skills/ultra-research/steps/step-40-deployment.md +0 -123
  90. package/skills/ultra-research/steps/step-41-quality-risks.md +0 -135
  91. package/skills/ultra-research/steps/step-99-synthesis.md +0 -188
  92. package/skills/ultra-review/scripts/review_verdict_update.py +0 -99
@@ -1,172 +0,0 @@
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`
@@ -1,188 +0,0 @@
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`
@@ -1,123 +0,0 @@
1
- # Step 40: Deployment & Infrastructure
2
-
3
- ## MANDATORY EXECUTION RULES
4
-
5
- - WEB SEARCH REQUIRED — verify infrastructure pricing and capabilities
6
- - INCLUDE cost estimates with sources
7
- - DEFINE environments: dev, staging, production
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 32 (Building Blocks) completed with [C]
14
- - `.ultra/specs/architecture.md` §1-6 exist
15
-
16
- ## SEARCH STRATEGY (MANDATORY)
17
-
18
- ```
19
- Search: "{{chosen_hosting}} pricing calculator {{product_domain}}"
20
- Search: "{{chosen_hosting}} deployment best practices"
21
- Search: "{{chosen_tech_stack}} CI/CD pipeline setup"
22
- Search: "{{chosen_tech_stack}} docker deployment production"
23
- ```
24
-
25
- ## EXECUTION SEQUENCE
26
-
27
- ### 1. Define Deployment Topology
28
-
29
- Map the infrastructure for each environment.
30
-
31
- ### 2. Define CI/CD Pipeline
32
-
33
- Build → Test → Deploy stages with quality gates.
34
-
35
- ### 3. Estimate Costs
36
-
37
- Use web search for real pricing data.
38
-
39
- ### 4. Write Output
40
-
41
- **WRITE IMMEDIATELY** to `.ultra/specs/architecture.md` §7-9:
42
-
43
- ```markdown
44
- ## §7 Deployment View
45
-
46
- ### Environments
47
-
48
- | Environment | Purpose | Infrastructure | URL Pattern |
49
- |------------|---------|---------------|-------------|
50
- | Development | Local dev | [Docker Compose / local] | localhost:X |
51
- | Staging | Pre-prod testing | [Cloud provider details] | staging.X |
52
- | Production | Live users | [Cloud provider details] | X.com |
53
-
54
- ### Production Topology
55
- - **Compute**: [Service type, instance size, count]
56
- - **Database**: [Managed service, tier, backup]
57
- - **Cache**: [Service, tier]
58
- - **CDN**: [Provider]
59
- - **DNS**: [Provider]
60
-
61
- ### CI/CD Pipeline
62
-
63
- | Stage | Tool | Trigger | Quality Gate |
64
- |-------|------|---------|-------------|
65
- | Build | [Tool] | Push to branch | Compilation success |
66
- | Unit Test | [Runner] | Post-build | 80%+ coverage, 0 failures |
67
- | Integration Test | [Runner] | Post-unit | All green |
68
- | Security Scan | [Tool] | Post-test | No critical/high |
69
- | Deploy Staging | [Tool] | Merge to main | All gates passed |
70
- | Deploy Production | [Tool] | Manual approval | Staging verified |
71
-
72
- ## §8 Crosscutting Concerns
73
-
74
- ### Logging
75
- - **Format**: Structured JSON
76
- - **Fields**: timestamp, level, service, traceId, message, context
77
- - **Tool**: [Logging framework]
78
-
79
- ### Authentication
80
- - **Method**: [JWT / OAuth2 / etc]
81
- - **Provider**: [Auth service]
82
- - **Session**: [Strategy]
83
-
84
- ### Error Handling
85
- - **Pattern**: Result/Either in domain, global handler in infrastructure
86
- - **Alerting**: [When and how]
87
-
88
- ## §9 Cost Estimate
89
-
90
- | Service | Monthly Cost | Annual Cost | Source |
91
- |---------|-------------|------------|--------|
92
- | Compute | $[X] | $[X] | [URL] |
93
- | Database | $[X] | $[X] | [URL] |
94
- | Other | $[X] | $[X] | [URL] |
95
- | **Total** | **$[X]** | **$[X]** | |
96
-
97
- _Assumptions: [user count, traffic, storage]_
98
- ```
99
-
100
- ### 5. Present to User and Gate
101
-
102
- ```
103
- [C] Continue — Deployment defined, proceed to Quality & Risks
104
- [R] Revise — Adjust infrastructure or costs
105
- ```
106
-
107
- **HALT — wait for user response before proceeding.**
108
-
109
- ### 6. Handle Response
110
-
111
- - **[C]**: Load next step: `./step-41-quality-risks.md`
112
- - **[R]**: Revise, update architecture.md §7-9, re-present
113
-
114
- ## SUCCESS METRICS
115
-
116
- - All environments defined
117
- - CI/CD pipeline with quality gates
118
- - Cost estimates with sources
119
- - Crosscutting concerns (logging, auth, errors) addressed
120
-
121
- ## NEXT STEP
122
-
123
- After user selects [C], read and follow: `./step-41-quality-risks.md`
@@ -1,135 +0,0 @@
1
- # Step 41: Quality Scenarios & Risks
2
-
3
- ## MANDATORY EXECUTION RULES
4
-
5
- - QUALITY SCENARIOS must be specific and testable
6
- - RISKS need probability AND impact AND mitigation
7
- - BE HONEST — don't minimize risks to make the plan look good
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 40 (Deployment) completed with [C]
14
- - `.ultra/specs/architecture.md` §1-9 exist
15
-
16
- ## EXECUTION SEQUENCE
17
-
18
- ### 1. Define Quality Scenarios
19
-
20
- For each quality goal from §1, create testable scenarios:
21
-
22
- | Quality Goal | Scenario | Stimulus | Response | Measure |
23
- |-------------|---------|----------|----------|---------|
24
- | Performance | Load test | 1000 concurrent users | Response time | p95 < 200ms |
25
- | Availability | Node failure | One server dies | Auto-recovery | < 30s downtime |
26
- | Security | Injection | SQL injection attempt | Blocked | 0 success |
27
-
28
- ### 2. Identify Risks
29
-
30
- Categories: Technical, Business, Operational, External.
31
-
32
- For each risk:
33
- - **Probability**: High / Medium / Low
34
- - **Impact**: High / Medium / Low
35
- - **Mitigation**: What we'll do to reduce it
36
- - **Contingency**: What we'll do if it happens anyway
37
-
38
- ### 3. Identify Technical Debt
39
-
40
- What are we knowingly deferring? Document it now so it doesn't get forgotten.
41
-
42
- ### 4. Write Output
43
-
44
- **WRITE IMMEDIATELY** to `.ultra/specs/architecture.md` §10-12:
45
-
46
- ```markdown
47
- ## §10 Quality Scenarios
48
-
49
- | # | Quality Attribute | Scenario | Stimulus | Expected Response | Metric |
50
- |---|------------------|---------|----------|------------------|--------|
51
- | Q1 | Performance | [Scenario] | [Stimulus] | [Response] | [Target] |
52
- | Q2 | Scalability | [Scenario] | [Stimulus] | [Response] | [Target] |
53
- | Q3 | Security | [Scenario] | [Stimulus] | [Response] | [Target] |
54
- | Q4 | Availability | [Scenario] | [Stimulus] | [Response] | [Target] |
55
- | Q5 | Maintainability | [Scenario] | [Stimulus] | [Response] | [Target] |
56
-
57
- ## §11 Risks & Technical Debt
58
-
59
- ### Risk Register
60
-
61
- | # | Risk | Category | Probability | Impact | Score | Mitigation | Contingency |
62
- |---|------|----------|------------|--------|-------|-----------|-------------|
63
- | R1 | [Risk] | Technical | High | High | 9 | [Action] | [Fallback] |
64
- | R2 | [Risk] | Business | Medium | High | 6 | [Action] | [Fallback] |
65
- | R3 | [Risk] | External | Low | Medium | 2 | [Action] | [Fallback] |
66
-
67
- ### Known Technical Debt
68
-
69
- | # | Debt Item | Reason for Deferral | Impact if Not Addressed | Address By |
70
- |---|----------|--------------------|-----------------------|-----------|
71
- | TD1 | [Item] | [Why deferred] | [Consequence] | [Timeline] |
72
- | TD2 | [Item] | [Why deferred] | [Consequence] | [Timeline] |
73
-
74
- ## §12 Architecture Decision Records
75
-
76
- | # | Decision | Context | Options | Chosen | Rationale |
77
- |---|---------|---------|---------|--------|-----------|
78
- | ADR-1 | [Decision] | [Why needed] | [A, B, C] | [Choice] | [Why] |
79
- | ADR-2 | [Decision] | [Why needed] | [A, B, C] | [Choice] | [Why] |
80
-
81
- ### Round 4 Summary
82
-
83
- **Quality & Deployment Confidence**:
84
- - **Deployment readiness**: [X]%
85
- - **Risk coverage**: [X]%
86
- - **Quality scenario coverage**: [X]%
87
- - **Overall R4 confidence**: [X]%
88
- ```
89
-
90
- ### 5. Write Round 4 Research Report
91
-
92
- **WRITE** to `.ultra/docs/research/quality-deployment-{date}.md`:
93
-
94
- ```markdown
95
- # Round 4: Quality & Deployment
96
-
97
- > **Confidence**: [X]%
98
- > **Steps completed**: 40-41
99
- > **Completed**: [date]
100
-
101
- ## Key Findings
102
- [Infrastructure decisions + cost summary]
103
-
104
- ## Top Risks
105
- [Top 3 risks with scores]
106
-
107
- ## Technical Debt
108
- [Items knowingly deferred]
109
- ```
110
-
111
- ### 6. Present to User and Gate
112
-
113
- ```
114
- [C] Continue — Architecture complete, proceed to Research Synthesis
115
- [R] Revise — Adjust quality scenarios or risks
116
- ```
117
-
118
- **HALT — wait for user response before proceeding.**
119
-
120
- ### 7. Handle Response
121
-
122
- - **[C]**: Load next step: `./step-99-synthesis.md`
123
- - **[R]**: Revise, update architecture.md §10-12, re-present
124
-
125
- ## SUCCESS METRICS
126
-
127
- - Quality scenarios are specific and testable
128
- - At least 5 risks identified with mitigation
129
- - Technical debt documented with timelines
130
- - ADRs capture key architecture decisions
131
- - Round 4 research report written
132
-
133
- ## NEXT STEP
134
-
135
- After user selects [C], read and follow: `./step-99-synthesis.md`