@polderlabs/bizar 10.23.22 → 10.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 (76) hide show
  1. package/AGENTS.md +17 -14
  2. package/README.md +209 -67
  3. package/cli/bin.mjs +53 -0
  4. package/cli/commands/ambiguity.mjs +473 -0
  5. package/cli/commands/goal-bootstrap.mjs +135 -0
  6. package/cli/commands/guard.mjs +850 -0
  7. package/cli/commands/models.mjs +19 -1
  8. package/cli/commands/objective-scheduler.mjs +15 -4
  9. package/cli/commands/spec-list.mjs +122 -4
  10. package/cli/commands/validate.mjs +6 -7
  11. package/cli/commands/workflow.mjs +84 -7
  12. package/cli/core/ultragoal-state.mjs +535 -0
  13. package/cli/install/interactive-setup.mjs +13 -1
  14. package/cli/install/paths.mjs +2 -10
  15. package/cli/provision.mjs +21 -14
  16. package/cli/utils.mjs +2 -11
  17. package/config/claude/CLAUDE.md +17 -14
  18. package/config/claude/agents/office-greeter.md +10 -0
  19. package/config/claude/agents/office-manager.md +72 -15
  20. package/config/claude/agents/plan-architect.md +155 -0
  21. package/config/claude/agents/qa-reviewer.md +112 -0
  22. package/config/claude/commands/bizar.md +6 -5
  23. package/config/claude/commands/deep-interview.md +8 -0
  24. package/config/claude/commands/guard.md +57 -0
  25. package/config/claude/commands/plow-through.md +3 -2
  26. package/config/claude/commands/quick.md +14 -14
  27. package/config/claude/commands/team.md +5 -2
  28. package/config/claude/commands/ultragoal.md +8 -0
  29. package/config/claude/hooks/goal-bootstrap.mjs +126 -0
  30. package/config/claude/hooks/keyword-router.mjs +3 -1
  31. package/config/claude/hooks/sessionend-recall.mjs +1 -9
  32. package/config/claude/hooks/sessionstart-prime.mjs +41 -6
  33. package/config/claude/hooks/thinking-route.mjs +0 -1
  34. package/config/claude/hooks/worker-suggest.mjs +114 -24
  35. package/config/claude/hooks/workflow-route-guard.mjs +4 -3
  36. package/config/claude/hooks/workflow-route-state.mjs +1 -1
  37. package/config/skills/autopilot/SKILL.md +26 -0
  38. package/config/skills/deep-interview/SKILL.md +166 -0
  39. package/config/skills/goal-bootstrap/SKILL.md +86 -0
  40. package/config/skills/guard/SKILL.md +63 -0
  41. package/config/skills/ralplan/SKILL.md +92 -0
  42. package/config/skills/ralplan/references/pre-mortem.md +37 -0
  43. package/config/skills/ultragoal/SKILL.md +247 -0
  44. package/config/workflows/bizar-debug.js +1 -0
  45. package/config/workflows/bizar-implement.js +1 -0
  46. package/config/workflows/bizar-research.js +1 -0
  47. package/config/workflows/ultracode-research.js +1 -0
  48. package/config/workflows/ultracode-review.js +1 -0
  49. package/config/workflows/ultracode.js +1 -0
  50. package/package.json +1 -1
  51. package/packages/sdk/dist/agent/goal-bootstrap.d.ts +107 -0
  52. package/packages/sdk/dist/agent/goal-bootstrap.js +288 -0
  53. package/packages/sdk/dist/agent/guard.d.ts +103 -0
  54. package/packages/sdk/dist/agent/guard.js +220 -0
  55. package/packages/sdk/dist/ambiguity/index.d.ts +9 -0
  56. package/packages/sdk/dist/ambiguity/index.js +9 -0
  57. package/packages/sdk/dist/ambiguity/score.d.ts +120 -0
  58. package/packages/sdk/dist/ambiguity/score.js +140 -0
  59. package/packages/sdk/dist/autonomy/objective-run.d.ts +12 -3
  60. package/packages/sdk/dist/autonomy/objective-run.js +4 -1
  61. package/packages/sdk/dist/handoff/ralplan.d.ts +86 -0
  62. package/packages/sdk/dist/handoff/ralplan.js +94 -0
  63. package/packages/sdk/dist/index.d.ts +5 -0
  64. package/packages/sdk/dist/index.js +10 -0
  65. package/packages/sdk/dist/mcp/server.js +93 -0
  66. package/packages/sdk/dist/specs/deep-interview.d.ts +112 -0
  67. package/packages/sdk/dist/specs/deep-interview.js +135 -0
  68. package/packages/sdk/dist/version.d.ts +1 -1
  69. package/packages/sdk/dist/version.js +1 -1
  70. package/packages/sdk/package.json +1 -1
  71. package/config/claude/commands/migrate.md +0 -18
  72. package/config/claude/commands/tailscale-serve.md +0 -14
  73. package/config/claude/commands/tier.md +0 -31
  74. package/config/claude/commands/upgrade-defaults.md +0 -34
  75. package/config/claude/commands/use-default.md +0 -12
  76. package/config/claude/commands/use-premium.md +0 -12
package/AGENTS.md CHANGED
@@ -58,13 +58,15 @@ still deny prohibited actions and escalate externally visible or irreversible
58
58
  actions with `permissionDecision: "ask"`; that escalation list is the
59
59
  authoritative floor, not a starting point.
60
60
 
61
- Mike selects the coordination mode after bounded read-only orientation and one
62
- user clarification checkpoint: direct work only for an unmistakably tiny
63
- single-target copy/style/format edit; one isolated Agent for a clear bounded
64
- change; a native workflow for repeatable phased work; parallel Agents for
65
- disjoint scopes; and an Agent team for 3+ sustained roles that genuinely need
66
- cross-talk. Do not add unnecessary phases or duplicate workers. The team is
67
- host-side state under `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`, and per
61
+ Mike performs bounded read-only orientation, then uses a native Agent team as
62
+ the default for substantive work. Direct work is reserved for an unmistakably
63
+ tiny single-target copy/style/format edit or the user's explicit `/quick`
64
+ request. A single Agent or native workflow is used only when the user
65
+ explicitly requests that mode or a durable workflow must be resumed. Ask one
66
+ concise clarification question only when a material choice, acceptance
67
+ criterion, safety boundary, or unresolved constraint would change the work;
68
+ otherwise continue autonomously. The team is host-side state under
69
+ `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`, and per
68
70
  Anthropic's docs `team_name` is deprecated and ignored. Every editing dispatch
69
71
  uses an explicit configured model and call-level `isolation: "worktree"`.
70
72
  When two or more subtasks have non-overlapping writable scopes and no data
@@ -133,13 +135,14 @@ The autonomy and approval policy above governs this execution model. The project
133
135
  Every non-empty primary request enters Bizar through `office-manager` (`@mike`).
134
136
  The installer sets Claude Code's global `agent` setting to Mike's frontmatter
135
137
  name (`mike`),
136
- and the routing hook supplies the adaptive coordination policy. For non-tiny
137
- work, Mike first gathers only bounded read-only context, asks one concise
138
- clarification question that names the inferred outcome and proposed mode, then
139
- continues autonomously after the answer. A native workflow is one available
140
- mode, not a universal gate; Mike may select an isolated Agent, parallel Agents,
141
- or an Agent team when that better fits the work. Mike owns integration and
142
- final verification.
138
+ and the routing hook supplies the team-first coordination policy. For non-tiny
139
+ work, Mike first gathers only bounded read-only context. When the inferred
140
+ outcome, acceptance criteria, and safety boundary are clear, it forms the
141
+ default Agent team and continues autonomously. It asks one concise
142
+ clarification only when a material choice or unresolved constraint would
143
+ change the work. `/quick` explicitly selects direct primary-session execution;
144
+ single Agents and native workflows are explicit or resumed modes. Mike owns
145
+ integration and final verification.
143
146
  A Bizar custom agent already executing its assigned role does not recursively
144
147
  dispatch itself.
145
148
 
package/README.md CHANGED
@@ -1,92 +1,231 @@
1
- # Bizar Harness
1
+ <div align="center">
2
+
3
+ ```text
4
+ ██████╗ ██╗███████╗ █████╗ ██████╗
5
+ ██╔══██╗██║╚══███╔╝██╔══██╗██╔══██╗
6
+ ██████╔╝██║ ███╔╝ ███████║██████╔╝
7
+ ██╔══██╗██║ ███╔╝ ██╔══██║██╔══██╗
8
+ ██████╔╝██║███████╗██║ ██║██║ ██║
9
+ ╚═════╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
10
+ ```
11
+
12
+ ### Guarded autonomy for Claude Code
13
+
14
+ Choose your models once. Give Claude Code real work. Bizar supplies the routing,
15
+ specialists, guardrails, and evidence to carry it through responsibly.
16
+
17
+ `84 agents` · `80 skills` · `33 commands` · `14-tool MCP server`
18
+
19
+ </div>
2
20
 
3
- Bizar is a guarded-autonomy harness for Claude Code. It packages 16 uniquely named role agents, 66 skills, slash-command workflows, lifecycle and safety hooks, a typed SDK, a 14-tool MCP server, and install/audit/test utilities.
21
+ ---
4
22
 
5
- ## What it does
23
+ ## Why Bizar?
6
24
 
7
- - Executes clear local edit/test/verify work autonomously.
8
- - Uses Claude Code permission modes plus deterministic hooks for safety.
9
- - Requires human confirmation for commits, pushes, PR mutations, releases, publishing, deployments, and other external or irreversible operations.
10
- - Routes non-trivial work through research, plan/audit, implementation, review, and verification phases.
11
- - Preserves bounded session handoffs and learning evidence without providing a general-purpose note vault.
12
- - Guards compaction fidelity, commit quality, prose quality, dangerous shell commands, protected paths, and reviewer context.
25
+ Claude Code is already powerful. Bizar makes longer, cross-cutting work easier
26
+ to trust and easier to follow. It starts with a small read-only orientation,
27
+ forms an agent team by default for substantive work, and asks a clarification
28
+ only when a material decision remains unresolved. `/quick` deliberately
29
+ selects direct primary-session work; workflows and single agents are explicit
30
+ or resumed modes.
13
31
 
14
- Bizar deliberately ships no embedded web control plane, browser extension,
15
- background web service, or note-vault/search subsystem. The machine-readable
16
- `bizar control` command lets an optional OpenKan installation present Bizar
17
- agents, tasks, sessions, feature state, and durable messages without coupling
18
- to Bizar internals.
32
+ It keeps the operator in control of model selection and high-impact actions.
33
+ Your configured model choices live in your global Claude configuration—not in
34
+ the project you happen to be working on.
19
35
 
20
- ## Quick start
36
+ | You want | Bizar provides |
37
+ | --- | --- |
38
+ | A clean way to begin | A guided installer and `bizar models` picker |
39
+ | Your own gateway models | Global selection, full-ID subagent definitions, and native alias mapping |
40
+ | Useful parallel work | Isolated worktrees, scoped tasks, and specialist roles |
41
+ | Fewer surprises | Explicit safety checks for releases, publication, deployment, pushes, and destructive operations |
42
+ | Confidence at the end | Tests, architecture checks, E2E checks, and evidence-aware handoff |
43
+
44
+ ## Start here
45
+
46
+ Install Bizar globally, install its Claude Code integration, then choose the
47
+ models you want Bizar to use.
21
48
 
22
49
  ```sh
23
- npm install
24
- npm run build
25
- node cli/bin.mjs install
26
- make check
27
- make test
28
- make e2e
50
+ npm install -g @polderlabs/bizar
51
+ bizar install
52
+ bizar models
29
53
  ```
30
54
 
31
- Claude Code reads `.claude/settings.json`. `cli/provision.mjs` can copy agents, commands, skills, hooks, rules, and settings into `~/.claude/` for user-level use.
55
+ Restart Claude Code after installation. The installer adds Bizar's agents,
56
+ skills, commands, hooks, and settings to your user-level Claude configuration.
57
+ It preserves your configured gateway endpoint and credential values during a
58
+ clean reinstall.
32
59
 
33
- ## Core surfaces
60
+ For a completely fresh Bizar-managed Claude setup while retaining endpoint and
61
+ authentication settings:
34
62
 
35
- | Surface | Purpose |
36
- | --- | --- |
37
- | `.claude/agents/` | Office-themed role agents and orchestrator |
38
- | `config/skills/` | Canonical skill library |
39
- | `.claude/commands/` | Slash-command workflows |
40
- | `.claude/hooks/` | Safety, HITL, lifecycle, routing, telemetry, and compaction hooks |
41
- | `packages/sdk/` | Agent registry, router, learning logs, federation, consensus, and MCP |
42
- | `cli/` | Installer, validator, backup, audit, cost/claim/task/control, sandbox, repair |
43
- | `scripts/` | Architecture, absence, E2E, feature, eval, and clean-state verification |
63
+ ```sh
64
+ bizar install --force
65
+ bizar models
66
+ ```
67
+
68
+ Then open any repository in Claude Code and describe the outcome you want.
69
+ Mike—the Bizar coordinator—handles the rest.
70
+
71
+ > **Tip:** Run `bizar doctor` whenever you want to verify that the global
72
+ > install, Claude settings, hooks, skills, agents, and provider connection are
73
+ > healthy.
74
+
75
+ ## The first-task experience
76
+
77
+ ```mermaid
78
+ flowchart LR
79
+ U["Describe the outcome"] --> M["Mike: brief orientation"]
80
+ M --> Q{"Material choice?"}
81
+ Q -- Yes --> C["One concise question"]
82
+ C --> R["Choose a coordination mode"]
83
+ Q -- No --> R
84
+ R --> D["Direct edit"]
85
+ R --> A["Isolated specialist"]
86
+ R --> P["Parallel agents / team"]
87
+ R --> W["Visible workflow"]
88
+ D --> V["Verify and report evidence"]
89
+ A --> V
90
+ P --> V
91
+ W --> V
92
+ ```
93
+
94
+ The coordinator does not force every request through a workflow. Small,
95
+ obvious edits stay small; larger requests get only the structure they need.
96
+ Writing agents work in Git worktrees, while read-only research stays light and
97
+ foregrounded.
44
98
 
45
- The MCP tools are `plan_action`, `loop_start`, `loop_stop`, `loop_list`, `loop_status`, `graph_query`, `graph_path`, `list_instincts`, and `list_decisions`.
99
+ ## Your models, everywhere Bizar dispatches
46
100
 
47
- ## Parallel agent coordination
101
+ `bizar models` is the single operator-facing place to select models. It
102
+ discovers candidates from your configured gateway and writes your selections to
103
+ the global model router:
48
104
 
49
- Code-writing subagents run in isolated Git worktrees. `bizar task` stores a
50
- shared SQLite task graph under Git's common directory, so all worktrees observe
51
- the same dependencies, owners, path scopes, and expiring leases. The
52
- PreToolUse ownership hook denies edits outside the current task scope and edits
53
- to paths leased by sibling agents.
105
+ ```text
106
+ ~/.claude/model-router.json
107
+ ```
108
+
109
+ The router is never stored in a project directory. Bizar uses the selected
110
+ models for direct subagents, workflows, and agent-team teammates.
111
+
112
+ ```mermaid
113
+ flowchart TD
114
+ Picker["bizar models"] --> Router["Global model router\n~/.claude/model-router.json"]
115
+ Router --> Definitions["Global Bizar agent definitions\nfull model ID in frontmatter"]
116
+ Router --> Aliases["sonnet · opus · haiku · fable\ncompatibility aliases"]
117
+ Definitions --> Agent["Subagents"]
118
+ Definitions --> Workflow["Workflow workers"]
119
+ Definitions --> Team["Agent-team teammates"]
120
+ ```
121
+
122
+ Claude Code's native per-call model field has a small alias vocabulary. Bizar
123
+ avoids making that vocabulary a limitation: it projects each selected gateway
124
+ model into a global subagent definition whose frontmatter contains the full
125
+ model ID. The agent, workflow, and team routes use that definition. The four
126
+ native aliases are compatibility shortcuts only; they do not enable an
127
+ unselected provider or reduce your selected-model pool to four choices.
128
+
129
+ Useful inspection commands:
54
130
 
55
131
  ```sh
56
- bizar task create sdk-change --title "Update SDK" --scope "packages/sdk/**"
57
- bizar task claim sdk-change --owner todd --workspace "$PWD"
58
- bizar task heartbeat sdk-change --owner todd
59
- bizar task complete sdk-change --owner todd --evidence "targeted tests passed"
60
- bizar task integrate enqueue sdk-change --commit abc1234 --owner todd
61
- bizar task integrate claim --worker steve
62
- bizar task integrate pass 1 --worker steve --evidence "aggregate checks passed"
132
+ bizar models --list
133
+ bizar models --agent-types --json
134
+ bizar models explain todd
135
+ bizar doctor
63
136
  ```
64
137
 
65
- The integration queue records the commit, base reference, verification command,
66
- owner, integrator, and outcome. It deliberately does not perform unapproved
67
- merge, rebase, push, or publication operations.
138
+ ## A specialist bench, not a generic swarm
139
+
140
+ Bizar ships its core coordination roles alongside 68 focused specialists for
141
+ architecture, accessibility, security, testing, documentation, performance,
142
+ language and framework review, build repair, operations, and evaluation. It
143
+ also ships 80 skills for planning, debugging, verification, review,
144
+ worktrees, and implementation practice.
145
+
146
+ The coordinator selects specialists when their expertise reduces a concrete
147
+ risk. It does not create parallel workers merely to look busy. You can inspect
148
+ the installed specialist definition names through `bizar models --agent-types
149
+ --json` and use a relevant Bizar specialist directly when needed.
150
+
151
+ ```text
152
+ Core coordination Specialist coverage
153
+ ───────────────── ──────────────────────────────────
154
+ Mike · research · plan Architecture · accessibility · security
155
+ Implementation · review Build repair · tests · documentation
156
+ Verification · integration Frameworks · performance · operations
157
+ Evaluation · product and domain analysis
158
+ ```
159
+
160
+ ## Guardrails that stay out of the way
161
+
162
+ Bizar is designed to be autonomous for local, reversible work and deliberate
163
+ for consequential actions.
164
+
165
+ | Category | Default behavior |
166
+ | --- | --- |
167
+ | Read, inspect, edit, test, format | Proceeds autonomously within the task scope |
168
+ | Parallel code changes | Uses isolated worktrees and scoped task ownership |
169
+ | Ambiguous material design choice | Asks one concise clarification before execution |
170
+ | Commit | Locally allowed, with a fresh simplify review reminder |
171
+ | Push, PR mutation, release, publish, deploy | Requires an explicit human decision |
172
+ | Rebase, force-push, broad destructive commands | Denied or escalated by the safety floor |
173
+
174
+ The goal is not to make Claude Code timid. It is to make its boundaries clear:
175
+ Bizar works through local implementation and verification, then stops at the
176
+ point where an external or difficult-to-reverse decision belongs to you.
177
+
178
+ ## What gets installed
179
+
180
+ ```text
181
+ ~/.claude/
182
+ ├── agents/ 84 Bizar roles and specialist definitions
183
+ ├── skills/ 80 skill packs
184
+ ├── commands/ 39 slash-command surfaces
185
+ ├── hooks/ routing, lifecycle, safety, evidence, and quality hooks
186
+ ├── rules/ focused guidance for common development work
187
+ ├── workflows/ native workflow definitions
188
+ ├── settings.json Bizar-managed Claude Code integration
189
+ └── model-router.json operator-selected model state
190
+
191
+ ~/.config/bizar/
192
+ ├── installed.json install record
193
+ ├── evidence/ local dispatch and verification evidence
194
+ ├── telemetry/ local routing and rejected-action feedback
195
+ └── worktree-queue.json completed worktree integration queue
196
+ ```
68
197
 
69
- ## OpenKan control plane
198
+ `bizar control` is a machine-readable command boundary for optional external
199
+ interfaces. Bizar deliberately does not include an embedded browser control
200
+ plane, background daemon, or general-purpose note vault.
70
201
 
71
- `bizar control snapshot --json` exposes the current agent catalogue, durable
72
- task and integration queues, feature ledger, progress summary, Claude Code
73
- background sessions, and durable control messages. OpenKan invokes task and
74
- session mutations through the same CLI instead of importing Bizar modules or
75
- opening its SQLite database.
202
+ ## Commands worth knowing
76
203
 
77
- Messages are atomically queued under `.bizar/control/messages/`. Supported
78
- Claude Code `SessionStart` and `UserPromptSubmit` hooks claim and inject matching
79
- messages exactly once. A session-targeted message can request a documented
80
- background resume; Bizar never edits transcripts or attaches to private process
81
- internals.
204
+ | Command | When to use it |
205
+ | --- | --- |
206
+ | `bizar install` | Install or refresh Bizar in your global Claude configuration |
207
+ | `bizar models` | Discover and select the models Bizar may dispatch |
208
+ | `bizar doctor` | Diagnose the global installation and provider connectivity |
209
+ | `bizar validate` | Run an install-focused health check |
210
+ | `bizar task` | Inspect or coordinate scoped worktree tasks |
211
+ | `bizar worktree-merge --all` | Review and merge completed isolated work, surfacing conflicts |
212
+ | `bizar control snapshot --json` | Read the machine-friendly current harness state |
213
+ | `bizar evidence` | Inspect local dispatch and verification evidence |
82
214
 
83
- ## Guarded autonomy
215
+ ## Running Bizar from this repository
84
216
 
85
- Project settings default to `acceptEdits`, which lets Claude iterate locally while preserving prompts around broader shell operations. Operators who meet Claude Code's requirements may choose Auto mode; Bizar's deny/ask hooks still apply before permission-mode evaluation.
217
+ For contributors, use the repository checkout rather than the global package:
86
218
 
87
- The Git workflow hook denies force-push, rebase, unsupported commit subjects, and AI-attribution trailers. It asks before a commit, push, PR mutation, release, publish, or deploy. The simplify guard requires `/simplify` for every commit attempt.
219
+ ```sh
220
+ npm install
221
+ npm run build
222
+ node cli/bin.mjs install
223
+ make check
224
+ make test
225
+ make e2e
226
+ ```
88
227
 
89
- ## Verification
228
+ The verification suite covers both the code and the integration contract:
90
229
 
91
230
  ```sh
92
231
  make verify-removed-surfaces
@@ -98,10 +237,13 @@ make clean-check
98
237
  make check
99
238
  ```
100
239
 
101
- The root package uses a runtime-only allowlist: no test files, local state,
102
- duplicate skill mirror, or source-only fixture is published.
240
+ ## Learn more
103
241
 
104
- See [the documentation index](docs/INDEX.md), [architecture](docs/architecture.md), [core feature audit](docs/audits/core-feature-audit-2026-07-30.md), [repository cleanup audit](docs/audits/repository-cleanup-2026-07-30.md), and [upstream parity matrix](docs/audits/claude-codex-settings-parity-2026-07-30.md).
242
+ - [Documentation index](docs/INDEX.md)
243
+ - [Architecture](docs/architecture.md)
244
+ - [Model routing decisions](docs/decisions/)
245
+ - [Current progress and evidence](PROGRESS.md)
246
+ - [MIT license](LICENSE)
105
247
 
106
248
  ## License
107
249
 
package/cli/bin.mjs CHANGED
@@ -117,6 +117,9 @@ function showHelp() {
117
117
  release-provenance Generate SBOM + provenance + minisig for a release (audit #83)
118
118
  verify-release Verify a release artifact set against the pinned allowlist
119
119
  spec-list List SDK schemas, policy docs, and mirror sync status (audit #84)
120
+ ambiguity Score a deep-interview spec's clarity breakdown (Phase 3 OMX)
121
+ guard <subcommand> F-206 progress-guarding loop (start/check/status/stop/list)
122
+ goal-bootstrap F-207 Mike autonomous goal seeding (resume | bootstrap | idle)
120
123
  bench Efficiency benchmarks + auto-fan-out rule (audit #85)
121
124
  team Run the office-manager orchestration agent
122
125
  subagent Run a named agent in read-only plan mode
@@ -527,6 +530,56 @@ async function main() {
527
530
  break;
528
531
  }
529
532
 
533
+ case 'guard': {
534
+ // F-206 — `/guard` progress-guarding loop. The CLI is read-only
535
+ // with respect to the repo (plan + PROGRESS.md + feature_list +
536
+ // checks.jsonl). See cli/commands/guard.mjs for the verdict
537
+ // semantics and side-effect rules.
538
+ const mod = await importCommand('guard');
539
+ if (!mod) {
540
+ console.error(chalk.red(` ✗ Could not load guard command module`));
541
+ process.exit(EXIT_ERROR);
542
+ return;
543
+ }
544
+ dbg('loaded command module:', 'guard');
545
+ const code = await mod.run(cmdArgs);
546
+ if (typeof code === 'number') process.exit(code);
547
+ break;
548
+ }
549
+
550
+ case 'goal-bootstrap': {
551
+ // F-207 — Mike autonomous goal / ultragoal bootstrap. Single-action
552
+ // CLI: read feature_list.json + docs/specs/ and emit a
553
+ // discriminated-union verdict (resume | bootstrap | idle). The
554
+ // bootstrap action writes exactly one durable artifact (the
555
+ // charter) under docs/specs/. See cli/commands/goal-bootstrap.mjs.
556
+ const mod = await importCommand('goal-bootstrap');
557
+ if (!mod) {
558
+ console.error(chalk.red(` ✗ Could not load goal-bootstrap command module`));
559
+ process.exit(EXIT_ERROR);
560
+ return;
561
+ }
562
+ dbg('loaded command module:', 'goal-bootstrap');
563
+ const code = await mod.run(cmdArgs);
564
+ if (typeof code === 'number') process.exit(code);
565
+ break;
566
+ }
567
+
568
+ case 'ambiguity': {
569
+ // Phase 3 OMX adoption — score a deep-interview spec's
570
+ // clarity breakdown. Read-only with respect to docs/specs/.
571
+ const mod = await importCommand('ambiguity');
572
+ if (!mod) {
573
+ console.error(chalk.red(` ✗ Could not load ambiguity command module`));
574
+ process.exit(EXIT_ERROR);
575
+ return;
576
+ }
577
+ dbg('loaded command module:', 'ambiguity');
578
+ const code = await mod.run(cmdArgs);
579
+ if (typeof code === 'number') process.exit(code);
580
+ break;
581
+ }
582
+
530
583
  case 'bench': {
531
584
  const mod = await importCommand('bench');
532
585
  if (!mod) {