@polderlabs/bizar 4.4.9 → 4.4.10

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: glyph
3
- description: Create and consume Bizar glyphs — visual artifacts at `artifacts/<slug>/`. Use for plans, recaps, design proposals, postmortems, handoffs. Quick reference for the block vocabulary and the 5 things that actually break a glyph.
4
- version: 3
3
+ description: Create visual glyphs at `artifacts/<slug>/` for plans, recaps, design proposals, postmortems, handoffs. Glyphs should be compact and visual one screen, dense info, no walls of text. This skill enforces that.
4
+ version: 4
5
5
  ---
6
6
 
7
7
  # Glyphs
@@ -15,7 +15,7 @@ artifacts/<slug>/
15
15
  └── comments.json ← free-placed pins (mutable)
16
16
  ```
17
17
 
18
- Two locations are scanned: `<projectRoot>/.bizar/artifacts/` (preferred) and `~/.config/opencode/artifacts/` (global).
18
+ Two locations: `<projectRoot>/.bizar/artifacts/` (preferred) and `~/.config/opencode/artifacts/` (global).
19
19
 
20
20
  ## Frontmatter
21
21
 
@@ -28,104 +28,121 @@ kind: plan | postmortem | recap | design
28
28
  ---
29
29
  ```
30
30
 
31
- ## The blocks at a glance
31
+ ## The 6 rules read this first, every time
32
+
33
+ These are non-negotiable. The existing 357-line v3-to-v4-consolidation glyph is a cautionary tale — don't write that one.
34
+
35
+ ### Rule 1 — One screen
36
+
37
+ A glyph MUST fit on one screen of the dashboard (≈ 1000px tall at desktop width). Long glyphs are skimmed and abandoned. If you can't fit the work in 5-10 blocks, you're covering too much. Break the work into multiple glyphs, one per phase.
38
+
39
+ ### Rule 2 — One idea per block
40
+
41
+ If a block covers two ideas, split it. Each block is a single visual unit. The dashboard groups blocks into sections by id prefix — use that.
42
+
43
+ ### Rule 3 — RichText is glue, not body
44
+
45
+ RichText is for 1-3 sentence transitions between visual blocks. NEVER use RichText for the actual content. If you find yourself writing 4+ sentences in a RichText, switch to:
46
+
47
+ - **A table** if you're listing things with attributes
48
+ - **A decision** if you're explaining why one option won
49
+ - **A file tree** if you're listing changes
50
+ - **A stat** if you're highlighting a number
51
+ - **A workflow** if you're describing a sequence
52
+
53
+ ### Rule 4 — Lead with visuals
54
+
55
+ The first block after the title/headline should be a visual: a Stat, a Callout, or a Table. Never open with a long RichText. The user decides in 5 seconds whether to keep scrolling based on the visual.
56
+
57
+ ### Rule 5 — One headline callout
58
+
59
+ Use `<Callout tone="success|danger">` once, near the top, as the TL;DR. Everything else supports it.
60
+
61
+ ### Rule 6 — Truncate hints, not bodies
62
+
63
+ Stat `hint` props should be 1 short clause. Long hints mean the value needs to be a different block.
64
+
65
+ ## The block vocabulary — minimal reference
32
66
 
33
67
  | Block | What it shows | Required `data` |
34
68
  | --- | --- | --- |
35
- | `<RichText>` | Prose, lists, code blocks | none — body is markdown |
36
- | `<Callout tone="info\|warn\|success\|danger">` | Boxed callout | none (tone defaults to info) |
37
- | `<Stat label value trend hint />` | Big number with trend | `label`, `value` |
38
- | `<Checklist items={[...]} />` | Checkbox list | `items: [{id,label,checked}]` |
69
+ | `<RichText>` | 1-3 sentences of glue | none |
70
+ | `<Callout tone>` | Boxed TL;DR | none (tone defaults to info) |
71
+ | `<Stat label value trend hint />` | Big number + label | `label`, `value` |
72
+ | `<Checklist items />` | Checkbox list | `items: [{id,label,checked}]` |
39
73
  | `<Table columns rows />` | Tabular data | `columns: []`, `rows: [[]]` |
40
- | `<CodeTabs tabs />` | Tabbed code blocks | `tabs: [{id,label,language,code}]` |
74
+ | `<CodeTabs tabs />` | Tabbed code | `tabs: [{id,label,language,code}]` |
41
75
  | `<Decision title question options />` | Multi-option choice | `options: [{id,label,detail,recommended?}]` |
42
76
  | `<OpenQuestions questions />` | Unanswered questions | `questions: [{id,label,kind,options?}]` |
43
- | `<FileTree title entries />` | File-by-file change list | `entries: [{path,change,note?}]` |
44
- | `<Diff before after filename language mode />` | Before/after diff | `before`, `after` |
77
+ | `<FileTree title entries />` | File-by-file changes | `entries: [{path,change,note?}]` |
78
+ | `<Diff before after filename language mode />` | Before/after | `before`, `after` |
45
79
  | `<Workflow steps connections />` | Node graph | `steps: [{id,label,type}]` |
46
80
  | `<Mockup title x y w h html />` | Inline UI mockup | `html` |
47
81
  | `<Diagram title dataHtml dataCss />` | Inline SVG | `dataHtml` |
48
82
 
49
- Every block needs a unique `id`. `RichText` and `Callout` use open/close tags with markdown children; everything else is self-closing.
83
+ Every block needs a unique `id`. RichText + Callout use open/close tags (markdown body); everything else is self-closing.
50
84
 
51
85
  ## Skeleton
52
86
 
53
87
  ```mdx
54
88
  <RichText id="overview">
55
- ## What this covers
89
+ ## What this is
56
90
 
57
- A one-paragraph summary.
91
+ One sentence the reader can't miss.
58
92
  </RichText>
59
93
 
60
- <Stat id="headline" label="X" value="7" trend="flat" />
94
+ <Stat id="headline" label="X shipped" value="7" trend="flat" hint="across v3.22 → v4.4.7" />
61
95
 
62
- <Callout id="warning" tone="warn">
63
- One important thing.
96
+ <Callout id="tldr" tone="success">
97
+ One-sentence TL;DR.
64
98
  </Callout>
65
99
 
100
+ <Table
101
+ id="releases"
102
+ columns={["v", "what", "fix"]}
103
+ rows={[
104
+ ["3.22", "unified", "—"],
105
+ ["4.4.1", "bg fix", "process exit crash"],
106
+ ]}
107
+ />
108
+
66
109
  <FileTree
67
110
  id="files"
68
111
  title="Files changed"
69
112
  entries={[
70
- { path: "src/foo.ts", change: "modified", note: "why" },
71
- { path: "src/bar.ts", change: "added" },
72
- ]}
73
- />
74
-
75
- <Workflow
76
- id="flow"
77
- steps={[
78
- { id: "s1", label: "Step 1", type: "task" },
79
- { id: "s2", label: "Step 2", type: "task" },
80
- ]}
81
- connections={[
82
- { from: "s1", to: "s2" },
113
+ { path: "cli/provision.mjs", change: "added", note: "unified provisioner" },
83
114
  ]}
84
115
  />
85
116
  ```
86
117
 
87
118
  ## The 5 things that break a glyph
88
119
 
89
- Read this BEFORE writing. Each one is a real bug we've shipped.
120
+ These shipped as bugs. Read before writing.
90
121
 
91
122
  ### 1. Backticks inside attribute strings
92
123
 
93
- The parser scans for `` ` `` to delimit template literals. A literal backtick inside a string — even inside double-quotes closes the surrounding context and breaks parsing.
124
+ The parser scans for `` ` `` and breaks. Use straight quotes or rephrase:
94
125
 
95
126
  ```
96
127
  WRONG: Run `bizar install` to bootstrap.
97
128
  RIGHT: Run 'bizar install' to bootstrap.
98
- RIGHT: Run the installer to bootstrap.
99
129
  ```
100
130
 
101
- ### 2. The parser doesn't track strings when counting braces
131
+ ### 2. Braces inside string values
102
132
 
103
- `{` and `}` inside string values still increment the brace depth walker. With brace-laden strings the walker terminates at the wrong closing brace and the value gets truncated.
133
+ The brace counter doesn't know about strings. `{` / `}` in notes still bump depth. Keep note strings brace-free.
104
134
 
105
- **Rule:** keep string values brace-free. If you must use `{...}` in a note, escape or rephrase.
135
+ ### 3. `FileTree` `change` must be exact
106
136
 
107
- ### 3. `FileTree` `change` field must be exact
137
+ `added | modified | removed | renamed`. Empty string or `null` crashes on `t.bg`. Default to `modified` with a `note` when unclear.
108
138
 
109
- `change` must be `added` | `modified` | `removed` | `renamed`. Anything else (empty string, `null`, typo) makes the renderer crash on `t.bg`.
139
+ ### 4. Duplicate block ids
110
140
 
111
- ```
112
- WRONG: change: null, change: "", change: "Modified"
113
- RIGHT: change: "modified"
114
- ```
115
-
116
- When in doubt, use `modified` with a `note` that explains why.
117
-
118
- ### 4. Two blocks with the same id
141
+ Comment pins and error reporting key off ids. Two blocks with the same id collide.
119
142
 
120
- Comment pins and error reporting are keyed by block id. Duplicates collide. Each `id` must be unique within a glyph.
143
+ ### 5. `## Heading <768px`
121
144
 
122
- ### 5. MDX heading with `<N`
123
-
124
- ```
125
- WRONG: ## Mobile <768px ← <7 looks like a malformed tag
126
- RIGHT: ## Mobile (under 768px)
127
- RIGHT: ## Mobile: under 768px
128
- ```
145
+ The parser sees `<7` as a malformed JSX tag. Use parentheses or colons.
129
146
 
130
147
  ## Validate before shipping
131
148
 
@@ -134,14 +151,13 @@ node -e "import('./bizar-dash/src/server/glyphs/mdx-compiler.mjs').then(m => { \
134
151
  const fs = require('node:fs'); \
135
152
  const out = m.compileGlyphMdxSync(fs.readFileSync('artifacts/<slug>/artifact.mdx','utf8')); \
136
153
  console.log('blocks:', out.blocks.length, 'errors:', out.errors.length); \
137
- out.errors.forEach(e => console.error(' line', e.line, ':', e.message)); \
138
154
  })"
139
155
  ```
140
156
 
141
- If errors > 0, fix the MDX before opening the glyph in the browser. When a block DOES fail in the browser, v4.4.8+ shows a red banner with block id + error message — no more blank screen.
157
+ Also check yourself: does it fit on one screen? Are there any 4-sentence RichText blocks? Are the stats/tables/file trees doing the heavy lifting? If not, rewrite.
142
158
 
143
159
  ## See also
144
160
 
145
161
  - `bizar-dash/src/server/glyphs/mdx-compiler.mjs` — parser
146
- - `bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx` — React renderer (has the error banner)
147
- - `bizar-dash/src/web/views/glyphs/components.tsx` — block component implementations
162
+ - `bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx` — React renderer (has error banner)
163
+ - `bizar-dash/src/web/views/glyphs/components.tsx` — block implementations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "4.4.9",
3
+ "version": "4.4.10",
4
4
  "description": "Norse-pantheon multi-agent system for opencode — 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. v4 ships as a single npm package bundling the dashboard server, opencode plugin, and typed SDK.",
5
5
  "type": "module",
6
6
  "bin": {