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,123 @@
|
|
|
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`
|
|
@@ -0,0 +1,135 @@
|
|
|
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`
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Step 99: Research Synthesis & Distillate
|
|
2
|
+
|
|
3
|
+
## MANDATORY EXECUTION RULES
|
|
4
|
+
|
|
5
|
+
- VERIFY all spec files are complete — no [NEEDS CLARIFICATION] markers
|
|
6
|
+
- GENERATE distillate — token-efficient summary for /ultra-plan consumption
|
|
7
|
+
- VALIDATE field-level completeness — not just "file exists"
|
|
8
|
+
- THIS IS THE FINAL STEP — quality gate before handoff to /ultra-plan
|
|
9
|
+
- WRITE all outputs BEFORE presenting to user
|
|
10
|
+
- ALL output in English (spec files); conversation in Chinese
|
|
11
|
+
|
|
12
|
+
## PREREQUISITES
|
|
13
|
+
|
|
14
|
+
- All selected steps completed with [C]
|
|
15
|
+
- Spec files written: discovery.md, product.md, architecture.md
|
|
16
|
+
|
|
17
|
+
## CONTEXT BOUNDARIES
|
|
18
|
+
|
|
19
|
+
- Focus: Verify completeness, generate distillate, produce quality summary
|
|
20
|
+
- This step does NOT add new research — it synthesizes existing output
|
|
21
|
+
- Distillate is the primary artifact consumed by /ultra-plan
|
|
22
|
+
|
|
23
|
+
## EXECUTION SEQUENCE
|
|
24
|
+
|
|
25
|
+
### 1. Spec Completeness Validation
|
|
26
|
+
|
|
27
|
+
Read each spec file and validate field-level completeness:
|
|
28
|
+
|
|
29
|
+
**discovery.md Checklist**:
|
|
30
|
+
- [ ] §0 Problem Validation — has demand signal + confidence
|
|
31
|
+
- [ ] §1 Opportunity Space — has scored opportunity map
|
|
32
|
+
- [ ] §2 Market Assessment — has TAM/SAM/SOM with sources
|
|
33
|
+
- [ ] §3 Competitive Landscape — has comparison matrix + Porter's
|
|
34
|
+
- [ ] §4 Product Strategy — has vision + trade-offs + defensibility
|
|
35
|
+
- [ ] §5 Assumptions — has prioritized assumptions + experiments
|
|
36
|
+
|
|
37
|
+
**product.md Checklist**:
|
|
38
|
+
- [ ] §1 Problem Statement — has core problem + impact
|
|
39
|
+
- [ ] §2 Personas — has 2-3 personas with goals + pain points
|
|
40
|
+
- [ ] §3 Scenarios — has 3-5 scenarios with flows
|
|
41
|
+
- [ ] §4 User Stories — has stories with acceptance criteria
|
|
42
|
+
- [ ] §5 Feature Scope — has MVP features + exclusions
|
|
43
|
+
- [ ] §6 Success Metrics — has North Star + business + user metrics
|
|
44
|
+
|
|
45
|
+
**architecture.md Checklist**:
|
|
46
|
+
- [ ] §1-3 Context — has quality goals + constraints + system context
|
|
47
|
+
- [ ] §4 Solution Strategy — has tech stack with rationale
|
|
48
|
+
- [ ] §5-6 Building Blocks — has modules + runtime scenarios
|
|
49
|
+
- [ ] §7-9 Deployment — has environments + CI/CD + costs
|
|
50
|
+
- [ ] §10-12 Quality — has scenarios + risks + ADRs
|
|
51
|
+
|
|
52
|
+
**If ANY item fails**: List specific gaps and ask user whether to:
|
|
53
|
+
- [F] Fix — Go back to the relevant step to fill the gap
|
|
54
|
+
- [S] Skip — Accept the gap and proceed (note it in distillate)
|
|
55
|
+
|
|
56
|
+
### 2. Generate Research Distillate
|
|
57
|
+
|
|
58
|
+
Create `.ultra/specs/research-distillate.md` — a token-efficient summary optimized for LLM consumption by /ultra-plan:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
# Research Distillate
|
|
62
|
+
|
|
63
|
+
> Generated: [date]
|
|
64
|
+
> Source: /ultra-research steps [list of completed steps]
|
|
65
|
+
> Token budget: <2000 tokens
|
|
66
|
+
|
|
67
|
+
## Product Core
|
|
68
|
+
- **Problem**: [One sentence — what pain we solve]
|
|
69
|
+
- **For whom**: [Primary persona — one sentence]
|
|
70
|
+
- **Unique angle**: [What makes our approach different — one sentence]
|
|
71
|
+
- **North Star**: [Metric name: target by timeline]
|
|
72
|
+
|
|
73
|
+
## Scope (MVP)
|
|
74
|
+
### Must-Build
|
|
75
|
+
- [Feature 1]: [One-line description] — traces to [US-XX]
|
|
76
|
+
- [Feature 2]: [One-line description] — traces to [US-XX]
|
|
77
|
+
- [Feature 3]: [One-line description] — traces to [US-XX]
|
|
78
|
+
|
|
79
|
+
### Explicitly Out
|
|
80
|
+
- [Feature X]: [Why excluded]
|
|
81
|
+
- [Feature Y]: [Why excluded]
|
|
82
|
+
|
|
83
|
+
## Architecture Decisions
|
|
84
|
+
- **Stack**: [Language] + [Framework] + [Database] + [Hosting]
|
|
85
|
+
- **Pattern**: Functional Core / Imperative Shell
|
|
86
|
+
- **Key trade-off 1**: [Chose X over Y because Z]
|
|
87
|
+
- **Key trade-off 2**: [Chose X over Y because Z]
|
|
88
|
+
|
|
89
|
+
## Constraints
|
|
90
|
+
- [Technical constraint 1]
|
|
91
|
+
- [Organizational constraint 1]
|
|
92
|
+
- [Regulatory constraint 1]
|
|
93
|
+
|
|
94
|
+
## Top Risks
|
|
95
|
+
1. [Risk 1]: [Probability] × [Impact] — Mitigation: [Action]
|
|
96
|
+
2. [Risk 2]: [Probability] × [Impact] — Mitigation: [Action]
|
|
97
|
+
3. [Risk 3]: [Probability] × [Impact] — Mitigation: [Action]
|
|
98
|
+
|
|
99
|
+
## Unresolved Questions
|
|
100
|
+
- [Question 1 — what we still don't know]
|
|
101
|
+
- [Question 2 — what we still don't know]
|
|
102
|
+
|
|
103
|
+
## Rejected Alternatives
|
|
104
|
+
- [Alternative 1]: [Why rejected — prevents re-proposals]
|
|
105
|
+
- [Alternative 2]: [Why rejected]
|
|
106
|
+
|
|
107
|
+
## Quality Targets
|
|
108
|
+
| Attribute | Target | Priority |
|
|
109
|
+
|-----------|--------|----------|
|
|
110
|
+
| [Performance] | [p95 < Xms] | 1 |
|
|
111
|
+
| [Availability] | [99.X%] | 2 |
|
|
112
|
+
| [Security] | [Compliance level] | 3 |
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 3. Generate Quality Summary
|
|
116
|
+
|
|
117
|
+
Display to user:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Research Quality Summary
|
|
121
|
+
========================
|
|
122
|
+
Step 00 (Problem Validation): ✅ [confidence]%
|
|
123
|
+
Step 01 (Opportunity Discovery): ✅ [confidence]%
|
|
124
|
+
Step 02 (Market Assessment): ✅ [confidence]%
|
|
125
|
+
Step 03 (Competitive Landscape): ✅ [confidence]%
|
|
126
|
+
Step 04 (Product Strategy): ✅ [confidence]%
|
|
127
|
+
Step 05 (Assumptions): ✅ [confidence]%
|
|
128
|
+
Step 10 (User Personas): ✅ [confidence]%
|
|
129
|
+
Step 11 (User Scenarios): ✅ [confidence]%
|
|
130
|
+
Step 20 (User Stories): ✅ [confidence]%
|
|
131
|
+
Step 21 (Features & Scope): ✅ [confidence]%
|
|
132
|
+
Step 22 (Success Metrics): ✅ [confidence]%
|
|
133
|
+
Step 30 (Architecture Context): ✅ [confidence]%
|
|
134
|
+
Step 31 (Solution Strategy): ✅ [confidence]%
|
|
135
|
+
Step 32 (Building Blocks): ✅ [confidence]%
|
|
136
|
+
Step 40 (Deployment): ✅ [confidence]%
|
|
137
|
+
Step 41 (Quality & Risks): ✅ [confidence]%
|
|
138
|
+
|
|
139
|
+
Overall: [avg]% confidence
|
|
140
|
+
Spec completeness: [X]/[total] fields validated
|
|
141
|
+
Distillate: .ultra/specs/research-distillate.md
|
|
142
|
+
|
|
143
|
+
Output files:
|
|
144
|
+
.ultra/specs/discovery.md
|
|
145
|
+
.ultra/specs/product.md
|
|
146
|
+
.ultra/specs/architecture.md
|
|
147
|
+
.ultra/specs/research-distillate.md
|
|
148
|
+
.ultra/docs/research/*.md (per-round reports)
|
|
149
|
+
|
|
150
|
+
Next: /ultra-plan
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 4. Present to User
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
[D] Done — Research complete, ready for /ultra-plan
|
|
157
|
+
[F] Fix — Go back to fix specific gaps
|
|
158
|
+
[E] Export — Generate additional summary format
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**HALT — wait for user response before proceeding.**
|
|
162
|
+
|
|
163
|
+
### 5. Handle Response
|
|
164
|
+
|
|
165
|
+
- **[D]**: Research workflow complete. Suggest running `/ultra-plan`.
|
|
166
|
+
- **[F]**: Identify which step to revisit, load that step file
|
|
167
|
+
- **[E]**: Generate requested format
|
|
168
|
+
|
|
169
|
+
## SUCCESS METRICS
|
|
170
|
+
|
|
171
|
+
- All spec files validated at field level
|
|
172
|
+
- Research distillate generated (<2000 tokens)
|
|
173
|
+
- Quality summary displayed with per-step confidence
|
|
174
|
+
- No [NEEDS CLARIFICATION] markers remain (or explicitly accepted)
|
|
175
|
+
- All output files verified to exist
|
|
176
|
+
|
|
177
|
+
## FAILURE MODES
|
|
178
|
+
|
|
179
|
+
- Skipping validation ("files exist, good enough")
|
|
180
|
+
- Distillate is too verbose (>2000 tokens)
|
|
181
|
+
- Distillate missing rejected alternatives (will cause re-proposals)
|
|
182
|
+
- Not checking for [NEEDS CLARIFICATION] markers
|
|
183
|
+
- Inflating confidence scores
|
|
184
|
+
|
|
185
|
+
## WORKFLOW COMPLETE
|
|
186
|
+
|
|
187
|
+
This is the terminal step. After [D], the research workflow is done.
|
|
188
|
+
Next command: `/ultra-plan`
|