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
@@ -3,2809 +3,201 @@
3
3
  # Validated by spec/schemas/mcp-tools.schema.json (run `npm run test:spec`).
4
4
  # Current authority boundary: docs/DECISIONS.md.
5
5
 
6
- version: '1.3'
6
+ version: '2.0'
7
7
 
8
8
  info:
9
9
  title: Ultra Builder Pro MCP tool contracts
10
- phase: '1.2'
10
+ phase: '24'
11
11
  trace_to: 'docs/DECISIONS.md and mcp-server/server.cjs'
12
12
  notes: |
13
13
  This published contract contains only tools registered by the MCP server.
14
14
  Host-native review, impact, skill discovery, and human-interaction capabilities
15
15
  are documented by each adapter's capability map rather than advertised as MCP.
16
- Generators consume this YAML to derive types, validators, and CLI parsers (R19).
17
- cli_subcommand values reserve stable names; runtime availability is defined by
18
- ultra-tools <family> --help. Task lifecycle skills use MCP and fail closed.
16
+ Generators consume this YAML to derive types, validators, and CLI parsers.
17
+ cli_subcommand values reserve stable names. Skills adapt semantic workflows;
18
+ MCP persists facts, creates immutable checkpoints, and protects only transactional
19
+ safety boundaries.
19
20
  Adding a tool requires: (a) update this file, (b) add valid+invalid
20
21
  fixture to spec/fixtures/{valid,invalid}/, (c) `npm run test:spec` green.
21
22
 
22
23
  families:
23
- - { name: task, description: 'authoritative task lifecycle on state.db', phase: '2' }
24
- - { name: session, description: 'execution-unit lifecycle with single-active-lease admission (D33)', phase: '4.5' }
25
- - { name: plan, description: 'execution-plan artifact export and query (D34)', phase: '8a' }
26
- - { name: baseline, description: 'project adoption, baseline evidence, convergence, and drift authority', phase: '11' }
27
- - { name: change, description: 'continuous post-delivery change lifecycle and convergence', phase: '9' }
28
- - { name: decision, description: 'durable owner-agent alignment, one-question presentation, and approved checkpoints', phase: '16' }
29
- - { name: workflow, description: 'durable cross-stage run position, evidence, outputs, blockers, and recovery', phase: '13' }
30
- - { name: artifact, description: 'typed semantic and evidence artifact ownership, digest, provenance, and dependency graph', phase: '20' }
31
- - { name: system, description: 'read-only diagnostics and explicit backup-first repair', phase: '9' }
24
+ - { name: ultra, description: 'model-facing persistence and safety kernel', phase: '24' }
32
25
 
33
26
  tools:
34
27
 
35
- # ─────────────────────────── task family ────────────────────────────────
36
- - name: task.create
37
- family: task
38
- description: Create a new task in state.db. Emits task_created event. If `id` is omitted the server mints a uuid. Child tasks inherit the parent's change ownership; conflicting ownership is rejected.
39
- phase: '2'
40
- writer_role: mcp
41
- input_schema:
42
- type: object
43
- required: [title, type, priority]
44
- additionalProperties: false
45
- properties:
46
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$', description: 'optional caller-supplied id; otherwise server mints a uuid' }
47
- title: { type: string, minLength: 3 }
48
- type: { type: string, enum: [architecture, feature, bugfix] }
49
- priority: { type: string, enum: [P0, P1, P2, P3] }
50
- complexity: { type: integer, minimum: 1, maximum: 10 }
51
- estimated_days: { type: number, exclusiveMinimum: 0, description: 'estimated implementation effort in days' }
52
- deps: { type: array, items: { type: string } }
53
- files_modified: { type: array, items: { type: string }, description: 'Phase 8A conflict detection' }
54
- parent_id: { type: string, description: 'Phase 8A.3 parent reference; the child inherits this task change ownership' }
55
- tag: { type: string, description: 'git branch tag (Phase 7.2)' }
56
- trace_to: { type: string, description: 'spec anchor (e.g. spec/mcp-tools.yaml#task.create)' }
57
- outcome: { type: string, minLength: 1, description: 'observable result owned by this task' }
58
- slice_kind: { type: string, enum: [tracer_bullet, expand_contract, integration_checkpoint] }
59
- public_seam: { type: string, minLength: 1, description: 'public or integration seam exercised by the slice' }
60
- verification_command: { type: string, minLength: 1, description: 'exact task-level verification command' }
61
- acceptance:
62
- type: array
63
- minItems: 1
64
- items:
65
- type: object
66
- required: [id, criterion, verification]
67
- additionalProperties: false
68
- properties:
69
- id: { type: string, minLength: 1 }
70
- criterion: { type: string, minLength: 1 }
71
- verification: { type: string, minLength: 1 }
72
- context_refs:
73
- type: array
74
- minItems: 1
75
- items:
76
- type: object
77
- required: [ref, reason]
78
- additionalProperties: false
79
- properties:
80
- ref: { type: string, minLength: 1 }
81
- reason: { type: string, minLength: 1 }
82
- kind: { type: string, enum: [spec, source, test, docs, external], default: source }
83
- required: { type: boolean, default: true }
84
- expected_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
85
- digest: { type: string, pattern: '^[0-9a-f]{64}$', description: 'legacy alias for expected_digest' }
86
- anchor: { type: string, minLength: 1 }
87
- scope: { type: string, minLength: 1 }
88
- freshness_policy: { type: string, enum: [digest, existence, advisory] }
89
- docs_impact:
90
- type: object
91
- required: [status, files, rationale]
92
- additionalProperties: false
93
- properties:
94
- status: { type: string, enum: [unknown, required, none] }
95
- files: { type: array, items: { type: string, minLength: 1 } }
96
- rationale: { type: ['string', 'null'] }
97
- ownership:
98
- type: object
99
- required: [owner]
100
- additionalProperties: false
101
- properties:
102
- owner: { type: string, minLength: 1 }
103
- reviewers: { type: array, items: { type: string, minLength: 1 }, default: [] }
104
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$', description: 'active or blocked continuous change unit owning this task; inherited from parent_id when omitted' }
105
- output_schema:
106
- type: object
107
- required: [id, status, created_at]
108
- additionalProperties: false
109
- properties:
110
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
111
- status: { type: string, enum: [pending] }
112
- created_at: { type: string, format: date-time }
113
- errors:
114
- - { code: VALIDATION_ERROR, description: 'input failed schema validation' }
115
- - { code: DUPLICATE_TASK_ID, description: 'task id already exists' }
116
- - { code: TASK_NOT_FOUND, description: 'parent task does not exist' }
117
- - { code: CHANGE_NOT_FOUND, description: 'assigned change does not exist' }
118
- - { code: CHANGE_NOT_MUTABLE, description: 'assigned change no longer accepts tasks' }
119
- - { code: TASK_CHANGE_OWNERSHIP_MISMATCH, description: 'child ownership conflicts with its parent change' }
120
- - { code: BASELINE_NOT_READY, description: 'ordinary task creation requires a ready baseline or an already-authorized active change' }
121
- - { code: LEGACY_STATE_MIGRATION_REQUIRED, description: 'non-empty v4.4 projection must be migrated before state-backed tools can run' }
122
- - { code: STATE_DB_LOCKED, description: 'database is locked', retriable: true }
123
- cli_subcommand: task create
124
- emits_events: [task_created]
125
- trace_to: '§7.3, §7.1'
126
-
127
- - name: task.update
128
- family: task
129
- description: Patch a task's mutable fields. status transitions enforced server-side.
130
- phase: '2'
131
- writer_role: mcp
132
- input_schema:
133
- type: object
134
- required: [id, patch]
135
- additionalProperties: false
136
- properties:
137
- id: { type: string }
138
- patch:
139
- type: object
140
- additionalProperties: false
141
- properties:
142
- status: { type: string, enum: [pending, in_progress, completed, blocked, expanded] }
143
- priority: { type: string, enum: [P0, P1, P2, P3] }
144
- complexity: { type: integer, minimum: 1, maximum: 10 }
145
- estimated_days: { type: number, exclusiveMinimum: 0 }
146
- deps: { type: array, items: { type: string } }
147
- files_modified: { type: array, items: { type: string } }
148
- session_id: { type: string }
149
- stale: { type: boolean }
150
- tag: { type: string }
151
- trace_to: { type: string }
152
- outcome: { type: string, minLength: 1 }
153
- slice_kind: { type: string, enum: [tracer_bullet, expand_contract, integration_checkpoint] }
154
- public_seam: { type: string, minLength: 1 }
155
- verification_command: { type: string, minLength: 1 }
156
- acceptance: { type: array, items: { type: object } }
157
- context_refs: { type: array, items: { type: object } }
158
- docs_impact: { type: object }
159
- ownership: { type: object }
160
- completion_commit: { type: string, pattern: '^[0-9a-f]{7,40}$' }
161
- change_id: { type: ['string', 'null'], pattern: '^[a-zA-Z0-9_\-]+$' }
162
- output_schema:
163
- type: object
164
- required: [ok, task]
165
- additionalProperties: false
166
- properties:
167
- ok: { type: boolean }
168
- task: { type: object }
169
- errors:
170
- - { code: TASK_NOT_FOUND, description: 'no task with given id' }
171
- - { code: ILLEGAL_STATUS_TRANSITION, description: 'transition rejected by state machine' }
172
- - { code: VALIDATION_ERROR, description: 'patch failed schema validation' }
173
- - { code: CHANGE_NOT_FOUND, description: 'assigned change does not exist' }
174
- - { code: CHANGE_NOT_MUTABLE, description: 'assigned change no longer accepts task updates' }
175
- - { code: TASK_CHANGE_OWNERSHIP_MISMATCH, description: 'task ownership conflicts with its parent or children' }
176
- - { code: TASK_EXECUTION_CONTRACT_INCOMPLETE, description: 'task is not executable until its outcome, seam, checks, evidence context, docs impact, ownership, and traceability are complete' }
177
- - { code: TASK_STALE_RECONCILIATION_REQUIRED, description: 'stale can clear only while rebinding and validating the complete task execution contract' }
178
- - { code: LEGACY_STATE_MIGRATION_REQUIRED, description: 'non-empty v4.4 projection must be migrated before state-backed tools can run' }
179
- cli_subcommand: task update
180
- emits_events: [task_started, task_completed, task_blocked, task_stale_marked, task_contract_updated, task_contract_reconciled]
181
- trace_to: '§7.3, §7.2'
182
-
183
- - name: task.list
184
- family: task
185
- description: List tasks filtered by status / tag / time window.
186
- phase: '2'
187
- readonly: true
188
- writer_role: any
189
- input_schema:
190
- type: object
191
- additionalProperties: false
192
- properties:
193
- status: { type: string, enum: [pending, in_progress, completed, blocked, expanded, any] }
194
- tag: { type: string }
195
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
196
- since: { type: string, format: date-time }
197
- limit: { type: integer, minimum: 1, maximum: 1000 }
198
- output_schema:
199
- type: object
200
- required: [tasks, count]
201
- additionalProperties: false
202
- properties:
203
- tasks: { type: array, items: { type: object } }
204
- count: { type: integer, minimum: 0 }
205
- errors:
206
- - { code: VALIDATION_ERROR, description: 'filter failed schema validation' }
207
- - { code: LEGACY_STATE_MIGRATION_REQUIRED, description: 'non-empty v4.4 projection must be migrated before state-backed tools can run' }
208
- cli_subcommand: task list
209
- emits_events: []
210
- trace_to: '§7.3'
211
-
212
- - name: task.get
213
- family: task
214
- description: Fetch one task with its full row.
215
- phase: '2'
216
- readonly: true
217
- writer_role: any
218
- input_schema:
219
- type: object
220
- required: [id]
221
- additionalProperties: false
222
- properties:
223
- id: { type: string }
224
- output_schema:
225
- type: object
226
- required: [task]
227
- additionalProperties: false
228
- properties:
229
- task: { type: object }
230
- errors:
231
- - { code: TASK_NOT_FOUND, description: 'no task with given id' }
232
- cli_subcommand: task get
233
- emits_events: []
234
- trace_to: '§7.3'
235
-
236
- - name: task.ledger_get
237
- family: task
238
- description: Read the Git-facing durable baseline, Change, and task checkpoint ledger and compare it with local SQLite authority.
239
- phase: '21'
240
- readonly: true
241
- writer_role: any
242
- input_schema:
243
- type: object
244
- additionalProperties: false
245
- output_schema:
246
- type: object
247
- required: [ledger, health]
248
- additionalProperties: false
249
- properties:
250
- ledger: { type: ['object', 'null'] }
251
- health: { type: object }
252
- errors:
253
- - { code: TASK_LEDGER_INVALID, description: 'the Git ledger is malformed' }
254
- - { code: TASK_LEDGER_DIGEST_MISMATCH, description: 'ledger content does not match its digest' }
255
- - { code: TASK_LEDGER_UNSAFE, description: 'ledger path is a symlink or non-regular file' }
256
- cli_subcommand: task ledger-get
257
- emits_events: []
258
- trace_to: 'docs/ARTIFACT-AUTHORITY.md#team-task-ledger'
259
-
260
- - name: task.ledger_publish
261
- family: task
262
- description: Publish a low-frequency Git-facing baseline, Change, and task checkpoint from local SQLite authority.
263
- phase: '21'
264
- writer_role: mcp
265
- input_schema:
266
- type: object
267
- additionalProperties: false
268
- properties:
269
- reason:
270
- type: string
271
- minLength: 1
272
- default: manual_checkpoint
273
- output_schema:
274
- type: object
275
- required: [changed, path, generation, state_digest]
276
- additionalProperties: false
277
- properties:
278
- changed: { type: boolean }
279
- path: { type: string }
280
- generation: { type: integer, minimum: 0 }
281
- state_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
282
- migrated_legacy_projection: { type: boolean }
283
- legacy_backup_path: { type: string }
284
- errors:
285
- - { code: TASK_LEDGER_INVALID, description: 'the prior Git ledger is malformed' }
286
- - { code: TASK_LEDGER_DIGEST_MISMATCH, description: 'prior ledger content does not match its digest' }
287
- - { code: TASK_LEDGER_UNSAFE, description: 'ledger path is a symlink or non-regular file' }
288
- - { code: TASK_LEDGER_CHANGE_MISSING, description: 'a task has no portable owning Change' }
289
- - { code: TASK_LEDGER_LEGACY_CONFLICT, description: 'the legacy task projection differs from SQLite authority and cannot be replaced automatically' }
290
- - { code: TASK_LEDGER_REVALIDATION_REQUIRED, description: 'an imported ready baseline must converge in this checkout before publication' }
291
- cli_subcommand: task ledger-publish
292
- emits_events: [task_ledger_published]
293
- trace_to: 'docs/ARTIFACT-AUTHORITY.md#team-task-ledger'
294
-
295
- - name: task.ledger_import
296
- family: task
297
- description: Import a validated Git checkpoint into local SQLite authority with per-baseline, per-Change, and per-task conflict checks.
298
- phase: '21'
299
- writer_role: mcp
300
- input_schema:
301
- type: object
302
- additionalProperties: false
303
- output_schema:
304
- type: object
305
- required: [imported, preserved, deleted, imported_changes, preserved_changes, imported_baseline, preserved_baseline, generation, state_digest, requires_plan_revalidation, requires_baseline_revalidation, already_current]
306
- additionalProperties: false
307
- properties:
308
- imported: { type: integer, minimum: 0 }
309
- preserved: { type: integer, minimum: 0 }
310
- deleted: { type: integer, minimum: 0 }
311
- imported_changes: { type: integer, minimum: 0 }
312
- preserved_changes: { type: integer, minimum: 0 }
313
- imported_baseline: { type: boolean }
314
- preserved_baseline: { type: boolean }
315
- generation: { type: integer, minimum: 0 }
316
- state_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
317
- requires_plan_revalidation: { type: boolean }
318
- requires_baseline_revalidation: { type: boolean }
319
- already_current: { type: boolean }
320
- errors:
321
- - { code: TASK_LEDGER_INVALID, description: 'the Git ledger is malformed' }
322
- - { code: TASK_LEDGER_DIGEST_MISMATCH, description: 'ledger content does not match its digest' }
323
- - { code: TASK_LEDGER_UNSAFE, description: 'ledger path is a symlink or non-regular file' }
324
- - { code: TASK_LEDGER_CONFLICT, description: 'the same task changed locally and in Git' }
325
- - { code: TASK_LEDGER_ACTIVE_TASK_CONFLICT, description: 'Git changed a task with an active local session' }
326
- - { code: TASK_LEDGER_STALE, description: 'the Git ledger is older than the last local checkpoint' }
327
- - { code: TASK_LEDGER_HISTORY_CONFLICT, description: 'the Git ledger does not descend from the last local checkpoint' }
328
- - { code: TASK_LEDGER_CHANGE_MISSING, description: 'a task references an unavailable Change' }
329
- - { code: TASK_LEDGER_PARENT_MISSING, description: 'a task references an unavailable parent task' }
330
- - { code: TASK_LEDGER_CHANGE_CONFLICT, description: 'the same Change changed locally and in Git' }
331
- - { code: TASK_LEDGER_BASELINE_CONFLICT, description: 'the same baseline changed locally and in Git' }
332
- cli_subcommand: task ledger-import
333
- emits_events: [task_ledger_imported]
334
- trace_to: 'docs/ARTIFACT-AUTHORITY.md#team-task-ledger'
335
-
336
- - name: task.switch_tag
337
- family: task
338
- description: Change a task's tag (branch-scoped context partition, Phase 7.2). Emits task_tag_changed.
339
- phase: '7.2'
340
- writer_role: mcp
341
- input_schema:
342
- type: object
343
- required: [id, tag]
344
- additionalProperties: false
345
- properties:
346
- id: { type: string }
347
- tag: { type: ['string', 'null'] }
348
- output_schema:
349
- type: object
350
- required: [task_id, tag]
351
- additionalProperties: false
352
- properties:
353
- task_id: { type: string }
354
- tag: { type: ['string', 'null'] }
355
- from: { type: ['string', 'null'] }
356
- errors:
357
- - { code: TASK_NOT_FOUND, description: 'no task with given id' }
358
- - { code: VALIDATION_ERROR, description: 'task_id missing' }
359
- cli_subcommand: task switch-tag
360
- emits_events: [task_tag_changed]
361
- trace_to: '§6, D26'
362
-
363
- - name: task.delete
364
- family: task
365
- description: Hard-delete a task. Refuses if any in_progress session is bound.
366
- phase: '2'
367
- writer_role: mcp
368
- input_schema:
369
- type: object
370
- required: [id]
371
- additionalProperties: false
372
- properties:
373
- id: { type: string }
374
- force: { type: boolean, default: false }
375
- output_schema:
376
- type: object
377
- required: [ok]
378
- additionalProperties: false
379
- properties:
380
- ok: { type: boolean }
381
- errors:
382
- - { code: TASK_NOT_FOUND, description: 'no task with given id' }
383
- - { code: SESSION_ACTIVE, description: 'task has an active session; pass force=true to override' }
384
- cli_subcommand: task delete
385
- emits_events: []
386
- trace_to: '§7.3'
387
-
388
- - name: task.init_project
389
- family: task
390
- description: |
391
- Bootstrap `.ultra/`, classify the repository, initialize or preserve local
392
- Git authority, and complete the initialization workflow. It creates no
393
- research run; research begins only through an explicit workflow.start.
394
- phase: '3'
395
- writer_role: mcp
396
- input_schema:
397
- type: object
398
- required: [target_dir, project_name]
399
- additionalProperties: false
400
- properties:
401
- target_dir:
402
- type: string
403
- description: absolute or repo-relative path of the project root where `.ultra/` will be created
404
- project_name:
405
- type: string
406
- minLength: 1
407
- project_type:
408
- type: string
409
- enum: [web, api, cli, fullstack, other]
410
- description: optional; skill will pass detected value when available
411
- stack:
412
- type: string
413
- description: optional tech stack descriptor (comma-separated for fullstack)
414
- mode:
415
- type: string
416
- enum: [auto, greenfield, brownfield]
417
- default: auto
418
- description: auto detects whether meaningful project content already exists
419
- git_mode:
420
- type: string
421
- enum: [auto, initialize, skip]
422
- default: auto
423
- description: preserve an existing repository, initialize a missing local repository by default, or explicitly keep a non-Git workspace
424
- resume:
425
- type: boolean
426
- default: false
427
- description: preserve an existing `.ultra/`, upgrade its schema, and install only missing current scaffold files
428
- scope:
429
- type: array
430
- minItems: 1
431
- uniqueItems: true
432
- items: { type: string, minLength: 1 }
433
- default: ['.']
434
- description: project-relative repository roots governed by the initial baseline
435
- overwrite:
436
- type: boolean
437
- default: false
438
- description: when true, back up an existing `.ultra/` to `.ultra.backup.<ts>` then re-create
439
- source_template:
440
- type: string
441
- description: override path to the template root (defaults to bundled templates/.ultra/)
442
- output_schema:
443
- type: object
444
- required: [created_path, state_db_path, status, mode, baseline, copied_files, repository_profile, git, workflow]
445
- additionalProperties: false
446
- properties:
447
- created_path:
448
- type: string
449
- description: absolute path to the created `.ultra/` directory
450
- state_db_path:
451
- type: string
452
- description: absolute path to the initialized authoritative SQLite database
453
- status:
454
- type: string
455
- enum: [created, overwritten, resumed]
456
- mode:
457
- type: string
458
- enum: [greenfield, brownfield]
459
- baseline:
460
- type: object
461
- required: [id, mode, status, scope]
462
- additionalProperties: true
463
- copied_files:
464
- type: array
465
- items: { type: string }
466
- description: paths relative to created_path
467
- repository_profile:
468
- type: object
469
- description: bounded classification evidence used to route greenfield or brownfield adoption
470
- git:
471
- type: object
472
- required: [requested_mode, status, repository_root, branch, head, gitignore_path, gitignore_changed, initial_commit_required]
473
- additionalProperties: false
474
- properties:
475
- requested_mode: { type: string, enum: [auto, initialize, skip] }
476
- status: { type: string, enum: [initialized, existing, skipped] }
477
- repository_root: { type: ['string', 'null'] }
478
- branch: { type: ['string', 'null'] }
479
- head: { type: ['string', 'null'] }
480
- gitignore_path: { type: ['string', 'null'] }
481
- gitignore_changed: { type: boolean }
482
- initial_commit_required: { type: boolean }
483
- workflow:
484
- type: object
485
- description: completed initialization provenance, research status, and the allowed or required transitions
486
- backup_path:
487
- type: string
488
- description: set only when status=overwritten
489
- migration_backup_path:
490
- type: string
491
- description: pre-migration database backup created while resuming an older schema
492
- runtime_migration_backup_path:
493
- type: string
494
- description: verified backup of a legacy runtime layout moved into `.ultra/.runtime/`
495
- team_checkpoint:
496
- type: object
497
- additionalProperties: false
498
- required: [generation, state_digest, imported_tasks, deleted_tasks, imported_changes, imported_baseline, requires_plan_revalidation, requires_baseline_revalidation, already_current]
499
- properties:
500
- generation: { type: integer, minimum: 0 }
501
- state_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
502
- imported_tasks: { type: integer, minimum: 0 }
503
- deleted_tasks: { type: integer, minimum: 0 }
504
- imported_changes: { type: integer, minimum: 0 }
505
- imported_baseline: { type: boolean }
506
- requires_plan_revalidation: { type: boolean }
507
- requires_baseline_revalidation: { type: boolean }
508
- already_current: { type: boolean }
509
- published:
510
- type: boolean
511
- description: true when resume replaced a matching legacy task projection with a new team checkpoint
512
- migrated_legacy_projection:
513
- type: boolean
514
- description: true when the prior tracked file used the supported legacy projection format
515
- legacy_backup_path:
516
- type: string
517
- description: exact-byte backup of the replaced legacy task projection
518
- errors:
519
- - { code: ULTRA_DIR_EXISTS, description: '.ultra/ already exists and overwrite=false' }
520
- - { code: TEMPLATE_MISSING, description: 'source_template path does not exist' }
521
- - { code: TARGET_NOT_DIR, description: 'target_dir is not a directory' }
522
- - { code: BASELINE_SCOPE_MISSING, description: 'a selected baseline scope does not exist' }
523
- - { code: LEGACY_STATE_MIGRATION_REQUIRED, description: 'projection-only tasks must be imported before resume' }
524
- - { code: STATE_AUTHORITY_CONFLICT, description: 'projection tasks and authoritative state cannot be reconciled automatically' }
525
- - { code: STATE_PROJECTION_INVALID, description: 'the existing task projection is malformed' }
526
- - { code: TASK_LEDGER_LEGACY_CONFLICT, description: 'the legacy task projection differs from SQLite authority and cannot be upgraded automatically' }
527
- - { code: GIT_INIT_FAILED, description: 'the local Git repository or Ultra ignore rule could not be initialized' }
528
- - { code: GITIGNORE_UNSAFE, description: 'root .gitignore is a symlink or non-file and cannot be updated safely' }
529
- - { code: GITIGNORE_INEFFECTIVE, description: 'the effective Git rules still expose the `.ultra` authority' }
530
- - { code: IO_ERROR, description: 'filesystem write failed', retriable: true }
531
- cli_subcommand: task init-project
532
- emits_events: [project_initialized, project_resumed]
533
- trace_to: 'mcp-server/lib/init-project.cjs'
534
-
535
- - name: task.expand
536
- family: task
537
- description: Validate and atomically persist child tasks derived by the current host from one parent task.
538
- phase: '8a'
539
- writer_role: mcp
540
- input_schema:
541
- type: object
542
- required: [id, children]
543
- additionalProperties: false
544
- properties:
545
- id: { type: string }
546
- children:
547
- type: array
548
- minItems: 1
549
- items:
550
- type: object
551
- required: [id, title, type, priority]
552
- additionalProperties: false
553
- properties:
554
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
555
- title: { type: string, minLength: 3, maxLength: 200 }
556
- type: { type: string, enum: [architecture, feature, bugfix] }
557
- priority: { type: string, enum: [P0, P1, P2, P3] }
558
- complexity: { type: integer, minimum: 1, maximum: 10 }
559
- deps: { type: array, items: { type: string } }
560
- files_modified: { type: array, items: { type: string } }
561
- output_schema:
562
- type: object
563
- required: [parent_id, children]
564
- additionalProperties: false
565
- properties:
566
- parent_id: { type: string }
567
- children: { type: array, items: { type: object } }
568
- errors:
569
- - { code: TASK_NOT_FOUND, description: 'parent id missing' }
570
- - { code: ALREADY_EXPANDED, description: 'task is already expanded' }
571
- - { code: CHANGE_NOT_FOUND, description: 'the parent task change does not exist' }
572
- - { code: CHANGE_NOT_MUTABLE, description: 'the parent task change no longer accepts children' }
573
- - { code: BASELINE_NOT_READY, description: 'child creation requires a ready baseline or the parent task to belong to an already-authorized active change' }
574
- - { code: INVALID_OUTPUT, description: 'the host-derived child task graph is invalid' }
575
- cli_subcommand: task expand
576
- emits_events: [task_expanded]
577
- trace_to: '§7.3, D34'
578
-
579
- - name: task.parse_prd
580
- family: task
581
- description: Validate a host-derived PRD task graph and optionally persist it inside the current plan workflow.
582
- phase: '8a'
583
- writer_role: mcp
584
- input_schema:
585
- type: object
586
- required: [tasks]
587
- additionalProperties: false
588
- properties:
589
- tasks:
590
- type: array
591
- minItems: 1
592
- items:
593
- type: object
594
- required: [id, title, type, priority]
595
- additionalProperties: false
596
- properties:
597
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
598
- title: { type: string, minLength: 3, maxLength: 200 }
599
- type: { type: string, enum: [architecture, feature, bugfix] }
600
- priority: { type: string, enum: [P0, P1, P2, P3] }
601
- complexity: { type: integer, minimum: 1, maximum: 10 }
602
- deps: { type: array, items: { type: string } }
603
- files_modified: { type: array, items: { type: string } }
604
- tag: { type: string }
605
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$', description: 'continuous change unit that will own every persisted parsed task' }
606
- dry_run: { type: boolean, default: false, description: 'when true, validate and preview without persisting to state.db' }
607
- output_schema:
608
- type: object
609
- required: [tasks, topo]
610
- additionalProperties: false
611
- properties:
612
- tasks: { type: array, items: { type: object } }
613
- topo: { type: array, items: { type: array, items: { type: string } } }
614
- errors:
615
- - { code: PARSE_FAILED, description: 'the host-derived PRD task graph is invalid' }
616
- - { code: CYCLE_DETECTED, description: 'the proposed task graph contains a dependency cycle' }
617
- - { code: CHANGE_REQUIRED, description: 'persisting a parsed task graph requires an owning change_id' }
618
- - { code: CHANGE_NOT_FOUND, description: 'assigned change does not exist' }
619
- - { code: CHANGE_NOT_MUTABLE, description: 'assigned change no longer accepts tasks' }
620
- - { code: BASELINE_NOT_READY, description: 'persisting parsed tasks requires a ready baseline or an already-authorized active change' }
621
- cli_subcommand: task parse-prd
622
- emits_events: [task_created]
623
- trace_to: '§7.3, D34'
624
-
625
- - name: task.dependency_topo
626
- family: task
627
- description: Compute topological waves for a set of tasks; consumed by execution-plan.
628
- phase: '8a'
629
- readonly: true
630
- input_schema:
631
- type: object
632
- additionalProperties: false
633
- oneOf:
634
- - required: [task_ids]
635
- - required: [change_id]
636
- properties:
637
- task_ids: { type: array, minItems: 1, uniqueItems: true, items: { type: string } }
638
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
639
- output_schema:
640
- type: object
641
- required: [waves]
642
- additionalProperties: false
643
- properties:
644
- waves: { type: array, items: { type: array, items: { type: string } } }
645
- cycles: { type: array, items: { type: array, items: { type: string } } }
646
- errors:
647
- - { code: CYCLE_DETECTED, description: 'dependency graph has cycles' }
648
- - { code: TASK_NOT_FOUND, description: 'an explicitly requested task does not exist' }
649
- - { code: CHANGE_NOT_FOUND, description: 'the requested owning change does not exist' }
650
- cli_subcommand: task topo
651
- emits_events: []
652
- trace_to: '§7.3, D34'
653
-
654
- - name: task.append_event
655
- family: task
656
- description: Append a non-authoritative observation to the event timeline. Lifecycle events are emitted only by their owning mutation tools. Returns the assigned subscribe cursor.
657
- phase: '2'
658
- writer_role: any
659
- input_schema:
660
- type: object
661
- required: [type]
662
- additionalProperties: false
663
- properties:
664
- task_id: { type: string }
665
- change_id: { type: string }
666
- session_id: { type: string }
667
- runtime: { type: string, enum: [claude, opencode, codex, kimi] }
668
- type:
669
- type: string
670
- enum:
671
- - context_updated
672
- - commit_pushed
673
- - merge_conflict
674
- - cost_alert
675
- - token_alert
676
- - circuit_open
677
- payload: { type: object }
678
- output_schema:
679
- type: object
680
- required: [event_id, ts]
681
- additionalProperties: false
682
- properties:
683
- event_id: { type: integer, minimum: 1 }
684
- ts: { type: string, format: date-time }
685
- errors:
686
- - { code: VALIDATION_ERROR, description: 'event payload failed validation' }
687
- - { code: STATE_DB_LOCKED, description: 'database is locked', retriable: true }
688
- cli_subcommand: task append-event
689
- emits_events: []
690
- trace_to: '§7.2, D31'
691
-
692
- - name: task.subscribe_events
693
- family: task
694
- description: Pull events with id > since_id. Cursor is monotonic (D31, R26).
695
- phase: '2'
696
- readonly: true
697
- input_schema:
698
- type: object
699
- required: [since_id]
700
- additionalProperties: false
701
- properties:
702
- since_id: { type: integer, minimum: 0 }
703
- types: { type: array, items: { type: string } }
704
- task_id: { type: string }
705
- limit: { type: integer, minimum: 1, maximum: 500, default: 100 }
706
- output_schema:
707
- type: object
708
- required: [events, next_since_id]
709
- additionalProperties: false
710
- properties:
711
- events: { type: array, items: { type: object } }
712
- next_since_id: { type: integer, minimum: 0 }
713
- errors:
714
- - { code: VALIDATION_ERROR, description: 'cursor or filter invalid' }
715
- cli_subcommand: task subscribe
716
- emits_events: []
717
- trace_to: '§7.2, D31'
718
-
719
- # ────────────────────────── session family ──────────────────────────────
720
- - name: session.spawn
721
- family: session
722
- description: Admit a plan-authorized execution session, create its isolated Git worktree and artifact directory, and register the lease. Change-owned tasks must retain their complete accepted contract, current completed plan, dependency readiness, and non-stale executable status. The current host launches its bounded worker inside the returned worktree.
723
- phase: '4.5'
724
- writer_role: mcp
725
- input_schema:
726
- type: object
727
- required: [task_id, runtime]
728
- additionalProperties: false
729
- properties:
730
- task_id: { type: string }
731
- runtime: { type: string, enum: [claude, opencode, codex, kimi] }
732
- takeover: { type: boolean, default: false, description: 'override active lease (D33 takeover strategy)' }
733
- worktree_base:
734
- type: string
735
- description: optional path resolving inside the repository `.ultra/.runtime/worktrees` boundary; outside paths are rejected
736
- output_schema:
737
- type: object
738
- required: [sid, worktree_path, artifact_dir, lease_expires_at, worktree_created]
739
- additionalProperties: false
740
- properties:
741
- sid: { type: string }
742
- worktree_path: { type: string }
743
- artifact_dir: { type: string }
744
- lease_expires_at: { type: string, format: date-time }
745
- worktree_created: { type: boolean }
746
- errors:
747
- - { code: TASK_NOT_FOUND, description: 'task id missing' }
748
- - { code: ADMISSION_DENIED, description: 'active lease exists; choose takeover/resume/abandon' }
749
- - { code: SESSION_CLOSE_PENDING, description: 'an unfinished durable close intent must recover before spawn or takeover' }
750
- - { code: NESTED_SESSION_FORBIDDEN, description: 'an active worker must resume its assigned session instead of recursively spawning another one' }
751
- - { code: TAKEOVER_FAILED, description: 'prior owned worker could not be terminated safely' }
752
- - { code: TASK_EXECUTION_CONTRACT_INCOMPLETE, description: 'change-owned task contract is incomplete' }
753
- - { code: WORKFLOW_TASK_NOT_EXECUTABLE, description: 'task status or staleness blocks execution' }
754
- - { code: TASK_DEPENDENCIES_INCOMPLETE, description: 'one or more task dependencies have not converged' }
755
- - { code: WORKFLOW_PLAN_NOT_COMPLETED, description: 'owning change has no healthy completed plan workflow' }
756
- - { code: WORKFLOW_PLAN_TASK_SET_STALE, description: 'change task set differs from the current converged plan' }
757
- - { code: WORKFLOW_PLAN_TASK_CONTRACT_STALE, description: 'task contract differs from the current converged plan' }
758
- - { code: WORKFLOW_PLAN_CONTEXT_STALE, description: 'the planning Context no longer matches the current checkout or required references' }
759
- - { code: WORKFLOW_IMPLEMENTATION_CONTEXT_REQUIRED, description: 'the task has no exact ready implementation Context' }
760
- - { code: WORKFLOW_IMPLEMENTATION_CONTEXT_STALE, description: 'the task implementation Context is stale, blocked, or bound to different authority' }
761
- - { code: WORKTREE_SCOPE_INVALID, description: 'requested worktree base escapes the managed project boundary' }
762
- - { code: WORKTREE_FAILED, description: 'Git worktree creation failed or the repository has no usable HEAD' }
763
- - { code: WORKTREE_AUTHORITY_MISSING, description: 'central `.ultra/.runtime/state.db` disappeared before worktree binding' }
764
- - { code: WORKTREE_AUTHORITY_NOT_IGNORED, description: 'a safe local ignore rule for the `.ultra` authority link could not be established' }
765
- - { code: WORKTREE_AUTHORITY_CONFLICT, description: 'the isolated checkout already contains a conflicting `.ultra` entry' }
766
- - { code: WORKTREE_AUTHORITY_LINK_FAILED, description: 'the isolated checkout could not be linked to central Ultra authority' }
767
- cli_subcommand: session spawn
768
- emits_events: [session_spawned]
769
- trace_to: '§7.3, D20, D33'
770
-
771
- - name: session.close
772
- family: session
773
- description: Close a session and release its lease. Preserve the worktree by default; explicit cleanup succeeds only after Git proves it is clean and integrated.
774
- phase: '4.5'
775
- writer_role: mcp
776
- input_schema:
777
- type: object
778
- required: [sid, status]
779
- additionalProperties: false
780
- properties:
781
- sid: { type: string }
782
- status: { type: string, enum: [completed, crashed] }
783
- remove_worktree: { type: boolean, default: false }
784
- output_schema:
785
- type: object
786
- required: [ok, worktree_preserved]
787
- additionalProperties: false
788
- properties:
789
- ok: { type: boolean }
790
- worktree_preserved: { type: boolean }
791
- errors:
792
- - { code: SESSION_NOT_FOUND, description: 'sid unknown' }
793
- - { code: WORKER_SESSION_PARENT_OWNED, description: 'an active worker must exit and let its supervising parent settle the lease' }
794
- - { code: SESSION_SCOPE_VIOLATION, description: 'an active worker attempted to close a session it does not own' }
795
- - { code: WORKTREE_NOT_INTEGRATED, description: 'Explicit cleanup refused because work is uncommitted, unverified, or not integrated into the current checkout' }
796
- cli_subcommand: session close
797
- emits_events: [session_closed, session_crashed]
798
- trace_to: '§7.3, D32'
799
-
800
- - name: session.get
801
- family: session
802
- description: Fetch a session row.
803
- phase: '4.5'
804
- readonly: true
805
- input_schema:
806
- type: object
807
- required: [sid]
808
- additionalProperties: false
809
- properties:
810
- sid: { type: string }
811
- output_schema:
812
- type: object
813
- required: [session]
814
- additionalProperties: false
815
- properties:
816
- session: { type: object }
817
- errors:
818
- - { code: SESSION_NOT_FOUND, description: 'sid unknown' }
819
- cli_subcommand: session get
820
- emits_events: []
821
- trace_to: '§7.3'
822
-
823
- - name: session.list
824
- family: session
825
- description: List sessions filtered by status (default 'running') and optional task_id. Read-only snapshot for /ultra-status + orchestrator dashboards.
826
- phase: '4.5'
827
- readonly: true
828
- input_schema:
829
- type: object
830
- additionalProperties: false
831
- properties:
832
- status: { type: string, enum: [running, completed, crashed, orphan] }
833
- task_id: { type: string }
834
- limit: { type: integer, minimum: 1, maximum: 500, default: 100 }
835
- output_schema:
836
- type: object
837
- required: [sessions, count]
838
- additionalProperties: false
839
- properties:
840
- sessions: { type: array, items: { type: object } }
841
- count: { type: integer, minimum: 0 }
842
- errors:
843
- - { code: STATE_DB_ERROR, description: 'database unavailable', retriable: true }
844
- cli_subcommand: session list
845
- emits_events: []
846
- trace_to: '§7.3, Phase 4.5.4'
847
-
848
- - name: session.admission_check
849
- family: session
850
- description: Check the same task, dependency, current-plan, staleness, breaker, and lease gates enforced by session.spawn. Returns a recommended lease action only after workflow authority is executable.
851
- phase: '4.5'
852
- readonly: true
853
- input_schema:
854
- type: object
855
- required: [task_id]
856
- additionalProperties: false
857
- properties:
858
- task_id: { type: string }
859
- runtime: { type: string, enum: [claude, opencode, codex, kimi] }
860
- output_schema:
861
- type: object
862
- required: [can_spawn, recommended_action]
863
- additionalProperties: false
864
- properties:
865
- can_spawn: { type: boolean }
866
- conflict:
867
- type: object
868
- properties:
869
- sid: { type: string }
870
- status: { type: string }
871
- heartbeat_age_ms: { type: integer, minimum: 0 }
872
- recommended_action:
873
- type: string
874
- enum: [spawn, takeover, resume, abandon, recover_close, blocked_by_breaker]
875
- errors:
876
- - { code: TASK_NOT_FOUND, description: 'task id missing' }
877
- - { code: TASK_EXECUTION_CONTRACT_INCOMPLETE, description: 'change-owned task contract is incomplete' }
878
- - { code: WORKFLOW_TASK_NOT_EXECUTABLE, description: 'task status or staleness blocks execution' }
879
- - { code: TASK_DEPENDENCIES_INCOMPLETE, description: 'one or more task dependencies have not converged' }
880
- - { code: WORKFLOW_PLAN_NOT_COMPLETED, description: 'owning change has no healthy completed plan workflow' }
881
- - { code: WORKFLOW_PLAN_TASK_SET_STALE, description: 'change task set differs from the current converged plan' }
882
- - { code: WORKFLOW_PLAN_TASK_CONTRACT_STALE, description: 'task contract differs from the current converged plan' }
883
- - { code: WORKFLOW_PLAN_CONTEXT_STALE, description: 'the planning Context no longer matches the current checkout or required references' }
884
- - { code: WORKFLOW_IMPLEMENTATION_CONTEXT_REQUIRED, description: 'the task has no exact ready implementation Context' }
885
- - { code: WORKFLOW_IMPLEMENTATION_CONTEXT_STALE, description: 'the task implementation Context is stale, blocked, or bound to different authority' }
886
- cli_subcommand: session admission
887
- emits_events: []
888
- trace_to: '§7.3, D33'
889
-
890
- - name: session.heartbeat
891
- family: session
892
- description: Refresh lease for a running session. Lease expires after grace period without heartbeat.
893
- phase: '4.5'
894
- writer_role: mcp
895
- input_schema:
896
- type: object
897
- required: [sid]
898
- additionalProperties: false
899
- properties:
900
- sid: { type: string }
901
- output_schema:
902
- type: object
903
- required: [ok, lease_expires_at]
904
- additionalProperties: false
905
- properties:
906
- ok: { type: boolean }
907
- lease_expires_at: { type: string, format: date-time }
908
- errors:
909
- - { code: SESSION_NOT_FOUND, description: 'sid unknown' }
910
- - { code: LEASE_EXPIRED, description: 'lease already expired; need takeover/resume' }
911
- cli_subcommand: session heartbeat
912
- emits_events: [session_heartbeat_lost]
913
- trace_to: '§7.3, D32'
914
-
915
- - name: session.subscribe_events
916
- family: session
917
- description: Pull session-related events with cursor.
918
- phase: '4.5'
919
- readonly: true
920
- input_schema:
921
- type: object
922
- required: [since_id]
923
- additionalProperties: false
924
- properties:
925
- since_id: { type: integer, minimum: 0 }
926
- sid: { type: string }
927
- limit: { type: integer, minimum: 1, maximum: 500, default: 100 }
928
- output_schema:
929
- type: object
930
- required: [events, next_since_id]
931
- additionalProperties: false
932
- properties:
933
- events: { type: array, items: { type: object } }
934
- next_since_id: { type: integer, minimum: 0 }
935
- errors:
936
- - { code: VALIDATION_ERROR, description: 'cursor invalid' }
937
- cli_subcommand: session subscribe
938
- emits_events: []
939
- trace_to: '§7.3, D31'
940
-
941
- # ───────────────────────── baseline family ─────────────────────────────
942
- - name: baseline.start
943
- family: baseline
944
- description: Start a greenfield baseline or brownfield adoption without overwriting a ready baseline implicitly.
945
- phase: '11'
946
- writer_role: mcp
947
- input_schema:
948
- type: object
949
- required: [project_name, mode]
950
- additionalProperties: false
951
- allOf:
952
- - if:
953
- required: [replace_ready]
954
- properties: { replace_ready: { const: true } }
955
- then: { required: [replacement_authorization] }
956
- - if: { required: [replacement_authorization] }
957
- then:
958
- required: [replace_ready]
959
- properties: { replace_ready: { const: true } }
960
- properties:
961
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$', default: project-baseline }
962
- project_name: { type: string, minLength: 1 }
963
- project_type: { type: string, enum: [web, api, cli, fullstack, other] }
964
- stack: { type: string }
965
- mode: { type: string, enum: [greenfield, brownfield] }
966
- scope: { type: array, minItems: 1, items: { type: string, minLength: 1 }, default: ['.'] }
967
- repository_revision: { type: string, minLength: 1 }
968
- replace_ready: { type: boolean, default: false }
969
- replacement_authorization:
970
- type: object
971
- required: [approved_by, reason]
972
- additionalProperties: false
973
- properties:
974
- approved_by: { type: string, minLength: 1 }
975
- reason: { type: string, minLength: 3 }
976
- replace_migrated: { type: boolean, default: false, description: explicitly supersede a compatibility-only migrated baseline and start evidence-backed adoption }
977
- classification: { type: object, description: bounded repository classification evidence; content is limited to 32 KiB }
978
- provider_refs:
979
- type: object
980
- additionalProperties: false
981
- properties:
982
- memory:
983
- type: object
984
- required: [provider]
985
- additionalProperties: false
986
- properties:
987
- provider: { type: string }
988
- project: { type: string }
989
- reference: { type: string }
990
- revision: { type: string }
991
- indexed_head: { type: string }
992
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
993
- code_graph:
994
- type: object
995
- required: [provider]
996
- additionalProperties: false
997
- properties:
998
- provider: { type: string }
999
- project: { type: string }
1000
- reference: { type: string }
1001
- revision: { type: string }
1002
- indexed_head: { type: string }
1003
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1004
- output_schema:
1005
- type: object
1006
- required: [baseline]
1007
- additionalProperties: false
1008
- properties:
1009
- baseline: { type: object }
1010
- errors:
1011
- - { code: BASELINE_EXISTS, description: 'a ready baseline requires explicit replacement' }
1012
- - { code: BASELINE_IN_PROGRESS, description: 'another adoption is already active' }
1013
- - { code: BASELINE_REPLACEMENT_AUTHORIZATION_REQUIRED, description: 'ready-baseline replacement lacks durable owner approval and rationale' }
1014
- - { code: BASELINE_REPLACEMENT_INVALID, description: 'replacement flags do not match the current baseline lifecycle or authorization payload' }
1015
- - { code: BASELINE_SCOPE_MISSING, description: 'a selected baseline scope does not exist' }
1016
- - { code: PROVIDER_CONTENT_FORBIDDEN, description: 'provider payload content must remain external' }
1017
- cli_subcommand: baseline start
1018
- emits_events: [baseline_started]
1019
-
1020
- - name: baseline.record
1021
- family: baseline
1022
- description: Replace the current adoption snapshot with bounded specification digests, evidence references, verification, unknowns, and provider metadata.
1023
- phase: '11'
1024
- writer_role: mcp
1025
- input_schema:
1026
- type: object
1027
- required: [id]
1028
- additionalProperties: false
1029
- properties:
1030
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1031
- repository_revision: { type: string, minLength: 1 }
1032
- scope: { type: array, minItems: 1, items: { type: string, minLength: 1 } }
1033
- spec_refs:
1034
- type: array
1035
- items:
1036
- type: object
1037
- required: [kind, path]
1038
- additionalProperties: false
1039
- properties:
1040
- kind: { type: string, enum: [discovery, product, architecture, quality, delivery, other] }
1041
- path: { type: string, minLength: 1 }
1042
- evidence:
1043
- type: array
1044
- items:
1045
- type: object
1046
- required: [kind, ref, summary]
1047
- additionalProperties: false
1048
- properties:
1049
- kind: { type: string, enum: [source, docs, runtime, test, deploy, external] }
1050
- ref: { type: string, minLength: 1 }
1051
- summary: { type: string, minLength: 1 }
1052
- verification:
1053
- type: array
1054
- items:
1055
- type: object
1056
- required: [name, command, status, evidence]
1057
- additionalProperties: false
1058
- properties:
1059
- name: { type: string, minLength: 1 }
1060
- command: { type: string, minLength: 1 }
1061
- status: { type: string, enum: [pass, known_red, not_run] }
1062
- evidence: { type: string, minLength: 1 }
1063
- rationale: { type: string, minLength: 1 }
1064
- unknowns:
1065
- type: array
1066
- items:
1067
- type: object
1068
- required: [summary, blocking]
1069
- additionalProperties: false
1070
- properties:
1071
- summary: { type: string, minLength: 1 }
1072
- blocking: { type: boolean }
1073
- owner: { type: string, minLength: 1 }
1074
- gaps:
1075
- type: array
1076
- items:
1077
- type: object
1078
- required: [id, category, summary]
1079
- additionalProperties: false
1080
- properties:
1081
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1082
- category: { type: string, enum: [baseline_blocker, documentation_drift, known_defect, technical_debt, unknown, future_change] }
1083
- status: { type: string, enum: [open, accepted, resolved, deferred], default: open }
1084
- blocking: { type: boolean, default: false }
1085
- summary: { type: string, minLength: 1 }
1086
- evidence_refs: { type: array, uniqueItems: true, items: { type: string, minLength: 1 }, default: [] }
1087
- owner: { type: ['string', 'null'], minLength: 1 }
1088
- resolution: { type: string, minLength: 1 }
1089
- classification: { type: object, description: bounded repository classification evidence; content is limited to 32 KiB }
1090
- provider_refs:
1091
- type: object
1092
- additionalProperties: false
1093
- properties:
1094
- memory:
1095
- type: object
1096
- required: [provider]
1097
- additionalProperties: false
1098
- properties:
1099
- provider: { type: string }
1100
- project: { type: string }
1101
- reference: { type: string }
1102
- revision: { type: string }
1103
- indexed_head: { type: string }
1104
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1105
- code_graph:
1106
- type: object
1107
- required: [provider]
1108
- additionalProperties: false
1109
- properties:
1110
- provider: { type: string }
1111
- project: { type: string }
1112
- reference: { type: string }
1113
- revision: { type: string }
1114
- indexed_head: { type: string }
1115
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1116
- output_schema:
1117
- type: object
1118
- required: [baseline]
1119
- additionalProperties: false
1120
- properties:
1121
- baseline: { type: object }
1122
- errors:
1123
- - { code: BASELINE_NOT_FOUND, description: 'baseline id does not exist' }
1124
- - { code: BASELINE_NOT_MUTABLE, description: 'ready and superseded baselines are immutable' }
1125
- - { code: BASELINE_GIT_HEAD_REQUIRED, description: 'Git is initialized but the owner-authorized initial checkpoint commit does not exist' }
1126
- - { code: BASELINE_SPEC_MISSING, description: 'a declared specification file does not exist' }
1127
- - { code: BASELINE_SCOPE_MISSING, description: 'a selected baseline scope does not exist' }
1128
- - { code: PROVIDER_CONTENT_FORBIDDEN, description: 'provider payload content must remain external' }
1129
- cli_subcommand: baseline record
1130
- emits_events: [baseline_recorded]
1131
-
1132
- - name: baseline.get
1133
- family: baseline
1134
- description: Read the current or named authoritative baseline with live digest and repository-revision health.
1135
- phase: '11'
1136
- readonly: true
1137
- input_schema:
1138
- type: object
1139
- additionalProperties: false
1140
- properties:
1141
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1142
- output_schema:
1143
- type: object
1144
- required: [baseline, health]
1145
- additionalProperties: false
1146
- properties:
1147
- baseline: { type: object }
1148
- health: { type: object }
1149
- errors:
1150
- - { code: BASELINE_NOT_FOUND, description: 'no matching baseline exists' }
1151
- cli_subcommand: baseline get
1152
- emits_events: []
1153
-
1154
- - name: baseline.converge
1155
- family: baseline
1156
- description: Approve a baseline only when its revision, specification digests, evidence, verification, and blocking unknowns satisfy deterministic gates.
1157
- phase: '11'
1158
- writer_role: mcp
1159
- input_schema:
1160
- type: object
1161
- required: [id, expected_revision, approved_by, approval_note]
1162
- additionalProperties: false
1163
- properties:
1164
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1165
- expected_revision: { type: string, minLength: 1 }
1166
- approved_by: { type: string, minLength: 1 }
1167
- approval_note: { type: string, minLength: 3 }
1168
- accept_known_red: { type: boolean, default: false }
1169
- accept_dirty_worktree: { type: boolean, default: false, description: explicitly freeze the exact recorded dirty-worktree digest into the baseline }
1170
- output_schema:
1171
- type: object
1172
- required: [ready, status, blockers, baseline]
1173
- additionalProperties: false
1174
- properties:
1175
- ready: { type: boolean }
1176
- status: { type: string, enum: [blocked, ready] }
1177
- blockers: { type: array, items: { type: string } }
1178
- baseline: { type: object }
1179
- errors:
1180
- - { code: BASELINE_NOT_FOUND, description: 'baseline id does not exist' }
1181
- - { code: BASELINE_NOT_CONVERGEABLE, description: 'baseline lifecycle does not allow convergence' }
1182
- - { code: BASELINE_NOT_READY, description: 'baseline evidence, gaps, revision, branch, worktree, or verification still blocks convergence' }
1183
- cli_subcommand: baseline converge
1184
- emits_events: [baseline_blocked, baseline_converged]
1185
-
1186
- # ────────────────────────── change family ──────────────────────────────
1187
- - name: change.create
1188
- family: change
1189
- description: Capture a continuous feature, fix, redesign, or incident change contract; incidents also register a five-section diagnosis artifact. Planning context is compiled separately.
1190
- phase: '9'
1191
- writer_role: mcp
1192
- input_schema:
1193
- type: object
1194
- required: [id, title, kind, intent, contract, classification, research_disposition]
1195
- additionalProperties: false
1196
- properties:
1197
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1198
- title: { type: string, minLength: 3 }
1199
- kind: { type: string, enum: [quick, standard, major, incident] }
1200
- intent: { type: string, minLength: 3 }
1201
- contract: &change_contract
1202
- type: object
1203
- required: [outcome, acceptance, non_goals, public_seams, recovery, unresolved_decisions]
1204
- additionalProperties: false
1205
- properties:
1206
- outcome: { type: string, minLength: 1 }
1207
- acceptance:
1208
- type: array
1209
- minItems: 1
1210
- items:
1211
- type: object
1212
- required: [id, criterion, verification]
1213
- additionalProperties: false
1214
- properties:
1215
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1216
- criterion: { type: string, minLength: 1 }
1217
- verification: { type: string, minLength: 1 }
1218
- non_goals: { type: array, minItems: 1, items: { type: string, minLength: 1 } }
1219
- public_seams: { type: array, minItems: 1, items: { type: string, minLength: 1 } }
1220
- recovery:
1221
- type: object
1222
- required: [strategy, verification]
1223
- additionalProperties: false
1224
- properties:
1225
- strategy: { type: string, minLength: 1 }
1226
- verification: { type: string, minLength: 1 }
1227
- unresolved_decisions:
1228
- type: array
1229
- items:
1230
- type: object
1231
- required: [id, summary, blocking]
1232
- additionalProperties: false
1233
- properties:
1234
- id: { type: string, minLength: 1 }
1235
- summary: { type: string, minLength: 1 }
1236
- blocking: { type: boolean }
1237
- owner: { type: ['string', 'null'] }
1238
- classification: &change_classification
1239
- type: object
1240
- required: [rationale, risk_flags]
1241
- additionalProperties: false
1242
- properties:
1243
- rationale: { type: string, minLength: 1 }
1244
- risk_flags:
1245
- type: array
1246
- uniqueItems: true
1247
- items:
1248
- type: string
1249
- enum: [public_contract, schema_migration, data_migration, authorization, security, multi_module, external_integration, release_semantics]
1250
- research_disposition: &change_research_disposition
1251
- type: object
1252
- required: [status, mode, selected_steps, rationale]
1253
- additionalProperties: false
1254
- properties:
1255
- status: { type: string, enum: [none, bounded, required] }
1256
- mode: { type: ['string', 'null'], enum: [product, feature, architecture, custom, null] }
1257
- selected_steps: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
1258
- rationale: { type: string, minLength: 1 }
1259
- alignment_thread_id: { type: string, description: 'confirmed decision checkpoint that produced this change contract' }
1260
- base_commit: { type: string, pattern: '^[0-9a-f]{7,40}$' }
1261
- baseline_bypass:
1262
- type: object
1263
- required: [reason, approved_by]
1264
- additionalProperties: false
1265
- properties:
1266
- reason: { type: string, minLength: 3 }
1267
- approved_by: { type: string, minLength: 1 }
1268
- description: incident-only break-glass approval when the project baseline is unhealthy
1269
- docs_impact:
1270
- type: object
1271
- additionalProperties: false
1272
- properties:
1273
- status: { type: string, enum: [unknown, required, none] }
1274
- files: { type: array, items: { type: string } }
1275
- rationale: { type: ['string', 'null'] }
1276
- provider_refs:
1277
- type: object
1278
- additionalProperties: false
1279
- properties:
1280
- memory:
1281
- type: object
1282
- required: [provider]
1283
- additionalProperties: false
1284
- properties:
1285
- provider: { type: string }
1286
- project: { type: string }
1287
- reference: { type: string }
1288
- revision: { type: string }
1289
- indexed_head: { type: string }
1290
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1291
- code_graph:
1292
- type: object
1293
- required: [provider]
1294
- additionalProperties: false
1295
- properties:
1296
- provider: { type: string }
1297
- project: { type: string }
1298
- reference: { type: string }
1299
- revision: { type: string }
1300
- indexed_head: { type: string }
1301
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1302
- output_schema:
1303
- type: object
1304
- required: [change, intent_path, context_manifest_path, workflow]
1305
- additionalProperties: false
1306
- properties:
1307
- change: { type: object }
1308
- intent_path: { type: string }
1309
- context_manifest_path: { type: ['string', 'null'] }
1310
- workflow: { type: object }
1311
- errors:
1312
- - { code: DUPLICATE_CHANGE_ID, description: 'change id already exists' }
1313
- - { code: PROVIDER_CONTENT_FORBIDDEN, description: 'provider payload content must remain external' }
1314
- - { code: VALIDATION_ERROR, description: 'change input failed validation' }
1315
- - { code: BASELINE_NOT_READY, description: 'ordinary work is blocked until the project baseline is healthy' }
1316
- - { code: BASELINE_BYPASS_REQUIRED, description: 'an incident on an unhealthy baseline requires explicit break-glass approval' }
1317
- - { code: CHANGE_CONTRACT_REQUIRED, description: 'outcome, acceptance, seams, recovery, or decisions are incomplete' }
1318
- - { code: CHANGE_CLASSIFICATION_REQUIRED, description: 'classification rationale or risk flags are incomplete' }
1319
- - { code: CHANGE_RESEARCH_DISPOSITION_REQUIRED, description: 'research routing is incomplete or inconsistent' }
1320
- - { code: CHANGE_PROFILE_ESCALATION_REQUIRED, description: 'quick profile conflicts with material risk or research' }
1321
- - { code: CHANGE_ALIGNMENT_REQUIRED, description: 'declared alignment thread is missing, unconfirmed, stale, not artifact-bound, bound to another authority, or not scoped to the current baseline' }
1322
- cli_subcommand: change create
1323
- emits_events: [change_created, workflow_started, workflow_step_updated, workflow_completed]
1324
-
1325
- - name: change.update
1326
- family: change
1327
- description: Update mutable change authority. Semantic changes invalidate only registered transitive consumers so affected tasks and contexts must be reconciled before execution.
1328
- phase: '9'
1329
- writer_role: mcp
1330
- input_schema:
1331
- type: object
1332
- required: [id, patch]
1333
- additionalProperties: false
1334
- properties:
1335
- id: { type: string }
1336
- patch:
1337
- type: object
1338
- additionalProperties: false
1339
- properties:
1340
- title: { type: string, minLength: 3 }
1341
- intent: { type: string, minLength: 3 }
1342
- status: { type: string, enum: [active, blocked, cancelled] }
1343
- docs_impact:
1344
- type: object
1345
- additionalProperties: false
1346
- properties:
1347
- status: { type: string, enum: [unknown, required, none] }
1348
- files: { type: array, items: { type: string } }
1349
- rationale: { type: ['string', 'null'] }
1350
- provider_refs:
1351
- type: object
1352
- additionalProperties: false
1353
- properties:
1354
- memory:
1355
- type: object
1356
- required: [provider]
1357
- additionalProperties: false
1358
- properties:
1359
- provider: { type: string }
1360
- project: { type: string }
1361
- reference: { type: string }
1362
- revision: { type: string }
1363
- indexed_head: { type: string }
1364
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1365
- code_graph:
1366
- type: object
1367
- required: [provider]
1368
- additionalProperties: false
1369
- properties:
1370
- provider: { type: string }
1371
- project: { type: string }
1372
- reference: { type: string }
1373
- revision: { type: string }
1374
- indexed_head: { type: string }
1375
- status: { type: string, enum: [available, unavailable, fresh, stale, unknown] }
1376
- contract: *change_contract
1377
- classification: *change_classification
1378
- research_disposition: *change_research_disposition
1379
- output_schema:
1380
- type: object
1381
- required: [ok, change]
1382
- additionalProperties: false
1383
- properties:
1384
- ok: { type: boolean }
1385
- change: { type: object }
1386
- errors:
1387
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1388
- - { code: CHANGE_NOT_MUTABLE, description: 'ready, archived, and cancelled changes are immutable' }
1389
- - { code: ILLEGAL_CHANGE_TRANSITION, description: 'change transition is not permitted' }
1390
- - { code: PROVIDER_CONTENT_FORBIDDEN, description: 'provider payload content must remain external' }
1391
- cli_subcommand: change update
1392
- emits_events: [task_stale_marked, change_updated]
1393
-
1394
- - name: change.delta
1395
- family: change
1396
- description: Record the typed Change-owned delta overlay against exact baseline anchors without mutating baseline specifications.
1397
- phase: '21'
1398
- writer_role: mcp
1399
- input_schema:
1400
- type: object
1401
- required:
1402
- [id, baseline_anchor, decisions, non_goals, acceptance, documentation_impact, unknowns, mutations]
1403
- additionalProperties: false
1404
- properties:
1405
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1406
- baseline_anchor:
1407
- type: object
1408
- required: [baseline_id, repository_revision, specs]
1409
- additionalProperties: false
1410
- properties:
1411
- baseline_id: { type: string, minLength: 1 }
1412
- repository_revision: { type: ['string', 'null'] }
1413
- specs:
1414
- type: array
1415
- items:
1416
- type: object
1417
- required: [path, digest]
1418
- additionalProperties: false
1419
- properties:
1420
- path: { type: string, minLength: 1 }
1421
- digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1422
- decisions:
1423
- type: array
1424
- items:
1425
- type: object
1426
- required: [id, summary]
1427
- additionalProperties: false
1428
- properties:
1429
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1430
- summary: { type: string, minLength: 1 }
1431
- rationale: { type: string, minLength: 1 }
1432
- non_goals: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
1433
- acceptance:
1434
- type: array
1435
- minItems: 1
1436
- items:
1437
- type: object
1438
- required: [id, criterion, verification]
1439
- additionalProperties: false
1440
- properties:
1441
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1442
- criterion: { type: string, minLength: 1 }
1443
- verification: { type: string, minLength: 1 }
1444
- documentation_impact:
1445
- type: object
1446
- required: [status, files, rationale]
1447
- additionalProperties: false
1448
- properties:
1449
- status: { type: string, enum: [none, required] }
1450
- files: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
1451
- rationale: { type: string, minLength: 3 }
1452
- unknowns:
1453
- type: array
1454
- items:
1455
- type: object
1456
- required: [id, summary, blocking]
1457
- additionalProperties: false
1458
- properties:
1459
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1460
- summary: { type: string, minLength: 1 }
1461
- blocking: { type: boolean }
1462
- no_semantic_change_reason: { type: string, minLength: 3 }
1463
- mutations:
1464
- type: array
1465
- items:
1466
- type: object
1467
- required:
1468
- [id, action, target_path, overlay_path, before_digest, after_digest, acceptance_refs, documentation_refs]
1469
- additionalProperties: false
1470
- properties:
1471
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1472
- action: { type: string, enum: [add, update] }
1473
- target_path: { type: string, minLength: 1 }
1474
- overlay_path: { type: string, minLength: 1 }
1475
- before_digest: { type: ['string', 'null'], pattern: '^[0-9a-f]{64}$' }
1476
- after_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1477
- acceptance_refs: { type: array, minItems: 1, uniqueItems: true, items: { type: string, minLength: 1 } }
1478
- documentation_refs: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
1479
- allOf:
1480
- - if:
1481
- properties:
1482
- mutations: { maxItems: 0 }
1483
- then:
1484
- required: [no_semantic_change_reason]
1485
- output_schema:
1486
- type: object
1487
- required: [delta, artifact, payload_artifacts, progress_artifact]
1488
- additionalProperties: false
1489
- properties:
1490
- delta: { type: object }
1491
- artifact: { type: object }
1492
- payload_artifacts: { type: array, items: { type: object } }
1493
- progress_artifact: { type: object }
1494
- errors:
1495
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1496
- - { code: CHANGE_NOT_MUTABLE, description: 'terminal Change authority cannot accept a delta' }
1497
- - { code: CHANGE_DELTA_INVALID, description: 'delta shape or typed mutation contract is invalid' }
1498
- - { code: CHANGE_DELTA_CONTRACT_MISMATCH, description: 'delta does not match accepted Change non-goals, acceptance, or documentation impact' }
1499
- - { code: CHANGE_DELTA_BASELINE_CONFLICT, description: 'baseline id, revision, specification digest, or target bytes changed' }
1500
- - { code: CHANGE_DELTA_PAYLOAD_MISSING, description: 'a declared Change overlay file is missing' }
1501
- - { code: CHANGE_DELTA_PAYLOAD_STALE, description: 'a declared Change overlay digest is stale' }
1502
- cli_subcommand: change delta
1503
- emits_events: [artifact_recorded, spec_changed, change_delta_recorded]
1504
-
1505
- - name: change.documentation_reconcile
1506
- family: change
1507
- description: Record Change-owned documentation before/after digests, delta and acceptance trace, verification, and explicit consumer or no-consumer evidence.
1508
- phase: '21'
1509
- writer_role: mcp
1510
- input_schema:
1511
- type: object
1512
- required: [id, delta_artifact_id, delta_digest, documents]
1513
- additionalProperties: false
1514
- properties:
1515
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1516
- delta_artifact_id: { type: string, minLength: 1 }
1517
- delta_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1518
- no_change_reason: { type: string, minLength: 3 }
1519
- documents:
1520
- type: array
1521
- items:
1522
- type: object
1523
- required:
1524
- [path, action, overlay_path, before_digest, after_digest, delta_refs, acceptance_refs, verification, consumers]
1525
- additionalProperties: false
1526
- properties:
1527
- path: { type: string, minLength: 1 }
1528
- action: { type: string, enum: [add, update] }
1529
- overlay_path: { type: string, minLength: 1 }
1530
- before_digest: { type: ['string', 'null'], pattern: '^[0-9a-f]{64}$' }
1531
- after_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1532
- delta_refs: { type: array, minItems: 1, uniqueItems: true, items: { type: string } }
1533
- acceptance_refs: { type: array, minItems: 1, uniqueItems: true, items: { type: string } }
1534
- verification:
1535
- type: array
1536
- minItems: 1
1537
- items:
1538
- type: object
1539
- required: [command, status, evidence_refs]
1540
- additionalProperties: false
1541
- properties:
1542
- command: { type: string, minLength: 1 }
1543
- status: { type: string, const: pass }
1544
- evidence_refs:
1545
- type: array
1546
- minItems: 1
1547
- uniqueItems: true
1548
- items: { type: string, minLength: 1 }
1549
- consumers:
1550
- type: array
1551
- items:
1552
- type: object
1553
- required: [type, id, relation]
1554
- additionalProperties: false
1555
- properties:
1556
- type: { type: string, enum: [artifact, project, baseline, change, task, workflow, external] }
1557
- id: { type: string, minLength: 1 }
1558
- relation: { type: string, minLength: 1 }
1559
- no_consumer_reason: { type: string, minLength: 3 }
1560
- allOf:
1561
- - if:
1562
- properties:
1563
- documents: { maxItems: 0 }
1564
- then:
1565
- required: [no_change_reason]
1566
- output_schema:
1567
- type: object
1568
- required: [reconciliation, artifact, payload_artifacts, progress_artifact]
1569
- additionalProperties: false
1570
- properties:
1571
- reconciliation: { type: object }
1572
- artifact: { type: object }
1573
- payload_artifacts: { type: array, items: { type: object } }
1574
- progress_artifact: { type: object }
1575
- errors:
1576
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1577
- - { code: DOCUMENTATION_DELTA_AUTHORITY_INVALID, description: 'documentation is not bound to the current Change delta' }
1578
- - { code: DOCUMENTATION_RECONCILIATION_INCOMPLETE, description: 'declared documentation impact is not covered exactly' }
1579
- - { code: DOCUMENTATION_ORPHAN_UNRESOLVED, description: 'a changed document lacks a consumer or explicit no-consumer reason' }
1580
- - { code: DOCUMENTATION_BASELINE_CONFLICT, description: 'a documentation target changed after its before digest was recorded' }
1581
- - { code: DOCUMENTATION_EVIDENCE_STALE, description: 'documentation overlay bytes do not match the recorded after digest' }
1582
- cli_subcommand: change documentation-reconcile
1583
- emits_events: [artifact_recorded, spec_changed, documentation_reconciliation_recorded]
1584
-
1585
- - name: change.get
1586
- family: change
1587
- description: Read one continuous change unit and its specification-learning candidates from authoritative state.
1588
- phase: '9'
1589
- readonly: true
1590
- input_schema:
1591
- type: object
1592
- required: [id]
1593
- additionalProperties: false
1594
- properties:
1595
- id: { type: string }
1596
- output_schema:
1597
- type: object
1598
- required: [change]
1599
- additionalProperties: false
1600
- properties:
1601
- change: { type: object }
1602
- errors:
1603
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1604
- cli_subcommand: change get
1605
- emits_events: []
1606
-
1607
- - name: change.list
1608
- family: change
1609
- description: List continuous changes by lifecycle status or change kind.
1610
- phase: '9'
1611
- readonly: true
1612
- input_schema:
1613
- type: object
1614
- additionalProperties: false
1615
- properties:
1616
- status: { type: string, enum: [active, blocked, ready, archived, cancelled] }
1617
- kind: { type: string, enum: [quick, standard, major, incident] }
1618
- limit: { type: integer, minimum: 1, maximum: 500 }
1619
- output_schema:
1620
- type: object
1621
- required: [changes, count]
1622
- additionalProperties: false
1623
- properties:
1624
- changes: { type: array, items: { type: object } }
1625
- count: { type: integer, minimum: 0 }
1626
- errors:
1627
- - { code: VALIDATION_ERROR, description: 'change filter failed validation' }
1628
- cli_subcommand: change list
1629
- emits_events: []
1630
-
1631
- - name: change.context
1632
- family: change
1633
- description: Compile an immutable role-scoped Context Spine snapshot with authoritative readiness and allowed or required transitions. A host may attach a clearly non-authoritative recommendation.
1634
- phase: '10'
1635
- writer_role: mcp
1636
- input_schema:
1637
- type: object
1638
- required: [id]
1639
- additionalProperties: false
1640
- not:
1641
- required: [context_refs, spec_refs]
1642
- properties:
1643
- id: { type: string }
1644
- task_id: { type: string }
1645
- role: { type: string, enum: [plan, implement, check, review] }
1646
- gate: { type: string, enum: [alignment, planning, implementation, verification, review, convergence, recovery] }
1647
- spec_refs:
1648
- type: array
1649
- maxItems: 64
1650
- items:
1651
- type: object
1652
- required: [ref]
1653
- additionalProperties: false
1654
- properties:
1655
- ref: { type: string, minLength: 1, maxLength: 2048 }
1656
- reason: { type: string, minLength: 1, maxLength: 2048 }
1657
- required: { type: boolean, default: true }
1658
- expected_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1659
- anchor: { type: string, minLength: 1, maxLength: 512 }
1660
- scope: { type: string, minLength: 1, maxLength: 512 }
1661
- freshness_policy: { type: string, enum: [digest, existence, advisory] }
1662
- context_refs:
1663
- type: array
1664
- maxItems: 64
1665
- items:
1666
- type: object
1667
- required: [ref, reason]
1668
- additionalProperties: false
1669
- properties:
1670
- ref: { type: string, minLength: 1, maxLength: 2048 }
1671
- kind: { type: string, enum: [spec, source, test, docs, external], default: source }
1672
- reason: { type: string, minLength: 3, maxLength: 2048 }
1673
- required: { type: boolean, default: true }
1674
- digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1675
- expected_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1676
- anchor: { type: string, minLength: 1, maxLength: 512 }
1677
- scope: { type: string, minLength: 1, maxLength: 512 }
1678
- freshness_policy: { type: string, enum: [digest, existence, advisory] }
1679
- budget:
1680
- type: object
1681
- additionalProperties: false
1682
- properties:
1683
- max_tokens: { type: integer, minimum: 1, default: 12000 }
1684
- max_files: { type: integer, minimum: 1, default: 12 }
1685
- execution_contract:
1686
- type: object
1687
- additionalProperties: false
1688
- properties:
1689
- context_budget_percent: { type: integer, minimum: 1, maximum: 100, default: 40 }
1690
- recommendation:
1691
- type: object
1692
- required: [workflow, rationale]
1693
- additionalProperties: false
1694
- properties:
1695
- workflow: { type: string, minLength: 1 }
1696
- rationale: { type: string, minLength: 3 }
1697
- output_schema:
1698
- type: object
1699
- required: [manifest_path, manifest_hash, manifest]
1700
- additionalProperties: false
1701
- properties:
1702
- manifest_path: { type: string }
1703
- manifest_hash: { type: string, pattern: '^[0-9a-f]{64}$' }
1704
- manifest: { type: object }
1705
- errors:
1706
- - { code: VALIDATION_ERROR, description: 'context role, gate, references, budget, or execution contract is invalid' }
1707
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1708
- - { code: CHANGE_TERMINAL, description: 'terminal change cannot compile a new context' }
1709
- - { code: TASK_NOT_FOUND, description: 'task id is not linked to the change' }
1710
- - { code: EXECUTION_CONTRACT_CONFLICT, description: 'Prompt input attempted to override the DB-backed task seam or verification command' }
1711
- - { code: EXECUTION_CONTEXT_REFS_CONFLICT, description: 'Prompt input attempted to override DB-backed task context references' }
1712
- - { code: CONTEXT_LEGACY_NEXT_ACTION_UNSUPPORTED, description: 'a canonical next action is not an MCP authority field; use a non-authoritative host recommendation' }
1713
- - { code: CONTEXT_PROVIDER_REFS_MUTATION_UNSUPPORTED, description: 'provider references must be updated through change.update before context compilation' }
1714
- cli_subcommand: change context
1715
- emits_events: [context_updated]
1716
-
1717
- - name: change.breadcrumb
1718
- family: change
1719
- description: Read the compact DB-derived Context Spine position, readiness, allowed transitions, and any mechanically required recovery transition.
1720
- phase: '10'
1721
- readonly: true
1722
- writer_role: any
1723
- input_schema:
1724
- type: object
1725
- additionalProperties: false
1726
- properties:
1727
- id: { type: string }
1728
- output_schema:
1729
- type: object
1730
- required: [breadcrumb]
1731
- additionalProperties: false
1732
- properties:
1733
- breadcrumb: { type: object }
1734
- errors:
1735
- - { code: CHANGE_NOT_FOUND, description: 'explicit change id does not exist' }
1736
- - { code: STATE_DB_ERROR, description: 'runtime state could not be read' }
1737
- cli_subcommand: change breadcrumb
1738
- emits_events: []
1739
-
1740
- - name: change.learning_propose
1741
- family: change
1742
- description: Propose one stable implementation discovery for approval-gated baseline specification convergence.
1743
- phase: '10'
1744
- writer_role: mcp
1745
- input_schema:
1746
- type: object
1747
- required: [change_id, target_ref, summary]
1748
- additionalProperties: false
1749
- properties:
1750
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1751
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1752
- task_id: { type: string }
1753
- target_ref: { type: string, minLength: 1 }
1754
- summary: { type: string, minLength: 3 }
1755
- evidence: { type: array, items: { type: string, minLength: 1 } }
1756
- output_schema:
1757
- type: object
1758
- required: [candidate]
1759
- additionalProperties: false
1760
- properties:
1761
- candidate: { type: object }
1762
- errors:
1763
- - { code: VALIDATION_ERROR, description: 'candidate id, target, summary, or evidence is invalid' }
1764
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1765
- - { code: CHANGE_NOT_MUTABLE, description: 'learning must resolve before convergence' }
1766
- - { code: TASK_NOT_FOUND, description: 'task is not linked to the change' }
1767
- - { code: DUPLICATE_LEARNING_ID, description: 'candidate id already exists' }
1768
- cli_subcommand: change learning-propose
1769
- emits_events: [spec_learning_proposed]
1770
-
1771
- - name: change.learning_resolve
1772
- family: change
1773
- description: Approve, reject, or mark applied one specification-learning candidate through a guarded state transition.
1774
- phase: '10'
1775
- writer_role: mcp
1776
- input_schema:
1777
- type: object
1778
- required: [change_id, candidate_id, decision]
1779
- additionalProperties: false
1780
- properties:
1781
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1782
- candidate_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1783
- decision: { type: string, enum: [approve, reject, apply] }
1784
- resolution: { type: string }
1785
- applied_ref: { type: string, minLength: 3 }
1786
- before_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1787
- after_digest: { type: string, pattern: '^[0-9a-f]{64}$' }
1788
- apply_evidence: { type: array, minItems: 1, uniqueItems: true, items: { type: string, minLength: 3 } }
1789
- output_schema:
1790
- type: object
1791
- required: [candidate]
1792
- additionalProperties: false
1793
- properties:
1794
- candidate: { type: object }
1795
- errors:
1796
- - { code: VALIDATION_ERROR, description: 'decision or required resolution is invalid' }
1797
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1798
- - { code: LEARNING_NOT_FOUND, description: 'candidate id does not exist for the change' }
1799
- - { code: ILLEGAL_LEARNING_TRANSITION, description: 'candidate state transition is not permitted' }
1800
- - { code: LEARNING_APPLY_EVIDENCE_REQUIRED, description: 'apply requires exact target, before and after digests, and evidence' }
1801
- - { code: LEARNING_APPLY_EVIDENCE_MISMATCH, description: 'apply evidence does not match the current target artifact' }
1802
- cli_subcommand: change learning-resolve
1803
- emits_events: [spec_learning_resolved]
1804
-
1805
- - name: change.converge
1806
- family: change
1807
- description: Deterministically verify task, spec, test, documentation, review, context, and incident diagnosis structure before closure.
1808
- phase: '9'
1809
- writer_role: mcp
1810
- input_schema:
1811
- type: object
1812
- required: [id]
1813
- additionalProperties: false
1814
- properties:
1815
- id: { type: string }
1816
- output_schema:
1817
- type: object
1818
- required: [ready, status, blockers]
1819
- additionalProperties: false
1820
- properties:
1821
- ready: { type: boolean }
1822
- status: { type: string, enum: [blocked, ready] }
1823
- blockers: { type: array, items: { type: string } }
1824
- verification_path: { type: string }
1825
- errors:
1826
- - { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
1827
- - { code: CHANGE_NOT_CONVERGEABLE, description: 'change lifecycle does not allow convergence' }
1828
- - { code: CONVERGENCE_EVIDENCE_AUTHORITY_VIOLATION, description: 'Prompt-supplied gate verdicts cannot replace DB-backed workflow evidence' }
1829
- cli_subcommand: change converge
1830
- emits_events: [change_blocked, change_converged]
1831
-
1832
- - name: change.archive
1833
- family: change
1834
- description: Archive a converged change after explicit baseline-spec reconciliation.
1835
- phase: '9'
1836
- writer_role: mcp
1837
- input_schema:
1838
- type: object
1839
- required: [id, summary, reconciliation_path]
1840
- additionalProperties: false
1841
- properties:
1842
- id: { type: string }
1843
- summary: { type: string, minLength: 3 }
1844
- baseline_updates: { type: array, items: { type: string } }
1845
- no_baseline_change_reason: { type: string, minLength: 3 }
1846
- reconciliation_path: { type: string, minLength: 3 }
1847
- output_schema:
1848
- type: object
1849
- required: [change, archive_path]
1850
- additionalProperties: false
1851
- properties:
1852
- change: { type: object }
1853
- archive_path: { type: string }
1854
- errors:
1855
- - { code: CHANGE_NOT_READY, description: 'change has not passed convergence' }
1856
- - { code: BASELINE_RECONCILIATION_REQUIRED, description: 'baseline update or explicit no-change reason required' }
1857
- - { code: BASELINE_FILE_MISSING, description: 'a declared baseline update does not exist' }
1858
- - { code: BASELINE_RECONCILIATION_INCOMPLETE, description: 'repository revision or tracked specification digests remain stale after reconciliation' }
1859
- - { code: BASELINE_RECONCILIATION_MANIFEST_REQUIRED, description: 'a change-bound reconciliation manifest is required' }
1860
- - { code: BASELINE_RECONCILIATION_MANIFEST_INVALID, description: 'semantic changes, digests, resolutions, or verification are invalid' }
1861
- - { code: ARCHIVE_EXISTS, description: 'archive target already exists' }
1862
- cli_subcommand: change archive
1863
- emits_events: [change_archived]
1864
-
1865
- # ────────────────────────── decision family ────────────────────────────
1866
- - name: decision.thread_start
1867
- family: decision
1868
- description: Start one durable owner-agent alignment thread bound to baseline, change, or workflow authority.
1869
- phase: '16'
1870
- writer_role: mcp
1871
- input_schema:
1872
- type: object
1873
- required: [id, purpose]
1874
- additionalProperties: false
1875
- properties:
1876
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1877
- purpose: { type: string, minLength: 3 }
1878
- mode: { type: string, enum: [guided, fast, autonomous, diagnostic], default: guided }
1879
- baseline_id: { type: string }
1880
- change_id: { type: string }
1881
- workflow_run_id: { type: string }
1882
- output_schema:
1883
- type: object
1884
- required: [thread]
1885
- additionalProperties: false
1886
- properties:
1887
- thread: { type: object }
1888
- errors:
1889
- - { code: DECISION_AUTHORITY_REQUIRED, description: 'thread has no baseline, change, or workflow authority' }
1890
- - { code: DECISION_AUTHORITY_MISMATCH, description: 'thread authority differs from its workflow binding' }
1891
- - { code: DECISION_THREAD_IN_PROGRESS, description: 'the same authority and purpose already has an active thread' }
1892
- - { code: DUPLICATE_DECISION_THREAD, description: 'decision thread id already exists' }
1893
- - { code: VALIDATION_ERROR, description: 'thread input is incomplete or invalid' }
1894
- cli_subcommand: decision thread-start
1895
- emits_events: [decision_thread_started]
1896
-
1897
- - name: decision.get
1898
- family: decision
1899
- description: Read one decision thread with its current question, normalized decisions, and checkpoint authority.
1900
- phase: '16'
1901
- readonly: true
1902
- input_schema:
1903
- type: object
1904
- required: [id]
1905
- additionalProperties: false
1906
- properties:
1907
- id: { type: string }
1908
- output_schema:
1909
- type: object
1910
- required: [thread]
1911
- additionalProperties: false
1912
- properties:
1913
- thread: { type: object }
1914
- errors:
1915
- - { code: DECISION_THREAD_NOT_FOUND, description: 'decision thread id does not exist' }
1916
- cli_subcommand: decision get
1917
- emits_events: []
1918
-
1919
- - name: decision.list
1920
- family: decision
1921
- description: List durable decision threads by authority, mode, or lifecycle state for recovery and status reporting.
1922
- phase: '16'
28
+ # ───────────────────── public model-facing kernel ─────────────────────
29
+ - name: ultra.context
30
+ family: ultra
31
+ description: Read one bounded canonical Context Envelope. This tool is side-effect free and reports diagnostics without choosing the next semantic action.
32
+ phase: '24'
1923
33
  readonly: true
1924
- input_schema:
1925
- type: object
1926
- additionalProperties: false
1927
- properties:
1928
- status: { type: string, enum: [active, checkpoint_ready, completed, confirmed, cancelled] }
1929
- mode: { type: string, enum: [guided, fast, autonomous, diagnostic] }
1930
- baseline_id: { type: string }
1931
- change_id: { type: string }
1932
- workflow_run_id: { type: string }
1933
- limit: { type: integer, minimum: 1, maximum: 500, default: 100 }
1934
- output_schema:
1935
- type: object
1936
- required: [threads, count]
1937
- additionalProperties: false
1938
- properties:
1939
- threads: { type: array, items: { type: object } }
1940
- count: { type: integer, minimum: 0 }
1941
- errors:
1942
- - { code: STATE_DB_ERROR, description: 'decision thread state could not be read' }
1943
- cli_subcommand: decision list
1944
- emits_events: []
1945
-
1946
- - name: decision.open
1947
- family: decision
1948
- description: Open the sole user-facing decision in a thread with evidence, recommendation, credible alternatives, and durable effects.
1949
- phase: '16'
1950
- writer_role: mcp
1951
- input_schema:
1952
- type: object
1953
- required: [id, thread_id, phase, question, why_now, recommendation, effects]
1954
- additionalProperties: false
1955
- properties:
1956
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1957
- thread_id: { type: string }
1958
- phase: { type: string, minLength: 1 }
1959
- question: { type: string, minLength: 1 }
1960
- why_now: { type: string, minLength: 1 }
1961
- recommendation: { type: string, minLength: 1 }
1962
- options:
1963
- type: array
1964
- maxItems: 3
1965
- items: &decision_option
1966
- type: object
1967
- required: [id, label, tradeoff]
1968
- additionalProperties: false
1969
- properties:
1970
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
1971
- label: { type: string, minLength: 1 }
1972
- tradeoff: { type: string, minLength: 1 }
1973
- evidence_refs: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
1974
- dependency_ids: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
1975
- effects: { type: object, minProperties: 1 }
1976
- blocking: { type: boolean, default: true }
1977
- output_schema:
1978
- type: object
1979
- required: [thread]
1980
- additionalProperties: false
1981
- properties:
1982
- thread: { type: object }
1983
- errors:
1984
- - { code: DECISION_THREAD_NOT_FOUND, description: 'decision thread id does not exist' }
1985
- - { code: DECISION_ALREADY_OPEN, description: 'another decision is already awaiting an answer' }
1986
- - { code: DECISION_CHECKPOINT_PENDING, description: 'the prepared checkpoint must be confirmed or revised first' }
1987
- - { code: DECISION_DEPENDENCY_UNRESOLVED, description: 'a declared decision dependency is unresolved' }
1988
- - { code: DUPLICATE_DECISION_ID, description: 'decision item id already exists' }
1989
- - { code: VALIDATION_ERROR, description: 'question, recommendation, options, evidence, or effects are invalid' }
1990
- cli_subcommand: decision open
1991
- emits_events: [decision_opened]
1992
-
1993
- - name: decision.resolve
1994
- family: decision
1995
- description: Resolve the current question as an explicit normalized owner decision without storing the conversation transcript.
1996
- phase: '16'
1997
34
  writer_role: mcp
1998
35
  input_schema:
1999
36
  type: object
2000
- required: [id, decision, rationale, decided_by]
2001
37
  additionalProperties: false
2002
38
  properties:
2003
- id: { type: string }
2004
- decision: { type: string, minLength: 1 }
2005
- rationale: { type: string, minLength: 1 }
2006
- decided_by: { type: string, minLength: 1 }
2007
- output_schema:
2008
- type: object
2009
- required: [thread]
2010
- additionalProperties: false
2011
- properties:
2012
- thread: { type: object }
2013
- errors:
2014
- - { code: DECISION_NOT_FOUND, description: 'decision item id does not exist' }
2015
- - { code: DECISION_NOT_OPEN, description: 'decision item is no longer awaiting an answer' }
2016
- - { code: VALIDATION_ERROR, description: 'normalized owner decision is incomplete' }
2017
- cli_subcommand: decision resolve
2018
- emits_events: [decision_resolved]
2019
-
2020
- - name: decision.delegate
2021
- family: decision
2022
- description: Record explicit owner delegation for a reversible decision, including the selected result and non-negotiable guardrails.
2023
- phase: '16'
2024
- writer_role: mcp
2025
- input_schema:
2026
- type: object
2027
- required: [id, delegated_to, decision, rationale, guardrails]
2028
- additionalProperties: false
2029
- properties:
2030
- id: { type: string }
2031
- delegated_to: { type: string, minLength: 1 }
2032
- decision: { type: string, minLength: 1 }
2033
- rationale: { type: string, minLength: 1 }
2034
- guardrails: { type: array, minItems: 1, uniqueItems: true, items: { type: string, minLength: 1 } }
2035
- output_schema:
2036
- type: object
2037
- required: [thread]
2038
- additionalProperties: false
2039
- properties:
2040
- thread: { type: object }
2041
- errors:
2042
- - { code: DECISION_NOT_FOUND, description: 'decision item id does not exist' }
2043
- - { code: DECISION_NOT_OPEN, description: 'decision item is no longer awaiting an answer' }
2044
- - { code: VALIDATION_ERROR, description: 'delegation result or guardrails are incomplete' }
2045
- cli_subcommand: decision delegate
2046
- emits_events: [decision_resolved]
2047
-
2048
- - name: decision.defer
2049
- family: decision
2050
- description: Defer the current decision with explicit consequences and a deterministic condition for revisiting it.
2051
- phase: '16'
2052
- writer_role: mcp
2053
- input_schema:
2054
- type: object
2055
- required: [id, reason, consequences, revisit_condition]
2056
- additionalProperties: false
2057
- properties:
2058
- id: { type: string }
2059
- reason: { type: string, minLength: 1 }
2060
- consequences: { type: string, minLength: 1 }
2061
- revisit_condition: { type: string, minLength: 1 }
2062
- output_schema:
2063
- type: object
2064
- required: [thread]
2065
- additionalProperties: false
2066
- properties:
2067
- thread: { type: object }
2068
- errors:
2069
- - { code: DECISION_NOT_FOUND, description: 'decision item id does not exist' }
2070
- - { code: DECISION_NOT_OPEN, description: 'decision item is no longer awaiting an answer' }
2071
- - { code: VALIDATION_ERROR, description: 'deferral consequence or revisit condition is incomplete' }
2072
- cli_subcommand: decision defer
2073
- emits_events: [decision_resolved]
2074
-
2075
- - name: decision.supersede
2076
- family: decision
2077
- description: Preserve a prior resolved decision and reopen alignment with one replacement question when evidence or owner intent changes.
2078
- phase: '16'
2079
- writer_role: mcp
2080
- input_schema:
2081
- type: object
2082
- required: [id, reason, replacement]
2083
- additionalProperties: false
2084
- properties:
2085
- id: { type: string }
2086
- reason: { type: string, minLength: 1 }
2087
- replacement:
39
+ stage: { type: string, enum: [project, research, plan, dev, test, review, deliver] }
40
+ scope:
2088
41
  type: object
2089
- required: [id, phase, question, why_now, recommendation, effects]
2090
42
  additionalProperties: false
2091
43
  properties:
2092
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
2093
- phase: { type: string, minLength: 1 }
2094
- question: { type: string, minLength: 1 }
2095
- why_now: { type: string, minLength: 1 }
2096
- recommendation: { type: string, minLength: 1 }
2097
- options: { type: array, maxItems: 3, items: *decision_option }
2098
- evidence_refs: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
2099
- dependency_ids: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
2100
- effects: { type: object, minProperties: 1 }
2101
- blocking: { type: boolean, default: true }
2102
- output_schema:
2103
- type: object
2104
- required: [thread]
2105
- additionalProperties: false
2106
- properties:
2107
- thread: { type: object }
2108
- errors:
2109
- - { code: DECISION_NOT_FOUND, description: 'decision item id does not exist' }
2110
- - { code: DECISION_NOT_SUPERSEDEABLE, description: 'decision item cannot be revised from its current state' }
2111
- - { code: DECISION_ALREADY_OPEN, description: 'another decision is already awaiting an answer' }
2112
- - { code: VALIDATION_ERROR, description: 'replacement question or revision reason is invalid' }
2113
- cli_subcommand: decision supersede
2114
- emits_events: [decision_opened]
2115
-
2116
- - name: decision.complete
2117
- family: decision
2118
- description: Complete a decision thread after its normalized state is settled, without creating an approval receipt or artifact checkpoint.
2119
- phase: '19'
2120
- writer_role: mcp
2121
- input_schema:
2122
- type: object
2123
- required: [id, summary]
2124
- additionalProperties: false
2125
- properties:
2126
- id: { type: string, minLength: 1 }
2127
- summary: { type: string, minLength: 1 }
2128
- applied_refs:
2129
- type: array
2130
- maxItems: 20
2131
- items:
2132
- type: object
2133
- required: [kind, ref]
2134
- additionalProperties: false
2135
- allOf:
2136
- - if:
2137
- properties:
2138
- kind: { enum: [baseline, change, workflow, task] }
2139
- required: [kind]
2140
- then:
2141
- required: [field, value]
2142
- - if:
2143
- properties:
2144
- kind: { enum: [spec, artifact] }
2145
- required: [kind]
2146
- then:
2147
- required: [digest]
2148
- not:
2149
- anyOf:
2150
- - { required: [field] }
2151
- - { required: [value] }
2152
- properties:
2153
- kind: { type: string, enum: [baseline, change, workflow, task, spec, artifact] }
2154
- ref: { type: string, minLength: 1 }
2155
- field: { type: string, minLength: 1 }
2156
- value: {}
2157
- digest: { type: string, pattern: '^[0-9a-f]{64}$' }
2158
- output_schema:
2159
- type: object
2160
- required: [thread]
2161
- additionalProperties: false
2162
- properties:
2163
- thread: { type: object }
2164
- errors:
2165
- - { code: DECISION_THREAD_NOT_FOUND, description: 'decision thread id does not exist' }
2166
- - { code: DECISION_THREAD_NOT_MUTABLE, description: 'the decision thread is already terminal' }
2167
- - { code: DECISION_CHECKPOINT_PENDING, description: 'a prepared artifact checkpoint must be confirmed or revised first' }
2168
- - { code: DECISION_ALIGNMENT_BLOCKING, description: 'an unanswered question or blocking deferral prevents completion' }
2169
- - { code: DECISION_APPLIED_REF_NOT_FOUND, description: 'an applied authority reference cannot be read back from the current project state' }
2170
- - { code: DECISION_APPLIED_REF_FIELD_NOT_FOUND, description: 'a row-backed applied authority field does not exist' }
2171
- - { code: DECISION_APPLIED_REF_VALUE_MISMATCH, description: 'a row-backed applied authority value does not match current state' }
2172
- - { code: DECISION_APPLIED_REF_STALE, description: 'an applied field, specification, or artifact digest does not match current content' }
2173
- - { code: VALIDATION_ERROR, description: 'the completion summary or applied authority references are invalid' }
2174
- cli_subcommand: decision complete
2175
- emits_events: [decision_thread_completed]
2176
-
2177
- - name: decision.checkpoint
2178
- family: decision
2179
- description: Prepare or confirm a decision checkpoint, including renewal of unchanged decisions against current artifacts; change- and workflow-bound threads require an artifact, while a standalone baseline thread may record an explicit no-artifact reason.
2180
- phase: '16'
2181
- writer_role: mcp
2182
- input_schema:
2183
- type: object
2184
- required: [id, action]
2185
- additionalProperties: false
2186
- properties:
2187
- id: { type: string }
2188
- action: { type: string, enum: [prepare, confirm] }
2189
- summary: { type: string, minLength: 1 }
2190
- approved_by: { type: string, minLength: 1 }
2191
- approval_note: { type: string, minLength: 3 }
2192
- artifacts:
2193
- type: array
2194
- items:
2195
- type: object
2196
- required: [path, kind]
2197
- additionalProperties: false
2198
- properties:
2199
- path: { type: string, minLength: 1 }
2200
- kind: { type: string, minLength: 1 }
2201
- no_artifact_reason: { type: string, minLength: 3 }
2202
- output_schema:
2203
- type: object
2204
- required: [thread]
2205
- additionalProperties: false
2206
- properties:
2207
- thread: { type: object }
44
+ change_id: { type: string, minLength: 1 }
45
+ task_id: { type: string, minLength: 1 }
46
+ detail: { type: string, enum: [summary, full] }
47
+ output_schema: { type: object }
2208
48
  errors:
2209
- - { code: DECISION_THREAD_NOT_FOUND, description: 'decision thread id does not exist' }
2210
- - { code: DECISION_THREAD_NOT_MUTABLE, description: 'cancelled decision thread cannot be checkpointed' }
2211
- - { code: DECISION_ALIGNMENT_BLOCKING, description: 'an open or deferred blocking decision prevents checkpointing' }
2212
- - { code: DECISION_CHECKPOINT_STALE, description: 'prepared decision digest no longer matches current authority' }
2213
- - { code: DECISION_ARTIFACT_REQUIRED, description: 'confirmation lacks required artifact bindings; no-artifact reasons are allowed only for standalone baseline thinking' }
2214
- - { code: DECISION_ARTIFACT_MISSING, description: 'a declared checkpoint artifact does not exist' }
2215
- - { code: VALIDATION_ERROR, description: 'checkpoint action, approval, or artifact input is invalid' }
2216
- cli_subcommand: decision checkpoint
2217
- emits_events: [decision_checkpoint_prepared, decision_checkpoint_confirmed]
49
+ - { code: VALIDATION_ERROR, description: 'input failed structural validation' }
50
+ - { code: STATE_CORRUPT, description: 'local authority cannot be read safely' }
51
+ cli_subcommand: 'ultra context'
2218
52
 
2219
- # ────────────────────────── workflow family ────────────────────────────
2220
- - name: workflow.start
2221
- family: workflow
2222
- description: Start one durable Ultra workflow run. For research, the host supplies normalized accepted semantic coverage after user-model alignment; MCP records and validates the state without choosing or proving user intent.
2223
- phase: '13'
53
+ - name: ultra.record
54
+ family: ultra
55
+ description: Record one or more typed draft facts or actions with per-entry idempotency. Semantic rejections are returned as mutable diagnostics rather than transport errors.
56
+ phase: '24'
2224
57
  writer_role: mcp
2225
58
  input_schema:
2226
59
  type: object
2227
- required: [kind, subject]
60
+ required: [entries]
2228
61
  additionalProperties: false
2229
62
  properties:
2230
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
2231
- kind: { type: string, enum: [init, research, plan, change, dev, test, review, deliver] }
2232
- subject: { type: string, minLength: 3 }
2233
- mode: { type: string, enum: [full, adoption, product, feature, architecture, custom] }
2234
- selected_steps: { type: array, uniqueItems: true, items: { type: string } }
2235
- coverage:
63
+ entries:
2236
64
  type: array
2237
65
  minItems: 1
2238
66
  items:
2239
67
  type: object
2240
- required: [step_id, disposition, rationale]
68
+ required: [kind, action, data, idempotency_key]
2241
69
  additionalProperties: false
2242
70
  properties:
2243
- step_id: { type: string, minLength: 1 }
2244
- disposition: { type: string, enum: [execute, verify_existing, reuse, not_applicable, deferred] }
2245
- rationale: { type: string, minLength: 3 }
2246
- evidence_refs: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
2247
- accepted_by: { type: string, minLength: 1 }
2248
- consequence: { type: string, minLength: 3 }
2249
- baseline_id: { type: string }
2250
- change_id: { type: string }
2251
- task_id: { type: string }
2252
- metadata: { type: object }
2253
- output_schema:
2254
- type: object
2255
- required: [workflow]
2256
- additionalProperties: false
2257
- properties:
2258
- workflow: { type: object }
2259
- errors:
2260
- - { code: VALIDATION_ERROR, description: 'definition, mode, selection, or linked authority is invalid' }
2261
- - { code: DUPLICATE_WORKFLOW_ID, description: 'workflow id already exists' }
2262
- - { code: WORKFLOW_IN_PROGRESS, description: 'the same authority already has an active workflow of this kind' }
2263
- - { code: WORKFLOW_CHANGE_NOT_FOUND, description: 'the requested change authority does not exist' }
2264
- - { code: WORKFLOW_SCOPE_INVALID, description: 'the workflow kind received a task or change scope that it does not own' }
2265
- - { code: WORKFLOW_CHANGE_RUN_REQUIRED, description: 'change-bound stages require the owning durable change workflow; legacy gaps route through doctor repair' }
2266
- - { code: WORKFLOW_BASELINE_MISMATCH, description: 'a supplied stage baseline differs from the baseline bound by the owning change workflow' }
2267
- - { code: WORKFLOW_BASELINE_NOT_READY, description: 'the baseline bound to the change is no longer ready' }
2268
- - { code: WORKFLOW_BASELINE_REQUIRED, description: 'a baseline-free plan is valid only for an approved incident break-glass change' }
2269
- - { code: WORKFLOW_CHANGE_NOT_MUTABLE, description: 'the owning change does not accept a new workflow of this stage' }
2270
- - { code: WORKFLOW_AUTHORITY_REQUIRED, description: 'the workflow is missing its required baseline, change, or task authority' }
2271
- - { code: WORKFLOW_CHANGE_DECISION_BLOCKING, description: 'the change contains unresolved material owner decisions' }
2272
- - { code: WORKFLOW_CHANGE_RESEARCH_INCOMPLETE, description: 'the change-bound research disposition is not current and complete' }
2273
- - { code: WORKFLOW_RESEARCH_COVERAGE_REQUIRED, description: 'research requires accepted coverage with at least one applicable semantic area beyond synthesis' }
2274
- - { code: WORKFLOW_RESEARCH_COVERAGE_EVIDENCE_REQUIRED, description: 'reuse, verification, and not-applicable dispositions require evidence references' }
2275
- - { code: WORKFLOW_RESEARCH_SYNTHESIS_REQUIRED, description: 'research synthesis must execute, verify, or reuse durable evidence' }
2276
- - { code: WORKFLOW_RESEARCH_MODE_MISMATCH, description: 'the selected research mode does not match its authority or baseline mode' }
2277
- - { code: WORKFLOW_SELECTION_REASON_REQUIRED, description: 'research requires the model evidence rationale for its selected coverage' }
2278
- - { code: TASK_EXECUTION_CONTRACT_INCOMPLETE, description: 'dev cannot start until the linked task contract is executable' }
2279
- - { code: TASK_CHANGE_OWNERSHIP_MISMATCH, description: 'linked task and change authority disagree' }
2280
- - { code: TASK_DEPENDENCIES_INCOMPLETE, description: 'dev cannot start while a task dependency remains incomplete' }
2281
- - { code: WORKFLOW_TASK_NOT_EXECUTABLE, description: 'the linked task status or stale marker forbids execution' }
2282
- - { code: WORKFLOW_PLAN_NOT_COMPLETED, description: 'dev requires a completed current change plan' }
2283
- - { code: WORKFLOW_PLAN_TASK_SET_STALE, description: 'the authoritative task set changed after plan convergence' }
2284
- - { code: WORKFLOW_PLAN_TASK_CONTRACT_STALE, description: 'a task contract was invalidated or changed after plan convergence' }
2285
- cli_subcommand: workflow start
2286
- emits_events: [workflow_started]
2287
-
2288
- - name: workflow.get
2289
- family: workflow
2290
- description: Read one workflow run with every step, current recovery position, blockers, and output freshness.
2291
- phase: '13'
2292
- readonly: true
2293
- input_schema:
2294
- type: object
2295
- required: [id]
2296
- additionalProperties: false
2297
- properties:
2298
- id: { type: string }
2299
- output_schema:
2300
- type: object
2301
- required: [workflow]
2302
- additionalProperties: false
2303
- properties:
2304
- workflow: { type: object }
2305
- errors:
2306
- - { code: WORKFLOW_NOT_FOUND, description: 'workflow id does not exist' }
2307
- cli_subcommand: workflow get
2308
- emits_events: []
2309
-
2310
- - name: workflow.list
2311
- family: workflow
2312
- description: List workflow runs by phase, state, baseline, change, or task authority.
2313
- phase: '13'
2314
- readonly: true
2315
- input_schema:
2316
- type: object
2317
- additionalProperties: false
2318
- properties:
2319
- kind: { type: string, enum: [init, research, plan, change, dev, test, review, deliver] }
2320
- status: { type: string, enum: [active, blocked, ready, completed, cancelled] }
2321
- baseline_id: { type: string }
2322
- change_id: { type: string }
2323
- task_id: { type: string }
2324
- limit: { type: integer, minimum: 1, maximum: 500, default: 100 }
2325
- output_schema:
2326
- type: object
2327
- required: [workflows, count]
2328
- additionalProperties: false
2329
- properties:
2330
- workflows: { type: array, items: { type: object } }
2331
- count: { type: integer, minimum: 0 }
2332
- errors:
2333
- - { code: STATE_DB_ERROR, description: 'workflow state could not be read' }
2334
- cli_subcommand: workflow list
2335
- emits_events: []
2336
-
2337
- - name: workflow.step
2338
- family: workflow
2339
- description: Record one canonical workflow-step transition with bounded evidence, durable output digests, decisions, or blockers.
2340
- phase: '13'
2341
- writer_role: mcp
2342
- input_schema:
2343
- type: object
2344
- required: [id, step_id, status]
2345
- additionalProperties: false
2346
- properties:
2347
- id: { type: string }
2348
- step_id: { type: string }
2349
- status: { type: string, enum: [in_progress, completed, skipped, blocked] }
2350
- evidence:
2351
- type: array
2352
- items:
2353
- type: object
2354
- required: [kind, ref, summary]
2355
- additionalProperties: false
2356
- properties:
2357
- kind: { type: string, minLength: 1 }
2358
- ref: { type: string, minLength: 1 }
2359
- summary: { type: string, minLength: 1 }
2360
- outputs:
2361
- type: array
2362
- items:
2363
- type: object
2364
- required: [path, kind]
2365
- additionalProperties: false
2366
- properties:
2367
- path: { type: string, minLength: 1 }
2368
- kind: { type: string, minLength: 1 }
2369
- decisions: { type: array, items: { type: object } }
2370
- semantic_records:
2371
- type: array
2372
- items:
2373
- type: object
2374
- required: [id, kind, status, summary, source_ref, evidence_refs, attributes, links]
2375
- additionalProperties: false
2376
- properties:
2377
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
2378
- kind: { type: string, minLength: 1 }
2379
- status: { type: string, enum: [observed, verified, decided, accepted, unknown, not_applicable] }
2380
- summary: { type: string, minLength: 1 }
2381
- source_ref: { type: string, minLength: 3 }
2382
- evidence_refs: { type: array, minItems: 1, items: { type: string, minLength: 1 } }
2383
- attributes: { type: object }
2384
- links:
2385
- type: array
2386
- items:
2387
- type: object
2388
- required: [relation, target]
2389
- additionalProperties: false
2390
- properties:
2391
- relation: { type: string, minLength: 1 }
2392
- target: { type: string, minLength: 1 }
2393
- blockers: { type: array, uniqueItems: true, items: { type: string, minLength: 1 } }
2394
- output_schema:
2395
- type: object
2396
- required: [workflow]
2397
- additionalProperties: false
2398
- properties:
2399
- workflow: { type: object }
2400
- errors:
2401
- - { code: WORKFLOW_NOT_FOUND, description: 'workflow id does not exist' }
2402
- - { code: WORKFLOW_NOT_MUTABLE, description: 'completed and cancelled workflows cannot accept step updates' }
2403
- - { code: WORKFLOW_STEP_NOT_FOUND, description: 'step is not part of the canonical workflow' }
2404
- - { code: ILLEGAL_WORKFLOW_STEP_TRANSITION, description: 'the requested step-state transition is not permitted' }
2405
- - { code: WORKFLOW_STEP_OUT_OF_ORDER, description: 'an earlier selected step remains incomplete' }
2406
- - { code: VALIDATION_ERROR, description: 'step evidence, output, decision, semantic, or blocker input is malformed' }
2407
- - { code: WORKFLOW_EVIDENCE_REQUIRED, description: 'the step cannot complete without evidence' }
2408
- - { code: WORKFLOW_OUTPUT_REQUIRED, description: 'the step cannot complete without a durable output' }
2409
- - { code: WORKFLOW_OUTPUT_MISSING, description: 'a declared output file is missing' }
2410
- - { code: WORKFLOW_ARTIFACT_SCOPE_INVALID, description: 'a Change-bound semantic or evidence artifact escaped its owning Change root' }
2411
- - { code: WORKFLOW_RESEARCH_REPORT_REQUIRED, description: 'a research step requires its immutable workflow-and-step-bound report path' }
2412
- - { code: WORKFLOW_RESEARCH_REPORT_INVALID, description: 'the research report is missing its required evidence structure' }
2413
- - { code: WORKFLOW_RESEARCH_SYNTHESIS_INCOMPLETE, description: 'full or adoption synthesis did not bind all baseline specifications and the distillate' }
2414
- - { code: WORKFLOW_SEMANTIC_RECORDS_REQUIRED, description: 'a research step did not persist typed semantic results' }
2415
- - { code: WORKFLOW_SEMANTIC_RECORD_INVALID, description: 'a semantic record does not satisfy its step contract' }
2416
- - { code: WORKFLOW_SEMANTIC_SOURCE_INVALID, description: 'a semantic record source is missing, outside the project, or lacks an anchor' }
2417
- - { code: WORKFLOW_SYNTHESIS_TRACE_INVALID, description: 'synthesis references missing research semantic records' }
2418
- - { code: WORKFLOW_BLOCKER_REQUIRED, description: 'blocked state requires a specific blocker code' }
2419
- - { code: WORKFLOW_CONTEXT_OUTPUT_REQUIRED, description: 'the stage requires its immutable Context Manifest v3 output' }
2420
- - { code: WORKFLOW_CONTEXT_MISMATCH, description: 'the context role, gate, change, task, or readiness does not match the stage' }
2421
- - { code: WORKFLOW_CONTEXT_AUTHORITY_MISMATCH, description: 'the context artifact does not match its DB snapshot row' }
2422
- - { code: WORKFLOW_CONTEXT_STALE, description: 'the context artifact no longer matches the current checkout' }
2423
- - { code: WORKFLOW_TASKS_REQUIRED, description: 'the stage requires at least one task bound to the change' }
2424
- - { code: WORKFLOW_TASK_NOT_COMPLETED, description: 'the required task development state has not converged' }
2425
- - { code: WORKFLOW_GATE_MISSING, description: 'a required completed dev, test, or review gate is missing' }
2426
- - { code: WORKFLOW_GATE_STALE, description: 'a required task or gate no longer matches current authority or checkout state' }
2427
- - { code: WORKFLOW_REVIEW_NOT_APPROVED, description: 'the required independent review axes have not passed' }
2428
- - { code: WORKFLOW_TEST_NOT_PASSED, description: 'the required current test gate has not passed' }
2429
- - { code: WORKFLOW_SESSION_ACTIVE, description: 'delivery is blocked while a bound execution session remains active' }
2430
- - { code: DECISION_ALIGNMENT_BLOCKING, description: 'matching owner decisions or artifact checkpoints are not current' }
2431
- cli_subcommand: workflow step
2432
- emits_events: [workflow_step_updated, workflow_blocked]
2433
-
2434
- - name: workflow.revise
2435
- family: workflow
2436
- description: Create a candidate revision of a completed workflow while preserving the accepted run and its provenance.
2437
- phase: '21'
2438
- writer_role: mcp
2439
- input_schema:
2440
- type: object
2441
- required: [id, replacement_id, subject, reason]
2442
- additionalProperties: false
2443
- properties:
2444
- id: { type: string, minLength: 1 }
2445
- replacement_id: { type: string, minLength: 1 }
2446
- subject: { type: string, minLength: 1 }
2447
- reason: { type: string, minLength: 3 }
2448
- output_schema:
2449
- type: object
2450
- required: [workflow]
2451
- additionalProperties: false
2452
- properties:
2453
- workflow: { type: object }
2454
- errors:
2455
- - { code: WORKFLOW_NOT_FOUND, description: 'prior workflow id does not exist' }
2456
- - { code: WORKFLOW_REVISION_SOURCE_NOT_ACCEPTED, description: 'only a completed workflow can be revised' }
2457
- - { code: WORKFLOW_ALREADY_SUPERSEDED, description: 'the prior workflow already has a replacement authority' }
2458
- - { code: WORKFLOW_IN_PROGRESS, description: 'a competing active workflow owns the same scope' }
2459
- cli_subcommand: workflow revise
2460
- emits_events: [workflow_started, workflow_revision_started]
2461
-
2462
- - name: workflow.supersede
2463
- family: workflow
2464
- description: Promote a completed candidate revision to current authority and invalidate only its transitive registry consumers.
2465
- phase: '21'
2466
- writer_role: mcp
2467
- input_schema:
2468
- type: object
2469
- required: [id, replacement_id, reason]
2470
- additionalProperties: false
2471
- properties:
2472
- id: { type: string, minLength: 1 }
2473
- replacement_id: { type: string, minLength: 1 }
2474
- reason: { type: string, minLength: 3 }
2475
- output_schema:
2476
- type: object
2477
- required: [superseded, workflow, invalidated, idempotent]
2478
- additionalProperties: false
2479
- properties:
2480
- superseded: { type: object }
2481
- workflow: { type: object }
2482
- invalidated: { type: array, items: { type: object } }
2483
- idempotent: { type: boolean }
2484
- errors:
2485
- - { code: WORKFLOW_NOT_FOUND, description: 'prior or replacement workflow id does not exist' }
2486
- - { code: WORKFLOW_SUPERSESSION_NOT_ACCEPTED, description: 'both workflow revisions must be completed' }
2487
- - { code: WORKFLOW_SUPERSESSION_AUTHORITY_MISMATCH, description: 'replacement binding or revision provenance differs' }
2488
- - { code: WORKFLOW_OUTPUT_STALE, description: 'replacement output authority is stale' }
2489
- - { code: WORKFLOW_ALREADY_SUPERSEDED, description: 'another replacement already owns authority' }
2490
- cli_subcommand: workflow supersede
2491
- emits_events: [workflow_superseded, workflow_invalidated, task_stale_marked]
2492
-
2493
- - name: workflow.complete
2494
- family: workflow
2495
- description: Complete a ready workflow only when every selected step is complete and every recorded output digest remains current. Plan approval is optional unless the host identified a material owner decision.
2496
- phase: '13'
2497
- writer_role: mcp
2498
- input_schema:
2499
- type: object
2500
- required: [id]
2501
- additionalProperties: false
2502
- properties:
2503
- id: { type: string }
2504
- approval:
71
+ kind:
72
+ type: string
73
+ enum: [baseline, change_contract, decision, task_contract, task_outcome, artifact, event]
74
+ action:
75
+ type: string
76
+ enum:
77
+ - initialize
78
+ - start
79
+ - observe
80
+ - accept
81
+ - open
82
+ - revise
83
+ - cancel
84
+ - define
85
+ - remove
86
+ - complete
87
+ - block
88
+ - reopen
89
+ - bind
90
+ - append
91
+ data: { type: object }
92
+ idempotency_key: { type: string, minLength: 3 }
93
+ output_schema: { type: object }
94
+ errors:
95
+ - { code: VALIDATION_ERROR, description: 'input failed structural validation' }
96
+ - { code: STATE_CORRUPT, description: 'local authority cannot be updated safely' }
97
+ - { code: PATH_AUTHORITY_VIOLATION, description: 'a requested write escapes managed authority' }
98
+ cli_subcommand: 'ultra record'
99
+ emits_events: [ultra_facade_call]
100
+
101
+ - name: ultra.checkpoint
102
+ family: ultra
103
+ description: Attempt one semantic stage checkpoint. Failed semantic checks return blockers and leave the draft mutable; accepted checkpoints commit durable authority once.
104
+ phase: '24'
105
+ writer_role: mcp
106
+ input_schema:
107
+ type: object
108
+ required: [stage, scope, payload, idempotency_key]
109
+ additionalProperties: false
110
+ properties:
111
+ stage: { type: string, enum: [research, plan, dev, test, review, deliver] }
112
+ scope:
2505
113
  type: object
2506
- required: [approved_by, approval_note]
2507
114
  additionalProperties: false
2508
115
  properties:
2509
- approved_by: { type: string, minLength: 1 }
2510
- approval_note: { type: string, minLength: 3 }
2511
- approved_at: { type: string, format: date-time }
2512
- output_schema:
2513
- type: object
2514
- required: [workflow]
2515
- additionalProperties: false
2516
- properties:
2517
- workflow: { type: object }
116
+ change_id: { type: string, minLength: 1 }
117
+ task_id: { type: string, minLength: 1 }
118
+ payload: { type: object }
119
+ idempotency_key: { type: string, minLength: 3 }
120
+ output_schema: { type: object }
2518
121
  errors:
2519
- - { code: WORKFLOW_NOT_FOUND, description: 'workflow id does not exist' }
2520
- - { code: WORKFLOW_NOT_READY, description: 'selected steps or blockers remain incomplete' }
2521
- - { code: WORKFLOW_OUTPUT_STALE, description: 'a recorded output changed or disappeared' }
2522
- - { code: VALIDATION_ERROR, description: 'approval or completion input is malformed' }
2523
- - { code: WORKFLOW_TASKS_REQUIRED, description: 'plan completion requires a non-empty authoritative task set' }
2524
- - { code: TASK_NOT_FOUND, description: 'a task referenced by the authoritative plan no longer exists' }
2525
- - { code: TASK_EXECUTION_CONTRACT_INCOMPLETE, description: 'one or more planned tasks lack an executable contract' }
2526
- - { code: TASK_CHANGE_OWNERSHIP_MISMATCH, description: 'a planned task is not owned by the workflow change' }
2527
- - { code: TASK_DEPENDENCY_MISSING, description: 'a planned dependency does not exist' }
2528
- - { code: TASK_DEPENDENCY_CYCLE, description: 'the planned task graph contains a cycle' }
2529
- - { code: WORKFLOW_PLAN_ARTIFACT_INVALID, description: 'the plan workflow did not produce exactly one valid JSON execution plan' }
2530
- - { code: WORKFLOW_PLAN_ARTIFACT_STALE, description: 'the execution-plan artifact differs from current DB task authority' }
2531
- - { code: WORKFLOW_PLAN_COVERAGE_INCOMPLETE, description: 'one or more accepted change outcomes have no executable task coverage' }
2532
- - { code: WORKFLOW_PLAN_ORPHAN_TASK, description: 'a task trace does not resolve to accepted change or research authority' }
2533
- - { code: WORKFLOW_PLAN_TASK_CONTRACT_STALE, description: 'a task was invalidated or changed before plan convergence' }
2534
- - { code: WORKFLOW_QUICK_PLAN_TOO_LARGE, description: 'a quick change contains more than one executable task' }
2535
- - { code: WORKFLOW_TASK_NOT_COMPLETED, description: 'dev convergence requires its task to be completed' }
2536
- - { code: WORKFLOW_APPROVAL_REQUIRED, description: 'when optional plan approval is supplied it requires approved_by and approval_note fields' }
2537
- - { code: WORKFLOW_SUMMARY_AUTHORITY_VIOLATION, description: 'Prompt summary fields are not allowed to replace DB-derived gate evidence or the complete change task set' }
2538
- - { code: WORKFLOW_APPROVAL_AUTHORITY_VIOLATION, description: 'only the plan workflow accepts completion approval' }
2539
- - { code: WORKFLOW_GATE_MISSING, description: 'a required completed dev, test, or review gate is missing' }
2540
- - { code: WORKFLOW_GATE_STALE, description: 'a required gate no longer matches its task contract or commit ancestry' }
2541
- - { code: WORKFLOW_REPORT_INVALID, description: 'a required report is malformed or incomplete' }
2542
- - { code: WORKFLOW_REPORT_CONTEXT_MISMATCH, description: 'a report is not bound to the recorded stage context digest' }
2543
- - { code: WORKFLOW_REPORT_REVISION_STALE, description: 'a report does not match the current full Git HEAD' }
2544
- - { code: WORKFLOW_REPORT_WORKTREE_STALE, description: 'a report does not match the current worktree digest' }
2545
- - { code: WORKFLOW_REPORT_TASK_SET_STALE, description: 'a report task set no longer matches the authoritative execution scope' }
2546
- - { code: WORKFLOW_REPORT_BASELINE_MISMATCH, description: 'a report no longer matches current baseline authority' }
2547
- - { code: WORKFLOW_REPORT_CHANGE_MISMATCH, description: 'a report is bound to a different change' }
2548
- - { code: WORKFLOW_REPORT_VERDICT_CONFLICT, description: 'the declared verdict conflicts with failures or blocking evidence' }
2549
- - { code: WORKFLOW_VERIFICATION_PROFILE_INVALID, description: 'the selected verification dimensions or exclusion rationale are invalid' }
2550
- - { code: WORKFLOW_REGRESSION_SIGNAL_MISSING, description: 'a reported regression fix lacks a failing-before signal' }
2551
- - { code: WORKFLOW_REVIEW_MODE_MISMATCH, description: 'the review summary scope differs from the workflow scope' }
2552
- - { code: WORKFLOW_REVIEW_EVIDENCE_MISMATCH, description: 'the review worker roster differs from persisted specialist artifacts' }
2553
- - { code: WORKFLOW_REVIEW_FINDINGS_MISMATCH, description: 'the unified review findings differ from specialist evidence' }
2554
- - { code: WORKFLOW_REVIEW_NOT_APPROVED, description: 'both independent review axes must pass' }
2555
- - { code: WORKFLOW_TEST_NOT_PASSED, description: 'the current change-level test gate did not pass' }
2556
- - { code: WORKFLOW_SESSION_ACTIVE, description: 'delivery cannot converge while an execution session remains active' }
2557
- - { code: WORKFLOW_CONTEXT_NOT_READY, description: 'delivery evidence lacks a current ready context manifest' }
2558
- - { code: WORKFLOW_CONTEXT_STALE, description: 'a required Context reference or bound task/change authority changed after compilation; optional drift remains a summary warning' }
2559
- - { code: WORKFLOW_DELIVERY_CHECK_FAILED, description: 'one or more local delivery checks did not pass' }
2560
- - { code: WORKFLOW_CHANGE_NOT_ARCHIVED, description: 'delivery completion requires an archived change' }
2561
- - { code: WORKFLOW_RELEASE_AUTHORITY_MISMATCH, description: 'a local delivery report attempted to claim external release authority' }
2562
- - { code: DECISION_ALIGNMENT_BLOCKING, description: 'matching owner decisions or artifact checkpoints are not current' }
2563
- cli_subcommand: workflow complete
2564
- emits_events: [workflow_completed, plan_approved]
122
+ - { code: VALIDATION_ERROR, description: 'input failed structural validation' }
123
+ - { code: STATE_CORRUPT, description: 'local authority cannot be checkpointed safely' }
124
+ - { code: PATH_AUTHORITY_VIOLATION, description: 'checkpoint evidence escapes managed authority' }
125
+ cli_subcommand: 'ultra checkpoint'
126
+ emits_events: [ultra_checkpoint_accepted, ultra_checkpoint_rejected]
2565
127
 
2566
- # ───────────────────────── artifact family ─────────────────────────────
2567
- - name: artifact.record
2568
- family: artifact
2569
- description: Register the current bytes of one semantic or evidence file, replace its dependency edges transactionally, and invalidate exact downstream consumers when its digest changes.
2570
- phase: '20'
128
+ - name: ultra.sync
129
+ family: ultra
130
+ description: Inspect, import, or publish the Git team checkpoint while preserving local sessions and rejecting real concurrent team-state conflicts.
131
+ phase: '24'
2571
132
  writer_role: mcp
2572
133
  input_schema:
2573
134
  type: object
2574
- required: [owner_type, owner_id, kind, path, provenance, source_refs, consumer_refs]
2575
- additionalProperties: false
2576
- properties:
2577
- id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
2578
- owner_type: { type: string, enum: [project, baseline, change, task, workflow] }
2579
- owner_id: { type: string, minLength: 1 }
2580
- kind: { type: string, minLength: 1 }
2581
- path: { type: string, minLength: 1 }
2582
- status: { type: string, enum: [current, stale, terminal, archived], default: current }
2583
- expected_before_digest:
2584
- type: [string, 'null']
2585
- pattern: '^[a-f0-9]{64}$'
2586
- provenance: { type: object, additionalProperties: true }
2587
- metadata: { type: object, additionalProperties: true }
2588
- source_refs:
2589
- type: array
2590
- items:
2591
- type: object
2592
- required: [type, id, relation]
2593
- additionalProperties: false
2594
- properties:
2595
- type: { type: string, enum: [artifact, project, baseline, change, task, workflow, external] }
2596
- id: { type: string, minLength: 1 }
2597
- relation: { type: string, minLength: 1 }
2598
- consumer_refs:
2599
- type: array
2600
- items:
2601
- type: object
2602
- required: [type, id, relation]
2603
- additionalProperties: false
2604
- properties:
2605
- type: { type: string, enum: [artifact, project, baseline, change, task, workflow, external] }
2606
- id: { type: string, minLength: 1 }
2607
- relation: { type: string, minLength: 1 }
2608
- output_schema:
2609
- type: object
2610
- required: [artifact, changed, invalidated]
2611
- additionalProperties: false
2612
- properties:
2613
- artifact:
2614
- type: object
2615
- required: [id, owner_type, owner_id, kind, path, digest, before_digest, after_digest, managed, status, provenance, metadata, source_refs, consumer_refs, created_at, updated_at]
2616
- additionalProperties: false
2617
- properties:
2618
- id: { type: string }
2619
- owner_type: { type: string, enum: [project, baseline, change, task, workflow] }
2620
- owner_id: { type: string }
2621
- kind: { type: string }
2622
- path: { type: string }
2623
- digest: { type: [string, 'null'] }
2624
- before_digest: { type: [string, 'null'] }
2625
- after_digest: { type: [string, 'null'] }
2626
- managed: { type: boolean }
2627
- status: { type: string, enum: [current, stale, terminal, archived] }
2628
- provenance: { type: object }
2629
- metadata: { type: object }
2630
- source_refs:
2631
- type: array
2632
- items:
2633
- type: object
2634
- required: [type, id, relation]
2635
- additionalProperties: false
2636
- properties:
2637
- type: { type: string }
2638
- id: { type: string }
2639
- relation: { type: string }
2640
- consumer_refs:
2641
- type: array
2642
- items:
2643
- type: object
2644
- required: [type, id, relation]
2645
- additionalProperties: false
2646
- properties:
2647
- type: { type: string }
2648
- id: { type: string }
2649
- relation: { type: string }
2650
- created_at: { type: string }
2651
- updated_at: { type: string }
2652
- changed: { type: boolean }
2653
- invalidated:
2654
- type: array
2655
- items:
2656
- type: object
2657
- required: [type, id]
2658
- additionalProperties: false
2659
- properties:
2660
- type: { type: string }
2661
- id: { type: string }
2662
- errors:
2663
- - { code: ARTIFACT_FILE_MISSING, description: 'declared artifact file does not exist' }
2664
- - { code: ARTIFACT_PATH_INVALID, description: 'artifact path escapes the project or is not a regular file' }
2665
- - { code: ARTIFACT_PATH_EXEMPT, description: 'runtime, scratch, or generated projection path cannot become semantic authority' }
2666
- - { code: ARTIFACT_OWNER_MISSING, description: 'typed artifact owner does not exist' }
2667
- - { code: ARTIFACT_ENDPOINT_MISSING, description: 'a dependency endpoint does not exist' }
2668
- - { code: ARTIFACT_DIGEST_CONFLICT, description: 'expected prior digest does not match current registry authority' }
2669
- - { code: ARTIFACT_AUTHORITY_CONFLICT, description: 'artifact id is bound to another authority or the canonical path already has an active authority' }
2670
- - { code: ARTIFACT_GRAPH_SELF_EDGE, description: 'an artifact cannot directly depend on itself' }
2671
- - { code: ARTIFACT_GRAPH_CYCLE, description: 'replacement edges would create a dependency cycle' }
2672
- cli_subcommand: artifact record
2673
- emits_events: [artifact_recorded, spec_changed, task_stale_marked]
2674
-
2675
- - name: artifact.get
2676
- family: artifact
2677
- description: Read one registered artifact together with its typed ownership, provenance, and normalized source and consumer edges.
2678
- phase: '20'
2679
- readonly: true
2680
- input_schema:
2681
- type: object
2682
- additionalProperties: false
2683
- oneOf:
2684
- - required: [id]
2685
- - required: [path]
2686
- properties:
2687
- id: { type: string, minLength: 1 }
2688
- path: { type: string, minLength: 1 }
2689
- output_schema:
2690
- type: object
2691
- required: [artifact]
135
+ required: [action]
2692
136
  additionalProperties: false
2693
137
  properties:
2694
- artifact:
2695
- type: object
2696
- required: [id, owner_type, owner_id, kind, path, digest, before_digest, after_digest, managed, status, provenance, metadata, source_refs, consumer_refs, created_at, updated_at]
2697
- additionalProperties: false
2698
- properties:
2699
- id: { type: string }
2700
- owner_type: { type: string, enum: [project, baseline, change, task, workflow] }
2701
- owner_id: { type: string }
2702
- kind: { type: string }
2703
- path: { type: string }
2704
- digest: { type: [string, 'null'] }
2705
- before_digest: { type: [string, 'null'] }
2706
- after_digest: { type: [string, 'null'] }
2707
- managed: { type: boolean }
2708
- status: { type: string, enum: [current, stale, terminal, archived] }
2709
- provenance: { type: object }
2710
- metadata: { type: object }
2711
- source_refs: { type: array, items: { type: object } }
2712
- consumer_refs: { type: array, items: { type: object } }
2713
- created_at: { type: string }
2714
- updated_at: { type: string }
138
+ action: { type: string, enum: [inspect, import, publish, migrate] }
139
+ reason: { type: string }
140
+ idempotency_key: { type: string }
141
+ output_schema: { type: object }
2715
142
  errors:
2716
- - { code: ARTIFACT_NOT_FOUND, description: 'artifact id or path is not registered' }
2717
- - { code: ARTIFACT_DUPLICATE_AUTHORITY, description: 'path lookup resolves to multiple active authorities and requires an id' }
2718
- - { code: VALIDATION_ERROR, description: 'exactly one lookup key is required' }
2719
- cli_subcommand: artifact get
2720
- emits_events: []
143
+ - { code: VALIDATION_ERROR, description: 'input failed structural validation' }
144
+ - { code: TASK_LEDGER_HISTORY_CONFLICT, description: 'team checkpoint histories conflict' }
145
+ - { code: TASK_LEDGER_TASK_CONFLICT, description: 'the same durable task changed concurrently' }
146
+ cli_subcommand: 'ultra sync'
2721
147
 
2722
- # ────────────────────────── system family ──────────────────────────────
2723
- - name: system.doctor
2724
- family: system
2725
- description: Inspect Ultra runtime health and optionally perform backup-first recovery and projection repair.
2726
- phase: '9'
148
+ - name: ultra.session
149
+ family: ultra
150
+ description: Acquire, inspect, heartbeat, or release the small execution lease that requires transactional concurrency control.
151
+ phase: '24'
2727
152
  writer_role: mcp
2728
153
  input_schema:
2729
154
  type: object
155
+ required: [action]
2730
156
  additionalProperties: false
2731
157
  properties:
2732
- repair: { type: boolean, default: false }
2733
- output_schema:
2734
- type: object
2735
- required: [status, checks, repair_performed]
2736
- additionalProperties: true
2737
- properties:
2738
- status: { type: string, enum: [healthy, degraded] }
2739
- checks: { type: object }
2740
- repair_performed: { type: boolean }
2741
- backup_path: { type: string }
2742
- repair: { type: object }
158
+ action: { type: string, enum: [admission, acquire, get, list, heartbeat, release] }
159
+ scope: { type: object }
160
+ payload: { type: object }
161
+ idempotency_key: { type: string }
162
+ output_schema: { type: object }
2743
163
  errors:
2744
- - { code: BACKUP_FAILED, description: 'state database backup failed before repair' }
2745
- - { code: STATE_DB_ERROR, description: 'runtime state could not be inspected' }
2746
- cli_subcommand: system doctor
2747
- emits_events: []
164
+ - { code: VALIDATION_ERROR, description: 'input failed structural validation' }
165
+ - { code: SESSION_STATUS_CONFLICT, description: 'a concurrent session transition won' }
166
+ - { code: LEASE_EXPIRED, description: 'the execution lease already expired' }
167
+ cli_subcommand: 'ultra session'
2748
168
 
2749
- # ────────────────────────── plan family (D34) ───────────────────────────
2750
- - name: plan.export
2751
- family: plan
2752
- description: Render deterministic plan.json and plan.md under the owning Change artifact root from the current planning Context Manifest.
2753
- phase: '8a'
169
+ - name: ultra.archive
170
+ family: ultra
171
+ description: Converge and archive one accepted Change through the recoverable filesystem and database transaction boundary.
172
+ phase: '24'
2754
173
  writer_role: mcp
2755
174
  input_schema:
2756
175
  type: object
2757
- required: [change_id]
2758
- additionalProperties: false
2759
- properties:
2760
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
2761
- output_schema:
2762
- type: object
2763
- required: [plan_path, plan_md_path, wave_count]
176
+ required: [change_id, payload, idempotency_key]
2764
177
  additionalProperties: false
2765
178
  properties:
2766
- plan_path: { type: string }
2767
- plan_md_path: { type: string }
2768
- wave_count: { type: integer, minimum: 0 }
179
+ change_id: { type: string, minLength: 1 }
180
+ payload: { type: object }
181
+ idempotency_key: { type: string, minLength: 3 }
182
+ output_schema: { type: object }
2769
183
  errors:
2770
- - { code: NO_TASKS, description: 'no tasks to plan' }
2771
- - { code: CHANGE_NOT_FOUND, description: 'owning change does not exist' }
2772
- - { code: CHANGE_NOT_MUTABLE, description: 'owning change no longer accepts planning output' }
2773
- - { code: PLAN_CONTEXT_REQUIRED, description: 'the owning Change has no plan/planning Context Manifest' }
2774
- - { code: PLAN_CONTEXT_STALE, description: 'the plan/planning Context Manifest is stale or blocked' }
2775
- - { code: PLAN_ARTIFACT_PATH_UNSAFE, description: 'the Change artifact root, an ancestor, or a plan target is a symlink or escapes the physical project root' }
2776
- - { code: PLAN_PUBLISH_CONFLICT, description: 'plan.json or plan.md changed after publication preparation; concurrent bytes are preserved' }
2777
- - { code: PLAN_PUBLISH_FAILED, description: 'the journaled plan.json and plan.md publication could not complete and was rolled back' }
2778
- - { code: PLAN_RECOVERY_REQUIRED, description: 'an interrupted plan publication must be recovered before state mutation continues' }
2779
- - { code: ARTIFACT_AUTHORITY_CONFLICT, description: 'plan.json or plan.md already has another active registry authority' }
2780
- - { code: ARTIFACT_DIGEST_CONFLICT, description: 'the registered plan authority changed before publication' }
2781
- - { code: WRITE_FAILED, description: 'cannot write plan file' }
2782
- cli_subcommand: plan export
2783
- emits_events: [plan_exported]
2784
- trace_to: '§7.3, D34'
184
+ - { code: VALIDATION_ERROR, description: 'input failed structural validation' }
185
+ - { code: STATE_CORRUPT, description: 'archive authority cannot be trusted' }
186
+ - { code: ARCHIVE_RUNTIME_UNAVAILABLE, description: 'safe archive primitives are unavailable' }
187
+ cli_subcommand: 'ultra archive'
2785
188
 
2786
- - name: plan.get
2787
- family: plan
2788
- description: Read a section of the owning Change's persisted plan.json artifact.
2789
- phase: '8a'
2790
- readonly: true
189
+ - name: ultra.doctor
190
+ family: ultra
191
+ description: Inspect mechanical health and optionally apply only backup-first deterministic repairs. Semantic choices remain with the model and owner.
192
+ phase: '24'
193
+ writer_role: mcp
2791
194
  input_schema:
2792
195
  type: object
2793
- required: [change_id]
2794
- additionalProperties: false
2795
- properties:
2796
- change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
2797
- section: { type: string, enum: [tasks, topo, conflicts, all], default: all }
2798
- output_schema:
2799
- type: object
2800
- required: [plan]
2801
196
  additionalProperties: false
2802
197
  properties:
2803
- plan: { type: object }
198
+ repair: { type: boolean }
199
+ output_schema: { type: object }
2804
200
  errors:
2805
- - { code: NO_PLAN, description: 'no plan has been computed yet' }
2806
- - { code: CHANGE_NOT_FOUND, description: 'owning change does not exist' }
2807
- - { code: PLAN_CHANGE_MISMATCH, description: 'current plan artifact belongs to another change' }
2808
- - { code: PLAN_ARTIFACT_INVALID, description: 'plan.json is unsafe, malformed, stale, or does not match the current Change-owned registry authority' }
2809
- cli_subcommand: plan get
2810
- emits_events: []
2811
- trace_to: '§7.3, D34'
201
+ - { code: STATE_CORRUPT, description: 'the state database cannot be inspected safely' }
202
+ - { code: BACKUP_FAILED, description: 'a required recovery backup could not be created' }
203
+ cli_subcommand: 'ultra doctor'