ultra-builder-pro-cli 0.22.0 → 0.24.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 (93) hide show
  1. package/.ultra-template/docs/research/README.md +4 -4
  2. package/CHANGELOG.md +83 -0
  3. package/README.md +68 -35
  4. package/adapters/_shared/codex-assets.cjs +121 -60
  5. package/adapters/_shared/interaction-contract.cjs +20 -7
  6. package/adapters/_shared/provenance.cjs +7 -2
  7. package/adapters/_shared/runtime-assets.cjs +4 -3
  8. package/adapters/_shared/runtime-native.cjs +132 -0
  9. package/adapters/claude.js +61 -31
  10. package/adapters/codex.js +178 -81
  11. package/adapters/grok.js +372 -0
  12. package/adapters/kimi.js +8 -4
  13. package/adapters/opencode.js +211 -33
  14. package/agents/code-reviewer.md +4 -2
  15. package/agents/debugger.md +4 -1
  16. package/agents/review-code.md +7 -3
  17. package/agents/review-comments.md +7 -4
  18. package/agents/review-coordinator.md +11 -7
  19. package/agents/review-design.md +8 -4
  20. package/agents/review-errors.md +8 -4
  21. package/agents/review-spec.md +8 -5
  22. package/agents/review-tests.md +7 -4
  23. package/agents/tdd-runner.md +5 -2
  24. package/bin/install.js +9 -4
  25. package/bin/orchestrator.js +4 -13
  26. package/docs/AGENT-CONTEXT.md +141 -231
  27. package/docs/ARCHITECTURE.md +203 -498
  28. package/docs/ARTIFACT-AUTHORITY.md +38 -35
  29. package/docs/PLUGIN-ISOLATION-CONTRACT.md +12 -9
  30. package/docs/ROADMAP.md +85 -110
  31. package/docs/RUNTIME-COMPAT-MATRIX.md +139 -174
  32. package/docs/SKILL-AUTHORING.md +3 -3
  33. package/docs/STATE-DB-ACCESS-POLICY.md +25 -20
  34. package/docs/WORKFLOW-LIFECYCLE.md +174 -442
  35. package/hooks/README.md +11 -8
  36. package/hooks/active_task_context.py +16 -16
  37. package/hooks/adapters/grok.py +134 -0
  38. package/hooks/{context_spine.py → context_envelope.py} +26 -22
  39. package/hooks/health_check.py +19 -29
  40. package/hooks/pre_stop_check.py +22 -12
  41. package/hooks/subagent_tracker.py +1 -1
  42. package/hooks/workflow_checkpoint.py +14 -13
  43. package/hooks/workflow_context.py +11 -12
  44. package/hooks/workflow_resume.py +14 -13
  45. package/mcp-server/{breadcrumb.cjs → hook-context.cjs} +7 -9
  46. package/mcp-server/lib/artifact-registry.cjs +25 -1
  47. package/mcp-server/lib/baseline-workflow.cjs +36 -38
  48. package/mcp-server/lib/canonical-json.cjs +19 -0
  49. package/mcp-server/lib/change-workflow.cjs +637 -49
  50. package/mcp-server/lib/context-envelope.cjs +508 -0
  51. package/mcp-server/lib/decision-records.cjs +337 -0
  52. package/mcp-server/lib/doctor.cjs +91 -33
  53. package/mcp-server/lib/init-project.cjs +78 -39
  54. package/mcp-server/lib/managed-file-write.cjs +116 -0
  55. package/mcp-server/lib/plan-checkpoint.cjs +177 -0
  56. package/mcp-server/lib/project-context.cjs +178 -0
  57. package/mcp-server/lib/stage-checkpoints.cjs +309 -0
  58. package/mcp-server/lib/state-db.cjs +155 -24
  59. package/mcp-server/lib/task-ledger.cjs +522 -13
  60. package/mcp-server/lib/ultra-facade.cjs +834 -0
  61. package/mcp-server/lib/worker-packet.cjs +358 -0
  62. package/mcp-server/server.cjs +208 -1059
  63. package/orchestrator/daemon.cjs +27 -9
  64. package/orchestrator/parallel-orchestrator.cjs +111 -76
  65. package/orchestrator/session-runner.cjs +135 -34
  66. package/package.json +10 -3
  67. package/skills/ultra-change/SKILL.md +39 -98
  68. package/skills/ultra-deliver/SKILL.md +42 -65
  69. package/skills/ultra-dev/SKILL.md +52 -99
  70. package/skills/ultra-doctor/SKILL.md +35 -57
  71. package/skills/ultra-init/SKILL.md +48 -88
  72. package/skills/ultra-init/references/brownfield-adoption.md +11 -8
  73. package/skills/ultra-plan/SKILL.md +54 -132
  74. package/skills/ultra-research/SKILL.md +58 -112
  75. package/skills/ultra-review/SKILL.md +28 -46
  76. package/skills/ultra-review/references/unified-schema.md +2 -0
  77. package/skills/ultra-review/scripts/review_wait.py +8 -0
  78. package/skills/ultra-status/SKILL.md +22 -45
  79. package/skills/ultra-test/SKILL.md +27 -61
  80. package/skills/ultra-think/SKILL.md +29 -48
  81. package/skills/ultra-think/references/interaction-boundary.md +56 -0
  82. package/spec/cli-protocol.md +80 -187
  83. package/spec/mcp-tools.yaml +130 -2738
  84. package/spec/schemas/mcp-tools.schema.json +1 -1
  85. package/spec/schemas/state-db.sql +107 -4
  86. package/spec/schemas/{task-ledger.v1.schema.json → task-ledger.v2.schema.json} +70 -6
  87. package/ultra-tools/commands/status.cjs +369 -243
  88. package/mcp-server/lib/context-spine.cjs +0 -1208
  89. package/mcp-server/lib/decision-dialogue.cjs +0 -1128
  90. package/mcp-server/lib/project-breadcrumb.cjs +0 -173
  91. package/mcp-server/lib/spec-learning.cjs +0 -284
  92. package/mcp-server/lib/workflow-state.cjs +0 -2965
  93. package/skills/ultra-think/references/decision-dialogue.md +0 -153
@@ -1,153 +0,0 @@
1
- # User-agent interaction contract
2
-
3
- Use this protocol only when evidence and accepted intent do not resolve a material
4
- choice. The goal is shared understanding with low cognitive load, not a mandatory
5
- interview.
6
-
7
- ## Authority split
8
-
9
- The user owns:
10
-
11
- - product intent and accepted outcomes;
12
- - material scope, compatibility, security, cost, and recovery tradeoffs;
13
- - semantic route selection and risk acceptance;
14
- - authorization for destructive or external effects.
15
-
16
- The model owns:
17
-
18
- - fact finding and synthesis;
19
- - reversible implementation detail inside accepted constraints;
20
- - research coverage and risk-profile recommendations;
21
- - technical decomposition, verification selection, and route recommendation.
22
-
23
- MCP owns durable state, evidence references, digests, freshness, locks, valid
24
- transitions, and hard invariants. It does not choose semantic intent.
25
-
26
- ## Follow the common selection flow
27
-
28
- 1. **Inspect** repository authority, source, runtime, tests, and relevant primary
29
- sources.
30
- 2. **Suggest** one recommendation and only credible alternatives, with their effects.
31
- 3. **Ask** through the host-native structured question surface only when current user
32
- intent does not already resolve the material choice.
33
- 4. **Normalize** a direct choice, modified route, delegation, or deferral. Treat a
34
- dismissed question as unanswered.
35
- 5. **Persist** the normalized result through MCP, then trust the DB record as current
36
- authority across sessions.
37
- 6. **Apply** the result to its owning baseline, change, workflow, task, specification,
38
- or artifact when that authority has a corresponding field or content boundary.
39
- 7. **Read back** the normalized decision and every changed owning authority before
40
- continuing.
41
-
42
- The DB treats normalized intent as current authority. It does not prove that the user
43
- selected it, store a host interaction receipt, or judge whether the choice was wise.
44
- The host interaction is the semantic gate; MCP validates state shape, bindings,
45
- freshness, and legal transitions.
46
-
47
- When an unanswered material question must survive interruption, `decision.open` stores
48
- that pending question before the host presents it. A pending question is recovery
49
- state, not accepted user intent. Only the normalized resolution becomes intent
50
- authority.
51
-
52
- ## Decide whether to ask
53
-
54
- Before asking:
55
-
56
- 1. Separate `Observed`, `Verified`, `Decided`, `Delegated`, and `Unknown`.
57
- 2. Resolve evidence-answerable unknowns autonomously.
58
- 3. Normalize clear decisions already present in the user's current request.
59
- 4. Ask only if the remaining choice changes accepted intent, public behavior,
60
- compatibility, security, material cost, external effects, or recovery.
61
-
62
- Do not ask about a reversible implementation detail already delegated by the contract.
63
- If the user does not know, recommend a bounded validation action instead of forcing a
64
- guess.
65
-
66
- ## Choose interaction depth
67
-
68
- - `guided`: material initial product or major-change choices;
69
- - `fast`: only one-way-door or costly choices in routine work;
70
- - `autonomous`: reversible choices explicitly delegated by the user;
71
- - `diagnostic`: gather discriminating evidence before asking about recovery.
72
-
73
- Infer the depth from the request and risk. Do not ask a meta-question about mode unless
74
- that choice itself changes the outcome.
75
-
76
- ## Present questions
77
-
78
- Use the host-native structured question surface declared by the installed interaction
79
- contract when it exists. If that surface is unavailable but normal conversation is
80
- permitted, ask one concise direct question instead of inventing a tool or foreign-host
81
- syntax. If the host mode forbids interaction entirely, keep the choice unanswered and
82
- stop before any route-dependent write. Do not convert host unavailability into
83
- delegated authority.
84
-
85
- Ask one question only for a dependent decision. STOP is mandatory after presenting
86
- that question: do not perform writes whose meaning depends on an unanswered choice.
87
-
88
- For one dependent decision, present:
89
-
90
- ```text
91
- Decision: <question>
92
- Why now: <decision effect>
93
- Recommendation: <choice> — <decisive reason>
94
- Alternatives: <only credible alternatives and their net tradeoff>
95
- ```
96
-
97
- Ask dependent decisions one at a time. A host may group up to three independent,
98
- low-cognitive-load facts when seeing them together improves consistency. Never dump a
99
- questionnaire, hidden queue, or every research area.
100
-
101
- The question tool or direct question ends the current interaction naturally.
102
- A dismissed or unavailable response is not acceptance of the recommendation.
103
-
104
- ## Persist normalized authority
105
-
106
- For a project-bound material decision:
107
-
108
- 1. Read breadcrumb `accepted_intent`, call `decision.list`, and resume a matching active
109
- decision thread, or use `decision.thread_start` for one new baseline-, change-, or
110
- workflow-bound thread.
111
- 2. Use `decision.open` before presenting only the current decision, with evidence refs,
112
- recommendation, credible alternatives, effects, and its real blocking consequence.
113
- A non-blocking follow-up must not become a global workflow gate.
114
- 3. After the answer:
115
- - `decision.resolve` for a direct user choice;
116
- - `decision.delegate` for explicit model delegation;
117
- - `decision.defer` with consequence and revisit condition;
118
- - `decision.supersede` when accepted intent actually changed.
119
- 4. Apply the normalized result through the owning MCP operation or update the smallest
120
- relevant semantic artifact. Do not leave a material answer only in conversation.
121
- 5. Read back the owning baseline, change, workflow, task, specification digest, or
122
- artifact record. If another authority changed, pass its typed reference in
123
- `decision.complete.applied_refs`.
124
- 6. Call `decision.complete` only after that read-back. This closes lifecycle state; it
125
- is not another user approval. If the decision record itself is the complete durable
126
- authority, `applied_refs` may remain empty.
127
- 7. Use `decision.checkpoint` instead only for the digest-bound recovery boundary
128
- described below.
129
-
130
- Keep fact acquisition autonomous and decision authority explicit.
131
- Never store raw prompts or transcripts; store normalized decisions, not internal
132
- chain of thought.
133
- Do not require a redundant confirmation after an unambiguous answer.
134
- An answered thread with no open or blocking deferred decision does not require a
135
- checkpoint merely to prove intent.
136
-
137
- Use a checkpoint only when a coherent decision cluster changes a durable contract or
138
- artifact and interruption recovery requires a digest-bound boundary. Present the
139
- compact effect once, obtain any missing approval, update the artifact, and confirm its
140
- digest. Do not create ceremonial checkpoints for routine implementation detail or an
141
- already explicit current instruction.
142
-
143
- Every checkpoint binds the normalized decision digest. Change- and workflow-bound
144
- checkpoints also require at least one current artifact digest. A standalone baseline
145
- thread may instead record a specific `no_artifact_reason` when no durable artifact
146
- exists; that exception does not create interaction proof.
147
-
148
- ## Return to the capability graph
149
-
150
- After alignment, re-read the invoking workflow and breadcrumb. A
151
- `required_transition` is authoritative only for a hard invariant. Otherwise the host
152
- model recommends among `allowed_transitions` based on the user's goal and current
153
- evidence. Do not persist that semantic recommendation as MCP authority.