ultra-builder-pro-cli 0.21.1 → 0.23.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 (58) hide show
  1. package/.ultra-template/tasks/tasks.json +10 -3
  2. package/.ultra-template/templates/task-context.md +19 -0
  3. package/CHANGELOG.md +78 -0
  4. package/README.md +210 -36
  5. package/adapters/_shared/codex-assets.cjs +8 -3
  6. package/adapters/_shared/interaction-contract.cjs +13 -6
  7. package/adapters/_shared/runtime-assets.cjs +1 -1
  8. package/adapters/claude.js +1 -1
  9. package/adapters/kimi.js +1 -1
  10. package/adapters/opencode.js +24 -13
  11. package/docs/AGENT-CONTEXT.md +58 -51
  12. package/docs/ARCHITECTURE.md +82 -51
  13. package/docs/ARTIFACT-AUTHORITY.md +83 -44
  14. package/docs/COMMIT-HASH-BACKFILL.md +33 -90
  15. package/docs/DECISIONS.md +9 -7
  16. package/docs/LEGACY-CLI-CROSSWALK.md +10 -2
  17. package/docs/PLUGIN-ISOLATION-CONTRACT.md +3 -2
  18. package/docs/ROADMAP.md +3 -3
  19. package/docs/RUNTIME-COMPAT-MATRIX.md +13 -10
  20. package/docs/STATE-DB-ACCESS-POLICY.md +47 -19
  21. package/docs/WORKFLOW-LIFECYCLE.md +79 -49
  22. package/hooks/README.md +5 -4
  23. package/hooks/active_task_context.py +41 -39
  24. package/mcp-server/lib/artifact-registry.cjs +32 -7
  25. package/mcp-server/lib/baseline-workflow.cjs +60 -24
  26. package/mcp-server/lib/change-workflow.cjs +42 -6
  27. package/mcp-server/lib/context-paths.cjs +34 -3
  28. package/mcp-server/lib/doctor.cjs +28 -0
  29. package/mcp-server/lib/git-bootstrap.cjs +0 -1
  30. package/mcp-server/lib/init-project.cjs +52 -2
  31. package/mcp-server/lib/projector.cjs +43 -8
  32. package/mcp-server/lib/state-authority.cjs +19 -3
  33. package/mcp-server/lib/state-ops.cjs +6 -1
  34. package/mcp-server/lib/task-ledger.cjs +1342 -0
  35. package/mcp-server/lib/ultra-facade.cjs +646 -0
  36. package/mcp-server/lib/workflow-state.cjs +166 -2
  37. package/mcp-server/server.cjs +214 -26
  38. package/package.json +1 -1
  39. package/skills/ultra-change/SKILL.md +38 -90
  40. package/skills/ultra-deliver/SKILL.md +42 -62
  41. package/skills/ultra-dev/SKILL.md +34 -73
  42. package/skills/ultra-doctor/SKILL.md +26 -39
  43. package/skills/ultra-init/SKILL.md +37 -69
  44. package/skills/ultra-plan/SKILL.md +52 -125
  45. package/skills/ultra-research/SKILL.md +41 -101
  46. package/skills/ultra-review/SKILL.md +25 -44
  47. package/skills/ultra-status/SKILL.md +21 -40
  48. package/skills/ultra-test/SKILL.md +25 -60
  49. package/skills/ultra-think/SKILL.md +29 -48
  50. package/skills/ultra-think/references/decision-dialogue.md +6 -4
  51. package/spec/cli-protocol.md +15 -0
  52. package/spec/mcp-tools.yaml +286 -0
  53. package/spec/schemas/context-file.v4.5.schema.json +1 -1
  54. package/spec/schemas/mcp-tools.schema.json +1 -1
  55. package/spec/schemas/state-db.sql +1 -1
  56. package/spec/schemas/task-ledger.v1.schema.json +217 -0
  57. package/ultra-tools/commands/migrate.cjs +5 -2
  58. package/.ultra-template/tasks/contexts/TEMPLATE.md +0 -19
@@ -0,0 +1,217 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultra-builder-pro.dev/spec/task-ledger.v1.schema.json",
4
+ "title": "Ultra team task ledger v1",
5
+ "description": "Git-facing checkpoint ledger for durable task contracts and statuses. Live sessions, leases, worktrees, and in-progress ownership remain in .ultra/.runtime/state.db.",
6
+ "type": "object",
7
+ "required": [
8
+ "kind",
9
+ "schema_version",
10
+ "generation",
11
+ "parent_digest",
12
+ "ancestors",
13
+ "state_digest",
14
+ "published_at",
15
+ "reason",
16
+ "baseline",
17
+ "changes",
18
+ "tasks"
19
+ ],
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "kind": { "const": "ultra-team-task-ledger" },
23
+ "schema_version": { "const": "1.0" },
24
+ "generation": { "type": "integer", "minimum": 0 },
25
+ "parent_digest": {
26
+ "type": ["string", "null"],
27
+ "pattern": "^[0-9a-f]{64}$"
28
+ },
29
+ "ancestors": {
30
+ "type": "array",
31
+ "maxItems": 64,
32
+ "items": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
33
+ },
34
+ "state_digest": {
35
+ "type": "string",
36
+ "pattern": "^[0-9a-f]{64}$"
37
+ },
38
+ "published_at": {
39
+ "type": ["string", "null"],
40
+ "format": "date-time"
41
+ },
42
+ "reason": { "type": "string", "minLength": 1 },
43
+ "baseline": {
44
+ "oneOf": [
45
+ { "type": "null" },
46
+ { "$ref": "#/$defs/baseline" }
47
+ ]
48
+ },
49
+ "changes": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "object",
53
+ "required": [
54
+ "id",
55
+ "title",
56
+ "kind",
57
+ "status",
58
+ "intent",
59
+ "artifact_root",
60
+ "revision",
61
+ "parent_digest",
62
+ "digest"
63
+ ],
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "id": { "type": "string" },
67
+ "title": { "type": "string", "minLength": 1 },
68
+ "kind": { "type": "string", "enum": ["quick", "standard", "major", "incident"] },
69
+ "status": { "type": "string", "enum": ["active", "blocked", "ready", "archived", "cancelled"] },
70
+ "intent": { "type": "string", "minLength": 1 },
71
+ "docs_impact": { "type": "object" },
72
+ "provider_refs": { "type": "object" },
73
+ "baseline_bypass": { "type": "object" },
74
+ "contract": { "type": "object" },
75
+ "classification": { "type": "object" },
76
+ "research_disposition": { "type": "object" },
77
+ "base_commit": { "type": "string" },
78
+ "artifact_root": { "type": "string", "minLength": 1 },
79
+ "closed_at": { "type": "string" },
80
+ "revision": { "type": "integer", "minimum": 1 },
81
+ "parent_digest": {
82
+ "type": ["string", "null"],
83
+ "pattern": "^[0-9a-f]{64}$"
84
+ },
85
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
86
+ }
87
+ }
88
+ },
89
+ "tasks": {
90
+ "type": "array",
91
+ "items": { "$ref": "#/$defs/task" }
92
+ }
93
+ },
94
+ "$defs": {
95
+ "baseline": {
96
+ "type": "object",
97
+ "required": [
98
+ "id",
99
+ "project_name",
100
+ "mode",
101
+ "status",
102
+ "scope",
103
+ "worktree_accepted",
104
+ "known_red_accepted",
105
+ "spec_refs",
106
+ "evidence",
107
+ "verification",
108
+ "unknowns",
109
+ "gaps",
110
+ "classification",
111
+ "provider_refs",
112
+ "revision",
113
+ "parent_digest",
114
+ "digest"
115
+ ],
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "id": { "type": "string", "minLength": 1 },
119
+ "project_name": { "type": "string", "minLength": 1 },
120
+ "project_type": { "type": "string" },
121
+ "stack": { "type": "string" },
122
+ "mode": {
123
+ "type": "string",
124
+ "enum": ["greenfield", "brownfield", "migrated"]
125
+ },
126
+ "status": {
127
+ "type": "string",
128
+ "enum": ["draft", "adopting", "blocked", "ready"]
129
+ },
130
+ "scope": {
131
+ "type": "array",
132
+ "minItems": 1,
133
+ "items": { "type": "string", "minLength": 1 }
134
+ },
135
+ "repository_revision": { "type": "string" },
136
+ "repository_branch": { "type": "string" },
137
+ "worktree_state": { "type": "string" },
138
+ "worktree_digest": { "type": "string" },
139
+ "worktree_accepted": { "type": "boolean" },
140
+ "known_red_accepted": { "type": "boolean" },
141
+ "spec_refs": { "type": "array" },
142
+ "evidence": { "type": "array" },
143
+ "verification": { "type": "array" },
144
+ "unknowns": { "type": "array" },
145
+ "gaps": { "type": "array" },
146
+ "classification": { "type": "object" },
147
+ "provider_refs": { "type": "object" },
148
+ "research_run_id": { "type": "string" },
149
+ "approved_by": { "type": "string" },
150
+ "approval_note": { "type": "string" },
151
+ "converged_at": { "type": "string" },
152
+ "revision": { "type": "integer", "minimum": 1 },
153
+ "parent_digest": {
154
+ "type": ["string", "null"],
155
+ "pattern": "^[0-9a-f]{64}$"
156
+ },
157
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
158
+ }
159
+ },
160
+ "task": {
161
+ "type": "object",
162
+ "required": [
163
+ "id",
164
+ "title",
165
+ "type",
166
+ "priority",
167
+ "status",
168
+ "deps",
169
+ "files_modified",
170
+ "stale",
171
+ "acceptance",
172
+ "context_refs",
173
+ "docs_impact",
174
+ "ownership",
175
+ "revision",
176
+ "parent_digest",
177
+ "digest"
178
+ ],
179
+ "additionalProperties": false,
180
+ "properties": {
181
+ "id": { "type": "string", "pattern": "^[a-zA-Z0-9_\\-]+$" },
182
+ "title": { "type": "string", "minLength": 3 },
183
+ "type": { "type": "string", "enum": ["architecture", "feature", "bugfix"] },
184
+ "priority": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
185
+ "complexity": { "type": "integer", "minimum": 1, "maximum": 10 },
186
+ "estimated_days": { "type": "number", "exclusiveMinimum": 0 },
187
+ "status": {
188
+ "type": "string",
189
+ "enum": ["pending", "completed", "blocked", "expanded"]
190
+ },
191
+ "deps": { "type": "array", "items": { "type": "string" } },
192
+ "files_modified": { "type": "array", "items": { "type": "string" } },
193
+ "stale": { "type": "boolean" },
194
+ "trace_to": { "type": "string" },
195
+ "outcome": { "type": "string" },
196
+ "slice_kind": {
197
+ "type": "string",
198
+ "enum": ["tracer_bullet", "expand_contract", "integration_checkpoint"]
199
+ },
200
+ "public_seam": { "type": "string" },
201
+ "verification_command": { "type": "string" },
202
+ "acceptance": { "type": "array", "items": { "type": "object" } },
203
+ "context_refs": { "type": "array", "items": { "type": "object" } },
204
+ "docs_impact": { "type": "object" },
205
+ "ownership": { "type": "object" },
206
+ "change_id": { "type": "string" },
207
+ "parent_id": { "type": "string" },
208
+ "revision": { "type": "integer", "minimum": 1 },
209
+ "parent_digest": {
210
+ "type": ["string", "null"],
211
+ "pattern": "^[0-9a-f]{64}$"
212
+ },
213
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
214
+ }
215
+ }
216
+ }
217
+ }
@@ -246,8 +246,11 @@ function sanitizeLegacyContextTemplate(sourceDir) {
246
246
  /Read by mid_workflow_recall\.py and session_context\.py and injected into agent context\./g,
247
247
  'Used as task-local acceptance criteria by the active Ultra workflow.',
248
248
  );
249
- if (next === current) return false;
250
- fs.writeFileSync(file, next);
249
+ const target = path.join(sourceDir, '.ultra', 'templates', 'task-context.md');
250
+ if (fs.existsSync(target)) return false;
251
+ fs.mkdirSync(path.dirname(target), { recursive: true });
252
+ fs.writeFileSync(target, next);
253
+ fs.rmSync(file);
251
254
  return true;
252
255
  }
253
256
 
@@ -1,19 +0,0 @@
1
- <!-- The projector owns YAML frontmatter and the generated execution contract. -->
2
-
3
- # Task Notes
4
-
5
- Use this body only for task-specific implementation discoveries that are not already
6
- authoritative task fields. Stable specification learning must follow the change
7
- approval workflow.
8
-
9
- ## Implementation Notes
10
-
11
- - [Evidence-backed note with a source reference]
12
-
13
- ## Open Questions
14
-
15
- - [Question, consequence, owner, and next evidence]
16
-
17
- ## Recovery Notes
18
-
19
- - [Current safe resume point and any external prerequisite]