ultra-builder-pro-cli 0.18.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -1
- package/README.md +6 -20
- package/adapters/claude.js +3 -1
- package/adapters/kimi.js +4 -30
- package/adapters/opencode.js +50 -14
- package/docs/AGENT-CONTEXT.md +11 -25
- package/docs/ARCHITECTURE.md +10 -1
- package/docs/DECISIONS.md +1 -1
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +54 -0
- package/docs/ROADMAP.md +1 -2
- package/docs/RUNTIME-COMPAT-MATRIX.md +16 -21
- package/hooks/active_task_context.py +1 -1
- package/hooks/context_spine.py +1 -1
- package/hooks/health_check.py +19 -0
- package/hooks/pre_stop_check.py +1 -1
- package/hooks/workflow_checkpoint.py +1 -1
- package/hooks/workflow_context.py +1 -1
- package/hooks/workflow_resume.py +1 -1
- package/mcp-server/server.cjs +19 -7
- package/package.json +3 -4
- package/skills/ultra-change/SKILL.md +4 -3
- package/skills/ultra-init/SKILL.md +2 -1
- package/adapters/_shared/handbook.cjs +0 -569
- package/bin/handbook.js +0 -107
- package/docs/USER-HANDBOOK-CONTRACT.md +0 -120
package/hooks/pre_stop_check.py
CHANGED
|
@@ -34,7 +34,7 @@ def main() -> None:
|
|
|
34
34
|
print(f"[pre_stop_check] cannot inspect Context Spine: {exc}", file=sys.stderr)
|
|
35
35
|
allow_stop()
|
|
36
36
|
return
|
|
37
|
-
if breadcrumb and breadcrumb.get("
|
|
37
|
+
if breadcrumb and breadcrumb.get("workflow"):
|
|
38
38
|
allowed = ", ".join(breadcrumb.get("allowed_transitions") or []) or "none"
|
|
39
39
|
required = breadcrumb.get("required_transition") or "none"
|
|
40
40
|
print(
|
|
@@ -33,7 +33,7 @@ def main() -> None:
|
|
|
33
33
|
print(f"[workflow_checkpoint] cannot inspect Context Spine: {exc}", file=sys.stderr)
|
|
34
34
|
print(json.dumps({}))
|
|
35
35
|
return
|
|
36
|
-
if not breadcrumb or not breadcrumb.get("
|
|
36
|
+
if not breadcrumb or not breadcrumb.get("workflow"):
|
|
37
37
|
print(json.dumps({}))
|
|
38
38
|
return
|
|
39
39
|
|
|
@@ -28,7 +28,7 @@ def main() -> None:
|
|
|
28
28
|
except ContextSpineError as exc:
|
|
29
29
|
print(f"[workflow_context] cannot inspect Context Spine: {exc}", file=sys.stderr)
|
|
30
30
|
breadcrumb = None
|
|
31
|
-
if breadcrumb:
|
|
31
|
+
if breadcrumb and breadcrumb.get("workflow"):
|
|
32
32
|
context = render_breadcrumb(root, breadcrumb)
|
|
33
33
|
else:
|
|
34
34
|
print(json.dumps({}))
|
package/hooks/workflow_resume.py
CHANGED
|
@@ -64,7 +64,7 @@ def main() -> None:
|
|
|
64
64
|
text = None
|
|
65
65
|
try:
|
|
66
66
|
breadcrumb = read_breadcrumb(root)
|
|
67
|
-
if breadcrumb:
|
|
67
|
+
if breadcrumb and breadcrumb.get("workflow"):
|
|
68
68
|
text = render_breadcrumb(root, breadcrumb)
|
|
69
69
|
except ContextSpineError as exc:
|
|
70
70
|
print(f"[workflow_resume] cannot inspect Context Spine: {exc}", file=sys.stderr)
|
package/mcp-server/server.cjs
CHANGED
|
@@ -818,16 +818,28 @@ function appendHookLifecycleEvent({ rootDir, action, hookInput = {} } = {}) {
|
|
|
818
818
|
const db = openStateDb(dbPath);
|
|
819
819
|
try {
|
|
820
820
|
ensureSchemaVersion(db);
|
|
821
|
-
const
|
|
822
|
-
`SELECT
|
|
821
|
+
const workflow = db.prepare(
|
|
822
|
+
`SELECT change_id, task_id FROM workflow_runs
|
|
823
|
+
WHERE status IN ('active', 'blocked', 'ready') AND change_id IS NOT NULL
|
|
823
824
|
ORDER BY updated_at DESC, rowid DESC LIMIT 1`,
|
|
824
825
|
).get();
|
|
826
|
+
if (!workflow) return { recorded: false, reason: 'NO_ACTIVE_WORKFLOW' };
|
|
827
|
+
const change = db.prepare(
|
|
828
|
+
`SELECT id FROM changes
|
|
829
|
+
WHERE id = ? AND status IN ('active', 'blocked', 'ready')`,
|
|
830
|
+
).get(workflow.change_id);
|
|
825
831
|
if (!change) return { recorded: false, reason: 'NO_ACTIVE_CHANGE' };
|
|
826
|
-
const task =
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
832
|
+
const task = workflow.task_id
|
|
833
|
+
? db.prepare(
|
|
834
|
+
`SELECT id FROM tasks
|
|
835
|
+
WHERE id = ? AND change_id = ?
|
|
836
|
+
AND status IN ('in_progress', 'pending', 'blocked')`,
|
|
837
|
+
).get(workflow.task_id, change.id)
|
|
838
|
+
: db.prepare(
|
|
839
|
+
`SELECT id FROM tasks WHERE change_id = ? AND status IN ('in_progress', 'pending', 'blocked')
|
|
840
|
+
ORDER BY CASE status WHEN 'in_progress' THEN 0 WHEN 'blocked' THEN 1 ELSE 2 END,
|
|
841
|
+
updated_at DESC, rowid DESC LIMIT 1`,
|
|
842
|
+
).get(change.id);
|
|
831
843
|
const payload = {
|
|
832
844
|
agent_id: hookMetadata(hookInput.agent_id),
|
|
833
845
|
agent_type: hookMetadata(hookInput.agent_type),
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra-builder-pro-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.19.1",
|
|
4
|
+
"description": "Explicitly invoked Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI, and Kimi Code, with project-local MCP authority and lifecycle recovery.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ultra-builder-pro-cli": "bin/install.js",
|
|
7
7
|
"ubp": "bin/install.js",
|
|
8
|
-
"ubp-handbook": "bin/handbook.js",
|
|
9
8
|
"ubp-orchestrator": "bin/orchestrator.js",
|
|
10
9
|
"ultra-tools": "ultra-tools/cli.cjs"
|
|
11
10
|
},
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
"docs/COMMIT-HASH-BACKFILL.md",
|
|
57
56
|
"docs/DECISIONS.md",
|
|
58
57
|
"docs/STATE-DB-ACCESS-POLICY.md",
|
|
59
|
-
"docs/
|
|
58
|
+
"docs/PLUGIN-ISOLATION-CONTRACT.md",
|
|
60
59
|
"docs/RUNTIME-COMPAT-MATRIX.md",
|
|
61
60
|
"!**/__pycache__/**",
|
|
62
61
|
"!**/*.pyc",
|
|
@@ -60,9 +60,10 @@ meaning is coupled. Downstream task, context, test, or review evidence affected
|
|
|
60
60
|
change must become stale and be regenerated; never keep old evidence green by prompt
|
|
61
61
|
assertion.
|
|
62
62
|
|
|
63
|
-
If research is required,
|
|
64
|
-
contract is sufficiently evidenced,
|
|
65
|
-
|
|
63
|
+
If research is required, recommend `ultra-research` with the recorded disposition. If
|
|
64
|
+
the contract is sufficiently evidenced, recommend `ultra-plan`. Return and wait for an
|
|
65
|
+
explicit user invocation; do not start either workflow. `change.context` is compiled
|
|
66
|
+
only for an actual plan, implementation, test, or review consumer.
|
|
66
67
|
|
|
67
68
|
Stable implementation discoveries use the approval-gated specification-learning
|
|
68
69
|
transitions. External memory and graph providers retain their own content; Ultra stores
|
|
@@ -75,7 +75,8 @@ Read the returned `allowed_transitions` and `required_transition`:
|
|
|
75
75
|
- a required transition represents a hard recovery invariant and must be followed;
|
|
76
76
|
- otherwise the host model recommends among the allowed capabilities using the user's
|
|
77
77
|
goal and current evidence;
|
|
78
|
-
-
|
|
78
|
+
- never invoke another public Ultra workflow automatically; recommend the best allowed
|
|
79
|
+
capability and wait for an explicit user invocation.
|
|
79
80
|
|
|
80
81
|
Report classification, scope, schema and backup result, Git state, init workflow id,
|
|
81
82
|
baseline state, and allowed transitions. Do not claim that a baseline is ready until a
|