@polderlabs/bizar 10.23.8 → 10.23.9

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/AGENTS.md CHANGED
@@ -58,21 +58,18 @@ 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
- Native dynamic workflows under `config/workflows/` and `~/.claude/workflows/`
62
- are the required dispatch mechanism for every primary request except an
63
- unmistakably tiny single-target copy/style/format edit with no behavior or test
64
- change. Mike may execute that narrow exception directly. All other work enters
65
- the matching research / implement / debug / review workflow and uses at least
66
- one explicitly modeled editing subagent with call-level worktree isolation.
67
- Do not add unnecessary phases or duplicate workers. For work that needs 3+
68
- long-lived workers with bounded cross-talk,
69
- Mike invokes a workflow that fans out as a native agent team; the team is
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
70
67
  host-side state under `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`, and per
71
- Anthropic's docs `team_name` is deprecated and ignored. When two or more
72
- subtasks have non-overlapping writable scopes and no data dependency, the
73
- orchestrator MUST dispatch them concurrently through `parallel([...])`, each
74
- with call-level `isolation: "worktree"`. Sequential dispatch is reserved for
75
- dependent phases and integration; never create artificial parallel work.
68
+ Anthropic's docs `team_name` is deprecated and ignored. Every editing dispatch
69
+ uses an explicit configured model and call-level `isolation: "worktree"`.
70
+ When two or more subtasks have non-overlapping writable scopes and no data
71
+ dependency, dispatch them concurrently; serialize only dependencies and
72
+ integration.
76
73
 
77
74
  Agent roles are model-agnostic. Mike selects the cheapest sufficient enabled
78
75
  configured-tier model for each dispatch, with explicit user picks taking
@@ -136,11 +133,13 @@ The autonomy and approval policy above governs this execution model. The project
136
133
  Every non-empty primary request enters Bizar through `office-manager` (`@mike`).
137
134
  The installer sets Claude Code's global `agent` setting to Mike's frontmatter
138
135
  name (`mike`),
139
- and a session-scoped routing guard requires a successful native Workflow before
140
- substantive primary-session mutation. Read-only inspection remains available.
141
- Mike directly executes only the tiny edit exception above. Every other request
142
- must invoke a native Bizar workflow before mutation; the workflow dispatches
143
- worktree-isolated subagents while Mike owns integration and final verification.
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.
144
143
  A Bizar custom agent already executing its assigned role does not recursively
145
144
  dispatch itself.
146
145
 
@@ -152,8 +151,8 @@ relevant page. Guess-and-try integration work is prohibited. When official
152
151
  documentation is unavailable or ambiguous, inspect authoritative source code
153
152
  and report the evidence gap.
154
153
 
155
- For workflow-routed requests, `office-manager` uses only the phases that reduce
156
- a known risk; only the tiny edit exception skips this pipeline:
154
+ For a workflow or team, `office-manager` uses only phases and members that
155
+ reduce a known risk:
157
156
 
158
157
  1. Research: `greg` (`research-analyst.md`) plus an implementation-context specialist.
159
158
  2. Plan: `planner` drafts; `qa-reviewer` challenges assumptions and test shape.
@@ -69,21 +69,18 @@ still deny prohibited actions and escalate externally visible or irreversible
69
69
  actions with `permissionDecision: "ask"`; that escalation list is the
70
70
  authoritative floor, not a starting point.
71
71
 
72
- Native dynamic workflows under `config/workflows/` and `~/.claude/workflows/`
73
- are the required dispatch mechanism for every primary request except an
74
- unmistakably tiny single-target copy/style/format edit with no behavior or test
75
- change. Mike may execute that narrow exception directly. All other work enters
76
- the matching research / implement / debug / review workflow and uses at least
77
- one explicitly modeled editing subagent with call-level worktree isolation.
78
- Do not add unnecessary phases or duplicate workers. For work that needs 3+
79
- long-lived workers with bounded cross-talk,
80
- Mike invokes a workflow that fans out as a native agent team; the team is
72
+ Mike selects the coordination mode after bounded read-only orientation and one
73
+ user clarification checkpoint: direct work only for an unmistakably tiny
74
+ single-target copy/style/format edit; one isolated Agent for a clear bounded
75
+ change; a native workflow for repeatable phased work; parallel Agents for
76
+ disjoint scopes; and an Agent team for 3+ sustained roles that genuinely need
77
+ cross-talk. Do not add unnecessary phases or duplicate workers. The team is
81
78
  host-side state under `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`, and per
82
- Anthropic's docs `team_name` is deprecated and ignored. When two or more
83
- subtasks have non-overlapping writable scopes and no data dependency, the
84
- orchestrator MUST dispatch them concurrently through `parallel([...])`, each
85
- with call-level `isolation: "worktree"`. Sequential dispatch is reserved for
86
- dependent phases and integration; never create artificial parallel work.
79
+ Anthropic's docs `team_name` is deprecated and ignored. Every editing dispatch
80
+ uses an explicit configured model and call-level `isolation: "worktree"`.
81
+ When two or more subtasks have non-overlapping writable scopes and no data
82
+ dependency, dispatch them concurrently; serialize only dependencies and
83
+ integration.
87
84
 
88
85
  Agent roles are model-agnostic. Mike selects the cheapest sufficient enabled
89
86
  configured-tier model for each dispatch, with explicit user picks taking
@@ -147,11 +144,13 @@ The autonomy and approval policy above governs this execution model. The project
147
144
  Every non-empty primary request enters Bizar through `office-manager` (`@mike`).
148
145
  The installer sets Claude Code's global `agent` setting to Mike's frontmatter
149
146
  name (`mike`),
150
- and a session-scoped routing guard requires a successful native Workflow before
151
- substantive primary-session mutation. Read-only inspection remains available.
152
- Mike directly executes only the tiny edit exception above. Every other request
153
- must invoke a native Bizar workflow before mutation; the workflow dispatches
154
- worktree-isolated subagents while Mike owns integration and final verification.
147
+ and the routing hook supplies the adaptive coordination policy. For non-tiny
148
+ work, Mike first gathers only bounded read-only context, asks one concise
149
+ clarification question that names the inferred outcome and proposed mode, then
150
+ continues autonomously after the answer. A native workflow is one available
151
+ mode, not a universal gate; Mike may select an isolated Agent, parallel Agents,
152
+ or an Agent team when that better fits the work. Mike owns integration and
153
+ final verification.
155
154
  A Bizar custom agent already executing its assigned role does not recursively
156
155
  dispatch itself.
157
156
 
@@ -163,8 +162,8 @@ relevant page. Guess-and-try integration work is prohibited. When official
163
162
  documentation is unavailable or ambiguous, inspect authoritative source code
164
163
  and report the evidence gap.
165
164
 
166
- For workflow-routed requests, `office-manager` uses only the phases that reduce
167
- a known risk; only the tiny edit exception skips this pipeline:
165
+ For a workflow or team, `office-manager` uses only phases and members that
166
+ reduce a known risk:
168
167
 
169
168
  1. Research: `greg` (`research-analyst.md`) plus an implementation-context specialist.
170
169
  2. Plan: `planner` drafts; `qa-reviewer` challenges assumptions and test shape.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: mike
3
- description: Mike — workflow-first orchestrator with a tiny direct-edit exception.
4
- tools: Workflow, Agent, Read, Write, Edit, Bash, Grep, Glob, WebFetch, WebSearch, Skill
3
+ description: Mike — adaptive orchestrator that selects the lightest safe coordination mode.
4
+ tools: Workflow, Agent, Read, Write, Edit, Bash, Grep, Glob, WebFetch, WebSearch, Skill, AskUserQuestion
5
5
  skills:
6
6
  - i-have-adhd
7
7
  ---
@@ -12,24 +12,29 @@ Follow `_shared/AGENT_BASELINE.md`. You own the user outcome, integration, and
12
12
  final verification. Direct execution is a narrow exception; workflows are the
13
13
  default for meaningful work.
14
14
 
15
- ## Route, then reassess if scope expands
15
+ ## Orient, clarify, then select the coordination mode
16
16
 
17
17
  | Shape | Signals | Execution |
18
18
  |---|---|---|
19
19
  | Tiny direct | one obvious copy, typo, comment, whitespace, or single style-token edit; one target; no behavior or test change | inspect, make the micro-edit, run the smallest proving check yourself |
20
- | Bounded workflow | known non-trivial implementation, including a logical bug or any behavioral change | invoke `bizar-implement`; it dispatches at least one editing worker with `isolation: "worktree"`; merge and verify |
21
- | Debug workflow | failing behavior, unclear cause, regression, or interacting state | invoke `bizar-debug`; keep diagnosis and fix evidence separate |
22
- | Research/shaped | external/version-sensitive behavior, architecture/security, broad review, or interacting components | invoke `bizar-research` or the matching `ultracode*` workflow; parallelize independent lanes and serialize dependencies |
23
-
24
- If a request could reasonably require a regression test, touch multiple files,
25
- or needs inspection to discover its scope, it is not tiny: invoke a workflow
26
- before editing. The primary session does not substitute an ad-hoc Agent call
27
- for the workflow. Research current official docs only for external or
20
+ | Single isolated worker | one bounded implementation after scope is clear | dispatch one worktree-isolated Agent with an explicit Bizar model; integrate and verify |
21
+ | Native workflow | repeatable diagnosis, research, review, or an implementation needing visible phase barriers | invoke the matching Bizar workflow with explicit Bizar routing |
22
+ | Agent team | three or more sustained, independent roles need bounded cross-talk or coordinated handoff | use the native Agent-team capability; writers use worktrees and explicit Bizar models |
23
+ | Parallel agents | two disjoint writable scopes with no cross-talk needed | dispatch concurrently with explicit models and worktree isolation |
24
+
25
+ For every non-tiny request, first make only enough read-only inspection to
26
+ understand the repository boundary and current constraints. Then ask the user
27
+ one concise clarification checkpoint: state the inferred outcome, the material
28
+ choice or risk, and the proposed coordination mode. Wait for the answer before
29
+ writing, dispatching editors, creating branches, or running tests. If the user
30
+ explicitly says to proceed without questions, record that choice and continue.
31
+ After the answer, work autonomously until the requested outcome and verification
32
+ are complete. Research current official docs only for external or
28
33
  version-sensitive claims. Inspect installed skills before hard or specialized
29
34
  work; if stuck with no match, search skills.sh and review the candidate before
30
35
  proposing installation.
31
36
 
32
- Before every Workflow call, read the global Bizar model router and construct a
37
+ Before every Workflow, Agent, or Agent-team call, read the global Bizar model router and construct a
33
38
  small `args.routing` object whose `default`, `medium`, and `high` values are
34
39
  explicit enabled configured model IDs (user picks win; otherwise use enabled
35
40
  tier candidates). Include the user's task in the same args object under the
@@ -58,9 +63,10 @@ only when the router explicitly supplies it.
58
63
 
59
64
  ## Worktree Discipline and integration
60
65
 
61
- Every editing subagent call uses call-level `isolation: "worktree"`. Parallel
62
- writers receive disjoint file ownership and sibling scopes. Read-only research
63
- stays foreground. When a writer finishes, merge its queued branch with
66
+ Every editing subagent call uses call-level `isolation: "worktree"`. Use teams
67
+ only when collaboration changes the result; do not manufacture a team or a
68
+ workflow for a simple isolated task. Parallel writers receive disjoint file
69
+ ownership and sibling scopes. Read-only research stays foreground. When a writer finishes, merge its queued branch with
64
70
  `bizar worktree-merge`; report conflicts instead of guessing. The integration
65
71
  branch runs final tests once after all required results are incorporated.
66
72
  Worktree branches use `wt/<agent_type>-<short-task-id>`.
@@ -11,7 +11,7 @@ All hooks read Claude Code JSON from stdin and emit either no decision, addition
11
11
  | `simplify-guard.mjs` | PostToolUse Skill + PreToolUse Bash | require one `/simplify` per commit attempt |
12
12
  | `posttooluse-editwrite.mjs` | PostToolUse writes | local telemetry and test reminder |
13
13
  | `worker-suggest.mjs` | UserPromptSubmit | ranked skill/agent suggestions |
14
- | `workflow-route-guard.mjs` | UserPromptSubmit, PreToolUse, PostToolUse | requires a proven successful native workflow before substantive primary mutation; permits narrowly whitelisted, redirect-free Git inspection |
14
+ | `workflow-route-guard.mjs` | UserPromptSubmit, PreToolUse, PostToolUse | records adaptive Bizar routing state without blocking Mike's selected coordination mode; workflow success clears the pending route record |
15
15
  | `thinking-route.mjs` | UserPromptSubmit | slash and mental-model routing |
16
16
  | `telemetry.mjs` | SessionStart/UserPromptSubmit | local correlation and rejection categories |
17
17
  | `sessionstart-prime.mjs` | SessionStart | bounded project and handoff context |
@@ -186,13 +186,13 @@ function startupBriefing(cwd, featureBrief, recentCommits, projectLine, progress
186
186
  }
187
187
  }
188
188
  if (progressLast) lines.push(`- Progress: ${progressLast}.`);
189
- lines.push('- You are @mike. Only an unmistakably tiny single-target copy/style/format edit is direct; every other change enters the matching native workflow before mutation. Use one isolated writer by default and parallel worktrees only for independent scopes.');
189
+ lines.push('- You are @mike. For non-tiny work, do bounded read-only orientation, ask one clarification checkpoint, then choose a single isolated worker, native workflow, parallel workers, or an Agent team by actual dependency. Use worktrees for editors and explicit Bizar models for every Agent.');
190
190
  lines.push('- External/version-sensitive work requires current official docs via WebSearch/WebFetch. Use relevant installed skills; apply i-have-adhd to user output. WIP=1.');
191
191
  lines.push('- TaskCompleted/SubagentStop/<task-notification> is terminal: consume <result>, mark done/failed, merge queued work, continue the objective.');
192
192
  // Default-first-stop hint when nothing is active yet.
193
193
  if (featureBrief && featureBrief.active.length === 0) {
194
194
  lines.push(
195
- '- First move: read PROGRESS.md and feature_list.json; then choose the matching workflow, except for an unmistakably tiny direct edit.',
195
+ '- First move: read PROGRESS.md and feature_list.json, then do bounded orientation and ask the clarification checkpoint before choosing the fitting coordination mode.',
196
196
  );
197
197
  }
198
198
  return lines.join('\n');
@@ -203,14 +203,14 @@ function clearBriefing(cwd, recentCommits, progressLast) {
203
203
  if (progressLast) lines.push(`- Progress: ${progressLast}.`);
204
204
  if (recentCommits.length > 0) lines.push(`- Last commit: ${recentCommits[0]}.`);
205
205
  lines.push('- Context preserved in same repo / cwd — only the model turn was reset.');
206
- lines.push('- You are @mike: continue through the active workflow; only an unmistakably tiny edit may stay direct.');
206
+ lines.push('- You are @mike: continue the active coordination plan; adapt it when new evidence changes the fit.');
207
207
  lines.push('- First move: continue from where the model left off; no need to reread project files.');
208
208
  return lines.join('\n');
209
209
  }
210
210
 
211
211
  function resumeBriefing(cwd, state) {
212
212
  const lines = ['Bizar SessionStart (resume):'];
213
- lines.push('- You are @mike: restore state, then continue the active workflow; only an unmistakably tiny edit may stay direct.');
213
+ lines.push('- You are @mike: restore state, then continue the active coordination plan and adapt it if the evidence changed.');
214
214
  if (state) {
215
215
  if (state.activeFeature) lines.push(`- Last active feature: ${state.activeFeature}.`);
216
216
  if (state.reason) lines.push(`- Last session ended with: ${state.reason}.`);
@@ -6,7 +6,8 @@
6
6
  *
7
7
  * Runs on every user prompt. Only unmistakably tiny, single-scope edits take
8
8
  * a cheap fast path. Every other request is routed into a native Bizar
9
- * workflow that owns subagent dispatch.
9
+ * adaptive coordination mode selected by Mike after bounded orientation and a
10
+ * clarification checkpoint.
10
11
  *
11
12
  * Uses import.meta.url + dynamic import() to resolve the sibling CLI module so
12
13
  * the hook works regardless of install path (fixes ERR_MODULE_NOT_FOUND after
@@ -56,10 +57,10 @@ const FAST_ROUTE_POLICY = [
56
57
  ].join('\n');
57
58
 
58
59
  const ROUTE_POLICY = [
59
- 'Workflow-required Bizar routing policy:',
60
- '- If this is the primary session, you ARE @mike. Do not implement this request directly in the primary session. Before any edit or mutation, invoke the matching native Bizar workflow; the primary owns routing, integration, and final verification.',
61
- '- Use bizar-implement for known bounded changes, bizar-debug for bugs needing diagnosis, bizar-research for external or uncertain implementation context, and ultracode / ultracode-research / ultracode-review for broad, high-risk, or review-heavy objectives. Use only phases that reduce a concrete risk.',
62
- '- The workflow must dispatch at least one implementation subagent with an explicit configured model and call-level `isolation: "worktree"`. For genuinely disjoint writable scopes, dispatch them concurrently; otherwise use one isolated writer. Never create duplicate workers merely to satisfy fan-out.',
60
+ 'Adaptive Bizar routing policy:',
61
+ '- If this is the primary session, you ARE @mike. First do only bounded read-only orientation. Then ask one concise clarification question describing the inferred outcome, the material choice/risk, and your proposed coordination mode. Wait for the answer before edits, branches, tests, or editor dispatch. If the user explicitly waives questions, continue autonomously.',
62
+ '- After clarification, choose the lightest coordination mode: a direct tiny edit, one isolated Agent for a bounded change, a native Bizar Workflow for repeatable phased work, parallel Agents for disjoint scopes, or an Agent team only when 3+ sustained roles need cross-talk. Do not force a workflow or team when it adds no value.',
63
+ '- Every Agent or team member receives an explicit enabled configured Bizar model; use no provider alias, inheritance, or default. Every editing worker uses call-level `isolation: "worktree"`. For genuinely disjoint writable scopes, dispatch concurrently; otherwise use one owner.',
63
64
  '- Consume terminal agent results, merge queued worktrees with bizar worktree-merge, and run integration checks in the primary session. A subagent may not recursively dispatch itself.',
64
65
  '- Do NOT execute any tool you do not have. If a tool you need is missing from your tools list, dispatch to a subagent that has it — do not pretend you have it.',
65
66
  '- If you are already running as a Bizar custom agent, follow your assigned role and do not recursively dispatch yourself.',
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /** Enforce native-workflow entry before substantive primary-session mutation. */
2
+ /** Preserve a mutation barrier while Mike selects an adaptive coordination mode. */
3
3
  'use strict';
4
4
 
5
5
  import {
@@ -13,6 +13,9 @@ import { parseGitCommands } from './git-command-parser.mjs';
13
13
  const READ_ONLY_GIT_SUBCOMMANDS = new Set([
14
14
  'diff', 'log', 'ls-files', 'rev-parse', 'show', 'status',
15
15
  ]);
16
+ const READ_ONLY_BRANCH_OPTIONS = new Set([
17
+ '--all', '--list', '--remotes', '--show-current', '--verbose', '-a', '-r', '-v', '-vv',
18
+ ]);
16
19
  const WORKFLOW_SUCCESS = new Set(['completed', 'dry', 'ready-for-integration', 'succeeded', 'success']);
17
20
  const WORKFLOW_FAILURE = new Set(['blocked', 'budget-exhausted', 'cancelled', 'canceled', 'error', 'failed', 'failure']);
18
21
 
@@ -22,10 +25,17 @@ export function isReadOnlyShellInspection(command) {
22
25
 
23
26
  return source.split(/\s*&&\s*/).every((segment) => {
24
27
  const trimmed = segment.trim();
25
- if (/^echo(?:\s|$)/.test(trimmed)) return true;
28
+ // These commands can inspect a newly opened project but cannot mutate it.
29
+ // Permit them before workflow launch so the primary can choose the right
30
+ // native workflow instead of deadlocking on its standard orientation step.
31
+ if (/^(?:echo|ls)(?:\s|$)/.test(trimmed) || trimmed === 'pwd') return true;
26
32
  if (!/^git(?:\s|$)/.test(trimmed) || /(?:^|\s)--(?:output|ext-diff)(?:=|\s|$)/.test(trimmed)) return false;
27
33
  const parsed = parseGitCommands(trimmed);
28
- return parsed.length === 1 && READ_ONLY_GIT_SUBCOMMANDS.has(parsed[0].subcommand);
34
+ if (parsed.length !== 1) return false;
35
+ const [git] = parsed;
36
+ if (READ_ONLY_GIT_SUBCOMMANDS.has(git.subcommand)) return true;
37
+ return git.subcommand === 'branch'
38
+ && git.args.every((argument) => READ_ONLY_BRANCH_OPTIONS.has(argument));
29
39
  });
30
40
  }
31
41
 
@@ -77,17 +87,10 @@ process.stdin.on('end', () => {
77
87
  return;
78
88
  }
79
89
 
80
- const readOnlyBash = toolName === 'Bash' && isReadOnlyShellInspection(input.tool_input?.command);
81
- if (!readOnlyBash && /^(?:Edit|Write|MultiEdit|Bash|Agent)$/.test(toolName)) {
82
- process.stdout.write(`${JSON.stringify({
83
- hookSpecificOutput: {
84
- hookEventName: 'PreToolUse',
85
- permissionDecision: 'deny',
86
- permissionDecisionReason: `Bizar workflow routing guard: ${toolName} is unavailable in the primary session until the required native Workflow runs successfully. Invoke bizar-implement, bizar-debug, bizar-research, or the matching ultracode workflow first.`,
87
- },
88
- })}\n`);
89
- return;
90
- }
90
+ // Coordination is an orchestrator decision, not a hard-coded tool gate.
91
+ // Instructions require orientation + clarification before mutation; Agent
92
+ // calls are independently protected by agent-model-guard.mjs. Keeping this
93
+ // hook advisory avoids trapping valid single-worker and Agent-team plans.
91
94
  } catch (error) {
92
95
  process.stderr.write(`[bizar.workflow-route] ${error?.message || String(error)}\n`);
93
96
  }
@@ -3,7 +3,7 @@
3
3
  "version": "13.0.0",
4
4
  "endpoint": null,
5
5
  "disabledProviders": ["anthropic"],
6
- "comment": "Mike selects the cheapest sufficient enabled configured model per dispatch. Explicit user-selected models take precedence; configured dynamic tiers are the fallback pool. The orchestrator always supplies an Agent model and fails closed when no enabled configured candidate exists, so Claude Code cannot select an unconfigured provider default. The gateway endpoint is intentionally null in the shipped config — operators MUST configure it via the `ANTHROPIC_BASE_URL` or `BIZAR_MODEL_ROUTER_URL` environment variable. Bizar is provider-agnostic and ships no default provider. `disabledProviders` (top-level, optional) is a case-insensitive-at-write, case-sensitive-at-filter list of provider prefixes whose model ids are stripped from every read site (CLI sync, picker, settings.json sync, SessionStart hook, Agent model guard). Defaults to `[]`; ships with `[\"anthropic\"]` so a fresh install never dispatches `anthropic/*` ids even if a gateway reports them.",
6
+ "comment": "Mike selects the cheapest sufficient enabled operator-configured model per dispatch. Explicit user-selected models take precedence; empty shipped tiers ensure a fresh install never silently chooses a vendor or model. The orchestrator always supplies an Agent model and fails closed when no enabled configured candidate exists, so Claude Code cannot select an unconfigured provider default. The gateway endpoint is intentionally null in the shipped config — operators MUST configure it via the `ANTHROPIC_BASE_URL` or `BIZAR_MODEL_ROUTER_URL` environment variable. Bizar is provider-agnostic and ships no default model. `disabledProviders` (top-level, optional) is a case-insensitive-at-write, case-sensitive-at-filter list of provider prefixes whose model ids are stripped from every read site (CLI sync, picker, settings.json sync, SessionStart hook, Agent model guard). Anthropic is opted out by default; operators may remove that entry or opt out of additional providers.",
7
7
  "userSelected": {
8
8
  "models": [],
9
9
  "lastUpdated": null,
@@ -20,53 +20,32 @@
20
20
  },
21
21
  "tiers": {
22
22
  "premium": {
23
- "models": [
24
- "qct/qwen3.8-max-preview",
25
- "codex/gpt-5.6-sol",
26
- "codex/gpt-5.6-luna"
27
- ],
23
+ "models": [],
28
24
  "purpose": "Architecture, high-risk planning, adversarial verification, and last-resort debugging where mistakes are expensive.",
29
25
  "effort": "high"
30
26
  },
31
27
  "high": {
32
- "models": [
33
- "codex/gpt-5.6-sol",
34
- "qct/qwen3.8-max-preview"
35
- ],
28
+ "models": [],
36
29
  "purpose": "Complex implementation, security review, and cross-cutting reasoning.",
37
30
  "effort": "high"
38
31
  },
39
32
  "mid-design": {
40
- "models": [
41
- "codex/gpt-5.6-luna",
42
- "minimax/MiniMax-M3"
43
- ],
33
+ "models": [],
44
34
  "purpose": "UI/UX design and product-quality implementation where visual judgment matters.",
45
35
  "effort": "medium"
46
36
  },
47
37
  "default": {
48
- "models": [
49
- "minimax/MiniMax-M3",
50
- "minimax/MiniMax-M2.7"
51
- ],
38
+ "models": [],
52
39
  "purpose": "Broad research, git operations, and ordinary engineering work.",
53
40
  "effort": "medium"
54
41
  },
55
42
  "mid": {
56
- "models": [
57
- "minimax/MiniMax-M2.7",
58
- "minimax/MiniMax-M2.7-highspeed",
59
- "qct/deepseek-v4-pro",
60
- "openrouter/nvidia/nemotron-3-ultra-550b-a55b:free"
61
- ],
43
+ "models": [],
62
44
  "purpose": "Bounded technical analysis, code search, and moderate implementation.",
63
45
  "effort": "medium"
64
46
  },
65
47
  "budget": {
66
- "models": [
67
- "glm/glm-5.3-flash",
68
- "minimax/MiniMax-M2.7-highspeed"
69
- ],
48
+ "models": [],
70
49
  "purpose": "Routine deterministic edits, targeted clarification, and scripted verification.",
71
50
  "effort": "low"
72
51
  }
@@ -3,7 +3,10 @@ export const meta = {
3
3
  description: 'Implement one bounded change in one worktree, or run explicitly supplied disjoint lanes concurrently',
4
4
  whenToUse: 'Use when implementation scope is understood and external research or root-cause discovery is unnecessary.',
5
5
  phases: [
6
- { title: 'Implement', detail: 'Run one isolated writer, or explicit disjoint writers concurrently' },
6
+ { title: 'Scope', detail: 'Independently confirm the local implementation boundary and risks' },
7
+ { title: 'Plan', detail: 'Turn the bounded objective into owned edit lanes and checks' },
8
+ { title: 'Implement', detail: 'Run isolated writers for the approved lanes' },
9
+ { title: 'Review', detail: 'Independently verify each implementation result before integration' },
7
10
  ],
8
11
  }
9
12
 
@@ -52,9 +55,20 @@ const TOPIC = typeof args === 'string'
52
55
  : JSON.stringify(args || {})
53
56
  const SCOPE = (args && Array.isArray(args.scope)) ? args.scope : []
54
57
  const suppliedLanes = (args && Array.isArray(args.lanes)) ? args.lanes : []
58
+ const fallbackLanes = [{ name: 'bounded-change', scope: SCOPE, task: TOPIC }]
59
+
60
+ phase('Scope')
61
+ const scopeEvidence = await parallel([
62
+ () => dispatchAgent(agent, 'scope-researcher', `Confirm the smallest repository-local implementation boundary for "${TOPIC}". Identify existing code, tests, configuration, and reusable utilities. Do not edit.`, { role: 'research-analyst', risk: 'medium', capabilities: ['structured-output', 'reasoning'], label: 'scope-repository', phase: 'Scope' }),
63
+ () => dispatchAgent(agent, 'scope-critic', `Independently challenge the assumed scope for "${TOPIC}". Identify hidden integration points, ownership conflicts, and the minimum regression evidence needed. Do not edit.`, { role: 'adversarial', risk: 'high', capabilities: ['structured-output', 'reasoning'], label: 'scope-risk', phase: 'Scope' }),
64
+ ])
65
+ const scopeSummary = scopeEvidence.map((entry) => JSON.stringify(entry ?? '')).join('\n').slice(0, 4000)
66
+
67
+ phase('Plan')
68
+ const plan = await dispatchAgent(agent, 'bounded-planner', `Produce a minimal reversible plan for "${TOPIC}". Return disjoint edit lanes with a single owner for shared files, plus the smallest proving tests. Do not edit.\n${barrierRef({ phase: 'Scope', label: 'scope-evidence', summary: scopeSummary, payload: scopeEvidence }).promptBlock}`, { role: 'architect', risk: 'medium', capabilities: ['structured-output', 'reasoning', 'architecture'], label: 'plan', phase: 'Plan' })
55
69
  const lanes = (suppliedLanes.length > 0
56
70
  ? suppliedLanes
57
- : [{ name: 'bounded-change', scope: SCOPE, task: TOPIC }]
71
+ : (Array.isArray(plan?.lanes) && plan.lanes.length > 0 ? plan.lanes : fallbackLanes)
58
72
  ).slice(0, 6)
59
73
 
60
74
  phase('Implement')
@@ -70,14 +84,23 @@ const implementations = lanes.length === 1
70
84
  : await parallel(lanes.map((lane, index) => () => runLane(lane, index)))
71
85
  const completed = implementations.filter(Boolean)
72
86
 
73
- if (completed.length === 0) {
74
- return { status: 'blocked', reason: 'No implementation lane completed successfully.', lanes }
75
- }
87
+ if (completed.length === 0) return { status: 'blocked', reason: 'No implementation lane completed successfully.', scopeEvidence, plan, lanes }
88
+
89
+ phase('Review')
90
+ const reviews = await parallel(completed.map((implementation, index) => () => dispatchAgent(
91
+ agent,
92
+ `implementation-reviewer-${index + 1}`,
93
+ `Review implementation lane "${lanes[index]?.name || index + 1}" for "${TOPIC}". Verify scope, correctness, regression evidence, and integration assumptions. Report only actionable defects and required checks; do not edit.\n${barrierRef({ phase: 'Implement', label: `implement:${index + 1}:${lanes[index]?.name || 'bounded-change'}`, summary: typeof implementation === 'string' ? implementation.slice(0, 400) : 'implementation artifact', payload: implementation }).promptBlock}`,
94
+ { role: 'adversarial', risk: 'high', capabilities: ['structured-output', 'reasoning'], label: `review:${index + 1}:${lanes[index]?.name || 'bounded-change'}`, phase: 'Review' },
95
+ )))
76
96
 
77
97
  return {
78
98
  status: 'ready-for-integration',
79
99
  topic: TOPIC,
100
+ scopeEvidence,
101
+ plan,
80
102
  lanes,
81
103
  implementations: completed,
104
+ reviews: reviews.filter(Boolean),
82
105
  next: 'Merge queued worktrees and run integration verification in the primary session.',
83
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "10.23.8",
3
+ "version": "10.23.9",
4
4
  "description": "Autonomous, human-in-the-loop multi-agent harness for Claude Code with guarded workflows, typed SDK primitives, and MCP tools.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,11 +35,11 @@
35
35
  ],
36
36
  "scripts": {
37
37
  "typecheck": "tsc --noEmit",
38
- "build:sdk": "node scripts/build-sdk.mjs",
38
+ "build:sdk": "node scripts/with-sdk-dist-lock.mjs node scripts/build-sdk.mjs",
39
39
  "test:sdk": "vitest run --root packages/sdk",
40
40
  "test:sdk:watch": "vitest --root packages/sdk",
41
41
  "test:node": "node scripts/run-node-tests.mjs",
42
- "test": "npm run build:sdk && npm run test:sdk && npm run test:node",
42
+ "test": "node scripts/with-sdk-dist-lock.mjs node scripts/run-test-with-sdk-build.mjs",
43
43
  "build": "npm run build:sdk",
44
44
  "prepack": "npm run build",
45
45
  "prepublishOnly": "npm run build",
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * SDK version constant. Keep synchronized with the workspace package versions.
3
3
  */
4
- export declare const SDK_VERSION: "10.23.8";
4
+ export declare const SDK_VERSION: "10.23.9";
5
5
  //# sourceMappingURL=version.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * SDK version constant. Keep synchronized with the workspace package versions.
3
3
  */
4
- export const SDK_VERSION = "10.23.8";
4
+ export const SDK_VERSION = "10.23.9";
5
5
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar-sdk",
3
- "version": "10.23.8",
3
+ "version": "10.23.9",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",