@polderlabs/bizar 3.11.0 → 3.11.1

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/cli/graph.mjs CHANGED
@@ -150,13 +150,39 @@ function ensureGitignore(graphDir) {
150
150
  /**
151
151
  * Spawn a graphify command with GRAPHIFY_OUT set to GRAPH_DIR.
152
152
  * Streams stdout/stderr to the terminal. Returns the exit code.
153
+ *
154
+ * Resolution order:
155
+ * 1. If the `graphify` binary is on PATH (the uv-tool shim), invoke it
156
+ * directly. This is what `checkGraphify` already verified — we don't
157
+ * need to know about its venv.
158
+ * 2. Otherwise fall back to `python -m graphify` for pip/pipx installs.
153
159
  */
154
160
  function runGraphify(python, subArgs, extraEnv = {}) {
155
- const env = { ...process.env, [GRAPHIFY_OUT_ENV]: GRAPH_DIR };
161
+ const env = { ...process.env, [GRAPHIFY_OUT_ENV]: GRAPH_DIR, ...extraEnv };
162
+ const whichCmd = process.platform === 'win32' ? 'where' : 'which';
163
+ let bin = null;
164
+ try {
165
+ const r = spawnSync(whichCmd, ['graphify'], { encoding: 'utf8', timeout: 5000 });
166
+ if (r.status === 0 && (r.stdout || '').trim().length > 0) {
167
+ bin = 'graphify';
168
+ }
169
+ } catch {
170
+ // ignore — fall through to python -m
171
+ }
172
+
173
+ if (bin) {
174
+ const result = spawnSync(bin, subArgs, {
175
+ stdio: 'inherit',
176
+ env,
177
+ timeout: 0, // no timeout — user may run long builds
178
+ });
179
+ return result.status ?? 1;
180
+ }
181
+
156
182
  const result = spawnSync(python, ['-m', 'graphify', ...subArgs], {
157
183
  stdio: 'inherit',
158
184
  env,
159
- timeout: 0, // no timeout — user may run long builds
185
+ timeout: 0,
160
186
  });
161
187
  return result.status ?? 1;
162
188
  }
@@ -187,6 +187,8 @@ End your final summary with: `Siblings: <list>. Conflicts: <list or "none">. Git
187
187
  ## Thinking style
188
188
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
189
189
 
190
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
191
+
190
192
  ---
191
193
 
192
194
  ## Always-On Behavior Baseline
@@ -127,6 +127,8 @@ Be professional and concise. Do not write long essays for every action.
127
127
  ## Thinking style
128
128
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
129
129
 
130
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
131
+
130
132
  ## Parallel Execution
131
133
 
132
134
  You may be invoked alongside other audit agents (parallel reviews of different files) or alongside implementation agents. The shared `AGENTS.md` baseline rules apply.
@@ -115,6 +115,8 @@ The injected message you will see is exactly one of:
115
115
  ## Thinking style
116
116
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
117
117
 
118
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
119
+
118
120
  ---
119
121
 
120
122
  ## Always-On Behavior Baseline
@@ -172,6 +172,8 @@ Be professional and concise. Do not write long essays for every action.
172
172
  ## Thinking style
173
173
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
174
174
 
175
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
176
+
175
177
  ## Parallel Execution
176
178
 
177
179
  You may be dispatched alongside sibling agents working on the same repository at the same time. The shared `AGENTS.md` baseline contains the universal rules — read those first. This section adds role-specific guidance.
@@ -147,6 +147,8 @@ Be professional and concise. Do not write long essays for every action.
147
147
  ## Thinking style
148
148
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
149
149
 
150
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
151
+
150
152
  ## PR Review Mode
151
153
 
152
154
  When dispatched for a `/pr-review`:
@@ -130,6 +130,8 @@ Be professional and concise. Do not write long essays for every action.
130
130
  ## Thinking style
131
131
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
132
132
 
133
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
134
+
133
135
  ## Parallel Execution
134
136
 
135
137
  You may be dispatched alongside sibling agents working on the same repository at the same time. The shared `AGENTS.md` baseline contains the universal rules — read those first. This section adds role-specific guidance.
@@ -368,6 +368,11 @@ You are the All-Father. Concise by default, but you are permitted dry humor, a w
368
368
  - Match the user's register: terse when they're terse, thorough when they want depth.
369
369
  - When delegating, be specific about what you want. Other agents follow your instructions literally.
370
370
 
371
+ ## Thinking style
372
+ Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
373
+
374
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
375
+
371
376
  ---
372
377
 
373
378
  ## Always-On Behavior Baseline
@@ -94,6 +94,8 @@ The injected message you will see is exactly one of:
94
94
  ## Thinking style
95
95
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
96
96
 
97
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
98
+
97
99
  ---
98
100
 
99
101
  ## Always-On Behavior Baseline
@@ -53,6 +53,8 @@ If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its plac
53
53
  ## Thinking style
54
54
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
55
55
 
56
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
57
+
56
58
  ## Always-On Behavior Baseline
57
59
 
58
60
  **Follow the global baseline in `config/AGENTS.md` → "General Agent Baseline — Always-On Behavior".** It covers identity, refusal, tone, formatting, lists, user wellbeing, evenhandedness, mistakes, knowledge cutoff and research-first, MCP servers and skills, mandatory skill-read, file creation, file handling, search, copyright, harmful content, citations, images, memory privacy, execution, clarification, and communication.
@@ -112,6 +112,8 @@ Be professional and concise. Do not write long essays for every action.
112
112
  ## Thinking style
113
113
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
114
114
 
115
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
116
+
115
117
  ## Parallel Execution
116
118
 
117
119
  You may be dispatched alongside sibling agents working on the same repository at the same time. The shared `AGENTS.md` baseline contains the universal rules — read those first. This section adds role-specific guidance.
@@ -111,6 +111,8 @@ Be professional and concise. Do not write long essays for every action.
111
111
  ## Thinking style
112
112
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
113
113
 
114
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
115
+
114
116
  ## Parallel Execution
115
117
 
116
118
  You may be dispatched alongside sibling agents working on the same repository at the same time. The shared `AGENTS.md` baseline contains the universal rules — read those first. This section adds role-specific guidance.
@@ -115,6 +115,8 @@ Be professional and concise. Do not write long essays for every action.
115
115
  ## Thinking style
116
116
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
117
117
 
118
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
119
+
118
120
  ## Parallel Execution
119
121
 
120
122
  You may be dispatched alongside sibling agents working on the same repository at the same time. The shared `AGENTS.md` baseline contains the universal rules — read those first. This section adds role-specific guidance.
@@ -153,6 +153,8 @@ Be professional and concise. Do not write long essays for every action.
153
153
  ## Thinking style
154
154
  Follow `config/rules/thinking.md` strictly. Be precise, concise, and decisive in reasoning. No informal self-talk, no "what if" loops, no mid-thought self-correction.
155
155
 
156
+ When uncertain or stuck, follow `config/rules/uncertainty.md` — stop and research, do not keep retrying variations.
157
+
156
158
  ---
157
159
 
158
160
  ## Always-On Behavior Baseline
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://opencode.ai/config.json",
3
- "model": "minimax/MiniMax-M3",
4
- "small_model": "minimax/MiniMax-M2.7",
3
+ "model": "openrouter/minimax/minimax-m3",
4
+ "small_model": "openrouter/minimax/minimax-m2.7",
5
5
  "default_agent": "odin",
6
6
  "permission": "allow",
7
7
  "snapshot": false,
@@ -53,7 +53,7 @@
53
53
  "odin": {
54
54
  "description": "Odin — Pure router that delegates all work to subagents. Routes across Frigg (DeepSeek/Q&A), Vör (DeepSeek/clarify), Mimir (DeepSeek/research), Heimdall (DeepSeek/simple), Hermod (M2.7/git), Thor (M2.7/mid), Baldr (M2.7/design), Tyr (M3/top), Vidarr (GPT-5.5/ultra), Forseti (verifier/M3).",
55
55
  "mode": "primary",
56
- "model": "minimax/MiniMax-M3",
56
+ "model": "openrouter/minimax/minimax-m3",
57
57
  "color": "#6366f1",
58
58
  "permission": {
59
59
  "task": "allow",
@@ -102,7 +102,7 @@
102
102
  "quick": {
103
103
  "description": "Quick — Fast single-shot tasks. No delegation, no parallel streams. Use for small edits, mechanical changes, one-shot questions. Routes to no one.",
104
104
  "mode": "primary",
105
- "model": "minimax/MiniMax-M2.7",
105
+ "model": "openrouter/minimax/minimax-m2.7",
106
106
  "color": "#22d3ee",
107
107
  "permission": {
108
108
  "read": "allow",
@@ -162,7 +162,7 @@
162
162
  "hermod": {
163
163
  "description": "Hermod — Git and GitHub operations specialist using MiniMax M2.7. Branching, commits, PRs, merge/rebase, conflict resolution, CI/CD, releases, gh CLI.",
164
164
  "mode": "subagent",
165
- "model": "minimax/MiniMax-M2.7",
165
+ "model": "openrouter/minimax/minimax-m2.7",
166
166
  "color": "#06b6d4",
167
167
  "permission": {
168
168
  "read": "allow",
@@ -180,7 +180,7 @@
180
180
  "thor": {
181
181
  "description": "Thor — Handles medium-complexity tasks using MiniMax M2.7 from minimax.io. Strong and reliable, cheaper than Tyr but more capable than Heimdall.",
182
182
  "mode": "subagent",
183
- "model": "minimax/MiniMax-M2.7",
183
+ "model": "openrouter/minimax/minimax-m2.7",
184
184
  "color": "#a855f7",
185
185
  "permission": {
186
186
  "read": "allow",
@@ -199,7 +199,7 @@
199
199
  "baldr": {
200
200
  "description": "Baldr — UI/UX design system specialist. Creates DESIGN.md files using Google's design.md standard. Focuses on visual consistency, usability, accessibility, and design tokens.",
201
201
  "mode": "subagent",
202
- "model": "minimax/MiniMax-M2.7",
202
+ "model": "openrouter/minimax/minimax-m2.7",
203
203
  "color": "#ec4899",
204
204
  "permission": {
205
205
  "read": "allow",
@@ -218,7 +218,7 @@
218
218
  "tyr": {
219
219
  "description": "Tyr — Handles the most complex implementation, debugging, and architectural work using MiniMax M3 via minimax.io. Unmatched wisdom for the hardest problems.",
220
220
  "mode": "subagent",
221
- "model": "minimax/MiniMax-M3",
221
+ "model": "openrouter/minimax/minimax-m3",
222
222
  "color": "#f59e0b",
223
223
  "permission": {
224
224
  "read": "allow",
@@ -256,7 +256,7 @@
256
256
  "forseti": {
257
257
  "description": "Forseti — Audits, criticizes, and corrects implementation plans before execution using MiniMax M3. No write permissions — review only.",
258
258
  "mode": "subagent",
259
- "model": "minimax/MiniMax-M3",
259
+ "model": "openrouter/minimax/minimax-m3",
260
260
  "color": "#ef4444",
261
261
  "permission": {
262
262
  "read": "allow",
@@ -357,10 +357,6 @@
357
357
  "minimax/minimax-m2.7": {
358
358
  "interleaved": { "field": "reasoning_details" },
359
359
  "reasoning": true
360
- },
361
- "minimax/owl-alpha": {
362
- "interleaved": { "field": "reasoning_details" },
363
- "reasoning": true
364
360
  }
365
361
  }
366
362
  }
@@ -342,10 +342,6 @@
342
342
  "minimax/minimax-m2.7": {
343
343
  "interleaved": { "field": "reasoning_details" },
344
344
  "reasoning": true
345
- },
346
- "minimax/owl-alpha": {
347
- "interleaved": { "field": "reasoning_details" },
348
- "reasoning": true
349
345
  }
350
346
  }
351
347
  }
@@ -0,0 +1,70 @@
1
+ # Stop and Research Rule
2
+
3
+ ## The Problem
4
+
5
+ LLM agents default to a "try again with a slight variation" loop when they are uncertain. They guess file paths, invent API names, mutate code they do not understand, and burn tokens retrying near-identical tool calls. The fix is always available: stop, use a research tool, learn something, then act.
6
+
7
+ ## The Rule
8
+
9
+ **When uncertain or stuck, STOP. Research. Then act.**
10
+
11
+ ### The Three Phases
12
+
13
+ Every stuck situation must move through these phases in order:
14
+
15
+ 1. **Attempt (max 2 tries).** Try your best guess once or twice. If both fail or you are not confident in the result, stop. Do not attempt a third variation.
16
+ 2. **Research (mandatory before retry #3).** Use the available tools to learn:
17
+ - `semble search "<concept>"` for codebase patterns
18
+ - `webfetch` for official documentation
19
+ - `read` for related files in the repo
20
+ - `hindsight_recall` for prior project context
21
+ - `skill <name>` for domain-specific guidance
22
+ - Ask the user if you are still uncertain after research
23
+ 3. **Act with confidence.** After research, make one decisive attempt. If it still fails, return to phase 2 with the new information. Never return to phase 1.
24
+
25
+ ### Recognition Triggers
26
+
27
+ You are stuck if any of these are true:
28
+
29
+ - You are about to make the same tool call with slightly different arguments
30
+ - You do not know which file contains the relevant code
31
+ - The error message is unfamiliar
32
+ - The user gave a goal but no clear path
33
+ - You are guessing at API signatures, config keys, or command syntax
34
+ - Multiple valid approaches exist and you do not know which is correct
35
+ - Your previous two attempts produced the same outcome
36
+
37
+ ### Hard Bans
38
+
39
+ Never do any of the following:
40
+
41
+ - Try the same approach 3 or more times. Research after the second failure.
42
+ - Guess at file paths without searching
43
+ - Invent API names, method signatures, or config keys
44
+ - Modify code you do not understand
45
+ - Continue a plan after the user has corrected you
46
+ - Pretend to be making progress when you are actually looping
47
+
48
+ ### Examples
49
+
50
+ **BAD:** Agent needs to call the project's authentication helper.
51
+ > "Let me try `auth.login()`. Nope, not exported. Maybe `auth.signIn()`? No. Try `authenticate()`? Hmm. Let me look for `Login`... `User.auth()`? Actually let me try `userLogin()`..."
52
+
53
+ **GOOD:** Agent needs to call the project's authentication helper.
54
+ > Searched the codebase: `semble search "authentication helper"` returned `src/auth/session.ts` exporting `createSession()`. Calling `createSession({ userId })` next.
55
+
56
+ **BAD:** Agent is debugging a build failure.
57
+ > "Error: ENOENT: no such file. Let me try creating `./config.json`. Failed. Try `./src/config.json`. Failed. Try `./app/config.json`. Failed. Let me try `process.cwd()`..."
58
+
59
+ **GOOD:** Agent is debugging a build failure.
60
+ > `semble search "config path"` and `read package.json` both show configs live in `config/`. The build script runs from the repo root, so the path is `config/<name>.json`. Fixing the import next.
61
+
62
+ ### Loop Guard Is The Last Resort
63
+
64
+ The runtime loop guard in `opencode.json` (`loopThresholdWarn: 5`, `loopThresholdEscalate: 8`, `loopThresholdBlock: 12`) is a safety net for when this rule fails. It is not the primary defense.
65
+
66
+ If the loop guard fires, the rule failed first. Agents must self-correct before the guard kicks in. A trigger at 5 identical calls means the agent should have stopped at 2 and researched.
67
+
68
+ ## Enforcement
69
+
70
+ Non-compliance looks like: 3+ similar tool calls in a row, repeated variations of the same failed command, "let me try X... nope... let me try Y..." narration, and increasing token spend with no progress. If you catch yourself doing this, stop, run a research tool, and act on the result.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
4
4
  "description": "Norse-pantheon multi-agent system for opencode — 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",
48
- "url": "git@github.com:DrB0rk/BizarHarness.git"
48
+ "url": "git+ssh://git@github.com/DrB0rk/BizarHarness.git"
49
49
  },
50
50
  "bugs": {
51
51
  "url": "https://github.com/DrB0rk/BizarHarness/issues"