@polderlabs/bizar 6.1.0 → 6.2.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.
@@ -0,0 +1,124 @@
1
+ ---
2
+ description: Spawn a Cline agent team — coordinate Thor (M2.7), Tyr (M3), Mimir (research), and Hermod (git) to complete a complex mission end-to-end.
3
+ agent: odin
4
+ ---
5
+ # Team — Spawn a Cline Agent Team
6
+
7
+ The `/team` command spawns a **coordinated agent team** for a complex,
8
+ multi-step mission. The lead agent coordinates teammates; each teammate
9
+ owns a disjoint scope; results are synthesized and committed.
10
+
11
+ ## When to Use `/team`
12
+
13
+ Use `/team` for any non-trivial mission that benefits from **parallel
14
+ work + explicit coordination**. Examples:
15
+
16
+ - **Refactor** — split a module across Thor (M2.7) and Tyr (M3) in parallel.
17
+ - **Multi-feature build** — new feature A (Thor) + new feature B (Tyr) + tests (Heimdall).
18
+ - **Research + implementation** — Mimir researches, Thor implements, Forseti audits.
19
+ - **Migration / upgrade** — Hermod handles the git/PR lifecycle while Thor/Tyr write code.
20
+ - **Bug hunt** — Mimir traces the data flow while Tyr writes the fix and tests.
21
+
22
+ Do NOT use `/team` for trivial single-file edits or single-question
23
+ clarifications. Use `@heimdall` directly for those.
24
+
25
+ ## Default Team Composition
26
+
27
+ If the user does not specify a team composition, spawn this default:
28
+
29
+ | Role | Agent | Model | Job |
30
+ |---------------|---------|-------------------|---------------------------------------|
31
+ | Lead | @odin | minimax/MiniMax-M3 | Coordinate, synthesize, gate quality |
32
+ | Implementer 1 | @thor | minimax/MiniMax-M2.7 | Moderate-complexity implementation |
33
+ | Implementer 2 | @tyr | minimax/MiniMax-M3 | Complex / cross-cutting work |
34
+ | Researcher | @mimir | 9router/kr/auto | Codebase research, pattern discovery |
35
+ | Git ops | @hermod | minimax/MiniMax-M2.7 | Branch, commit, push, PR |
36
+ | Reviewer | @forseti| minimax/MiniMax-M3 | Audit plan + final output |
37
+
38
+ You can swap or remove any of these — but always keep at least one
39
+ implementer and a reviewer.
40
+
41
+ ## Protocol (How Odin Runs a `/team` Invocation)
42
+
43
+ 1. **Read `.bizar/PROJECT.md`** if it exists. Factor the project
44
+ description into the team mission.
45
+ 2. **Read `bizar memory status`**. If the vault is reachable, run
46
+ `bizar memory search "<topic>"` for prior context on the mission.
47
+ 3. **Decompose** the mission into disjoint work items. Each item
48
+ names:
49
+ - The agent that owns it
50
+ - The file scope (paths/globs)
51
+ - The deliverable (a function, a test, a commit, a doc)
52
+ - The exit signal ("done when X is committed")
53
+ 4. **Launch in parallel** — use `bizar_spawn_team` with the mission
54
+ string. Or, if you prefer synchronous control, launch 2+ `task`
55
+ calls in a **single message** to drive Thor and Tyr directly.
56
+ 5. **Monitor** — while the team runs, return control to the user.
57
+ The team runs asynchronously. Use `bizar_status` to check progress
58
+ only when the user asks.
59
+ 6. **Synthesize** — when teammates report back, gate through @forseti
60
+ (audit) and @hermod (commit/push). Then report the final outcome
61
+ to the user with file:line references.
62
+
63
+ ## Pre-Dispatch Checklist (MANDATORY)
64
+
65
+ - [ ] Each teammate has a **disjoint file scope** — no two agents
66
+ edit the same file or directory
67
+ - [ ] Lockfiles, `package.json`, root configs, `tsconfig.json`,
68
+ `vite.config.*`, `Dockerfile`, CI configs are assigned to ONE
69
+ agent or marked READ-ONLY for everyone else
70
+ - [ ] No subagent has both `bash: allow` AND a write-level git task
71
+ in the same batch — Hermod is the only git writer
72
+ - [ ] Each teammate's scope is named in plain English
73
+ - [ ] You have prepended the **Sibling-Awareness Block** to every
74
+ prompt — see Odin baseline, "Parallel Dispatch Coordination"
75
+ - [ ] You have called `bizar memory status` and confirmed the vault
76
+ is reachable
77
+
78
+ ## Example Mission Strings
79
+
80
+ **Refactor a module:**
81
+ ```
82
+ Refactor src/api/auth.ts into a clean module: extract JWT validation
83
+ into src/auth/jwt.ts, rate-limiting into src/auth/rate-limit.ts, and
84
+ keep the public surface stable. Add tests for each new module. Update
85
+ docs/architecture.md with the new module map. Do not change the HTTP
86
+ route handlers.
87
+ ```
88
+
89
+ **Multi-feature build:**
90
+ ```
91
+ Add a kanban board: (1) Thor — backend API at /api/tasks with CRUD
92
+ endpoints and SQLite persistence. (2) Tyr — frontend React component
93
+ in src/components/Kanban.tsx with 5 columns. (3) Heimdall — write
94
+ the OpenAPI spec at docs/api/tasks.yaml. (4) Hermod — open a PR
95
+ named feat/kanban-board.
96
+ ```
97
+
98
+ **Bug hunt:**
99
+ ```
100
+ Mimir — trace the data flow from POST /api/checkout through to the
101
+ Stripe webhook handler; find any place where the order status is
102
+ written before the payment is confirmed. Tyr — write a regression
103
+ test that reproduces the race. Thor — fix the bug. Forseti —
104
+ audit the fix for completeness. Hermod — commit + push.
105
+ ```
106
+
107
+ ## Tool Reference
108
+
109
+ - `bizar_spawn_team` — spawn a full team in one call (lead + mission)
110
+ - `bizar_spawn_background` — spawn a single background agent
111
+ - `bizar_status` — list all running background instances
112
+ - `bizar_collect` — block until an instance completes (use sparingly)
113
+ - `bizar_kill` — terminate an instance
114
+
115
+ ## Failure Modes
116
+
117
+ - **Two agents write the same file** — STOP, revert one branch, reassign.
118
+ - **One agent stalls** — call `bizar_kill`, route the remaining scope
119
+ to another agent.
120
+ - **Tests fail after team work** — dispatch @thor to investigate; do
121
+ not paper over the failure.
122
+ - **Git conflict** — route to @hermod for `git rebase` / merge resolution.
123
+ - **A teammate goes silent** — call `bizar_status` for a status report;
124
+ if dead, kill and re-spawn with a fresh prompt.
@@ -0,0 +1,60 @@
1
+ ---
2
+ description: Run the project's test suite via the Bizar test gate. Auto-detects jest/vitest/bun/pytest/cargo/go. Exits non-zero on failure.
3
+ agent: thor
4
+ ---
5
+ # /test — Run the Project's Test Suite
6
+
7
+ The `/test` command is a thin wrapper around `bizar test-gate`. It
8
+ auto-detects the project's test runner and runs the full suite.
9
+
10
+ ## What It Does
11
+
12
+ 1. Detects the project stack (one of: npm, pytest, cargo, go).
13
+ 2. Runs the matching test command:
14
+ - `package.json` present → `npm test`
15
+ - `pyproject.toml` present → `pytest`
16
+ - `Cargo.toml` present → `cargo test`
17
+ - `go.mod` present → `go test ./...`
18
+ 3. Streams the test output to the user.
19
+ 4. Exits non-zero on test failures.
20
+
21
+ ## Exit Codes
22
+
23
+ | Code | Meaning |
24
+ |------|----------------------------------|
25
+ | 0 | All tests passed |
26
+ | 1 | Tests failed |
27
+ | 2 | No test runner detected |
28
+
29
+ ## How to Use
30
+
31
+ Invoke `/test` (no arguments) from the project root. The test gate
32
+ inspects the current directory and picks the right runner.
33
+
34
+ To run a specific Bizar test scope instead, you can pass arguments
35
+ to `/test`. The arguments are forwarded to the underlying runner:
36
+
37
+ - `/test plugins/bizar` — run only the Bizar plugin tests (bun)
38
+ - `/test --testPathPattern=auth` — pass a flag to the runner
39
+
40
+ ## When to Use
41
+
42
+ - After any non-trivial code change
43
+ - Before committing (`@hermod` should always run `/test` first)
44
+ - As the final step of a `/team` mission — gate quality with tests
45
+
46
+ ## Common Patterns
47
+
48
+ - **Post-implementation gate** — after Thor and Tyr finish their
49
+ parallel work, dispatch `@thor` to run `/test`. If failures, fix
50
+ and re-run.
51
+ - **PR check** — run `/test` in CI before merging.
52
+ - **Debug a flaky test** — run `/test` twice; if the second run
53
+ passes, the test is order-dependent (fix or quarantine).
54
+
55
+ ## Related
56
+
57
+ - `bizar test-gate` — the underlying CLI command
58
+ - `bizar doctor` — checks the Bizar install itself (not project tests)
59
+ - `make check` — typecheck + tests (full pipeline, dev only)
60
+ - `make e2e` — Bizar plugin end-to-end (dev only)
@@ -0,0 +1,66 @@
1
+ ---
2
+ description: Validate the Bizar install end-to-end — cline.json parses, plugin entry resolves, all 14 agent files are installed, all skills/rules/hooks/commands are in place, provider config is sane, and the 9router gateway is reachable.
3
+ agent: heimdall
4
+ ---
5
+ # /validate — Validate the Bizar Install
6
+
7
+ The `/validate` command runs `bizar doctor` with the full check
8
+ battery. It is the fastest way to confirm the install is healthy
9
+ and Cline will see every Bizar component on the next session start.
10
+
11
+ ## What It Checks
12
+
13
+ 1. **cline-reachable** — `cline --version` exits 0.
14
+ 2. **cline-config-valid** — `~/.cline/cline.json` parses as JSON.
15
+ 3. **plugin-entry-present** — `cline.json` has a Bizar plugin entry.
16
+ 4. **plugin-path-resolves** — the plugin path on disk actually exists.
17
+ 5. **agent-files-installed** — all 14 agent files in `~/.cline/agents/`
18
+ (odin, vor, frigg, quick, mimir, heimdall, hermod, thor, baldr,
19
+ tyr, vidarr, forseti, semble-search, agent-browser).
20
+ 6. **tools-available** — at least one of `headroom`, `semble`, `skills`
21
+ is on PATH.
22
+ 7. **provider-config-sanity** — `provider.9router` (preferred) or
23
+ `provider.minimax` (legacy) has at least one sane model entry.
24
+ 8. **9router-reachable** — 9Router gateway responds at
25
+ `http://localhost:20128/api/health` (lenient — warn, don't fail).
26
+ 9. **slash-commands-installed** — all Bizar slash commands
27
+ (`/audit`, `/explain`, `/init`, `/learn`, `/plan`, `/plow-through`,
28
+ `/pr-review`, `/tailscale-serve`, `/visual-plan`, `/bizar`,
29
+ `/team`, `/test`, `/validate`) are present in `~/.cline/commands/`.
30
+ 10. **skills-installed** — every subdir of `config/skills/` is
31
+ mirrored to `~/.cline/skills/`.
32
+ 11. **rules-installed** — every `.md` in `config/rules/` is mirrored
33
+ to `~/.cline/rules/`.
34
+ 12. **hooks-installed** — `config/hooks/` is mirrored to
35
+ `~/.cline/hooks/`.
36
+
37
+ ## How to Use
38
+
39
+ Invoke `/validate` (no arguments) from anywhere. It is read-only and
40
+ never modifies the system.
41
+
42
+ If any check fails, the user should run `bizar update` to refresh the
43
+ install, or `bizar repair` to fix common issues.
44
+
45
+ ## Output
46
+
47
+ Each check prints ✓ or ✗ with a one-line message. The summary line
48
+ shows the total pass/fail count. Exits non-zero if any check fails.
49
+
50
+ For machine-readable output, the user can run `bizar doctor --json`
51
+ directly.
52
+
53
+ ## When to Use
54
+
55
+ - After a manual config edit — confirm nothing broke.
56
+ - Before a `/team` mission — confirm the install is healthy so the
57
+ team has all the tools it needs.
58
+ - After `bizar install` or `bizar update` — the install already
59
+ calls doctor, but a manual re-run is cheap.
60
+ - When a user asks "why is cline misbehaving?" — start here.
61
+
62
+ ## Related
63
+
64
+ - `bizar doctor` — the underlying CLI command
65
+ - `bizar update` — refreshes the install (re-runs syncConfigExtras)
66
+ - `bizar repair` — fixes common issues (stale symlinks, version drift)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "6.1.0",
4
- "description": "Norse-pantheon multi-agent system for cline \u2014 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. v4 ships as a single npm package bundling the dashboard server, cline plugin, and typed SDK.",
3
+ "version": "6.2.0",
4
+ "description": "Norse-pantheon multi-agent system for cline 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. v4 ships as a single npm package bundling the dashboard server, cline plugin, and typed SDK.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "bizar": "cli/bin.mjs"
@@ -13,6 +13,7 @@
13
13
  "packages/sdk/",
14
14
  "config/",
15
15
  "templates/",
16
+ "scripts/",
16
17
  "install.sh",
17
18
  "cli/browser-harness-up.sh"
18
19
  ],
@@ -23,7 +24,7 @@
23
24
  "test:sdk": "node_modules/.bin/vitest run --root packages/sdk",
24
25
  "test:web": "cd bizar-dash && npx vitest run",
25
26
  "test:sdk:watch": "node_modules/.bin/vitest --root packages/sdk",
26
- "test": "npm run typecheck && npm run test:sdk && bun test plugins/bizar/tests/loop.test.ts plugins/bizar/tests/block.test.ts plugins/bizar/tests/stall-think.test.ts plugins/bizar/tests/tools/bg-get-comments.test.ts plugins/bizar/tests/tools/bg-spawn-delegation.test.ts plugins/bizar/tests/tools/cline-runner.test.ts plugins/bizar/tests/settings.test.ts plugins/bizar/tests/commands.test.ts plugins/bizar/tests/commands-impl.test.ts plugins/bizar/tests/tools/plan-action.test.ts plugins/bizar/tests/tools/wait-for-feedback.test.ts plugins/bizar/tests/tools/read-glyph-feedback.test.ts plugins/bizar/tests/reasoning-clean.test.ts plugins/bizar/tests/key-rotation.test.ts && node bizar-dash/tests/smoke-v2.mjs && node --test bizar-dash/tests/path-safe.test.mjs bizar-dash/tests/tmux-wrap.test.mjs bizar-dash/tests/cline-sessions-detail.test.mjs bizar-dash/tests/cline-runner.test.mjs bizar-dash/tests/mod-instructions.node.test.mjs bizar-dash/tests/mod-upgrade.node.test.mjs bizar-dash/tests/graphify-mod-spawn.node.test.mjs bizar-dash/tests/no-agent-browser.node.test.mjs bizar-dash/tests/providers-store-backup-keys.node.test.mjs bizar-dash/tests/dashboard-ports.test.mjs bizar-dash/tests/submit-feedback.test.mjs bizar-dash/tests/yaml.test.mjs bizar-dash/tests/memory-store.test.mjs bizar-dash/tests/memory-schema.test.mjs bizar-dash/tests/memory-secrets.test.mjs bizar-dash/tests/memory-git.test.mjs bizar-dash/tests/memory-sync.test.mjs bizar-dash/tests/obsidian-back-compat.test.mjs bizar-dash/tests/memory-lightrag.test.mjs bizar-dash/tests/memory-config.test.mjs bizar-dash/tests/memory-cli.test.mjs bizar-dash/tests/memory-cli-readlistdelete.test.mjs bizar-dash/tests/memory-cli-setup.test.mjs bizar-dash/tests/memory-conflicts.test.mjs bizar-dash/tests/memory-namespace.test.mjs bizar-dash/tests/memory-path-safety.test.mjs bizar-dash/tests/memory-protocol-drift.test.mjs bizar-dash/tests/memory-roundtrip.test.mjs bizar-dash/tests/cli-bugfixes.test.mjs bizar-dash/tests/server-bugfixes.test.mjs bizar-dash/tests/frontend-bugfixes.test.mjs",
27
+ "test": "npm run typecheck && npm run test:sdk && node --test cli/install.test.mjs cli/provision.test.mjs cli/commands/validate.test.mjs && bun test plugins/bizar/tests/loop.test.ts plugins/bizar/tests/block.test.ts plugins/bizar/tests/stall-think.test.ts plugins/bizar/tests/tools/bg-get-comments.test.ts plugins/bizar/tests/tools/bg-spawn-delegation.test.ts plugins/bizar/tests/tools/cline-runner.test.ts plugins/bizar/tests/settings.test.ts plugins/bizar/tests/commands.test.ts plugins/bizar/tests/commands-impl.test.ts plugins/bizar/tests/tools/plan-action.test.ts plugins/bizar/tests/tools/wait-for-feedback.test.ts plugins/bizar/tests/tools/read-glyph-feedback.test.ts plugins/bizar/tests/reasoning-clean.test.ts plugins/bizar/tests/key-rotation.test.ts && node bizar-dash/tests/smoke-v2.mjs && node --test bizar-dash/tests/path-safe.test.mjs bizar-dash/tests/tmux-wrap.test.mjs bizar-dash/tests/cline-sessions-detail.test.mjs bizar-dash/tests/cline-runner.test.mjs bizar-dash/tests/mod-instructions.node.test.mjs bizar-dash/tests/mod-upgrade.node.test.mjs bizar-dash/tests/graphify-mod-spawn.node.test.mjs bizar-dash/tests/no-agent-browser.node.test.mjs bizar-dash/tests/providers-store-backup-keys.node.test.mjs bizar-dash/tests/dashboard-ports.test.mjs bizar-dash/tests/submit-feedback.test.mjs bizar-dash/tests/yaml.test.mjs bizar-dash/tests/memory-store.test.mjs bizar-dash/tests/memory-schema.test.mjs bizar-dash/tests/memory-secrets.test.mjs bizar-dash/tests/memory-git.test.mjs bizar-dash/tests/memory-sync.test.mjs bizar-dash/tests/obsidian-back-compat.test.mjs bizar-dash/tests/memory-lightrag.test.mjs bizar-dash/tests/memory-config.test.mjs bizar-dash/tests/memory-cli.test.mjs bizar-dash/tests/memory-cli-readlistdelete.test.mjs bizar-dash/tests/memory-cli-setup.test.mjs bizar-dash/tests/memory-conflicts.test.mjs bizar-dash/tests/memory-namespace.test.mjs bizar-dash/tests/memory-path-safety.test.mjs bizar-dash/tests/memory-protocol-drift.test.mjs bizar-dash/tests/memory-roundtrip.test.mjs bizar-dash/tests/cli-bugfixes.test.mjs bizar-dash/tests/server-bugfixes.test.mjs bizar-dash/tests/frontend-bugfixes.test.mjs",
27
28
  "build": "npm run build:sdk && npm run build:dash",
28
29
  "prepublishOnly": "npm run build"
29
30
  },
@@ -109,4 +110,4 @@
109
110
  "optionalDependencies": {
110
111
  "@cline/sdk": "^0.0.58"
111
112
  }
112
- }
113
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar-plugin",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
4
4
  "description": "Bizar Norse-pantheon multi-agent plugin for Cline — 14 agents across 4 cost tiers with cost-aware routing and plans.",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -161,7 +161,7 @@ export class ClineRuntime {
161
161
  cwd: opts.workspaceRoot,
162
162
  enableTools: true,
163
163
  enableSpawnAgent: false,
164
- enableAgentTeams: false,
164
+ enableAgentTeams: true,
165
165
  ...(execution ? { execution } : {}),
166
166
  ...(recovery ? { onConsecutiveMistakeLimitReached: recovery } : {}),
167
167
  };
@@ -166,6 +166,50 @@ describe("ClineRuntime.startSession — execution plumbing", () => {
166
166
  });
167
167
  });
168
168
 
169
+ describe("ClineRuntime.startSession — agent teams plumbing (v6.2.0)", () => {
170
+ test("enableAgentTeams is true on every session (team-spawn requires it)", async () => {
171
+ const runtime = new ClineRuntime({ logger: stubLogger() });
172
+ (runtime as unknown as { core: unknown }).core = makeFakeCore();
173
+ await runtime.startSession({
174
+ providerId: "anthropic",
175
+ modelId: "claude-sonnet-4-6",
176
+ workspaceRoot: "/tmp",
177
+ prompt: "go",
178
+ });
179
+ const cfg = capturedConfig[0]!.config;
180
+ expect(cfg.enableAgentTeams).toBe(true);
181
+ });
182
+
183
+ test("enableTools is true, enableSpawnAgent is false", async () => {
184
+ const runtime = new ClineRuntime({ logger: stubLogger() });
185
+ (runtime as unknown as { core: unknown }).core = makeFakeCore();
186
+ await runtime.startSession({
187
+ providerId: "anthropic",
188
+ modelId: "claude-sonnet-4-6",
189
+ workspaceRoot: "/tmp",
190
+ prompt: "go",
191
+ });
192
+ const cfg = capturedConfig[0]!.config;
193
+ expect(cfg.enableTools).toBe(true);
194
+ expect(cfg.enableSpawnAgent).toBe(false);
195
+ });
196
+
197
+ test("all three boolean flags survive even when caller passes no opts", async () => {
198
+ const runtime = new ClineRuntime({ logger: stubLogger() });
199
+ (runtime as unknown as { core: unknown }).core = makeFakeCore();
200
+ await runtime.startSession({
201
+ providerId: "anthropic",
202
+ modelId: "claude-sonnet-4-6",
203
+ workspaceRoot: "/tmp",
204
+ prompt: "go",
205
+ });
206
+ const cfg = capturedConfig[0]!.config;
207
+ expect(cfg.enableAgentTeams).toBe(true);
208
+ expect(cfg.enableTools).toBe(true);
209
+ expect(cfg.enableSpawnAgent).toBe(false);
210
+ });
211
+ });
212
+
169
213
  function stubLogger(): { info: (m: string) => void; warn: (m: string) => void; error: (m: string) => void; debug: (m: string) => void; log: (o: { level: string; message: string }) => void } {
170
214
  return {
171
215
  info: () => {},