ultra-builder-pro-cli 0.10.0 → 0.12.1

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 (137) hide show
  1. package/.ultra-template/specs/architecture.md +54 -223
  2. package/.ultra-template/specs/discovery.md +34 -231
  3. package/.ultra-template/specs/product.md +44 -200
  4. package/.ultra-template/tasks/contexts/TEMPLATE.md +36 -0
  5. package/.ultra-template/tasks/tasks.json +6 -0
  6. package/CHANGELOG.md +86 -1
  7. package/README.md +21 -9
  8. package/adapters/_shared/codex-assets.cjs +24 -342
  9. package/adapters/_shared/handbook.cjs +4 -3
  10. package/adapters/_shared/runtime-assets.cjs +24 -0
  11. package/adapters/_shared/tests/handbook.test.cjs +4 -0
  12. package/adapters/_shared/tests/runtime-assets.test.cjs +11 -4
  13. package/adapters/claude.js +28 -5
  14. package/adapters/kimi.js +15 -138
  15. package/adapters/opencode.js +22 -49
  16. package/adapters/tests/claude.test.cjs +22 -8
  17. package/adapters/tests/codex.test.cjs +21 -8
  18. package/adapters/tests/kimi-hook.test.cjs +1 -1
  19. package/adapters/tests/kimi.test.cjs +11 -11
  20. package/adapters/tests/opencode.test.cjs +47 -8
  21. package/agents/code-reviewer.md +24 -85
  22. package/agents/debugger.md +30 -132
  23. package/agents/review-code.md +24 -104
  24. package/agents/review-comments.md +20 -83
  25. package/agents/review-coordinator.md +40 -137
  26. package/agents/review-design.md +21 -118
  27. package/agents/review-errors.md +22 -70
  28. package/agents/review-spec.md +36 -0
  29. package/agents/review-tests.md +20 -76
  30. package/agents/tdd-runner.md +26 -84
  31. package/commands/learn.md +5 -36
  32. package/commands/ultra-change.md +5 -43
  33. package/commands/ultra-deliver.md +4 -46
  34. package/commands/ultra-dev.md +4 -48
  35. package/commands/ultra-doctor.md +4 -30
  36. package/commands/ultra-init.md +5 -47
  37. package/commands/ultra-plan.md +5 -48
  38. package/commands/ultra-research.md +5 -54
  39. package/commands/ultra-status.md +5 -44
  40. package/commands/ultra-test.md +5 -45
  41. package/commands/ultra-think.md +5 -40
  42. package/docs/AGENT-CONTEXT.md +16 -8
  43. package/docs/ARCHITECTURE.md +32 -5
  44. package/docs/PLAN.zh-CN.md +8 -6
  45. package/docs/ROADMAP.md +5 -3
  46. package/docs/RUNTIME-COMPAT-MATRIX.md +8 -5
  47. package/docs/SKILL-AUTHORING.md +75 -0
  48. package/docs/STATE-DB-ACCESS-POLICY.md +17 -11
  49. package/docs/USER-HANDBOOK-CONTRACT.md +8 -5
  50. package/hooks/README.md +4 -3
  51. package/hooks/adapters/codex.py +1 -1
  52. package/hooks/adapters/kimi.py +1 -1
  53. package/hooks/context_spine.py +120 -16
  54. package/hooks/health_check.py +11 -0
  55. package/hooks/pre_stop_check.py +6 -5
  56. package/mcp-server/lib/baseline-workflow.cjs +415 -0
  57. package/mcp-server/lib/baseline-workflow.test.cjs +225 -0
  58. package/mcp-server/lib/change-workflow.cjs +24 -27
  59. package/mcp-server/lib/change-workflow.test.cjs +202 -6
  60. package/mcp-server/lib/context-spine.cjs +74 -9
  61. package/mcp-server/lib/context-spine.test.cjs +15 -0
  62. package/mcp-server/lib/doctor.cjs +14 -0
  63. package/mcp-server/lib/doctor.test.cjs +25 -1
  64. package/mcp-server/lib/init-project.cjs +49 -14
  65. package/mcp-server/lib/provider-refs.cjs +42 -0
  66. package/mcp-server/lib/spec-learning.test.cjs +5 -0
  67. package/mcp-server/lib/state-db.cjs +63 -4
  68. package/mcp-server/lib/state-db.test.cjs +8 -3
  69. package/mcp-server/server.cjs +48 -3
  70. package/mcp-server/tests/init-project.test.cjs +54 -8
  71. package/mcp-server/tests/server-contract.test.cjs +99 -2
  72. package/mcp-server/tests/state-db.test.cjs +11 -2
  73. package/package.json +3 -2
  74. package/skills/cc-collab/SKILL.md +16 -18
  75. package/skills/code-review-expert/SKILL.md +39 -114
  76. package/skills/code-review-expert/references/correctness-reliability.md +30 -0
  77. package/skills/code-review-expert/references/design-boundaries.md +26 -0
  78. package/skills/code-review-expert/references/removal-plan.md +17 -45
  79. package/skills/codex-collab/SKILL.md +23 -28
  80. package/skills/codex-collab/evals/evals.json +18 -23
  81. package/skills/integration-rules/SKILL.md +28 -67
  82. package/skills/learn/SKILL.md +46 -106
  83. package/skills/security-rules/SKILL.md +34 -56
  84. package/skills/testing-rules/SKILL.md +28 -52
  85. package/skills/ultra-change/SKILL.md +68 -114
  86. package/skills/ultra-deliver/SKILL.md +58 -86
  87. package/skills/ultra-dev/SKILL.md +46 -105
  88. package/skills/ultra-doctor/SKILL.md +45 -72
  89. package/skills/ultra-init/SKILL.md +62 -147
  90. package/skills/ultra-init/references/brownfield-adoption.md +65 -0
  91. package/skills/ultra-plan/SKILL.md +56 -89
  92. package/skills/ultra-research/SKILL.md +64 -152
  93. package/skills/ultra-research/references/architecture.md +38 -0
  94. package/skills/ultra-research/references/problem-product.md +39 -0
  95. package/skills/ultra-research/references/quality-delivery.md +34 -0
  96. package/skills/ultra-research/references/synthesis.md +38 -0
  97. package/skills/ultra-research/references/users-scope.md +40 -0
  98. package/skills/ultra-review/SKILL.md +54 -98
  99. package/skills/ultra-review/references/unified-schema.md +76 -101
  100. package/skills/ultra-review/scripts/review_wait.py +242 -77
  101. package/skills/ultra-status/SKILL.md +41 -56
  102. package/skills/ultra-test/SKILL.md +37 -72
  103. package/skills/ultra-think/SKILL.md +43 -102
  104. package/skills/ultra-verify/SKILL.md +44 -84
  105. package/skills/ultra-verify/evals/evals.json +24 -27
  106. package/spec/cli-protocol.md +4 -0
  107. package/spec/mcp-tools.yaml +223 -4
  108. package/spec/schemas/command-manifest.schema.json +7 -25
  109. package/spec/schemas/mcp-tools.schema.json +1 -1
  110. package/spec/schemas/skill-manifest.schema.json +9 -79
  111. package/spec/schemas/state-db.sql +33 -2
  112. package/ultra-tools/commands/status.cjs +20 -2
  113. package/ultra-tools/commands/task.cjs +4 -1
  114. package/ultra-tools/status-command.test.cjs +20 -0
  115. package/ultra-tools/system-command.test.cjs +5 -0
  116. package/skills/code-review-expert/references/code-quality-checklist.md +0 -112
  117. package/skills/code-review-expert/references/integration-checklist.md +0 -46
  118. package/skills/code-review-expert/references/security-checklist.md +0 -100
  119. package/skills/code-review-expert/references/solid-checklist.md +0 -65
  120. package/skills/ultra-research/steps/step-00-problem-validation.md +0 -154
  121. package/skills/ultra-research/steps/step-01-opportunity-discovery.md +0 -172
  122. package/skills/ultra-research/steps/step-02-market-assessment.md +0 -195
  123. package/skills/ultra-research/steps/step-03-competitive-landscape.md +0 -197
  124. package/skills/ultra-research/steps/step-04-product-strategy.md +0 -196
  125. package/skills/ultra-research/steps/step-05-assumptions-validation.md +0 -234
  126. package/skills/ultra-research/steps/step-10-user-personas.md +0 -169
  127. package/skills/ultra-research/steps/step-11-user-scenarios.md +0 -181
  128. package/skills/ultra-research/steps/step-20-user-stories.md +0 -156
  129. package/skills/ultra-research/steps/step-21-features-scope.md +0 -157
  130. package/skills/ultra-research/steps/step-22-success-metrics.md +0 -195
  131. package/skills/ultra-research/steps/step-30-architecture-context.md +0 -154
  132. package/skills/ultra-research/steps/step-31-solution-strategy.md +0 -172
  133. package/skills/ultra-research/steps/step-32-building-blocks.md +0 -188
  134. package/skills/ultra-research/steps/step-40-deployment.md +0 -123
  135. package/skills/ultra-research/steps/step-41-quality-risks.md +0 -135
  136. package/skills/ultra-research/steps/step-99-synthesis.md +0 -188
  137. package/skills/ultra-review/scripts/review_verdict_update.py +0 -99
@@ -1,122 +1,76 @@
1
1
  ---
2
2
  name: ultra-change
3
- description: "Open or resume a continuous change, capture its delta and decisions, compile bounded role context, and route one executable slice."
4
- user-invocable: true
5
- runtime: all
6
- mcp_tools_required:
7
- - change.create
8
- - change.update
9
- - change.get
10
- - change.list
11
- - change.context
12
- - change.breadcrumb
13
- - change.learning_propose
14
- - change.learning_resolve
15
- - task.create
16
- - task.list
3
+ description: Open or resume a bounded continuous change and connect its intent, delta, decisions, context, and executable tasks. Use when maintaining or extending an Ultra project after its baseline exists.
17
4
  ---
18
5
 
19
- # ultra-change — Delta Entry and Alignment Gate
6
+ # Open or resume a continuous change
20
7
 
21
- Use this after the first baseline delivery for fixes, small features, redesigns,
22
- incidents, and maintenance. It keeps specifications live through a delta → implement
23
- → learn → converge loop.
8
+ Keep post-delivery work aligned through a delta, implementation, learning, and
9
+ convergence loop.
24
10
 
25
11
  ## Authority boundary
26
12
 
27
- All change and task lifecycle writes use the live MCP tools. Do not write raw SQLite
28
- or mutate generated task/context projections. Provider payloads stay in their owning
29
- memory or graph system; Ultra stores metadata references only.
30
-
31
- ## 1. Establish the change
32
-
33
- Call `change.list` and `change.breadcrumb` first.
34
-
35
- - Resume the single matching active/blocked change.
36
- - If several may match, require an explicit id.
37
- - Otherwise auto-discover repository facts, then ask only the highest-value unresolved
38
- question. Do not ask the user for branch, stack, paths, or behavior already visible.
39
-
40
- Capture:
41
-
42
- - observable problem or requested outcome;
43
- - acceptance and explicit non-goals;
44
- - affected public seam or integration boundary;
45
- - documentation impact: `required` paths, `none` with rationale, or blocking `unknown`;
46
- - kind: `quick`, `standard`, `major`, or `incident`;
47
- - decision inventory: accepted decisions, rejected alternatives, and unresolved choices.
48
-
49
- Create with `change.create` using a stable kebab-case id. Update an existing packet
50
- with `change.update`; never create a parallel packet for the same outcome.
51
-
52
- ## 2. Write only the delta
53
-
54
- The bounded packet is:
55
-
56
- ```text
57
- .ultra/changes/active/<change-id>/
58
- intent.md
59
- delta/ # standard and major
60
- plan.md # standard and major
61
- diagnosis.md # incident
62
- context-manifest.json # MCP projection
63
- spec-learning.json # MCP projection
64
- verification.md # convergence projection
65
- ```
66
-
67
- `intent.md` records outcome, acceptance, non-goals, docs impact, and decisions.
68
- Delta files describe only differences from the baseline. An incident diagnosis must
69
- record symptom, earliest bad state, root-cause hypothesis, discriminating evidence,
70
- and recovery boundary.
71
-
72
- ## 3. Create an executable slice
73
-
74
- Prefer the smallest vertical `tracer_bullet` that crosses a live public seam. Split
75
- only when ownership or verification is genuinely independent. Each task must declare:
76
-
77
- - one observable outcome and linked `change_id`;
78
- - bounded files/contracts and dependencies;
79
- - `public_seam` that proves reachability;
80
- - exact `verification_command`;
81
- - expected red signal for a bug/incident;
82
- - documentation impact.
83
-
84
- Persist tasks with `task.create`. Generated `tasks.json` is never an input authority.
85
-
86
- ## 4. Compile Context Manifest v2
87
-
88
- Call `change.context` for the next task with:
89
-
90
- ```json
91
- {
92
- "id": "<change-id>",
93
- "task_id": "<task-id>",
94
- "role": "plan",
95
- "gate": "planning",
96
- "context_refs": [{"ref":"<path>","kind":"spec","reason":"defines acceptance","required":true}],
97
- "budget": {"max_tokens":12000,"max_files":12},
98
- "execution_contract": {
99
- "slice_kind":"tracer_bullet",
100
- "public_seam":"<reachable boundary>",
101
- "verification_command":"<exact command>",
102
- "context_budget_percent":40
103
- }
104
- }
105
- ```
106
-
107
- Include only files needed for the current role and gate. Missing required references,
108
- digest drift, file-count overflow, or a fresh-context budget over 40% blocks readiness.
109
- Use `expand_contract` only for an explicitly approved wider slice.
110
-
111
- ## 5. Handle discoveries without silent spec drift
112
-
113
- When implementation reveals a stable requirement, invariant, or public behavior not
114
- in the baseline, call `change.learning_propose` with evidence and target document.
115
- It is a candidate, not an automatic edit. A human/primary-agent decision must approve
116
- or reject it; approved learning is marked applied only after the baseline was updated.
117
-
118
- ## Exit contract
119
-
120
- Call `change.breadcrumb` and report the compiled task, readiness, blockers, and its
121
- single next action. Do not claim alignment while documentation impact is unknown,
122
- context is stale, or a material decision remains unresolved.
13
+ Use Ultra MCP tools for change and task lifecycle writes. Do not write raw SQLite or
14
+ mutate generated task and context projections. External memory or code-graph systems
15
+ own their payloads; Ultra stores only provider references supplied by the user or host.
16
+
17
+ ## Workflow
18
+
19
+ 1. Call `baseline.get`. State integrity failure routes to `ultra-doctor`. When no
20
+ change is active, a missing, incomplete, or stale baseline routes to `ultra-init`.
21
+ An urgent or already active bounded change may proceed with that condition recorded
22
+ as a warning. `change.converge` requires an approved `ready` baseline; repository
23
+ revision and tracked-spec drift created by the change are reconciled at archive.
24
+ 2. Call `change.list` and `change.breadcrumb`.
25
+ - Resume the single change that matches the requested outcome.
26
+ - Require an explicit id when several changes could match.
27
+ - Create a new change only when no existing packet represents the same outcome.
28
+ 3. Capture the observable outcome, acceptance, non-goals, affected public seam,
29
+ documentation impact, and unresolved decisions.
30
+ 4. Classify the change as `quick`, `standard`, `major`, or `incident`. Ask only for a
31
+ material product, risk, or recovery decision that repository evidence cannot answer.
32
+ 5. Call `change.create` with a stable kebab-case id, or `change.update` when resuming.
33
+ 6. Write the minimum artifact set required by the classification:
34
+
35
+ ```text
36
+ .ultra/changes/active/<change-id>/
37
+ intent.md
38
+ delta/ # standard and major
39
+ plan.md # standard and major
40
+ diagnosis.md # incident
41
+ context-manifest.json # generated projection
42
+ spec-learning.json # generated projection
43
+ verification.md # generated projection
44
+ ```
45
+
46
+ Delta files describe differences from the baseline, not a second copy of it.
47
+ Incident diagnosis records the symptom, earliest bad state, falsifiable
48
+ hypotheses, evidence, root cause, and recovery boundary.
49
+ 7. Create the smallest executable vertical slice with `task.create`. Each task needs
50
+ one outcome, bounded ownership, dependencies, a live public seam, an exact
51
+ verification command, and documentation impact.
52
+ 8. Compile `change.context` for the next role and gate. Include only required
53
+ references and the task execution contract. Missing required references, digest or
54
+ HEAD drift, an absent public seam or verification command, and unknown
55
+ documentation impact are blockers. File count, token estimate, and context-share
56
+ thresholds are advisory warnings: narrow reads or split the slice when useful, but
57
+ never raise a threshold merely to make the warning disappear or refuse necessary
58
+ incident context.
59
+ 9. Call `change.breadcrumb` and return its single next action.
60
+
61
+ ## Specification learning
62
+
63
+ When implementation uncovers a stable requirement, invariant, or public behavior
64
+ missing from the baseline, call `change.learning_propose` with evidence and a target
65
+ document. The proposal does not edit the baseline. It must be approved or rejected,
66
+ and an approved item is marked applied only after the target document is updated and
67
+ verified.
68
+
69
+ ## Completion gate
70
+
71
+ Do not claim alignment while a material decision is unresolved, documentation impact
72
+ is unknown, context is stale, or the next task is not executable. `change.converge`
73
+ also requires a `ready` baseline, so incomplete adoption must be resolved before
74
+ convergence. Normal HEAD or tracked-spec drift caused by the active change is not a
75
+ convergence blocker. Declare every baseline update at archive; archive fails and rolls
76
+ back when revision or digest health remains stale after reconciliation.
@@ -1,111 +1,83 @@
1
1
  ---
2
2
  name: ultra-deliver
3
- description: "Converge an implementation, approved specification learning, independent review axes, and release evidence into one recoverable baseline."
4
- user-invocable: true
5
- runtime: all
6
- mcp_tools_required:
7
- - change.list
8
- - change.get
9
- - change.context
10
- - change.breadcrumb
11
- - change.learning_resolve
12
- - change.converge
13
- - change.archive
14
- cli_fallback: "direct user interaction"
3
+ description: Converge verified implementation, specification learning, review evidence, and release artifacts into a recoverable baseline. Use when an initial baseline or active change has current passing evidence and is ready to archive or release.
15
4
  ---
16
5
 
17
- # ultra-deliver — Converge, Archive, Release
6
+ # Converge and deliver
18
7
 
19
- Deliver the current baseline or one continuous-change packet. Change lifecycle writes
20
- use MCP only; `.ultra/test-report.json`, review sessions, and delivery reports are
21
- evidence artifacts.
8
+ Deliver one baseline or continuous change. Change lifecycle writes use MCP; test,
9
+ review, and delivery reports are evidence artifacts.
22
10
 
23
- ## 1. Bind the delivery
11
+ ## Bind current evidence
24
12
 
25
- 1. Call `change.list` for active, blocked, and ready changes.
26
- 2. Bind exactly one relevant change; require an id when ambiguous. Initial baseline
27
- delivery may use `change_id: null`.
28
- 3. Call `change.breadcrumb`. A stale/blocked context or incomplete linked task blocks.
29
- 4. Verify `.ultra/test-report.json` exists, passed, matches the change, and records the
30
- current full HEAD plus at least one public seam.
31
- 5. Verify the latest review session matches the same HEAD and has passing independent
32
- `spec_fidelity` and `engineering_standards` axes.
13
+ 1. Call `baseline.get`, then `change.list`. Bind exactly one relevant change, or the
14
+ current draft/adopting baseline when this is the initial delivery.
15
+ 2. Call `change.breadcrumb`. Context-size warnings are advisory, but delivery blocks
16
+ on incomplete baseline adoption, stale execution context, incomplete linked tasks,
17
+ or unresolved readiness. HEAD and tracked-spec drift caused by the current change
18
+ remain visible warnings until archive reconciliation.
19
+ 3. Require a passing test report for the current full HEAD and at least one declared
20
+ public seam.
21
+ 4. Require current independent `spec_fidelity` and `engineering_standards` review
22
+ verdicts. Evidence from another checkout, commit, task set, or change is invalid.
33
23
 
34
- Do not reuse evidence from another checkout, commit, task set, or change.
24
+ ## Reconcile the baseline
35
25
 
36
- ## 2. Reconcile specification learning
26
+ Call `change.get` for authoritative learning candidates.
37
27
 
38
- Call `change.get` for authoritative `learning_candidates`; use the packet's
39
- `spec-learning.json` only as the inspectable projection.
28
+ - Resolve every proposed item as approved or rejected.
29
+ - Apply each approved item to its declared baseline target, verify the edit, then mark
30
+ it applied.
31
+ - Preserve rejection reasons as decision evidence.
32
+ - Confirm previously applied items remain represented in the target document.
40
33
 
41
- - `proposed`: require approve or reject through `change.learning_resolve`.
42
- - `approved`: update the declared baseline target, verify the edit, then mark `apply`.
43
- - `rejected`: preserve the reason as decision evidence.
44
- - `applied`: verify the target still contains the accepted behavior.
34
+ Reconcile accepted delta content and documentation impact into baseline documents.
35
+ Record updated paths or a specific no-change reason. Unknown documentation impact,
36
+ unresolved placeholders, and behavior that exists only in the delta block convergence.
45
37
 
46
- Any proposed or approved candidate blocks convergence. This is the mandatory path that
47
- keeps baseline specs alive after daily changes; it is not cross-session memory.
38
+ For an initial baseline without a change, call `baseline.record`, obtain explicit owner
39
+ approval, and call `baseline.converge`. Do not simulate initial delivery through a null
40
+ change record.
48
41
 
49
- Reconcile accepted `delta/` content and declared documentation impact into baseline
50
- documents. Record `baseline_updates`, or a specific no-change reason. No unresolved
51
- placeholder, unknown docs impact, or delivered-only-in-delta behavior may remain.
42
+ ## Verify the release candidate
52
43
 
53
- ## 3. Verify the release candidate
44
+ Use a clean, reviewed release commit. Show any remaining diff and obtain explicit
45
+ authorization before staging or committing. Never stage unrelated user changes.
54
46
 
55
- Require a clean, reviewed release commit. If changes remain, show the diff and obtain
56
- explicit approval before committing. Never auto-stage unrelated user changes.
47
+ Run the exact repository commands needed for focused regression, relevant full tests,
48
+ static checks, production build, package/install/doctor smoke when distributed, the
49
+ public seam, and rollback or recovery sanity. Any post-verification edit invalidates
50
+ the affected evidence.
57
51
 
58
- Run exact project commands for:
52
+ Compile final change context at the release commit with the convergence gate. It must
53
+ be ready before calling `change.converge`.
59
54
 
60
- 1. focused regression/acceptance feedback loop;
61
- 2. full relevant tests;
62
- 3. static checks and production build;
63
- 4. package/install/doctor smoke where the product is distributed;
64
- 5. public-seam acceptance and rollback/recovery sanity.
55
+ ## Converge and archive
65
56
 
66
- Record commands, exit results, and current HEAD. Any post-test edit invalidates the
67
- test and review gates.
57
+ Submit structured evidence for the reviewed diff and seam, test signals, baseline and
58
+ delta, documentation, both independent review axes, and incident diagnosis when
59
+ applicable. Do not collapse review axes or replace exact signal fields with prose.
68
60
 
69
- ## 4. Compile final role context
61
+ Resolve named blockers, rerun invalidated gates, then call `change.archive` with the
62
+ summary and baseline updates. Archive reconciliation refreshes the authoritative
63
+ baseline revision and digests. The archive transaction rechecks baseline health and
64
+ rolls back the state row, artifacts, and reconciliation events if any tracked digest
65
+ or repository revision remains stale. Verify the result with `baseline.get` before
66
+ release.
70
67
 
71
- Call `change.context` at the release commit with `role=review`, `gate=convergence`,
72
- current required refs/digests, the public seam, exact verification command, and the
73
- single next action `Archive the converged change`. Readiness must be `ready`.
68
+ ## Optional release
74
69
 
75
- ## 5. Converge
70
+ Only when release authorization is in scope:
76
71
 
77
- Call `change.converge` with evidence rows for:
78
-
79
- - `diff`: reviewed release diff and public seam;
80
- - `tests`: exact signal object (`command`, expected/observed red, observed green,
81
- deterministic, duration when known) and seam;
82
- - `spec`: baseline/delta and applied learning evidence;
83
- - `docs`: updated paths or explicit non-applicability;
84
- - `review`, `axis=spec_fidelity`;
85
- - `review`, `axis=engineering_standards`;
86
- - `diagnosis` for incidents.
87
-
88
- Do not collapse the two review axes or substitute prose for the signal fields. If
89
- convergence returns blockers, fix the named source and rerun the invalidated gates.
90
-
91
- ## 6. Archive and release
92
-
93
- After `ready=true`, call `change.archive` with summary and `baseline_updates` (or the
94
- validated no-change reason). Then:
95
-
96
- 1. determine the semantic version from user-visible compatibility;
72
+ 1. determine the semantic version from compatibility impact;
97
73
  2. update version and changelog;
98
- 3. rerun release verification if version files changed;
99
- 4. create a non-force commit/tag and push only with explicit release authorization;
100
- 5. publish the package/release through the repository's authenticated workflow;
101
- 6. verify the remote tag/release and registry version independently.
102
-
103
- Write `.ultra/delivery-report.json` with change id, archived status, commit, version,
104
- commands, package/release identifiers, baseline updates, rollback notes, and timestamp.
74
+ 3. rerun checks invalidated by version changes;
75
+ 4. create a non-force commit and tag;
76
+ 5. push and publish through the repository's authenticated workflow;
77
+ 6. independently verify the remote commit, tag, release, and registry version.
105
78
 
106
- ## Completion gate
79
+ Write the delivery report with the change id, archive status, commit, version, exact
80
+ commands, release identifiers, baseline updates, rollback notes, and timestamp.
107
81
 
108
- Delivery is complete only when the change is archived, local and remote commit/tag
109
- agree, registry/release verification is current, and the worktree contains no
110
- unexplained scope. Report the outcome first, exact evidence next, and residual risks
111
- last. Never say “published” based only on a local version bump.
82
+ Delivery is complete only when local and remote evidence agree and the worktree has no
83
+ unexplained scope. A local version bump is not publication evidence.
@@ -1,120 +1,61 @@
1
1
  ---
2
2
  name: ultra-dev
3
- description: "Execute one fresh-context vertical slice through a public seam with strict red-green evidence, bounded recovery, and specification learning."
4
- user-invocable: true
5
- runtime: all
6
- mcp_tools_required:
7
- - task.update
8
- - task.get
9
- - task.list
10
- - change.get
11
- - change.context
12
- - change.breadcrumb
13
- - change.learning_propose
3
+ description: Execute one authoritative Ultra task through a bounded fresh context, a red-green feedback loop, live-path verification, and review. Use when a dependency-ready planned slice is ready for implementation.
14
4
  ---
15
5
 
16
- # ultra-dev — One Slice, One Feedback Loop
6
+ # Execute one vertical slice
17
7
 
18
- Drive one task from `pending` to `completed`. Task status lives in
19
- `.ultra/state.db`; generated task JSON and context frontmatter are read-only.
8
+ Drive one task from `pending` to `completed` without widening its contract silently.
20
9
 
21
10
  ## Authority and recovery
22
11
 
23
- If `task.list`, `task.get`, or `task.update` fails, stop. Never write raw SQLite,
24
- `.ultra/tasks/tasks.json`, or projected status fields. On
25
- `LEGACY_STATE_MIGRATION_REQUIRED`, use the documented migration command before work.
12
+ Task state changes use `task.update`. Never write raw SQLite, generated task JSON, or
13
+ projected status fields. If task MCP access fails, stop and route state health to
14
+ `ultra-doctor`.
26
15
 
27
- At entry, read `change.breadcrumb` when a change is active. A blocked or stale
28
- breadcrumb is an implementation blocker, not an advisory warning.
16
+ Read `change.breadcrumb` when a change is active. Stale context, blocked readiness,
17
+ unknown documentation impact, or a HEAD mismatch blocks implementation.
18
+ Baseline-adoption and context-size warnings do not block an active slice. Address
19
+ them when practical without dropping required evidence or arbitrarily changing a
20
+ threshold. Approved baseline availability is enforced at convergence; revision and
21
+ tracked-spec health are reconciled and verified at archive.
29
22
 
30
- `.ultra/workflow-state.json` is a compact recovery checkpoint only. Record command,
31
- task, branch, current step, status, and timestamp; do not copy prompts, codebase
32
- summaries, or provider memory into it.
33
-
34
- ## 1. Select and compile the slice
23
+ ## Workflow
35
24
 
36
25
  1. Select the requested task, otherwise the first dependency-ready pending task.
37
- 2. Call `task.get`; verify dependencies, ownership, acceptance, public seam, and exact
38
- verification command.
39
- 3. If linked to a change, call `change.get`, then compile `change.context` with:
40
- `role=implement`, `gate=implementation`, the smallest required references, and the
41
- task's execution contract.
42
- 4. Stop on missing/stale references, budget overflow, unknown documentation impact,
43
- or a HEAD mismatch. Do not compensate by loading the whole repository.
44
- 5. Mark the task `in_progress` with `task.update` and checkpoint the step.
45
-
46
- The default slice is a `tracer_bullet`. An `expand_contract` must already be approved;
47
- implementation does not widen its own contract silently.
48
-
49
- ## 2. Establish red
50
-
51
- Before production logic changes:
52
-
53
- 1. Reproduce the smallest observable symptom at the declared public seam.
54
- 2. Add or identify the regression/contract test.
55
- 3. Run the exact command and record:
56
- - command;
57
- - expected failure;
58
- - observed red result;
59
- - deterministic/non-deterministic classification;
60
- - duration when useful.
61
-
62
- For a new feature, red means an assertion expressing missing behavior. For a refactor,
63
- establish a green characterization baseline first. Documentation/config-only tasks may
64
- use a structural validator instead of a failing test, but must state why.
65
-
66
- If red cannot be observed, stop and correct the task contract; do not implement against
67
- an unproven hypothesis.
68
-
69
- ## 3. Implement the minimum complete path
70
-
71
- - Trace entry point → domain rule → side effect → public seam.
72
- - Search for existing utilities and dependencies before adding helpers.
73
- - Keep IO at boundaries and domain behavior testable.
74
- - Include required validation, errors, observability, recovery, and documentation.
75
- - Preserve unrelated dirty worktree changes and stay within allowed paths.
76
- - Verify each meaningful increment through the same feedback loop.
77
-
78
- If implementation reveals a stable invariant or public behavior absent from the
79
- baseline, call `change.learning_propose` with its evidence and target document. Do not
80
- edit the baseline silently and do not store the discovery as Ultra memory.
81
-
82
- ## 4. Establish green and inspect reachability
83
-
84
- Run, in order:
85
-
86
- 1. the exact red command until the observed failure becomes green;
87
- 2. adjacent focused tests;
88
- 3. type check/lint/build proportionate to the change;
89
- 4. the live public-seam acceptance path;
90
- 5. final diff and worktree scope inspection.
91
-
92
- Record exact commands and zero-failure results. “Compiled” or “unit tests pass” is not
93
- enough when the new module is not connected to a consumer.
94
-
95
- ## 5. Review gate
96
-
97
- Checkpoint `status=pre_review`, then invoke `/ultra-review all`. The review must produce
98
- independent `spec_fidelity` and `engineering_standards` verdicts. Fix all P0/P1 issues,
99
- rerun affected tests, and recheck until both axes pass. The primary host owns final
100
- verification; review workers never mutate durable Ultra state.
101
-
102
- ## 6. Complete the task
103
-
104
- First call `task.update` with `status=completed` and completion commit/evidence
105
- supported by the task contract. Then, for a linked change, recompile
106
- `change.context` at the final HEAD with:
107
-
108
- - `role=implement`, `gate=verification`;
109
- - exact required references and current digests;
110
- - the public seam and verification command;
111
- - a single next action, normally `Run ultra-test for this change`.
112
-
113
- This ordering ensures the snapshot records the completed task state. Clear the active
114
- workflow checkpoint, call `change.breadcrumb`, and report exactly one next action.
26
+ 2. Call `task.get` and verify acceptance, dependencies, ownership, public seam, and
27
+ exact verification command.
28
+ 3. For a linked change, call `change.get`, then compile `change.context` for the
29
+ implementation role and gate with the smallest required references.
30
+ 4. Mark the task `in_progress` only after the context is ready.
31
+ 5. Establish the feedback-loop baseline before changing production logic:
32
+ - reproduce the smallest observable symptom at the declared seam;
33
+ - add or identify the contract or regression test;
34
+ - record the exact command, expected signal, and observed result.
35
+
36
+ A feature starts with an assertion for missing behavior. A refactor starts from a
37
+ green characterization baseline. Documentation or configuration work may use a
38
+ structural validator when no logic test applies.
39
+ 6. Implement the minimum complete path from entry point to public seam. Reuse existing
40
+ utilities, keep IO at boundaries, include required errors and recovery, and preserve
41
+ unrelated worktree changes.
42
+ 7. If the work reveals a stable requirement or public behavior absent from the
43
+ baseline, call `change.learning_propose`. Do not edit the baseline silently or store
44
+ the discovery as private Ultra memory.
45
+ 8. Verify in this order:
46
+ - the original feedback-loop command;
47
+ - adjacent focused tests;
48
+ - proportionate static checks and build;
49
+ - the live public-seam acceptance path;
50
+ - final diff and worktree scope.
51
+ 9. Run `ultra-review` against the current diff. Fix blocking findings, rerun invalidated
52
+ checks, and require independent specification-fidelity and engineering verdicts.
53
+ 10. Call `task.update` with `status=completed` and exact evidence. For a linked change,
54
+ recompile the verification context at the final HEAD, then call
55
+ `change.breadcrumb`.
115
56
 
116
57
  ## Completion evidence
117
58
 
118
- Report task/change id, changed paths, red signal, green commands, public-seam result,
119
- review session, spec-learning candidates, and remaining blockers. If any item is
120
- missing, leave the task in progress or blocked rather than claiming completion.
59
+ Report the task and change ids, changed paths, baseline signal, passing commands,
60
+ public-seam result, review session, specification-learning candidates, and one next
61
+ action. Leave the task in progress or blocked when required evidence is missing.