@polderlabs/bizar 2.3.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.
- package/LICENSE +21 -0
- package/README.md +364 -0
- package/cli/audit.mjs +144 -0
- package/cli/banner.mjs +41 -0
- package/cli/bin.mjs +186 -0
- package/cli/copy.mjs +508 -0
- package/cli/export.mjs +87 -0
- package/cli/init.mjs +147 -0
- package/cli/install.mjs +390 -0
- package/cli/plan-templates.mjs +523 -0
- package/cli/plan.mjs +2087 -0
- package/cli/prompts.mjs +163 -0
- package/cli/update.mjs +273 -0
- package/cli/utils.mjs +153 -0
- package/config/AGENTS.md +282 -0
- package/config/agents/baldr.md +148 -0
- package/config/agents/forseti.md +112 -0
- package/config/agents/frigg.md +101 -0
- package/config/agents/heimdall.md +157 -0
- package/config/agents/hermod.md +144 -0
- package/config/agents/mimir.md +115 -0
- package/config/agents/odin.md +309 -0
- package/config/agents/quick.md +78 -0
- package/config/agents/semble-search.md +44 -0
- package/config/agents/thor.md +97 -0
- package/config/agents/tyr.md +96 -0
- package/config/agents/vidarr.md +100 -0
- package/config/agents/vor.md +140 -0
- package/config/commands/audit.md +1 -0
- package/config/commands/explain.md +1 -0
- package/config/commands/init.md +1 -0
- package/config/commands/learn.md +1 -0
- package/config/commands/pr-review.md +1 -0
- package/config/commands/tailscale-serve.md +96 -0
- package/config/hooks/README.md +29 -0
- package/config/hooks/post-tool-use.md +16 -0
- package/config/hooks/pre-tool-use.md +16 -0
- package/config/opencode.json +52 -0
- package/config/opencode.json.template +52 -0
- package/config/rules/general.md +8 -0
- package/config/rules/git.md +11 -0
- package/config/rules/javascript.md +10 -0
- package/config/rules/python.md +10 -0
- package/config/rules/testing.md +10 -0
- package/config/skills/bizar/README.md +9 -0
- package/config/skills/bizar/SKILL.md +187 -0
- package/config/skills/cpp-coding-standards/README.md +28 -0
- package/config/skills/cpp-coding-standards/SKILL.md +634 -0
- package/config/skills/cpp-coding-standards/agents/openai.yaml +4 -0
- package/config/skills/cpp-coding-standards/references/concurrency.md +320 -0
- package/config/skills/cpp-coding-standards/references/error-handling.md +229 -0
- package/config/skills/cpp-coding-standards/references/memory-safety.md +216 -0
- package/config/skills/cpp-coding-standards/references/modern-idioms.md +282 -0
- package/config/skills/cpp-coding-standards/references/review-checklist.md +96 -0
- package/config/skills/cpp-testing/README.md +28 -0
- package/config/skills/cpp-testing/SKILL.md +304 -0
- package/config/skills/cpp-testing/agents/openai.yaml +4 -0
- package/config/skills/cpp-testing/references/coverage.md +370 -0
- package/config/skills/cpp-testing/references/framework-compare.md +175 -0
- package/config/skills/cpp-testing/references/host-test-for-embedded.md +499 -0
- package/config/skills/cpp-testing/references/mocking.md +364 -0
- package/config/skills/cpp-testing/references/tdd-workflow.md +308 -0
- package/config/skills/embedded-esp-idf/README.md +41 -0
- package/config/skills/embedded-esp-idf/SKILL.md +439 -0
- package/config/skills/embedded-esp-idf/agents/openai.yaml +4 -0
- package/config/skills/embedded-esp-idf/references/freertos-patterns.md +214 -0
- package/config/skills/embedded-esp-idf/references/host-tests.md +164 -0
- package/config/skills/embedded-esp-idf/references/idf-py-commands.md +157 -0
- package/config/skills/embedded-esp-idf/references/kconfig.md +159 -0
- package/config/skills/embedded-esp-idf/references/logging-discipline.md +118 -0
- package/config/skills/embedded-esp-idf/references/memory-and-iram.md +137 -0
- package/config/skills/embedded-esp-idf/references/nvs.md +121 -0
- package/config/skills/embedded-esp-idf/references/packed-structs.md +192 -0
- package/config/skills/embedded-esp-idf/scripts/idf_env.sh +47 -0
- package/config/skills/embedded-esp-idf/scripts/size_check.sh +77 -0
- package/config/skills/self-improvement/SKILL.md +64 -0
- package/package.json +47 -0
- package/templates/plan/htmx.min.js +1 -0
- package/templates/plan/library/bug-investigation.mdx +79 -0
- package/templates/plan/library/decision-record.mdx +71 -0
- package/templates/plan/library/feature-design.mdx +92 -0
- package/templates/plan/meta.json.template +8 -0
- package/templates/plan/plan.canvas.template +1711 -0
- package/templates/plan/plan.html.template +937 -0
- package/templates/plan/plan.mdx.template +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DrB0rk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# BizarHarness แ
|
|
4
|
+
|
|
5
|
+
**Norse-pantheon multi-agent system for opencode**
|
|
6
|
+
|
|
7
|
+
12 agents across 4 cost tiers. Odin routes, subagents execute, Forseti audits.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/bizar)
|
|
10
|
+
[](https://github.com/rtk-ai/rtk)
|
|
11
|
+
[](https://github.com/semble-ai/semble)
|
|
12
|
+
[](https://www.skills.sh)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
[](https://opencode.ai)
|
|
15
|
+
[](#-the-pantheon)
|
|
16
|
+
[](CONTRIBUTING.md)
|
|
17
|
+
|
|
18
|
+
`npm install @polderlabs/bizar` ยท `npx bizar`
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Table of Contents
|
|
25
|
+
|
|
26
|
+
- [The Pantheon](#-the-pantheon)
|
|
27
|
+
- [Architecture](#-architecture)
|
|
28
|
+
- [Installation](#-installation)
|
|
29
|
+
- [Provider Setup](#-provider-setup)
|
|
30
|
+
- [Skill Discovery](#-skill-discovery)
|
|
31
|
+
- [Routing](#-routing)
|
|
32
|
+
- [Self-Improvement](#-self-improvement)
|
|
33
|
+
- [Contributing](#-contributing)
|
|
34
|
+
- [License](#-license)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## แ The Pantheon
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
โโโโโโโโโโโโโโโ
|
|
42
|
+
โแ ODIN โ
|
|
43
|
+
โโโโโโโโโโโโโโโค
|
|
44
|
+
โRouter (M3) โ
|
|
45
|
+
โโโโโโโโโโโโโโโ
|
|
46
|
+
|
|
47
|
+
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโ
|
|
48
|
+
โแข VรR โ โแ MIMIR โ โแน HEIMDALLโ โแฑ HERMOD โ โแฆ THOR โ โแ BALDR โ โแ TYR โ โแ VIDARR โ
|
|
49
|
+
โโโโโโโโโโโค โโโโโโโโโโโค โโโโโโโโโโโค โโโโโโโโโโโค โโโโโโโโโโโค โโโโโโโโโโโค โโโโโโโโโโโค โโโโโโโโโโโโค
|
|
50
|
+
โClarify โ โResearch โ โSimple โ โGitOps โ โMedium โ โDesign โ โComplex โ โLast โ
|
|
51
|
+
โDeepSeek โ โDeepSeek โ โDeepSeek โ โM2.7 โ โM2.7 โ โM2.7 โ โM3 โ โGPT-5.5 โ
|
|
52
|
+
โFREE โ โFREE โ โFREE โ โ$ โ โ$ โ โ$ โ โ$$ โ โ$$$ โ
|
|
53
|
+
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโ
|
|
54
|
+
|
|
55
|
+
โโโโโโโโโโโโโโโ
|
|
56
|
+
โแจ FORSETI โ
|
|
57
|
+
โโโโโโโโโโโโโโโค
|
|
58
|
+
โAuditor (M3) โ
|
|
59
|
+
โedit: deny โ
|
|
60
|
+
โโโโโโโโโโโโโโโ
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> _Generated by PlantUML ASCII art (`plantuml -utxt`)_
|
|
64
|
+
|
|
65
|
+
### Agents
|
|
66
|
+
|
|
67
|
+
| Agent | Rune | Model | Cost | Role |
|
|
68
|
+
|---|---|---|---|---|---|
|
|
69
|
+
| **Odin** | แ | MiniMax-M3 | $0.30/M ยท $1.20/M out | Primary router โ never executes, only delegates |
|
|
70
|
+
| **Frigg** | แ | DeepSeek V4 Flash | **Free** | Read-only Q&A โ ask questions, get answers, never modifies |
|
|
71
|
+
| **Vรถr** | แข | DeepSeek V4 Flash | **Free** | Clarifies ambiguous requests โ asks questions until task is well-defined |
|
|
72
|
+
| **Mimir** | แ | DeepSeek V4 Flash | **Free** | Research & codebase exploration (Semble-first) |
|
|
73
|
+
| **Heimdall** | แน | DeepSeek V4 Flash | **Free** | Simple tasks, quick edits, file operations |
|
|
74
|
+
| **Hermod** | แฑ | MiniMax-M2.7 | $0.30/M ยท $1.20/M out | Git & GitHub operations (commit, PR, merge, rebase) |
|
|
75
|
+
| **Thor** | แฆ | MiniMax-M2.7 | $0.30/M ยท $1.20/M out | Moderate implementation, debugging, refactoring |
|
|
76
|
+
| **Baldr** | แ | MiniMax-M2.7 | $0.30/M ยท $1.20/M out | UI/UX design system (DESIGN.md plans, visual audits) |
|
|
77
|
+
| **Tyr** | แ | MiniMax-M3 | $0.30/M ยท $1.20/M out | Complex implementation, architecture, deep debugging |
|
|
78
|
+
| **Vidarr** | แ | GPT-5.5 | Subscription | Last resort โ GPT-5.5 |
|
|
79
|
+
| **Forseti** | แจ | MiniMax-M3 | $0.30/M ยท $1.20/M out | Adversarial plan reviewer (edit: deny, audit-only) |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## โ Architecture
|
|
84
|
+
|
|
85
|
+
### Request Flow
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
User Odin แ Subagent Forseti แจ
|
|
89
|
+
โ โ โ โ
|
|
90
|
+
โโRequestโ>โ โ โ
|
|
91
|
+
โ โ โ โ
|
|
92
|
+
โ โโ Decompose โโโโโ โ
|
|
93
|
+
โ โ into parallel โ โ
|
|
94
|
+
โ โ streams โ โ
|
|
95
|
+
โ โ โ โ
|
|
96
|
+
โ โโ task โโโโโโโโ>โ โ
|
|
97
|
+
โ โโ task โโโโโโโโ>โ โ
|
|
98
|
+
โ โ โ โ
|
|
99
|
+
โ โ plan review (when complex)โ
|
|
100
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ>โ
|
|
101
|
+
โ โ approve / changes required โ
|
|
102
|
+
โ โ<โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
103
|
+
โ โ โ โ
|
|
104
|
+
โ โ<โโโ results โโโโ โ
|
|
105
|
+
โ<โ synth โโ โ โ
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Key behaviors:**
|
|
109
|
+
- **Odin never executes work** โ stripped of `bash`, `glob`, `grep`, `edit`, `write`, `question`
|
|
110
|
+
- **Vรถr handles ambiguity** โ Odin cannot ask questions; routes unclear requests to Vรถr
|
|
111
|
+
- **Always parallel** โ every request splits into 2+ simultaneous `task` calls
|
|
112
|
+
- **Implementation splits across Thor + Tyr** frontend/backend, file split, impl+tests
|
|
113
|
+
- **Forseti gates all Tier 4/5 work** โ Tyr and Vidarr plans audited before execution
|
|
114
|
+
- **Hindsight memory** โ per-project banks with `bank_id: "<project-name>"`; default bank for general knowledge only
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## ๐ Installation
|
|
119
|
+
|
|
120
|
+
### Quick โ npm (recommended)
|
|
121
|
+
|
|
122
|
+
Published on [npmjs.com/package/bizar](https://www.npmjs.com/package/bizar).
|
|
123
|
+
|
|
124
|
+
Run without installing:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npx bizar
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Or install globally:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm install -g @polderlabs/bizar
|
|
134
|
+
bizar
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Or add to a project:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm install @polderlabs/bizar
|
|
141
|
+
npx bizar
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The interactive installer walks you through component selection, agent choice, install mode, API key setup, and auto-restarts opencode.
|
|
145
|
+
|
|
146
|
+
### Source โ git clone (contributors)
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
git clone git@github.com:DrB0rk/BizarHarness.git
|
|
150
|
+
cd BizarHarness
|
|
151
|
+
chmod +x install.sh
|
|
152
|
+
./install.sh
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Copies agent definitions and config to `~/.config/opencode/`, merges `opencode.json`, and prints next steps. Use this if you want to hack on BizarHarness itself.
|
|
156
|
+
|
|
157
|
+
### Prerequisites
|
|
158
|
+
|
|
159
|
+
- [opencode CLI](https://opencode.ai) installed and on `$PATH`
|
|
160
|
+
- A [Hindsight](https://memory-api.polderlabs.io) API key for persistent memory
|
|
161
|
+
- Provider connections (via `/connect` in opencode TUI)
|
|
162
|
+
- [RTK](https://github.com/rtk-ai/rtk) (recommended) โ CLI proxy that reduces LLM token consumption by 60-90%
|
|
163
|
+
- [Semble](https://github.com/semble-ai/semble) (recommended) โ AI-powered code search (used by Mimir agent)
|
|
164
|
+
- [Skills CLI](https://www.skills.sh) (recommended) โ Agent skill package manager (`npx skills add <owner/repo>`)
|
|
165
|
+
|
|
166
|
+
### RTK Setup
|
|
167
|
+
|
|
168
|
+
[RTK](https://github.com/rtk-ai/rtk) (Rust Token Killer) filters and compresses command output before it reaches the LLM context. It saves ~80% on common operations like `ls`, `git status`, `cargo test`, and `git diff`.
|
|
169
|
+
|
|
170
|
+
Install:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Homebrew (macOS)
|
|
174
|
+
brew install rtk
|
|
175
|
+
|
|
176
|
+
# Linux/macOS quick install
|
|
177
|
+
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
|
|
178
|
+
|
|
179
|
+
# Cargo
|
|
180
|
+
cargo install --git https://github.com/rtk-ai/rtk
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Enable for opencode:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
rtk init -g --opencode
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
After setup, all Bash commands are transparently rewritten to their rtk equivalents โ `git status` โ `rtk git status`, `cargo test` โ `rtk cargo test`. The LLM receives compact output, saving 60-90% on token costs.
|
|
190
|
+
|
|
191
|
+
### Semble Setup
|
|
192
|
+
|
|
193
|
+
[Semble](https://github.com/semble-ai/semble) provides AI-powered code search. It indexes your codebase and enables natural-language queries like "where is authentication handled" without relying on grep. The Mimir research agent uses Semble as its primary search tool.
|
|
194
|
+
|
|
195
|
+
The BizarHarness installer handles this automatically. To install manually:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Install uv if not present
|
|
199
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
200
|
+
|
|
201
|
+
# Install Semble with MCP support
|
|
202
|
+
uv tool install "semble[mcp]"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Skills CLI Setup
|
|
206
|
+
|
|
207
|
+
[Skills CLI](https://www.skills.sh) is a package manager for AI agent skills โ like npm for agent capabilities. Install skills from any public GitHub repo with `npx skills add <owner/repo>`.
|
|
208
|
+
|
|
209
|
+
The BizarHarness installer handles this automatically. To install manually:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
npm install -g skills
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Then discover and install skills:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
npx skills find # Browse the skills directory
|
|
219
|
+
npx skills add <owner/repo> # Install a skill from GitHub
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Available for all major AI coding agents including OpenCode, Claude Code, Cursor, Copilot, Gemini, and more.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## แ Skill Discovery
|
|
227
|
+
|
|
228
|
+
BizarHarness agents **proactively discover and install skills** during execution using the Skills CLI. When Heimdall, Thor, Tyr, or Vidarr receives a task, they:
|
|
229
|
+
|
|
230
|
+
1. **Assess** whether a skill might exist for the task (framework-specific work, domain tasks, tool usage)
|
|
231
|
+
2. **Check installed** with `skills list --json` to see what's already available
|
|
232
|
+
3. **Install from known repos** based on the task domain โ e.g., `skills add supabase/agent-skills --all -y` for database work, `skills add vercel-labs/agent-skills --all -y` for frontend
|
|
233
|
+
4. **Use** the skill's instructions at `~/.opencode/skills/<name>/SKILL.md` via the `skill` tool
|
|
234
|
+
|
|
235
|
+
This happens automatically and on-demand โ agents self-discover capabilities without manual configuration.
|
|
236
|
+
|
|
237
|
+
### Known Skill Repositories by Domain
|
|
238
|
+
|
|
239
|
+
| Domain | Repos |
|
|
240
|
+
|--------|-------|
|
|
241
|
+
| General (find-skills, skill-creator) | `vercel-labs/skills` |
|
|
242
|
+
| Frontend (React, a11y, web-design) | `vercel-labs/agent-skills`, `shadcn/ui` |
|
|
243
|
+
| Backend (Supabase, Postgres, auth) | `supabase/agent-skills` |
|
|
244
|
+
| Testing (TDD, E2E, Playwright) | `mattpocock/skills`, `microsoft/playwright-cli` |
|
|
245
|
+
| Design (frontend-design, UI/UX) | `anthropics/skills`, `leonxlnx/taste-skill` |
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## ๐ Provider Setup
|
|
254
|
+
|
|
255
|
+
After installation, run `/connect` in opencode to add API keys:
|
|
256
|
+
|
|
257
|
+
| Provider | Models | Auth |
|
|
258
|
+
|---|---|---|
|
|
259
|
+
| **OpenCode Zen** | `opencode/deepseek-v4-flash-free` | Free API key from [opencode.ai](https://opencode.ai) โ create account, get key, no charges |
|
|
260
|
+
| **minimax.io** | `minimax/MiniMax-M2.7`, `minimax/MiniMax-M3` | API key from [minimax.io](https://minimax.io) โ **no `baseURL` override** |
|
|
261
|
+
| **OpenAI** | `openai/gpt-5.5` | ChatGPT subscription (OAuth) |
|
|
262
|
+
|
|
263
|
+
Then run `/models` to verify connectivity.
|
|
264
|
+
|
|
265
|
+
> **Note:** Do not set `baseURL` on the minimax provider. The ai-sdk minimax provider uses its own default URL internally. Setting one causes 404 errors.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## ๐งญ Routing
|
|
270
|
+
|
|
271
|
+
| Task Type | Agent |
|
|
272
|
+
|---|---|
|
|
273
|
+
| Ambiguous or incomplete requests | @vรถr (free, asks clarifying questions) |
|
|
274
|
+
| File lookup, quick edits, boilerplate | @heimdall (free) |
|
|
275
|
+
| Codebase research, documentation analysis | @mimir (free, Semble-first) |
|
|
276
|
+
| Git commit, PR, merge, rebase, conflict resolution | @hermod (M2.7) |
|
|
277
|
+
| Moderate implementation, debugging, code review | @thor (M2.7) |
|
|
278
|
+
| Design systems, DESIGN.md, visual audits | @baldr (M2.7, plans only) |
|
|
279
|
+
| Complex features, architecture, deep debugging | @tyr (M3, audited by @forseti) |
|
|
280
|
+
| Stuck debugging, novel problems, postmortems | @vidarr (GPT-5.5, last resort) |
|
|
281
|
+
| Plan audit, adversarial review | @forseti (M3, edit: deny) |
|
|
282
|
+
|
|
283
|
+
**Cost escalation:** `Free โ $Mid (M2.7) โ $$High (M3) โ $$$Ultra (GPT-5.5)`
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## ๐ Self-Improvement
|
|
288
|
+
|
|
289
|
+
Every task records what was learned to `.bizar/AGENTS_SELF_IMPROVEMENT.md` at the project root. Odin reads it at session start and applies past patterns to current routing.
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
### 2026-06-16: Fixed routing issue
|
|
293
|
+
- **Context**: Odin was self-handling instead of routing
|
|
294
|
+
- **Lesson**: Stripped bash/glob/grep/edit from Odin โ forces delegation
|
|
295
|
+
- **Pattern**: Primary agents should never have executable tools
|
|
296
|
+
- **Agent**: heimdall
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## ๐ Plans
|
|
302
|
+
|
|
303
|
+
BizarHarness includes a built-in visual plan editor for drafting architectural decisions, feature designs, and project plans. Plans are stored as MDX source files with an auto-generated HTML viewer/editor.
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Create a new plan
|
|
307
|
+
bizar plan new my-feature
|
|
308
|
+
|
|
309
|
+
# Open an existing plan
|
|
310
|
+
bizar plan open my-feature
|
|
311
|
+
|
|
312
|
+
# List all plans
|
|
313
|
+
bizar plan list
|
|
314
|
+
|
|
315
|
+
# Export plan to standalone file
|
|
316
|
+
bizar plan export my-feature > my-feature.mdx
|
|
317
|
+
|
|
318
|
+
# Delete a plan (with confirmation)
|
|
319
|
+
bizar plan delete my-feature
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Plans are stored in `plans/<slug>/` with four files:
|
|
323
|
+
|
|
324
|
+
| File | Purpose | In git? |
|
|
325
|
+
|---|---|---|
|
|
326
|
+
| `plan.mdx` | Source content (the plan) | โ Yes |
|
|
327
|
+
| `plan.html` | Viewer/editor (auto-generated) | โ No |
|
|
328
|
+
| `comments.json` | Section comments | โ No |
|
|
329
|
+
| `meta.json` | Title, status, author, timestamps | โ Yes |
|
|
330
|
+
|
|
331
|
+
The HTML viewer runs a tiny local HTTP server (`localhost:4321`) โ no network, no sharing. Edit mode toggles all sections to textareas; comments appear in a side panel per section.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## ๐ค Contributing
|
|
336
|
+
|
|
337
|
+
PRs welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) first.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Development
|
|
342
|
+
|
|
343
|
+
Development of BizarHarness uses a separate sandbox repo for Docker/dev tooling.
|
|
344
|
+
See [DrB0rk/BizarHarness-dev](https://github.com/DrB0rk/BizarHarness-dev) (private)
|
|
345
|
+
for the local dev environment, including the Docker-based opencode sandbox used to
|
|
346
|
+
test config and plugin changes without touching the system opencode install.
|
|
347
|
+
|
|
348
|
+
> **Note:** When you push BizarHarness-dev to GitHub, update the URL above to match
|
|
349
|
+
> the actual repo location.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## ๐ License
|
|
354
|
+
|
|
355
|
+
MIT โ see [LICENSE](LICENSE).
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
<div align="center">
|
|
360
|
+
<small>
|
|
361
|
+
แฑแจแแ แนแแ ยท แแฒ แแฑแแแแแฑ<br>
|
|
362
|
+
<em>Rรกรฐe vel ยท ok prosper</em>
|
|
363
|
+
</small>
|
|
364
|
+
</div>
|
package/cli/audit.mjs
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { readFileSync, existsSync, readdirSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
|
|
5
|
+
const HOME = process.env.HOME || '/home/drb0rk';
|
|
6
|
+
const CONFIG_DIR = process.env.XDG_CONFIG_HOME
|
|
7
|
+
? join(process.env.XDG_CONFIG_HOME, 'opencode')
|
|
8
|
+
: join(HOME, '.config/opencode');
|
|
9
|
+
|
|
10
|
+
export async function runAudit() {
|
|
11
|
+
console.log(chalk.bold.hex('#ef4444')('\n โ BIZARHARNESS AUDIT โ\n'));
|
|
12
|
+
console.log(chalk.dim(' Scanning agent configuration for security and correctness issues...\n'));
|
|
13
|
+
|
|
14
|
+
const agentsDir = join(CONFIG_DIR, 'agents');
|
|
15
|
+
if (!existsSync(agentsDir)) {
|
|
16
|
+
console.log(chalk.yellow(' โ No agents directory found at', agentsDir));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const files = readdirSync(agentsDir).filter(f => f.endsWith('.md'));
|
|
21
|
+
let totalIssues = 0;
|
|
22
|
+
let totalWarnings = 0;
|
|
23
|
+
|
|
24
|
+
const issues = [];
|
|
25
|
+
const warnings = [];
|
|
26
|
+
|
|
27
|
+
for (const file of files) {
|
|
28
|
+
const content = readFileSync(join(agentsDir, file), 'utf-8');
|
|
29
|
+
const path = `agents/${file}`;
|
|
30
|
+
const lines = content.split('\n');
|
|
31
|
+
|
|
32
|
+
// Check 1: Dangerous bash permissions on review-only agents
|
|
33
|
+
if (file.includes('forseti') || file.includes('semble-search')) {
|
|
34
|
+
if (content.includes('bash: allow')) {
|
|
35
|
+
issues.push({ path, severity: 'HIGH', msg: 'Review-only agent has bash permission' });
|
|
36
|
+
}
|
|
37
|
+
if (content.includes('edit: allow')) {
|
|
38
|
+
issues.push({ path, severity: 'HIGH', msg: 'Review-only agent has edit permission โ should be edit: deny' });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Check 2: Frigg should never have edit/write
|
|
43
|
+
if (file.includes('frigg')) {
|
|
44
|
+
if (content.includes('edit: allow')) {
|
|
45
|
+
issues.push({ path, severity: 'HIGH', msg: 'Read-only Q&A agent (Frigg) has edit permission' });
|
|
46
|
+
}
|
|
47
|
+
if (content.includes('write: allow')) {
|
|
48
|
+
issues.push({ path, severity: 'HIGH', msg: 'Read-only Q&A agent (Frigg) has write permission' });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Check 3: Odin should have minimal permissions
|
|
53
|
+
if (file.includes('odin')) {
|
|
54
|
+
const dangerousForOdin = ['bash', 'edit', 'write', 'glob', 'grep', 'question'];
|
|
55
|
+
for (const tool of dangerousForOdin) {
|
|
56
|
+
if (content.includes(`${tool}: allow`)) {
|
|
57
|
+
issues.push({ path, severity: 'HIGH', msg: `Odin has ${tool} permission but should be pure router` });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Check 4: API keys in agent descriptions or content
|
|
63
|
+
const apiKeyPatterns = [
|
|
64
|
+
/sk-[a-zA-Z0-9]{20,}/g,
|
|
65
|
+
/api[-_]?key['":]?\s*['"][a-zA-Z0-9_\-]{16,}/gi,
|
|
66
|
+
/AIza[0-9A-Za-z\-_]{35}/g,
|
|
67
|
+
];
|
|
68
|
+
for (let i = 0; i < lines.length; i++) {
|
|
69
|
+
for (const pattern of apiKeyPatterns) {
|
|
70
|
+
const matches = lines[i].match(pattern);
|
|
71
|
+
if (matches) {
|
|
72
|
+
issues.push({ path, severity: 'CRITICAL', line: i + 1, msg: 'Possible API key exposed in agent content' });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Check 5: Model validation
|
|
78
|
+
const modelMatch = content.match(/^model:\s*(.+)$/m);
|
|
79
|
+
if (modelMatch) {
|
|
80
|
+
const model = modelMatch[1].trim();
|
|
81
|
+
const validModels = [
|
|
82
|
+
'opencode/deepseek-v4-flash-free',
|
|
83
|
+
'minimax/MiniMax-M2.7',
|
|
84
|
+
'minimax/MiniMax-M3',
|
|
85
|
+
'openai/gpt-5.5',
|
|
86
|
+
];
|
|
87
|
+
if (!validModels.includes(model)) {
|
|
88
|
+
warnings.push({ path, severity: 'WARN', msg: `Unknown model: ${model}` });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Check 6: Missing model field
|
|
93
|
+
if (!content.includes('model:')) {
|
|
94
|
+
warnings.push({ path, severity: 'WARN', msg: 'Missing model field' });
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Check 7: Missing description
|
|
98
|
+
if (!content.includes('description:')) {
|
|
99
|
+
warnings.push({ path, severity: 'WARN', msg: 'Missing description field' });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Check 8: AGENTS.md exists
|
|
104
|
+
const agentsMd = join(CONFIG_DIR, 'AGENTS.md');
|
|
105
|
+
if (!existsSync(agentsMd)) {
|
|
106
|
+
issues.push({ path: 'AGENTS.md', severity: 'HIGH', msg: 'AGENTS.md routing table not found' });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Check 9: Rules directory
|
|
110
|
+
const rulesDir = join(CONFIG_DIR, 'rules');
|
|
111
|
+
if (!existsSync(rulesDir)) {
|
|
112
|
+
warnings.push({ path: 'rules/', severity: 'WARN', msg: 'Rules directory not found' });
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Print results
|
|
116
|
+
for (const item of issues) {
|
|
117
|
+
totalIssues++;
|
|
118
|
+
const icon = item.severity === 'CRITICAL' ? '๐ฅ' : 'โ ';
|
|
119
|
+
const color = item.severity === 'CRITICAL' ? chalk.red : item.severity === 'HIGH' ? chalk.hex('#f59e0b') : chalk.yellow;
|
|
120
|
+
console.log(` ${icon} ${color(item.severity.padEnd(8))} ${chalk.dim(item.path)}${item.line ? chalk.dim(`:${item.line}`) : ''}`);
|
|
121
|
+
console.log(chalk.dim(` ${item.msg}`));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
for (const item of warnings) {
|
|
125
|
+
totalWarnings++;
|
|
126
|
+
console.log(` โ ${chalk.cyan('INFO'.padEnd(8))} ${chalk.dim(item.path)}`);
|
|
127
|
+
console.log(chalk.dim(` ${item.msg}`));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
console.log();
|
|
131
|
+
if (totalIssues === 0 && totalWarnings === 0) {
|
|
132
|
+
console.log(chalk.green(' โ No issues found. Configuration looks clean.\n'));
|
|
133
|
+
} else {
|
|
134
|
+
console.log(chalk[totalIssues > 0 ? 'red' : 'yellow'](
|
|
135
|
+
` Found ${totalIssues} issue(s) and ${totalWarnings} warning(s).\n`
|
|
136
|
+
));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const score = Math.max(0, Math.round(100 - (totalIssues * 15 + totalWarnings * 5)));
|
|
140
|
+
const scoreColor = score >= 90 ? chalk.green : score >= 70 ? chalk.hex('#f59e0b') : chalk.red;
|
|
141
|
+
console.log(chalk.bold(` Security Score: ${scoreColor(`${score}/100`)}\n`));
|
|
142
|
+
|
|
143
|
+
return { issues, warnings, score, totalIssues, totalWarnings };
|
|
144
|
+
}
|
package/cli/banner.mjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
const RUNE_HELM = `
|
|
4
|
+
โโโโโโโ โโโโโโ โโโ โโโโโโ โโโโโโโ
|
|
5
|
+
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
|
|
6
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
7
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
8
|
+
โโโโโโโโโโโ โโโโโโ โโโโโโ โโโ
|
|
9
|
+
โโโโโโโ โโโ โโโโโโ โโโโโโ โโโ
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
const PANTHEON = `
|
|
13
|
+
|
|
14
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
15
|
+
โ โ
|
|
16
|
+
โ แ Odin แ Mimir แน Heimdall โ
|
|
17
|
+
โ แฑ Hermod แฆ Thor แ Tyr โ
|
|
18
|
+
โ แ Vidarr แจ Forseti แ Baldr โ
|
|
19
|
+
โ โ
|
|
20
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export function showBanner() {
|
|
24
|
+
console.clear();
|
|
25
|
+
console.log(chalk.hex('#6366f1').bold(RUNE_HELM));
|
|
26
|
+
console.log(chalk.hex('#a855f7')(' Norse Pantheon Agent System for opencode'));
|
|
27
|
+
console.log();
|
|
28
|
+
console.log(chalk.dim(' 11 agents ยท 4 cost tiers ยท per-project Hindsight memory ยท RTK ยท Semble ยท Skills CLI'));
|
|
29
|
+
console.log();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function showPantheon() {
|
|
33
|
+
console.log(chalk.hex('#312e81')(PANTHEON));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function sectionHeading(text) {
|
|
37
|
+
const line = chalk.hex('#6366f1').bold(` โโ ${text} โโ`);
|
|
38
|
+
console.log();
|
|
39
|
+
console.log(line);
|
|
40
|
+
console.log();
|
|
41
|
+
}
|