ultra-builder-pro-cli 0.25.1 → 0.26.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 (241) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +87 -0
  2. package/.ultra-template/decisions/.gitkeep +1 -0
  3. package/.ultra-template/evidence/.gitkeep +1 -0
  4. package/.ultra-template/north-star.md +46 -0
  5. package/.ultra-template/research/.gitkeep +1 -0
  6. package/.ultra-template/specs/discovery.md +2 -2
  7. package/.ultra-template/tasks.json +3 -0
  8. package/.ultra-template/test-report.json +27 -0
  9. package/CHANGELOG.md +40 -0
  10. package/README.md +217 -579
  11. package/adapters/_shared/delegate-profiles/kimi-read-only.md +15 -0
  12. package/adapters/_shared/delegate-profiles/kimi-write.md +17 -0
  13. package/adapters/_shared/file-ops.cjs +76 -2
  14. package/adapters/_shared/host-profile.cjs +97 -0
  15. package/adapters/_shared/plugin-core.cjs +204 -0
  16. package/adapters/_shared/runtime-assets.cjs +31 -96
  17. package/adapters/claude.js +92 -291
  18. package/adapters/codex.js +309 -842
  19. package/adapters/grok.js +143 -1469
  20. package/adapters/kimi.js +124 -1053
  21. package/adapters/opencode.js +230 -742
  22. package/bin/delegate-worker.cjs +323 -0
  23. package/bin/delegate.cjs +456 -0
  24. package/bin/install.js +38 -11
  25. package/docs/ARCHITECTURE.md +122 -216
  26. package/docs/ARTIFACT-AUTHORITY.md +90 -268
  27. package/docs/DECISIONS.md +75 -87
  28. package/docs/PHILOSOPHY.md +177 -0
  29. package/docs/PLUGIN-ISOLATION-CONTRACT.md +62 -39
  30. package/docs/RUNTIME-COMPAT-MATRIX.md +99 -156
  31. package/docs/SKILL-AUTHORING.md +94 -73
  32. package/docs/WORKFLOW-LIFECYCLE.md +93 -189
  33. package/hooks/README.md +17 -37
  34. package/hooks/_common.py +113 -0
  35. package/hooks/adapters/codex.py +9 -16
  36. package/hooks/adapters/grok.py +5 -5
  37. package/hooks/adapters/kimi.py +8 -14
  38. package/hooks/block_dangerous_commands.py +95 -0
  39. package/hooks/compact_context.py +65 -0
  40. package/hooks/mid_workflow_recall.py +25 -0
  41. package/hooks/post_edit_guard.py +105 -0
  42. package/hooks/session_context.py +30 -0
  43. package/package.json +17 -52
  44. package/skills/ultra-change/SKILL.md +97 -50
  45. package/skills/ultra-change/references/change-contract.md +40 -1
  46. package/skills/ultra-delegate/SKILL.md +82 -0
  47. package/skills/ultra-delegate/references/delegation-contract.md +51 -0
  48. package/skills/ultra-delegate/scripts/delegate_wait.py +86 -0
  49. package/skills/ultra-deliver/SKILL.md +61 -42
  50. package/skills/ultra-deliver/references/baseline-reconciliation.md +39 -20
  51. package/skills/ultra-dev/SKILL.md +96 -62
  52. package/skills/ultra-dev/references/debugging.md +22 -0
  53. package/skills/ultra-domain-modeling/SKILL.md +79 -0
  54. package/skills/ultra-grilling/SKILL.md +79 -0
  55. package/skills/ultra-init/SKILL.md +94 -37
  56. package/skills/ultra-init/references/brownfield-adoption.md +33 -83
  57. package/skills/ultra-init/scripts/init_project.cjs +84 -0
  58. package/skills/ultra-plan/SKILL.md +88 -68
  59. package/skills/ultra-research/SKILL.md +62 -48
  60. package/skills/ultra-research/references/00-problem-validation.md +5 -5
  61. package/skills/ultra-research/references/01-opportunity-discovery.md +3 -3
  62. package/skills/ultra-research/references/02-market-assessment.md +5 -4
  63. package/skills/ultra-research/references/03-competitive-landscape.md +3 -3
  64. package/skills/ultra-research/references/04-product-strategy.md +3 -3
  65. package/skills/ultra-research/references/05-assumptions-validation.md +5 -5
  66. package/skills/ultra-research/references/10-user-personas.md +3 -2
  67. package/skills/ultra-research/references/11-user-scenarios.md +3 -3
  68. package/skills/ultra-research/references/20-user-stories.md +4 -3
  69. package/skills/ultra-research/references/21-features-scope.md +3 -2
  70. package/skills/ultra-research/references/22-success-metrics.md +3 -3
  71. package/skills/ultra-research/references/30-architecture-context.md +3 -3
  72. package/skills/ultra-research/references/31-solution-strategy.md +3 -3
  73. package/skills/ultra-research/references/32-building-blocks.md +3 -3
  74. package/skills/ultra-research/references/40-deployment.md +3 -3
  75. package/skills/ultra-research/references/41-quality-risks.md +3 -3
  76. package/skills/ultra-research/references/99-synthesis.md +7 -7
  77. package/skills/ultra-review/SKILL.md +59 -32
  78. package/skills/ultra-review/references/code.md +17 -0
  79. package/skills/ultra-review/references/comments.md +12 -0
  80. package/skills/ultra-review/references/design.md +12 -0
  81. package/skills/ultra-review/references/errors.md +13 -0
  82. package/skills/ultra-review/references/spec.md +13 -0
  83. package/skills/ultra-review/references/tests.md +12 -0
  84. package/skills/ultra-review/references/worker-packet.md +40 -0
  85. package/skills/ultra-review/scripts/review_wait.py +26 -15
  86. package/skills/ultra-status/SKILL.md +61 -36
  87. package/skills/ultra-tdd/SKILL.md +81 -0
  88. package/skills/ultra-tdd/references/templates/README.md +20 -0
  89. package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +79 -0
  90. package/skills/ultra-tdd/references/templates/persistence-real.ts +78 -0
  91. package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +78 -0
  92. package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +73 -0
  93. package/skills/ultra-tdd/references/templates/vertical-slice.ts +66 -0
  94. package/skills/ultra-tdd/references/test-execution.md +18 -0
  95. package/skills/ultra-test/SKILL.md +70 -30
  96. package/skills/ultra-test/references/export-syntax.md +18 -0
  97. package/skills/ultra-test/scripts/worktree_digest.cjs +54 -0
  98. package/skills/ultra-think/SKILL.md +49 -27
  99. package/skills/ultra-think/references/autonomy-boundary.md +48 -0
  100. package/skills/ultra-think/references/interaction-boundary.md +18 -33
  101. package/.ultra-template/docs/research/README.md +0 -55
  102. package/.ultra-template/reports/templates/delivery-report.json +0 -17
  103. package/.ultra-template/reports/templates/test-report.json +0 -18
  104. package/.ultra-template/tasks/tasks.json +0 -15
  105. package/.ultra-template/templates/task-context.md +0 -19
  106. package/adapters/_shared/codex-assets.cjs +0 -725
  107. package/adapters/_shared/codex-ultra-tools-entry.cjs +0 -11
  108. package/adapters/_shared/interaction-contract.cjs +0 -129
  109. package/adapters/_shared/path-rewrite.cjs +0 -79
  110. package/adapters/_shared/runtime-native.cjs +0 -132
  111. package/adapters/_shared/settings-merge.cjs +0 -76
  112. package/agents/code-reviewer.md +0 -42
  113. package/agents/debugger.md +0 -40
  114. package/agents/review-code.md +0 -49
  115. package/agents/review-comments.md +0 -38
  116. package/agents/review-coordinator.md +0 -56
  117. package/agents/review-design.md +0 -40
  118. package/agents/review-errors.md +0 -43
  119. package/agents/review-spec.md +0 -39
  120. package/agents/review-tests.md +0 -40
  121. package/agents/tdd-runner.md +0 -38
  122. package/bin/orchestrator.js +0 -383
  123. package/commands/ultra-change.md +0 -10
  124. package/commands/ultra-deliver.md +0 -10
  125. package/commands/ultra-dev.md +0 -10
  126. package/commands/ultra-doctor.md +0 -10
  127. package/commands/ultra-init.md +0 -10
  128. package/commands/ultra-plan.md +0 -10
  129. package/commands/ultra-research.md +0 -10
  130. package/commands/ultra-review.md +0 -10
  131. package/commands/ultra-status.md +0 -10
  132. package/commands/ultra-test.md +0 -10
  133. package/commands/ultra-think.md +0 -10
  134. package/docs/AGENT-CONTEXT.md +0 -191
  135. package/docs/COMMIT-HASH-BACKFILL.md +0 -51
  136. package/docs/LEGACY-CLI-CROSSWALK.md +0 -175
  137. package/docs/ROADMAP.md +0 -101
  138. package/docs/STATE-DB-ACCESS-POLICY.md +0 -161
  139. package/hooks/active_task_context.py +0 -152
  140. package/hooks/context_envelope.py +0 -100
  141. package/hooks/health_check.py +0 -196
  142. package/hooks/pre_stop_check.py +0 -66
  143. package/hooks/runtime_paths.py +0 -396
  144. package/hooks/subagent_tracker.py +0 -88
  145. package/hooks/workflow_checkpoint.py +0 -76
  146. package/hooks/workflow_context.py +0 -48
  147. package/hooks/workflow_resume.py +0 -84
  148. package/mcp-server/hook-context.cjs +0 -38
  149. package/mcp-server/hook-event.cjs +0 -34
  150. package/mcp-server/lib/archive-journal.cjs +0 -1119
  151. package/mcp-server/lib/archive-mutation-worker.py +0 -365
  152. package/mcp-server/lib/artifact-registry.cjs +0 -1232
  153. package/mcp-server/lib/baseline-workflow.cjs +0 -1193
  154. package/mcp-server/lib/canonical-json.cjs +0 -19
  155. package/mcp-server/lib/change-authority.cjs +0 -26
  156. package/mcp-server/lib/change-packet.cjs +0 -790
  157. package/mcp-server/lib/change-workflow.cjs +0 -65
  158. package/mcp-server/lib/context-envelope.cjs +0 -581
  159. package/mcp-server/lib/context-paths.cjs +0 -142
  160. package/mcp-server/lib/decision-records.cjs +0 -423
  161. package/mcp-server/lib/delivery-transaction.cjs +0 -471
  162. package/mcp-server/lib/doctor-backup-worker.cjs +0 -328
  163. package/mcp-server/lib/doctor.cjs +0 -627
  164. package/mcp-server/lib/git-bootstrap.cjs +0 -651
  165. package/mcp-server/lib/init-project.cjs +0 -1021
  166. package/mcp-server/lib/kernel-change-workflow.cjs +0 -2029
  167. package/mcp-server/lib/legacy-change-workflow.cjs +0 -3032
  168. package/mcp-server/lib/managed-file-write.cjs +0 -172
  169. package/mcp-server/lib/plan-checkpoint.cjs +0 -177
  170. package/mcp-server/lib/plan-publication-worker.cjs +0 -830
  171. package/mcp-server/lib/plan-store.cjs +0 -794
  172. package/mcp-server/lib/prd-parser.cjs +0 -83
  173. package/mcp-server/lib/pricing.cjs +0 -44
  174. package/mcp-server/lib/project-context.cjs +0 -178
  175. package/mcp-server/lib/projector.cjs +0 -386
  176. package/mcp-server/lib/provider-refs.cjs +0 -42
  177. package/mcp-server/lib/runtime-paths.cjs +0 -1714
  178. package/mcp-server/lib/runtime-state.cjs +0 -222
  179. package/mcp-server/lib/safe-project-file.cjs +0 -385
  180. package/mcp-server/lib/stage-checkpoints.cjs +0 -463
  181. package/mcp-server/lib/state-authority.cjs +0 -95
  182. package/mcp-server/lib/state-db.cjs +0 -1580
  183. package/mcp-server/lib/state-ops.cjs +0 -1428
  184. package/mcp-server/lib/task-contract.cjs +0 -404
  185. package/mcp-server/lib/task-expander.cjs +0 -105
  186. package/mcp-server/lib/task-ledger.cjs +0 -1964
  187. package/mcp-server/lib/telemetry.cjs +0 -85
  188. package/mcp-server/lib/topo.cjs +0 -131
  189. package/mcp-server/lib/ultra-facade.cjs +0 -2684
  190. package/mcp-server/lib/worker-packet.cjs +0 -358
  191. package/mcp-server/server.cjs +0 -437
  192. package/orchestrator/auto-merge.cjs +0 -128
  193. package/orchestrator/daemon.cjs +0 -264
  194. package/orchestrator/dispatch-rules.cjs +0 -78
  195. package/orchestrator/parallel-orchestrator.cjs +0 -903
  196. package/orchestrator/planner/plan-builder.cjs +0 -125
  197. package/orchestrator/recovery.cjs +0 -188
  198. package/orchestrator/session-close-journal-worker.cjs +0 -5
  199. package/orchestrator/session-close-journal.cjs +0 -1014
  200. package/orchestrator/session-runner.cjs +0 -1153
  201. package/orchestrator/worktree-manager.cjs +0 -282
  202. package/settings.json +0 -7
  203. package/skills/cc-collab/SKILL.md +0 -42
  204. package/skills/code-review-expert/SKILL.md +0 -43
  205. package/skills/code-review-expert/references/correctness-reliability.md +0 -30
  206. package/skills/code-review-expert/references/design-boundaries.md +0 -26
  207. package/skills/code-review-expert/references/removal-plan.md +0 -24
  208. package/skills/codex-collab/SKILL.md +0 -49
  209. package/skills/codex-collab/evals/evals.json +0 -35
  210. package/skills/integration-rules/SKILL.md +0 -32
  211. package/skills/security-rules/SKILL.md +0 -38
  212. package/skills/testing-rules/SKILL.md +0 -32
  213. package/skills/ultra-doctor/SKILL.md +0 -41
  214. package/skills/ultra-plan/references/semantic-preflight.md +0 -20
  215. package/skills/ultra-verify/SKILL.md +0 -46
  216. package/skills/ultra-verify/evals/evals.json +0 -46
  217. package/skills/ultra-verify/references/cross-verify-modes.md +0 -28
  218. package/skills/ultra-verify/references/evidence-status.md +0 -21
  219. package/skills/ultra-verify/scripts/verify_wait.py +0 -94
  220. package/spec/cli-protocol.md +0 -102
  221. package/spec/mcp-tools.yaml +0 -312
  222. package/spec/schemas/baseline-reconciliation.v1.schema.json +0 -73
  223. package/spec/schemas/change-delta.v1.schema.json +0 -153
  224. package/spec/schemas/command-manifest.schema.json +0 -29
  225. package/spec/schemas/context-file.v4.5.schema.json +0 -54
  226. package/spec/schemas/delivery-report.v1.schema.json +0 -66
  227. package/spec/schemas/documentation-reconciliation.v1.schema.json +0 -106
  228. package/spec/schemas/mcp-tools.schema.json +0 -136
  229. package/spec/schemas/skill-manifest.schema.json +0 -24
  230. package/spec/schemas/state-db.sql +0 -641
  231. package/spec/schemas/task-ledger.v2.schema.json +0 -296
  232. package/spec/schemas/tasks.v4.5.schema.json +0 -96
  233. package/spec/schemas/test-report.v1.schema.json +0 -225
  234. package/ultra-tools/cli.cjs +0 -129
  235. package/ultra-tools/commands/db.cjs +0 -226
  236. package/ultra-tools/commands/legacy-memory.cjs +0 -159
  237. package/ultra-tools/commands/migrate.cjs +0 -1386
  238. package/ultra-tools/commands/session.cjs +0 -213
  239. package/ultra-tools/commands/status.cjs +0 -559
  240. package/ultra-tools/commands/system.cjs +0 -498
  241. package/ultra-tools/commands/task.cjs +0 -105
@@ -1,46 +1,65 @@
1
1
  ---
2
2
  name: ultra-deliver
3
- description: Reconcile and archive an explicitly accepted Ultra Change with recoverable local evidence. Use when the caller is ready to make a local delivery handoff with current managed evidence and an explicit rationale for any omitted capability.
3
+ description: Reconcile one completed Change, run aggregate review and refactoring, refresh release documentation, and archive the local workflow record. Use when the task ledger is complete and the owner wants a delivery handoff or separately authorized release effects.
4
4
  ---
5
5
 
6
- # Converge and archive local authority
7
-
8
- Delivery closes local Ultra authority. It never grants commit, push, tag, registry
9
- publication, deployment, or another external effect.
10
-
11
- ## Prepare the packet
12
-
13
- 1. Call `ultra.context { stage: deliver, scope: { change_id }, detail: full }`.
14
- 2. Import a newer team checkpoint with `ultra.sync`; stop on a real conflict.
15
- 3. Inspect current task outcomes, tests, both review axes, accepted decisions, typed
16
- delta, documentation reconciliation, and checkout evidence. Decide whether the
17
- actual Change is sufficiently complete; explicitly record any omitted stage and its
18
- evidence-based rationale instead of inventing a fixed recipe.
19
- 4. Resolve every specification-learning candidate. Keep updates inside the Change
20
- overlay until archive.
21
- 5. Write and register documentation reconciliation and an
22
- `ultra-delivery-report-v1` report. The report binds Change, baseline, HEAD,
23
- worktree/context digests, local checks, rollback guidance, and timestamp; it contains
24
- no release decision.
25
-
26
- Use one typed `ultra.record` batch for `artifact / bind`, any normalized
27
- `decision / accept`, and bounded `event / append` facts.
28
-
29
- ## Archive once
30
-
31
- Call `ultra.archive` once with the Change id, stable idempotency key, archive summary,
32
- reconciliation fields, delivery evidence steps, explicit omissions, and report output.
33
- The model's report is the semantic handoff. MCP validates its current registered
34
- authority, paths, digests, reconciliation structure, and idempotency; applies the
35
- overlay and archive through the recoverable filesystem/DB transaction; rebinds
36
- registered artifacts into a self-contained archive; and publishes the updated team
37
- checkpoint. It does not require a hard-coded Plan/Dev/Test/Review/Deliver sequence.
38
-
39
- Semantic warnings remain in the archive history but do not reject an explicit local
40
- handoff. Corruption, unsafe paths, digest/CAS conflicts, permissions, or recovery
41
- failure remain fail-closed and route to `ultra-doctor`.
42
-
43
- Verify the archived packet, baseline, checkpoint, and rollback state. Handle any
44
- separately authorized Git or release effect only after local delivery and report it as
45
- external evidence, not Ultra delivery authority. Do not invoke another capability
46
- automatically.
6
+ # Turn current evidence into a recoverable delivery handoff
7
+
8
+ Delivery closes the local Change. Commit, push, tag, publication and deployment remain
9
+ separate effects; local readiness grants none of them automatically.
10
+
11
+ ## Before you start
12
+
13
+ 1. Read `.ultra/tasks.json` and each completed task's `context_file`, Completion and
14
+ closing `## Resume Note`.
15
+ 2. Read `CONTEXT.md`, relevant `.ultra/decisions/`, active Change intent and evidence.
16
+ 3. Read `.ultra/test-report.json` and current `HEAD`. If `git_commit` differs from HEAD,
17
+ label the report stale and obtain current evidence before a release recommendation.
18
+
19
+ ## Definition of done
20
+
21
+ - Actual outcome, specifications, docs, tests and aggregate review have been reconciled.
22
+ - Every omitted stage is explicitly recorded with its evidence-based rationale.
23
+ - Build and release checks have exact commands and real results.
24
+ - The Change is archived with `git mv`, and rollback remains a normal Git operation.
25
+
26
+ ## Review and refactor
27
+
28
+ Follow `../ultra-review/SKILL.md` across the aggregate Change. This is where useful
29
+ refactoring occurs: several completed slices now reveal real duplication, coupling and
30
+ deep-module boundaries. Rerun every check affected by a refactor and refresh the report
31
+ against the resulting HEAD.
32
+
33
+ ## Reconcile the handoff
34
+
35
+ 1. Compare accepted intent and task traces with delivered behavior.
36
+ 2. Apply justified specification corrections; route any REDUCTION to the owner.
37
+ 3. Update CHANGELOG and README when public behavior changed. Record bounded debt only
38
+ in the active Change `delivery.md` under `## Technical Debt`.
39
+ 4. Run the repository's build and packaging checks.
40
+ 5. Determine the version impact from the public contract and project convention.
41
+ 6. Follow `references/baseline-reconciliation.md` and write the one canonical active
42
+ Change `delivery.md` with exact checks, residual risks, omissions and rollback.
43
+
44
+ ## Archive locally
45
+
46
+ Move `.ultra/changes/active/<id>` to `.ultra/changes/archive/<id>` with `git mv` only
47
+ after local reconciliation. Do not create a second standalone delivery report: archived
48
+ `delivery.md`, test report, evidence and Git history are the handoff.
49
+
50
+ For separately authorized effects, perform and verify each independently. Ask for
51
+ authority at the point of effect: commit, then push, then tag, package publication and
52
+ deployment as applicable. A failure in one does not imply permission to attempt another.
53
+
54
+ ## When the owner decides
55
+
56
+ The owner accepts residual risk, reductions, the version, and every external effect.
57
+ Without release authority, stop after the recoverable local archive and report it.
58
+
59
+ ## References
60
+
61
+ - `../ultra-review/SKILL.md` — read before aggregate review and refactoring.
62
+ - `../ultra-think/SKILL.md` — read when version or release posture is a consequential
63
+ trade-off rather than an established repository rule.
64
+ - `../ultra-think/references/autonomy-boundary.md` — read before scope or evidence shrinks.
65
+ - `references/baseline-reconciliation.md` — exact `delivery.md` reconciliation contract.
@@ -1,20 +1,39 @@
1
- # Baseline reconciliation manifest
2
-
3
- Write a JSON file inside `.ultra/changes/active/<change-id>/` with
4
- `$schema: "ultra-baseline-reconciliation-v1"`.
5
-
6
- Bind `change_id`, `baseline_id`, and `baseline_updates` exactly to the archive request.
7
- Include:
8
-
9
- - `semantic_changes`: stable id, `add` or `update`, project-relative `source_ref` using
10
- `path#anchor`, the prior baseline digest or `null`, and the current file digest;
11
- - `resolved_gap_ids`: existing baseline gaps closed by this delivery;
12
- - `resolved_unknowns`: exact existing unknown summaries closed by this delivery;
13
- - `verification`: named checks with exact commands, `pass`, and bounded evidence;
14
- - `semantic_no_change_reason`: an evidence-backed reason when `baseline_updates` is
15
- empty.
16
-
17
- Every updated file needs a semantic change record and current anchor. The before digest
18
- must match baseline authority and the after digest must match the file. Keep the
19
- manifest with the change so archive recovery can replay the same transaction after an
20
- interrupted filesystem move.
1
+ # Delivery reconciliation contract
2
+
3
+ Write exactly one `.ultra/changes/active/<change-id>/delivery.md`. It is editable while
4
+ the Change is active and moves with the directory when archived.
5
+
6
+ ```markdown
7
+ # Delivery: <change-id>
8
+
9
+ ## Outcome Reconciliation
10
+ <accepted outcome versus observed result, with path#anchor evidence>
11
+
12
+ ## Specification and Documentation Updates
13
+ <changed files and why, or an evidence-backed no-change statement>
14
+
15
+ ## Verification
16
+ | Command | Exit | Evidence | Freshness |
17
+ |---|---:|---|---|
18
+
19
+ ## Review
20
+ <SUMMARY.json path, packet digest, verdict, and unresolved findings>
21
+
22
+ ## Technical Debt
23
+ <bounded debt, consequence, owner, and upgrade path; or None>
24
+
25
+ ## Residual Risks and Omissions
26
+ <owner disposition for every material item>
27
+
28
+ ## Recovery
29
+ <rollback or recovery procedure and verification>
30
+
31
+ ## External Effects
32
+ <commit, push, tag, publish, deploy: authorized and observed status separately>
33
+ ```
34
+
35
+ Every semantic update cites a repository-relative `path#anchor`. A reduction requires
36
+ the owner decision before the affected specification changes. Exact command evidence
37
+ must match the checkout identified by `.ultra/test-report.json`; stale results stay
38
+ visible and never become a pass. Do not create a second JSON or Markdown delivery
39
+ summary.
@@ -1,66 +1,100 @@
1
1
  ---
2
2
  name: ultra-dev
3
- description: Implement one authoritative Ultra task through a fresh-context, test-driven, review-backed live path. Use when a planned task is executable, interrupted, or ready for focused recovery.
3
+ description: Carry one planned task from a written implementation plan through red-green development to recorded evidence and a task-level review. Use when a task in the ledger is ready to execute, was interrupted partway, or has to be picked up in a fresh session or on another host.
4
4
  ---
5
5
 
6
- # Implement one task
7
-
8
- The model owns code reasoning and edits. Ultra owns the durable task contract,
9
- canonical Context Envelope, execution lease, immutable Worker Packet, evidence
10
- references, and checkpoint.
11
-
12
- ## Bind execution
13
-
14
- 1. Call `ultra.context { stage: dev, scope: { change_id, task_id }, detail: full }`.
15
- 2. Import a newer team checkpoint with `ultra.sync`; stop on a real same-record or
16
- active-session conflict.
17
- 3. Reuse a valid lease or call `ultra.session { action: acquire }`. Acquire atomically
18
- performs admission, compiles or reuses the implementation Context Envelope, mints
19
- the lease/worktree, and returns the immutable Worker Packet. A separate
20
- `action: admission` is an optional read-only preview, not a prerequisite.
21
- 4. Verify the returned packet digest, purpose, acceptance, dependencies, public seam,
22
- exact output path/schema, verification command,
23
- non-goals, recovery, and required context refs. Update the task contract before
24
- implementation when accepted intent changed.
25
-
26
- ## Implement adaptively
27
-
28
- Reproduce the failure, write a failing test, or establish a characterization signal
29
- before changing logic. Implement the smallest complete vertical slice. Ask the owner
30
- only when new evidence changes product intent, compatibility, security, material cost,
31
- external effects, or recovery.
32
-
33
- Use typed `ultra.record` entries for `task_outcome / start|block|complete|attest_commit`,
34
- `event / append`, `artifact / bind`, `decision / accept`, and corrected
35
- `task_contract / revise`. Every worker output must repeat the exact `packet_digest`;
36
- the parent registers it only after packet, output path, schema, and digest validation.
37
- Live ownership, `in_progress`, session ids, leases, worktrees, telemetry, and
38
- completion hashes remain local runtime state; durable task outcome and evidence may
39
- enter the team checkpoint.
40
-
41
- Run focused and adjacent risk-justified checks, then a task-scoped independent review.
42
- Fix blocking findings and refresh affected evidence.
43
-
44
- ## Commit one semantic checkpoint
45
-
46
- Call `ultra.checkpoint` once with `stage: dev`, the exact Change/Task scope, evidence,
47
- and stable idempotency key. It binds the exact Context Envelope and Worker Packet and
48
- reports outcome diagnostics. The model decides whether the implemented slice satisfies
49
- the Task; semantic warnings remain visible. A rejection means the declared authority,
50
- path, digest, or concurrency boundary was unsafe and leaves the draft mutable.
51
-
52
- After acceptance:
53
-
54
- 1. Record `task_outcome / complete { id, packet_digest }`; never include a patch or SHA.
55
- 2. Publish the durable completed status with `ultra.sync`.
56
- 3. Create at most one authorized local task commit containing code, semantic
57
- artifacts, and the team checkpoint.
58
- 4. Record `task_outcome / attest_commit { id, completion_commit }` with that integrated
59
- commit's full SHA. This is local mechanical proof and must not create another commit.
60
-
61
- Release the lease through `ultra.session`. Preserve a dirty or unintegrated worktree
62
- on interruption. Commit, push, tag, publish, deploy, or destructive cleanup require
63
- separate owner authority.
64
-
65
- Return changed paths, public seam, exact checks, review result, checkpoint, commit,
66
- session state, and residual risk. Do not invoke the next capability automatically.
6
+ # Take one task from plan to recorded evidence
7
+
8
+ The model owns the code reasoning and the edits. The repository owns the task
9
+ contract, the evidence, and everything needed to resume.
10
+
11
+ ## Before you start
12
+
13
+ 1. Read `.ultra/tasks.json` and pick the task; read its `context_file` end to
14
+ end, above all the closing `## Resume Note` — that line says where to pick up.
15
+ 2. Read `CONTEXT.md` for vocabulary, and the `.ultra/decisions/` entries the task
16
+ context names.
17
+ 3. Read `.ultra/north-star.md` and the task's acceptance criteria. If you cannot
18
+ state that acceptance in one sentence, you are not ready to start.
19
+
20
+ When this task starts from an observed error, failing check or unexpected behavior,
21
+ read `references/debugging.md` and establish the earliest incorrect state before editing.
22
+
23
+ ## Definition of done
24
+
25
+ - All six evidence dimensions are answered for this task, each against the
26
+ checkable rule below rather than an impression.
27
+ - `tasks.json` and the context file's header state the same status, each written
28
+ and then read back — a one-sided write breaks resume on another host.
29
+ - The context file carries a Completion entry and a rewritten Resume Note.
30
+ - A task-level review has run and its blocking findings are resolved.
31
+
32
+ ## Write the implementation plan before the code
33
+
34
+ Fill in the task context's Implementation section as prose a person can read:
35
+ which modules change, how the interfaces move, which seam the tests will use.
36
+ Confirm that, then write code. Deciding the design while typing implementation
37
+ buries the design decisions in the details.
38
+
39
+ ## Develop through red then green
40
+
41
+ Follow `../ultra-tdd/SKILL.md`, writing tests only on the seams the plan already
42
+ confirmed, one slice at a time. Do no refactoring here — `ultra-review` owns it,
43
+ because what is worth restructuring only becomes visible after several slices.
44
+
45
+ ## Answer the six evidence dimensions
46
+
47
+ Each has a rule you can check against the work rather than assert:
48
+
49
+ | Dimension | Answered when |
50
+ |---|---|
51
+ | `tests_written` | This diff changes a test file |
52
+ | `tests_passed` | The last test run exited zero and covered the files this diff touched |
53
+ | `persistence_real` | On any path that stores data, the test uses real storage or a container |
54
+ | `feature_flags_audit` | No flag this task added defaults to off |
55
+ | `vertical_slice` | One test's execution path runs from the entry point through to persistence |
56
+ | `spec_trace` | The anchor the task's `trace_to` names exists in the specification |
57
+
58
+ Record one canonical `.ultra/evidence/<task-id>/evidence.json` with
59
+ `$schema: "ultra-task-evidence-v1"`, `task_id`, `git_head`, `commands`, the six-key
60
+ `dimensions` object, `artifacts`, `limitations`, and `timestamp`. Raw logs and cited
61
+ files stay beside it; no second summary restates the same evidence. Each command has
62
+ `command`, `exit_code`, and `evidence_ref`. Each dimension has `status` (`satisfied`,
63
+ `gap`, or `not_applicable`), `evidence_refs`, and a non-empty `rationale`. Evidence is a
64
+ sensor, not a gate: a gap is reported and handed over, never used to block the work — a
65
+ gate that can be escaped by damaging the work gets escaped by damaging the work.
66
+
67
+ ## When implementation and the specification disagree
68
+
69
+ This is the one backward edge in the whole workflow. Classify before touching the
70
+ specification, and classify by outcome rather than reason: does every commitment
71
+ the specification already made still hold afterwards? If even one no longer holds
72
+ it is a REDUCTION — stop and ask the owner, however good the argument. Log the
73
+ classification in the context file's Change Log.
74
+
75
+ ## Close out
76
+
77
+ Write the status to both places and read both back. Add the Completion entry and
78
+ rewrite the Resume Note to say where the next session picks up. Then run the
79
+ task-level review through `../ultra-review/SKILL.md`, resolve blocking findings, and refresh
80
+ the evidence they touched.
81
+
82
+ Report the changed paths, the seam, the exact checks run, the review result, the
83
+ evidence gaps and the residual risk. Recommend the next capability from what the
84
+ files now say; do not invoke it.
85
+
86
+ ## When the owner decides
87
+
88
+ Any REDUCTION, and each external effect separately.
89
+ At most one authorized local task commit happens here; push, tag, publish and
90
+ deploy each need their own authorization. An interrupted task leaves its worktree
91
+ as it stands and says so in the Resume Note instead of tidying it away.
92
+
93
+ ## References
94
+
95
+ - `../ultra-tdd/SKILL.md` — read before the first test, for the seam and the mock
96
+ boundary.
97
+ - `../ultra-think/references/autonomy-boundary.md` — read the moment the
98
+ specification and the implementation disagree.
99
+ - `../ultra-review/SKILL.md` — read when implementation evidence is ready for review.
100
+ - `references/debugging.md` — read for a reproduced failure before selecting a repair.
@@ -0,0 +1,22 @@
1
+ # Evidence-first debugging
2
+
3
+ Use this procedure for an observed error, failed check, or unexpected behavior. Diagnose
4
+ before editing and work backward from the symptom to the earliest state that violates
5
+ the accepted contract.
6
+
7
+ 1. Capture the complete symptom and reproduce it with the smallest exact command or
8
+ action. A different checkout or nearby passing test is not reproduction.
9
+ 2. Inspect the relevant diff, configuration, dependency, caller, side effect, and
10
+ runtime boundary.
11
+ 3. Form one falsifiable root-cause hypothesis and choose the smallest observation that
12
+ distinguishes it from alternatives.
13
+ 4. Test the hypothesis without broad refactoring. Record evidence that accepts or
14
+ rejects it in the active task context `## Change Log`.
15
+ 5. Write the failing regression on the public seam, then apply the smallest root-cause
16
+ repair through `ultra-tdd`.
17
+ 6. Rerun the exact reproduction and affected verification. Record residual uncertainty
18
+ and the recovery path in task evidence.
19
+
20
+ After three distinct repair attempts reveal different underlying failures, stop
21
+ patching. Treat the shared boundary as the next diagnostic target and report the
22
+ evidence; do not disguise architectural uncertainty with another local fix.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: ultra-domain-modeling
3
+ description: Settle the project's vocabulary into CONTEXT.md — one opinionated definition per term, the rejected wordings, the relationships between terms, and the ambiguities already resolved. Use when another skill changes the shared language, meaning a term gets coined, two words compete for one concept, or one word turns out to mean two things.
4
+ ---
5
+
6
+ # Keep one file that fixes what each domain word means
7
+
8
+ This is how implementation reaches the earlier documents — not by better
9
+ retrieval, but by needing less of it. `CONTEXT.md` is a compressor, not an index.
10
+ What implementation lacks is rarely the content of the product specification; it
11
+ is the vocabulary, so that trace anchors, variable names, function names, and
12
+ test names all line up. It serves Goal 4, Cognitive Coherence.
13
+
14
+ ## Before you start
15
+
16
+ 1. Read `CONTEXT.md` at the repository root if it exists. Every skill reads it
17
+ for vocabulary; this one is for the moments that *change* it.
18
+ 2. Read the owner's current wording verbatim — their words are the raw material.
19
+ 3. Check the code for the same concept: type names, table names, function names.
20
+
21
+ ## Definition of done
22
+
23
+ - Every term settled in this exchange is in the file, written the moment it was
24
+ settled rather than batched at the end.
25
+ - Each entry defines what the term *is* in one or two sentences, and lists the
26
+ wordings that lost.
27
+ - The file still holds vocabulary only, carrying no implementation detail.
28
+
29
+ ## The file
30
+
31
+ Create it at the repository root the first time a term is actually settled, not
32
+ before. This is the whole format:
33
+
34
+ ```markdown
35
+ # {project name}
36
+
37
+ {One or two sentences: what this context is and why it exists.}
38
+
39
+ ## Language
40
+
41
+ **Order**:
42
+ {One or two sentences. Define what it is, not what it does.}
43
+ _Avoid_: Purchase, Transaction
44
+
45
+ ## Relationships
46
+
47
+ - One **Issue tracker** holds many **Issue**
48
+
49
+ ## Flagged ambiguities
50
+
51
+ - "backlog" meant both the tool and the set of work — settled as **Issue tracker**
52
+ ```
53
+
54
+ ## Sharpen the language as it is spoken
55
+
56
+ When several words compete for one concept, pick the best one and send the rest
57
+ to `_Avoid_`. Keep only terms this project gives specific meaning to; general
58
+ programming concepts stay out.
59
+
60
+ - Name the conflict the moment it appears: the vocabulary defines cancellation
61
+ as one thing, and this sentence uses it as another — which one is meant?
62
+ - Sharpen a vague word on the spot: "account" is either Customer or User.
63
+ - Pressure-test a boundary with a concrete scenario.
64
+ - Cross-check against the code: it cancels a whole Order, yet the description
65
+ allows cancelling part of one — which is true?
66
+
67
+ ## When the owner decides
68
+
69
+ A term's meaning is the owner's to settle; you supply the candidates, the
70
+ conflict you found, and your recommendation. Where the answer is a genuine
71
+ trade-off, hard to reverse, and would look strange to a reader without the
72
+ background, it belongs in a decision record instead of a vocabulary entry. All
73
+ three have to hold, or `decisions/` fills with a log. Create that directory on
74
+ the first record that qualifies.
75
+
76
+ ## References
77
+
78
+ - `../ultra-think/references/autonomy-boundary.md` — read when renaming a term an
79
+ accepted specification already uses; that renaming is a C5 boundary.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: ultra-grilling
3
+ description: Interrogate an owner request until every branch of its decision tree is resolved, one question per turn, each carrying a recommended answer. Use when another skill needs the owner's intent specific enough to build from — a new project's north star, a Change boundary, or an ask whose acceptance criteria are still implicit.
4
+ ---
5
+
6
+ # Turn a vague ask into a decision list the owner has explicitly confirmed
7
+
8
+ No-one knows exactly what they want at the start. This prevents the misalignment
9
+ that surfaces at the end, when both sides believed they had agreed and the
10
+ finished work proves otherwise. It serves Goal 1, Intent Fidelity.
11
+
12
+ ## Before you start
13
+
14
+ 1. Reread what the owner said in the current request, verbatim.
15
+ 2. Read `.ultra/north-star.md` and `CONTEXT.md` where they exist. Established
16
+ wording and vocabulary are decisions that were already made.
17
+ 3. Look up every fact you can reach on your own: repository files, Git history,
18
+ installed dependencies, tool output.
19
+
20
+ Facts are yours to find, decisions are the owner's to make. A question they could
21
+ have answered by reading the repository spends the one input only they can give.
22
+
23
+ ## Definition of done
24
+
25
+ - Every branch reachable from the original ask is resolved, or deferred with the
26
+ reason recorded.
27
+ - Each resolved branch carries the owner's confirmation in their own words,
28
+ rather than something that sounded like agreement.
29
+ - The calling skill holds a decision list it can write to a file: one line per
30
+ decision, each with the options rejected and why.
31
+
32
+ ## Extract first, then ask
33
+
34
+ Restate what the owner already told you and ask them to confirm the restatement.
35
+ Ask only about what is genuinely missing. Re-asking something they answered
36
+ teaches them that answering does not stick.
37
+
38
+ ## One question per turn
39
+
40
+ Ask through the host's native question surface, one unresolved choice at a time,
41
+ and wait for the answer. Several questions at once gets the easy one answered and
42
+ the load-bearing one skipped.
43
+
44
+ Every question carries your recommended answer and what would change it. A
45
+ question without a recommendation hands your own work back to the owner.
46
+
47
+ Order questions so that answering one unlocks the next, and prefer the ones whose
48
+ answer changes what gets built:
49
+
50
+ - What happens when this goes wrong, and how would we find out?
51
+ - Which of these options is cheaper to reverse?
52
+ - What are we deliberately not doing?
53
+ - What does done look like, concretely enough to check?
54
+
55
+ Skip what you can derive, what does not change the work, and what they already
56
+ settled.
57
+
58
+ ## When the owner decides
59
+
60
+ This whole skill is owner-facing, so the boundary is narrow: hold the loop open
61
+ until each decision is confirmed explicitly, and start no implementation on an
62
+ inferred consensus.
63
+
64
+ Where the host cannot present a structured question, ask one plain question per
65
+ turn instead. Where it cannot ask at all, stop at the last confirmed decision,
66
+ record what remains open, and hand that back to the caller — neither guessing an
67
+ answer nor blocking the owner's next move.
68
+
69
+ ## Hand back a list
70
+
71
+ Once the tree is walked, write the decisions out one per line, each with the
72
+ rejected options and the reason they lost. That list is the record. The caller
73
+ chooses where it lands: `north-star.md`, `discovery.md`, a Change intent, or a
74
+ decision file.
75
+
76
+ ## References
77
+
78
+ - `../ultra-think/references/autonomy-boundary.md` — read when an answer removes
79
+ something the specification already promised, or otherwise crosses C5.