@polderlabs/bizar 3.20.17 → 3.22.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/cli/bin.mjs +5 -0
- package/cli/heads-up.mjs +295 -0
- package/cli/init.mjs +34 -0
- package/cli/update.mjs +218 -6
- package/config/agents/_shared/AGENT_BASELINE.md +35 -0
- package/config/opencode.json +11 -23
- package/config/skills/bizar/SKILL.md +42 -0
- package/config/skills/glyph/SKILL.md +174 -0
- package/config/skills/obsidian/SKILL.md +101 -0
- package/config/skills/read-the-damn-docs/SKILL.md +113 -0
- package/install.sh +245 -2
- package/package.json +2 -2
- package/templates/plan/plan.canvas.template +0 -1711
- package/templates/plan/plan.html.template +0 -937
package/config/opencode.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
"model": "
|
|
4
|
-
"small_model": "
|
|
3
|
+
"model": "minimax/MiniMax-M3",
|
|
4
|
+
"small_model": "minimax/MiniMax-M2.7",
|
|
5
5
|
"default_agent": "odin",
|
|
6
6
|
"permission": "allow",
|
|
7
7
|
"snapshot": false,
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"odin": {
|
|
54
54
|
"description": "Odin — Pure router that delegates all work to subagents. Routes across Frigg (DeepSeek/Q&A), Vör (DeepSeek/clarify), Mimir (DeepSeek/research), Heimdall (DeepSeek/simple), Hermod (M2.7/git), Thor (M2.7/mid), Baldr (M2.7/design), Tyr (M3/top), Vidarr (GPT-5.5/ultra), Forseti (verifier/M3).",
|
|
55
55
|
"mode": "primary",
|
|
56
|
-
"model": "
|
|
56
|
+
"model": "minimax/MiniMax-M3",
|
|
57
57
|
"color": "#6366f1",
|
|
58
58
|
"permission": {
|
|
59
59
|
"task": "allow",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"quick": {
|
|
103
103
|
"description": "Quick — Fast single-shot tasks. No delegation, no parallel streams. Use for small edits, mechanical changes, one-shot questions. Routes to no one.",
|
|
104
104
|
"mode": "primary",
|
|
105
|
-
"model": "
|
|
105
|
+
"model": "minimax/MiniMax-M2.7",
|
|
106
106
|
"color": "#22d3ee",
|
|
107
107
|
"permission": {
|
|
108
108
|
"read": "allow",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"hermod": {
|
|
163
163
|
"description": "Hermod — Git and GitHub operations specialist using MiniMax M2.7. Branching, commits, PRs, merge/rebase, conflict resolution, CI/CD, releases, gh CLI.",
|
|
164
164
|
"mode": "subagent",
|
|
165
|
-
"model": "
|
|
165
|
+
"model": "minimax/MiniMax-M2.7",
|
|
166
166
|
"color": "#06b6d4",
|
|
167
167
|
"permission": {
|
|
168
168
|
"read": "allow",
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"thor": {
|
|
181
181
|
"description": "Thor — Handles medium-complexity tasks using MiniMax M2.7 from minimax.io. Strong and reliable, cheaper than Tyr but more capable than Heimdall.",
|
|
182
182
|
"mode": "subagent",
|
|
183
|
-
"model": "
|
|
183
|
+
"model": "minimax/MiniMax-M2.7",
|
|
184
184
|
"color": "#a855f7",
|
|
185
185
|
"permission": {
|
|
186
186
|
"read": "allow",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"baldr": {
|
|
200
200
|
"description": "Baldr — UI/UX design system specialist. Creates DESIGN.md files using Google's design.md standard. Focuses on visual consistency, usability, accessibility, and design tokens.",
|
|
201
201
|
"mode": "subagent",
|
|
202
|
-
"model": "
|
|
202
|
+
"model": "minimax/MiniMax-M2.7",
|
|
203
203
|
"color": "#ec4899",
|
|
204
204
|
"permission": {
|
|
205
205
|
"read": "allow",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"tyr": {
|
|
219
219
|
"description": "Tyr — Handles the most complex implementation, debugging, and architectural work using MiniMax M3 via minimax.io. Unmatched wisdom for the hardest problems.",
|
|
220
220
|
"mode": "subagent",
|
|
221
|
-
"model": "
|
|
221
|
+
"model": "minimax/MiniMax-M3",
|
|
222
222
|
"color": "#f59e0b",
|
|
223
223
|
"permission": {
|
|
224
224
|
"read": "allow",
|
|
@@ -235,9 +235,9 @@
|
|
|
235
235
|
}
|
|
236
236
|
},
|
|
237
237
|
"vidarr": {
|
|
238
|
-
"description": "Vidarr — The ultimate fallback using
|
|
238
|
+
"description": "Vidarr — The ultimate fallback using MiniMax M3 via MiniMax direct provider. For the hardest problems when debugging stalls or nothing else works. Use sparingly — highest cost.",
|
|
239
239
|
"mode": "subagent",
|
|
240
|
-
"model": "
|
|
240
|
+
"model": "minimax/MiniMax-M3",
|
|
241
241
|
"color": "#dc2626",
|
|
242
242
|
"permission": {
|
|
243
243
|
"read": "allow",
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
"forseti": {
|
|
257
257
|
"description": "Forseti — Audits, criticizes, and corrects implementation plans before execution using MiniMax M3. No write permissions — review only.",
|
|
258
258
|
"mode": "subagent",
|
|
259
|
-
"model": "
|
|
259
|
+
"model": "minimax/MiniMax-M3",
|
|
260
260
|
"color": "#ef4444",
|
|
261
261
|
"permission": {
|
|
262
262
|
"read": "allow",
|
|
@@ -347,18 +347,6 @@
|
|
|
347
347
|
"reasoning": true
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
},
|
|
351
|
-
"openrouter": {
|
|
352
|
-
"models": {
|
|
353
|
-
"minimax/minimax-m3": {
|
|
354
|
-
"interleaved": { "field": "reasoning_details" },
|
|
355
|
-
"reasoning": true
|
|
356
|
-
},
|
|
357
|
-
"minimax/minimax-m2.7": {
|
|
358
|
-
"interleaved": { "field": "reasoning_details" },
|
|
359
|
-
"reasoning": true
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
350
|
}
|
|
363
351
|
}
|
|
364
352
|
}
|
|
@@ -67,6 +67,48 @@ Free (Mimir, Heimdall) → $Mid (Thor, Hermod) → $$High (Tyr) → $$$Ultra (Vi
|
|
|
67
67
|
|
|
68
68
|
Never use a paid agent for work a free agent can do. Never use Tyr for what Thor can handle.
|
|
69
69
|
|
|
70
|
+
## When to use Glyphs (visual plans)
|
|
71
|
+
|
|
72
|
+
Glyphs are the dashboard's `/artifacts/<slug>/artifact.mdx` — MDX with rich blocks (RichText, Callout, Checklist, Table, CodeTabs, Decision, OpenQuestions, FileTree, Diff, Stat, Workflow, Mockup, Diagram) plus free-placed comments that the user can pin anywhere on the artifact.
|
|
73
|
+
|
|
74
|
+
**Use Glyphs for BIG decisions, NOT small questions:**
|
|
75
|
+
- A new feature with multiple UI states, design choices, or trade-offs
|
|
76
|
+
- A UI redesign that affects multiple components
|
|
77
|
+
- An architectural change spanning 3+ files
|
|
78
|
+
- Any change where the user should review before code is written
|
|
79
|
+
- Any work where the user wants to annotate specific spots on a mockup/diagram with feedback
|
|
80
|
+
|
|
81
|
+
**Don't use Glyphs for:**
|
|
82
|
+
- "What does this function do?" — use `@frigg` or the `read` tool
|
|
83
|
+
- A simple bug fix with one obvious cause — just fix it
|
|
84
|
+
- Single-file changes with no design questions
|
|
85
|
+
- Anything that can be answered in one sentence
|
|
86
|
+
|
|
87
|
+
When the user says "show me a plan", "let's review the design", "I want to see the UI options", or "what should this look like" — that's a Glyph trigger. When they say "fix this bug", "what does X do", "rename this" — that's a direct edit, not a Glyph.
|
|
88
|
+
|
|
89
|
+
## How to create a Glyph
|
|
90
|
+
|
|
91
|
+
1. Write `artifacts/<slug>/artifact.mdx` with frontmatter (`title`, `status`, `kind: plan|recap`) and blocks
|
|
92
|
+
2. Write `artifacts/<slug>/meta.json` with `{ title, slug, status, author, created, lastEdited }`
|
|
93
|
+
3. Write `artifacts/<slug>/comments.json` as `[]` initially (comments added via the dashboard)
|
|
94
|
+
4. Use the full block vocabulary — see `glyphs-research.md` in Obsidian or the dashboard's `/api/artifacts/<slug>/render` for the JSON shape
|
|
95
|
+
|
|
96
|
+
Templates available:
|
|
97
|
+
- `templates/plan/plan.mdx.template` — forward planning (before code)
|
|
98
|
+
- `templates/plan/plan.canvas.template` — legacy canvas (don't use; replaced by MDX)
|
|
99
|
+
|
|
100
|
+
## How to read glyph feedback
|
|
101
|
+
|
|
102
|
+
When the user clicks "Submit to agent" on a glyph in the dashboard, the dashboard writes a structured `artifacts/<slug>/feedback.md` file and marks `meta.json` `status: review`. That file contains:
|
|
103
|
+
|
|
104
|
+
- All free-placed comments with `(x, y)` coordinates and text
|
|
105
|
+
- Answers to OpenQuestions (one `Q:` / `A:` block per question)
|
|
106
|
+
- The original MDX source
|
|
107
|
+
|
|
108
|
+
Read it with the `read_glyph_feedback` tool (preferred — returns parsed frontmatter + body + counts), or read the file directly with the `read` tool.
|
|
109
|
+
|
|
110
|
+
After reading the feedback, regenerate the glyph's `artifact.mdx` to address every comment and apply every answer. Then write the regenerated MDX back to `artifacts/<slug>/artifact.mdx` (and update `meta.json` if the title/summary changes).
|
|
111
|
+
|
|
70
112
|
## Troubleshooting
|
|
71
113
|
|
|
72
114
|
### Odin Self-Handles Instead of Routing
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: glyph
|
|
3
|
+
description: Create and consume Bizar glyphs — visual plan/recap artifacts in `artifacts/<slug>/`. Glyphs are MDX files with frontmatter and a block vocabulary. Use for design proposals, decision recaps, and postmortems.
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Glyphs — Visual Plan Artifacts
|
|
8
|
+
|
|
9
|
+
A **glyph** is a visual artifact used for plans, recaps, and design proposals. It's an MDX file in `artifacts/<slug>/artifact.mdx` that the dashboard renders with comment pin overlay and right-click context menu.
|
|
10
|
+
|
|
11
|
+
## When to create a glyph
|
|
12
|
+
|
|
13
|
+
- **Design proposal** — you're proposing a new component, system, or workflow
|
|
14
|
+
- **Decision recap** — multiple options were considered; one was chosen; the reasoning matters
|
|
15
|
+
- **Postmortem** — something broke; here's the timeline and root cause
|
|
16
|
+
- **Implementation plan** — breaking down a non-trivial feature into phases
|
|
17
|
+
- **Handoff** — work moving from one agent to another
|
|
18
|
+
|
|
19
|
+
If it's a one-line fix, don't make a glyph. If it's a 5-minute edit, don't make a glyph. Glyphs are for work that needs visible structure.
|
|
20
|
+
|
|
21
|
+
## File structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
artifacts/<slug>/
|
|
25
|
+
├── meta.json # title, slug, status, author, created
|
|
26
|
+
├── artifact.mdx # ← source of truth (git-tracked, diff-friendly)
|
|
27
|
+
└── comments.json # ← free-placed pins (mutable)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The `meta.json` is metadata, `artifact.mdx` is the content, `comments.json` is the only mutable side-channel.
|
|
31
|
+
|
|
32
|
+
## Frontmatter
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
---
|
|
36
|
+
title: "Short, action-oriented title"
|
|
37
|
+
brief: "One sentence: what this glyph is about."
|
|
38
|
+
status: draft | review | shipped | archived
|
|
39
|
+
kind: plan | postmortem | recap | design
|
|
40
|
+
---
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Block vocabulary
|
|
44
|
+
|
|
45
|
+
```mdx
|
|
46
|
+
<RichText id="...">markdown content (headings, lists, code blocks, etc.)</RichText>
|
|
47
|
+
|
|
48
|
+
<Callout id="..." tone="info|warn|success|danger">markdown content</Callout>
|
|
49
|
+
|
|
50
|
+
<Stat id="..." label="..." value="..." trend="up|down|flat" hint="..." />
|
|
51
|
+
|
|
52
|
+
<Checklist
|
|
53
|
+
id="..."
|
|
54
|
+
items={[
|
|
55
|
+
{ id: "i1", label: "...", checked: true },
|
|
56
|
+
{ id: "i2", label: "...", checked: false }
|
|
57
|
+
]}
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<Table
|
|
61
|
+
id="..."
|
|
62
|
+
columns={["A", "B"]}
|
|
63
|
+
rows={[["x", "y"], ["p", "q"]]}
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
<CodeTabs
|
|
67
|
+
id="..."
|
|
68
|
+
tabs={[
|
|
69
|
+
{ id: "t1", label: "file.ts", language: "typescript", code: "...", caption: "..." }
|
|
70
|
+
]}
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
<Decision
|
|
74
|
+
id="..."
|
|
75
|
+
title="..."
|
|
76
|
+
question="..."
|
|
77
|
+
options={[
|
|
78
|
+
{ id: "a", label: "...", detail: "...", recommended: true }
|
|
79
|
+
]}
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<OpenQuestions
|
|
83
|
+
id="..."
|
|
84
|
+
questions={[
|
|
85
|
+
{ id: "q1", label: "...", kind: "choice|text|multi", options: ["A", "B"] }
|
|
86
|
+
]}
|
|
87
|
+
/>
|
|
88
|
+
|
|
89
|
+
<FileTree
|
|
90
|
+
id="..."
|
|
91
|
+
title="..."
|
|
92
|
+
entries={[
|
|
93
|
+
{ path: "src/foo.ts", change: "added|modified|removed|renamed", note: "..." }
|
|
94
|
+
]}
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<Workflow
|
|
98
|
+
id="..."
|
|
99
|
+
steps={[
|
|
100
|
+
{ id: "s1", label: "...", type: "task|decision|note" }
|
|
101
|
+
]}
|
|
102
|
+
connections={[
|
|
103
|
+
{ from: "s1", to: "s2", label: "yes" }
|
|
104
|
+
]}
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
<Mockup
|
|
108
|
+
id="..."
|
|
109
|
+
title="..."
|
|
110
|
+
x={40} y={120} w={280} h={180}
|
|
111
|
+
html="<div class='mockup-card'>...</div>"
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
<Diagram
|
|
115
|
+
id="..."
|
|
116
|
+
title="..."
|
|
117
|
+
dataHtml="<svg>...</svg>"
|
|
118
|
+
dataCss=".diagram-node { fill: var(--bg-1); }"
|
|
119
|
+
/>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Common pitfalls
|
|
123
|
+
|
|
124
|
+
### FileTree `change` field
|
|
125
|
+
|
|
126
|
+
`change` must be exactly one of: `added`, `modified`, `removed`, `renamed`. Use the `note` field for nuance ("rewritten from scratch", "kept as-is", "deprecated").
|
|
127
|
+
|
|
128
|
+
```mdx
|
|
129
|
+
<FileTree
|
|
130
|
+
entries={[
|
|
131
|
+
{ path: "src/chat/Composer.tsx", change: "modified", note: "rewritten as pill composer" }
|
|
132
|
+
]}
|
|
133
|
+
/>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### MDX heading with `<N`
|
|
137
|
+
|
|
138
|
+
A heading like `## Mobile (under 768px)` is fine. But `## Mobile <768px` breaks the MDX validator because `<7` looks like a malformed JSX tag. Always escape or rephrase.
|
|
139
|
+
|
|
140
|
+
### Block IDs must be unique within a glyph
|
|
141
|
+
|
|
142
|
+
If you copy a `<RichText>` block, change its `id`. The compiler may warn but won't fail.
|
|
143
|
+
|
|
144
|
+
### Children vs self-closing
|
|
145
|
+
|
|
146
|
+
Blocks with content (RichText, Callout) use open/close tags with children. Blocks with only data (Stat, Table, FileTree, Decision, etc.) are self-closing.
|
|
147
|
+
|
|
148
|
+
## meta.json example
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"title": "Chat UI — Complete Rewrite (Gemini-Inspired)",
|
|
153
|
+
"slug": "chat-ui-rewrite",
|
|
154
|
+
"status": "draft",
|
|
155
|
+
"author": "drb0rk",
|
|
156
|
+
"created": "2026-06-26T20:30:00.000Z",
|
|
157
|
+
"lastEdited": "2026-06-26T20:30:00.000Z"
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## How to view in the dashboard
|
|
162
|
+
|
|
163
|
+
Glyphs are rendered at `/artifacts/<slug>`. The dashboard shows them with:
|
|
164
|
+
- Section grouping (by block id prefix: `overview`, `implementation`, `questions`)
|
|
165
|
+
- Comment pin overlay (right-click to add)
|
|
166
|
+
- Floating toolbar (Send to agent, share)
|
|
167
|
+
- Read-only by default; `status: shipped` locks editing
|
|
168
|
+
|
|
169
|
+
## See also
|
|
170
|
+
|
|
171
|
+
- `bizar-dash/src/web/views/glyphs/components.tsx` — block component implementations
|
|
172
|
+
- `bizar-dash/src/server/glyphs/mdx-compiler.mjs` — MDX parser
|
|
173
|
+
- `artifacts/sample-plan-login/` — a complete worked example
|
|
174
|
+
- The user's Obsidian vault for the project's design notes
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian
|
|
3
|
+
description: Use the project's Obsidian vault (`.obsidian/`) for persistent project knowledge. Read it before decisions, write to it after work. Every Bizar agent follows this rule.
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Obsidian Vault — Project Knowledge
|
|
8
|
+
|
|
9
|
+
**Project knowledge lives in `.obsidian/`. Read it before you start, write to it when you learn.**
|
|
10
|
+
|
|
11
|
+
Every Bizar project has an Obsidian vault at `.obsidian/` with index files (`index/`), agent-specific memory (`agents/`), bug postmortems (`bugs/`), design decisions, and ongoing work notes. The user has been working on this project — their notes contain the real context, the gotchas, the failed approaches, the preferred patterns. **Read the relevant vault entries before making any non-trivial decision.**
|
|
12
|
+
|
|
13
|
+
## When to read
|
|
14
|
+
|
|
15
|
+
- At the start of every session (skim the index)
|
|
16
|
+
- Before any non-trivial implementation decision
|
|
17
|
+
- When you're about to suggest something the user has already tried
|
|
18
|
+
- When the codebase feels like it's working around something you don't understand
|
|
19
|
+
- When you encounter a `// FIXME` or `// HACK` comment — there's probably a vault entry explaining it
|
|
20
|
+
|
|
21
|
+
## When to write
|
|
22
|
+
|
|
23
|
+
- After completing a meaningful piece of work
|
|
24
|
+
- On discovering a bug or postmortem
|
|
25
|
+
- When you find a pattern that should be reused
|
|
26
|
+
- When the user corrects you
|
|
27
|
+
- When you make a design decision that should be remembered
|
|
28
|
+
|
|
29
|
+
## What to write
|
|
30
|
+
|
|
31
|
+
Date-stamped entry under the appropriate category:
|
|
32
|
+
|
|
33
|
+
- `index/` — high-level project context, decisions, handoffs
|
|
34
|
+
- `bugs/` — bug postmortems, root-cause analyses
|
|
35
|
+
- `agents/<name>/` — per-agent memory (what you learned, what to do differently)
|
|
36
|
+
- `reference/` — external API docs, tool notes
|
|
37
|
+
- `workflows/` — multi-step procedures
|
|
38
|
+
- `daily/` — running log of what happened today
|
|
39
|
+
|
|
40
|
+
Each entry:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
---
|
|
44
|
+
title: "What happened"
|
|
45
|
+
date: 2026-06-26
|
|
46
|
+
tags: [tag1, tag2]
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# Title
|
|
50
|
+
|
|
51
|
+
## Context
|
|
52
|
+
What was happening. What was the user trying to do.
|
|
53
|
+
|
|
54
|
+
## Lesson
|
|
55
|
+
What you learned. Why it matters.
|
|
56
|
+
|
|
57
|
+
## Pattern
|
|
58
|
+
What to do next time. Code examples welcome.
|
|
59
|
+
|
|
60
|
+
## Files changed
|
|
61
|
+
- path/to/file.ts (added, modified, removed)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Link to related entries with `[[wikilinks]]`.
|
|
65
|
+
|
|
66
|
+
## What NOT to write
|
|
67
|
+
|
|
68
|
+
- Secrets, API keys, tokens (use `auth.json`)
|
|
69
|
+
- Temporary scratch (use a TODO comment in code)
|
|
70
|
+
- Anything already obvious from reading the code
|
|
71
|
+
- Long code dumps (link to file with `path:line`)
|
|
72
|
+
|
|
73
|
+
## How to use the vault
|
|
74
|
+
|
|
75
|
+
### Via Obsidian CLI (preferred)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
obsidian search "<query>" # full-text search
|
|
79
|
+
obsidian read "<path>" # read a file
|
|
80
|
+
obsidian create "<path>" "<content>" # create a file
|
|
81
|
+
obsidian append "<path>" "<content>" # append to a file
|
|
82
|
+
obsidian daily "<content>" # append to today's daily note
|
|
83
|
+
obsidian tasks # list open tasks
|
|
84
|
+
obsidian backlinks "<path>" # find what links to this file
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Via MCP server (if available)
|
|
88
|
+
|
|
89
|
+
The `obsidian` MCP server exposes tools like `obsidian_search`, `obsidian_read_file`, `obsidian_create_file`, `obsidian_append_content`, `obsidian_list_directory`, `obsidian_dataview_query`. Use whichever interface is available.
|
|
90
|
+
|
|
91
|
+
## The O in Odin
|
|
92
|
+
|
|
93
|
+
Odin always updates the vault after significant work, regardless of who did the work. The other agents read; Odin writes. This is a hard rule — if Odin completes a task without leaving a vault trace, that task isn't really done.
|
|
94
|
+
|
|
95
|
+
## See also
|
|
96
|
+
|
|
97
|
+
- [[AGENTS_SELF_IMPROVEMENT]] — project-specific lessons in `.bizar/AGENTS_SELF_IMPROVEMENT.md`
|
|
98
|
+
- [[Architecture]] — system structure (in `index/`)
|
|
99
|
+
- [[Dashboard]] — dashboard conventions
|
|
100
|
+
- [[Patterns]] — code patterns
|
|
101
|
+
- [[Tools]] — tool documentation
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: read-the-damn-docs
|
|
3
|
+
description: When using a library, tool, or API you don't fully understand, READ THE DOCS before guessing. Don't infer behavior from function names. The source of truth is the official documentation and source code, not your prior assumptions.
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Read the Damn Docs
|
|
8
|
+
|
|
9
|
+
When you reach for a library, tool, or API you haven't used recently (or ever), **read the actual documentation** before writing code. Don't guess. Don't infer from function names. Don't assume "it probably works like X". The source of truth is the docs, then the source code, then examples. Everything else is noise.
|
|
10
|
+
|
|
11
|
+
## Why this skill exists
|
|
12
|
+
|
|
13
|
+
LLMs are confidently wrong. They have a strong prior for "this is what libraries usually look like" — and that prior is sometimes right but often subtly wrong. Common failure modes:
|
|
14
|
+
|
|
15
|
+
- "The function is called `parseFoo` so it probably takes a string and returns an object" — wrong, it takes `{format, version}` and returns a promise
|
|
16
|
+
- "I'll just try it and see what error comes back" — wastes a turn, often hallucinates the fix
|
|
17
|
+
- "The README has an example, that's enough" — examples are cherry-picked; edge cases will bite you
|
|
18
|
+
|
|
19
|
+
The fix: spend 30-90 seconds reading the docs first. The cost is a single tool call. The benefit is a correct first attempt.
|
|
20
|
+
|
|
21
|
+
## Hierarchy of truth
|
|
22
|
+
|
|
23
|
+
When resolving how a library/tool/API works, use this priority order:
|
|
24
|
+
|
|
25
|
+
1. **Official documentation** (the canonical reference) — most authoritative
|
|
26
|
+
2. **Source code** (the actual implementation) — definitive when docs are vague
|
|
27
|
+
3. **Examples** (in the docs or repo) — show typical use, but don't trust edge cases
|
|
28
|
+
4. **StackOverflow / GitHub issues** — useful for known footguns
|
|
29
|
+
5. **Your prior model** — last resort, often wrong
|
|
30
|
+
|
|
31
|
+
**Stop at step 1 unless the docs are unclear.** If they are, drop to step 2.
|
|
32
|
+
|
|
33
|
+
## Practical workflow
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
1. IDENTIFY: "I'm about to use library X for the first time (or first time in months)"
|
|
37
|
+
2. READ: webfetch the official docs for the specific function/method I'll call
|
|
38
|
+
- Don't read the entire docs — read the specific section
|
|
39
|
+
3. VERIFY: cross-check against source if anything is ambiguous
|
|
40
|
+
4. NOTE: write down the gotchas in your agent memory or a relevant file
|
|
41
|
+
5. USE: now write the code, knowing the actual API
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## When to invoke this skill
|
|
45
|
+
|
|
46
|
+
Use it whenever:
|
|
47
|
+
|
|
48
|
+
- You're using a library you haven't touched in this session
|
|
49
|
+
- You're using a function/method whose exact signature you don't remember
|
|
50
|
+
- The function name is misleading or you have low confidence
|
|
51
|
+
- You're upgrading to a new major version of a library
|
|
52
|
+
- You're switching between similar libraries (axios vs fetch, etc.)
|
|
53
|
+
- You're using a CLI tool you don't have muscle memory for
|
|
54
|
+
- You're hitting an error you don't recognize and "guessing" the fix
|
|
55
|
+
|
|
56
|
+
## Anti-patterns
|
|
57
|
+
|
|
58
|
+
### "I'll just try it"
|
|
59
|
+
|
|
60
|
+
Don't write code, run it, see the error, and fix from there. That works for trivial cases but burns turns on anything non-trivial. Read the docs first.
|
|
61
|
+
|
|
62
|
+
### "The function name tells me what it does"
|
|
63
|
+
|
|
64
|
+
`Array.prototype.flatMap`, `Promise.allSettled`, `fs.opendirSync` — names are hints, not specs. The actual behavior (sync vs async, return shape, error cases) is in the docs.
|
|
65
|
+
|
|
66
|
+
### "I used this library before, I know it"
|
|
67
|
+
|
|
68
|
+
Libraries change. APIs deprecate. Defaults shift. Even if you used something 6 months ago, a quick doc check (30 seconds) saves 10 minutes of debugging when your prior knowledge is stale.
|
|
69
|
+
|
|
70
|
+
### "The README example is enough"
|
|
71
|
+
|
|
72
|
+
README examples are demos, not documentation. They show one happy path. The real API has edge cases, error modes, and options that aren't in the example.
|
|
73
|
+
|
|
74
|
+
### "The error message is enough to fix it"
|
|
75
|
+
|
|
76
|
+
Sometimes. But error messages are often misleading or incomplete. Reading the docs for the function that errored often reveals the actual constraint.
|
|
77
|
+
|
|
78
|
+
## Examples
|
|
79
|
+
|
|
80
|
+
### Good: Read first
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
[Agent wants to use the Vite `defineConfig` API for the first time]
|
|
84
|
+
Agent: "Let me check the Vite docs for the exact shape of `defineConfig`."
|
|
85
|
+
[webfetch https://vitejs.dev/config/]
|
|
86
|
+
Agent: "OK, `defineConfig` accepts a UserConfig object with `plugins`, `build`, etc.
|
|
87
|
+
I need a `define` key for compile-time constants."
|
|
88
|
+
[Writes correct config]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Bad: Guess
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
[Agent wants to use the Vite `defineConfig` API for the first time]
|
|
95
|
+
Agent: "defineConfig is probably a function that takes a config object with
|
|
96
|
+
common options like plugins and build. Let me just write it."
|
|
97
|
+
[Writes config with `define: { __VERSION__: '1.0' }`]
|
|
98
|
+
[Runs vite build, gets a warning about an unexpected option]
|
|
99
|
+
Agent: "Hmm, the docs must have changed. Let me guess it's a different syntax."
|
|
100
|
+
[Wastes 2-3 turns guessing before reading the docs]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Where to read
|
|
104
|
+
|
|
105
|
+
- **Webfetch** the official docs URL: `webfetch <url>` — fast, gives you the actual current docs
|
|
106
|
+
- **Source code** via Semble search: `semble search "functionName" <repo>` — useful when docs are vague
|
|
107
|
+
- **Local docs** if available: `semble search "<query>" --content docs` for the project's own docs
|
|
108
|
+
|
|
109
|
+
## See also
|
|
110
|
+
|
|
111
|
+
- [[obsidian]] — write postmortems and patterns to the project vault
|
|
112
|
+
- [[glyph]] — create a glyph when the design decision is non-trivial
|
|
113
|
+
- The agent baseline — `simplest thing that works` rule
|