ultra-builder-pro-cli 0.25.1 → 0.26.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 (243) hide show
  1. package/.ultra-template/changes/abandoned/.gitkeep +0 -0
  2. package/.ultra-template/contexts/TEMPLATE.md +94 -0
  3. package/.ultra-template/decisions/.gitkeep +1 -0
  4. package/.ultra-template/evidence/.gitkeep +1 -0
  5. package/.ultra-template/north-star.md +46 -0
  6. package/.ultra-template/research/.gitkeep +1 -0
  7. package/.ultra-template/specs/discovery.md +2 -2
  8. package/.ultra-template/tasks.json +3 -0
  9. package/.ultra-template/test-report.json +27 -0
  10. package/CHANGELOG.md +107 -1
  11. package/README.md +217 -579
  12. package/adapters/_shared/delegate-profiles/kimi-read-only.md +15 -0
  13. package/adapters/_shared/delegate-profiles/kimi-write.md +17 -0
  14. package/adapters/_shared/file-ops.cjs +76 -2
  15. package/adapters/_shared/host-profile.cjs +97 -0
  16. package/adapters/_shared/plugin-core.cjs +204 -0
  17. package/adapters/_shared/runtime-assets.cjs +31 -96
  18. package/adapters/claude.js +92 -291
  19. package/adapters/codex.js +309 -842
  20. package/adapters/grok.js +143 -1469
  21. package/adapters/kimi.js +124 -1053
  22. package/adapters/opencode.js +230 -742
  23. package/bin/delegate-worker.cjs +328 -0
  24. package/bin/delegate.cjs +463 -0
  25. package/bin/install.js +38 -11
  26. package/docs/ARCHITECTURE.md +125 -216
  27. package/docs/ARTIFACT-AUTHORITY.md +90 -268
  28. package/docs/DECISIONS.md +77 -87
  29. package/docs/PHILOSOPHY.md +208 -0
  30. package/docs/PLUGIN-ISOLATION-CONTRACT.md +65 -39
  31. package/docs/RUNTIME-COMPAT-MATRIX.md +140 -155
  32. package/docs/SKILL-AUTHORING.md +94 -73
  33. package/docs/WORKFLOW-LIFECYCLE.md +97 -189
  34. package/hooks/README.md +19 -37
  35. package/hooks/_common.py +113 -0
  36. package/hooks/adapters/codex.py +9 -16
  37. package/hooks/adapters/grok.py +5 -5
  38. package/hooks/adapters/kimi.py +8 -14
  39. package/hooks/block_dangerous_commands.py +201 -0
  40. package/hooks/compact_context.py +65 -0
  41. package/hooks/mid_workflow_recall.py +25 -0
  42. package/hooks/post_edit_guard.py +105 -0
  43. package/hooks/session_context.py +30 -0
  44. package/package.json +17 -52
  45. package/skills/ultra-change/SKILL.md +115 -50
  46. package/skills/ultra-change/references/change-contract.md +68 -3
  47. package/skills/ultra-delegate/SKILL.md +89 -0
  48. package/skills/ultra-delegate/references/delegation-contract.md +59 -0
  49. package/skills/ultra-delegate/scripts/delegate_wait.py +86 -0
  50. package/skills/ultra-deliver/SKILL.md +98 -42
  51. package/skills/ultra-deliver/references/baseline-reconciliation.md +39 -20
  52. package/skills/ultra-dev/SKILL.md +115 -62
  53. package/skills/ultra-dev/references/debugging.md +22 -0
  54. package/skills/ultra-domain-modeling/SKILL.md +79 -0
  55. package/skills/ultra-grilling/SKILL.md +118 -0
  56. package/skills/ultra-grilling/references/reframing.md +72 -0
  57. package/skills/ultra-init/SKILL.md +102 -37
  58. package/skills/ultra-init/references/brownfield-adoption.md +33 -83
  59. package/skills/ultra-init/scripts/init_project.cjs +84 -0
  60. package/skills/ultra-plan/SKILL.md +101 -68
  61. package/skills/ultra-research/SKILL.md +68 -48
  62. package/skills/ultra-research/references/00-problem-validation.md +5 -5
  63. package/skills/ultra-research/references/01-opportunity-discovery.md +3 -3
  64. package/skills/ultra-research/references/02-market-assessment.md +5 -4
  65. package/skills/ultra-research/references/03-competitive-landscape.md +3 -3
  66. package/skills/ultra-research/references/04-product-strategy.md +3 -3
  67. package/skills/ultra-research/references/05-assumptions-validation.md +5 -5
  68. package/skills/ultra-research/references/10-user-personas.md +3 -2
  69. package/skills/ultra-research/references/11-user-scenarios.md +3 -3
  70. package/skills/ultra-research/references/20-user-stories.md +4 -3
  71. package/skills/ultra-research/references/21-features-scope.md +3 -2
  72. package/skills/ultra-research/references/22-success-metrics.md +3 -3
  73. package/skills/ultra-research/references/30-architecture-context.md +3 -3
  74. package/skills/ultra-research/references/31-solution-strategy.md +3 -3
  75. package/skills/ultra-research/references/32-building-blocks.md +3 -3
  76. package/skills/ultra-research/references/40-deployment.md +3 -3
  77. package/skills/ultra-research/references/41-quality-risks.md +3 -3
  78. package/skills/ultra-research/references/99-synthesis.md +7 -7
  79. package/skills/ultra-review/SKILL.md +84 -32
  80. package/skills/ultra-review/references/code.md +17 -0
  81. package/skills/ultra-review/references/comments.md +12 -0
  82. package/skills/ultra-review/references/design.md +12 -0
  83. package/skills/ultra-review/references/errors.md +13 -0
  84. package/skills/ultra-review/references/spec.md +13 -0
  85. package/skills/ultra-review/references/tests.md +12 -0
  86. package/skills/ultra-review/references/worker-packet.md +40 -0
  87. package/skills/ultra-review/scripts/review_wait.py +26 -15
  88. package/skills/ultra-status/SKILL.md +61 -36
  89. package/skills/ultra-tdd/SKILL.md +81 -0
  90. package/skills/ultra-tdd/references/templates/README.md +20 -0
  91. package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +79 -0
  92. package/skills/ultra-tdd/references/templates/persistence-real.ts +78 -0
  93. package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +78 -0
  94. package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +73 -0
  95. package/skills/ultra-tdd/references/templates/vertical-slice.ts +66 -0
  96. package/skills/ultra-tdd/references/test-execution.md +18 -0
  97. package/skills/ultra-test/SKILL.md +75 -30
  98. package/skills/ultra-test/references/export-syntax.md +18 -0
  99. package/skills/ultra-test/scripts/worktree_digest.cjs +54 -0
  100. package/skills/ultra-think/SKILL.md +49 -27
  101. package/skills/ultra-think/references/autonomy-boundary.md +48 -0
  102. package/skills/ultra-think/references/interaction-boundary.md +18 -33
  103. package/.ultra-template/docs/research/README.md +0 -55
  104. package/.ultra-template/reports/templates/delivery-report.json +0 -17
  105. package/.ultra-template/reports/templates/test-report.json +0 -18
  106. package/.ultra-template/tasks/tasks.json +0 -15
  107. package/.ultra-template/templates/task-context.md +0 -19
  108. package/adapters/_shared/codex-assets.cjs +0 -725
  109. package/adapters/_shared/codex-ultra-tools-entry.cjs +0 -11
  110. package/adapters/_shared/interaction-contract.cjs +0 -129
  111. package/adapters/_shared/path-rewrite.cjs +0 -79
  112. package/adapters/_shared/runtime-native.cjs +0 -132
  113. package/adapters/_shared/settings-merge.cjs +0 -76
  114. package/agents/code-reviewer.md +0 -42
  115. package/agents/debugger.md +0 -40
  116. package/agents/review-code.md +0 -49
  117. package/agents/review-comments.md +0 -38
  118. package/agents/review-coordinator.md +0 -56
  119. package/agents/review-design.md +0 -40
  120. package/agents/review-errors.md +0 -43
  121. package/agents/review-spec.md +0 -39
  122. package/agents/review-tests.md +0 -40
  123. package/agents/tdd-runner.md +0 -38
  124. package/bin/orchestrator.js +0 -383
  125. package/commands/ultra-change.md +0 -10
  126. package/commands/ultra-deliver.md +0 -10
  127. package/commands/ultra-dev.md +0 -10
  128. package/commands/ultra-doctor.md +0 -10
  129. package/commands/ultra-init.md +0 -10
  130. package/commands/ultra-plan.md +0 -10
  131. package/commands/ultra-research.md +0 -10
  132. package/commands/ultra-review.md +0 -10
  133. package/commands/ultra-status.md +0 -10
  134. package/commands/ultra-test.md +0 -10
  135. package/commands/ultra-think.md +0 -10
  136. package/docs/AGENT-CONTEXT.md +0 -191
  137. package/docs/COMMIT-HASH-BACKFILL.md +0 -51
  138. package/docs/LEGACY-CLI-CROSSWALK.md +0 -175
  139. package/docs/ROADMAP.md +0 -101
  140. package/docs/STATE-DB-ACCESS-POLICY.md +0 -161
  141. package/hooks/active_task_context.py +0 -152
  142. package/hooks/context_envelope.py +0 -100
  143. package/hooks/health_check.py +0 -196
  144. package/hooks/pre_stop_check.py +0 -66
  145. package/hooks/runtime_paths.py +0 -396
  146. package/hooks/subagent_tracker.py +0 -88
  147. package/hooks/workflow_checkpoint.py +0 -76
  148. package/hooks/workflow_context.py +0 -48
  149. package/hooks/workflow_resume.py +0 -84
  150. package/mcp-server/hook-context.cjs +0 -38
  151. package/mcp-server/hook-event.cjs +0 -34
  152. package/mcp-server/lib/archive-journal.cjs +0 -1119
  153. package/mcp-server/lib/archive-mutation-worker.py +0 -365
  154. package/mcp-server/lib/artifact-registry.cjs +0 -1232
  155. package/mcp-server/lib/baseline-workflow.cjs +0 -1193
  156. package/mcp-server/lib/canonical-json.cjs +0 -19
  157. package/mcp-server/lib/change-authority.cjs +0 -26
  158. package/mcp-server/lib/change-packet.cjs +0 -790
  159. package/mcp-server/lib/change-workflow.cjs +0 -65
  160. package/mcp-server/lib/context-envelope.cjs +0 -581
  161. package/mcp-server/lib/context-paths.cjs +0 -142
  162. package/mcp-server/lib/decision-records.cjs +0 -423
  163. package/mcp-server/lib/delivery-transaction.cjs +0 -471
  164. package/mcp-server/lib/doctor-backup-worker.cjs +0 -328
  165. package/mcp-server/lib/doctor.cjs +0 -627
  166. package/mcp-server/lib/git-bootstrap.cjs +0 -651
  167. package/mcp-server/lib/init-project.cjs +0 -1021
  168. package/mcp-server/lib/kernel-change-workflow.cjs +0 -2029
  169. package/mcp-server/lib/legacy-change-workflow.cjs +0 -3032
  170. package/mcp-server/lib/managed-file-write.cjs +0 -172
  171. package/mcp-server/lib/plan-checkpoint.cjs +0 -177
  172. package/mcp-server/lib/plan-publication-worker.cjs +0 -830
  173. package/mcp-server/lib/plan-store.cjs +0 -794
  174. package/mcp-server/lib/prd-parser.cjs +0 -83
  175. package/mcp-server/lib/pricing.cjs +0 -44
  176. package/mcp-server/lib/project-context.cjs +0 -178
  177. package/mcp-server/lib/projector.cjs +0 -386
  178. package/mcp-server/lib/provider-refs.cjs +0 -42
  179. package/mcp-server/lib/runtime-paths.cjs +0 -1714
  180. package/mcp-server/lib/runtime-state.cjs +0 -222
  181. package/mcp-server/lib/safe-project-file.cjs +0 -385
  182. package/mcp-server/lib/stage-checkpoints.cjs +0 -463
  183. package/mcp-server/lib/state-authority.cjs +0 -95
  184. package/mcp-server/lib/state-db.cjs +0 -1580
  185. package/mcp-server/lib/state-ops.cjs +0 -1428
  186. package/mcp-server/lib/task-contract.cjs +0 -404
  187. package/mcp-server/lib/task-expander.cjs +0 -105
  188. package/mcp-server/lib/task-ledger.cjs +0 -1964
  189. package/mcp-server/lib/telemetry.cjs +0 -85
  190. package/mcp-server/lib/topo.cjs +0 -131
  191. package/mcp-server/lib/ultra-facade.cjs +0 -2684
  192. package/mcp-server/lib/worker-packet.cjs +0 -358
  193. package/mcp-server/server.cjs +0 -437
  194. package/orchestrator/auto-merge.cjs +0 -128
  195. package/orchestrator/daemon.cjs +0 -264
  196. package/orchestrator/dispatch-rules.cjs +0 -78
  197. package/orchestrator/parallel-orchestrator.cjs +0 -903
  198. package/orchestrator/planner/plan-builder.cjs +0 -125
  199. package/orchestrator/recovery.cjs +0 -188
  200. package/orchestrator/session-close-journal-worker.cjs +0 -5
  201. package/orchestrator/session-close-journal.cjs +0 -1014
  202. package/orchestrator/session-runner.cjs +0 -1153
  203. package/orchestrator/worktree-manager.cjs +0 -282
  204. package/settings.json +0 -7
  205. package/skills/cc-collab/SKILL.md +0 -42
  206. package/skills/code-review-expert/SKILL.md +0 -43
  207. package/skills/code-review-expert/references/correctness-reliability.md +0 -30
  208. package/skills/code-review-expert/references/design-boundaries.md +0 -26
  209. package/skills/code-review-expert/references/removal-plan.md +0 -24
  210. package/skills/codex-collab/SKILL.md +0 -49
  211. package/skills/codex-collab/evals/evals.json +0 -35
  212. package/skills/integration-rules/SKILL.md +0 -32
  213. package/skills/security-rules/SKILL.md +0 -38
  214. package/skills/testing-rules/SKILL.md +0 -32
  215. package/skills/ultra-doctor/SKILL.md +0 -41
  216. package/skills/ultra-plan/references/semantic-preflight.md +0 -20
  217. package/skills/ultra-verify/SKILL.md +0 -46
  218. package/skills/ultra-verify/evals/evals.json +0 -46
  219. package/skills/ultra-verify/references/cross-verify-modes.md +0 -28
  220. package/skills/ultra-verify/references/evidence-status.md +0 -21
  221. package/skills/ultra-verify/scripts/verify_wait.py +0 -94
  222. package/spec/cli-protocol.md +0 -102
  223. package/spec/mcp-tools.yaml +0 -312
  224. package/spec/schemas/baseline-reconciliation.v1.schema.json +0 -73
  225. package/spec/schemas/change-delta.v1.schema.json +0 -153
  226. package/spec/schemas/command-manifest.schema.json +0 -29
  227. package/spec/schemas/context-file.v4.5.schema.json +0 -54
  228. package/spec/schemas/delivery-report.v1.schema.json +0 -66
  229. package/spec/schemas/documentation-reconciliation.v1.schema.json +0 -106
  230. package/spec/schemas/mcp-tools.schema.json +0 -136
  231. package/spec/schemas/skill-manifest.schema.json +0 -24
  232. package/spec/schemas/state-db.sql +0 -641
  233. package/spec/schemas/task-ledger.v2.schema.json +0 -296
  234. package/spec/schemas/tasks.v4.5.schema.json +0 -96
  235. package/spec/schemas/test-report.v1.schema.json +0 -225
  236. package/ultra-tools/cli.cjs +0 -129
  237. package/ultra-tools/commands/db.cjs +0 -226
  238. package/ultra-tools/commands/legacy-memory.cjs +0 -159
  239. package/ultra-tools/commands/migrate.cjs +0 -1386
  240. package/ultra-tools/commands/session.cjs +0 -213
  241. package/ultra-tools/commands/status.cjs +0 -559
  242. package/ultra-tools/commands/system.cjs +0 -498
  243. package/ultra-tools/commands/task.cjs +0 -105
@@ -1,41 +0,0 @@
1
- ---
2
- name: ultra-doctor
3
- description: Diagnose and mechanically recover Ultra schema, projection, session, archive, hook, and installed-asset faults. Use when authority is degraded, contradictory, or unavailable.
4
- ---
5
-
6
- # Diagnose before repair
7
-
8
- Doctor owns deterministic health and supported recovery. It cannot choose product
9
- scope, invent evidence, accept a baseline, resolve a user decision, or declare
10
- semantic work complete.
11
-
12
- ## Diagnose
13
-
14
- Call `ultra.doctor { repair: false }` and inspect:
15
-
16
- - SQLite integrity, schema, backups, WAL/SHM, and migration state;
17
- - artifact ownership, digest freshness, edges, orphans, and duplicate authority;
18
- - team-checkpoint ancestry and real concurrent record conflicts;
19
- - projection jobs, sessions, leases, worktrees, and recovery journals;
20
- - installed plugin assets, MCP startup, and hook paths.
21
-
22
- An expected workflow pause, editable draft, semantic warning, or awaiting owner
23
- decision is not corruption.
24
-
25
- ## Repair
26
-
27
- With explicit repair authority, call `ultra.doctor { repair: true }`. It may apply
28
- backup-first schema migration, regenerate local projections, recover supported
29
- journals, reconcile orphan sessions, and repair installed mechanical assets.
30
-
31
- It may not manufacture semantic evidence, import or publish a team checkpoint, replace
32
- a healthy baseline, resolve decisions, edit application code, or force a draft to
33
- accepted. Use `ultra.sync` for reviewed checkpoint import/publish. Doctor never changes
34
- semantic checkpoint acceptance or Change intent.
35
-
36
- Preserve corrupt DB/WAL/SHM and dirty worktrees. Never patch plugin cache files by
37
- hand; reinstall through `ubp` and verify the installed manifest and hook targets.
38
-
39
- Rerun doctor read-only after repair. Report health, exact failed checks, backups,
40
- repairs, preserved recovery paths, and remaining owner or semantic work. Do not invoke
41
- another capability automatically.
@@ -1,20 +0,0 @@
1
- # Semantic planning preflight
2
-
3
- Before task decomposition, read the normalized Change Contract and the current
4
- change-bound research records.
5
-
6
- 1. Resolve every blocking `unresolved_decision` or return to `ultra-change`.
7
- 2. When research is recorded, verify one completed run has the same mode and selected
8
- step set. Re-run stale or missing evidence through `ultra-research`.
9
- 3. Build a coverage ledger from Change acceptance ids to task acceptance ids.
10
- 4. Bind every task to an accepted id, semantic record id, semantic source ref, or real
11
- Markdown anchor through `trace_to`.
12
- 5. Check that every task reaches a public consumer and owns its error, documentation,
13
- verification, and recovery obligations.
14
- 6. Validate dependencies. A `quick` profile normally has one vertical task, but the
15
- model may use the smallest evidence-backed graph that satisfies the accepted Change.
16
-
17
- Treat the MCP result as a persistence receipt plus typed diagnostics. Structural,
18
- digest, path, concurrency, and exact topology conflicts must be repaired. The model
19
- owns semantic completeness, acceptance coverage, research sufficiency, and whether a
20
- warning requires another planning revision before execution.
@@ -1,46 +0,0 @@
1
- ---
2
- name: ultra-verify
3
- description: Run independent two-model verification with the current host as primary and one installed read-only advisor, then verify and synthesize both evidence sets. Use only when the user explicitly requests cross-model verification.
4
- ---
5
-
6
- # Run independent cross-model verification
7
-
8
- Keep the current host responsible for scope, evidence, edits, verification, and the
9
- final answer. Use one installed collaboration companion that invokes a different CLI;
10
- never recurse into the current host or treat advisor output as authority.
11
-
12
- ## Modes
13
-
14
- - `decision`: one consequential architecture or product choice;
15
- - `diagnose`: independent root-cause hypotheses;
16
- - `audit`: evidence-backed findings over a bounded scope;
17
- - `estimate`: an estimate with explicit assumptions and uncertainty.
18
-
19
- ## Workflow
20
-
21
- 1. Define the workspace, question, evidence standard, and response shape. Confirm the
22
- selected advisor CLI and authentication. Exclude secrets and unrelated files.
23
- 2. Create `.ultra/.runtime/collab/<session-id>/` and write the current host's independent,
24
- evidence-backed analysis to `host-analysis.md` before reading advisor output.
25
- Treat the directory as working scratch, not Ultra authority.
26
- 3. Follow the installed collaboration companion's read-only invocation contract. Give
27
- the advisor the same bounded question and evidence, without the primary conclusion
28
- when independence matters. Store its result as `advisor-output.md` and diagnostics
29
- as `advisor-error.log`.
30
- 4. Run `scripts/verify_wait.py <session-path> --advisor advisor --output
31
- advisor-output.md` from this skill directory. Use a yielded shell session and poll
32
- in bounded intervals; do not hold one blocking tool call longer than one minute.
33
- 5. Read advisor output only after the waiter reports a complete, non-empty file.
34
- 6. Verify consequential claims against the current checkout, tests, runtime, or
35
- primary documentation. Explain scope, version, evidence, and assumption differences
36
- before resolving disagreement.
37
- 7. Write `metadata.json` and `synthesis.md`, then return one host-owned conclusion.
38
- Promote only verified conclusions into the invoking DB-bound workflow artifact or
39
- report; files under `.ultra/.runtime/collab/` remain non-authoritative.
40
-
41
- Read `references/cross-verify-modes.md` for mode-specific evidence and
42
- `references/evidence-status.md` when the synthesis needs an evidence status. Model agreement
43
- never overrides failing tests or authoritative runtime evidence.
44
-
45
- Advisor failure degrades to the primary analysis with a single-source warning. It
46
- never blocks the user's underlying task.
@@ -1,46 +0,0 @@
1
- {
2
- "skill_name": "ultra-verify",
3
- "evals": [
4
- {
5
- "id": "explicit-decision",
6
- "prompt": "Run independent cross-model verification on the database choice, with the current host writing its view before the advisor.",
7
- "should_trigger": true,
8
- "assertions": [
9
- "Writes the primary analysis before reading advisor output",
10
- "Launches the advisor in a read-only sandbox",
11
- "Uses a bounded session directory and completion waiter",
12
- "Verifies consequential claims against authoritative evidence",
13
- "Returns one host-owned synthesis"
14
- ]
15
- },
16
- {
17
- "id": "explicit-diagnosis",
18
- "prompt": "Use two independent models to diagnose the intermittent 500 response and reconcile their hypotheses with discriminating checks.",
19
- "should_trigger": true,
20
- "assertions": [
21
- "Keeps both initial hypotheses independent",
22
- "Deduplicates by root cause after both outputs complete",
23
- "Orders verification by evidence and diagnostic value",
24
- "Does not decide by model vote"
25
- ]
26
- },
27
- {
28
- "id": "ordinary-analysis-negative",
29
- "prompt": "Should this service use PostgreSQL or MongoDB?",
30
- "should_trigger": false,
31
- "assertions": [
32
- "Answers with the ordinary analysis workflow",
33
- "Does not launch an external advisor without explicit cross-model intent"
34
- ]
35
- },
36
- {
37
- "id": "ordinary-review-negative",
38
- "prompt": "Review these changes before I commit.",
39
- "should_trigger": false,
40
- "assertions": [
41
- "Uses the standard review workflow",
42
- "Does not substitute cross-model verification for native review"
43
- ]
44
- }
45
- ]
46
- }
@@ -1,28 +0,0 @@
1
- # Ultra Verify Modes
2
-
3
- All four modes compare an independently written primary analysis with one read-only external
4
- advisor. Agreement is useful corroboration, not proof; evidence decides the final result.
5
-
6
- ## 1. Decision (`decision`)
7
-
8
- Give both analyses the same decision context, constraints, and options. Compare recommendation,
9
- trade-offs, risks, and assumptions. When they differ, identify the assumption or evidence that
10
- caused the split and resolve it before recommending an option.
11
-
12
- ## 2. Diagnose (`diagnose`)
13
-
14
- Provide symptoms, exact errors, relevant code, and recent changes. Each analysis should rank its
15
- root-cause hypotheses and provide discriminating checks. Merge duplicate hypotheses, retain useful
16
- unique ones, and order investigation by evidence strength and verification cost.
17
-
18
- ## 3. Audit (`audit`)
19
-
20
- Use the same code scope and severity model for both analyses. Deduplicate findings by root cause,
21
- verify every location against the current checkout, and retain a single-model finding when source
22
- evidence confirms it. Never derive severity from model agreement alone.
23
-
24
- ## 4. Estimate (`estimate`)
25
-
26
- Require a breakdown, assumptions, dependencies, and risk range from both analyses. Explain large
27
- differences by locating mismatched scope or assumptions. Return a range supported by the reconciled
28
- work breakdown rather than averaging estimates mechanically.
@@ -1,21 +0,0 @@
1
- # Evidence Status
2
-
3
- Cross-model agreement is a signal, not an authority. Classify the synthesis only after checking
4
- consequential claims against source code, tests, runtime output, or primary documentation.
5
-
6
- ## Levels
7
-
8
- - **Verified agreement**: both analyses agree and the consequential claims have authoritative
9
- supporting evidence.
10
- - **Resolved dissent**: the analyses differ, but current evidence supports one position and explains
11
- the disagreement.
12
- - **Unresolved**: available evidence cannot distinguish the positions or key assumptions remain
13
- untested.
14
- - **Single source**: the advisor failed or returned no usable output; no cross-model corroboration is
15
- available.
16
-
17
- ## Reporting
18
-
19
- Record which claims were verified, the evidence used, useful dissent, unsupported assertions, and
20
- remaining uncertainty. Model agreement never upgrades a claim contradicted by tests or runtime
21
- evidence, and a uniquely reported finding remains valid when independently verified.
@@ -1,94 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Wait for one named advisor output file to become non-empty and stable."""
3
-
4
- import argparse
5
- import json
6
- import re
7
- import sys
8
- import time
9
- from pathlib import Path
10
-
11
- POLL_INTERVAL = 3
12
- DEFAULT_TIMEOUT = 1200
13
- SAFE_ADVISOR = re.compile(r"^[a-zA-Z0-9_-]+$")
14
-
15
-
16
- def _file_size(path: Path) -> int:
17
- try:
18
- return path.stat().st_size
19
- except (FileNotFoundError, OSError):
20
- return -1
21
-
22
-
23
- def _safe_output(value: str) -> Path:
24
- result = Path(value)
25
- if result.is_absolute() or len(result.parts) != 1 or result.name in {"", ".", ".."}:
26
- raise argparse.ArgumentTypeError("--output must be one file name inside the session directory")
27
- return result
28
-
29
-
30
- def _arguments():
31
- parser = argparse.ArgumentParser(description=__doc__)
32
- parser.add_argument("session_path", type=Path)
33
- parser.add_argument("--advisor", default="advisor")
34
- parser.add_argument("--output", type=_safe_output, default=Path("advisor-output.md"))
35
- parser.add_argument("--timeout", type=int, default=DEFAULT_TIMEOUT)
36
- args = parser.parse_args()
37
- if not SAFE_ADVISOR.fullmatch(args.advisor):
38
- parser.error("--advisor must use letters, numbers, underscore, or hyphen")
39
- if args.timeout < 0:
40
- parser.error("--timeout must be non-negative")
41
- if not args.session_path.is_dir():
42
- parser.error(f"session directory not found: {args.session_path}")
43
- return args
44
-
45
-
46
- def _status(session_path: Path, advisor: str, output_name: Path) -> dict:
47
- output = session_path / output_name
48
- if _file_size(output) > 0:
49
- return {"name": advisor, "status": "complete", "file": str(output)}
50
- return {"name": advisor, "status": "pending", "file": None}
51
-
52
-
53
- def _timeout_status(session_path: Path, advisor: str, output_name: Path) -> dict:
54
- output = session_path / output_name
55
- error = session_path / f"{advisor}-error.log"
56
- output_size = _file_size(output)
57
- if output_size > 0:
58
- return {"name": advisor, "status": "complete", "file": str(output)}
59
- if _file_size(error) > 0:
60
- return {"name": advisor, "status": "failed", "file": str(error)}
61
- if output_size == 0:
62
- return {"name": advisor, "status": "empty", "file": str(output)}
63
- return {"name": advisor, "status": "pending", "file": None}
64
-
65
-
66
- def main() -> None:
67
- args = _arguments()
68
- output = args.session_path / args.output
69
- deadline = time.monotonic() + args.timeout
70
- previous_size = _file_size(output)
71
- while time.monotonic() < deadline:
72
- current_size = _file_size(output)
73
- advisor = _status(args.session_path, args.advisor, args.output)
74
- if advisor["status"] == "complete" and current_size == previous_size:
75
- elapsed = int(args.timeout - (deadline - time.monotonic()))
76
- print(json.dumps({
77
- "status": "complete", "advisor": advisor, "elapsed_seconds": elapsed,
78
- }))
79
- return
80
- state = "stabilizing" if advisor["status"] == "complete" else "waiting"
81
- remaining = max(0, int(deadline - time.monotonic()))
82
- sys.stderr.write(f"\r [0/1] {args.advisor}:{state} ({remaining}s remaining) ")
83
- sys.stderr.flush()
84
- previous_size = current_size
85
- time.sleep(POLL_INTERVAL)
86
-
87
- advisor = _timeout_status(args.session_path, args.advisor, args.output)
88
- print(json.dumps({
89
- "status": "timeout", "advisor": advisor, "elapsed_seconds": args.timeout,
90
- }))
91
-
92
-
93
- if __name__ == "__main__":
94
- main()
@@ -1,102 +0,0 @@
1
- # `ultra-tools` CLI protocol
2
-
3
- `ultra-tools` is the maintenance and degraded-mode client for the same seven-tool
4
- kernel exposed through MCP. It does not publish the retired lifecycle families as
5
- model-facing tools and it does not contain a second semantic workflow engine.
6
-
7
- Authority boundary: [`docs/DECISIONS.md`](../docs/DECISIONS.md).
8
-
9
- ## Invocation
10
-
11
- ```text
12
- ultra-tools ultra <verb> [--json '<object>']
13
- ```
14
-
15
- The supported verbs map exactly to the public MCP contract. JSON input uses the
16
- corresponding `input_schema` in `spec/mcp-tools.yaml`. Large inputs may use
17
- `--json-file <path>`.
18
-
19
- Maintenance-only commands such as installation diagnostics, explicit backup
20
- restore, schema migration, and runtime inspection remain available under their
21
- documented non-MCP command groups. They are operator surfaces, not hidden model
22
- tools.
23
-
24
- ## Output
25
-
26
- The final stdout line is always one JSON envelope:
27
-
28
- ```json
29
- { "ok": true, "data": {} }
30
- ```
31
-
32
- or:
33
-
34
- ```json
35
- {
36
- "ok": false,
37
- "error": {
38
- "code": "ERROR_CODE",
39
- "message": "What failed",
40
- "retriable": false
41
- }
42
- }
43
- ```
44
-
45
- Human-readable progress may precede the envelope. Structured logs go to stderr.
46
- Exit code `0` means success, `1` means invalid user input, `2` means a mechanical
47
- runtime or I/O failure, `3` means a lease conflict, `4` means a schema mismatch,
48
- and `5` means timeout.
49
-
50
- ## Public tool mapping
51
-
52
- The table is checked against `spec/mcp-tools.yaml` at gate time.
53
-
54
- | MCP tool | CLI subcommand | Phase | Writer |
55
- |---|---|---:|---|
56
- | `ultra.context` | `ultra context` | 24 | mcp |
57
- | `ultra.record` | `ultra record` | 24 | mcp |
58
- | `ultra.checkpoint` | `ultra checkpoint` | 24 | mcp |
59
- | `ultra.sync` | `ultra sync` | 24 | mcp |
60
- | `ultra.session` | `ultra session` | 24 | mcp |
61
- | `ultra.archive` | `ultra archive` | 24 | mcp |
62
- | `ultra.doctor` | `ultra doctor` | 24 | mcp |
63
-
64
- The retired `task.*`, `change.*`, `decision.*`, `workflow.*`, `artifact.*`,
65
- `plan.*`, `session.*`, `baseline.*`, and `system.doctor` names are historical
66
- migration vocabulary only. They are neither returned by `tools/list` nor accepted
67
- by the MCP call handler.
68
-
69
- ## Behavioral boundary
70
-
71
- - `ultra.context` is read-only and returns one canonical Context Envelope.
72
- - `ultra.record` appends typed facts or revises mutable drafts. Semantic
73
- diagnostics are returned as data.
74
- - `ultra.checkpoint` attempts an immutable stage checkpoint. An unsuccessful
75
- attempt remains a revisable draft.
76
- - `ultra.sync` imports, publishes, inspects, or migrates the Git team ledger.
77
- - `ultra.session` owns only leases, Worker Packets, heartbeats, and terminal
78
- session transitions.
79
- - `ultra.archive` is the recoverable filesystem and database commit boundary.
80
- - `ultra.doctor` reports mechanical health and performs only explicit,
81
- backup-first deterministic repairs.
82
-
83
- Skills own adaptive workflow prose and host-native user interaction. Hooks observe
84
- lifecycle events and inject bounded context. Neither surface may silently write
85
- semantic authority.
86
-
87
- ## Orchestrator
88
-
89
- `ubp-orchestrator` consumes an accepted Plan checkpoint and a task-specific
90
- Worker Packet. It may schedule independent tasks but may not infer missing owner
91
- decisions, rewrite a Change contract, or bypass a rejected checkpoint.
92
-
93
- Every worker result must echo the exact `packet_digest`. A zero exit code is
94
- execution evidence, not automatic semantic completion; the responsible Skill
95
- records the outcome and attempts the appropriate checkpoint.
96
-
97
- ## Versioning
98
-
99
- The CLI follows the `version` in `spec/mcp-tools.yaml`. Public tool removal,
100
- renaming, or incompatible envelope changes require a major contract revision and
101
- a migration note. Adding an optional field or a new typed record action requires
102
- a minor contract revision.