@polderlabs/bizar 10.7.0 → 10.7.2

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 (148) hide show
  1. package/.claude/agents/_shared/AGENT_BASELINE.md +266 -0
  2. package/.claude/agents/_shared/CLAUDE_TOOLS.md +412 -0
  3. package/.claude/agents/_shared/SKILLS.md +109 -0
  4. package/.claude/agents/brand-designer.md +55 -0
  5. package/.claude/agents/exec-assistant.md +34 -0
  6. package/.claude/agents/help-desk.md +44 -0
  7. package/.claude/agents/it-lead.md +53 -0
  8. package/.claude/agents/knowledge-manager.md +49 -0
  9. package/.claude/agents/office-coordinator.md +39 -0
  10. package/.claude/agents/office-greeter.md +53 -0
  11. package/.claude/agents/office-manager.md +287 -0
  12. package/.claude/agents/principal-engineer.md +58 -0
  13. package/.claude/agents/qa-reviewer.md +51 -0
  14. package/.claude/agents/research-analyst.md +53 -0
  15. package/.claude/agents/senior-engineer.md +55 -0
  16. package/.claude/agents/support-tech.md +87 -0
  17. package/.claude/agents/vp-engineering.md +54 -0
  18. package/.claude/commands/audit.md +48 -0
  19. package/.claude/commands/bizar.md +22 -0
  20. package/.claude/commands/cron.md +36 -0
  21. package/.claude/commands/explain.md +17 -0
  22. package/.claude/commands/goal.md +99 -0
  23. package/.claude/commands/init.md +15 -0
  24. package/.claude/commands/learn.md +46 -0
  25. package/.claude/commands/plan.md +35 -0
  26. package/.claude/commands/plow-through.md +50 -0
  27. package/.claude/commands/pr-review.md +49 -0
  28. package/.claude/commands/setup-provider.md +96 -0
  29. package/.claude/commands/spec.md +47 -0
  30. package/.claude/commands/sprint.md +43 -0
  31. package/.claude/commands/tailscale-serve.md +100 -0
  32. package/.claude/commands/team.md +132 -0
  33. package/.claude/commands/test.md +62 -0
  34. package/.claude/commands/validate.md +68 -0
  35. package/.claude/commands/visual-plan.md +24 -0
  36. package/.claude/hooks/README.md +108 -0
  37. package/.claude/hooks/__tests__/pretooluse-editwrite.test.mjs +146 -0
  38. package/.claude/hooks/__tests__/sessionend-recall.test.mjs +256 -0
  39. package/.claude/hooks/__tests__/sessionstart-prime.test.mjs +325 -0
  40. package/.claude/hooks/__tests__/thinking-route.test.mjs +319 -0
  41. package/.claude/hooks/auto-instinct.sh +81 -0
  42. package/.claude/hooks/learning-extract.mjs +92 -0
  43. package/.claude/hooks/post-merge-audit.sh +93 -0
  44. package/.claude/hooks/posttooluse-editwrite.mjs +91 -0
  45. package/.claude/hooks/pretooluse-bash.mjs +87 -0
  46. package/.claude/hooks/pretooluse-editwrite.mjs +117 -0
  47. package/.claude/hooks/sessionend-recall.mjs +384 -0
  48. package/.claude/hooks/sessionstart-prime.mjs +278 -0
  49. package/.claude/hooks/thinking-route.mjs +314 -0
  50. package/.claude/hooks/worker-suggest.mjs +110 -0
  51. package/.claude/settings.json +167 -0
  52. package/.claude/skills/9router/SKILL.md +80 -0
  53. package/.claude/skills/9router-chat/SKILL.md +73 -0
  54. package/.claude/skills/9router-embeddings/SKILL.md +69 -0
  55. package/.claude/skills/9router-image/SKILL.md +86 -0
  56. package/.claude/skills/9router-stt/SKILL.md +79 -0
  57. package/.claude/skills/9router-tts/SKILL.md +80 -0
  58. package/.claude/skills/9router-web-fetch/SKILL.md +99 -0
  59. package/.claude/skills/9router-web-search/SKILL.md +91 -0
  60. package/.claude/skills/agent-browser/SKILL.md +64 -0
  61. package/.claude/skills/bizar/README.md +9 -0
  62. package/.claude/skills/bizar/SKILL.md +447 -0
  63. package/.claude/skills/cpp-coding-standards/README.md +28 -0
  64. package/.claude/skills/cpp-coding-standards/SKILL.md +634 -0
  65. package/.claude/skills/cpp-coding-standards/references/concurrency.md +320 -0
  66. package/.claude/skills/cpp-coding-standards/references/error-handling.md +229 -0
  67. package/.claude/skills/cpp-coding-standards/references/memory-safety.md +216 -0
  68. package/.claude/skills/cpp-coding-standards/references/modern-idioms.md +282 -0
  69. package/.claude/skills/cpp-coding-standards/references/review-checklist.md +96 -0
  70. package/.claude/skills/cpp-testing/README.md +28 -0
  71. package/.claude/skills/cpp-testing/SKILL.md +304 -0
  72. package/.claude/skills/cpp-testing/references/coverage.md +370 -0
  73. package/.claude/skills/cpp-testing/references/framework-compare.md +175 -0
  74. package/.claude/skills/cpp-testing/references/host-test-for-embedded.md +499 -0
  75. package/.claude/skills/cpp-testing/references/mocking.md +364 -0
  76. package/.claude/skills/cpp-testing/references/tdd-workflow.md +308 -0
  77. package/.claude/skills/cubesandbox/SKILL.md +148 -0
  78. package/.claude/skills/de-sloppify/SKILL.md +38 -0
  79. package/.claude/skills/de-sloppify/cleanup.mjs +253 -0
  80. package/.claude/skills/de-sloppify/cleanup.test.mjs +189 -0
  81. package/.claude/skills/embedded-esp-idf/README.md +41 -0
  82. package/.claude/skills/embedded-esp-idf/SKILL.md +439 -0
  83. package/.claude/skills/embedded-esp-idf/references/freertos-patterns.md +214 -0
  84. package/.claude/skills/embedded-esp-idf/references/host-tests.md +164 -0
  85. package/.claude/skills/embedded-esp-idf/references/idf-py-commands.md +157 -0
  86. package/.claude/skills/embedded-esp-idf/references/kconfig.md +159 -0
  87. package/.claude/skills/embedded-esp-idf/references/logging-discipline.md +118 -0
  88. package/.claude/skills/embedded-esp-idf/references/memory-and-iram.md +137 -0
  89. package/.claude/skills/embedded-esp-idf/references/nvs.md +121 -0
  90. package/.claude/skills/embedded-esp-idf/references/packed-structs.md +192 -0
  91. package/.claude/skills/embedded-esp-idf/scripts/idf_env.sh +47 -0
  92. package/.claude/skills/embedded-esp-idf/scripts/size_check.sh +77 -0
  93. package/.claude/skills/glyph/SKILL.md +163 -0
  94. package/.claude/skills/harness-engineering/SKILL.md +142 -0
  95. package/.claude/skills/lightrag/SKILL.md +81 -0
  96. package/.claude/skills/memory-protocol/SKILL.md +105 -0
  97. package/.claude/skills/obsidian/SKILL.md +306 -0
  98. package/.claude/skills/read-the-damn-docs/SKILL.md +113 -0
  99. package/.claude/skills/self-improvement/SKILL.md +64 -0
  100. package/.claude/skills/skillopt/SKILL.md +129 -0
  101. package/.claude/skills/thinking-archetypes/SKILL.md +90 -0
  102. package/.claude/skills/thinking-bayesian/SKILL.md +267 -0
  103. package/.claude/skills/thinking-bounded-rationality/SKILL.md +406 -0
  104. package/.claude/skills/thinking-circle-of-competence/SKILL.md +216 -0
  105. package/.claude/skills/thinking-cynefin/SKILL.md +70 -0
  106. package/.claude/skills/thinking-debiasing/SKILL.md +192 -0
  107. package/.claude/skills/thinking-dual-process/SKILL.md +282 -0
  108. package/.claude/skills/thinking-effectuation/SKILL.md +366 -0
  109. package/.claude/skills/thinking-feedback-loops/SKILL.md +464 -0
  110. package/.claude/skills/thinking-fermi-estimation/SKILL.md +263 -0
  111. package/.claude/skills/thinking-first-principles/SKILL.md +167 -0
  112. package/.claude/skills/thinking-five-whys-plus/SKILL.md +139 -0
  113. package/.claude/skills/thinking-inversion/SKILL.md +195 -0
  114. package/.claude/skills/thinking-jobs-to-be-done/SKILL.md +363 -0
  115. package/.claude/skills/thinking-kepner-tregoe/SKILL.md +154 -0
  116. package/.claude/skills/thinking-leverage-points/SKILL.md +390 -0
  117. package/.claude/skills/thinking-lindy-effect/SKILL.md +331 -0
  118. package/.claude/skills/thinking-map-territory/SKILL.md +111 -0
  119. package/.claude/skills/thinking-margin-of-safety/SKILL.md +330 -0
  120. package/.claude/skills/thinking-model-combination/SKILL.md +406 -0
  121. package/.claude/skills/thinking-model-router/SKILL.md +360 -0
  122. package/.claude/skills/thinking-model-selection/SKILL.md +341 -0
  123. package/.claude/skills/thinking-occams-razor/SKILL.md +129 -0
  124. package/.claude/skills/thinking-ooda/SKILL.md +127 -0
  125. package/.claude/skills/thinking-opportunity-cost/SKILL.md +360 -0
  126. package/.claude/skills/thinking-pre-mortem/SKILL.md +170 -0
  127. package/.claude/skills/thinking-probabilistic/SKILL.md +324 -0
  128. package/.claude/skills/thinking-red-team/SKILL.md +142 -0
  129. package/.claude/skills/thinking-regret-minimization/SKILL.md +335 -0
  130. package/.claude/skills/thinking-reversibility/SKILL.md +326 -0
  131. package/.claude/skills/thinking-scientific-method/SKILL.md +162 -0
  132. package/.claude/skills/thinking-second-order/SKILL.md +184 -0
  133. package/.claude/skills/thinking-socratic/SKILL.md +198 -0
  134. package/.claude/skills/thinking-steel-manning/SKILL.md +332 -0
  135. package/.claude/skills/thinking-systems/SKILL.md +238 -0
  136. package/.claude/skills/thinking-theory-of-constraints/SKILL.md +338 -0
  137. package/.claude/skills/thinking-thought-experiment/SKILL.md +354 -0
  138. package/.claude/skills/thinking-triz/SKILL.md +171 -0
  139. package/.claude/skills/thinking-via-negativa/SKILL.md +358 -0
  140. package/bizar-dash/skills/publishing/SKILL.md +2 -1
  141. package/cli/install/postinstall.mjs +54 -28
  142. package/cli/install/postinstall.test.mjs +98 -0
  143. package/cli/provision.mjs +29 -0
  144. package/install.sh +7 -0
  145. package/package.json +7 -2
  146. package/scripts/git-hooks/__tests__/commit-msg.test.mjs +61 -0
  147. package/scripts/git-hooks/commit-msg +38 -0
  148. package/scripts/install-hooks.sh +9 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Run the Bizar harness audit — scores 12 dimensions 0-10, aggregates to 0-100.
3
+ allowed-tools: Read, Write, Bash
4
+ ---
5
+
6
+ # /audit — Harness Self-Audit
7
+
8
+ Run the harness audit: `node scripts/audit.mjs --write`.
9
+ The script scores 12 categories (each 0-10), aggregates to a 0-100 score,
10
+ and writes `.harness/audit/latest.json`.
11
+
12
+ ## Categories scored
13
+
14
+ | Category | Weight | What it checks |
15
+ |---|---|---|
16
+ | typecheck | 15% | `bunx tsc --noEmit` exits 0 |
17
+ | tests | 12% | `make test` exits 0 |
18
+ | e2e | 12% | `bun run scripts/bh-full-e2e.mjs` exits 0 |
19
+ | arch-boundaries | 8% | `bash scripts/check-arch.sh .` passes |
20
+ | security-patterns | 10% | No hardcoded keys, no overly broad allowed-tools |
21
+ | doc-sync | 5% | AGENTS.md and CLAUDE.md are in sync |
22
+ | feature-list-state | 10% | No `not_started` backlog, all passing features have evidence |
23
+ | clean-state | 8% | No `console.log`, `debugger`, or `.only()` in production code |
24
+ | perf-budget | 5% | No single file exceeds 2000 lines |
25
+ | coverage | 5% | Coverage tooling configured (stub — add c8 to upgrade) |
26
+ | observability | 5% | sessions.jsonl + arch-rules.json exist |
27
+ | drift | 5% | Score differs from prior run |
28
+
29
+ ## Output
30
+
31
+ ```
32
+ {version, startedAt, completedAt, total, scores, categories, weights}
33
+ ```
34
+
35
+ - `categories[key].evidence` — human-readable explanation of the score
36
+ - `categories[key].score` — 0-10 for that dimension
37
+ - `total` — weighted sum, 0-100
38
+ - `.harness/audit/latest.json` — persisted result (written with `--write`)
39
+
40
+ ## Usage
41
+
42
+ ```
43
+ /audit — print JSON score to stdout (no file written)
44
+ /audit --write — print JSON and write .harness/audit/latest.json
45
+ make audit — same as --write with a summary line
46
+ ```
47
+
48
+ Run it, then read the evidence strings to understand which categories need attention.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Bizar Plugin Menu — route to the right Bizar action based on the user's request.
3
+ ---
4
+
5
+ # Bizar Dashboard
6
+
7
+ The `/bizar` command launches the Bizar dashboard in your browser — a fully integrated workspace with Overview, Chat, Agents, Plans, Projects, Config, and Settings panels. The dashboard binds to `127.0.0.1` only and runs as a local Express + WebSocket server on a free port (preferred: 4321).
8
+
9
+ If the user invoked `/bizar` with arguments, treat them as a request and route appropriately:
10
+
11
+ - "explain X" → invoke `/explain X`
12
+ - "plan Y" → invoke `/visual-plan on` and then `/plan new <slug>` with the user's intent as the slug
13
+ - "review PR" → invoke `/pr-review`
14
+ - "audit" → invoke `/audit`
15
+ - "learn" → invoke `/learn`
16
+ - "init" → invoke `/init`
17
+ - "dashboard" or "open dashboard" → `/bizar` (no args, will launch the dashboard)
18
+ - Otherwise: ask one clarifying question
19
+
20
+ If the user invoked `/bizar` with no arguments, the dashboard is launching in the background. Visit `http://localhost:<port>/` to access it. The plugin's `chat.message` hook spawns `bizar dash start` as a detached child process and surfaces the live URL in its response.
21
+
22
+ Common ports: 4321 is preferred; if it's taken, the launcher walks upward and picks the next free port. The PID and port are recorded under `~/.config/bizar/dashboard.{pid,port}` so `bizar dash stop` and `bizar dash status` can find the running instance.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Manage scheduled cron tasks for autonomous agent runs.
3
+ allowed-tools: Read, Write, Bash, WebFetch
4
+ ---
5
+
6
+ # /cron — Scheduled Autonomous Tasks
7
+
8
+ Manage cron tasks that run on a schedule using the Bizar SDK cron API.
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /cron add <cron-expression> <prompt> — Schedule a recurring task (e.g. "/cron add 0 * * * * Check email")
14
+ /cron add-once <cron-expression> <prompt> — Schedule a one-time task
15
+ /cron list — List all scheduled tasks
16
+ /cron remove <id> — Remove a task by its ID
17
+ ```
18
+
19
+ ## Routing
20
+
21
+ - If the user wants to add a task → `/cron add <cron> <prompt>` or `/cron add-once <cron> <prompt>`
22
+ - If the user wants to list tasks → `/cron list`
23
+ - If the user wants to remove a task → `/cron remove <id>`
24
+
25
+ ## Implementation Notes
26
+
27
+ Use the SDK cron API:
28
+ ```
29
+ import { addCronTask, listCronTasks, removeCronTask } from "@polderlabs/bizar-sdk/agent/cron";
30
+ ```
31
+
32
+ - `addCronTask({ cron, prompt, recurring })` — add a task
33
+ - `listCronTasks()` — returns all tasks
34
+ - `removeCronTask(id)` — removes by id, returns true if found
35
+
36
+ Tasks are persisted to `.bizar/cron.json` in the project root.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Route to @susan for read-only codebase Q&A. She will explore the code and answer without making any changes.
3
+ ---
4
+
5
+ # /explain — Read-Only Codebase Q&A
6
+
7
+ The user is asking a question about the codebase. Use the **Agent tool** to dispatch to a read-only research subagent — name it `susan` if that agent exists, otherwise use the `general-purpose` or `Explore` subagent type with explicit read-only instructions.
8
+
9
+ The subagent must:
10
+ 1. Use only read tools (`Read`, `Grep`, `Glob`, `Bash` with read-only commands)
11
+ 2. Never edit, write, or modify any file
12
+ 3. Explore the codebase to find the answer
13
+ 4. Return a concise, cited answer with file:line references
14
+
15
+ If the user supplied an argument via `$ARGUMENTS`, treat that as the question. If `$ARGUMENTS` is empty, ask one clarifying question before dispatching.
16
+
17
+ Pass `$ARGUMENTS` (or the refined question) to the subagent's prompt verbatim. Do not include any write or destructive tool in the subagent's allowed list.
@@ -0,0 +1,99 @@
1
+ ---
2
+ description: Add or update a long-horizon goal in .bizar/PROGRESS.md — same source-of-truth as the v8 dashboard Goals view.
3
+ ---
4
+
5
+ # Goal — Track a Long-Horizon Commitment
6
+
7
+ You are in `/goal` mode. The user has invoked this command to add or
8
+ update a **goal** in `.bizar/PROGRESS.md`. This file is the single
9
+ source of truth for goals — both the dashboard's Goals view and
10
+ Claude Code's `/goal` slash command read from and write to it.
11
+
12
+ ## Contract
13
+
14
+ - **Goals live in `.bizar/PROGRESS.md`** in the active project root.
15
+ Parse the current file first so you don't clobber existing goals.
16
+ - **Round-trip via the dashboard API.** The dashboard server is the
17
+ canonical writer — it owns the parsing + serialization logic
18
+ (`bizar-dash/src/server/progress-parser.mjs`) and broadcasts a
19
+ `goals:change` WebSocket event so the dashboard updates live. **Do
20
+ not edit PROGRESS.md directly** unless the dashboard is down.
21
+ - **Use the dashboard's HTTP API by default.** Resolve the dashboard
22
+ port from `${BIZAR_HOME}/dashboard.port` (default
23
+ `~/.config/bizar/dashboard.port` per `cli/install/paths.mjs:49`),
24
+ then POST/PATCH. This keeps goals in lock-step with whatever the
25
+ dashboard user is looking at.
26
+
27
+ ## API surface (S10/S12)
28
+
29
+ ```
30
+ GET /api/goals # list all parsed goals
31
+ POST /api/goals { title, owner?, due? } # create
32
+ GET /api/goals/:id # single goal
33
+ PATCH /api/goals/:id { title?, owner?, due? } # rename / reassign / re-due
34
+ PATCH /api/goals/:id/status { status } # on-track | at-risk | done | blocked | active
35
+ POST /api/goals/:id/key-results { title } # append KR
36
+ PATCH /api/goals/:id/key-results/:krId { title?, done? } # toggle / rename
37
+ DELETE /api/goals/:id/key-results/:krId # remove KR
38
+ ```
39
+
40
+ ## Examples
41
+
42
+ ### Add a goal
43
+
44
+ ```bash
45
+ PORT=$(jq -r .port ~/.cache/bizarharness/dash-auth.json)
46
+ curl -s -X POST http://127.0.0.1:$PORT/api/goals \
47
+ -H "Content-Type: application/json" \
48
+ -d '{"title":"Ship current dashboard","owner":"sam","due":"2026-09-30"}'
49
+ ```
50
+
51
+ ### Change a goal's status to at-risk
52
+
53
+ ```bash
54
+ curl -s -X PATCH http://127.0.0.1:$PORT/api/goals/G-abc123/status \
55
+ -H "Content-Type: application/json" \
56
+ -d '{"status":"at-risk"}'
57
+ ```
58
+
59
+ ### Add a key result
60
+
61
+ ```bash
62
+ curl -s -X POST http://127.0.0.1:$PORT/api/goals/G-abc123/key-results \
63
+ -H "Content-Type: application/json" \
64
+ -d '{"title":"Cut S9 polish time in half"}'
65
+ ```
66
+
67
+ ### Mark a key result done
68
+
69
+ ```bash
70
+ curl -s -X PATCH http://127.0.0.1:$PORT/api/goals/G-abc123/key-results/KR-xyz \
71
+ -H "Content-Type: application/json" \
72
+ -d '{"done":true}'
73
+ ```
74
+
75
+ ## When the dashboard is unreachable
76
+
77
+ Fallback path: write directly to `<active-project>/.bizar/PROGRESS.md`
78
+ using the format the parser understands:
79
+
80
+ ```markdown
81
+ ## G-<id> — <Title>
82
+ Owner: <name> · Due: <YYYY-MM-DD>
83
+ Goal is **<status>**.
84
+
85
+ - [ ] <key-result title>
86
+ - [x] <done key-result title>
87
+ ```
88
+
89
+ Then when the dashboard comes back up, `GET /api/goals` re-parses the
90
+ file and broadcasts a `goals:change` event to refresh the UI.
91
+
92
+ ## Background: why this exists
93
+
94
+ `/goal` was added in S12 of the dashboard rewrite. Before this,
95
+ goals lived only in the user's head and `FINAL_GOAL.md` (which is the
96
+ user's own planning doc, not the harness's tracker). This command
97
+ makes goals a **first-class dashboard entity** — they appear in the
98
+ Goals view, the Overview stat tile, the Activity feed, and the
99
+ command palette.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Run bizar init to detect project stack, install relevant skills, and create .bizar/PROJECT.md.
3
+ allowed-tools: Read, Bash, Write, Glob
4
+ ---
5
+
6
+ # /init — Initialize `.bizar/` in the current project
7
+
8
+ Run `bizar init` from the project root to:
9
+ 1. Detect the project stack (language, framework, database, tools)
10
+ 2. Install relevant skills from the skills registry
11
+ 3. Create `.bizar/PROJECT.md` with stack and conventions
12
+ 4. Create `.bizar/AGENTS_SELF_IMPROVEMENT.md` (only if missing)
13
+ 5. Build the per-project knowledge graph in `.bizar/graph/` (powered by graphify; skipped gracefully if graphify is not installed)
14
+
15
+ After init, run `bizar doctor` to validate setup.
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Pillar D — review instincts and decisions from the self-learning log, ask user what to save/promote/drop.
3
+ allowed-tools: AskUserQuestion, Read, Write, Bash
4
+ ---
5
+
6
+ # /learn — Self-Learning Review
7
+
8
+ You are the `brenda` (self-improvement) agent. Review the instincts and
9
+ decisions that have been recorded, then ask the user what to do.
10
+
11
+ ## Sources
12
+
13
+ - Instinct log: `.bizar/learning/instincts.jsonl` (or via SDK: `listInstincts()`)
14
+ - Decisions log: `.bizar/learning/decisions.jsonl` (or via SDK: `listDecisions()`)
15
+ - Session traces: `.harness/traces/sessions.jsonl`
16
+
17
+ ## Process
18
+
19
+ 1. Read recent instincts (`listInstincts()` or read the JSONL directly).
20
+ 2. Read recent decisions (`listDecisions()` or read the JSONL directly).
21
+ 3. Read `.harness/traces/sessions.jsonl` for recent session outcomes.
22
+ 4. Ask the user one question per category via `AskUserQuestion`:
23
+
24
+ a) **New instinct?** — "You ran `make check` N times. Save a low-confidence
25
+ instinct for it?" → if yes, call `recordInstinct({ trigger, action, confidence: 0.3, evidence: [...], scope: 'project' })`
26
+
27
+ b) **Promote existing?** — "An instinct for `npm install` has confidence 0.3.
28
+ Promote it to 0.6?" → if yes, call `promoteInstinct(id, 0.6)`
29
+
30
+ c) **Drop stale?** — "An instinct for `git push` (confidence 0.1) hasn't
31
+ fired in N sessions. Drop it?" → if yes, call `dropInstinct(id)`
32
+
33
+ 5. Summarise what was saved, promoted, or dropped.
34
+
35
+ ## SDK Functions
36
+
37
+ ```ts
38
+ import { recordInstinct, listInstincts, promoteInstinct, dropInstinct } from '@polderlabs/bizar-sdk/learning';
39
+ // or monorepo path: packages/sdk/dist/learning/instincts.js
40
+ ```
41
+
42
+ ## Constraints
43
+
44
+ - Use `AskUserQuestion` (one per category, not one per item).
45
+ - Do NOT use `console.log` — write to the instincts/decisions log only.
46
+ - Confidence is 0–1. Auto-recorded instincts use 0.3 (low confidence, user-promotable).
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: Open the Bizar visual plan canvas or manage existing plans.
3
+ allowed-tools: Read, Write, Bash, WebFetch
4
+ ---
5
+
6
+ # /plan — Visual Plan Canvas
7
+
8
+ Open or manage a Bizar visual plan. Plans are collaborative canvases for structuring work across agents.
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /plan new <slug> [template] — Create a new plan with a unique slug
14
+ /plan list — List all existing plans
15
+ /plan open <slug> — Open a plan (returns the canvas URL)
16
+ /plan get <slug> — Get full plan content as JSON
17
+ /plan add <slug> --title "..." — Add a new element to a plan
18
+ /plan update <slug> <id> ... — Update an element's content/title/status
19
+ /plan delete <slug> <id> — Delete an element from a plan
20
+ /plan comment <slug> [id] "..." — Add a comment to a plan or element
21
+ /plan comments <slug> [id] — List comments on a plan or element
22
+ /plan status <slug> <status> — Set plan status (draft|approved|rejected|in-progress|done)
23
+ /plan wait <slug> — Block until the plan receives feedback
24
+ ```
25
+
26
+ ## Routing
27
+
28
+ - If the user wants to create a new plan → `/plan new <slug>`
29
+ - If the user wants to see existing plans → `/plan list`
30
+ - If the user wants to open/view a plan → `/plan open <slug>`
31
+ - If the user wants to add content to a plan → `/plan add <slug> --title "..."`
32
+ - If the user wants to modify a plan element → `/plan update <slug> <id> ...`
33
+ - If the user wants to discuss/approve/reject → `/plan status <slug> <status>`
34
+
35
+ The full arguments are available as `$ARGUMENTS`. Parse them and route to the matching subcommand above.
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Autonomous mode — work fully independently, make all decisions, complete the task end-to-end without asking the user anything.
3
+ ---
4
+
5
+ # Plow Through — Autonomous Mode
6
+
7
+ You are in `/plow-through` mode. The user has invoked this command to tell you: **work autonomously, don't ask, decide things yourself, complete the task end-to-end.**
8
+
9
+ ## Contract
10
+
11
+ - **No clarifying questions.** If the request is ambiguous, use the most reasonable interpretation based on project context. If you genuinely cannot proceed without user input (e.g., a destructive action requiring explicit authorization), log the blocker in your final report and continue with everything else.
12
+ - **Decide things yourself.** Use your judgment. Read `.bizar/PROJECT.md`, `FINAL_GOAL.md`, `ROADMAP.md`, and search the memory vault (`bizar memory search "<topic>"`) for prior context before deciding.
13
+ - **Split into parallel work streams.** Always dispatch 2+ subagents in parallel when the work is decomposable. Each stream must have a disjoint file scope. Use the **Agent tool** to spawn subagents — name them after the Bizar agent they represent (`todd`, `karen`, `greg`, `steve`, etc.) so the audit trail stays readable.
14
+ - **Work to completion.** Don't stop at "I did X, should I continue?". The task is complete when: the deliverable exists, tests pass, changes are committed and pushed (where applicable).
15
+ - **Report at the end.** Summarize what was done, what tests ran, any blockers encountered.
16
+
17
+ ## Background agents for long-running work
18
+
19
+ Use the **Agent tool** with `run_in_background: true` (or the
20
+ dashboard UI) to spawn background agents for tasks that span more
21
+ than a few minutes. Check on them later via the dashboard's
22
+ Background Agents panel or by sending a message to the teammate
23
+ agent.
24
+
25
+ ## When to use
26
+
27
+ - Multi-file refactors that don't require user approval
28
+ - Bug-fix sweeps across a known surface area
29
+ - Implementing a clearly-spec'd feature from the roadmap
30
+ - Migration tasks (e.g., "migrate all CSS from @apply to vanilla")
31
+ - Cleanup work (rename X, delete dead code Y, etc.)
32
+
33
+ ## When NOT to use
34
+
35
+ - Anything that touches auth, billing, or destructive operations on user data
36
+ - Architectural decisions with multiple valid approaches (use `/plan` first)
37
+ - Tasks where you genuinely need user input on a key decision
38
+ - Anything where being wrong has high consequences (merges to main, security patches)
39
+
40
+ ## Execution pattern
41
+
42
+ 1. Read project context (`.bizar/PROJECT.md`, `FINAL_GOAL.md`, `ROADMAP.md`)
43
+ 2. Search memory for prior context (`bizar memory search "<topic>"`)
44
+ 3. Decompose into independent work streams
45
+ 4. Dispatch streams via the **Agent tool** in parallel, naming them `todd` and `karen` (or whichever Bizar agents fit the scope)
46
+ 5. After streams return: run test gate (`bizar test-gate` or `/test`)
47
+ 6. Fix any test failures
48
+ 7. Update self-improvement log (`.bizar/AGENTS_SELF_IMPROVEMENT.md`)
49
+ 8. Commit + push (delegate to the `steve` subagent)
50
+ 9. Report final outcome
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: PR review mode. Launch @greg (research) and @linda (audit) in parallel, then post the combined review as a PR comment.
3
+ allowed-tools: Read, Grep, Glob, Bash, WebFetch
4
+ ---
5
+
6
+ # /pr-review — PR Review
7
+
8
+ You are the `steve` agent running PR review mode. The full
9
+ arguments are available as `$ARGUMENTS` — expect a PR number, URL,
10
+ or branch name.
11
+
12
+ ## Protocol
13
+
14
+ 1. Resolve the PR. If `$ARGUMENTS` is empty, prompt for a PR
15
+ number. Use `gh pr view <ref>` to fetch the metadata.
16
+
17
+ 2. Dispatch two **parallel** subagents via the **Agent tool**:
18
+ - **`greg` (research)** — trace the diff's blast radius:
19
+ - Files changed and their blast radius
20
+ - Related call sites / consumers that might break
21
+ - Historical context (search `bizar memory search "<feature>"`)
22
+ - Tests that should have run
23
+ - **`linda` (audit)** — security and correctness review:
24
+ - Permission grants added or expanded
25
+ - Hardcoded secrets or PII
26
+ - Race conditions, TOCTOU, unbounded loops
27
+ - Missing input validation at trust boundaries
28
+
29
+ Spawn both in a **single message** with two Agent tool calls so
30
+ they run in parallel. Pass each agent a disjoint scope (the
31
+ research agent reads, the audit agent reads + flags).
32
+
33
+ 3. Synthesize. Wait for both subagents to finish, then combine:
34
+ - Verdict (`approve`, `request changes`, `comment`)
35
+ - Blocking issues (must-fix before merge)
36
+ - Non-blocking suggestions
37
+ - Test plan
38
+
39
+ 4. Post the review as a PR comment via `gh pr review <ref>
40
+ --comment --body-file -` (or `--approve` / `--request-changes`).
41
+
42
+ 5. Return the review summary to the user with the PR URL.
43
+
44
+ ## Constraints
45
+
46
+ - Never merge on the user's behalf. Only post a review.
47
+ - If the diff is huge (>1000 lines), narrow scope by file and
48
+ dispatch one subagent per logical chunk.
49
+ - Always cite `file:line` for each finding.
@@ -0,0 +1,96 @@
1
+ ---
2
+ description: Configure a provider in settings.json (apiKey, baseUrl, model catalog). The installer no longer touches provider config — use this command to set one up.
3
+ allowed-tools: Read, Write, Bash, WebFetch
4
+ ---
5
+
6
+ # /setup-provider — Configure a provider in settings.json
7
+
8
+ The Bizar installer no longer configures a provider for you (since
9
+ v6.2.2 — the user owns provider config). Use this command to add
10
+ or update a provider in `~/.claude/settings.json`.
11
+
12
+ ## What It Does
13
+
14
+ Interactively (or non-interactively with flags), the setup-provider
15
+ command writes a `provider` block to `~/.claude/settings.json` with:
16
+
17
+ - `baseUrl` — the API endpoint (e.g. `http://localhost:20128/v1` for
18
+ the local 9Router gateway)
19
+ - `apiKey` — the provider's API key (read from `env:` reference or
20
+ direct value)
21
+ - `models` — the model catalog (the IDs returned by
22
+ `GET /v1/models`)
23
+
24
+ ## Default: 9Router Gateway
25
+
26
+ If the user invokes `/setup-provider` with no arguments, default to
27
+ the local 9Router gateway at `http://localhost:20128/v1`. The
28
+ catalog comes from `GET http://localhost:20128/v1/models`. As of
29
+ v6.2.2, that catalog includes:
30
+
31
+ - `minimax/MiniMax-M3` (reasoning)
32
+ - `minimax/MiniMax-M2.7` (reasoning)
33
+ - `nvidia/minimaxai/minimax-m3` (reasoning)
34
+ - `nvidia/minimaxai/minimax-m2.7` (reasoning)
35
+ - `nvidia/z-ai/glm-5.2`
36
+ - `nvidia/deepseek-ai/deepseek-v4-pro`
37
+ - `nvidia/deepseek-ai/deepseek-v4-flash`
38
+ - `nvidia/moonshotai/kimi-k2.6`
39
+ - `nvidia/nemotron-3-ultra-550b-a55b`
40
+ - `openrouter/cohere/north-mini-code:free`
41
+ - `openrouter/poolside/laguna-m.1:free`
42
+ - `openrouter/nvidia/nemotron-3-super-120b-a12b:free`
43
+ - (and several more `minimax/MiniMax-M2.x` variants)
44
+
45
+ ## Flags
46
+
47
+ - `--gateway <url>` — override the 9Router URL (default
48
+ `http://localhost:20128/v1`)
49
+ - `--key <key>` — provider API key (writes `${env:KEY_NAME}` if it
50
+ looks like an env var name, otherwise writes the literal)
51
+ - `--provider <name>` — provider name in settings.json (default `9router`)
52
+ - `--model <id>` — add a single model instead of fetching the catalog
53
+ - `--list` — print the model catalog from `/v1/models` and exit
54
+ - `--remove <name>` — remove a provider by name
55
+
56
+ ## Examples
57
+
58
+ ```
59
+ # Use the default 9Router gateway with the live model catalog
60
+ /setup-provider
61
+
62
+ # Custom provider
63
+ /setup-provider --provider my-anthropic --gateway https://api.anthropic.com/v1 --key sk-ant-...
64
+
65
+ # Just list the available models
66
+ /setup-provider --list
67
+ ```
68
+
69
+ ## Implementation
70
+
71
+ 1. If `--list`, GET `${gateway}/v1/models` and pretty-print the IDs.
72
+ 2. If `--remove`, edit `~/.claude/settings.json` and remove the
73
+ `provider.<name>` block.
74
+ 3. Otherwise, read `~/.claude/settings.json`. If the file doesn't
75
+ exist, error — the user should run `bizar install` first.
76
+ 4. Build the new `provider.<name>` block from the flags + fetched
77
+ catalog.
78
+ 5. Write the file back atomically (write to `settings.json.tmp`,
79
+ then `rename`).
80
+ 6. Run `bizar validate` to confirm everything is wired up.
81
+
82
+ ## Security
83
+
84
+ Never echo or log the full API key. If the user supplies a key on
85
+ the command line, write it as a literal value (or `${env:KEY}`
86
+ reference if it matches a `KEY_NAME` pattern). Never commit
87
+ `~/.claude/settings.json` to source control — it may contain real
88
+ secrets.
89
+
90
+ ## Related
91
+
92
+ - `bizar connect` — interactive TUI for provider setup (alternative)
93
+ - `bizar install` — installs the Bizar scaffolding (NOT provider config
94
+ since v6.2.2)
95
+ - `bizar validate` — confirms provider config is wired correctly
96
+ - Claude Code provider config: see https://docs.claude.com/en/docs/claude-code/settings
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Write a 5-phase spec and file it as a GitHub issue (with dedup check).
3
+ allowed-tools: Read, Write, Bash, WebFetch
4
+ ---
5
+
6
+ # /spec — Write and File a GitHub Issue Spec
7
+
8
+ Generate a structured 5-section spec document, check for duplicates
9
+ against existing GitHub issues, and file it as a GitHub issue.
10
+
11
+ ## 5 Sections
12
+
13
+ 1. **Context** — Why this feature matters, current pain point
14
+ 2. **Goals** — What success looks like (3-5 bullet points)
15
+ 3. **Non-Goals** — Deliberately out of scope (2-4 bullet points)
16
+ 4. **Design** — Key API shapes, data structures, or UX flows
17
+ 5. **Open Questions** — Unresolved items with suggested resolution paths
18
+
19
+ ## Process
20
+
21
+ 1. Ask the user: "What is the spec topic?" (wait for reply)
22
+ 2. Fetch existing issues via `gh issue list --limit 100 --json number,title,body`
23
+ 3. Compute similarity against existing issue titles using keyword overlap:
24
+ - Tokenize title into lowercase words
25
+ - Compute overlap coefficient = |intersection| / min(len(a), len(b))
26
+ - Flag as potential dup if overlap > 0.5
27
+ 4. Present any dupes to the user for confirmation before creating
28
+ 5. Generate the spec body
29
+ 6. Create the issue via `gh issue create --title "spec: <topic>" --body-file -`
30
+ 7. Print the issue URL
31
+
32
+ ## Dedup threshold
33
+
34
+ - **0.7+** — "Likely duplicate" — block and require user to confirm before creating
35
+ - **0.5-0.7** — "Possible duplicate" — warn but proceed
36
+ - **<0.5** — proceed without warning
37
+
38
+ ## Output
39
+
40
+ Prints the created issue URL on success. On dup block, prints the
41
+ matching issue numbers and waits for the user to confirm or cancel.
42
+
43
+ ## Constraints
44
+
45
+ - Never create an issue without explicit user confirmation when dup is likely
46
+ - The spec body is written to a temp file and passed via `--body-file -` to `gh issue create`
47
+ - Always prefix the issue title with `spec: `
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: Auto-fill a sprint contract from a goal ID in PROGRESS.md.
3
+ allowed-tools: Read, Write, Bash
4
+ ---
5
+
6
+ # /sprint — Auto-Fill Sprint Contract from Goal
7
+
8
+ Reads a goal from `.bizar/PROGRESS.md` and pre-fills
9
+ `templates/sprint-contract.md` with its title and key results.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /sprint <goal-id>
15
+ ```
16
+
17
+ Example: `/sprint F-099`
18
+
19
+ ## What it does
20
+
21
+ 1. Parses `.bizar/PROGRESS.md` via `bizar-dash/src/server/progress-parser.mjs`
22
+ 2. Finds the goal with matching `id` (e.g. `F-099`)
23
+ 3. Reads `templates/sprint-contract.md` as the template
24
+ 4. Pre-fills:
25
+ - **Feature ID** → `goal-id`
26
+ - **Title** → goal title
27
+ - **Scope (in)** → key results (uncompleted first, completed below)
28
+ - **Scope (out)** → empty (explicitly excluded items are sprint-specific)
29
+ - **Definition of Done (DoD)** → all 7 standard DoD checkboxes pre-checked
30
+ 5. Writes to `.bizar/sprints/<goal-id>-YYYY-MM-DD.md`
31
+ 6. Prints the path so the agent can open/edit it
32
+
33
+ ## Error handling
34
+
35
+ - Goal not found → `Error: goal '<id>' not found in .bizar/PROGRESS.md`
36
+ - No key results → Scope (in) section left blank with a `<fill>` placeholder
37
+ - File write failure → prints the pre-filled content to stdout as fallback
38
+
39
+ ## Constraints
40
+
41
+ - Never overwrite an existing sprint file for the same goal+date
42
+ - Always use today's date in the filename (ISO 8601: YYYY-MM-DD)
43
+ - DoD checkboxes: all 7 standard items pre-checked; add more only if the sprint scope requires it