@polderlabs/bizar 5.6.0-beta.4 → 5.6.0-beta.6

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.
Files changed (38) hide show
  1. package/README.md +254 -352
  2. package/bizar-dash/ARCHITECTURE.md +148 -30
  3. package/bizar-dash/dist/assets/{EnvVarsSection-Cm65-GMl.js → EnvVarsSection-DXM8gRm_.js} +1 -1
  4. package/bizar-dash/dist/assets/{EnvVarsSection-Cm65-GMl.js.map → EnvVarsSection-DXM8gRm_.js.map} +1 -1
  5. package/bizar-dash/dist/assets/{MobileChat-Cz-Bwlet.js → MobileChat-BnKN_Ks_.js} +1 -1
  6. package/bizar-dash/dist/assets/{MobileChat-Cz-Bwlet.js.map → MobileChat-BnKN_Ks_.js.map} +1 -1
  7. package/bizar-dash/dist/assets/{MobileSettings-Blo5pNCR.js → MobileSettings-DjCPxC-Q.js} +1 -1
  8. package/bizar-dash/dist/assets/{MobileSettings-Blo5pNCR.js.map → MobileSettings-DjCPxC-Q.js.map} +1 -1
  9. package/bizar-dash/dist/assets/main-DYiZqMrn.js +18 -0
  10. package/bizar-dash/dist/assets/main-DYiZqMrn.js.map +1 -0
  11. package/bizar-dash/dist/assets/{mobile-D05XoSPU.js → mobile-CMHqtLV2.js} +1 -1
  12. package/bizar-dash/dist/assets/{mobile-D05XoSPU.js.map → mobile-CMHqtLV2.js.map} +1 -1
  13. package/bizar-dash/dist/assets/mobile-layout-3jIhHX_p.js +2 -0
  14. package/bizar-dash/dist/assets/mobile-layout-3jIhHX_p.js.map +1 -0
  15. package/bizar-dash/dist/assets/{useSlashCommands-CwajjS-v.js → useSlashCommands-DtITw8Xv.js} +2 -2
  16. package/bizar-dash/dist/assets/{useSlashCommands-CwajjS-v.js.map → useSlashCommands-DtITw8Xv.js.map} +1 -1
  17. package/bizar-dash/dist/index.html +4 -4
  18. package/bizar-dash/dist/mobile.html +2 -2
  19. package/bizar-dash/src/web/App.tsx +2 -1
  20. package/bizar-dash/src/web/components/ArtifactViewer.tsx +2 -1
  21. package/bizar-dash/src/web/components/Notifications.tsx +3 -2
  22. package/bizar-dash/src/web/components/VoiceNotesPanel.tsx +3 -2
  23. package/bizar-dash/src/web/components/VoiceRecorder.tsx +4 -3
  24. package/bizar-dash/src/web/lib/logger.ts +30 -0
  25. package/bizar-dash/src/web/lib/ws.ts +6 -5
  26. package/bizar-dash/src/web/views/Activity.tsx +2 -1
  27. package/bizar-dash/src/web/views/Artifacts.tsx +2 -1
  28. package/bizar-dash/src/web/views/Settings.tsx +2 -1
  29. package/package.json +1 -1
  30. package/packages/sdk/ARCHITECTURE.md +19 -4
  31. package/packages/sdk/package.json +1 -1
  32. package/plugins/bizar/ARCHITECTURE.md +67 -15
  33. package/plugins/bizar/CONSTRAINTS.md +35 -7
  34. package/plugins/bizar/tests/README.md +99 -0
  35. package/bizar-dash/dist/assets/main-DXArCU3X.js +0 -18
  36. package/bizar-dash/dist/assets/main-DXArCU3X.js.map +0 -1
  37. package/bizar-dash/dist/assets/mobile-layout-D3aezTed.js +0 -2
  38. package/bizar-dash/dist/assets/mobile-layout-D3aezTed.js.map +0 -1
package/README.md CHANGED
@@ -2,18 +2,21 @@
2
2
 
3
3
  # BizarHarness ᛟ
4
4
 
5
- **Norse-pantheon multi-agent system for cline**
5
+ **Cline-based multi-agent coding harness with a closed learning loop.**
6
6
 
7
- 12 agents across 4 cost tiers. Odin routes, subagents execute, Forseti audits.
7
+ 13 agents across 4 cost tiers. Odin routes, subagents execute, Forseti audits.
8
+ ClineCore in-process — no subprocess, no port, no serve-info file.
8
9
 
9
- [![npm](https://img.shields.io/npm/v/bizar?color=cb3837)](https://www.npmjs.com/package/bizar)
10
- [![Headroom](https://img.shields.io/badge/headroom-integrated-8A2BE2)](https://github.com/headroomlabs-ai/headroom)
11
- [![Semble](https://img.shields.io/badge/semble-integrated-0ea5e9)](https://github.com/semble-ai/semble)
10
+ [![npm](https://img.shields.io/npm/v/@polderlabs/bizar?color=cb3837)](https://www.npmjs.com/package/@polderlabs/bizar)
11
+ [![v6.0.0](https://img.shields.io/badge/v6.0.0-Cline-6366f1)](https://github.com/DrB0rk/BizarHarness)
12
+ [![Cline](https://img.shields.io/badge/cline-%E2%9C%93-6366f1)](https://docs.cline.bot)
13
+ [![Audit 73/73](https://img.shields.io/badge/audit-73%2F73-10b981)](https://github.com/DrB0rk/BizarHarness)
14
+ [![Harness](https://img.shields.io/badge/harness-L01--L12-8A2BE2)](docs/INDEX.md)
15
+ [![Safety](https://img.shields.io/badge/safety-36%20patterns-ff6b6b)](docs/safety.md)
16
+ [![Mimir](https://img.shields.io/badge/mimir-deep--research-0ea5e9)](plugins/bizar/skills)
12
17
  [![Skills](https://img.shields.io/badge/skills.sh-integrated-f59e0b)](https://www.skills.sh)
18
+ [![Headroom](https://img.shields.io/badge/headroom-integrated-8A2BE2)](https://github.com/headroomlabs-ai/headroom)
13
19
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
14
- [![Cline](https://img.shields.io/badge/cline-%E2%9C%93-6366f1)](https://docs.cline.bot)
15
- [![Agents](https://img.shields.io/badge/agents-12-10b981)](#-the-pantheon)
16
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](CONTRIBUTING.md)
17
20
 
18
21
  `npm install @polderlabs/bizar` · `npx bizar`
19
22
 
@@ -23,423 +26,307 @@
23
26
 
24
27
  ## Table of Contents
25
28
 
29
+ - [What's new in v6.0.0](#-whats-new-in-v600)
30
+ - [Quick start](#-quick-start)
26
31
  - [The Pantheon](#-the-pantheon)
27
32
  - [Architecture](#-architecture)
28
- - [Installation](#-installation)
29
- - [Provider Setup](#-provider-setup)
30
- - [Skill Discovery](#-skill-discovery)
31
- - [Memory Service](#-memory-service)
32
- - [Routing](#-routing)
33
- - [Self-Improvement](#-self-improvement)
33
+ - [Tools (22 total)](#-tools-22-total)
34
+ - [Hooks (4 + 2 safety)](#-hooks-4--2-safety)
35
+ - [Safety — DANGEROUS_PATTERNS](#-safety--dangerous-patterns)
36
+ - [Skill Curator — closed learning loop](#-skill-curator--closed-learning-loop)
37
+ - [Knowledge Graph Tools](#-knowledge-graph-tools)
38
+ - [Harness engineering audit (73/73)](#-harness-engineering-audit-7373)
39
+ - [Documentation](#-documentation)
40
+ - [Migration from v5.5.x](#-migration-from-v55x)
34
41
  - [Contributing](#-contributing)
35
42
  - [License](#-license)
36
43
 
37
44
  ---
38
45
 
39
- ## The Pantheon
40
-
41
- ```
42
- ┌─────────────┐
43
- │ᛟ ODIN │
44
- ├─────────────┤
45
- │Router (M3) │
46
- └─────────────┘
47
-
48
- ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐
49
- │ᛢ VÖR │ │ᛗ MIMIR │ │ᚹ HEIMDALL│ │ᚱ HERMOD │ │ᚦ THOR │ │ᛒ BALDR │ │ᛏ TYR │ │ᛉ VIDARR │
50
- ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├──────────┤
51
- │Clarify │ │Research │ │Simple │ │GitOps │ │Medium │ │Design │ │Complex │ │Last │
52
- │DeepSeek │ │DeepSeek │ │DeepSeek │ │M2.7 │ │M2.7 │ │M2.7 │ │M3 │ │GPT-5.5 │
53
- │FREE │ │FREE │ │FREE │ │$ │ │$ │ │$ │ │$$ │ │$$$ │
54
- └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └──────────┘
55
-
56
- ┌─────────────┐
57
- │ᚨ FORSETI │
58
- ├─────────────┤
59
- │Auditor (M3) │
60
- │edit: deny │
61
- └─────────────┘
62
- ```
63
-
64
- > _Generated by PlantUML ASCII art (`plantuml -utxt`)_
65
-
66
- ### Agents
67
-
68
- | Agent | Rune | Model | Cost | Role |
69
- |---|---|---|---|---|
70
- | **Odin** | ᛟ | MiniMax M3 | $0.30/M · $1.20/M out | Primary router — never executes, only delegates |
71
- | **Frigg** | ᚠ | DeepSeek V4 Flash | **Free** | Read-only Q&A — ask questions, get answers, never modifies |
72
- | **Vör** | ᛢ | DeepSeek V4 Flash | **Free** | Clarifies ambiguous requests — asks questions until task is well-defined |
73
- | **Mimir** | ᛗ | DeepSeek V4 Flash | **Free** | Research & codebase exploration (Semble-first) |
74
- | **Heimdall** | ᚹ | DeepSeek V4 Flash | **Free** | Simple tasks, quick edits, file operations |
75
- | **Hermod** | ᚱ | MiniMax M2.7 | $0.30/M · $1.20/M out | Git & GitHub operations (commit, PR, merge, rebase) |
76
- | **Thor** | ᚦ | MiniMax M2.7 | $0.30/M · $1.20/M out | Moderate implementation, debugging, refactoring |
77
- | **Baldr** | ᛒ | MiniMax M2.7 | $0.30/M · $1.20/M out | UI/UX design system (DESIGN.md plans, visual audits) |
78
- | **Tyr** | ᛏ | MiniMax M3 | $0.30/M · $1.20/M out | Complex implementation, architecture, deep debugging |
79
- | **Vidarr** | ᛉ | GPT-5.5 | Subscription | Last resort — GPT-5.5 |
80
- | **Forseti** | ᚨ | MiniMax M3 | $0.30/M · $1.20/M out | Adversarial plan reviewer (edit: deny, audit-only) |
81
-
82
- ---
83
-
84
- ## ⚙ Architecture
46
+ ## What's new in v6.0.0
85
47
 
86
- ### Request Flow
48
+ v6.0.0 is a **complete rewrite** of the plugin framework from OpenCode
49
+ to Cline. The plugin embeds ClineCore in-process — no subprocess spawn,
50
+ no port, no password, no serve-info file. Plugin `setup()` returns in
51
+ ~3ms (was: 30s+ timeout).
87
52
 
88
- ```
89
- User Odin ᛟ Subagent Forseti
90
- │ │ │ │
91
- │─Request─>│ │ │
92
- │ │ │ │
93
- │ │─ Decompose ────│ │
94
- │ │ into parallel │ │
95
- │ │ streams │ │
96
- │ │ │ │
97
- │ │─ task ────────>│ │
98
- │ │─ task ────────>│ │
99
- │ │ │ │
100
- │ │ plan review (when complex)│
101
- │ │──────────────────────────────>│
102
- │ │ approve / changes required │
103
- │ │<──────────────────────────────│
104
- │ │ │ │
105
- │ │<─── results ───│ │
106
- │<─ synth ─│ │ │
107
- ```
53
+ | Feature | Description |
54
+ | --- | --- |
55
+ | **In-process ClineCore** | `ClineRuntime` wrapper replaces the subprocess. No port, no password. |
56
+ | **22 tools, 4 hooks** | All use `createTool()` from `@cline/sdk`. 0 compat shims. |
57
+ | **Cline agent teams** | New `bizar_spawn_team` + `bizar_team_status` tools. |
58
+ | **Knowledge graph tools** | New `bizar_graph_query/path/explain` over `.bizar/graph/graph.json`. |
59
+ | **DANGEROUS_PATTERNS gate** | 36 patterns (25 deny + 11 require-approval) checked in `beforeTool`. |
60
+ | **Skill curator** | Per-skill use/failure tracking. The differentiator (1/106 projects). |
61
+ | **Pre-compaction memory flush** | Durable snapshot before summarizer. Closes the durability gap. |
62
+ | **In-process memory vault** | Tools read/write `~/.bizar_memory/` directly. No dashboard needed. |
63
+ | **Harness audit 73/73** | Full L01–L12 compliance. `make check-arch` enforces 7 rules. |
64
+ | **Removed: Plugins view** | Use **Mods** only. v5.6.0-beta.3. |
108
65
 
109
- **Key behaviors:**
110
- - **Odin never executes work** — stripped of `bash`, `glob`, `grep`, `edit`, `write`, `question`
111
- - **Vör handles ambiguity** — Odin cannot ask questions; routes unclear requests to Vör
112
- - **Always parallel** — every request splits into 2+ simultaneous `task` calls
113
- - **Implementation splits across Thor + Tyr** frontend/backend, file split, impl+tests
114
- - **Forseti gates all Tier 4/5 work** — Tyr and Vidarr plans audited before execution
115
- - **Bizar Memory Service** — local Obsidian-compatible Markdown + Git-shared sync. Three namespaces: `projects/<id>/`, `global/bizar/`, `users/<id>/`. No external memory service required.
66
+ See the full [CHANGELOG.md](CHANGELOG.md) for v5.6.0-beta.1 → beta.4.
116
67
 
117
68
  ---
118
69
 
119
- ## 🚀 Installation
120
-
121
- ### Quick — npm (recommended)
122
-
123
- Published on [npmjs.com/package/bizar](https://www.npmjs.com/package/bizar).
124
-
125
- Run without installing:
126
-
127
- ```bash
128
- npx bizar
129
- ```
130
-
131
- Or install globally:
132
-
133
- ```bash
134
- npm install -g @polderlabs/bizar
135
- bizar
136
- ```
137
-
138
- Or add to a project:
70
+ ## 🚀 Quick start
139
71
 
140
72
  ```bash
73
+ # Install (stable v5.5.6)
141
74
  npm install @polderlabs/bizar
142
- npx bizar
143
- ```
144
-
145
- The interactive installer walks you through component selection, agent choice, install mode, API key setup, and auto-restarts cline.
146
-
147
- > **v4.0.0:** `@polderlabs/bizar` is now a single package — the dashboard server, the cline plugin, and the typed SDK all ship inside it. No more separate `@polderlabs/bizar-dash` install.
148
75
 
149
- > **Windows users:** the `npm install -g @polderlabs/bizar` command above is the recommended path on Windows. The installer uses `irm | iex` for uv, `py -m pip` for the pip fallback, `taskkill` for forced kills, and JS `setTimeout` instead of `sleep` — so it works on both Windows PowerShell and POSIX shells. See the [Windows](#-windows) section below for prerequisites, known limitations, and the optional graph feature install.
76
+ # Or try the v6.0.0 beta (Cline rewrite)
77
+ npm install @polderlabs/bizar@beta
150
78
 
151
- ### Source — git clone (Linux/macOS contributors)
152
-
153
- ```bash
154
- git clone git@github.com:DrB0rk/BizarHarness.git
155
- cd BizarHarness
156
- chmod +x install.sh
157
- ./install.sh
79
+ # Run
80
+ npx bizar
158
81
  ```
159
82
 
160
- Copies agent definitions and config to `~/.config/cline/`, merges `cline.json`, and prints next steps. Use this if you want to hack on BizarHarness itself.
161
-
162
- > This `install.sh` script is bash-only and does **not** run on Windows natively. Windows contributors should use the npm path above instead.
83
+ The installer handles:
163
84
 
164
- ### Windows
85
+ - Cloning the dashboard repo
86
+ - Configuring the Cline plugin
87
+ - Setting up Semble (code search MCP) and Skills CLI
88
+ - Headroom (token-saving proxy)
165
89
 
166
- The `bizar` CLI is cross-platform — the npm install runs a Node.js installer that handles `curl | sh` redirects, signal handling, and temp paths on Windows PowerShell automatically.
90
+ If you'd rather install manually, see
91
+ [docs/migration-guide.md](docs/migration-guide.md).
167
92
 
168
- **Prerequisites**
169
-
170
- - [Node.js 18+](https://nodejs.org/) on `PATH`
171
- - [Python 3.10+](https://www.python.org/downloads/windows/) (only required for the optional `bizar graph` knowledge-graph feature)
172
- - [Git for Windows](https://git-scm.com/download/win) — only needed if you want to run the bash `install.sh` from a Git Bash shell
173
-
174
- **Install**
175
-
176
- ```powershell
177
- npm install -g @polderlabs/bizar
178
- bizar
179
- ```
180
-
181
- **Optional: graph feature (knowledge graph + per-project .bizar/)**
182
-
183
- The `bizar graph build` subcommand uses [graphify](https://github.com/bretbhomas/graphify). Install uv and graphify from PowerShell:
93
+ ---
184
94
 
185
- ```powershell
186
- # Install uv (Python package manager) — Windows-native PowerShell installer
187
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
95
+ ## ᛉ The Pantheon
188
96
 
189
- # Install graphify
190
- uv tool install graphifyy
191
97
  ```
192
-
193
- Then build the project graph from any repo:
194
-
195
- ```powershell
196
- bizar graph build
98
+ ┌─────────────┐
99
+ │ᛟ ODIN │
100
+ ├─────────────┤
101
+ │Router (M3) │
102
+ └─────────────┘
103
+ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐
104
+ │ᛢ VÖR │ │ᛗ MIMIR │ │ᚹ HEIMDALL│ │ᚱ HERMOD │ │ᚦ THOR │ │ᛒ BALDR │ │ᛏ TYR │ │ᛉ VIDARR │
105
+ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├─────────┤ ├──────────┤
106
+ │Clarifier│ │Research │ │Simple │ │Git ops │ │Mid impl │ │Design │ │High impl│ │Reasoning │
107
+ │(M2.7) │ │(M2.7) │ │(M2.7) │ │(M2.7) │ │(M2.7) │ │(M2.7) │ │(M3) │ │(M3-Reason)│
108
+ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └──────────┘
109
+ ↑ ↑
110
+ Forseti audits Forseti audits
111
+ all Tier 4/5 work
197
112
  ```
198
113
 
199
- **Known Windows limitations**
200
-
201
- - The `blessed` TUI library may render with quirks inside Windows Terminal; if you see garbled output in the TUI, use the browser UI via `bizar dash start --bg` and open http://localhost:4321 instead.
202
- - Some shell scripts under `config/skills/embedded-esp-idf/` are bash-only and require Git Bash (or WSL).
203
- - The bash `install.sh` does not run on Windows cmd/PowerShell; use the `npm install -g` path above.
204
- - Headroom ships a Python/npm installer. On Windows, install it manually: `pip install "headroom-ai[all]"` or `npm install -g headroom-ai`, then run `headroom wrap cline`.
205
-
206
- ### Prerequisites
207
-
208
- - [cline CLI](https://docs.cline.bot) installed and on `$PATH`
209
- - Provider connections (via `/connect` in cline TUI)
210
- - [Headroom](https://github.com/headroomlabs-ai/headroom) (recommended) — CLI proxy that reduces LLM token consumption by 60-90%
211
- - [Semble](https://github.com/semble-ai/semble) (recommended) — AI-powered code search (used by Mimir agent)
212
- - [Skills CLI](https://www.skills.sh) (recommended) — Agent skill package manager (`npx skills add <owner/repo>`)
213
-
214
- ### Headroom Setup
114
+ Odin is the only primary agent. Every request hits him first. He
115
+ **never executes work** — he decomposes into parallel streams and
116
+ dispatches to subagents. The Forseti gate audits all Tier 4/5 work
117
+ (Tyr, Vidarr) before execution.
215
118
 
216
- [Headroom](https://github.com/headroomlabs-ai/headroom) 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`.
119
+ See [plugins/bizar/ARCHITECTURE.md](plugins/bizar/ARCHITECTURE.md) for
120
+ the full agent roster and routing rules.
217
121
 
218
- Install:
122
+ ---
219
123
 
220
- ```bash
221
- # Python (recommended)
222
- pip install "headroom-ai[all]"
124
+ ## ⚙ Architecture
223
125
 
224
- # npm
225
- npm install -g headroom-ai
226
126
  ```
227
-
228
- Enable for cline:
229
-
230
- ```bash
231
- headroom wrap cline
127
+ ┌────────────────────────────────────────────────────────────────────┐
128
+ Layer 1: UI (bizar-dash/) │
129
+ │ - React + TypeScript dashboard (17 tabs) │
130
+ │ - Express server (HTTP + WS) │
131
+ │ - In-process ClineCore via @cline/sdk (replaces cline serve) │
132
+ │ - Harness engineering dashboard view │
133
+ │ - Kanban board (5 columns + backlog) │
134
+ └────────────────────────────────────────────────────────────────────┘
135
+ ↕ HTTP REST + WebSocket
136
+ ┌────────────────────────────────────────────────────────────────────┐
137
+ │ Layer 0: Core (plugins/bizar/) │
138
+ │ - Cline plugin entry (AgentPlugin from @cline/sdk) │
139
+ │ - 22 tools + 4 hooks + 1 approval gate │
140
+ │ - In-process ClineRuntime (wraps ClineCore.create()) │
141
+ │ - In-process memory vault │
142
+ │ - DANGEROUS_PATTERNS approval gate │
143
+ │ - Skill curator (closed learning loop) │
144
+ │ - Pre-compaction memory flush │
145
+ └────────────────────────────────────────────────────────────────────┘
146
+ ↕ Cline SDK
147
+ ┌────────────────────────────────────────────────────────────────────┐
148
+ │ Substrate: ClineCore (@cline/core) │
149
+ │ - In-process runtime, no subprocess │
150
+ │ - startSession / send / abort / subscribe │
151
+ │ - Session storage, model dispatch, agent team tools │
152
+ └────────────────────────────────────────────────────────────────────┘
232
153
  ```
233
154
 
234
- After setup, `headroom wrap cline` injects config into `cline.json` and starts a proxy. The LLM receives compact output, saving 60-90% on token costs. The wrapping is durable — all subsequent cline sessions route through the headroom proxy.
235
-
236
- ### Semble Setup
237
-
238
- [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.
155
+ See [docs/architecture.md](docs/architecture.md) for the full layer
156
+ model, module map, and inter-component contracts.
239
157
 
240
- The BizarHarness installer handles this automatically. To install manually:
241
-
242
- ```bash
243
- # Install uv if not present
244
- curl -LsSf https://astral.sh/uv/install.sh | sh
245
-
246
- # Install Semble with MCP support
247
- uv tool install "semble[mcp]"
248
- ```
249
-
250
- ### Skills CLI Setup
158
+ ---
251
159
 
252
- [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>`.
160
+ ## 🛠 Tools (22 total)
253
161
 
254
- The BizarHarness installer handles this automatically. To install manually:
162
+ | Category | Count | Tools |
163
+ | --- | --- | --- |
164
+ | **Background agents** | 9 | `bizar_spawn_background`, `bizar_status`, `bizar_collect`, `bizar_kill`, `bizar_pause`, `bizar_resume`, `bizar_send_message`, `bizar_get_comments`, `bizar_report_progress` |
165
+ | **Memory** | 4 | `bizar_memory_list`, `bizar_memory_read`, `bizar_memory_write`, `bizar_memory_search` |
166
+ | **Plan / Glyphs** | 4 | `bizar_plan_action`, `bizar_open_kb`, `bizar_wait_for_feedback`, `bizar_read_glyph_feedback` |
167
+ | **Cline agent teams** | 2 | `bizar_spawn_team`, `bizar_team_status` |
168
+ | **Knowledge graph** | 3 | `bizar_graph_query`, `bizar_graph_path`, `bizar_graph_explain` |
169
+ | **Total** | **22** | All use `createTool` from `@cline/sdk` directly |
255
170
 
256
- ```bash
257
- npm install -g skills
258
- ```
171
+ ---
259
172
 
260
- Then discover and install skills:
173
+ ## 🪝 Hooks (4 + 2 safety)
261
174
 
262
- ```bash
263
- npx skills find # Browse the skills directory
264
- npx skills add <owner/repo> # Install a skill from GitHub
265
- ```
175
+ | Hook | Purpose |
176
+ | --- | --- |
177
+ | `beforeTool` | Loop guard + **DANGEROUS_PATTERNS gate** |
178
+ | `afterTool` | Per-tool-call log to `LogWriter` |
179
+ | `beforeModel` | **Pre-compaction memory flush** (writes snapshot to vault) |
180
+ | `onEvent` | `message-added` (slash commands) + `run-finished`/`run-failed` (memory write) |
266
181
 
267
- Available for all major AI coding agents including Cline, Claude Code, Cursor, Copilot, Gemini, and more.
182
+ | Safety component | Purpose |
183
+ | --- | --- |
184
+ | `skill-curator` (manual) | Reports skill usage + flags revisions |
185
+ | `memory-flush-on-compact` (auto) | Writes snapshot to vault when `shouldCompact()` returns true |
268
186
 
269
187
  ---
270
188
 
271
- ## Skill Discovery
272
-
273
- BizarHarness agents **proactively discover and install skills** during execution using the Skills CLI. When Heimdall, Thor, Tyr, or Vidarr receives a task, they:
189
+ ## 🛡 Safety — DANGEROUS_PATTERNS
274
190
 
275
- 1. **Assess** whether a skill might exist for the task (framework-specific work, domain tasks, tool usage)
276
- 2. **Check installed** with `skills list --json` to see what's already available
277
- 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
278
- 4. **Use** the skill's instructions at `~/.cline/skills/<name>/SKILL.md` via the `skill` tool
191
+ **36 patterns** checked on every tool call. 25 deny + 11 require-approval.
279
192
 
280
- This happens automatically and on-demand — agents self-discover capabilities without manual configuration.
193
+ | Category | Examples |
194
+ | --- | --- |
195
+ | **Filesystem destruction** | `rm -rf /`, `rm -rf /etc`, `mkfs`, `dd of=/dev/sda`, fork bomb |
196
+ | **Privilege escalation** | `sudo`, `su - root`, `chmod 777`, `chown root` |
197
+ | **SSRF** | `http://169.254.169.254/*` (AWS metadata), `metadata.google.internal`, `metadata.azure.com` |
198
+ | **Process control** | `kill -9 1`, `shutdown`, `reboot`, `init 0` |
199
+ | **Sensitive file reads** | `~/.ssh/`, `~/.aws/credentials`, `~/.config/gcloud`, `/proc/<pid>/environ` |
200
+ | **Network exfiltration** | `wget ... \| sh`, `curl ... \| sh` |
201
+ | **Dangerous git** | `git push --force origin main`, `git reset --hard`, `git clean -fd` |
202
+ | **Prompt injection** | `ignore previous instructions`, `reveal your system prompt` |
281
203
 
282
- ### Known Skill Repositories by Domain
204
+ **Always-on.** No env var to disable. Source patterns from
205
+ [Hermes](https://github.com/walkinglabs/awesome-harness-engineering) +
206
+ [OpenFang](https://github.com/RightNow-AI/openfang) +
207
+ [OpenClaw](https://github.com/openclaw/openclaw).
283
208
 
284
- | Domain | Repos |
285
- |--------|-------|
286
- | General (find-skills, skill-creator) | `vercel-labs/skills` |
287
- | Frontend (React, a11y, web-design) | `vercel-labs/agent-skills`, `shadcn/ui` |
288
- | Backend (Supabase, Postgres, auth) | `supabase/agent-skills` |
289
- | Testing (TDD, E2E, Playwright) | `mattpocock/skills`, `microsoft/playwright-cli` |
290
- | Design (frontend-design, UI/UX) | `anthropics/skills`, `leonxlnx/taste-skill` |
209
+ See [docs/safety.md](docs/safety.md) for the full reference.
291
210
 
292
211
  ---
293
212
 
213
+ ## 🧠 Skill Curator — closed learning loop
294
214
 
215
+ **The differentiator.** Of 106 cataloged agent-harness projects, exactly
216
+ one (Hermes Agent) has this. Bizar is now the second.
295
217
 
296
- ---
218
+ Tracks per-skill use/failure in `~/.bizar/skills/usage.jsonl`:
297
219
 
298
- ## 🧠 Memory Service
220
+ ```ts
221
+ import { recordSkillUse, generateCuratorReport } from "bizar/hooks/skill-curator";
299
222
 
300
- The **Bizar Memory Service** is a local-first, file-based memory subsystem that replaces the previously-disabled Hindsight MCP. Notes are Obsidian-compatible Markdown with strict YAML frontmatter, stored in a Git-managed vault, and synced via standard `git pull/push/commit`. No external API keys, no external service, no network calls.
223
+ recordSkillUse("pump-then-test", "failure");
224
+ recordSkillUse("pump-then-test", "failure");
225
+ const report = generateCuratorReport({ worktree, logger });
226
+ // { totalSkills: 14, needsRevision: 1, stale: 0, ... }
227
+ ```
301
228
 
302
- ### Architecture (three-layer model)
229
+ The closed loop:
303
230
 
304
231
  ```
305
- ┌─────────────────────────────────────────────┐
306
- Layer 1: Markdown is truth │ ← canonical store
307
- │ .obsidian/ or ~/.local/share/bizar/… │ (frontmatter + body)
308
- ├─────────────────────────────────────────────┤
309
- Layer 2: Git is collaboration │ ← sync + version control
310
- │ bizar memory pull / commit / push / sync │ (branches, conflict)
311
- ├─────────────────────────────────────────────┤
312
- │ Layer 3: LightRAG is derived index (P2) │ ← semantic retrieval
313
- │ bizar memory reindex │ (stub in Phase 1)
314
- └─────────────────────────────────────────────┘
232
+ Tasks run → recordSkillUse(skill, success|failure)
233
+ usage.jsonl accumulates
234
+ → generateCuratorReport() identifies:
235
+ - skills with 5+ failures (needs-revision)
236
+ - skills with 0 uses in 30 days (stale)
237
+ - new skills (proposals)
238
+ → next sprint addresses the report
315
239
  ```
316
240
 
317
- The LightRAG layer ships as a stub in Phase 1 (`bizar memory reindex` returns a "not yet implemented" notice) and will be wired into the existing `mods-examples/lightrag/` server in Phase 2. The Markdown layer is the canonical source of truth — reindexing rebuilds the index from Markdown at any time, never the other way around.
318
-
319
- ### Modes
320
-
321
- | Mode | Vault location | Cross-project sharing | Default? |
322
- |---|---|---|---|
323
- | `local-only` | `<project>/.obsidian/` | No — per-project vault | **Yes** |
324
- | `managed` | `~/.local/share/bizar/memory/<repoName>/` | Yes — one shared repo with three namespaces | Opt-in |
325
-
326
- Pick `managed` at `bizar init` time, or run `bizar memory link ~/.local/share/bizar/memory/<repoName>/` to convert an existing project to managed mode.
327
-
328
- ### Namespaces
329
-
330
- The `managed` repo is split into three top-level directories. Every note lives in exactly one:
331
-
332
- | Namespace | Purpose | Example path |
333
- |---|---|---|
334
- | `projects/<projectId>/` | Per-project memory — conventions, ADRs, bugs, commands | `projects/bizarharness/architecture_decision__lightrag-stub.md` |
335
- | `global/bizar/` | Cross-project knowledge — agent patterns, Bizar internals | `global/bizar/coding_convention__plan-then-forseti.md` |
336
- | `users/<userId>/` | Personal scratch — user preferences, todos, draft thoughts | `users/drb0rk/user_preference__tabs-not-spaces.md` |
337
-
338
- ### CLI commands
339
-
340
- The `bizar memory <sub>` family has 11 subcommands:
341
-
342
- | Subcommand | Purpose | Example |
343
- |---|---|---|
344
- | `init` | Create `.bizar/memory.json` and the per-project vault | `bizar memory init --memory-mode local-only` |
345
- | `status` | Show mode, link target, dirty files, last sync | `bizar memory status` |
346
- | `link <path>` | Bind the project to a managed memory repo | `bizar memory link ~/.local/share/bizar/memory/work/` |
347
- | `unlink` | Detach from managed mode (vault stays on disk) | `bizar memory unlink` |
348
- | `pull` | `git pull` the linked memory repo | `bizar memory pull` |
349
- | `commit` | Stage dirty notes + run secret scan + `git commit` | `bizar memory commit -m "add auth ADR"` |
350
- | `push` | `git push` the linked memory repo | `bizar memory push` |
351
- | `sync` | pull → reindex → commit → push (the common path) | `bizar memory sync` |
352
- | `reindex` | Rebuild the derived LightRAG index (Phase 2 stub) | `bizar memory reindex` |
353
- | `conflicts` | List notes with merge conflicts awaiting resolution | `bizar memory conflicts` |
354
- | `doctor` | Run schema + secrets + Git health checks | `bizar memory doctor` |
355
-
356
- ### Dashboard routes
357
-
358
- The dashboard exposes 18 REST endpoints under `/api/memory/*` for note CRUD, schema validation, secret scanning, Git sync, search, and health checks. The legacy `/api/obsidian/*` routes are preserved with back-compat response shapes.
359
-
360
- ### Secrets and schema
361
-
362
- Every note passing through `bizar memory sync` is scanned against 12 secret patterns (HIGH/MEDIUM). HIGH-severity matches block the commit; MEDIUM matches warn but allow. Required frontmatter is 8 fields (`memory_id`, `type`, `project_id`, `status`, `confidence`, `created`, `updated`, `tags`); 11 memory types are recognized, 6 statuses, 3 confidence levels.
241
+ See [docs/curator.md](docs/curator.md) for the full reference.
363
242
 
364
243
  ---
365
244
 
366
- ## 🔑 Provider Setup
367
-
368
- After installation, run `/connect` in cline to add API keys:
245
+ ## 🕸 Knowledge Graph Tools
369
246
 
370
- | Provider | Models | Auth |
371
- |---|---|---|
372
- | **Cline Zen** | `cline/deepseek-v4-flash-free` | Free API key from [cline.ai](https://docs.cline.bot) — create account, get key, no charges |
373
- | **MiniMax (direct)** | `minimax/MiniMax-M2.7`, `minimax/MiniMax-M3` | API key from [MiniMax](https://platform.minimaxi.com) |
374
- | **OpenAI** | `openai/gpt-5.5` | ChatGPT subscription (OAuth) |
247
+ Three tools expose the existing `.bizar/graph/graph.json` (built by
248
+ `graphify`) to agents:
375
249
 
376
- Then run `/models` to verify connectivity.
250
+ | Tool | Use case |
251
+ | --- | --- |
252
+ | `bizar_graph_query` | Substring search across node id, label, source file |
253
+ | `bizar_graph_path` | BFS shortest path between two nodes |
254
+ | `bizar_graph_explain` | Natural-language node summary with neighbors |
377
255
 
378
- ---
379
-
380
- ## 🧭 Routing
256
+ The BizarHarness project graph has **814 nodes** (mostly code
257
+ symbols + docs). Path queries work once `graphify` adds edges.
381
258
 
382
- | Task Type | Agent |
383
- |---|---|
384
- | Ambiguous or incomplete requests | @vör (free, asks clarifying questions) |
385
- | File lookup, quick edits, boilerplate | @heimdall (free) |
386
- | Codebase research, documentation analysis | @mimir (free, Semble-first) |
387
- | Git commit, PR, merge, rebase, conflict resolution | @hermod (M2.7) |
388
- | Moderate implementation, debugging, code review | @thor (M2.7) |
389
- | Design systems, DESIGN.md, visual audits | @baldr (M2.7, plans only) |
390
- | Complex features, architecture, deep debugging | @tyr (M3, audited by @forseti) |
391
- | Stuck debugging, novel problems, postmortems | @vidarr (GPT-5.5, last resort) |
392
- | Plan audit, adversarial review | @forseti (M3, edit: deny) |
393
-
394
- **Cost escalation:** `Free → $Mid (M2.7) → $$High (M3) → $$$Ultra (GPT-5.5)`
259
+ See [docs/graph-tools.md](docs/graph-tools.md) for the full reference.
395
260
 
396
261
  ---
397
262
 
398
- ## 📝 Self-Improvement
399
-
400
- 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.
263
+ ## 🛡 Harness engineering audit (73/73)
264
+
265
+ v6.0.0 passes the full L01–L12 audit at **73/73 = 100%**:
266
+
267
+ | Subsystem | Score |
268
+ | --- | --- |
269
+ | 1. Instructions | 11/11 (entry + hard constraints + state files + clock-in/out) |
270
+ | 2. Tools | 2/2 (`.claude/settings.json` + MCP integrations) |
271
+ | 3. Environment | 5/5 (lockfile + `.nvmrc` + Makefile + setup + dev) |
272
+ | 4. State | 4/4 (`PROGRESS.md` + `DECISIONS.md` + `feature_list.json`) |
273
+ | 5. Feedback | 7/7 (`make check/test/e2e/clean-check/arch/vcr/session-*`) |
274
+ | 6. L05 Cross-session | 6/6 (Current State + clock-in/out + context anxiety) |
275
+ | 7. L03 System of record | 4/4 (ACID: Durability, Consistency, Atomicity, Proximity) |
276
+ | 8. L07 WIP=1 + VCR | 3/3 (WIP=1 + `make vcr` + VCR 20/20 = 1.0) |
277
+ | 9. L08 Feature list | 6/6 (evidence + verify-feature + granularity + state machine) |
278
+ | 10. L09 DoD | 5/5 (3-layer verification + runtime signals + repair instructions) |
279
+ | 11. L10 E2E + Arch | 8/8 (`make e2e` + `make check-arch` + 7 arch rules + E2E requirement) |
280
+ | 12. L11 Observability | 7/7 (sprint contract + rubric + session-trace + make session-*) |
281
+ | 13. L12 Clean State | 5/5 (5-dimension checklist + clean-check + quality doc + dual-mode) |
401
282
 
283
+ ```bash
284
+ bash tools/audit-harness.sh .
285
+ # Total: 73 / 73 harness components present
286
+ # Critical: 7 / 7
287
+ # Recommended: 66 / 66
402
288
  ```
403
- ### 2026-06-16: Fixed routing issue
404
- - **Context**: Odin was self-handling instead of routing
405
- - **Lesson**: Stripped bash/glob/grep/edit from Odin — forces delegation
406
- - **Pattern**: Primary agents should never have executable tools
407
- - **Agent**: heimdall
408
- ```
409
-
410
- ---
411
289
 
412
- ## 📋 Plans
290
+ See [PROGRESS.md](PROGRESS.md) § Current State and the
291
+ [Harness tab](bizar-dash/src/web/views/Harness.tsx) in the dashboard.
413
292
 
414
- 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.
415
-
416
- ```bash
417
- # Create a new plan
418
- bizar plan new my-feature
419
-
420
- # Open an existing plan
421
- bizar plan open my-feature
293
+ ---
422
294
 
423
- # List all plans
424
- bizar plan list
295
+ ## 📚 Documentation
296
+
297
+ | What | Where |
298
+ | --- | --- |
299
+ | **Documentation index** | [docs/INDEX.md](docs/INDEX.md) |
300
+ | Entry point (agents) | [AGENTS.md](AGENTS.md) |
301
+ | Current state | [PROGRESS.md](PROGRESS.md) |
302
+ | Decisions (ADRs) | [DECISIONS.md](DECISIONS.md) |
303
+ | Architecture | [docs/architecture.md](docs/architecture.md) |
304
+ | Safety | [docs/safety.md](docs/safety.md) |
305
+ | Skill curator | [docs/curator.md](docs/curator.md) |
306
+ | Graph tools | [docs/graph-tools.md](docs/graph-tools.md) |
307
+ | Quality scores | [docs/quality-document.md](docs/quality-document.md) |
308
+ | Migration guide | [docs/migration-guide.md](docs/migration-guide.md) |
309
+ | Plugin module | [plugins/bizar/ARCHITECTURE.md](plugins/bizar/ARCHITECTURE.md) |
310
+ | Plugin constraints | [plugins/bizar/CONSTRAINTS.md](plugins/bizar/CONSTRAINTS.md) |
311
+ | Dashboard module | [bizar-dash/ARCHITECTURE.md](bizar-dash/ARCHITECTURE.md) |
312
+ | SDK module | [packages/sdk/ARCHITECTURE.md](packages/sdk/ARCHITECTURE.md) |
313
+ | Changelog | [CHANGELOG.md](CHANGELOG.md) |
425
314
 
426
- # Export plan to standalone file
427
- bizar plan export my-feature > my-feature.mdx
315
+ ---
428
316
 
429
- # Delete a plan (with confirmation)
430
- bizar plan delete my-feature
431
- ```
317
+ ## 🔄 Migration from v5.5.x
432
318
 
433
- Plans are stored in `plans/<slug>/` with four files:
319
+ Upgrading from the OpenCode-based v5.5.x? See
320
+ [docs/migration-guide.md](docs/migration-guide.md) for:
434
321
 
435
- | File | Purpose | In git? |
436
- |---|---|---|
437
- | `plan.mdx` | Source content (the plan) | ✓ Yes |
438
- | `plan.html` | Viewer/editor (auto-generated) | ✗ No |
439
- | `comments.json` | Section comments | ✗ No |
440
- | `meta.json` | Title, status, author, timestamps | ✓ Yes |
322
+ - Breaking changes (tool shape, hook shape)
323
+ - New tools (Cline agent teams, graph tools, curator)
324
+ - Removed tools (Plugins Mods)
325
+ - Verification commands
441
326
 
442
- 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.
327
+ TL;DR: `npm install @polderlabs/bizar@beta` and update any custom
328
+ slash commands that consumed the old `{ output: JSON.stringify(...) }`
329
+ shape.
443
330
 
444
331
  ---
445
332
 
@@ -447,17 +334,23 @@ The HTML viewer runs a tiny local HTTP server (`localhost:4321`) — no network,
447
334
 
448
335
  PRs welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) first.
449
336
 
450
- ---
337
+ The harness engineering protocol:
451
338
 
452
- ## Development
339
+ 1. **Before:** Fill [templates/sprint-contract.md](templates/sprint-contract.md)
340
+ (scope, DoD, exclusions).
341
+ 2. **During:** Run `make session-start` to record session start.
342
+ 3. **After:** Score against [templates/evaluator-rubric.md](templates/evaluator-rubric.md)
343
+ (every dim B+).
344
+ 4. **End of session:** Run `make clean-check` and `make check`. Commit
345
+ with a WHY-focused message.
453
346
 
454
- Development of BizarHarness uses a separate sandbox repo for Docker/dev tooling.
455
- See [DrB0rk/BizarHarness-dev](https://github.com/DrB0rk/BizarHarness-dev) (private)
456
- for the local dev environment, including the Docker-based cline sandbox used to
457
- test config and plugin changes without touching the system cline install.
347
+ ### Development
458
348
 
459
- > **Note:** When you push BizarHarness-dev to GitHub, update the URL above to match
460
- > the actual repo location.
349
+ Development of BizarHarness uses a separate sandbox repo for Docker/dev
350
+ tooling. See [DrB0rk/BizarHarness-dev](https://github.com/DrB0rk/BizarHarness-dev)
351
+ (private) for the local dev environment, including the Docker-based
352
+ Cline sandbox used to test config and plugin changes without touching
353
+ the system Cline install.
461
354
 
462
355
  ---
463
356
 
@@ -467,6 +360,15 @@ MIT — see [LICENSE](LICENSE).
467
360
 
468
361
  ---
469
362
 
363
+ ## Acknowledgments
364
+
365
+ Inspired by the [walkinglabs/learn-harness-engineering](https://github.com/walkinglabs/learn-harness-engineering)
366
+ course and the [awesome-harness-engineering](https://github.com/walkinglabs/awesome-harness-engineering)
367
+ curated list. Built on [Cline](https://docs.cline.bot) and
368
+ [@cline/sdk](https://www.npmjs.com/package/@cline/sdk).
369
+
370
+ ---
371
+
470
372
  <div align="center">
471
373
  <small>
472
374
  ᚱᚨᛞᛖ ᚹᛖᛚ · ᛟᚲ ᛈᚱᛟᛋᛈᛖᚱ<br>