ultra-builder-pro-cli 0.10.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ultra-template/specs/architecture.md +54 -223
- package/.ultra-template/specs/discovery.md +34 -231
- package/.ultra-template/specs/product.md +44 -200
- package/.ultra-template/tasks/contexts/TEMPLATE.md +36 -0
- package/.ultra-template/tasks/tasks.json +6 -0
- package/CHANGELOG.md +86 -1
- package/README.md +21 -9
- package/adapters/_shared/codex-assets.cjs +24 -342
- package/adapters/_shared/handbook.cjs +4 -3
- package/adapters/_shared/runtime-assets.cjs +24 -0
- package/adapters/_shared/tests/handbook.test.cjs +4 -0
- package/adapters/_shared/tests/runtime-assets.test.cjs +11 -4
- package/adapters/claude.js +28 -5
- package/adapters/kimi.js +15 -138
- package/adapters/opencode.js +22 -49
- package/adapters/tests/claude.test.cjs +22 -8
- package/adapters/tests/codex.test.cjs +21 -8
- package/adapters/tests/kimi-hook.test.cjs +1 -1
- package/adapters/tests/kimi.test.cjs +11 -11
- package/adapters/tests/opencode.test.cjs +47 -8
- package/agents/code-reviewer.md +24 -85
- package/agents/debugger.md +30 -132
- package/agents/review-code.md +24 -104
- package/agents/review-comments.md +20 -83
- package/agents/review-coordinator.md +40 -137
- package/agents/review-design.md +21 -118
- package/agents/review-errors.md +22 -70
- package/agents/review-spec.md +36 -0
- package/agents/review-tests.md +20 -76
- package/agents/tdd-runner.md +26 -84
- package/commands/learn.md +5 -36
- package/commands/ultra-change.md +5 -43
- package/commands/ultra-deliver.md +4 -46
- package/commands/ultra-dev.md +4 -48
- package/commands/ultra-doctor.md +4 -30
- package/commands/ultra-init.md +5 -47
- package/commands/ultra-plan.md +5 -48
- package/commands/ultra-research.md +5 -54
- package/commands/ultra-status.md +5 -44
- package/commands/ultra-test.md +5 -45
- package/commands/ultra-think.md +5 -40
- package/docs/AGENT-CONTEXT.md +16 -8
- package/docs/ARCHITECTURE.md +32 -5
- package/docs/PLAN.zh-CN.md +8 -6
- package/docs/ROADMAP.md +5 -3
- package/docs/RUNTIME-COMPAT-MATRIX.md +8 -5
- package/docs/SKILL-AUTHORING.md +75 -0
- package/docs/STATE-DB-ACCESS-POLICY.md +17 -11
- package/docs/USER-HANDBOOK-CONTRACT.md +8 -5
- package/hooks/README.md +4 -3
- package/hooks/adapters/codex.py +1 -1
- package/hooks/adapters/kimi.py +1 -1
- package/hooks/context_spine.py +120 -16
- package/hooks/health_check.py +11 -0
- package/hooks/pre_stop_check.py +6 -5
- package/mcp-server/lib/baseline-workflow.cjs +415 -0
- package/mcp-server/lib/baseline-workflow.test.cjs +225 -0
- package/mcp-server/lib/change-workflow.cjs +24 -27
- package/mcp-server/lib/change-workflow.test.cjs +202 -6
- package/mcp-server/lib/context-spine.cjs +74 -9
- package/mcp-server/lib/context-spine.test.cjs +15 -0
- package/mcp-server/lib/doctor.cjs +14 -0
- package/mcp-server/lib/doctor.test.cjs +25 -1
- package/mcp-server/lib/init-project.cjs +49 -14
- package/mcp-server/lib/provider-refs.cjs +42 -0
- package/mcp-server/lib/spec-learning.test.cjs +5 -0
- package/mcp-server/lib/state-db.cjs +63 -4
- package/mcp-server/lib/state-db.test.cjs +8 -3
- package/mcp-server/server.cjs +48 -3
- package/mcp-server/tests/init-project.test.cjs +54 -8
- package/mcp-server/tests/server-contract.test.cjs +99 -2
- package/mcp-server/tests/state-db.test.cjs +11 -2
- package/package.json +3 -2
- package/skills/cc-collab/SKILL.md +16 -18
- package/skills/code-review-expert/SKILL.md +39 -114
- package/skills/code-review-expert/references/correctness-reliability.md +30 -0
- package/skills/code-review-expert/references/design-boundaries.md +26 -0
- package/skills/code-review-expert/references/removal-plan.md +17 -45
- package/skills/codex-collab/SKILL.md +23 -28
- package/skills/codex-collab/evals/evals.json +18 -23
- package/skills/integration-rules/SKILL.md +28 -67
- package/skills/learn/SKILL.md +46 -106
- package/skills/security-rules/SKILL.md +34 -56
- package/skills/testing-rules/SKILL.md +28 -52
- package/skills/ultra-change/SKILL.md +68 -114
- package/skills/ultra-deliver/SKILL.md +58 -86
- package/skills/ultra-dev/SKILL.md +46 -105
- package/skills/ultra-doctor/SKILL.md +45 -72
- package/skills/ultra-init/SKILL.md +62 -147
- package/skills/ultra-init/references/brownfield-adoption.md +65 -0
- package/skills/ultra-plan/SKILL.md +56 -89
- package/skills/ultra-research/SKILL.md +64 -152
- package/skills/ultra-research/references/architecture.md +38 -0
- package/skills/ultra-research/references/problem-product.md +39 -0
- package/skills/ultra-research/references/quality-delivery.md +34 -0
- package/skills/ultra-research/references/synthesis.md +38 -0
- package/skills/ultra-research/references/users-scope.md +40 -0
- package/skills/ultra-review/SKILL.md +54 -98
- package/skills/ultra-review/references/unified-schema.md +76 -101
- package/skills/ultra-review/scripts/review_wait.py +242 -77
- package/skills/ultra-status/SKILL.md +41 -56
- package/skills/ultra-test/SKILL.md +37 -72
- package/skills/ultra-think/SKILL.md +43 -102
- package/skills/ultra-verify/SKILL.md +44 -84
- package/skills/ultra-verify/evals/evals.json +24 -27
- package/spec/cli-protocol.md +4 -0
- package/spec/mcp-tools.yaml +223 -4
- package/spec/schemas/command-manifest.schema.json +7 -25
- package/spec/schemas/mcp-tools.schema.json +1 -1
- package/spec/schemas/skill-manifest.schema.json +9 -79
- package/spec/schemas/state-db.sql +33 -2
- package/ultra-tools/commands/status.cjs +20 -2
- package/ultra-tools/commands/task.cjs +4 -1
- package/ultra-tools/status-command.test.cjs +20 -0
- package/ultra-tools/system-command.test.cjs +5 -0
- package/skills/code-review-expert/references/code-quality-checklist.md +0 -112
- package/skills/code-review-expert/references/integration-checklist.md +0 -46
- package/skills/code-review-expert/references/security-checklist.md +0 -100
- package/skills/code-review-expert/references/solid-checklist.md +0 -65
- package/skills/ultra-research/steps/step-00-problem-validation.md +0 -154
- package/skills/ultra-research/steps/step-01-opportunity-discovery.md +0 -172
- package/skills/ultra-research/steps/step-02-market-assessment.md +0 -195
- package/skills/ultra-research/steps/step-03-competitive-landscape.md +0 -197
- package/skills/ultra-research/steps/step-04-product-strategy.md +0 -196
- package/skills/ultra-research/steps/step-05-assumptions-validation.md +0 -234
- package/skills/ultra-research/steps/step-10-user-personas.md +0 -169
- package/skills/ultra-research/steps/step-11-user-scenarios.md +0 -181
- package/skills/ultra-research/steps/step-20-user-stories.md +0 -156
- package/skills/ultra-research/steps/step-21-features-scope.md +0 -157
- package/skills/ultra-research/steps/step-22-success-metrics.md +0 -195
- package/skills/ultra-research/steps/step-30-architecture-context.md +0 -154
- package/skills/ultra-research/steps/step-31-solution-strategy.md +0 -172
- package/skills/ultra-research/steps/step-32-building-blocks.md +0 -188
- package/skills/ultra-research/steps/step-40-deployment.md +0 -123
- package/skills/ultra-research/steps/step-41-quality-risks.md +0 -135
- package/skills/ultra-research/steps/step-99-synthesis.md +0 -188
- package/skills/ultra-review/scripts/review_verdict_update.py +0 -99
package/commands/ultra-test.md
CHANGED
|
@@ -1,50 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: [scope]
|
|
4
|
-
allowed-tools: Bash, Read, Write, Edit, Task, Grep, Glob, AskUserQuestion
|
|
5
|
-
model: opus
|
|
2
|
+
description: Run the independent pre-delivery verification gate and record current acceptance evidence
|
|
3
|
+
argument-hint: "[scope]"
|
|
6
4
|
workflow-ref: "@skills/ultra-test/SKILL.md"
|
|
7
|
-
mcp_tools_required:
|
|
8
|
-
- task.list
|
|
9
|
-
- change.list
|
|
10
5
|
---
|
|
11
6
|
|
|
12
|
-
#
|
|
7
|
+
# Verify delivery readiness
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`/ultra-deliver` 前的项目级质量审计:6 类 gate(Anti-Pattern / Coverage Gap /
|
|
17
|
-
Wiring / E2E / Performance / Security)× auto-fix loop。**只读** state.db,
|
|
18
|
-
写 `.ultra/test-report.json` 作为 `/ultra-deliver` 的准入凭证。
|
|
19
|
-
completed-task 前置检查必须来自 MCP `task.list`;失败时停止,绝不回退到
|
|
20
|
-
`tasks.json`。`LEGACY_STATE_MIGRATION_REQUIRED` 必须先完成 v4.4→v4.5 迁移。
|
|
21
|
-
|
|
22
|
-
**注意**:这不是跑单测(那是 `/ultra-dev`)。这是交付前的体检。
|
|
23
|
-
|
|
24
|
-
## 参数
|
|
25
|
-
|
|
26
|
-
| 位 | 含义 | 缺省 |
|
|
27
|
-
|----|------|------|
|
|
28
|
-
| `$1` | 审计范围(`all`/`anti-pattern`/`coverage`/`e2e`/`perf`/`security`) | `all` |
|
|
29
|
-
|
|
30
|
-
## Workflow
|
|
31
|
-
|
|
32
|
-
完整 8 步见 `@skills/ultra-test/SKILL.md`(pre-check → 6 gates → auto-fix → persist → report)。
|
|
33
|
-
|
|
34
|
-
**命令入口做的事**:
|
|
35
|
-
1. 探测项目类型 + `task.list` 确认 ≥1 completed
|
|
36
|
-
2. 按 scope 跑 gates;失败进 auto-fix(最多 5 轮)
|
|
37
|
-
3. 写 `.ultra/test-report.json`(change_id + exact commands + gate 明细 + blocking_issues)
|
|
38
|
-
4. 通过 → 提示 `/ultra-deliver`
|
|
39
|
-
|
|
40
|
-
## 用法
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
/ultra-test # 全量审计
|
|
44
|
-
/ultra-test security # 只跑安全审计
|
|
45
|
-
/ultra-test coverage # 只找覆盖缺口
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 下一步
|
|
49
|
-
|
|
50
|
-
`passed=true` → `/ultra-deliver`;`passed=false` → 修或跟进 `blocking_issues`。
|
|
9
|
+
Read and follow `@skills/ultra-test/SKILL.md`, using `$ARGUMENTS` to bound the verification scope.
|
|
10
|
+
Treat the referenced skill as the only workflow definition.
|
package/commands/ultra-think.md
CHANGED
|
@@ -1,45 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: "[
|
|
4
|
-
allowed-tools: Read, Grep, Glob, Bash, Write, Task, WebSearch, WebFetch, AskUserQuestion, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, mcp__context7__resolve-library-id, mcp__context7__query-docs
|
|
5
|
-
model: opus
|
|
2
|
+
description: Analyze a consequential question with evidence, uncertainty, and proportionate stress testing
|
|
3
|
+
argument-hint: "[question]"
|
|
6
4
|
workflow-ref: "@skills/ultra-think/SKILL.md"
|
|
7
|
-
cli_fallback: "direct user interaction"
|
|
8
5
|
---
|
|
9
6
|
|
|
10
|
-
#
|
|
7
|
+
# Analyze a consequential question
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
结构化深度分析复杂问题/决策/诊断。Evidence-First 标注(Fact/Inference/Speculation)+
|
|
15
|
-
多视角 + 对抗压测(Steel-Man / Pre-Mortem / Sensitivity / Second-Order)→
|
|
16
|
-
量化置信度的推荐 + 验证计划。
|
|
17
|
-
|
|
18
|
-
## 参数
|
|
19
|
-
|
|
20
|
-
<problem>
|
|
21
|
-
$ARGUMENTS
|
|
22
|
-
</problem>
|
|
23
|
-
|
|
24
|
-
## Workflow
|
|
25
|
-
|
|
26
|
-
完整 5 步见 `@skills/ultra-think/SKILL.md`(Scope → Evidence → Multi-Perspective →
|
|
27
|
-
Adversarial → Synthesis)。
|
|
28
|
-
|
|
29
|
-
**命令入口做的事**:
|
|
30
|
-
1. 读 `$ARGUMENTS` 判定问题范围 — 模糊 → 用 Host 原生提问界面最多澄清 3 个问题
|
|
31
|
-
2. 简单问题 → 直接答;复杂 → 跑完整框架
|
|
32
|
-
3. 输出 Markdown 报告(Problem / Analysis / Options / Adversarial / Recommendation /
|
|
33
|
-
Verification / Next Steps)
|
|
34
|
-
|
|
35
|
-
## 用法
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
/ultra-think "should we switch from REST to gRPC for the internal API?"
|
|
39
|
-
/ultra-think "why is the deploy pipeline flaky every 3rd run?"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## 下一步
|
|
43
|
-
|
|
44
|
-
方案进入 spec → `/ultra-research` 补证据或 `/ultra-plan` 直接排任务;
|
|
45
|
-
纯诊断 → 跟着 Verification Plan 走,取证后再定。
|
|
9
|
+
Read and follow `@skills/ultra-think/SKILL.md`, treating `$ARGUMENTS` as the question to resolve.
|
|
10
|
+
Treat the referenced skill as the only workflow definition.
|
package/docs/AGENT-CONTEXT.md
CHANGED
|
@@ -37,18 +37,19 @@ native command or skill -> MCP workflow-state operation -> .ultra/state.db
|
|
|
37
37
|
| MCP | `mcp-server/server.cjs` | Authoritative typed operations over `.ultra/state.db` |
|
|
38
38
|
| CLI | `ultra-tools`, `ubp-orchestrator` | Selected initialization, backup-first recovery, automation, and diagnostics; not a change-state mirror |
|
|
39
39
|
|
|
40
|
-
`.ultra/state.db` is the only durable Ultra authority for changes, tasks,
|
|
40
|
+
`.ultra/state.db` is the only durable Ultra authority for baselines, changes, tasks,
|
|
41
41
|
sessions, events, incidents, projection jobs/cursors, telemetry, review evidence,
|
|
42
42
|
and circuit-breaker state. `tasks.json`, context Markdown, execution plans, and
|
|
43
43
|
reports are projections or workflow artifacts.
|
|
44
44
|
|
|
45
45
|
## 3. Live MCP and declared contracts
|
|
46
46
|
|
|
47
|
-
`spec/mcp-tools.yaml` declares and the bundled server registers
|
|
48
|
-
|
|
47
|
+
`spec/mcp-tools.yaml` declares and the bundled server registers 36 tools across
|
|
48
|
+
six families:
|
|
49
49
|
|
|
50
50
|
| Family | Live tools |
|
|
51
51
|
|---|---|
|
|
52
|
+
| `baseline.*` | start, record, get, converge |
|
|
52
53
|
| `task.*` | create, update, list, get, switch_tag, delete, init_project, expand, parse_prd, dependency_topo, append_event, subscribe_events |
|
|
53
54
|
| `session.*` | spawn, close, get, list, admission_check, heartbeat, subscribe_events |
|
|
54
55
|
| `change.*` | create, update, get, list, context, breadcrumb, learning_propose, learning_resolve, converge, archive |
|
|
@@ -67,14 +68,19 @@ fixtures. Do not add an ad-hoc server handler first.
|
|
|
67
68
|
Context Manifest v2 is a DB-backed role handoff, not a static codebase summary.
|
|
68
69
|
`change.context` compiles required references, digests, readiness, context budget,
|
|
69
70
|
public seam, exact verification command, and one next action for `plan`,
|
|
70
|
-
`implement`, `check`, or `review`. The default
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
`implement`, `check`, or `review`. The default 12-file, about 12k-token, and 40%
|
|
72
|
+
fresh-context values are attention guidance. Overflow produces warnings; it does
|
|
73
|
+
not block work or require raising a threshold. Prefer direct reads, bounded
|
|
74
|
+
excerpts, or a smaller slice when they preserve correctness, and retain all
|
|
75
|
+
necessary context when they do not.
|
|
73
76
|
|
|
74
77
|
`change.breadcrumb` is the only compact router. Hooks may inject its change/task,
|
|
75
78
|
role, gate, readiness, blockers, and one next action. They must not inject intent
|
|
76
79
|
bodies, transcripts, external memory, or graph payloads. Missing references,
|
|
77
|
-
digest drift, HEAD drift, or
|
|
80
|
+
digest drift, HEAD drift, or a missing execution seam blocks readiness. Context
|
|
81
|
+
size and an incomplete baseline are advisory during an active bounded change;
|
|
82
|
+
baseline adoption becomes a hard gate at convergence; revision and tracked-spec
|
|
83
|
+
integrity are reconciled and rechecked atomically at archive.
|
|
78
84
|
|
|
79
85
|
Stable discoveries use `change.learning_propose`; they reach the baseline only
|
|
80
86
|
through approve/reject/apply transitions in `change.learning_resolve`. Unresolved
|
|
@@ -103,7 +109,7 @@ the shared read-only `context_spine.py` breadcrumb helper:
|
|
|
103
109
|
- `active_task_context.py` before an edit;
|
|
104
110
|
- `workflow_checkpoint.py` before compaction;
|
|
105
111
|
- `workflow_resume.py` after compaction/resume;
|
|
106
|
-
- `pre_stop_check.py` at stop;
|
|
112
|
+
- `pre_stop_check.py` reports unfinished workflow position at stop without denial;
|
|
107
113
|
- `subagent_tracker.py` for bounded worker lifecycle evidence.
|
|
108
114
|
|
|
109
115
|
`workflow_context.py`, `active_task_context.py`, and `workflow_resume.py` read the
|
|
@@ -114,6 +120,8 @@ edit guidance to an active workflow. Compact/stop/subagent hooks remain
|
|
|
114
120
|
active-workflow scoped. OpenCode natively injects baseline/change context and
|
|
115
121
|
protects the projection; full health inspection is available through
|
|
116
122
|
`system.doctor` rather than a session-start health hook.
|
|
123
|
+
Advisory baseline or context-budget warnings are presentation only and never
|
|
124
|
+
reject an edit, stop, or tool call.
|
|
117
125
|
Generic command blocking, post-edit governance, and unrelated user hooks are not
|
|
118
126
|
copied into Ultra Builder Pro.
|
|
119
127
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -53,7 +53,7 @@ the supported hosts share.
|
|
|
53
53
|
| Layer | Role | Form |
|
|
54
54
|
|--------------|----------------------------------------------|-------------------------------------------------------|
|
|
55
55
|
| **skill** | knowledge carrier; tells the runtime *what to do* | `skills/<name>/SKILL.md` discovered natively by all supported runtimes |
|
|
56
|
-
| **MCP** | authoritative workflow-state and Context Spine API | stdio MCP server exposing
|
|
56
|
+
| **MCP** | authoritative workflow-state and Context Spine API | stdio MCP server exposing 36 live tools across baseline/task/session/change/system/plan families in [`spec/mcp-tools.yaml`](../spec/mcp-tools.yaml) |
|
|
57
57
|
| **CLI** | explicit initialization, recovery, diagnostics, and orchestration | `ultra-tools` / `ubp-orchestrator`; only commands listed by `--help` are executable (see [`spec/cli-protocol.md`](../spec/cli-protocol.md)) |
|
|
58
58
|
|
|
59
59
|
Why three: skills give us behavior portability across runtimes; MCP gives
|
|
@@ -70,10 +70,11 @@ RPC, and host-native loaders own resolution and invocation.
|
|
|
70
70
|
|
|
71
71
|
All durable Ultra workflow state lives in one SQLite file with WAL enabled. Schema is
|
|
72
72
|
fixed in [`spec/schemas/state-db.sql`](../spec/schemas/state-db.sql) and
|
|
73
|
-
covers
|
|
73
|
+
covers seventeen tables:
|
|
74
74
|
|
|
75
75
|
| Table | Holds | Phase |
|
|
76
76
|
|--------------------|---------------------------------------------------|-------|
|
|
77
|
+
| `baselines` | greenfield/brownfield adoption, specs, verification, unknowns, and approval | 11 |
|
|
77
78
|
| `tasks` | task rows — id, status, deps, files_modified, … | 2 |
|
|
78
79
|
| `events` | append-only event stream; `id` is subscription cursor (D31) | 2 |
|
|
79
80
|
| `sessions` | execution sessions, **including lease + heartbeat fields** (D32) | 4.5 |
|
|
@@ -101,7 +102,7 @@ Two rules make this work:
|
|
|
101
102
|
|
|
102
103
|
2. **Single writer for mutable tables, multi-writer for `events`.**
|
|
103
104
|
`.ultra/state.db` opens in WAL with `busy_timeout=5000`. The MCP
|
|
104
|
-
server holds the single writer connection for `tasks`, `sessions`,
|
|
105
|
+
server holds the single writer connection for `baselines`, `tasks`, `sessions`,
|
|
105
106
|
`changes`, `context_snapshots`, `spec_learning_candidates`, `telemetry`,
|
|
106
107
|
`specs_refs`, and `migration_history`; the CLI calls
|
|
107
108
|
those tools over stdio rather than opening its own writer. The
|
|
@@ -125,6 +126,26 @@ such as cloud-mem/claude-mem owns persistent memory and its own lifecycle. The
|
|
|
125
126
|
only related migration surface is the explicit `ultra-tools legacy-memory`
|
|
126
127
|
archive/prune command for data created by older releases.
|
|
127
128
|
|
|
129
|
+
### Project baseline adoption
|
|
130
|
+
|
|
131
|
+
`task.init_project` detects an empty repository as `greenfield` and an existing
|
|
132
|
+
codebase as `brownfield` unless the caller supplies an explicit mode. It creates
|
|
133
|
+
the same authoritative state shape without rewriting application code.
|
|
134
|
+
|
|
135
|
+
`baseline.start` opens adoption, `baseline.record` captures server-hashed spec
|
|
136
|
+
references, bounded repository/runtime evidence, actual verification results,
|
|
137
|
+
known unknowns, and metadata-only external provider references, and
|
|
138
|
+
`baseline.converge` records explicit owner approval. A ready baseline is replaced
|
|
139
|
+
only by an explicit re-adoption, preserving the superseded row for recovery.
|
|
140
|
+
|
|
141
|
+
With no active change, a missing, incomplete, or stale baseline routes to
|
|
142
|
+
`ultra-init`. During an already active bounded fix or incident it is an advisory
|
|
143
|
+
warning so recovery work remains possible. `change.converge` requires that adoption
|
|
144
|
+
has produced a `ready` baseline, but does not reject the HEAD or tracked-spec drift
|
|
145
|
+
created by the change itself. `change.archive` declares baseline updates, refreshes
|
|
146
|
+
the revision and digests, rechecks full baseline health inside the same transaction,
|
|
147
|
+
and rolls back both state and artifacts if reconciliation remains incomplete.
|
|
148
|
+
|
|
128
149
|
## 4. Continuous changes — the daily unit of convergence
|
|
129
150
|
|
|
130
151
|
After the initial baseline delivery, every fix, feature, redesign, or incident
|
|
@@ -151,8 +172,9 @@ checking, review, convergence, and recovery. Each snapshot records:
|
|
|
151
172
|
|
|
152
173
|
- one role (`plan`, `implement`, `check`, or `review`) and lifecycle gate;
|
|
153
174
|
- required context references with local digests and reasons;
|
|
154
|
-
- readiness blockers for missing/stale references or
|
|
155
|
-
|
|
175
|
+
- readiness blockers for missing/stale required references or an incomplete
|
|
176
|
+
execution contract;
|
|
177
|
+
- advisory attention budgets (12 files / about 12k tokens / 40% by default);
|
|
156
178
|
- an execution contract (`slice_kind`, public seam, exact verification command);
|
|
157
179
|
- one deterministic next action.
|
|
158
180
|
|
|
@@ -161,6 +183,11 @@ edit, and resume hooks inject only this breadcrumb, never the intent body,
|
|
|
161
183
|
provider content, or a conversation summary. A changed git HEAD marks the
|
|
162
184
|
snapshot stale and routes back to `change.context`.
|
|
163
185
|
|
|
186
|
+
File count, token estimate, and context-share overflow produce warnings, never a
|
|
187
|
+
refusal. The agent may narrow reads, load files lazily, or split a slice when that
|
|
188
|
+
preserves correctness; it must not raise a threshold merely to clear a gate or
|
|
189
|
+
drop required incident evidence.
|
|
190
|
+
|
|
164
191
|
`change.learning_propose` records a durable implementation discovery without
|
|
165
192
|
silently rewriting the baseline. `change.learning_resolve` enforces approval,
|
|
166
193
|
rejection, and applied transitions. Proposed or merely approved candidates block
|
package/docs/PLAN.zh-CN.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ultra-builder-pro-cli — 历史执行计划与决策日志
|
|
2
2
|
|
|
3
|
-
> **2026-07-
|
|
3
|
+
> **2026-07-18 当前生效边界(D50-D54,覆盖下文旧 Phase 6/7 的内置图谱、memory 与 runtime 设计)**:
|
|
4
4
|
> Ultra Builder Pro 不再拥有 `memory.*`、recall、prompt/transcript/observation/summary
|
|
5
5
|
> 收集 hook 或私有 agent memory。跨会话记忆全部交给独立安装的 cloud-mem/claude-mem。
|
|
6
6
|
> 插件只保留 12 个 Ultra 公共 workflow(新增 daily `ultra-change` 与诊断
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
> Kimi Code 采用各自 native plugin 呈现,其他旧 runtime adapter 已退役。下文所有与此冲突的
|
|
11
11
|
> memory/hindsight 章节仅作为历史实施记录,不再是当前需求或运行时契约。
|
|
12
12
|
|
|
13
|
-
**当前状态**:v0.
|
|
14
|
-
schema
|
|
15
|
-
change/context/convergence/doctor、incident debug lane、
|
|
13
|
+
**当前状态**:v0.12.1;四宿主 native plugin、36 个 live MCP tool、
|
|
14
|
+
schema 11.0(17 表)、portable Skill authoring contract、双轴 review、
|
|
15
|
+
Context Spine v2 / breadcrumb / spec-learning、持续 change/context/convergence/doctor、incident debug lane、
|
|
16
16
|
checkpoint 恢复消费与跨宿主安装 provenance/doctor 已落地;npm 发布由
|
|
17
17
|
`v*.*.*` tag 触发。以下 Phase 0-9 正文保留为 2026-04 的实施历史,不再作为
|
|
18
18
|
当前 runtime 或发布状态的事实来源。
|
|
@@ -1642,6 +1642,7 @@ Week 18 buffer(ship 中任何 Phase 的 25% 滑动吃掉)
|
|
|
1642
1642
|
| **D51** | **2026-07-17** | **runtime 收敛为 Claude Code、OpenCode、Codex**:删除第四 runtime 的 adapter、安装参数、collab skill、prompt、schema、pricing、调度与测试面;`ultra-verify` 改为当前宿主主责加单一只读外部顾问 | 用户确认不再需要第四 runtime;0.6.0 退役契约阻止其重新进入活跃源码或发布包 |
|
|
1643
1643
|
| **D52** | **2026-07-17** | **初始交付后进入持续变更闭环**:新增 `ultra-change` / `ultra-doctor`、change/context/artifact/trace/incident/projection/consumer 状态、delta-first spec、确定性 convergence 与 baseline reconciliation;删除内置 code-graph watcher 和通用命令代理,Memory/图谱只保留外部 provider 元数据引用 | 用户确认采用最佳组合落地;解决日常小改导致 spec/context 漂移、投影失败静默和异常无恢复证据的问题 |
|
|
1644
1644
|
| **D53** | **2026-07-17** | **Harness 缺口一次性闭环**:`incident` 成为带五段 `diagnosis.md` 结构门禁的 canonical debug lane;compact checkpoint 由 resume 消费、校验、择新并原子恢复;三宿主安装写 normalized provenance,`ubp --doctor` 只读校验 asset hash 与 plugin/hook/MCP/runtime contract | 将 GSD 的 debug/fresh context、GStack 的 checkpoint/readiness 与 ECC 的 doctor/provenance 思路收敛为 Ultra 自有契约;Memory 与图谱继续由外部 provider 所有,且不恢复任何已退役 surface |
|
|
1645
|
+
| **D54** | **2026-07-18** | **老项目接入与非阻断门禁闭环**:schema 11.0 新增 greenfield/brownfield baseline authority 与 `baseline.start/record/get/converge`;`task.init_project` 自动识别新旧仓库;上下文文件数、token 和占比改为 advisory warning,active change 的 baseline 问题同样只告警,`change.converge` / delivery 恢复硬门禁 | 避免 Ultra 把既有项目当新产品,也避免必要的 IM incident 因四个大文件超预算而无法施工;限制只在损坏权威、缺少执行契约、证据陈旧和最终收敛边界阻断 |
|
|
1645
1646
|
|
|
1646
1647
|
---
|
|
1647
1648
|
|
|
@@ -1666,8 +1667,9 @@ Week 18 buffer(ship 中任何 Phase 的 25% 滑动吃掉)
|
|
|
1666
1667
|
- **Session**:GSD-2 模式升级版(D20):新进程 + 独立 worktree + lease/
|
|
1667
1668
|
heartbeat(存 sessions 表) + artifact dir;Phase 4.5 实装。
|
|
1668
1669
|
- **state.db**:`.ultra/state.db` SQLite + WAL 数据库,所有 Ultra workflow
|
|
1669
|
-
状态的权威源;当前
|
|
1670
|
-
trace_links
|
|
1670
|
+
状态的权威源;当前 17 表,包含 baselines、changes、artifacts、
|
|
1671
|
+
context_snapshots、spec_learning_candidates、trace_links、incidents、
|
|
1672
|
+
projection_jobs 与 event_consumers;Phase 2 建立,D52-D54 扩展。
|
|
1671
1673
|
- **三层架构**:§4.1;skill(知识,只读发现)+ MCP(状态操作主路径)+
|
|
1672
1674
|
CLI(兜底)。
|
|
1673
1675
|
- **staleness**:task 的 spec 被改后,未开工的 pending task 自动标记
|
package/docs/ROADMAP.md
CHANGED
|
@@ -13,7 +13,7 @@ sharing one authoritative workflow store.
|
|
|
13
13
|
|
|
14
14
|
**Distribution channels (v1.0)**: npm · Homebrew · pip.
|
|
15
15
|
|
|
16
|
-
**Release line**: `0.
|
|
16
|
+
**Release line**: `0.11.x`; every release is gated by `npm run verify:release`.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -44,23 +44,25 @@ sharing one authoritative workflow store.
|
|
|
44
44
|
| 8B | Execution automation (dispatch / parallel worktree / merge) | ✅ done (D48, `8224159`) — **v0.3 ready** |
|
|
45
45
|
| 8C | Continuous change packets + context compiler + convergence + doctor | ✅ done (D52) |
|
|
46
46
|
| 10 | Context Spine v2 + breadcrumb + fresh-context budget + spec learning + two-axis review | ✅ done |
|
|
47
|
+
| 11 | Greenfield/brownfield baseline adoption + advisory context budgets + convergence gate | ✅ done |
|
|
47
48
|
| 9 | Release pipeline | npm tag publishing live; Homebrew / pip not implemented |
|
|
48
49
|
|
|
49
50
|
## What is in the repo today
|
|
50
51
|
|
|
51
52
|
```
|
|
52
53
|
spec/ ← Phase 1 single source of truth
|
|
53
|
-
├── mcp-tools.yaml (
|
|
54
|
+
├── mcp-tools.yaml (36 live tools across 6 families)
|
|
54
55
|
├── cli-protocol.md (CLI ↔ MCP mapping table)
|
|
55
56
|
├── schemas/ (state-db.sql + 4 JSON schemas)
|
|
56
57
|
├── fixtures/{valid,invalid}/ (+ v4.4-project for migration)
|
|
57
58
|
└── scripts/test-all.cjs (npm run test:spec — 7 validation stages)
|
|
58
59
|
|
|
59
60
|
mcp-server/ ← Phase 2 authoritative state layer
|
|
60
|
-
├── server.cjs (stdio MCP server,
|
|
61
|
+
├── server.cjs (stdio MCP server, 36 baseline/task/session/change/system/plan tools)
|
|
61
62
|
├── lib/
|
|
62
63
|
│ ├── state-db.cjs (SQLite + WAL + pragmas)
|
|
63
64
|
│ ├── state-ops.cjs (full write API, status state machine)
|
|
65
|
+
│ ├── baseline-workflow.cjs (project adoption + approval + reconciliation)
|
|
64
66
|
│ └── projector.cjs (state.db → tasks.json + context md)
|
|
65
67
|
└── tests/ (npm run test:state)
|
|
66
68
|
|
|
@@ -50,7 +50,7 @@ not presented as nonexistent custom agents.
|
|
|
50
50
|
| Active edit boundary | FULL, `PreToolUse Edit|Write` | FULL, `tool.execute.before` rejects projection writes | FULL, `PreToolUse Edit|Write|apply_patch` | FULL, native `PreToolUse Edit|Write` deny contract |
|
|
51
51
|
| Pre-compact checkpoint | FULL | FULL | FULL | FULL, native `PreCompact` |
|
|
52
52
|
| Post-compact context injection | FULL | FULL, native compacting context | FULL, native `PostCompact` restore | DEGRADED; checkpoint restoration runs, but Kimi 0.26/0.27 does not reinject fire-and-forget hook text |
|
|
53
|
-
|
|
|
53
|
+
| Stop lifecycle advisory | FULL, native non-blocking `Stop` | N/A, no equivalent stop event needed | FULL, native non-blocking `Stop` | FULL, native non-blocking `Stop` |
|
|
54
54
|
| Subagent lifecycle evidence | FULL | DEGRADED, no equivalent packaged event | FULL | FULL, native `SubagentStart` / `SubagentStop` |
|
|
55
55
|
|
|
56
56
|
Kimi's session bootstrap therefore also instructs recovery to inspect
|
|
@@ -63,20 +63,23 @@ applies at baseline, while compact/stop/subagent enforcement remains
|
|
|
63
63
|
active-workflow scoped. No host receives prompt capture, transcript capture,
|
|
64
64
|
observation journaling, session-summary memory, generic command blocking, or
|
|
65
65
|
generic post-edit policy.
|
|
66
|
+
Baseline-adoption and context-budget warnings are injected as advisory context;
|
|
67
|
+
they do not deny edits or stop active incident work.
|
|
66
68
|
|
|
67
69
|
## 4. MCP and state
|
|
68
70
|
|
|
69
71
|
| Capability | Claude Code | OpenCode | Codex | Kimi Code 0.26+ |
|
|
70
72
|
|---|---|---|---|---|
|
|
71
73
|
| stdio MCP registration | plugin `.mcp.json` | `opencode.json` local MCP entry | plugin `.mcp.json` | plugin `mcpServers` entry |
|
|
72
|
-
| Live/declared contracts |
|
|
74
|
+
| Live/declared contracts | 36 | 36 | 36 | 36 |
|
|
75
|
+
| Greenfield/brownfield baseline adoption | FULL | FULL | FULL | FULL |
|
|
73
76
|
| Context Spine v2 / breadcrumb | FULL | FULL, DB-generated projection consumed by native JS | FULL | FULL |
|
|
74
77
|
| Approval-gated spec learning | FULL | FULL | FULL | FULL |
|
|
75
78
|
| Host-native review/discovery/ask | native | native | documented in `codex-capability-map.json` | native Kimi tools and workers |
|
|
76
79
|
| Durable authority | project `.ultra/state.db` | project `.ultra/state.db` | project `.ultra/state.db` | project `.ultra/state.db` |
|
|
77
80
|
| Ultra memory API | N/A | N/A | N/A | N/A |
|
|
78
81
|
|
|
79
|
-
All
|
|
82
|
+
All 36 `baseline.*`, `task.*`, `session.*`, `change.*`, `system.*`, and `plan.*` operations
|
|
80
83
|
registered by `mcp-server/server.cjs` are live. Review, impact discovery, skill
|
|
81
84
|
loading, and user interaction remain host-native surfaces.
|
|
82
85
|
|
|
@@ -123,9 +126,9 @@ records. Uninstall refuses an unmanaged or conflicting root.
|
|
|
123
126
|
|
|
124
127
|
| Capability | Contract |
|
|
125
128
|
|---|---|
|
|
126
|
-
| Current state schema | `
|
|
129
|
+
| Current state schema | `11.0` |
|
|
127
130
|
| Runtime values | `claude`, `opencode`, `codex`, `kimi` |
|
|
128
|
-
| Upgrade from earlier schema | preserves
|
|
131
|
+
| Upgrade from earlier schema | preserves runtime rows, adds Context Spine state through 10.0, then adds authoritative baseline adoption state transactionally in 11.0 |
|
|
129
132
|
| Preservation gate | rows, IDs, indexes, foreign keys, telemetry, incidents, and migration history remain intact |
|
|
130
133
|
| Failure behavior | rollback; no partially upgraded authority database |
|
|
131
134
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Skill authoring contract
|
|
2
|
+
|
|
3
|
+
Ultra Builder Pro keeps one portable source workflow and adapts only runtime metadata
|
|
4
|
+
or host invocation details. This contract follows OpenAI Skills guidance and the Agent
|
|
5
|
+
Skills progressive-disclosure format:
|
|
6
|
+
|
|
7
|
+
- <https://learn.chatgpt.com/docs/build-skills>
|
|
8
|
+
- <https://learn.chatgpt.com/docs/customization/overview>
|
|
9
|
+
- <https://agentskills.io/specification>
|
|
10
|
+
- <https://agentskills.io/skill-creation/best-practices>
|
|
11
|
+
|
|
12
|
+
## Surface ownership
|
|
13
|
+
|
|
14
|
+
| Content | Owner |
|
|
15
|
+
|---|---|
|
|
16
|
+
| Repeatable task procedure and conditional references | `skills/<name>/SKILL.md` |
|
|
17
|
+
| Codex display, invocation policy, and dependencies | `skills/<name>/agents/openai.yaml` after adaptation |
|
|
18
|
+
| Host launcher | `commands/<name>.md` |
|
|
19
|
+
| Durable repository or user engineering policy | `AGENTS.md` or the host equivalent |
|
|
20
|
+
| Deterministic lifecycle enforcement | one hook implementation |
|
|
21
|
+
| Live external data or actions | MCP server or connector |
|
|
22
|
+
| Bounded delegated role | `agents/<name>.md` |
|
|
23
|
+
|
|
24
|
+
Do not duplicate a rule across these surfaces.
|
|
25
|
+
|
|
26
|
+
## Portable `SKILL.md`
|
|
27
|
+
|
|
28
|
+
Source frontmatter contains only `name` and `description`. The description says what
|
|
29
|
+
the Skill does and when it should activate. The body uses imperative, outcome-oriented
|
|
30
|
+
steps and includes only information an agent cannot reliably infer from the task,
|
|
31
|
+
repository, or host policy.
|
|
32
|
+
|
|
33
|
+
Keep the main file compact. Move conditional domain detail to `references/`, reusable
|
|
34
|
+
deterministic work to `scripts/`, and output material to `assets/`. Reference a file
|
|
35
|
+
only from the main workflow or one directly relevant reference.
|
|
36
|
+
|
|
37
|
+
## Language
|
|
38
|
+
|
|
39
|
+
The standards do not prohibit Chinese. Ultra source prompts use English as a project
|
|
40
|
+
policy because one source is transformed for Claude Code, Codex, OpenCode, and Kimi
|
|
41
|
+
Code. The host or user instruction controls the response language; a workflow must not
|
|
42
|
+
hard-code the user's output language unless language is itself part of the task.
|
|
43
|
+
|
|
44
|
+
Maintainer documentation may use the language appropriate for its audience. English
|
|
45
|
+
source prompts are a portability rule, not a claim that multilingual Skills are invalid.
|
|
46
|
+
|
|
47
|
+
## Content that does not belong in a Skill prompt
|
|
48
|
+
|
|
49
|
+
- release notes, migration history, old-version behavior, or implementation diary;
|
|
50
|
+
- host tool inventories, model pins, package paths, and dependency metadata shared by
|
|
51
|
+
only one runtime;
|
|
52
|
+
- generic engineering doctrine already owned by user or repository instructions;
|
|
53
|
+
- one-off project facts, volatile external facts, or copied datasets;
|
|
54
|
+
- duplicated command bodies, hook policy, MCP schemas, or private memory behavior;
|
|
55
|
+
- arbitrary coverage, confidence, complexity, option-count, or severity thresholds;
|
|
56
|
+
- pattern matching that turns TODOs, mocks, catch blocks, or line counts directly into
|
|
57
|
+
findings without a reachable impact;
|
|
58
|
+
- tutorial-style old/new or good/bad comparisons that do not change the workflow;
|
|
59
|
+
- menus of hypothetical alternatives when one repository default already satisfies the
|
|
60
|
+
contract.
|
|
61
|
+
|
|
62
|
+
Comparison is appropriate only when the task requires a real decision or verification:
|
|
63
|
+
compare credible alternatives against shared constraints, accepted specification
|
|
64
|
+
against delivered behavior, or independent analyses against authoritative evidence.
|
|
65
|
+
|
|
66
|
+
## Review checklist
|
|
67
|
+
|
|
68
|
+
1. Does the description state a precise use condition?
|
|
69
|
+
2. Is every instruction reusable for this Skill rather than copied global policy?
|
|
70
|
+
3. Is host-specific metadata outside the portable prompt?
|
|
71
|
+
4. Does each conditional reference earn its context cost?
|
|
72
|
+
5. Are judgments evidence-based rather than threshold-based?
|
|
73
|
+
6. Are commands thin and agents bounded?
|
|
74
|
+
7. Do positive and negative trigger evals cover accidental activation?
|
|
75
|
+
8. Do source, four generated runtimes, and package contents pass validation?
|
|
@@ -3,28 +3,30 @@
|
|
|
3
3
|
> Phase 2.2 contract. Trace: PLAN §6 Phase 2.2, decisions D18 / D32 / D37,
|
|
4
4
|
> risks R21 / R25.
|
|
5
5
|
|
|
6
|
-
`.ultra/state.db` is the only authoritative state store for
|
|
7
|
-
events, sessions, telemetry, and spec references
|
|
6
|
+
`.ultra/state.db` is the only authoritative state store for baselines, changes,
|
|
7
|
+
tasks, events, sessions, incidents, projections, telemetry, and spec references
|
|
8
|
+
(D18, D52, D54). Every process
|
|
8
9
|
that touches it must follow the rules below; deviations are bugs.
|
|
9
10
|
|
|
10
11
|
## 1. Three-role write matrix
|
|
11
12
|
|
|
12
|
-
| Role
|
|
13
|
-
|
|
14
|
-
| **MCP server** (single writer for mutables) | RW | RW | RW | RW | RW | RW |
|
|
15
|
-
| **CLI** (`ultra-tools …`)
|
|
16
|
-
| **Orchestrator daemon**
|
|
13
|
+
| Role | tasks | baselines | change/artifact state | events | sessions | telemetry | specs_refs | migration_history |
|
|
14
|
+
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
15
|
+
| **MCP server** (single writer for mutables) | RW | RW | RW | RW | RW | RW | RW | RW |
|
|
16
|
+
| **CLI** (`ultra-tools …`) | R | RW (init only) | R | RW (append-only) | R | R | R | RW (migration only) |
|
|
17
|
+
| **Orchestrator daemon** | R | R | R | RW | RW | RW | RW | R |
|
|
17
18
|
|
|
18
19
|
- **R** = read-only;
|
|
19
20
|
- **RW** = read + write;
|
|
20
21
|
- A `(append-only)` qualifier means the role may execute `INSERT INTO`
|
|
21
22
|
but never `UPDATE` / `DELETE`.
|
|
22
23
|
|
|
23
|
-
The CLI may indirectly mutate
|
|
24
|
+
The CLI may indirectly mutate ordinary workflow tables by spawning the MCP server over
|
|
24
25
|
stdio and calling `task.update`, `session.spawn`, etc. — but the actual
|
|
25
|
-
SQLite write is performed by the MCP server's writer connection. The
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
SQLite write is performed by the MCP server's writer connection. The documented
|
|
27
|
+
exceptions are initial schema/baseline creation, migration, and explicitly
|
|
28
|
+
authorized backup-first doctor recovery. The CLI never provides a parallel raw
|
|
29
|
+
write API for normal task, change, session, or baseline lifecycle updates.
|
|
28
30
|
|
|
29
31
|
The append-only carve-out for `events` exists because `events.id INTEGER
|
|
30
32
|
PRIMARY KEY AUTOINCREMENT` makes concurrent inserts collision-free under
|
|
@@ -68,7 +70,11 @@ Detection happens at boot: `statvfs` of `.ultra/state.db`'s mount;
|
|
|
68
70
|
|
|
69
71
|
| Table | Writer of record |
|
|
70
72
|
|--------------------|--------------------------------------------------------|
|
|
73
|
+
| `baselines` | MCP server (`baseline.start` / `baseline.record` / `baseline.converge`); initialization CLI may create the first row |
|
|
71
74
|
| `tasks` | MCP server (`task.create` / `task.update` / `task.delete`) |
|
|
75
|
+
| `changes` | MCP server (`change.create` / `change.update` / `change.converge` / `change.archive`) |
|
|
76
|
+
| `artifacts`, `context_snapshots`, `spec_learning_candidates`, `trace_links` | MCP server through change lifecycle tools |
|
|
77
|
+
| `incidents`, `projection_jobs`, `event_consumers`, `circuit_breaker` | MCP server; backup-first doctor recovery may perform only documented mechanical transitions |
|
|
72
78
|
| `events` | MCP server **and** any process via append-only INSERT |
|
|
73
79
|
| `sessions` | MCP server (`session.spawn` / `session.close` / `session.heartbeat`); orchestrator may write status transitions |
|
|
74
80
|
| `telemetry` | MCP server (collected from tool-call wrappers); orchestrator may dump bulk samples |
|
|
@@ -7,7 +7,7 @@ only one small managed section describing its runtime boundary.
|
|
|
7
7
|
## Source and render targets
|
|
8
8
|
|
|
9
9
|
`adapters/_shared/handbook.cjs` is the canonical source. It renders the common
|
|
10
|
-
authority, Context Spine, specification-learning, memory, hook, agent, and
|
|
10
|
+
authority, baseline adoption, Context Spine, specification-learning, memory, hook, agent, and
|
|
11
11
|
package boundaries with host-native command syntax:
|
|
12
12
|
|
|
13
13
|
| Runtime | Default target | Main invocation form |
|
|
@@ -22,10 +22,13 @@ host receives only its native invocation and collaboration names.
|
|
|
22
22
|
|
|
23
23
|
The managed block deliberately stays short. It says that `.ultra/state.db` is
|
|
24
24
|
authoritative; `change.context` compiles role/gate readiness, bounded references,
|
|
25
|
-
fresh-context budget, public seam, and exact verification;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
fresh-context budget, public seam, and exact verification; size budgets and an
|
|
26
|
+
incomplete baseline during active work are advisory, while an approved baseline is
|
|
27
|
+
required for convergence and full baseline health is restored atomically at archive;
|
|
28
|
+
hooks inject only the DB-derived
|
|
29
|
+
`change.breadcrumb`; and unresolved specification learning or either failed review
|
|
30
|
+
axis blocks convergence. Detailed procedures remain in the plugin skills so user
|
|
31
|
+
handbooks do not accumulate duplicated prompt sediment.
|
|
29
32
|
|
|
30
33
|
## Managed-block contract
|
|
31
34
|
|
package/hooks/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Ultra Builder Pro workflow hooks
|
|
2
2
|
|
|
3
3
|
These hooks observe only Ultra-owned state. Session health/context recognizes an initialized
|
|
4
|
-
`.ultra/state.db` and active continuous changes
|
|
5
|
-
|
|
4
|
+
`.ultra/state.db` and active continuous changes. Direct projection writes remain blocked;
|
|
5
|
+
context, compact, stop, and subagent lifecycle behavior is recovery-oriented and does not turn
|
|
6
|
+
advisory workflow conditions into refusal gates.
|
|
6
7
|
|
|
7
8
|
| Lifecycle | Hook | Purpose |
|
|
8
9
|
|---|---|---|
|
|
@@ -12,7 +13,7 @@ bounded to the relevant Ultra projection or a non-terminal workflow.
|
|
|
12
13
|
| Before edit | `active_task_context.py` | Protect `tasks.json` and restate the same DB-derived task breadcrumb |
|
|
13
14
|
| Before compact | `workflow_checkpoint.py` | Validate and atomically save a minimal workflow checkpoint |
|
|
14
15
|
| After compact/resume | `workflow_resume.py` | Prefer the DB breadcrumb; restore the minimal file checkpoint only when no active change owns recovery |
|
|
15
|
-
| Stop | `pre_stop_check.py` |
|
|
16
|
+
| Stop | `pre_stop_check.py` | Report an incomplete workflow boundary and allow stop |
|
|
16
17
|
| Subagent lifecycle | `subagent_tracker.py` | Append lifecycle evidence under `.ultra/runtime/` |
|
|
17
18
|
|
|
18
19
|
The plugin deliberately does not capture prompts, tool observations, transcripts, summaries, or
|
package/hooks/adapters/codex.py
CHANGED
|
@@ -175,7 +175,7 @@ def adapt_output(output: dict[str, Any], event: str) -> dict[str, Any]:
|
|
|
175
175
|
if event == "Stop":
|
|
176
176
|
if output.get("decision") == "block":
|
|
177
177
|
result["decision"] = "block"
|
|
178
|
-
result["reason"] = str(output.get("reason") or "Ultra
|
|
178
|
+
result["reason"] = str(output.get("reason") or "Ultra hook blocked stop")
|
|
179
179
|
return result
|
|
180
180
|
|
|
181
181
|
if event in {"PreCompact", "PostCompact", "SubagentStop"}:
|
package/hooks/adapters/kimi.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Kimi 0.26 uses snake_case JSON input compatible with the workflow hooks, but
|
|
5
5
|
its output contract accepts only ``message`` plus an optional structured deny.
|
|
6
|
-
This adapter preserves
|
|
6
|
+
This adapter preserves explicit projection denials and optional Stop decisions, converts foreign context
|
|
7
7
|
fields into Kimi messages, and fails open with diagnostic evidence.
|
|
8
8
|
"""
|
|
9
9
|
|