ultra-builder-pro-cli 0.6.0 → 0.7.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 (68) hide show
  1. package/.ultra-template/changes/active/.gitkeep +1 -0
  2. package/.ultra-template/changes/archive/.gitkeep +1 -0
  3. package/CHANGELOG.md +62 -11
  4. package/README.md +26 -18
  5. package/adapters/_shared/handbook.cjs +7 -7
  6. package/adapters/_shared/runtime-assets.cjs +2 -0
  7. package/adapters/_shared/tests/handbook.test.cjs +4 -1
  8. package/adapters/_shared/tests/runtime-assets.test.cjs +2 -0
  9. package/adapters/opencode.js +81 -20
  10. package/adapters/tests/codex.test.cjs +5 -3
  11. package/adapters/tests/opencode.test.cjs +16 -9
  12. package/bin/install.js +0 -19
  13. package/bin/orchestrator.js +1 -26
  14. package/commands/ultra-change.md +47 -0
  15. package/commands/ultra-deliver.md +14 -7
  16. package/commands/ultra-dev.md +6 -3
  17. package/commands/ultra-doctor.md +36 -0
  18. package/commands/ultra-init.md +4 -3
  19. package/commands/ultra-status.md +7 -5
  20. package/commands/ultra-test.md +2 -1
  21. package/docs/AGENT-CONTEXT.md +31 -23
  22. package/docs/ARCHITECTURE.md +46 -17
  23. package/docs/PLAN.zh-CN.md +35 -29
  24. package/docs/ROADMAP.md +14 -14
  25. package/docs/RUNTIME-COMPAT-MATRIX.md +11 -11
  26. package/hooks/README.md +8 -7
  27. package/hooks/active_task_context.py +22 -15
  28. package/hooks/health_check.py +136 -38
  29. package/hooks/workflow_context.py +120 -30
  30. package/mcp-server/lib/change-workflow.cjs +556 -0
  31. package/mcp-server/lib/change-workflow.test.cjs +259 -0
  32. package/mcp-server/lib/doctor.cjs +112 -0
  33. package/mcp-server/lib/doctor.test.cjs +86 -0
  34. package/mcp-server/lib/init-project.cjs +32 -6
  35. package/mcp-server/lib/runtime-state.cjs +222 -0
  36. package/mcp-server/lib/runtime-state.test.cjs +92 -0
  37. package/mcp-server/lib/state-db.cjs +31 -8
  38. package/mcp-server/lib/state-ops.cjs +17 -3
  39. package/mcp-server/server.cjs +102 -10
  40. package/mcp-server/tests/db-ops.test.cjs +5 -1
  41. package/mcp-server/tests/init-project.test.cjs +45 -0
  42. package/mcp-server/tests/server-contract.test.cjs +123 -1
  43. package/mcp-server/tests/state-db.test.cjs +44 -7
  44. package/mcp-server/tests/state-ops.test.cjs +19 -0
  45. package/orchestrator/daemon.cjs +39 -0
  46. package/orchestrator/tests/daemon.test.cjs +50 -0
  47. package/package.json +3 -3
  48. package/settings.json +1 -2
  49. package/skills/ultra-change/SKILL.md +140 -0
  50. package/skills/ultra-deliver/SKILL.md +81 -15
  51. package/skills/ultra-dev/SKILL.md +32 -12
  52. package/skills/ultra-doctor/SKILL.md +90 -0
  53. package/skills/ultra-init/SKILL.md +8 -5
  54. package/skills/ultra-review/SKILL.md +16 -0
  55. package/skills/ultra-status/SKILL.md +30 -7
  56. package/skills/ultra-test/SKILL.md +14 -2
  57. package/spec/cli-protocol.md +12 -1
  58. package/spec/mcp-tools.yaml +337 -1
  59. package/spec/schemas/mcp-tools.schema.json +1 -1
  60. package/spec/schemas/state-db.sql +117 -0
  61. package/ultra-tools/cli.cjs +3 -0
  62. package/ultra-tools/commands/system.cjs +57 -0
  63. package/ultra-tools/system-command.test.cjs +53 -0
  64. package/adapters/_shared/rtk-detect.cjs +0 -86
  65. package/adapters/_shared/tests/rtk-detect.test.cjs +0 -116
  66. package/docs/LEGACY-HERMES.md +0 -1099
  67. package/orchestrator/code-graph-watcher.cjs +0 -121
  68. package/orchestrator/tests/code-graph-watcher.test.cjs +0 -183
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Start or resume a continuous post-delivery change with bounded context, documentation impact, and linked authoritative tasks
3
+ argument-hint: "[change-id or title] [quick|standard|major|incident]"
4
+ allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion
5
+ model: opus
6
+ workflow-ref: "@skills/ultra-change/SKILL.md"
7
+ mcp_tools_required:
8
+ - change.create
9
+ - change.update
10
+ - change.get
11
+ - change.list
12
+ - change.context
13
+ - task.create
14
+ - task.list
15
+ ---
16
+
17
+ # /ultra-change
18
+
19
+ ## 目标
20
+
21
+ 把初始交付后的日常修复、功能、重构或事故变成一个持续可追踪的 change,避免
22
+ 代码、spec、测试证据和项目上下文逐步漂移。
23
+
24
+ ## Workflow
25
+
26
+ 完整流程见 `@skills/ultra-change/SKILL.md`:
27
+
28
+ 1. 先查 active/blocked change,匹配则恢复,避免重复创建。
29
+ 2. 按 `quick / standard / major / incident` 分类并声明 docs impact。
30
+ 3. 调 `change.create`,为 change 创建至少一个带 `change_id` 的 task。
31
+ 4. standard/major 写 delta + plan;调 `change.context` 编译最小上下文。
32
+ 5. 路由到 `/ultra-dev`、`/ultra-test`、`/ultra-review`、`/ultra-deliver`。
33
+
34
+ Memory 与代码图谱只允许以外部 provider 元数据引用出现;本命令不保存 provider
35
+ 正文,也不自动刷新外部 provider。
36
+
37
+ ## 用法
38
+
39
+ ```bash
40
+ /ultra-change auth-timeout quick
41
+ /ultra-change billing-redesign major
42
+ /ultra-change incident-2026-07-17 incident
43
+ ```
44
+
45
+ ## 下一步
46
+
47
+ 输出会给出 change id、artifact root、linked task 与准确的下一个 Ultra workflow。
@@ -1,18 +1,24 @@
1
1
  ---
2
- description: Release preparation — docs + build + version bump + tag + push, gated by /ultra-test pass
2
+ description: Converge and deliver a verified baseline or continuous change — reconcile specs, archive evidence, version, tag, and push
3
3
  argument-hint: "[version-type]"
4
4
  allowed-tools: Task, Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion
5
5
  model: opus
6
6
  workflow-ref: "@skills/ultra-deliver/SKILL.md"
7
7
  cli_fallback: "direct user interaction"
8
+ mcp_tools_required:
9
+ - change.list
10
+ - change.get
11
+ - change.context
12
+ - change.converge
13
+ - change.archive
8
14
  ---
9
15
 
10
16
  # /ultra-deliver
11
17
 
12
18
  ## 目标
13
19
 
14
- `/ultra-test` 绿灯后做发布准备:更新 CHANGELOG + technical-debt + README →
15
- production build → 版本号 + git tag + push。写 `.ultra/delivery-report.json`。
20
+ `/ultra-test` 绿灯后,把 active delta 合并回 baseline,重跑发布证据,调用
21
+ `change.converge` 与 `change.archive`,再完成版本号、tag、push 和 delivery report。
16
22
 
17
23
  ## 参数
18
24
 
@@ -22,14 +28,15 @@ production build → 版本号 + git tag + push。写 `.ultra/delivery-report.js
22
28
 
23
29
  ## Workflow
24
30
 
25
- 完整 5 步见 `@skills/ultra-deliver/SKILL.md`(validations → 文档 → build → 版本发布 → 产物报告)。
31
+ 完整流程见 `@skills/ultra-deliver/SKILL.md`(绑定 change → baseline reconciliation →
32
+ build/test → release commit → context/convergence/archive → tag/push → report)。
26
33
 
27
34
  **命令入口做的事**:
28
35
  1. 读 `.ultra/test-report.json` 验 `passed=true` + `git_commit === HEAD`
29
36
  2. `git status` 清洁检查;不干净 → 通过 Host 原生提问界面选处理方式
30
- 3. 驱动 skill 跑文档 + build + 版本 + tag + push
31
- 4. 写 `.ultra/delivery-report.json`
32
- 5. 输出 release summary
37
+ 3. 有 active change 时合并 delta、刷新 context,并通过确定性 convergence gate
38
+ 4. archive 完成后才允许 tag/push
39
+ 5. 写带 change id、archive path、baseline updates 的 delivery report
33
40
 
34
41
  ## 用法
35
42
 
@@ -8,6 +8,8 @@ mcp_tools_required:
8
8
  - task.update
9
9
  - task.get
10
10
  - task.list
11
+ - change.get
12
+ - change.context
11
13
  ---
12
14
 
13
15
  # /ultra-dev
@@ -34,9 +36,10 @@ v4.4→v4.5 迁移,绝不从 `tasks.json` 回退或直接改投影。
34
36
  **命令入口做的事**:
35
37
  1. 读 `.ultra/workflow-state.json` 决定新跑 vs resume
36
38
  2. 首跑通过 Host 原生提问触发 Design Approval Gate
37
- 3. 驱动 skill 走 TDD + review 循环;状态仅通过 MCP `task.update`(双写消除)
38
- 4. Step 4.5 review 通过 `/ultra-review` 和 Host 原生 subagent 执行
39
- 5. Step 4.4 pre-review checkpoint 写入 workflow-state.json,不依赖 `/compact`
39
+ 3. 驱动 skill 走 TDD + review 循环;状态仅通过 MCP `task.update`
40
+ 4. task 有 `change_id` 时把需求变化写进 active delta,并用 `change.context` 刷新上下文
41
+ 5. Step 4.5 review 通过 `/ultra-review` 和 Host 原生 subagent 执行
42
+ 6. Step 4.4 pre-review checkpoint 写入 workflow-state.json,不依赖 `/compact`
40
43
 
41
44
  ## 用法
42
45
 
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Inspect Ultra runtime health and optionally run explicit backup-first mechanical recovery
3
+ argument-hint: "[--repair]"
4
+ allowed-tools: Read, Bash
5
+ model: opus
6
+ workflow-ref: "@skills/ultra-doctor/SKILL.md"
7
+ mcp_tools_required:
8
+ - system.doctor
9
+ cli_fallback: "system doctor"
10
+ ---
11
+
12
+ # /ultra-doctor
13
+
14
+ ## 目标
15
+
16
+ 诊断 state.db、projection、incident、session 和 active change artifact 的健康状态。
17
+ 默认只读;只有显式传入 `--repair` 才允许备份后执行机械恢复。
18
+
19
+ ## Workflow
20
+
21
+ 完整契约见 `@skills/ultra-doctor/SKILL.md`。
22
+
23
+ 1. 默认调用 `system.doctor {"repair": false}`。
24
+ 2. 只报告失败检查、incident、游标落后和归属边界。
25
+ 3. `--repair` 时必须先生成 state.db 备份,再恢复 orphan、消费 staleness event、
26
+ 重排超时中断或失败的 projection 并重新投影。
27
+ 4. 修复后重新读取报告;仍 degraded 就明确剩余阻塞,不宣称完成。
28
+
29
+ ## 用法
30
+
31
+ ```bash
32
+ /ultra-doctor
33
+ /ultra-doctor --repair
34
+ ```
35
+
36
+ Memory 和代码图谱属于外部 provider,本命令既不收集也不修复它们。
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Initialize Ultra Builder Pro project — scaffold .ultra/, seed tasks.json, optional git
2
+ description: Initialize Ultra Builder Pro project — scaffold .ultra/, initialize state.db and continuous-change directories, optional git
3
3
  argument-hint: <name> <type> <stack> [git]
4
4
  allowed-tools: Read, Write, Bash, Grep, Glob, AskUserQuestion
5
5
  model: opus
@@ -13,8 +13,9 @@ cli_fallback: "task init-project"
13
13
 
14
14
  ## 目标
15
15
 
16
- 搭 `.ultra/` 骨架(specs + tasks + docs + reports);写入带元数据的 `tasks.json`;
17
- 按需初始化 git。4 个 runtime 行为一致,不依赖 Claude 独占工具。
16
+ 搭 `.ultra/` 骨架(specs + tasks + changes + docs + reports),初始化权威
17
+ `state.db`,写入带元数据的初始 `tasks.json`,并按需初始化 git。Claude Code、
18
+ OpenCode、Codex 三个 runtime 行为一致。
18
19
 
19
20
  ## 参数
20
21
 
@@ -7,6 +7,8 @@ workflow-ref: "@skills/ultra-status/SKILL.md"
7
7
  mcp_tools_required:
8
8
  - task.list
9
9
  - task.get
10
+ - change.list
11
+ - system.doctor
10
12
  ---
11
13
 
12
14
  # /ultra-status
@@ -14,7 +16,7 @@ mcp_tools_required:
14
16
  ## 目标
15
17
 
16
18
  一次调用拿整个项目近况:任务进度(来自 state.db `task.list`)+ 测试状态(`test-report.json`)+
17
- 发布状态(`delivery-report.json`)+ 风险检测 + 下一步命令路由。只读。
19
+ 发布状态(`delivery-report.json`)+ active change + runtime health + 下一步命令路由。只读。
18
20
  任务状态只接受 MCP `task.list`/`task.get`;失败时原样报告并停止,绝不读取
19
21
  `tasks.json` 冒充权威数据。旧 v4.4 数据必须先执行正式迁移。
20
22
 
@@ -30,9 +32,9 @@ mcp_tools_required:
30
32
 
31
33
  **命令入口做的事**:
32
34
  1. 环境检查(state.db 可达 + 有 task)
33
- 2. `task.list` 拿全量;读 test-report / delivery-report
34
- 3. 算进度 + 风险(blocked / stalled / overdue / complexity spike / test stale)
35
- 4. 按当前 artifact 组合路由到下一个命令(/ultra-init → /ultra-research → /ultra-plan → /ultra-dev → /ultra-test → /ultra-deliver)
35
+ 2. `task.list` + `change.list` + read-only `system.doctor`;读 test/delivery report
36
+ 3. 算进度 + 风险(含 projection、incident、context/docs drift)
37
+ 4. 初始交付后不再显示终局 Done;健康 baseline 的下一项日常工作路由到 `/ultra-change`
36
38
 
37
39
  ## 用法
38
40
 
@@ -44,4 +46,4 @@ mcp_tools_required:
44
46
  ## 下一步
45
47
 
46
48
  看输出的 `▶ Next Up` 块。常见场景:有 pending → `/ultra-dev`;全绿 → `/ultra-test`;
47
- test passed → `/ultra-deliver`。
49
+ test passed → `/ultra-deliver`;已归档且 baseline 健康 → `/ultra-change`。
@@ -6,6 +6,7 @@ model: opus
6
6
  workflow-ref: "@skills/ultra-test/SKILL.md"
7
7
  mcp_tools_required:
8
8
  - task.list
9
+ - change.list
9
10
  ---
10
11
 
11
12
  # /ultra-test
@@ -33,7 +34,7 @@ completed-task 前置检查必须来自 MCP `task.list`;失败时停止,绝
33
34
  **命令入口做的事**:
34
35
  1. 探测项目类型 + `task.list` 确认 ≥1 completed
35
36
  2. 按 scope 跑 gates;失败进 auto-fix(最多 5 轮)
36
- 3. 写 `.ultra/test-report.json`(`passed` + gate-level 明细 + blocking_issues)
37
+ 3. 写 `.ultra/test-report.json`(change_id + exact commands + gate 明细 + blocking_issues)
37
38
  4. 通过 → 提示 `/ultra-deliver`
38
39
 
39
40
  ## 用法
@@ -7,9 +7,9 @@ plugins.
7
7
 
8
8
  Ultra Builder Pro owns only:
9
9
 
10
- - ten public workflows: `learn`, `ultra-init`, `ultra-research`, `ultra-plan`,
10
+ - twelve public workflows: `learn`, `ultra-init`, `ultra-research`, `ultra-plan`,
11
11
  `ultra-dev`, `ultra-test`, `ultra-review`, `ultra-deliver`, `ultra-status`, and
12
- `ultra-think`;
12
+ `ultra-think`, plus the daily `ultra-change` and diagnostic `ultra-doctor`;
13
13
  - four internal agent-only rule skills: `code-review-expert`, `security-rules`,
14
14
  `integration-rules`, and `testing-rules`;
15
15
  - the host-specific collaboration companions and `ultra-verify`;
@@ -24,39 +24,39 @@ not put it in a plugin until that allowlist classifies it.
24
24
  ## 2. Three-layer architecture
25
25
 
26
26
  ```text
27
- native command or skill -> MCP workflow-state operation -> CLI fallback
28
- |
29
- v
30
- .ultra/state.db
27
+ native command or skill -> MCP workflow-state operation -> .ultra/state.db
28
+ ^
29
+ |
30
+ selected CLI init / doctor / diagnostics / orchestration
31
31
  ```
32
32
 
33
33
  | Layer | Artifact | Contract |
34
34
  |---|---|---|
35
35
  | Skill/command | `skills/*/SKILL.md`, `commands/*.md` | Model-facing workflow and host-native entry point |
36
36
  | MCP | `mcp-server/server.cjs` | Authoritative typed operations over `.ultra/state.db` |
37
- | CLI | `ultra-tools`, `ubp-orchestrator` | Portable fallback, automation, and diagnostics |
37
+ | CLI | `ultra-tools`, `ubp-orchestrator` | Selected initialization, backup-first recovery, automation, and diagnostics; not a change-state mirror |
38
38
 
39
- `.ultra/state.db` is the only durable Ultra authority for tasks, sessions,
40
- events, telemetry, review evidence, and circuit-breaker state. `tasks.json`,
41
- context Markdown, execution plans, and reports are projections or workflow
42
- artifacts; never treat them as a second writable authority.
39
+ `.ultra/state.db` is the only durable Ultra authority for changes, tasks,
40
+ sessions, events, incidents, projection jobs/cursors, telemetry, review evidence,
41
+ and circuit-breaker state. `tasks.json`, context Markdown, execution plans, and
42
+ reports are projections or workflow artifacts.
43
43
 
44
44
  ## 3. Live MCP and declared contracts
45
45
 
46
- `spec/mcp-tools.yaml` declares 30 contracts across seven families. The bundled
47
- server registers 21 tools:
46
+ `spec/mcp-tools.yaml` declares and the bundled server registers 29 tools across
47
+ five families:
48
48
 
49
49
  | Family | Live tools |
50
50
  |---|---|
51
51
  | `task.*` | create, update, list, get, switch_tag, delete, init_project, expand, parse_prd, dependency_topo, append_event, subscribe_events |
52
52
  | `session.*` | spawn, close, get, list, admission_check, heartbeat, subscribe_events |
53
+ | `change.*` | create, update, get, list, context, converge, archive |
54
+ | `system.*` | doctor |
53
55
  | `plan.*` | export, get |
54
56
 
55
- The nine declared `review.*`, `impact.*`, `skill.*`, and `ask.*` contracts are
56
- not advertised by the live server. A generated Codex plugin records their
57
- native replacements in `spec/codex-capability-map.json`; other hosts use their
58
- own native review agents, repository discovery, skill loader, and user
59
- interaction surfaces.
57
+ Review, repository impact discovery, skill loading, and user interaction remain
58
+ host-native capabilities rather than fake MCP contracts. The generated Codex
59
+ capability map documents those replacements.
60
60
 
61
61
  Any new MCP contract starts in `spec/mcp-tools.yaml` with valid and invalid
62
62
  fixtures. Do not add an ad-hoc server handler first.
@@ -84,17 +84,22 @@ The canonical Python hook allowlist contains seven workflow-only adapters:
84
84
  - `pre_stop_check.py` at stop;
85
85
  - `subagent_tracker.py` for bounded worker lifecycle evidence.
86
86
 
87
- Every hook is a no-op unless `.ultra/workflow-state.json` describes an active,
88
- non-terminal workflow. OpenCode expresses the same boundary in its native
89
- JavaScript plugin. Generic command blocking, post-edit governance, and unrelated
90
- user hooks are not copied into Ultra Builder Pro.
87
+ `health_check.py` and `workflow_context.py` may inspect any initialized project;
88
+ `active_task_context.py` always protects the task projection but limits ordinary
89
+ edit guidance to an active workflow. Compact/stop/subagent hooks remain
90
+ active-workflow scoped. OpenCode natively injects baseline/change context and
91
+ protects the projection; full health inspection is available through
92
+ `system.doctor` rather than a session-start health hook.
93
+ Generic command blocking, post-edit governance, and unrelated user hooks are not
94
+ copied into Ultra Builder Pro.
91
95
 
92
96
  ## 6. Memory boundary
93
97
 
94
98
  Ultra Builder Pro has no memory MCP family, recall skill, prompt capture,
95
99
  transcript capture, observation journal, or session-summary hook. Persistent
96
100
  cross-session memory belongs to a separately installed provider such as
97
- cloud-mem/claude-mem.
101
+ cloud-mem/claude-mem. Code graph content is equally external. A change context
102
+ may contain only provider metadata references, never provider payload content.
98
103
 
99
104
  Old Ultra data is never deleted during install. The explicit migration path is:
100
105
 
@@ -112,6 +117,9 @@ Archive before prune; the confirmation token is intentionally required.
112
117
  .ultra/
113
118
  ├── state.db # authoritative SQLite store
114
119
  ├── workflow-state.json # active workflow/recovery checkpoint
120
+ ├── changes/
121
+ │ ├── active/<id>/ # intent, delta, plan, compiled context, verification
122
+ │ └── archive/ # converged packets after baseline reconciliation
115
123
  ├── tasks/ # projections and task contexts
116
124
  ├── specs/ # research/product/architecture artifacts
117
125
  ├── sessions/ # bounded runtime artifacts
@@ -35,8 +35,8 @@ the supported hosts share.
35
35
  ║ ║ ║ ║ ║ fallback) ║
36
36
  ╚══════╤═══════╝ ╚════════╤═══════╝ ╚══════╤═══════╝
37
37
  │ │ │
38
- │ resolve / read │ task.* etc. │ same tools
39
- │ (D29 read-only) │ │ via stdio
38
+ │ resolve / read │ task.* etc. │ selected init /
39
+ │ (D29 read-only) │ │ recovery / ops
40
40
  └────────────┬───────┴──────────────────┘
41
41
  ▼
42
42
  ┌─────────────────────┐
@@ -53,25 +53,24 @@ 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 API | stdio MCP server exposing seven declared tool families in [`spec/mcp-tools.yaml`](../spec/mcp-tools.yaml); 21 tools are live and nine scheduled contracts map to host-native surfaces |
57
- | **CLI** | the lowest common denominator hooks can call | `ultra-tools <family> <verb>` — same contract, last-line JSON envelope (see [`spec/cli-protocol.md`](../spec/cli-protocol.md)) |
56
+ | **MCP** | authoritative workflow-state API | stdio MCP server exposing 29 live tools across task/session/change/system/plan families in [`spec/mcp-tools.yaml`](../spec/mcp-tools.yaml) |
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
60
60
  us a strongly-typed contract so we can refactor implementations without
61
- rewriting prompts; CLI gives us a Python-hook-callable fallback when a
62
- runtime's MCP transport is unavailable. None of the three could carry the
63
- load alone (D12).
61
+ rewriting prompts; the CLI supplies bounded maintenance and recovery paths when
62
+ the MCP cannot start. It is deliberately not a second change-state API:
63
+ continuous change mutations remain MCP-only and fail closed (D12).
64
64
 
65
- The skill layer is **read-only by design** (D29). We keep `skill.resolve`
66
- and `skill.manifest` to let the runtime locate a SKILL.md and parse its
67
- frontmatter; we deliberately removed `skill.invoke` and `skill.list`
68
- because skills are documentation, not RPC.
65
+ The skill layer is **read-only by design** (D29) and is discovered directly by
66
+ each host. Ultra exposes no `skill.*` MCP family: skills are documentation, not
67
+ RPC, and host-native loaders own resolution and invocation.
69
68
 
70
69
  ## 3. Authoritative state — `.ultra/state.db`
71
70
 
72
71
  All durable Ultra workflow state lives in one SQLite file with WAL enabled. Schema is
73
72
  fixed in [`spec/schemas/state-db.sql`](../spec/schemas/state-db.sql) and
74
- covers eight tables:
73
+ covers fifteen tables:
75
74
 
76
75
  | Table | Holds | Phase |
77
76
  |--------------------|---------------------------------------------------|-------|
@@ -83,6 +82,13 @@ covers eight tables:
83
82
  | `telemetry` | per-session token / cost / tool-call counters | 6 |
84
83
  | `specs_refs` | spec change tracking → staleness propagation | 5 |
85
84
  | `circuit_breaker` | bounded retry and halt state for failed tasks | 5 |
85
+ | `changes` | continuous feature/fix/incident lifecycle | 8C |
86
+ | `artifacts` | intent/context/verification artifact registry | 8C |
87
+ | `context_snapshots`| compiled context hashes, git head, provider refs | 8C |
88
+ | `trace_links` | task/spec/change traceability | 8C |
89
+ | `incidents` | structured runtime failures and resolutions | 8C |
90
+ | `projection_jobs` | durable projection outbox/retry state | 8C |
91
+ | `event_consumers` | durable monotonic consumer cursors | 8C |
86
92
 
87
93
  Two rules make this work:
88
94
 
@@ -117,9 +123,32 @@ such as cloud-mem/claude-mem owns persistent memory and its own lifecycle. The
117
123
  only related migration surface is the explicit `ultra-tools legacy-memory`
118
124
  archive/prune command for data created by older releases.
119
125
 
120
- ## 4. Sessions — the execution unit
126
+ ## 4. Continuous changes — the daily unit of convergence
121
127
 
122
- A **session** is the standard unit of execution across all four runtimes
128
+ After the initial baseline delivery, every fix, feature, redesign, or incident
129
+ is represented by a `changes` row and an inspectable packet:
130
+
131
+ ```text
132
+ active -> blocked -> active -> ready -> archived
133
+ | |
134
+ ├─ intent + delta + plan └─ verification + baseline reconciliation
135
+ ├─ linked tasks
136
+ └─ context-manifest (current HEAD + provider metadata references)
137
+ ```
138
+
139
+ `quick`, `standard`, `major`, and `incident` kinds require different evidence,
140
+ but all require completed linked tasks, current context, declared documentation
141
+ impact, and no open incident. Memory and graph payloads never enter Ultra;
142
+ `context_snapshots.provider_refs_json` stores metadata references only.
143
+
144
+ Mutating MCP calls enqueue durable `projection_jobs`. Success is exposed in MCP
145
+ response metadata; failure becomes a retryable structured incident instead of a
146
+ swallowed warning. `system.doctor` is read-only by default and performs only
147
+ backup-first mechanical recovery when explicitly requested.
148
+
149
+ ## 5. Sessions — the execution unit
150
+
151
+ A **session** is the standard unit of execution across all three runtimes
123
152
  (D20). One session =
124
153
 
125
154
  - a fresh OS process for the runtime,
@@ -139,7 +168,7 @@ This admission gate is the smallest piece that prevents two agents from
139
168
  silently double-writing the same task — it is part of the v0.1 minimum
140
169
  execution layer, not deferred to Phase 5.
141
170
 
142
- ## 5. Two timelines — rule layer vs execution layer
171
+ ## 6. Two timelines — rule layer vs execution layer
143
172
 
144
173
  The roadmap separates two concerns that compete for the same surface
145
174
  area (D13):
@@ -167,7 +196,7 @@ value from "skills + tasks survive across sessions" long before they get
167
196
  value from "ten agents in parallel." Each milestone is independently
168
197
  shippable; downstream slip never blocks an earlier release.
169
198
 
170
- ## 6. Where to look next
199
+ ## 7. Where to look next
171
200
 
172
201
  | Question | File |
173
202
  |----------------------------------------------------|-----------------------------------------------------|
@@ -177,7 +206,7 @@ shippable; downstream slip never blocks an earlier release.
177
206
  | What does a tasks.json look like after projection? | [`spec/fixtures/valid/tasks.v4.5.json`](../spec/fixtures/valid/tasks.v4.5.json) |
178
207
  | Phase-by-phase work breakdown + decision log | [`docs/PLAN.zh-CN.md`](./PLAN.zh-CN.md) |
179
208
 
180
- ## 7. Verifying the architecture
209
+ ## 8. Verifying the architecture
181
210
 
182
211
  Every contract on this page is enforced by `npm run test:spec`:
183
212