ultra-builder-pro-cli 0.9.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 (119) hide show
  1. package/CHANGELOG.md +92 -1
  2. package/README.md +11 -6
  3. package/adapters/_shared/codex-assets.cjs +23 -331
  4. package/adapters/_shared/handbook.cjs +2 -0
  5. package/adapters/_shared/runtime-assets.cjs +25 -0
  6. package/adapters/_shared/tests/handbook.test.cjs +3 -0
  7. package/adapters/_shared/tests/runtime-assets.test.cjs +12 -4
  8. package/adapters/claude.js +28 -5
  9. package/adapters/kimi.js +15 -138
  10. package/adapters/opencode.js +59 -63
  11. package/adapters/tests/claude.test.cjs +26 -9
  12. package/adapters/tests/codex.test.cjs +23 -9
  13. package/adapters/tests/kimi.test.cjs +15 -11
  14. package/adapters/tests/opencode.test.cjs +57 -10
  15. package/agents/code-reviewer.md +24 -85
  16. package/agents/debugger.md +30 -132
  17. package/agents/review-code.md +24 -104
  18. package/agents/review-comments.md +20 -83
  19. package/agents/review-coordinator.md +40 -137
  20. package/agents/review-design.md +21 -118
  21. package/agents/review-errors.md +22 -70
  22. package/agents/review-spec.md +36 -0
  23. package/agents/review-tests.md +20 -76
  24. package/agents/tdd-runner.md +26 -84
  25. package/commands/learn.md +5 -36
  26. package/commands/ultra-change.md +5 -43
  27. package/commands/ultra-deliver.md +4 -46
  28. package/commands/ultra-dev.md +4 -48
  29. package/commands/ultra-doctor.md +4 -30
  30. package/commands/ultra-init.md +5 -47
  31. package/commands/ultra-plan.md +5 -48
  32. package/commands/ultra-research.md +5 -54
  33. package/commands/ultra-status.md +5 -44
  34. package/commands/ultra-test.md +5 -45
  35. package/commands/ultra-think.md +5 -40
  36. package/docs/AGENT-CONTEXT.md +34 -12
  37. package/docs/ARCHITECTURE.md +31 -5
  38. package/docs/PLAN.zh-CN.md +3 -2
  39. package/docs/ROADMAP.md +5 -4
  40. package/docs/RUNTIME-COMPAT-MATRIX.md +7 -5
  41. package/docs/SKILL-AUTHORING.md +75 -0
  42. package/docs/USER-HANDBOOK-CONTRACT.md +9 -2
  43. package/hooks/README.md +6 -4
  44. package/hooks/active_task_context.py +14 -0
  45. package/hooks/context_spine.py +218 -0
  46. package/hooks/health_check.py +1 -1
  47. package/hooks/workflow_context.py +16 -123
  48. package/hooks/workflow_resume.py +21 -0
  49. package/mcp-server/lib/change-workflow.cjs +89 -11
  50. package/mcp-server/lib/change-workflow.test.cjs +202 -7
  51. package/mcp-server/lib/context-spine.cjs +331 -0
  52. package/mcp-server/lib/context-spine.test.cjs +73 -0
  53. package/mcp-server/lib/spec-learning.cjs +191 -0
  54. package/mcp-server/lib/spec-learning.test.cjs +62 -0
  55. package/mcp-server/lib/state-db.cjs +72 -10
  56. package/mcp-server/lib/state-db.test.cjs +7 -2
  57. package/mcp-server/server.cjs +31 -1
  58. package/mcp-server/tests/db-ops.test.cjs +3 -3
  59. package/mcp-server/tests/server-contract.test.cjs +74 -0
  60. package/mcp-server/tests/state-db.test.cjs +20 -3
  61. package/package.json +3 -2
  62. package/skills/cc-collab/SKILL.md +16 -18
  63. package/skills/code-review-expert/SKILL.md +39 -114
  64. package/skills/code-review-expert/references/correctness-reliability.md +30 -0
  65. package/skills/code-review-expert/references/design-boundaries.md +26 -0
  66. package/skills/code-review-expert/references/removal-plan.md +17 -45
  67. package/skills/codex-collab/SKILL.md +23 -28
  68. package/skills/codex-collab/evals/evals.json +18 -23
  69. package/skills/integration-rules/SKILL.md +28 -67
  70. package/skills/learn/SKILL.md +46 -105
  71. package/skills/security-rules/SKILL.md +34 -56
  72. package/skills/testing-rules/SKILL.md +28 -52
  73. package/skills/ultra-change/SKILL.md +61 -145
  74. package/skills/ultra-deliver/SKILL.md +63 -229
  75. package/skills/ultra-dev/SKILL.md +46 -338
  76. package/skills/ultra-doctor/SKILL.md +39 -71
  77. package/skills/ultra-init/SKILL.md +59 -139
  78. package/skills/ultra-plan/SKILL.md +50 -310
  79. package/skills/ultra-research/SKILL.md +59 -152
  80. package/skills/ultra-research/references/architecture.md +38 -0
  81. package/skills/ultra-research/references/problem-product.md +39 -0
  82. package/skills/ultra-research/references/quality-delivery.md +34 -0
  83. package/skills/ultra-research/references/synthesis.md +38 -0
  84. package/skills/ultra-research/references/users-scope.md +40 -0
  85. package/skills/ultra-review/SKILL.md +55 -427
  86. package/skills/ultra-review/references/unified-schema.md +76 -101
  87. package/skills/ultra-review/scripts/review_wait.py +242 -77
  88. package/skills/ultra-status/SKILL.md +38 -173
  89. package/skills/ultra-test/SKILL.md +41 -195
  90. package/skills/ultra-think/SKILL.md +43 -101
  91. package/skills/ultra-verify/SKILL.md +44 -84
  92. package/skills/ultra-verify/evals/evals.json +24 -27
  93. package/spec/cli-protocol.md +3 -0
  94. package/spec/mcp-tools.yaml +133 -4
  95. package/spec/schemas/command-manifest.schema.json +7 -25
  96. package/spec/schemas/skill-manifest.schema.json +9 -79
  97. package/spec/schemas/state-db.sql +31 -0
  98. package/skills/code-review-expert/references/code-quality-checklist.md +0 -112
  99. package/skills/code-review-expert/references/integration-checklist.md +0 -46
  100. package/skills/code-review-expert/references/security-checklist.md +0 -100
  101. package/skills/code-review-expert/references/solid-checklist.md +0 -65
  102. package/skills/ultra-research/steps/step-00-problem-validation.md +0 -154
  103. package/skills/ultra-research/steps/step-01-opportunity-discovery.md +0 -172
  104. package/skills/ultra-research/steps/step-02-market-assessment.md +0 -195
  105. package/skills/ultra-research/steps/step-03-competitive-landscape.md +0 -197
  106. package/skills/ultra-research/steps/step-04-product-strategy.md +0 -196
  107. package/skills/ultra-research/steps/step-05-assumptions-validation.md +0 -234
  108. package/skills/ultra-research/steps/step-10-user-personas.md +0 -169
  109. package/skills/ultra-research/steps/step-11-user-scenarios.md +0 -181
  110. package/skills/ultra-research/steps/step-20-user-stories.md +0 -156
  111. package/skills/ultra-research/steps/step-21-features-scope.md +0 -157
  112. package/skills/ultra-research/steps/step-22-success-metrics.md +0 -195
  113. package/skills/ultra-research/steps/step-30-architecture-context.md +0 -154
  114. package/skills/ultra-research/steps/step-31-solution-strategy.md +0 -172
  115. package/skills/ultra-research/steps/step-32-building-blocks.md +0 -188
  116. package/skills/ultra-research/steps/step-40-deployment.md +0 -123
  117. package/skills/ultra-research/steps/step-41-quality-risks.md +0 -135
  118. package/skills/ultra-research/steps/step-99-synthesis.md +0 -188
  119. package/skills/ultra-review/scripts/review_verdict_update.py +0 -99
@@ -1,195 +0,0 @@
1
- # Step 02: Market Assessment
2
-
3
- ## MANDATORY EXECUTION RULES
4
-
5
- - WEB SEARCH REQUIRED — no market sizing without real data
6
- - USE DUAL APPROACH — both top-down and bottom-up estimates required
7
- - CROSS-VALIDATE — if top-down and bottom-up differ by >3x, investigate why
8
- - CITE EVERY NUMBER — no unsupported market figures
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 01 (Opportunity Discovery) completed with [C]
15
- - `.ultra/specs/discovery.md` §0-1 exist
16
-
17
- ## CONTEXT BOUNDARIES
18
-
19
- - Focus: How big is this market? Is it worth pursuing?
20
- - Use the prioritized opportunities from step-01 to scope the market
21
- - This is about MARKET SIZE, not competitive positioning (that's step-03)
22
-
23
- ## SEARCH STRATEGY (MANDATORY)
24
-
25
- Execute these web searches in parallel:
26
-
27
- ```
28
- Search: "{{product_domain}} market size TAM 2024 2025 2026"
29
- Search: "{{product_domain}} market growth rate CAGR forecast"
30
- Search: "{{product_domain}} industry revenue report"
31
- Search: "{{product_domain}} market segmentation analysis"
32
- Search: "{{product_domain}} pricing model average revenue per user"
33
- ```
34
-
35
- **Source priority**: Industry reports (Gartner, Statista, IBISWorld, Grand View Research) > Company filings > News articles > Blog posts
36
-
37
- ## EXECUTION SEQUENCE
38
-
39
- ### 1. Top-Down Estimate (TAM → SAM → SOM)
40
-
41
- Start with the broadest market definition and narrow down:
42
-
43
- **TAM (Total Addressable Market)**:
44
- - What is the total global market for this category?
45
- - Search for industry reports with specific dollar figures
46
- - Include year and source for every number
47
-
48
- **SAM (Serviceable Available Market)**:
49
- - What slice of TAM can we actually serve?
50
- - Filter by: geography, customer segment, technology fit, regulatory access
51
- - Show the filtering logic explicitly
52
-
53
- **SOM (Serviceable Obtainable Market)**:
54
- - What can we realistically capture in 1-3 years?
55
- - Consider: team size, distribution, brand, competition
56
- - Be honest — first-year SOM for a startup is tiny
57
-
58
- ### 2. Bottom-Up Estimate
59
-
60
- Calculate independently from unit economics:
61
-
62
- ```
63
- SOM = Target customers × Conversion rate × Average revenue per customer × Retention
64
- ```
65
-
66
- For each variable:
67
- - **Target customers**: How many potential users in your target segment? (Source required)
68
- - **Conversion rate**: What % will actually adopt? (Industry benchmark required)
69
- - **ARPU**: What will they pay? (Comparable pricing data required)
70
- - **Retention**: Annual retention rate? (Industry benchmark required)
71
-
72
- ### 3. Cross-Validation
73
-
74
- Compare top-down SOM vs bottom-up SOM:
75
- - If within 2x: Good — use the average
76
- - If 2-3x apart: Acceptable — note the range and explain the gap
77
- - If >3x apart: Investigate — one of your assumptions is wrong
78
-
79
- ### 4. Growth Driver Analysis
80
-
81
- Identify 3-5 factors that will grow or shrink this market:
82
-
83
- For each driver:
84
- - **Direction**: Expanding or contracting?
85
- - **Magnitude**: How much impact?
86
- - **Timeline**: When does this take effect?
87
- - **Evidence**: Source URL
88
-
89
- ### 5. Write Output
90
-
91
- **WRITE IMMEDIATELY** to `.ultra/specs/discovery.md` §2:
92
-
93
- ```markdown
94
- ## §2 Market Assessment
95
-
96
- ### Market Sizing Summary
97
-
98
- | Metric | Current Estimate | 2-3 Year Projection | Source |
99
- |--------|-----------------|---------------------|--------|
100
- | TAM | $[X]B | $[X]B | [URL] |
101
- | SAM | $[X]M | $[X]M | [URL] |
102
- | SOM | $[X]M | $[X]M | Calculated |
103
-
104
- ### Top-Down Analysis
105
-
106
- #### TAM: $[X]B ([Year])
107
- - **Definition**: [What market category]
108
- - **Source**: [Report name + URL]
109
- - **Growth**: [X]% CAGR ([Year]-[Year])
110
-
111
- #### SAM: $[X]M
112
- - **TAM filter 1**: [Geographic] — reduces to $[X]B
113
- - **TAM filter 2**: [Segment] — reduces to $[X]M
114
- - **TAM filter 3**: [Technology fit] — reduces to $[X]M
115
-
116
- #### SOM: $[X]M (Year 1-3)
117
- - **Realistic capture**: [X]% of SAM
118
- - **Basis**: [Why this share is achievable]
119
- - **Comparable**: [Similar company achieved X% in Y time]
120
-
121
- ### Bottom-Up Analysis
122
-
123
- | Variable | Value | Source |
124
- |----------|-------|--------|
125
- | Target customers | [N] | [URL or calculation] |
126
- | Conversion rate | [X]% | [Industry benchmark + URL] |
127
- | ARPU (annual) | $[X] | [Comparable pricing + URL] |
128
- | Retention rate | [X]% | [Industry benchmark + URL] |
129
- | **Year 1 Revenue** | **$[X]** | **Calculated** |
130
- | **Year 3 Revenue** | **$[X]** | **Calculated** |
131
-
132
- ### Cross-Validation
133
- - **Top-down SOM**: $[X]M
134
- - **Bottom-up Year 3**: $[X]M
135
- - **Ratio**: [X]x
136
- - **Assessment**: [Within range / Gap explanation]
137
-
138
- ### Growth Drivers
139
-
140
- | # | Driver | Direction | Impact | Timeline | Source |
141
- |---|--------|-----------|--------|----------|--------|
142
- | 1 | [Technology trend] | Expanding | High | 1-2yr | [URL] |
143
- | 2 | [Regulatory change] | Expanding | Medium | 2-3yr | [URL] |
144
- | 3 | [Demographic shift] | Expanding | Medium | 3-5yr | [URL] |
145
- | 4 | [Competitive pressure] | Contracting | Low | Now | [URL] |
146
-
147
- ### Market Assessment Confidence
148
- - **Overall confidence**: [X]%
149
- - **Strongest data point**: [What we're most sure about]
150
- - **Weakest assumption**: [What could be most wrong]
151
- - **Recommendation**: [Market worth pursuing / Needs more validation / Too small]
152
- ```
153
-
154
- ### 6. Present to User and Gate
155
-
156
- Show the Market Assessment summary. Highlight:
157
- - Whether top-down and bottom-up estimates align
158
- - The single biggest growth driver
159
- - Any concerns about market size or timing
160
-
161
- ```
162
- [C] Continue — Market assessed, proceed to Competitive Landscape
163
- [R] Revise — Adjust assumptions or investigate discrepancies
164
- [S] Search more — Need additional data on specific aspect
165
- ```
166
-
167
- **HALT — wait for user response before proceeding.**
168
-
169
- ### 7. Handle Response
170
-
171
- - **[C]**: Load next step: `./step-03-competitive-landscape.md`
172
- - **[R]**: Revise assumptions, update discovery.md §2, re-present
173
- - **[S]**: Execute targeted searches, update analysis, re-present
174
-
175
- ## SUCCESS METRICS
176
-
177
- - Both top-down AND bottom-up estimates completed
178
- - Every dollar figure has a source citation
179
- - Cross-validation performed with gap analysis
180
- - At least 3 growth drivers identified with evidence
181
- - Confidence assessment is honest
182
- - Output written to discovery.md §2
183
-
184
- ## FAILURE MODES
185
-
186
- - Using only top-down OR only bottom-up (need both)
187
- - Market figures without source citations
188
- - Inflating SOM to make the opportunity look bigger
189
- - Ignoring >3x gap between top-down and bottom-up
190
- - Using stale data (>2 years old) without noting limitations
191
- - Not writing output before presenting to user
192
-
193
- ## NEXT STEP
194
-
195
- After user selects [C], read and follow: `./step-03-competitive-landscape.md`
@@ -1,197 +0,0 @@
1
- # Step 03: Competitive Landscape
2
-
3
- ## MANDATORY EXECUTION RULES
4
-
5
- - WEB SEARCH REQUIRED — identify real competitors, not imagined ones
6
- - INCLUDE "DO NOTHING" — the biggest competitor is often the status quo
7
- - ANALYZE 2-5 DIRECT competitors + 1-2 indirect alternatives
8
- - BE HONEST about where competitors are stronger
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 02 (Market Assessment) completed with [C]
15
- - `.ultra/specs/discovery.md` §0-2 exist
16
-
17
- ## CONTEXT BOUNDARIES
18
-
19
- - Focus: Who else is solving this problem? How do we differentiate?
20
- - Use the prioritized opportunities from step-01 to frame competitive analysis
21
- - Analyze CURRENT competitors, not hypothetical future ones
22
- - Include indirect competitors and the "do nothing" alternative
23
-
24
- ## SEARCH STRATEGY (MANDATORY)
25
-
26
- Execute these web searches in parallel:
27
-
28
- ```
29
- Search: "{{product_domain}} competitors comparison review"
30
- Search: "{{product_domain}} alternatives tools software"
31
- Search: "{{product_domain}} market leaders market share"
32
- Search: "{{product_domain}} startup funding competitors"
33
- Search: "{{product_domain}} vs [known competitor if any]"
34
- ```
35
-
36
- For each identified competitor, execute:
37
- ```
38
- Search: "[competitor name] pricing features review"
39
- Search: "[competitor name] weaknesses complaints"
40
- ```
41
-
42
- ## EXECUTION SEQUENCE
43
-
44
- ### 1. Identify Competitive Players
45
-
46
- Categorize all competitors found:
47
-
48
- **Direct Competitors**: Products solving the same problem for the same segment
49
- - Search for 2-5 direct competitors
50
- - Include their funding, team size, and traction if available
51
-
52
- **Indirect Competitors / Alternatives**: What customers use today instead
53
- - Spreadsheets, manual processes, general-purpose tools
54
- - Adjacent products that partially solve the problem
55
-
56
- **"Do Nothing" Alternative**: What happens if the customer ignores the problem?
57
- - What does inaction cost? (Reference step-00 status quo analysis)
58
- - Why do some users choose to live with the pain?
59
-
60
- ### 2. Deep-Dive Each Competitor
61
-
62
- For each direct competitor (2-5), research:
63
-
64
- | Dimension | What to find |
65
- |-----------|-------------|
66
- | Core value prop | What do they promise? |
67
- | Target segment | Who do they serve? |
68
- | Pricing model | How do they charge? |
69
- | Key strengths | What are they genuinely good at? |
70
- | Key weaknesses | Where do users complain? (check reviews, forums) |
71
- | Traction signals | Users, revenue, funding, growth |
72
- | Defensibility | What makes them hard to beat? |
73
-
74
- ### 3. Porter's Five Forces (Brief)
75
-
76
- Assess competitive intensity:
77
-
78
- | Force | Rating (1-5) | Assessment |
79
- |-------|-------------|-----------|
80
- | Supplier power | | [Who controls key inputs?] |
81
- | Buyer power | | [Can customers easily switch?] |
82
- | New entrant threat | | [How easy to enter this market?] |
83
- | Substitute threat | | [What alternatives exist?] |
84
- | Rivalry intensity | | [How fierce is current competition?] |
85
-
86
- ### 4. Identify Our Competitive Edge
87
-
88
- Based on the analysis, answer:
89
- - Where can we win? (specific dimensions where we have an advantage)
90
- - Where can we NOT win? (be honest — avoid head-to-head on competitor strengths)
91
- - What is the gap that no one is filling?
92
-
93
- ### 5. Write Output
94
-
95
- **WRITE IMMEDIATELY** to `.ultra/specs/discovery.md` §3:
96
-
97
- ```markdown
98
- ## §3 Competitive Landscape
99
-
100
- ### Competitive Overview
101
-
102
- | Dimension | Us | [Competitor A] | [Competitor B] | [Competitor C] | Do Nothing |
103
- |-----------|-----|---------------|---------------|---------------|------------|
104
- | Core value prop | [ours] | [theirs] | [theirs] | [theirs] | [status quo] |
105
- | Target segment | [ours] | [theirs] | [theirs] | [theirs] | [everyone] |
106
- | Pricing | [ours] | [theirs] | [theirs] | [theirs] | Free |
107
- | Key strength | [ours] | [theirs] | [theirs] | [theirs] | Familiar |
108
- | Key weakness | [ours] | [theirs] | [theirs] | [theirs] | Inefficient |
109
- | Traction | [ours] | [theirs] | [theirs] | [theirs] | N/A |
110
-
111
- ### Direct Competitors
112
-
113
- #### [Competitor A]
114
- - **What they do**: [Description]
115
- - **Strengths**: [What they're genuinely good at]
116
- - **Weaknesses**: [Where users complain] — Source: [URL]
117
- - **Pricing**: [Model and price points] — Source: [URL]
118
- - **Traction**: [Users/revenue/funding] — Source: [URL]
119
- - **Threat level**: [High / Medium / Low] — [Why]
120
-
121
- #### [Competitor B]
122
- [Same structure]
123
-
124
- #### [Competitor C]
125
- [Same structure]
126
-
127
- ### Indirect Competitors & Alternatives
128
- - **[Tool/Process A]**: [How it partially solves the problem]
129
- - **[Tool/Process B]**: [How it partially solves the problem]
130
- - **Do Nothing**: [Cost of inaction from step-00]
131
-
132
- ### Porter's Five Forces Summary
133
-
134
- | Force | Rating | Assessment |
135
- |-------|--------|-----------|
136
- | Supplier power | [1-5] | [Brief assessment] |
137
- | Buyer power | [1-5] | [Brief assessment] |
138
- | New entrant threat | [1-5] | [Brief assessment] |
139
- | Substitute threat | [1-5] | [Brief assessment] |
140
- | Rivalry intensity | [1-5] | [Brief assessment] |
141
- | **Overall competitive intensity** | **[1-5]** | **[Summary]** |
142
-
143
- ### Our Competitive Edge
144
- - **Where we can win**: [Specific dimensions with reasoning]
145
- - **Where we cannot win**: [Honest assessment of competitor strengths]
146
- - **Unfilled gap**: [What no one is doing that we can do]
147
- - **Timing advantage**: [Why now is the right time]
148
-
149
- ### Competitive Confidence
150
- - **Overall confidence**: [X]%
151
- - **Best-researched competitor**: [Name] — [depth of analysis]
152
- - **Blind spot**: [What we might be missing]
153
- ```
154
-
155
- ### 6. Present to User and Gate
156
-
157
- Show the Competitive Landscape summary. Highlight:
158
- - The most dangerous competitor and why
159
- - The clearest gap in the market
160
- - Any surprising findings (e.g., a competitor we didn't expect)
161
-
162
- ```
163
- [C] Continue — Competitive landscape mapped, proceed to Product Strategy
164
- [R] Revise — Adjust competitor analysis or add missing competitors
165
- [S] Search more — Deep-dive a specific competitor
166
- ```
167
-
168
- **HALT — wait for user response before proceeding.**
169
-
170
- ### 7. Handle Response
171
-
172
- - **[C]**: Load next step: `./step-04-product-strategy.md`
173
- - **[R]**: Revise analysis, update discovery.md §3, re-present
174
- - **[S]**: Execute targeted searches on specific competitor, update, re-present
175
-
176
- ## SUCCESS METRICS
177
-
178
- - 2-5 direct competitors identified with evidence
179
- - "Do nothing" alternative analyzed
180
- - Comparison matrix completed for all competitors
181
- - Porter's Five Forces assessed
182
- - Honest assessment of where we can/cannot win
183
- - All claims have source citations
184
- - Output written to discovery.md §3
185
-
186
- ## FAILURE MODES
187
-
188
- - "No competitors exist" (there are ALWAYS competitors, even if indirect)
189
- - Only analyzing competitor strengths, ignoring weaknesses
190
- - Only analyzing competitor weaknesses, ignoring strengths (cheerleading)
191
- - Missing the "do nothing" alternative
192
- - No source citations for competitor data
193
- - Not writing output before presenting to user
194
-
195
- ## NEXT STEP
196
-
197
- After user selects [C], read and follow: `./step-04-product-strategy.md`
@@ -1,196 +0,0 @@
1
- # Step 04: Product Strategy
2
-
3
- ## MANDATORY EXECUTION RULES
4
-
5
- - STRATEGY IS ABOUT TRADE-OFFS — what we choose NOT to do matters more
6
- - REFERENCE previous steps — strategy must be grounded in validated problem + market + competition
7
- - WEB SEARCH for comparable strategies in the domain
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
- - Steps 00-03 completed with [C]
14
- - `.ultra/specs/discovery.md` §0-3 exist
15
-
16
- ## CONTEXT BOUNDARIES
17
-
18
- - Focus: Define strategic direction — vision, segments, value prop, trade-offs, defensibility
19
- - This is a CONDENSED strategy canvas, not a full business plan
20
- - Must be grounded in evidence from previous steps
21
- - Strategy should be opinionated — "we serve everyone" is not a strategy
22
-
23
- ## SEARCH STRATEGY (MANDATORY)
24
-
25
- Execute these web searches:
26
-
27
- ```
28
- Search: "{{product_domain}} product strategy examples successful"
29
- Search: "{{product_domain}} go-to-market strategy startup"
30
- Search: "{{product_domain}} defensibility moat competitive advantage"
31
- Search: "{{product_domain}} pricing strategy models"
32
- ```
33
-
34
- ## EXECUTION SEQUENCE
35
-
36
- ### 1. Vision Statement
37
-
38
- Collaborate with user to craft a 2-3 sentence vision that:
39
- - Inspires people (emotional, memorable)
40
- - Is specific enough to guide decisions
41
- - Is ambitious enough to attract talent and investment
42
-
43
- **Test**: Would someone quit their job to work on this? If not, it's too boring.
44
-
45
- Ask user via AskUserQuestion: "In 2-3 sentences, how can we inspire people? What are we aspiring to achieve?"
46
-
47
- ### 2. Target Segments
48
-
49
- Define WHO we serve and WHO we explicitly do NOT serve.
50
-
51
- Using personas from step-00 (Q3: Desperate Specificity):
52
-
53
- **Serve** (defined by problems/JTBD, not demographics):
54
- - Segment 1: [Description] — [Why they need us most]
55
- - Segment 2: [Description] — [Why they need us]
56
-
57
- **Do NOT serve** (equally important):
58
- - Anti-segment 1: [Description] — [Why not]
59
- - Anti-segment 2: [Description] — [Why not]
60
-
61
- ### 3. Value Proposition
62
-
63
- For each target segment, use the JTBD format:
64
-
65
- ```
66
- When [situation], they want [motivation], so they can [outcome]
67
- ```
68
-
69
- This must connect directly to the top opportunities from step-01.
70
-
71
- ### 4. Strategic Trade-offs
72
-
73
- **This is the most important section.** A strategy without trade-offs is a wish list.
74
-
75
- Identify 3-5 strategic trade-offs:
76
-
77
- | We Choose | Over | Because |
78
- |-----------|------|---------|
79
- | [Focus A] | [Alternative A] | [Reasoning grounded in evidence] |
80
- | [Focus B] | [Alternative B] | [Reasoning grounded in evidence] |
81
- | [Focus C] | [Alternative C] | [Reasoning grounded in evidence] |
82
-
83
- Each trade-off should reference competitive analysis from step-03 — we avoid competing head-to-head on competitor strengths.
84
-
85
- ### 5. Defensibility Analysis
86
-
87
- What makes this hard to copy? Evaluate each:
88
-
89
- | Moat Type | Applicability | Strength | Timeline to Build |
90
- |-----------|-------------|----------|-------------------|
91
- | Network effects | [Yes/No] | [Assessment] | [Time] |
92
- | Data advantage | [Yes/No] | [Assessment] | [Time] |
93
- | Switching costs | [Yes/No] | [Assessment] | [Time] |
94
- | Brand / trust | [Yes/No] | [Assessment] | [Time] |
95
- | Technical IP | [Yes/No] | [Assessment] | [Time] |
96
- | Speed / execution | [Yes/No] | [Assessment] | [Time] |
97
-
98
- Be honest — most startups have weak defensibility early. That's okay if the execution advantage is strong.
99
-
100
- ### 6. Write Output
101
-
102
- **WRITE IMMEDIATELY** to `.ultra/specs/discovery.md` §4:
103
-
104
- ```markdown
105
- ## §4 Product Strategy
106
-
107
- ### Vision
108
- [2-3 sentences — inspiring, specific, ambitious]
109
-
110
- ### Target Segments
111
-
112
- #### Primary: [Segment Name]
113
- - **Description**: [Who they are, defined by problem/JTBD]
114
- - **Why them**: [Why they need us most urgently]
115
- - **Value Proposition**: When [situation], they want [motivation], so they can [outcome]
116
-
117
- #### Secondary: [Segment Name]
118
- - **Description**: [Who they are]
119
- - **Why them**: [Why they need us]
120
- - **Value Proposition**: When [situation], they want [motivation], so they can [outcome]
121
-
122
- #### Explicitly NOT Serving
123
- - **[Anti-segment 1]**: [Why not — e.g., "Too enterprise for our current capabilities"]
124
- - **[Anti-segment 2]**: [Why not — e.g., "Their problem is different enough to require a different product"]
125
-
126
- ### Strategic Trade-offs
127
-
128
- | # | We Choose | Over | Because |
129
- |---|-----------|------|---------|
130
- | 1 | [Focus] | [Alternative] | [Evidence-based reasoning] |
131
- | 2 | [Focus] | [Alternative] | [Evidence-based reasoning] |
132
- | 3 | [Focus] | [Alternative] | [Evidence-based reasoning] |
133
- | 4 | [Focus] | [Alternative] | [Evidence-based reasoning] |
134
-
135
- ### Defensibility
136
-
137
- | Moat Type | Applicable | Strength (1-5) | Timeline |
138
- |-----------|-----------|----------------|----------|
139
- | Network effects | [Yes/No] | [X] | [Time] |
140
- | Data advantage | [Yes/No] | [X] | [Time] |
141
- | Switching costs | [Yes/No] | [X] | [Time] |
142
- | Brand / trust | [Yes/No] | [X] | [Time] |
143
- | Technical IP | [Yes/No] | [X] | [Time] |
144
- | Speed / execution | [Yes/No] | [X] | [Time] |
145
-
146
- **Primary moat**: [Which moat type is strongest and why]
147
- **Moat timeline**: [When defensibility becomes meaningful]
148
-
149
- ### Strategy Confidence
150
- - **Overall confidence**: [X]%
151
- - **Strongest element**: [What part of strategy is most grounded]
152
- - **Riskiest bet**: [What strategic choice is most uncertain]
153
- ```
154
-
155
- ### 7. Present to User and Gate
156
-
157
- Show the Product Strategy summary. Highlight:
158
- - Whether the trade-offs feel right
159
- - The defensibility assessment
160
- - Any concerns about the strategic direction
161
-
162
- ```
163
- [C] Continue — Strategy defined, proceed to Assumptions Validation
164
- [R] Revise — Adjust strategy elements
165
- [D] Discuss — Explore specific trade-offs in more depth
166
- ```
167
-
168
- **HALT — wait for user response before proceeding.**
169
-
170
- ### 8. Handle Response
171
-
172
- - **[C]**: Load next step: `./step-05-assumptions-validation.md`
173
- - **[R]**: Revise strategy, update discovery.md §4, re-present
174
- - **[D]**: Deep-dive specific trade-offs, then re-present gate
175
-
176
- ## SUCCESS METRICS
177
-
178
- - Vision is inspiring and specific (not generic)
179
- - Target segments defined by problems, not demographics
180
- - Anti-segments explicitly stated
181
- - At least 3 strategic trade-offs with evidence-based reasoning
182
- - Defensibility honestly assessed
183
- - Output written to discovery.md §4
184
-
185
- ## FAILURE MODES
186
-
187
- - Generic vision ("We make the world better with AI")
188
- - "We serve everyone" (no segment focus)
189
- - No trade-offs stated (strategy without trade-offs is not strategy)
190
- - Defensibility assessment is all 5/5 (unrealistic)
191
- - Strategy not grounded in evidence from steps 00-03
192
- - Not writing output before presenting to user
193
-
194
- ## NEXT STEP
195
-
196
- After user selects [C], read and follow: `./step-05-assumptions-validation.md`