@polderlabs/bizar 10.23.5 → 10.23.7
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 +18 -11
- package/cli/commands/claude-cmd.mjs +4 -2
- package/cli/commands/hook.mjs +7 -3
- package/cli/commands/models.mjs +343 -164
- package/cli/commands/validate.mjs +2 -0
- package/cli/provision.mjs +14 -2
- package/config/claude/CLAUDE.md +18 -11
- package/config/claude/agents/_shared/AGENT_BASELINE.md +6 -1
- package/config/claude/agents/office-manager.md +16 -13
- package/config/claude/commands/quick.md +5 -5
- package/config/claude/hooks/README.md +1 -0
- package/config/claude/hooks/sessionstart-prime.mjs +4 -4
- package/config/claude/hooks/worker-suggest.mjs +27 -27
- package/config/claude/hooks/workflow-route-guard.mjs +92 -0
- package/config/claude/hooks/workflow-route-state.mjs +71 -0
- package/config/claude/settings.json +3 -0
- package/config/workflows/bizar-debug.js +1 -1
- package/config/workflows/bizar-implement.js +25 -76
- package/package.json +1 -1
- package/packages/sdk/dist/version.d.ts +1 -1
- package/packages/sdk/dist/version.js +1 -1
- package/packages/sdk/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -59,11 +59,13 @@ actions with `permissionDecision: "ask"`; that escalation list is the
|
|
|
59
59
|
authoritative floor, not a starting point.
|
|
60
60
|
|
|
61
61
|
Native dynamic workflows under `config/workflows/` and `~/.claude/workflows/`
|
|
62
|
-
are the
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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,
|
|
67
69
|
Mike invokes a workflow that fans out as a native agent team; the team is
|
|
68
70
|
host-side state under `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`, and per
|
|
69
71
|
Anthropic's docs `team_name` is deprecated and ignored. When two or more
|
|
@@ -132,10 +134,15 @@ guess-and-try remains prohibited.
|
|
|
132
134
|
The autonomy and approval policy above governs this execution model. The project defaults to `acceptEdits`; eligible operators may opt into Claude Code Auto mode.
|
|
133
135
|
|
|
134
136
|
Every non-empty primary request enters Bizar through `office-manager` (`@mike`).
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
The installer sets Claude Code's global `agent` setting to Mike's frontmatter
|
|
138
|
+
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.
|
|
144
|
+
A Bizar custom agent already executing its assigned role does not recursively
|
|
145
|
+
dispatch itself.
|
|
139
146
|
|
|
140
147
|
Every shipped agent has `WebSearch` access. Before proposing, explaining,
|
|
141
148
|
troubleshooting, or implementing behavior from an external API, library,
|
|
@@ -145,8 +152,8 @@ relevant page. Guess-and-try integration work is prohibited. When official
|
|
|
145
152
|
documentation is unavailable or ambiguous, inspect authoritative source code
|
|
146
153
|
and report the evidence gap.
|
|
147
154
|
|
|
148
|
-
For
|
|
149
|
-
risk;
|
|
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:
|
|
150
157
|
|
|
151
158
|
1. Research: `greg` (`research-analyst.md`) plus an implementation-context specialist.
|
|
152
159
|
2. Plan: `planner` drafts; `qa-reviewer` challenges assumptions and test shape.
|
|
@@ -56,7 +56,7 @@ export async function runClaudeTeam(args = []) {
|
|
|
56
56
|
console.error(chalk.red(` ✗ Missing ${router}; run bizar install`));
|
|
57
57
|
return 1;
|
|
58
58
|
}
|
|
59
|
-
return spawnClaude(['-p', '--name', name, '--agent', '
|
|
59
|
+
return spawnClaude(['-p', '--name', name, '--agent', 'mike', mission, ...rest]);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export async function runClaudeSubagent(args = []) {
|
|
@@ -80,7 +80,9 @@ export async function runClaudeRun(args = []) {
|
|
|
80
80
|
console.log(' Usage: bizar run [--bg] <prompt>');
|
|
81
81
|
return 2;
|
|
82
82
|
}
|
|
83
|
-
return spawnClaude(background
|
|
83
|
+
return spawnClaude(background
|
|
84
|
+
? ['--bg', '-p', '--agent', 'mike', prompt]
|
|
85
|
+
: ['-p', '--agent', 'mike', prompt]);
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
export async function run(name, args, isHelpRequest) {
|
package/cli/commands/hook.mjs
CHANGED
|
@@ -19,6 +19,7 @@ const PRETOOL_SAFETY_LEAVES = new Set([
|
|
|
19
19
|
'pretooluse-editwrite', 'path-ownership-guard',
|
|
20
20
|
'pretooluse-bash', 'git-workflow-guard',
|
|
21
21
|
'agent-model-guard',
|
|
22
|
+
'workflow-route-guard',
|
|
22
23
|
]);
|
|
23
24
|
|
|
24
25
|
export const HOOK_PROGRAMS = Object.freeze({
|
|
@@ -47,6 +48,7 @@ export const HOOK_PROGRAMS = Object.freeze({
|
|
|
47
48
|
'team-lifecycle': 'team-lifecycle.mjs',
|
|
48
49
|
'verify-deliverables': 'verify-deliverables.mjs',
|
|
49
50
|
'worker-suggest': 'worker-suggest.mjs',
|
|
51
|
+
'workflow-route-guard': 'workflow-route-guard.mjs',
|
|
50
52
|
'worktree-archive': 'worktree-archive.mjs',
|
|
51
53
|
'worktree-bootstrap': 'worktree-bootstrap.mjs',
|
|
52
54
|
});
|
|
@@ -55,6 +57,7 @@ export const EVENT_CHAINS = Object.freeze({
|
|
|
55
57
|
'user-prompt-submit': Object.freeze([
|
|
56
58
|
'control-inbox',
|
|
57
59
|
'keyword-router',
|
|
60
|
+
'workflow-route-guard',
|
|
58
61
|
'worker-suggest',
|
|
59
62
|
'thinking-route',
|
|
60
63
|
'telemetry',
|
|
@@ -230,16 +233,17 @@ export function selectEventChain(eventKey, input = '') {
|
|
|
230
233
|
|
|
231
234
|
if (eventKey === 'pre-tool-use') {
|
|
232
235
|
if (/^(Write|Edit|MultiEdit)$/.test(toolName)) {
|
|
233
|
-
return ['pretooluse-editwrite', 'path-ownership-guard'];
|
|
236
|
+
return ['workflow-route-guard', 'pretooluse-editwrite', 'path-ownership-guard'];
|
|
234
237
|
}
|
|
235
238
|
if (toolName === 'Bash') {
|
|
236
|
-
return ['pretooluse-bash', 'git-workflow-guard'];
|
|
239
|
+
return ['workflow-route-guard', 'pretooluse-bash', 'git-workflow-guard'];
|
|
237
240
|
}
|
|
238
|
-
if (toolName === 'Agent') return ['agent-model-guard'];
|
|
241
|
+
if (toolName === 'Agent') return ['workflow-route-guard', 'agent-model-guard'];
|
|
239
242
|
return [];
|
|
240
243
|
}
|
|
241
244
|
|
|
242
245
|
if (eventKey === 'post-tool-use') {
|
|
246
|
+
if (toolName === 'Workflow') return ['workflow-route-guard'];
|
|
243
247
|
if (/^(Write|Edit|MultiEdit)$/.test(toolName)) return ['posttooluse-editwrite'];
|
|
244
248
|
if (toolName === 'Bash') return [];
|
|
245
249
|
return [];
|