ultra-builder-pro-cli 0.23.0 → 0.24.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.
- package/.ultra-template/docs/research/README.md +4 -4
- package/.ultra-template/tasks/tasks.json +4 -2
- package/CHANGELOG.md +72 -0
- package/README.md +55 -39
- package/adapters/_shared/codex-assets.cjs +121 -65
- package/adapters/_shared/interaction-contract.cjs +7 -1
- package/adapters/_shared/provenance.cjs +7 -2
- package/adapters/_shared/runtime-assets.cjs +3 -2
- package/adapters/_shared/runtime-native.cjs +132 -0
- package/adapters/claude.js +60 -30
- package/adapters/codex.js +178 -81
- package/adapters/grok.js +372 -0
- package/adapters/kimi.js +7 -3
- package/adapters/opencode.js +210 -32
- package/agents/code-reviewer.md +4 -2
- package/agents/debugger.md +4 -1
- package/agents/review-code.md +7 -3
- package/agents/review-comments.md +7 -4
- package/agents/review-coordinator.md +11 -7
- package/agents/review-design.md +8 -4
- package/agents/review-errors.md +8 -4
- package/agents/review-spec.md +8 -5
- package/agents/review-tests.md +7 -4
- package/agents/tdd-runner.md +5 -2
- package/bin/install.js +9 -4
- package/bin/orchestrator.js +4 -13
- package/docs/AGENT-CONTEXT.md +143 -229
- package/docs/ARCHITECTURE.md +205 -494
- package/docs/ARTIFACT-AUTHORITY.md +35 -28
- package/docs/LEGACY-CLI-CROSSWALK.md +1 -1
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +12 -9
- package/docs/ROADMAP.md +85 -110
- package/docs/RUNTIME-COMPAT-MATRIX.md +139 -175
- package/docs/SKILL-AUTHORING.md +3 -3
- package/docs/STATE-DB-ACCESS-POLICY.md +13 -8
- package/docs/WORKFLOW-LIFECYCLE.md +189 -448
- package/hooks/README.md +11 -8
- package/hooks/active_task_context.py +16 -16
- package/hooks/adapters/grok.py +134 -0
- package/hooks/{context_spine.py → context_envelope.py} +26 -22
- package/hooks/health_check.py +29 -34
- package/hooks/pre_stop_check.py +22 -12
- package/hooks/subagent_tracker.py +1 -1
- package/hooks/workflow_checkpoint.py +14 -13
- package/hooks/workflow_context.py +11 -12
- package/hooks/workflow_resume.py +14 -13
- package/mcp-server/{breadcrumb.cjs → hook-context.cjs} +7 -9
- package/mcp-server/lib/baseline-workflow.cjs +108 -82
- package/mcp-server/lib/canonical-json.cjs +19 -0
- package/mcp-server/lib/change-authority.cjs +26 -0
- package/mcp-server/lib/change-workflow.cjs +630 -45
- package/mcp-server/lib/context-envelope.cjs +508 -0
- package/mcp-server/lib/decision-records.cjs +337 -0
- package/mcp-server/lib/doctor.cjs +91 -33
- package/mcp-server/lib/init-project.cjs +78 -39
- package/mcp-server/lib/managed-file-write.cjs +116 -0
- package/mcp-server/lib/plan-checkpoint.cjs +177 -0
- package/mcp-server/lib/project-context.cjs +178 -0
- package/mcp-server/lib/stage-checkpoints.cjs +309 -0
- package/mcp-server/lib/state-db.cjs +155 -24
- package/mcp-server/lib/state-ops.cjs +21 -3
- package/mcp-server/lib/task-ledger.cjs +522 -13
- package/mcp-server/lib/ultra-facade.cjs +757 -442
- package/mcp-server/lib/worker-packet.cjs +358 -0
- package/mcp-server/server.cjs +200 -1103
- package/orchestrator/daemon.cjs +27 -9
- package/orchestrator/parallel-orchestrator.cjs +111 -76
- package/orchestrator/session-runner.cjs +135 -34
- package/package.json +10 -3
- package/skills/ultra-change/SKILL.md +10 -8
- package/skills/ultra-deliver/SKILL.md +17 -19
- package/skills/ultra-dev/SKILL.md +20 -11
- package/skills/ultra-doctor/SKILL.md +4 -4
- package/skills/ultra-init/SKILL.md +6 -5
- package/skills/ultra-init/references/brownfield-adoption.md +20 -14
- package/skills/ultra-plan/SKILL.md +13 -9
- package/skills/ultra-research/SKILL.md +18 -9
- package/skills/ultra-review/SKILL.md +14 -9
- package/skills/ultra-review/references/unified-schema.md +2 -0
- package/skills/ultra-review/scripts/review_wait.py +8 -0
- package/skills/ultra-status/SKILL.md +2 -2
- package/skills/ultra-test/SKILL.md +10 -6
- package/skills/ultra-think/SKILL.md +8 -7
- package/skills/ultra-think/references/interaction-boundary.md +56 -0
- package/spec/cli-protocol.md +80 -199
- package/spec/mcp-tools.yaml +43 -2806
- package/spec/schemas/state-db.sql +107 -4
- package/spec/schemas/{task-ledger.v1.schema.json → task-ledger.v2.schema.json} +70 -6
- package/ultra-tools/commands/status.cjs +369 -243
- package/mcp-server/lib/context-spine.cjs +0 -1208
- package/mcp-server/lib/decision-dialogue.cjs +0 -1128
- package/mcp-server/lib/project-breadcrumb.cjs +0 -173
- package/mcp-server/lib/spec-learning.cjs +0 -284
- package/mcp-server/lib/workflow-state.cjs +0 -3129
- package/skills/ultra-think/references/decision-dialogue.md +0 -155
|
@@ -1,155 +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 `ultra.context` for the invoking scope. The host model
|
|
151
|
-
recommends the next explicit capability from the user's goal, accepted intent,
|
|
152
|
-
evidence, recovery cost, and current warnings or blockers. MCP diagnostics describe
|
|
153
|
-
mechanical facts; they do not encode a semantic route or persist the recommendation
|
|
154
|
-
as authority. Only corruption, unsafe paths, true concurrency conflicts, permissions,
|
|
155
|
-
or irreversible external effects are hard blockers.
|