ultra-builder-pro-cli 0.18.0 → 0.20.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 (44) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/README.md +16 -27
  3. package/adapters/_shared/interaction-contract.cjs +26 -4
  4. package/adapters/claude.js +3 -1
  5. package/adapters/kimi.js +4 -30
  6. package/adapters/opencode.js +50 -14
  7. package/commands/ultra-research.md +1 -1
  8. package/docs/AGENT-CONTEXT.md +23 -34
  9. package/docs/ARCHITECTURE.md +26 -12
  10. package/docs/DECISIONS.md +12 -8
  11. package/docs/LEGACY-CLI-CROSSWALK.md +9 -7
  12. package/docs/PLUGIN-ISOLATION-CONTRACT.md +54 -0
  13. package/docs/ROADMAP.md +5 -5
  14. package/docs/RUNTIME-COMPAT-MATRIX.md +26 -25
  15. package/docs/STATE-DB-ACCESS-POLICY.md +1 -1
  16. package/docs/WORKFLOW-LIFECYCLE.md +45 -25
  17. package/hooks/active_task_context.py +1 -1
  18. package/hooks/context_spine.py +1 -1
  19. package/hooks/health_check.py +19 -0
  20. package/hooks/pre_stop_check.py +1 -1
  21. package/hooks/workflow_checkpoint.py +1 -1
  22. package/hooks/workflow_context.py +1 -1
  23. package/hooks/workflow_resume.py +1 -1
  24. package/mcp-server/lib/decision-dialogue.cjs +84 -11
  25. package/mcp-server/lib/doctor.cjs +2 -1
  26. package/mcp-server/lib/state-db.cjs +143 -13
  27. package/mcp-server/lib/workflow-state.cjs +4 -4
  28. package/mcp-server/server.cjs +24 -8
  29. package/package.json +3 -4
  30. package/skills/ultra-change/SKILL.md +16 -8
  31. package/skills/ultra-init/SKILL.md +2 -1
  32. package/skills/ultra-plan/SKILL.md +20 -3
  33. package/skills/ultra-research/SKILL.md +25 -15
  34. package/skills/ultra-test/SKILL.md +5 -2
  35. package/skills/ultra-think/SKILL.md +2 -0
  36. package/skills/ultra-think/references/decision-dialogue.md +47 -11
  37. package/spec/cli-protocol.md +1 -0
  38. package/spec/mcp-tools.yaml +30 -3
  39. package/spec/schemas/state-db.sql +7 -4
  40. package/ultra-tools/cli.cjs +1 -1
  41. package/ultra-tools/commands/status.cjs +2 -1
  42. package/adapters/_shared/handbook.cjs +0 -569
  43. package/bin/handbook.js +0 -107
  44. package/docs/USER-HANDBOOK-CONTRACT.md +0 -120
@@ -1,120 +0,0 @@
1
- # Ultra Builder Pro — User Handbook Contract
2
-
3
- Ultra Builder Pro has two explicit handbook modes:
4
-
5
- - default mode owns only one small managed section describing the Ultra runtime;
6
- - full mode installs a complete host-native engineering handbook when the owner
7
- explicitly chooses to replace legacy unmarked prompt content.
8
-
9
- Neither mode runs implicitly during plugin installation. Existing files are backed
10
- up before mutation, and full mode preserves other provider-owned marker blocks.
11
-
12
- ## Source and render targets
13
-
14
- `adapters/_shared/handbook.cjs` is the canonical source. It renders both the bounded
15
- runtime contract and the complete engineering handbook with host-native command,
16
- interaction, coordination, delegation, and durable-file semantics:
17
-
18
- | Runtime | Default target | Main invocation form |
19
- |---|---|---|
20
- | Claude Code | `~/.claude/CLAUDE.md` | `/ultra-builder-pro:ultra-plan` |
21
- | Codex | `~/.codex/AGENTS.md` | `$ultra-builder-pro:ultra-plan` |
22
- | OpenCode | `~/.config/opencode/AGENTS.md` | `/ultra-plan` |
23
- | Kimi Code | `~/.kimi-code/AGENTS.md` | `/ultra-builder-pro:ultra-plan` |
24
-
25
- The renderer never copies Claude Code-only APIs into Codex, OpenCode, or Kimi. Each
26
- host receives only its native invocation, collaboration, interaction, and worker
27
- language.
28
-
29
- The default managed block deliberately stays short. It says that `.ultra/state.db`
30
- is authoritative; `change.context` compiles role/gate readiness, bounded references,
31
- fresh-context budget, public seam, and exact verification; size budgets are advisory;
32
- new ordinary work requires a healthy baseline; and only an approved incident
33
- break-glass may start without baseline readiness. It explicitly separates user intent,
34
- host-model judgment, MCP mechanics, host-adapter presentation, and hook lifecycle
35
- responsibilities. It also records the decision, specification-learning, memory, agent,
36
- and package boundaries.
37
-
38
- Detailed procedures remain in the plugin skills so neither handbook mode duplicates
39
- workflow implementation steps.
40
-
41
- ## Managed-block contracts
42
-
43
- Default mode owns only:
44
-
45
- ```markdown
46
- <!-- ultra-builder-pro:handbook:start -->
47
- ...
48
- <!-- ultra-builder-pro:handbook:end -->
49
- ```
50
-
51
- Rules outside those markers remain byte-for-byte user-owned. A malformed or
52
- duplicated marker pair is an error, not an invitation to guess. For Codex only,
53
- the first default apply can migrate an old unmarked
54
- `## Ultra Builder Pro Runtime Contract` section up to the next level-two heading.
55
-
56
- Full mode owns:
57
-
58
- ```markdown
59
- <!-- ultra-builder-pro:full-handbook:start -->
60
- ...
61
- <!-- ultra-builder-pro:full-handbook:end -->
62
- ```
63
-
64
- On first full apply, unmarked legacy prompt content is replaced. Marker-delimited
65
- content owned by another provider is retained before the Ultra full-handbook region.
66
- Both `provider:start` / `provider:end` and `BEGIN provider` / `END provider`
67
- comment forms are supported. Repeated blocks remain repeated, and blocks nested
68
- inside an old Ultra full region are extracted before that region is replaced. Later
69
- full applies produce the same canonical output and keep each retained block
70
- byte-for-byte intact.
71
-
72
- Because full apply intentionally removes unmarked content, a current preview is
73
- enforced rather than merely documented. The confirmation token binds the runtime,
74
- target path, existing content, and rendered result; missing or stale tokens are
75
- rejected before any file changes.
76
-
77
- ## Safe workflow
78
-
79
- Preview and apply only the runtime contract:
80
-
81
- ```bash
82
- ubp-handbook preview --runtime claude
83
- ubp-handbook preview --runtime codex
84
- ubp-handbook preview --runtime opencode
85
- ubp-handbook preview --runtime kimi
86
-
87
- ubp-handbook apply --runtime claude
88
- ubp-handbook apply --runtime codex
89
- ubp-handbook apply --runtime opencode
90
- ubp-handbook apply --runtime kimi
91
- ```
92
-
93
- Converge a legacy complete handbook through explicit full mode:
94
-
95
- ```bash
96
- ubp-handbook preview --runtime codex --full > /tmp/ubp-codex-handbook.md
97
- # Inspect /tmp/ubp-codex-handbook.md and copy the token printed to the terminal.
98
- ubp-handbook apply --runtime codex --full \
99
- --confirm "PASTE_64_CHARACTER_TOKEN_HERE"
100
- ```
101
-
102
- Repeat with `claude`, `opencode`, or `kimi` as the runtime. An existing target is
103
- copied to `<file>.ubp-backup-<timestamp>` before atomic replacement. A handbook
104
- symlink remains a symlink and the resolved target's POSIX mode is retained.
105
- Re-running either apply mode with the same rendered content is a no-op and creates
106
- no additional backup.
107
-
108
- The plugin installer intentionally applies neither mode. A plugin update and a
109
- durable user-handbook change have different rollback and review requirements.
110
-
111
- ## Ownership boundaries
112
-
113
- The complete handbook defines general engineering and collaboration behavior, but it
114
- does not install or invoke external memory, graph, browser, deployment, discovery, or
115
- framework skills. Those providers retain their own installation, prompts, credentials,
116
- and lifecycle. Ultra records only the minimum provider references required for workflow
117
- provenance.
118
-
119
- Host adaptation is semantic, not textual substitution. A foreign tool name or prompt
120
- mechanism must never be made “compatible” by changing only its path or product name.