@vpxa/aikit 0.1.132 → 0.1.134

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.
@@ -1626,6 +1626,25 @@ Icons appear automatically in step nodes. No configuration needed — the viewer
1626
1626
  3. Order by dependency graph — a step should only reference concepts from prior steps
1627
1627
  4. Aim for 5-12 steps per tour (more → split into multiple tours)
1628
1628
  5. Each step teaches exactly ONE concept
1629
+
1630
+ ### Interactive C4 Architecture Visualization
1631
+
1632
+ For architecture documentation, generate interactive C4 diagrams using the shipped **c4-viewer.html** from the \`c4-architecture\` skill.
1633
+
1634
+ **Integration with docs skill:**
1635
+ - Architecture docs in \`docs/architecture/\` MUST have interactive HTML companions in \`docs/architecture/interactive/\`
1636
+ - Use the \`c4-architecture\` skill to generate C4 viewer HTML — it handles JSON schema, ReactFlow rendering, and ELK auto-layout
1637
+ - The \`c4-architecture\` skill provides: zoom/pan, node search, detail panels, drag-to-rearrange, and professional styling
1638
+
1639
+ **Workflow:**
1640
+ 1. During Phase 5 (Domain Docs), identify system-level architecture views
1641
+ 2. For EACH architecture view (system context, container, component):
1642
+ - Generate C4 JSON data: \`{nodes: [{id, label, type, description, technology}], edges: [{from, to, label}]}\`
1643
+ - Use the \`c4-architecture\` skill to render interactive HTML
1644
+ - Save to \`docs/architecture/interactive/{view-name}.html\`
1645
+ 3. Cross-reference: link from markdown docs to interactive viewers
1646
+
1647
+ **CRITICAL:** NEVER generate architecture HTML from scratch. ALWAYS use the shipped c4-viewer.html via the \`c4-architecture\` skill. Hand-crafted HTML will be inconsistent and unprofessional.
1629
1648
  ## Documentation Generation Prompts
1630
1649
 
1631
1650
  Structured LLM prompt templates for generating high-quality documentation. Each produces strict JSON for consistent, parseable output.
@@ -1785,7 +1804,7 @@ graph({ action: "find_nodes" }) # Full module graph
1785
1804
  4. Output: layers.json used by tour generation
1786
1805
  \`\`\`
1787
1806
 
1788
- ### Phase 4 — Generate Tours (2-phase)
1807
+ ### Phase 4 — Generate Tours (3-phase)
1789
1808
  \`\`\`
1790
1809
  # Phase 4a: Deterministic ranking
1791
1810
  1. Compute node rankings (in-degree, centrality, layer)
@@ -1794,8 +1813,17 @@ graph({ action: "find_nodes" }) # Full module graph
1794
1813
 
1795
1814
  # Phase 4b: LLM narrative
1796
1815
  1. Apply Tour Generation Prompt with rankings from 4a
1797
- 2. Generate both Mermaid tour diagram AND tour JSON data for shipped viewer
1798
- 3. Output: docs/tours/getting-started.md + docs/tours/interactive/
1816
+ 2. Generate Mermaid tour diagram for markdown docs
1817
+ 3. Generate tour JSON data matching the shipped viewer schema
1818
+ 4. Output: docs/tours/{name}.md (markdown with Mermaid diagram)
1819
+
1820
+ # Phase 4c: Interactive HTML generation (MANDATORY)
1821
+ 1. For EACH tour generated in 4b:
1822
+ - Read the shipped tour-viewer.html from assets
1823
+ - Inject the tour JSON into the viewer's data block
1824
+ - Save to docs/tours/interactive/{name}.html
1825
+ 2. These interactive HTML files are MANDATORY — never skip this step
1826
+ 3. The result is a professional ReactFlow-based tour with step navigation, code panels, and BFS layout
1799
1827
  \`\`\`
1800
1828
 
1801
1829
  ### Phase 5 — Generate Domain Docs (LLM-assisted)
@@ -1807,13 +1835,33 @@ graph({ action: "find_nodes" }) # Full module graph
1807
1835
  4. Output: docs/architecture/domains/{domain}.md
1808
1836
  \`\`\`
1809
1837
 
1810
- ### Phase 6 — Validate & Cross-Reference
1838
+ ### Phase 6 — Interactive Architecture HTML (MANDATORY)
1839
+ \`\`\`
1840
+ # Generate professional interactive C4 viewers for architecture documentation
1841
+ 1. Identify architecture views from Phase 3 (layers) and Phase 5 (domain analysis):
1842
+ - System Context: overall system boundaries and external actors
1843
+ - Container: major deployable units and their relationships
1844
+ - Component: internal structure of key containers
1845
+ 2. For EACH architecture view:
1846
+ - Generate C4 JSON data (nodes + edges with types and descriptions)
1847
+ - Use the c4-architecture skill to produce interactive HTML with ELK auto-layout
1848
+ - Save to docs/architecture/interactive/{view-name}.html
1849
+ 3. Add navigation links:
1850
+ - From docs/architecture/overview.md → link to interactive viewers
1851
+ - From tour steps that reference architecture → link to relevant C4 view
1852
+ 4. Generate documentation hub:
1853
+ - Use the present tool's docs-browser block type to create a navigable index
1854
+ - Include all markdown docs with status indicators and links to interactive companions
1855
+ \`\`\`
1856
+
1857
+ ### Phase 7 — Validate & Cross-Reference
1811
1858
  \`\`\`
1812
1859
  # Ensure consistency
1813
1860
  1. Check all internal doc links resolve
1814
1861
  2. Verify code references still exist (file:line citations)
1815
1862
  3. Cross-reference tour steps with actual files
1816
1863
  4. check({}) to ensure no build breaks
1864
+ 5. Verify all interactive HTML files open correctly and contain valid JSON data
1817
1865
  \`\`\`
1818
1866
 
1819
1867
  ### Output Structure
@@ -1,4 +1,4 @@
1
- const e="| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `viewer-link` | Styled card linking to a standalone interactive viewer. | `{ viewerType: string; label: string; description?: string; url?: string; icon?: string }` |\n| `docs-browser` | Collapsible file tree with markdown content for documentation browsing. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n| `text` | Plain text content rendered through the markdown parser. | `string` |\n| `heading` | Single heading with configurable level from h1 to h6. | `string` |\n| `paragraph` | Single paragraph rendered inside a p tag. | `string` |\n| `separator` | Horizontal rule used to separate adjacent blocks. | `undefined` |\n| `actions` | Action bar containing button and select action definitions. | `Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>` |\n\n### Usage Examples\n\n#### `viewer-link`\n\n```typescript\n{\n type: 'viewer-link',\n value: {\n viewerType: 'c4',\n label: 'Open Interactive C4 Diagram',\n description: 'Drag, zoom, and pan with ELK auto-layout',\n icon: '🏗️',\n },\n}\n```\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",t=` - type:"markdown" → value: string
1
+ const e="| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `docs-browser` | Documentation file list with inline content previews for chat-safe rendering. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n| `text` | Plain text content rendered through the markdown parser. | `string` |\n| `heading` | Single heading with configurable level from h1 to h6. | `string` |\n| `paragraph` | Single paragraph rendered inside a p tag. | `string` |\n| `separator` | Horizontal rule used to separate adjacent blocks. | `undefined` |\n| `actions` | Action bar containing button and select action definitions. | `Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>` |\n\n### Usage Examples\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",t=` - type:"markdown" → value: string
2
2
  - type:"code" → value: string
3
3
  - type:"mermaid" → value: string
4
4
  - type:"table" → value: Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }
@@ -13,69 +13,9 @@ const e="| Type | Description | Value Shape |\n|------|-------------|-----------
13
13
  - type:"status-board" → value: Array<{category, items}> | {items: Array<{category, items}>}
14
14
  - type:"prompt" → value: unknown
15
15
  - type:"progress" → value: {label, value, max?} | {items: Array<{label, value, max?, color?}>}
16
- - type:"viewer-link" → value: { viewerType: string; label: string; description?: string; url?: string; icon?: string }
17
16
  - type:"docs-browser" → value: { files: Array<{ path: string; title?: string; content?: string; status?: "current" | "stale" | "missing" }>; title?: string }
18
17
  - type:"text" → value: string
19
18
  - type:"heading" → value: string
20
19
  - type:"paragraph" → value: string
21
20
  - type:"separator" → value: undefined
22
- - type:"actions" → value: Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>`,n={present:"| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `viewer-link` | Styled card linking to a standalone interactive viewer. | `{ viewerType: string; label: string; description?: string; url?: string; icon?: string }` |\n| `docs-browser` | Collapsible file tree with markdown content for documentation browsing. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `viewer-link`\n\n```typescript\n{\n type: 'viewer-link',\n value: {\n viewerType: 'c4',\n label: 'Open Interactive C4 Diagram',\n description: 'Drag, zoom, and pan with ELK auto-layout',\n icon: '🏗️',\n },\n}\n```\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",docs:`| Type | Description | Value Shape |
23
- |------|-------------|-------------|
24
- | \`markdown\` | Markdown content rendered with the marked parser. | \`string\` |
25
- | \`code\` | Formatted code block rendered inside pre/code tags. | \`string\` |
26
- | \`mermaid\` | Mermaid diagram source rendered in a mermaid pre block. | \`string\` |
27
- | \`table\` | Tabular data rendered from records or explicit headers and rows. | \`Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }\` |
28
- | \`cards\` | Card grid for titled items with optional body, badge, and status. | \`Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>\` |
29
- | \`viewer-link\` | Styled card linking to a standalone interactive viewer. | \`{ viewerType: string; label: string; description?: string; url?: string; icon?: string }\` |
30
- | \`docs-browser\` | Collapsible file tree with markdown content for documentation browsing. | \`{ files: Array<{ path: string; title?: string; content?: string; status?: "current" | "stale" | "missing" }>; title?: string }\` |
31
-
32
- ### Usage Examples
33
-
34
- #### \`viewer-link\`
35
-
36
- \`\`\`typescript
37
- {
38
- type: 'viewer-link',
39
- value: {
40
- viewerType: 'c4',
41
- label: 'Open Interactive C4 Diagram',
42
- description: 'Drag, zoom, and pan with ELK auto-layout',
43
- icon: '🏗️',
44
- },
45
- }
46
- \`\`\`
47
-
48
- #### \`docs-browser\`
49
-
50
- \`\`\`typescript
51
- {
52
- type: 'docs-browser',
53
- value: {
54
- title: 'Project Docs',
55
- files: [
56
- { path: 'docs/README.md', title: 'Overview', status: 'current' },
57
- { path: 'docs/api.md', title: 'API Reference', status: 'stale' },
58
- ],
59
- },
60
- }
61
- \`\`\``,"c4-architecture":`| Type | Description | Value Shape |
62
- |------|-------------|-------------|
63
- | \`mermaid\` | Mermaid diagram source rendered in a mermaid pre block. | \`string\` |
64
- | \`graph\` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | \`{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }\` |
65
- | \`viewer-link\` | Styled card linking to a standalone interactive viewer. | \`{ viewerType: string; label: string; description?: string; url?: string; icon?: string }\` |
66
-
67
- ### Usage Examples
68
-
69
- #### \`viewer-link\`
70
-
71
- \`\`\`typescript
72
- {
73
- type: 'viewer-link',
74
- value: {
75
- viewerType: 'c4',
76
- label: 'Open Interactive C4 Diagram',
77
- description: 'Drag, zoom, and pan with ELK auto-layout',
78
- icon: '🏗️',
79
- },
80
- }
81
- \`\`\``};export{e as ALL_BLOCK_DOCS,n as BLOCK_DOCS_BY_SKILL,t as BLOCK_TYPE_LIST};
21
+ - type:"actions" → value: Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>`,n={present:"| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `docs-browser` | Documentation file list with inline content previews for chat-safe rendering. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",docs:"| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `docs-browser` | Documentation file list with inline content previews for chat-safe rendering. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```","c4-architecture":"| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |"};export{e as ALL_BLOCK_DOCS,n as BLOCK_DOCS_BY_SKILL,t as BLOCK_TYPE_LIST};
@@ -1,13 +1,13 @@
1
1
  // AUTO-GENERATED - do not edit manually.
2
2
  // Source: packages/server/src/tools/present/block-registry.ts
3
- // Generated at: 2026-05-10T13:32:40.767Z
3
+ // Generated at: 2026-05-10T17:01:50.322Z
4
4
 
5
- export const ALL_BLOCK_DOCS = "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `viewer-link` | Styled card linking to a standalone interactive viewer. | `{ viewerType: string; label: string; description?: string; url?: string; icon?: string }` |\n| `docs-browser` | Collapsible file tree with markdown content for documentation browsing. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n| `text` | Plain text content rendered through the markdown parser. | `string` |\n| `heading` | Single heading with configurable level from h1 to h6. | `string` |\n| `paragraph` | Single paragraph rendered inside a p tag. | `string` |\n| `separator` | Horizontal rule used to separate adjacent blocks. | `undefined` |\n| `actions` | Action bar containing button and select action definitions. | `Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>` |\n\n### Usage Examples\n\n#### `viewer-link`\n\n```typescript\n{\n type: 'viewer-link',\n value: {\n viewerType: 'c4',\n label: 'Open Interactive C4 Diagram',\n description: 'Drag, zoom, and pan with ELK auto-layout',\n icon: '🏗️',\n },\n}\n```\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```";
5
+ export const ALL_BLOCK_DOCS = "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `docs-browser` | Documentation file list with inline content previews for chat-safe rendering. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n| `text` | Plain text content rendered through the markdown parser. | `string` |\n| `heading` | Single heading with configurable level from h1 to h6. | `string` |\n| `paragraph` | Single paragraph rendered inside a p tag. | `string` |\n| `separator` | Horizontal rule used to separate adjacent blocks. | `undefined` |\n| `actions` | Action bar containing button and select action definitions. | `Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>` |\n\n### Usage Examples\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```";
6
6
 
7
- export const BLOCK_TYPE_LIST = " - type:\"markdown\" → value: string\n - type:\"code\" → value: string\n - type:\"mermaid\" → value: string\n - type:\"table\" → value: Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }\n - type:\"metrics\" → value: Array<{ label: string; value: string | number; trend?: string | number; status?: string }>\n - type:\"cards\" → value: Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>\n - type:\"tree\" → value: { name: string; children?: unknown[] } | Record<string, unknown>\n - type:\"graph\" → value: { nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }\n - type:\"chart\" → value: { chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }\n - type:\"timeline\" → value: Array<{ title: string; description?: string; timestamp?: string; status?: string }>\n - type:\"checklist\" → value: Array<{label, checked}> | {items: Array<{label, checked}>}\n - type:\"comparison\" → value: Array<{title, items}> | {columns: Array<{title, items}>}\n - type:\"status-board\" → value: Array<{category, items}> | {items: Array<{category, items}>}\n - type:\"prompt\" → value: unknown\n - type:\"progress\" → value: {label, value, max?} | {items: Array<{label, value, max?, color?}>}\n - type:\"viewer-link\" → value: { viewerType: string; label: string; description?: string; url?: string; icon?: string }\n - type:\"docs-browser\" → value: { files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }\n - type:\"text\" → value: string\n - type:\"heading\" → value: string\n - type:\"paragraph\" → value: string\n - type:\"separator\" → value: undefined\n - type:\"actions\" → value: Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>";
7
+ export const BLOCK_TYPE_LIST = " - type:\"markdown\" → value: string\n - type:\"code\" → value: string\n - type:\"mermaid\" → value: string\n - type:\"table\" → value: Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }\n - type:\"metrics\" → value: Array<{ label: string; value: string | number; trend?: string | number; status?: string }>\n - type:\"cards\" → value: Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>\n - type:\"tree\" → value: { name: string; children?: unknown[] } | Record<string, unknown>\n - type:\"graph\" → value: { nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }\n - type:\"chart\" → value: { chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }\n - type:\"timeline\" → value: Array<{ title: string; description?: string; timestamp?: string; status?: string }>\n - type:\"checklist\" → value: Array<{label, checked}> | {items: Array<{label, checked}>}\n - type:\"comparison\" → value: Array<{title, items}> | {columns: Array<{title, items}>}\n - type:\"status-board\" → value: Array<{category, items}> | {items: Array<{category, items}>}\n - type:\"prompt\" → value: unknown\n - type:\"progress\" → value: {label, value, max?} | {items: Array<{label, value, max?, color?}>}\n - type:\"docs-browser\" → value: { files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }\n - type:\"text\" → value: string\n - type:\"heading\" → value: string\n - type:\"paragraph\" → value: string\n - type:\"separator\" → value: undefined\n - type:\"actions\" → value: Array<{ type: string; id: string; label: string; variant?: string; options?: Array<string | { label: string; value: string }> }>";
8
8
 
9
9
  export const BLOCK_DOCS_BY_SKILL = {
10
- "present": "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `viewer-link` | Styled card linking to a standalone interactive viewer. | `{ viewerType: string; label: string; description?: string; url?: string; icon?: string }` |\n| `docs-browser` | Collapsible file tree with markdown content for documentation browsing. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `viewer-link`\n\n```typescript\n{\n type: 'viewer-link',\n value: {\n viewerType: 'c4',\n label: 'Open Interactive C4 Diagram',\n description: 'Drag, zoom, and pan with ELK auto-layout',\n icon: '🏗️',\n },\n}\n```\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",
11
- "docs": "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `viewer-link` | Styled card linking to a standalone interactive viewer. | `{ viewerType: string; label: string; description?: string; url?: string; icon?: string }` |\n| `docs-browser` | Collapsible file tree with markdown content for documentation browsing. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `viewer-link`\n\n```typescript\n{\n type: 'viewer-link',\n value: {\n viewerType: 'c4',\n label: 'Open Interactive C4 Diagram',\n description: 'Drag, zoom, and pan with ELK auto-layout',\n icon: '🏗️',\n },\n}\n```\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",
12
- "c4-architecture": "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `viewer-link` | Styled card linking to a standalone interactive viewer. | `{ viewerType: string; label: string; description?: string; url?: string; icon?: string }` |\n\n### Usage Examples\n\n#### `viewer-link`\n\n```typescript\n{\n type: 'viewer-link',\n value: {\n viewerType: 'c4',\n label: 'Open Interactive C4 Diagram',\n description: 'Drag, zoom, and pan with ELK auto-layout',\n icon: '🏗️',\n },\n}\n```"
10
+ "present": "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `metrics` | Metric cards showing label/value pairs with optional trend and status. | `Array<{ label: string; value: string | number; trend?: string | number; status?: string }>` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `tree` | Hierarchical object or name/children tree rendered recursively. | `{ name: string; children?: unknown[] } | Record<string, unknown>` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |\n| `chart` | Structured chart definition rendered as SVG. | `{ chartType: string; data: Record<string, unknown>[]; xKey: string; yKeys: string[] }` |\n| `timeline` | Timeline entries rendered as a vertical sequence of events. | `Array<{ title: string; description?: string; timestamp?: string; status?: string }>` |\n| `checklist` | Checklist items with boolean checked state. | `Array<{label, checked}> | {items: Array<{label, checked}>}` |\n| `comparison` | Side-by-side comparison columns with titled item lists. | `Array<{title, items}> | {columns: Array<{title, items}>}` |\n| `status-board` | Status categories containing labeled status items. | `Array<{category, items}> | {items: Array<{category, items}>}` |\n| `prompt` | Prompt payload rendered through the prompt display helper. | `unknown` |\n| `progress` | Progress bar with current value and optional maximum. | `{label, value, max?} | {items: Array<{label, value, max?, color?}>}` |\n| `docs-browser` | Documentation file list with inline content previews for chat-safe rendering. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",
11
+ "docs": "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `markdown` | Markdown content rendered with the marked parser. | `string` |\n| `code` | Formatted code block rendered inside pre/code tags. | `string` |\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `table` | Tabular data rendered from records or explicit headers and rows. | `Record<string, unknown>[] | { headers: string[]; rows: unknown[][] }` |\n| `cards` | Card grid for titled items with optional body, badge, and status. | `Array<{ title: string; body?: string; badge?: string; status?: string; description?: string }>` |\n| `docs-browser` | Documentation file list with inline content previews for chat-safe rendering. | `{ files: Array<{ path: string; title?: string; content?: string; status?: \"current\" | \"stale\" | \"missing\" }>; title?: string }` |\n\n### Usage Examples\n\n#### `docs-browser`\n\n```typescript\n{\n type: 'docs-browser',\n value: {\n title: 'Project Docs',\n files: [\n { path: 'docs/README.md', title: 'Overview', status: 'current' },\n { path: 'docs/api.md', title: 'API Reference', status: 'stale' },\n ],\n },\n}\n```",
12
+ "c4-architecture": "| Type | Description | Value Shape |\n|------|-------------|-------------|\n| `mermaid` | Mermaid diagram source rendered in a mermaid pre block. | `string` |\n| `graph` | Node and edge graph rendered as a Mermaid flow graph in HTML mode. | `{ nodes: Array<{ id: string; label?: string }>; edges: Array<{ from: string; to: string; label?: string }> }` |"
13
13
  };