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,8 +1,6 @@
1
1
  ---
2
2
  name: review-tests
3
- description: |
4
- Pipeline test quality analyzer. Detects mock violations, coverage gaps, missing critical paths.
5
- Writes JSON findings to file. Used exclusively by /ultra-review.
3
+ description: Review whether changed behavior has trustworthy and proportionate executable evidence, then write a structured engineering artifact.
6
4
  tools: Read, Grep, Glob, Bash, Write
7
5
  model: opus
8
6
  maxTurns: 18
@@ -10,84 +8,30 @@ skills:
10
8
  - testing-rules
11
9
  ---
12
10
 
13
- # Review Tests - Pipeline Test Quality Agent
11
+ # Test evidence review worker
14
12
 
15
- You are a pipeline review agent. Your output goes to a JSON file, NOT to conversation.
13
+ Write findings to the assigned JSON file and return only a file acknowledgement.
16
14
 
17
- ## Mission
15
+ ## Workflow
18
16
 
19
- Deep analysis of test quality aligned with Ultra Builder Pro testing discipline: real dependencies over mocks, Testcontainers for DB/services, behavioral coverage over line coverage.
17
+ 1. Validate `SESSION_PATH`, `OUTPUT_FILE`, `SCHEMA_PATH`, `DIFF_RANGE`, `DIFF_FILES`,
18
+ HEAD, and the supplied acceptance context.
19
+ 2. Map each changed behavior and acceptance claim to an executable test or check.
20
+ 3. Follow `testing-rules` to determine what the evidence proves across functional,
21
+ persistence, protocol, UI, and failure boundaries that matter to this diff.
22
+ 4. Inspect test doubles for contract fidelity rather than banning them by name. Flag a
23
+ double only when it bypasses the behavior under review or diverges from production
24
+ semantics.
25
+ 5. Detect missing error or state-transition coverage, ineffective assertions, hidden
26
+ skips, flaky assumptions, and tests that never reach the changed code.
27
+ 6. Calibrate severity to the escaped product risk and write
28
+ `ultra-review-findings-v2` following `SCHEMA_PATH`.
20
29
 
21
- ## Input
30
+ Use `axis: engineering_standards` and category `test-quality`. After valid output,
31
+ return exactly:
22
32
 
23
- You will receive:
24
- - `SESSION_PATH`: directory to write output
25
- - `OUTPUT_FILE`: your output filename (`review-tests.json`)
26
- - `DIFF_FILES`: list of changed files to review
27
- - `DIFF_RANGE`: git diff range to analyze
28
-
29
- ## Process
30
-
31
- 1. **Identify Test Files**: Find test files related to changed code
32
- 2. **Mock Violation Scan** (highest priority):
33
- - `jest.fn()` on Repository, Service, or Domain objects
34
- - `class InMemoryRepository` / `class MockXxx` / `class FakeXxx`
35
- - `jest.mock('../services/X')` or `jest.mock('../repositories/X')`
36
- - `it.skip('...database...')` or similar skip patterns
37
- - Any mock of Functional Core components
38
- 3. **Behavioral Coverage Analysis**:
39
- - Are happy paths tested?
40
- - Are error paths tested? (not just that they throw, but correct error type/message)
41
- - Are boundary conditions tested? (empty arrays, null, max values, concurrent access)
42
- - Are state transitions tested for domain entities?
43
- 4. **Missing Test Detection**:
44
- - New code files without corresponding test files
45
- - New public methods without test coverage
46
- - Modified logic without updated tests
47
- - Boundary-crossing code without integration test (DB, API, queue tested only via mocks/unit tests)
48
- - Use case with external dependency but no Testcontainers/real-endpoint test
49
- 5. **Criticality Scoring** (1-10 → severity mapping):
50
- - 9-10 = P0 (critical path untested, security bypass untested)
51
- - 7-8 = P1 (important business logic untested, mock violation)
52
- - 5-6 = P2 (edge case missing, non-critical path)
53
- - 1-4 = P3 (style, test naming, minor improvement)
54
- 6. **Write JSON**: Output to `SESSION_PATH/OUTPUT_FILE`
55
-
56
- ## Severity Guide
57
-
58
- | Finding | Severity |
59
- |---------|----------|
60
- | Mock violation: jest.fn() on Repository/Service | P1 |
61
- | Mock violation: InMemoryRepository/MockXxx | P1 |
62
- | Mock violation: jest.mock domain/service | P1 |
63
- | Critical business logic untested | P0 |
64
- | Security-related path untested | P0 |
65
- | Payment/financial flow untested | P0 |
66
- | Error path not tested | P1 |
67
- | Boundary condition missing | P2 |
68
- | New code without test file | P1 |
69
- | Boundary crossing without integration test | P1 |
70
- | Use case with only unit tests for external deps | P2 |
71
- | Test naming/organization | P3 |
72
-
73
- ## Recommendations
74
-
75
- When reporting missing tests, suggest:
76
- - Testcontainers for database/service integration tests
77
- - Direct instantiation for Functional Core unit tests
78
- - Real collaboration over mocked dependencies
79
- - Specific test scenarios with expected inputs/outputs
80
-
81
- ## Output
82
-
83
- Write valid JSON to `SESSION_PATH/OUTPUT_FILE` following `ultra-review-findings-v1` schema.
84
-
85
- Category for all findings: `test-quality`
86
-
87
- After writing, output exactly one line:
88
- ```
33
+ ```text
89
34
  Wrote N findings (P0:X P1:X P2:X P3:X) to <filepath>
90
35
  ```
91
36
 
92
- Use the current checkout and the review inputs supplied by the parent agent. Do
93
- not create or update a private Ultra memory store.
37
+ Do not modify tests, production code, task state, or projections.
@@ -1,27 +1,6 @@
1
1
  ---
2
2
  name: tdd-runner
3
- description: |
4
- Test execution and analysis specialist. Runs test suites, analyzes failures,
5
- reports results. Use to isolate verbose test output from main conversation.
6
- Proactive trigger: "run tests", "test suite", "check coverage".
7
-
8
- <example>
9
- Context: User wants to run tests after code changes
10
- user: "Run the test suite and tell me what's failing"
11
- assistant: "I'll use the tdd-runner agent to execute tests and analyze results."
12
- <commentary>
13
- Test execution produces verbose output - isolate in subagent context.
14
- </commentary>
15
- </example>
16
-
17
- <example>
18
- Context: Checking test coverage
19
- user: "What's our test coverage looking like?"
20
- assistant: "I'll use the tdd-runner agent to run coverage analysis."
21
- <commentary>
22
- Coverage reports are large - subagent filters to relevant summary.
23
- </commentary>
24
- </example>
3
+ description: Run the repository's exact test or coverage command, isolate actionable failures, and return concise execution evidence without editing files.
25
4
  tools: Bash, Read, Grep, Glob
26
5
  model: opus
27
6
  maxTurns: 20
@@ -29,65 +8,28 @@ skills:
29
8
  - testing-rules
30
9
  ---
31
10
 
32
- # Test Execution Specialist
33
-
34
- Run tests, analyze failures, report results concisely.
35
-
36
- ## Scope
37
-
38
- **DO**: Execute test suites, analyze failures, check coverage, detect mock violations.
39
-
40
- **DON'T**: Write tests (that's the developer's job), modify code, fix bugs.
41
-
42
- ## Process
43
-
44
- 1. **Detect framework**: Look for package.json (jest/vitest), pytest.ini, Cargo.toml, etc.
45
- 2. **Execute**: Run appropriate test command
46
- 3. **Analyze failures**: Extract error messages, stack traces, root cause
47
- 4. **Check violations**: Scan for forbidden mock patterns
48
- 5. **Report**: Only failures + summary (not full output)
49
-
50
- ## Test Commands
51
-
52
- Auto-detect and run the appropriate command:
53
- - Node.js: `npm test` / `npx jest` / `npx vitest`
54
- - Python: `pytest -v`
55
- - Rust: `cargo test`
56
- - Go: `go test ./...`
57
-
58
- ## Mock Violation Detection
59
-
60
- Scan test files for forbidden patterns:
61
- - `jest.fn()` on Repository/Service/Domain
62
- - `class InMemoryRepository` / `class MockXxx` / `class FakeXxx`
63
- - `jest.mock('../services/X')`
64
- - `it.skip('...database...')`
65
-
66
- ## Output Format
67
-
68
- ```markdown
69
- ## Test Results
70
-
71
- ### Summary
72
- - Total: X | Pass: X | Fail: X | Skip: X
73
- - Duration: Xs
74
- - Coverage: X% (if available)
75
-
76
- ### Failures
77
- #### {test name}
78
- **File**: `path:line`
79
- **Error**: {concise error message}
80
- **Cause**: {likely root cause}
81
-
82
- ### Mock Violations (if any)
83
- - `file:line` - {violation description}
84
-
85
- ### Verdict
86
- ALL PASS / X FAILURES NEED ATTENTION
87
- ```
88
-
89
- ## Handoff
90
-
91
- Return reusable test patterns, common failure causes, and framework quirks to the
92
- parent agent as explicit evidence. Do not create or update a private Ultra memory
93
- store; persistent memory belongs to the host's separately installed provider.
11
+ # Test execution specialist
12
+
13
+ Run tests and analyze their evidence. This assignment is read-only.
14
+
15
+ ## Workflow
16
+
17
+ 1. Resolve the requested scope, checkout, repository guidance, and canonical command
18
+ from package scripts, CI configuration, or framework files. Ask the parent to
19
+ resolve ambiguity when different commands prove different contracts.
20
+ 2. Run the exact command without weakening flags, skipping failures, or changing test
21
+ configuration. Capture exit code, duration, pass/fail/skip counts, and coverage only
22
+ when the runner reports it.
23
+ 3. For each failure, identify the first useful error, tight source or test location,
24
+ whether the failure reproduces, and the most likely boundary that is wrong. Separate
25
+ product defects, test defects, environment failures, and flaky or nondeterministic
26
+ evidence.
27
+ 4. Evaluate test doubles only when relevant to the failed or requested behavior. Flag
28
+ one only when it bypasses the contract under test or diverges materially from the
29
+ production boundary.
30
+ 5. Return a concise summary with the exact command, exit code, counts, actionable
31
+ failures, environment limitations, and residual coverage gaps. Do not paste the full
32
+ runner transcript unless the parent requests it.
33
+
34
+ Do not edit tests, production code, task state, or projections. Do not claim a green
35
+ suite when the command did not complete successfully.
package/commands/learn.md CHANGED
@@ -1,41 +1,10 @@
1
1
  ---
2
- description: Extract one reusable pattern into a valid user skill after explicit approval
3
- argument-hint: "[pattern-name]"
4
- allowed-tools: Read, Write, Grep, Glob, AskUserQuestion
5
- model: opus
2
+ description: Capture one verified reusable workflow as a portable user skill after explicit approval
3
+ argument-hint: "[skill-name]"
6
4
  workflow-ref: "@skills/learn/SKILL.md"
7
5
  ---
8
6
 
9
- # /learn
7
+ # Capture a reusable skill
10
8
 
11
- ## 目标
12
-
13
- 扫当前会话挑一个最值得保存的「可复用模式」,以 Speculation 级别写到
14
- `~/.claude/skills/learned-<slug>-unverified/SKILL.md`。写入前必问用户确认。
15
-
16
- ## 参数
17
-
18
- | 位 | 含义 | 缺省 |
19
- |----|------|------|
20
- | `$1` | pattern 文件名建议 slug | 由 skill 自动生成 |
21
-
22
- ## Workflow
23
-
24
- 完整 5 步见 `@skills/learn/SKILL.md`(review → pick one → draft → 用户确认 → write)。
25
-
26
- **命令入口做的事**:
27
- 1. 回溯会话找可提炼的模式(错误修复 / 调试套路 / workaround / 项目级惯例)
28
- 2. 选一个价值最高的(不是多个 — 一个文件一个模式)
29
- 3. 按模板起草 → 直接询问用户选择 Save/Edit/Cancel
30
- 4. 保存到 `~/.claude/skills/learned-<slug>-unverified/SKILL.md`(不覆盖已存在目录)
31
-
32
- ## 用法
33
-
34
- ```bash
35
- /learn # 自动挑
36
- /learn supabase-rls-debug # 指定文件名 slug
37
- ```
38
-
39
- ## 下一步
40
-
41
- 用户以后 review 后手动去掉 `_unverified` 后缀升为 Inference;多次成功使用后升为 Fact。
9
+ Read and follow `@skills/learn/SKILL.md` with `$ARGUMENTS` as optional naming guidance.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,48 +1,10 @@
1
1
  ---
2
- description: Start or resume a continuous post-delivery change with bounded context, documentation impact, and linked authoritative tasks
3
- argument-hint: "[change-id or title] [quick|standard|major|incident]"
4
- allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion
5
- model: opus
2
+ description: Open or resume a bounded continuous change with linked authoritative tasks and context
3
+ argument-hint: "[change-id-or-title] [quick|standard|major|incident]"
6
4
  workflow-ref: "@skills/ultra-change/SKILL.md"
7
- mcp_tools_required:
8
- - change.create
9
- - change.update
10
- - change.get
11
- - change.list
12
- - change.context
13
- - task.create
14
- - task.list
15
5
  ---
16
6
 
17
- # /ultra-change
7
+ # Open or resume a change
18
8
 
19
- ## 目标
20
-
21
- 把初始交付后的日常修复、功能、重构或事故变成一个持续可追踪的 change,避免
22
- 代码、spec、测试证据和项目上下文逐步漂移。
23
-
24
- ## Workflow
25
-
26
- 完整流程见 `@skills/ultra-change/SKILL.md`:
27
-
28
- 1. 先查 active/blocked change,匹配则恢复,避免重复创建。
29
- 2. 按 `quick / standard / major / incident` 分类并声明 docs impact。
30
- 3. 调 `change.create`,为 change 创建至少一个带 `change_id` 的 task。
31
- 4. standard/major 写 delta + plan;incident 完成结构化 `diagnosis.md`。
32
- 5. 调 `change.context` 编译最小上下文;incident 先走 debugger 诊断切片。
33
- 6. 路由到 `/ultra-dev`、`/ultra-test`、`/ultra-review`、`/ultra-deliver`。
34
-
35
- Memory 与代码图谱只允许以外部 provider 元数据引用出现;本命令不保存 provider
36
- 正文,也不自动刷新外部 provider。
37
-
38
- ## 用法
39
-
40
- ```bash
41
- /ultra-change auth-timeout quick
42
- /ultra-change billing-redesign major
43
- /ultra-change incident-2026-07-17 incident
44
- ```
45
-
46
- ## 下一步
47
-
48
- 输出会给出 change id、artifact root、linked task 与准确的下一个 Ultra workflow。
9
+ Read and follow `@skills/ultra-change/SKILL.md`, using `$ARGUMENTS` to identify and classify the change.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,52 +1,10 @@
1
1
  ---
2
- description: Converge and deliver a verified baseline or continuous change — reconcile specs, archive evidence, version, tag, and push
2
+ description: Converge current evidence and specification learning into an archived or released baseline
3
3
  argument-hint: "[version-type]"
4
- allowed-tools: Task, Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion
5
- model: opus
6
4
  workflow-ref: "@skills/ultra-deliver/SKILL.md"
7
- cli_fallback: "direct user interaction"
8
- mcp_tools_required:
9
- - change.list
10
- - change.get
11
- - change.context
12
- - change.converge
13
- - change.archive
14
5
  ---
15
6
 
16
- # /ultra-deliver
7
+ # Converge and deliver
17
8
 
18
- ## 目标
19
-
20
- `/ultra-test` 绿灯后,把 active delta 合并回 baseline,重跑发布证据,调用
21
- `change.converge` 与 `change.archive`,再完成版本号、tag、push 和 delivery report。
22
-
23
- ## 参数
24
-
25
- | 位 | 含义 | 缺省 |
26
- |----|------|------|
27
- | `$1` | 版本跳跃(`patch`/`minor`/`major`) | 按 commit 类型自动判断 |
28
-
29
- ## Workflow
30
-
31
- 完整流程见 `@skills/ultra-deliver/SKILL.md`(绑定 change → baseline reconciliation →
32
- build/test → release commit → context/convergence/archive → tag/push → report)。
33
-
34
- **命令入口做的事**:
35
- 1. 读 `.ultra/test-report.json` 验 `passed=true` + `git_commit === HEAD`
36
- 2. `git status` 清洁检查;不干净 → 通过 Host 原生提问界面选处理方式
37
- 3. 有 active change 时合并 delta、刷新 context,并通过确定性 convergence gate
38
- 4. archive 完成后才允许 tag/push
39
- 5. 写带 change id、archive path、baseline updates 的 delivery report
40
-
41
- ## 用法
42
-
43
- ```bash
44
- /ultra-deliver # 自动判断版本号
45
- /ultra-deliver major # 强制 major bump(breaking changes)
46
- /ultra-deliver patch # 强制 patch
47
- ```
48
-
49
- ## 下一步
50
-
51
- 部署到 Railway / Vercel,或在 release channel 广播。`delivery-report.json` 里
52
- `pushed=true` 后即可视作发布完成。
9
+ Read and follow `@skills/ultra-deliver/SKILL.md`, using `$ARGUMENTS` only for an explicitly requested version policy.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,54 +1,10 @@
1
1
  ---
2
- description: Agile development execution — one task through TDD + review gate, writing state via MCP task.update
2
+ description: Execute one authoritative Ultra task through implementation, verification, and review
3
3
  argument-hint: "[task-id]"
4
- allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task, AskUserQuestion, Skill
5
- model: opus
6
4
  workflow-ref: "@skills/ultra-dev/SKILL.md"
7
- mcp_tools_required:
8
- - task.update
9
- - task.get
10
- - task.list
11
- - change.get
12
- - change.context
13
5
  ---
14
6
 
15
- # /ultra-dev
7
+ # Execute one Ultra task
16
8
 
17
- ## 目标
18
-
19
- 把一个 task 从 `pending` 推到 `completed`:进入 feature 分支 → RED/GREEN/REFACTOR
20
- TDD → 质量门 → `/ultra-review all` → 完成 → commit/merge。**单写**:状态只通过
21
- MCP `task.update` 改一次;projector 自动更新 tasks.json + context-md frontmatter。
22
- MCP 状态工具失败时 fail closed;`LEGACY_STATE_MIGRATION_REQUIRED` 只允许先跑
23
- v4.4→v4.5 迁移,绝不从 `tasks.json` 回退或直接改投影。
24
-
25
- ## 参数
26
-
27
- | 位 | 含义 | 缺省 |
28
- |----|------|------|
29
- | `$1` | task id | 拓扑序第一个 `pending` |
30
-
31
- ## Workflow
32
-
33
- 完整 8 步流程见 `@skills/ultra-dev/SKILL.md`(Resume Check → Design Gate → 选 task →
34
- 状态 in_progress → 环境 → TDD → 质量门 → checkpoint → review → 完成 → commit/merge → report)。
35
-
36
- **命令入口做的事**:
37
- 1. 读 `.ultra/workflow-state.json` 决定新跑 vs resume
38
- 2. 首跑通过 Host 原生提问触发 Design Approval Gate
39
- 3. 驱动 skill 走 TDD + review 循环;状态仅通过 MCP `task.update`
40
- 4. task 有 `change_id` 时把需求变化写进 active delta,并用 `change.context` 刷新上下文
41
- 5. Step 4.5 review 通过 `/ultra-review` 和 Host 原生 subagent 执行
42
- 6. Step 4.4 pre-review checkpoint 写入 workflow-state.json,不依赖 `/compact`
43
-
44
- ## 用法
45
-
46
- ```bash
47
- /ultra-dev # 自动选下一个 pending task
48
- /ultra-dev 3 # 直接做 task 3
49
- ```
50
-
51
- ## 下一步
52
-
53
- 单个 task 完成后自动提示下一个 `/ultra-dev`;所有 Walking Skeleton +
54
- critical-path task 完成 → `/ultra-test` 做交付前质量审计。
9
+ Read and follow `@skills/ultra-dev/SKILL.md`, using `$ARGUMENTS` as the optional task id.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,36 +1,10 @@
1
1
  ---
2
- description: Inspect Ultra runtime health and optionally run explicit backup-first mechanical recovery
2
+ description: Diagnose Ultra state and installed-plugin health with optional explicit repair
3
3
  argument-hint: "[--repair]"
4
- allowed-tools: Read, Bash
5
- model: opus
6
4
  workflow-ref: "@skills/ultra-doctor/SKILL.md"
7
- mcp_tools_required:
8
- - system.doctor
9
- cli_fallback: "system doctor"
10
5
  ---
11
6
 
12
- # /ultra-doctor
7
+ # Diagnose Ultra health
13
8
 
14
- ## 目标
15
-
16
- 诊断 state.db、projection、incident、session 和 active change artifact 的健康状态。
17
- 默认只读;只有显式传入 `--repair` 才允许备份后执行机械恢复。
18
-
19
- ## Workflow
20
-
21
- 完整契约见 `@skills/ultra-doctor/SKILL.md`。
22
-
23
- 1. 默认调用 `system.doctor {"repair": false}`。
24
- 2. 只报告失败检查、incident、游标落后和归属边界。
25
- 3. `--repair` 时必须先生成 state.db 备份,再恢复 orphan、消费 staleness event、
26
- 重排超时中断或失败的 projection 并重新投影。
27
- 4. 修复后重新读取报告;仍 degraded 就明确剩余阻塞,不宣称完成。
28
-
29
- ## 用法
30
-
31
- ```bash
32
- /ultra-doctor
33
- /ultra-doctor --repair
34
- ```
35
-
36
- Memory 和代码图谱属于外部 provider,本命令既不收集也不修复它们。
9
+ Read and follow `@skills/ultra-doctor/SKILL.md`; allow repair only when `$ARGUMENTS` explicitly contains `--repair`.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,52 +1,10 @@
1
1
  ---
2
- description: Initialize Ultra Builder Pro project — scaffold .ultra/, initialize state.db and continuous-change directories, optional git
3
- argument-hint: <name> <type> <stack> [git]
4
- allowed-tools: Read, Write, Bash, Grep, Glob, AskUserQuestion
5
- model: opus
2
+ description: Initialize an Ultra project with authoritative state and baseline specification files
3
+ argument-hint: "[name] [type] [stack] [git]"
6
4
  workflow-ref: "@skills/ultra-init/SKILL.md"
7
- mcp_tools_required:
8
- - task.init_project
9
- cli_fallback: "task init-project"
10
5
  ---
11
6
 
12
- # /ultra-init
7
+ # Initialize an Ultra project
13
8
 
14
- ## 目标
15
-
16
- 搭 `.ultra/` 骨架(specs + tasks + changes + docs + reports),初始化权威
17
- `state.db`,写入带元数据的初始 `tasks.json`,并按需初始化 git。Claude Code、
18
- OpenCode、Codex 三个 runtime 行为一致。
19
-
20
- ## 参数
21
-
22
- | 位 | 含义 | 缺省 |
23
- |----|------|------|
24
- | `$1` | 项目名 | 当前目录名 |
25
- | `$2` | 项目类型(`web`/`api`/`cli`/`fullstack`/`other`) | 从 package 文件识别 |
26
- | `$3` | 技术栈(逗号分隔) | 从 package 文件识别 |
27
- | `$4` | `git` → 初始化 git | 检测已有 `.git/` 时询问 |
28
-
29
- ## Workflow
30
-
31
- 完整流程见 `@skills/ultra-init/SKILL.md`(4 步:状态检测 → 参数补全 →
32
- `task.init_project` 拉起骨架 → git 集成)。
33
-
34
- **命令入口做的事**:
35
- 1. 解析 `$1-$4`,补缺省
36
- 2. 探测 runtime 能力:优先走 MCP `task.init_project`;不可达时退回 `ultra-tools task init-project`
37
- 3. 按 skill 的 4 步工作流推进
38
- 4. 完成后提示下一步命令
39
-
40
- ## 用法
41
-
42
- ```bash
43
- /ultra-init # 交互模式(自动识别)
44
- /ultra-init my-app # 带项目名
45
- /ultra-init my-app api # 带类型
46
- /ultra-init my-app fullstack react,postgres git # 完整 + git
47
- ```
48
-
49
- ## 下一步
50
-
51
- **CRITICAL**:跑 `/ultra-research` 做 17 步 discovery 把 spec 填满,
52
- **然后**才跑 `/ultra-plan` 生成任务。直接 plan 会产出基于模糊需求的任务。
9
+ Read and follow `@skills/ultra-init/SKILL.md`, using `$ARGUMENTS` as optional project metadata.
10
+ Treat the referenced skill as the only workflow definition.
@@ -1,53 +1,10 @@
1
1
  ---
2
- description: Generate task breakdown from complete specs — walking-skeleton first, vertical slices, via MCP task.create
3
- argument-hint: [scope]
4
- allowed-tools: Read, Write, Edit, Bash(mkdir .ultra/*), Grep, Glob, AskUserQuestion
5
- model: opus
2
+ description: Convert validated requirements into dependency-valid Ultra tasks with bounded context and exact verification
3
+ argument-hint: "[scope]"
6
4
  workflow-ref: "@skills/ultra-plan/SKILL.md"
7
- mcp_tools_required:
8
- - task.create
9
5
  ---
10
6
 
11
- # /ultra-plan
7
+ # Plan executable slices
12
8
 
13
- ## 目标
14
-
15
- 把 `/ultra-research` 验证过的完整 spec 转成可执行的任务计划:先 Walking
16
- Skeleton 贯穿所有层,再切 vertical slices,每 3-4 个 feature task 插一个
17
- Integration Checkpoint。任务写入 state.db(MCP `task.create`),projector
18
- 自动生成 `.ultra/tasks/tasks.json` + contexts/*.md frontmatter。
19
-
20
- 入口先写 active `.ultra/workflow-state.json`。MCP 不可用或返回
21
- `LEGACY_STATE_MIGRATION_REQUIRED` 时立即停止,提示运行
22
- `ultra-tools migrate --from=4.4 --to=4.5 --source-dir <project-root>`;绝不读取或写入
23
- `tasks.json` 作为回退。
24
-
25
- ## 参数
26
-
27
- | 位 | 含义 | 缺省 |
28
- |----|------|------|
29
- | `$1` | scope 模式(EXPAND / SELECTIVE / HOLD / REDUCE) | 询问用户;默认 SELECTIVE |
30
-
31
- ## Workflow
32
-
33
- 完整 8 步流程见 `@skills/ultra-plan/SKILL.md`。
34
-
35
- **命令入口做的事**:
36
- 1. 探测 spec 完整度 — 未填充则 block 并转 `/ultra-research`
37
- 2. 使用 Host 原生提问界面交互选 scope 模式
38
- 3. 驱动 skill 跑生成 → 依赖分析 → `task.create` 循环 → 写 context-md 正文
39
- 4. 跑 7 项 verification(requirement coverage / 无环 / trace_to / 复杂度等)
40
- 5. 输出 report + 下一步
41
-
42
- ## 用法
43
-
44
- ```bash
45
- /ultra-plan # 交互模式;默认 SELECTIVE
46
- /ultra-plan EXPAND # 直接进入"激进扩张"模式
47
- /ultra-plan REDUCE # MVP 最小化模式
48
- ```
49
-
50
- ## 下一步
51
-
52
- 所有 CRITICAL check 过了 → `/clear` 然后 `/ultra-dev` 开始 TDD。
53
- 单个 task 完成后 `/ultra-status` 看进度。
9
+ Read and follow `@skills/ultra-plan/SKILL.md`, using `$ARGUMENTS` to select the requested scope.
10
+ Treat the referenced skill as the only workflow definition.