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,188 +0,0 @@
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`
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Review Verdict Update - Update SUMMARY.json and index.json after P0 fixes.
3
-
4
- Usage:
5
- python3 review_verdict_update.py <session_path> [new_verdict]
6
-
7
- If new_verdict is omitted, recalculates from current P0/P1 counts in SUMMARY.json:
8
- - P0 > 0 → REQUEST_CHANGES (no change)
9
- - P1 > 3 → REQUEST_CHANGES (no change)
10
- - P1 > 0 → COMMENT
11
- - else → APPROVE
12
-
13
- Exit codes:
14
- 0 - Updated successfully
15
- 1 - Error (file not found, parse error, etc.)
16
- """
17
-
18
- import json
19
- import sys
20
- from pathlib import Path
21
-
22
-
23
- def recalculate_verdict(data: dict) -> str:
24
- """Recalculate verdict from finding counts."""
25
- summary = data.get("summary", {})
26
- by_severity = summary.get("by_severity", {})
27
- p0 = by_severity.get("P0", 0)
28
- p1 = by_severity.get("P1", 0)
29
-
30
- if p0 > 0:
31
- return "REQUEST_CHANGES"
32
- if p1 > 3:
33
- return "REQUEST_CHANGES"
34
- if p1 > 0:
35
- return "COMMENT"
36
- return "APPROVE"
37
-
38
-
39
- def main():
40
- if len(sys.argv) < 2:
41
- print(__doc__, file=sys.stderr)
42
- sys.exit(1)
43
-
44
- session_path = Path(sys.argv[1])
45
- forced_verdict = sys.argv[2] if len(sys.argv) >= 3 else None
46
-
47
- summary_file = session_path / "SUMMARY.json"
48
- if not summary_file.exists():
49
- print(f"Error: {summary_file} not found", file=sys.stderr)
50
- sys.exit(1)
51
-
52
- # Update SUMMARY.json
53
- try:
54
- data = json.loads(summary_file.read_text(encoding="utf-8"))
55
- except (json.JSONDecodeError, OSError) as e:
56
- print(f"Error reading SUMMARY.json: {e}", file=sys.stderr)
57
- sys.exit(1)
58
-
59
- old_verdict = data.get("verdict", "UNKNOWN")
60
-
61
- if forced_verdict:
62
- new_verdict = forced_verdict
63
- else:
64
- new_verdict = recalculate_verdict(data)
65
-
66
- if old_verdict == new_verdict:
67
- print(f"Verdict unchanged: {old_verdict}")
68
- sys.exit(0)
69
-
70
- data["verdict"] = new_verdict
71
- summary_file.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
72
- print(f"SUMMARY.json: {old_verdict} → {new_verdict}")
73
-
74
- # Update index.json
75
- reviews_dir = session_path.parent
76
- index_file = reviews_dir / "index.json"
77
- session_id = session_path.name
78
-
79
- if index_file.exists():
80
- try:
81
- index_data = json.loads(index_file.read_text(encoding="utf-8"))
82
- for entry in index_data.get("sessions", []):
83
- if entry.get("id") == session_id:
84
- entry["verdict"] = new_verdict
85
- # Update P0/P1 counts from summary
86
- by_sev = data.get("summary", {}).get("by_severity", {})
87
- entry["p0"] = by_sev.get("P0", 0)
88
- entry["p1"] = by_sev.get("P1", 0)
89
- break
90
- index_file.write_text(json.dumps(index_data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
91
- print(f"index.json: updated session {session_id}")
92
- except (json.JSONDecodeError, OSError) as e:
93
- print(f"Warning: failed to update index.json: {e}", file=sys.stderr)
94
-
95
- sys.exit(0)
96
-
97
-
98
- if __name__ == "__main__":
99
- main()