@taylorwong/ichartjs 2.0.6 → 2.0.8

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 (53) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -2
  3. package/agent-recipes/minimal-specs.json +25 -0
  4. package/docs/agent/README.md +3 -1
  5. package/docs/agent/charting-scenario.md +46 -1
  6. package/docs/agent/coding-agent-integration.md +1 -1
  7. package/docs/agent/development/iteration-12.md +101 -0
  8. package/docs/agent/development/roadmap.md +2 -1
  9. package/docs/agent/development-guide.md +1 -1
  10. package/docs/agent/diagram-scenario.md +39 -11
  11. package/docs/agent/editing-contract.md +5 -0
  12. package/docs/agent/frontend-integration.md +1 -1
  13. package/docs/agent/project-scenario.md +1 -0
  14. package/docs/agent/quickstart.md +30 -0
  15. package/docs/agent/runtime-contract.md +19 -2
  16. package/docs/agent/theme-guide.md +33 -1
  17. package/docs/agent/usage-scenarios.md +3 -1
  18. package/docs/agent/zh-CN/README.md +1 -1
  19. package/docs/agent/zh-CN/charting-scenario.md +31 -1
  20. package/docs/agent/zh-CN/coding-agent-integration.md +1 -1
  21. package/docs/agent/zh-CN/diagram-scenario.md +32 -3
  22. package/docs/agent/zh-CN/editing-contract.md +2 -0
  23. package/docs/agent/zh-CN/frontend-integration.md +1 -1
  24. package/docs/agent/zh-CN/iteration-12.md +98 -0
  25. package/docs/agent/zh-CN/quickstart.md +30 -0
  26. package/docs/agent/zh-CN/runtime-contract.md +7 -1
  27. package/docs/agent/zh-CN/theme-guide.md +33 -1
  28. package/docs/agent/zh-CN/usage-scenarios.md +3 -1
  29. package/docs/manifests/capabilities.json +42 -3
  30. package/docs/manifests/commands.json +10 -9
  31. package/docs/manifests/schemas.json +5 -2
  32. package/examples/agent-workflow.mjs +2 -1
  33. package/package.json +1 -1
  34. package/skills/ichartjs/SKILL.md +19 -9
  35. package/skills/ichartjs/references/agent-contract.md +5 -2
  36. package/skills/ichartjs/references/chart-selection.md +2 -0
  37. package/src/capabilities.mjs +83 -13
  38. package/src/charts.mjs +202 -58
  39. package/src/command.mjs +4 -3
  40. package/src/diagram-interaction.mjs +55 -11
  41. package/src/diagram.mjs +149 -36
  42. package/src/edit-controller.mjs +6 -3
  43. package/src/edit.mjs +17 -7
  44. package/src/index.mjs +44 -17
  45. package/src/layout.mjs +39 -0
  46. package/src/preferences-ui.mjs +73 -24
  47. package/src/project.mjs +64 -24
  48. package/src/renderer.mjs +2 -2
  49. package/src/scene.mjs +32 -1
  50. package/src/schema.mjs +7 -2
  51. package/src/spec.mjs +88 -6
  52. package/src/theme.mjs +1 -1
  53. package/types/index.d.ts +28 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.8 - 2026-09-20
4
+
5
+ - Hardened chart-specific encoding and field validation, including explicit Swimlane requirements and actionable diagnostics for Agents.
6
+ - Added Gauge domain contracts and clamping diagnostics, Heatmap label rendering, locale-aware temporal formatting, semantic Pie labels, and runtime health checkpoints.
7
+ - Added intent fallback suggestions, locale capability metadata, a complete minimal Spec catalog, and synchronized Agent guidance and capability manifests.
8
+
9
+ ## 2.0.7 - 2026-09-20
10
+
11
+ - Added Architecture and Mindmap chart types with shared diagram contracts, layers, boundaries, parent-child validation, deterministic tree/radial layouts, and Agent-readable schemas and capabilities.
12
+ - Added renderer-parity edge selection and editing, persistent manual waypoints, obstacle-aware routing, and true cubic-Bezier Mindmap edges while keeping navigation and editing disabled by default.
13
+ - Improved chart layout reflow, diagram connection routing, label spacing, legend and branding controls, and compact chart preference behavior.
14
+ - Fixed chart settings placement so scrolling preserves the selected side without viewport snapping and closes the menu directly after its anchor leaves the viewport.
15
+
3
16
  ## 2.0.6 - 2026-09-18
4
17
 
5
18
  - Added compact per-chart visual settings with explicit default font sizing, capability-aware visibility toggles, bilingual labels, and theme-aware hamburger icon contrast.
package/README.md CHANGED
@@ -40,7 +40,7 @@ getCapabilities
40
40
  npm install @taylorwong/ichartjs@^2
41
41
  ```
42
42
 
43
- As a fallback for environments without npm access, install directly from GitHub: `npm install github:wanghetommy/ichartjs#v2.0.6`.
43
+ As a fallback for environments without npm access, install directly from GitHub: `npm install github:wanghetommy/ichartjs#v2.0.8`.
44
44
 
45
45
  ### Optional Agent Skill
46
46
 
@@ -62,7 +62,7 @@ For a non-interactive global Codex installation:
62
62
  npx skills add wanghetommy/ichartjs --skill ichartjs --agent codex --global --yes
63
63
  ```
64
64
 
65
- For a release-pinned installation, use `npx skills add https://github.com/wanghetommy/ichartjs/tree/v2.0.6/skills/ichartjs --agent codex --global --yes`. WorkBuddy users can import the same tagged `skills/ichartjs` URL through the host's Skill interface; do not assume a `--agent workbuddy` adapter unless the installed CLI declares it. Package consumers can still copy `node_modules/@taylorwong/ichartjs/skills/ichartjs` as a manual fallback. After installation, invoke `$ichartjs` when named Skill invocation is supported, or select `ichartjs` in the host UI.
65
+ For a release-pinned installation, use `npx skills add https://github.com/wanghetommy/ichartjs/tree/v2.0.8/skills/ichartjs --agent codex --global --yes`. WorkBuddy users can import the same tagged `skills/ichartjs` URL through the host's Skill interface; do not assume a `--agent workbuddy` adapter unless the installed CLI declares it. Package consumers can still copy `node_modules/@taylorwong/ichartjs/skills/ichartjs` as a manual fallback. After installation, invoke `$ichartjs` when named Skill invocation is supported, or select `ichartjs` in the host UI.
66
66
 
67
67
  ### Agent workflow
68
68
 
@@ -0,0 +1,25 @@
1
+ {
2
+ "version": "2.0",
3
+ "name": "minimal-specs",
4
+ "description": "Small validated starting Specs for every public iChart.js chart type.",
5
+ "examples": {
6
+ "line": { "type": "line", "renderer": "svg", "data": [{ "id": "jan", "month": "Jan", "value": 12 }], "encoding": { "x": { "field": "month" }, "y": { "field": "value" } } },
7
+ "area": { "type": "area", "renderer": "svg", "data": [{ "id": "jan", "month": "Jan", "value": 12 }], "encoding": { "x": { "field": "month" }, "y": { "field": "value" } } },
8
+ "bar": { "type": "bar", "renderer": "svg", "data": [{ "id": "a", "name": "A", "value": 12 }], "encoding": { "x": { "field": "name" }, "y": { "field": "value" } } },
9
+ "column": { "type": "column", "renderer": "svg", "data": [{ "id": "a", "name": "A", "value": 12 }], "encoding": { "x": { "field": "name" }, "y": { "field": "value" } } },
10
+ "pie": { "type": "pie", "renderer": "svg", "data": [{ "id": "a", "name": "A", "value": 12 }] },
11
+ "scatter": { "type": "scatter", "renderer": "svg", "data": [{ "id": "a", "x": 1, "y": 12 }], "encoding": { "x": { "field": "x" }, "y": { "field": "y" } } },
12
+ "funnel": { "type": "funnel", "renderer": "svg", "data": [{ "id": "visit", "name": "Visit", "value": 100 }] },
13
+ "gauge": { "type": "gauge", "renderer": "svg", "domain": [0, 100], "data": [{ "id": "completion", "name": "Completion", "value": 72 }] },
14
+ "heatmap": { "type": "heatmap", "renderer": "svg", "data": [{ "id": "a", "x": "Mon", "y": "AM", "value": 12 }], "encoding": { "x": { "field": "x" }, "y": { "field": "y" }, "color": { "field": "value" } } },
15
+ "radar": { "type": "radar", "renderer": "svg", "indicators": [{ "name": "Quality", "field": "quality", "min": 0, "max": 100 }, { "name": "Speed", "field": "speed", "min": 0, "max": 100 }, { "name": "Coverage", "field": "coverage", "min": 0, "max": 100 }], "data": [{ "id": "team-a", "quality": 80, "speed": 70, "coverage": 90 }] },
16
+ "gantt": { "type": "gantt", "renderer": "svg", "data": [{ "id": "task-a", "name": "Task A", "start": "2026-09-01", "end": "2026-09-03" }] },
17
+ "timeline": { "type": "timeline", "renderer": "svg", "data": [{ "id": "event-a", "date": "2026-09-01", "title": "Kickoff" }] },
18
+ "milestone": { "type": "milestone", "renderer": "svg", "data": [{ "id": "release", "date": "2026-09-19", "title": "Release" }] },
19
+ "burndown": { "type": "burndown", "renderer": "svg", "data": [{ "id": "day-1", "date": "2026-09-01", "remaining": 10 }, { "id": "day-2", "date": "2026-09-02", "remaining": 0 }] },
20
+ "flow": { "type": "flow", "renderer": "svg", "nodes": [{ "id": "start", "label": "Start" }, { "id": "done", "label": "Done" }], "edges": [{ "id": "start-done", "from": "start", "to": "done" }] },
21
+ "swimlane": { "type": "swimlane", "renderer": "svg", "lanes": [{ "id": "team", "label": "Team" }], "nodes": [{ "id": "task", "label": "Task", "laneId": "team" }], "edges": [] },
22
+ "architecture": { "type": "architecture", "renderer": "svg", "nodes": [{ "id": "api", "label": "API" }, { "id": "db", "label": "Database" }], "edges": [{ "id": "api-db", "from": "api", "to": "db" }] },
23
+ "mindmap": { "type": "mindmap", "renderer": "svg", "nodes": [{ "id": "root", "label": "Goal" }, { "id": "child", "label": "Next step", "parentId": "root" }], "edges": [] }
24
+ }
25
+ }
@@ -17,7 +17,7 @@ This is the user-facing Agent entry point for iChart.js 2.0. Read this file firs
17
17
  - [Visual Style and Themes](theme-guide.md): automatic matching, presets, palettes, switching, and contrast checks.
18
18
  - [Data Charting](charting-scenario.md): generic data analysis charts.
19
19
  - [Project Management](project-scenario.md): Gantt, Timeline, Milestone, and Burndown.
20
- - [Interactive Diagrams](diagram-scenario.md): Flow, Swimlane, Groups, Ports, and editing.
20
+ - [Interactive Diagrams](diagram-scenario.md): Flow, Swimlane, Architecture, Mindmap, Groups, Ports, and editing.
21
21
  - [Runtime Contract](runtime-contract.md): shared Spec, renderer, interaction, and export rules.
22
22
  - [Editing Contract](editing-contract.md): schemas, commands, preview, commit, and undo/redo.
23
23
  - Machine-readable capability manifests are in `docs/manifests/` and should be loaded on demand.
@@ -56,6 +56,8 @@ For a visual overview of all supported chart types, open `playground/project-gal
56
56
  - Prefer `canvas` when rendering many marks or targeting lower-power devices.
57
57
  - Use `gantt`, `timeline`, `milestone`, or `burndown` for project delivery views.
58
58
  - Use `flow` or `swimlane` for process, ownership, and responsibility views.
59
+ - Use `architecture` for business, data, and technical system structures with declared layers and boundaries.
60
+ - Use `mindmap` for hierarchical ideas, with stable `parentId` references and tree or radial layout.
59
61
  - Do not generate `map` or `3d` Specs unless `getCapabilities()` declares them.
60
62
 
61
63
  ## Error handling
@@ -26,6 +26,47 @@ Agent usage and development guide for generic data analysis and metric visualiza
26
26
  - Heatmap treats missing values separately from numeric zero through `colorScale.missing`.
27
27
  - Radar should declare `min` and `max` for every indicator; omitted or mixed-unit domains produce warnings.
28
28
 
29
+ ## Configuration Placement
30
+
31
+ `encoding` describes field roles and series semantics. Keep these options at the Spec level:
32
+
33
+ | Concern | Correct location | Applies to |
34
+ | --- | --- | --- |
35
+ | Axis title and format | `xAxis.title/format`, `yAxis.title/format` | Line, Area, Bar, Column, Scatter |
36
+ | Readable numeric domain | `yAxis.nice`, `yAxis.ticks`, `yAxis.domain` | Line, Area, Bar, Column, Scatter |
37
+ | Data labels | `labels.enabled/format` | Charts that declare `labels` in capabilities |
38
+ | Legend | `legend.visible/position` | Multi-series Cartesian, Pie, and Radar |
39
+ | Gauge domain | `domain: [min, max]` | Gauge |
40
+ | Heatmap color domain | `colorScale.domain` | Heatmap |
41
+ | Radar indicator domain | `indicators[].min/max` | Radar |
42
+
43
+ Do not put `title`, `format`, `labels`, or `legend` under `encoding`; `validateSpec()` reports those placements as warnings. Numeric y-axes use readable domains by default (`nice: true`, `ticks: "auto"`). Use `yAxis.domain: [min, max]` for an explicit range, or `yAxis.nice: false` to retain the raw boundary. `xAxis.min/max` and `xAxis.domain` are unsupported for categorical/time layouts and produce a structured warning.
44
+
45
+ ## Encoding Contracts
46
+
47
+ Use only the channels declared for the selected chart: Cartesian charts use `encoding.x` and `encoding.y`; Pie, Funnel, and Gauge use `encoding.category` and `encoding.value`; Heatmap uses `encoding.x`, `encoding.y`, and `encoding.color`; Radar uses `indicators[].field`. `validateSpec()` reports `UNSUPPORTED_ENCODING_CHANNEL` for an unused channel and `MISSING_ENCODING_FIELD` when a referenced field is absent. Gauge additionally requires `domain: [min, max]`; values outside the domain are clamped for the rendered arc and report `VALUE_CLAMPED`.
48
+
49
+ The complete set of small starting Specs is available at `@taylorwong/ichartjs/recipes/minimal-specs`.
50
+
51
+ ## Intent Vocabulary
52
+
53
+ Pass an exact value from `getCapabilities().intents` to `planChart()`. Common mappings are:
54
+
55
+ | User need | Registered intent | Primary chart |
56
+ | --- | --- | --- |
57
+ | Trend over time | `trend` or `time-series` | Line |
58
+ | Compare categories | `comparison` | Bar |
59
+ | Rank categories | `ranking` | Bar |
60
+ | Distribution or histogram | `distribution` | Column with `bin` transform |
61
+ | Relationship or correlation | `relationship` or `correlation` | Scatter |
62
+ | Composition | `composition` | Column or Area |
63
+ | Matrix intensity | `matrix` or `correlation-grid` | Heatmap |
64
+ | Profile across measures | `multidimensional` or `profile` | Radar |
65
+
66
+ Natural-language prose such as `trend over time` is not an intent token. Map it to `trend` first. An unknown token returns `UNKNOWN_INTENT` plus a fallback plan; never ignore that warning.
67
+
68
+ Unknown intent plans expose `intentKnown: false`, `fallbackUsed: true`, and deterministic `intentSuggestions`. Use those fields to remap the request or ask for confirmation instead of silently accepting the fallback chart.
69
+
29
70
  ## Agent Workflow
30
71
 
31
72
  1. Call `inspectData(data)` to identify fields and missing values.
@@ -33,6 +74,10 @@ Agent usage and development guide for generic data analysis and metric visualiza
33
74
  3. Create a JSON-serializable Chart Spec.
34
75
  4. Call `validateSpec(spec)` before `createChart(spec)`.
35
76
  5. Inspect the result with `chart.describe()` and `chart.getState()`.
77
+ 6. Add stable string `id` values to rows when lineage checks, linked selection, or later updates matter.
78
+ 7. Check `chart.getState().health.renderable`, `health.status`, and `warnings` before presenting the result. `ready` means no material diagnostic is active; `degraded` means the chart rendered with a material warning; `empty` means it has no meaningful result.
79
+
80
+ `locale` defaults to `en-US` and controls axis, label, tooltip, and export formatting. Set `locale: "zh-CN"` for Chinese output. Input dates should remain ISO-8601 strings; natural-language date parsing is not part of the runtime contract.
36
81
 
37
82
  ## Minimal Spec
38
83
 
@@ -41,7 +86,7 @@ Agent usage and development guide for generic data analysis and metric visualiza
41
86
  type: 'line',
42
87
  renderer: 'svg',
43
88
  container: '#chart',
44
- data: { values: [{ month: 'Jan', sales: 120 }] },
89
+ data: { values: [{ id: 'jan', month: 'Jan', sales: 120 }] },
45
90
  encoding: {
46
91
  x: { field: 'month', type: 'category' },
47
92
  y: { field: 'sales', type: 'quantitative' }
@@ -33,7 +33,7 @@ Install the official Skill with the standard Agent Skills CLI:
33
33
  npx skills add wanghetommy/ichartjs --skill ichartjs
34
34
  ```
35
35
 
36
- For global non-interactive Codex setup, append `--agent codex --global --yes`. To pin the released workflow, install `https://github.com/wanghetommy/ichartjs/tree/v2.0.6/skills/ichartjs`. WorkBuddy can import that tagged directory through its Skill interface; only use a host-specific `--agent` value when the installed CLI declares it.
36
+ For global non-interactive Codex setup, append `--agent codex --global --yes`. To pin the released workflow, install `https://github.com/wanghetommy/ichartjs/tree/v2.0.8/skills/ichartjs`. WorkBuddy can import that tagged directory through its Skill interface; only use a host-specific `--agent` value when the installed CLI declares it.
37
37
 
38
38
  Verify discovery with `npx skills add wanghetommy/ichartjs --list`; the result should include `ichartjs`.
39
39
 
@@ -0,0 +1,101 @@
1
+ # Iteration 12 — Structured Diagrams: Architecture and Mindmap
2
+
3
+ Release status: Iteration 12A–12G is included in `v2.0.7`.
4
+
5
+ Iteration 12 extends the existing Flow/Swimlane diagram runtime with two structured-diagram modes. Architecture diagrams and mindmaps share the same JSON-safe nodes, edges, layout, interaction, export, and Agent contracts; they are not separate renderer implementations.
6
+
7
+ ## 12A — Shared Structured Diagram Model
8
+
9
+ - Reuse stable node IDs, edges, groups, ports, positions, sizes, routing, selection, keyboard navigation, history, Canvas/SVG rendering, and JSON/SVG/PNG export.
10
+ - Normalize `diagram.mode` as `process`, `architecture`, or `mindmap`.
11
+ - Derive mindmap parent-child edges from `node.parentId` while preserving explicit edges.
12
+ - Validate missing parents, self-parenting, duplicate IDs, layer references, and mindmap cycles.
13
+ - Keep `validateDiagram()` as the Agent-facing validation entry point.
14
+
15
+ ## 12B — Architecture Diagram Mode
16
+
17
+ - Add `type: 'architecture'` for business, data, and technical architecture views.
18
+ - Support `layers` for stable vertical or horizontal architectural strata.
19
+ - Support `boundaries` with `nodeIds`, labels, padding, and color for bounded contexts, domains, systems, or platform boundaries.
20
+ - Keep regular edges for dependencies, realizes, persists, publishes, and other declared relationships; the runtime does not infer business semantics.
21
+ - Preserve manual positions when supplied and use deterministic layered placement otherwise.
22
+
23
+ ## 12C — Mindmap Mode
24
+
25
+ - Add `type: 'mindmap'` with `parentId` as the compact Agent-friendly hierarchy contract.
26
+ - Support deterministic `tree` and `radial` layouts through the existing diagram layout modes.
27
+ - Render root and branch emphasis without introducing a new renderer or a separate editing model.
28
+ - Keep explicit IDs and parent references so Agents can update one branch without replacing the whole mindmap.
29
+
30
+ ## 12D — Agent Contract and Schemas
31
+
32
+ - Expose `architecture` and `mindmap` in `getCapabilities()`, `planChart()`, chart profiles, TypeScript declarations, and manifests.
33
+ - Add `architecture-node`, `architecture-edge`, and `mindmap-node` business schemas.
34
+ - Return assumptions and structured validation diagnostics instead of silently guessing layer, boundary, or parent semantics.
35
+ - Keep architecture and mindmap in the `diagram` family and recommend them only for `architecture`, `hierarchy`, `brainstorm`, and related intents.
36
+
37
+ ## 12E — Playground and Documentation
38
+
39
+ - Add Architecture and Mindmap examples to `playground/project-gallery.html`.
40
+ - Document the distinction: architecture is a domain/system structure; a mindmap is a hierarchy of ideas. Both are structured diagrams, but a mindmap is not an architecture diagram by default.
41
+ - Use `npm run playground` and preview `http://localhost:3000/playground/project-gallery.html`, then search `Architecture` or `Mindmap`.
42
+
43
+ ## 12F — Renderer-Parity Edge Editing
44
+
45
+ Direct edge editing must remain a renderer-independent Diagram capability. SVG may be used to validate the interaction first, but Canvas and SVG must expose the same public operations, editing semantics, persisted data, keyboard behavior, and final acceptance status. The feature is not complete while either renderer is read-only or has reduced editing behavior.
46
+
47
+ The default runtime state must be static and safe, with no unexpected viewport or structural changes. Zoom, pan, brush selection, node dragging, edge dragging, port connection, and structural commands are disabled by default and must be explicitly enabled by the host. Agent-driven edits continue to use the validated preview/commit contract and do not implicitly enable pointer editing in the UI.
48
+
49
+ ### Phase 1 — Edge Hit Testing and Selection
50
+
51
+ - Add geometry-aware edge hit testing with a forgiving interaction tolerance instead of relying on rectangular scene bounds.
52
+ - Make diagram edges selectable in Flow, Swimlane, Architecture, and Mindmap without changing chart-series line behavior.
53
+ - Support selected, hover, focus, delete, Escape, and keyboard traversal states consistently in Canvas and SVG.
54
+ - Keep hit testing in the shared Scene Graph; SVG transparent strokes may optimize DOM interaction but must not become the source of truth.
55
+ - Expose explicit edge-selection and edge-editing support through `getCapabilities()`.
56
+ - Keep navigation and editing disabled in default chart specs; Gallery and read-only embeds must not enable them implicitly.
57
+
58
+ ### Phase 2 — Waypoint and Segment Handles
59
+
60
+ - Show bend-point and segment-midpoint handles only after an edge is selected in editing mode.
61
+ - Dragging a bend point updates one waypoint; dragging an orthogonal segment midpoint moves only that horizontal or vertical segment.
62
+ - Use enlarged invisible hit regions and minimum target sizes so thin lines remain usable without visually thickening them.
63
+ - Reuse preview, confirmation, commit, undo, redo, and audit behavior from the shared edit controller.
64
+ - Validate the interaction in SVG first if useful, but do not publish renderer-specific public behavior.
65
+
66
+ ### Phase 3 — Persistent Manual Routing
67
+
68
+ - Add JSON-safe `waypoints` to the edge contract and preserve stable edge IDs.
69
+ - Apply the same waypoint model to Canvas rendering, SVG rendering, JSON export, SVG/PNG export, copy/paste, duplicate, and Agent edits.
70
+ - Define routing precedence as explicit waypoints first, automatic obstacle-aware routing otherwise.
71
+ - When connected nodes move, preserve valid manual segments, repair invalid endpoint segments, and fall back to deterministic automatic routing when the manual path becomes unusable.
72
+ - Support Agent updates through validated `updateEdge` operations rather than renderer-specific commands.
73
+
74
+ ### 12F Acceptance
75
+
76
+ - Canvas and SVG pass the same edge hit-testing, selection, handle dragging, persistence, undo/redo, keyboard, and export tests.
77
+ - Flow, Swimlane, Architecture, and Mindmap use the same edge-editing contract and interaction implementation.
78
+ - Thin edges remain easy to select without changing their visible stroke width.
79
+ - Manual waypoints survive rerender, renderer switching, serialization, export, and chart recreation.
80
+ - Node movement never leaves an edge passing through a node; invalid manual routes are repaired or deterministically rerouted.
81
+ - Until all parity criteria pass, capabilities report segment dragging as unavailable rather than advertising SVG-only support.
82
+ - Default charts remain static: zoom, pan, brush, node drag, edge drag, port connection, and structural editing only activate through explicit host configuration.
83
+
84
+ ## 12G — Mindmap Curved Edges
85
+
86
+ - Mindmap parent-child edges default to `routing: 'curved'`; Flow, Swimlane, and Architecture keep orthogonal defaults.
87
+ - `curved` renders one cubic Bezier segment in both Canvas and SVG instead of a four-point polyline.
88
+ - `diagram.curveTension` and per-edge `curveTension` accept values from `0.2` to `0.8`, with `0.4` as the default.
89
+ - Labels use the Bezier midpoint and arrowheads use the end tangent. Shared Scene Graph hit testing samples the curve so Canvas and SVG selection remain equivalent.
90
+ - Curves that intersect another node fall back deterministically to obstacle-aware orthogonal routing.
91
+ - Explicit `waypoints` retain precedence and render as manual polylines. Bezier control-point editing is intentionally excluded; moving nodes recalculates the curve.
92
+
93
+ ## Acceptance
94
+
95
+ - `npm run agent:check` passes with 18 public chart types and 10 business schemas.
96
+ - Architecture validates and renders layers, boundaries, nodes, and dependency edges in both SVG and Canvas.
97
+ - Mindmap validates parent references and cycles, derives stable parent-child edges, and renders tree and radial layouts deterministically.
98
+ - Existing Flow and Swimlane tests and previews remain unchanged and pass.
99
+ - Existing export, accessibility, selection, keyboard, and preference behavior remains available through the shared diagram runtime.
100
+ - Iteration 12F is accepted only when Canvas and SVG expose equivalent edge-editing behavior.
101
+ - Iteration 12G is accepted only when Canvas, browser SVG, and headless SVG all emit true cubic Bezier paths and preserve static-by-default interaction behavior.
@@ -1,6 +1,6 @@
1
1
  # iChart.js 2.0 Roadmap
2
2
 
3
- > Roadmap baseline: 2026-09-14. Current release status: `v2.0.6` is prepared from the completed Iteration 11 visual preference work. Geographic charts and 3D rendering remain out of scope until explicitly reintroduced.
3
+ > Roadmap baseline: 2026-09-14. Current release status: `v2.0.8` includes the completed Iteration 12 structured-diagram work, follow-up chart/menu fixes, and Agent contract hardening. Geographic charts and 3D rendering remain out of scope until explicitly reintroduced.
4
4
 
5
5
  ## Current Status
6
6
 
@@ -14,6 +14,7 @@
14
14
  - Iteration 9A–9D implemented the lightweight visual style system, adaptive theme planning, runtime switching, renderer integration, and bilingual Agent guidance without adding a chart type; these capabilities remain in the `2.0.x` line.
15
15
  - Iteration 10A Export Contract Hardening was implemented and released in `v2.0.5`: export representations and type errors are deterministic, optional Node raster export uses `exportAsync()`, Canvas/SVG paint semantics are aligned, and the playground server has safer port/path handling. No chart behavior or public chart type was added.
16
16
  - Iteration 11 visual preference controls are included in the `v2.0.6` release: compact per-chart settings, capability-aware visibility controls, theme-aware icon contrast, explicit font-size defaults, shared page preferences, and Agent-adjustable global settings.
17
+ - Iteration 12A–12G is included in `v2.0.7`: shared structured-diagram contracts, Architecture layers/boundaries, Mindmap parent-child tree/radial layouts with true cubic-Bezier edges, Agent schemas/capabilities, renderer-parity edge hit testing and selection, waypoint/segment handles, persistent manual routing, and Gallery/documentation coverage. Navigation and editing remain disabled by default and require explicit host activation.
17
18
  - The original `2.0.0` readiness record is historical and superseded by the published `2.0.x` releases. Current release checks are defined by `docs/agent/development/release-sop.md`.
18
19
 
19
20
  ## Iteration 4 — Agent Data Contract and Business Editing
@@ -8,7 +8,7 @@ Unified workflow for Coding Agents developing iChart.js 2.0.
8
8
  | --- | --- | --- |
9
9
  | Generic metrics and data charts | `charting-scenario.md` | `src/charts.mjs` |
10
10
  | Schedules, milestones, and progress | `project-scenario.md` | `src/project.mjs` |
11
- | Processes, swimlanes, and Diagram editing | `diagram-scenario.md` | `src/diagram.mjs`, `src/diagram-interaction.mjs` |
11
+ | Processes, swimlanes, architecture, mindmaps, and Diagram editing | `diagram-scenario.md` | `src/diagram.mjs`, `src/diagram-interaction.mjs` |
12
12
 
13
13
  ## Standard Change Flow
14
14
 
@@ -6,22 +6,36 @@ Agent usage and development guide for process modeling, responsibility mapping,
6
6
 
7
7
  - `flow`: a process graph made of nodes and edges.
8
8
  - `swimlane`: a process graph organized by responsibility lanes.
9
+ - `architecture`: a layered business, data, or technical architecture graph with optional boundaries.
10
+ - `mindmap`: a parent-child hierarchy of ideas rendered as a tree or radial diagram.
11
+
12
+ Architecture and mindmap are both structured diagrams, but they are not interchangeable: architecture describes declared domain or system relationships, while a mindmap describes an idea hierarchy.
9
13
 
10
14
  ## Data Model
11
15
 
12
16
  ```js
13
17
  {
14
- type: 'flow',
18
+ type: 'architecture',
19
+ layers: [{ id: 'business', label: 'Business' }, { id: 'technology', label: 'Technology' }],
20
+ boundaries: [{ id: 'platform', label: 'Platform', nodeIds: ['api'] }],
15
21
  nodes: [{
16
- id: 'review',
17
- label: 'Review',
18
- position: { x: 240, y: 100 },
19
- size: { width: 140, height: 44 },
20
- ports: [{ id: 'in', side: 'left', offset: 0.5 }],
21
- groupId: 'delivery'
22
+ id: 'api', label: 'Order API', layerId: 'technology', position: { x: 240, y: 100 }
22
23
  }],
23
- edges: [{ from: 'start', to: 'review', toPort: 'in' }],
24
- groups: [{ id: 'delivery', label: 'Delivery' }]
24
+ edges: [{ id: 'orders-api', from: 'orders', to: 'api', relation: 'realizes', waypoints: [{ x: 220, y: 80 }, { x: 220, y: 160 }] }]
25
+ }
26
+ ```
27
+
28
+ For a mindmap, prefer the compact parent contract:
29
+
30
+ ```js
31
+ {
32
+ type: 'mindmap',
33
+ nodes: [
34
+ { id: 'root', label: 'Release plan' },
35
+ { id: 'scope', label: 'Scope', parentId: 'root' },
36
+ { id: 'risk', label: 'Risks', parentId: 'root' }
37
+ ],
38
+ diagram: { mode: 'mindmap', layout: 'tree', routing: 'curved', curveTension: 0.4 }
25
39
  }
26
40
  ```
27
41
 
@@ -31,12 +45,25 @@ Supported:
31
45
 
32
46
  - Nodes, edges, lanes, groups, and ports.
33
47
  - `manual`, `layered`, `tree`, and `radial` layouts.
34
- - `straight`, `orthogonal`, and `curved` routing declarations, with lightweight obstacle-aware orthogonal routing.
48
+ - Architecture layers and boundaries, plus mindmap parent-child derivation.
49
+ - `straight`, `orthogonal`, and true cubic-Bezier `curved` routing, with adjustable `curveTension` and obstacle-aware orthogonal fallback.
35
50
  - Node dragging, multi-selection, alignment, and grid snapping.
36
51
  - Keyboard movement, copy/paste, duplicate, group collapse/expand, undo/redo, and a shared Canvas/SVG Scene.
37
52
  - Port-aware drag-to-connect interaction and typed edge creation.
53
+ - Geometry-aware edge selection, waypoint handles, orthogonal segment handles, persistent manual routing, and edge deletion.
38
54
  - Group collapse/expand with collapsed group summary rendering.
39
55
 
56
+ Navigation and editing are opt-in. The default chart is static: zoom, pan, brush, node drag, edge drag, port connection, and structural editing are disabled until the host enables them.
57
+
58
+ ```js
59
+ interaction: { zoom: true, pan: true, drag: true, edgeDrag: true, portConnect: true },
60
+ editing: { enabled: true, allowDelete: true, allowStructuralChanges: true }
61
+ ```
62
+
63
+ Canvas and SVG use the same Scene Graph hit testing, `waypoints` contract, commands, history, and interaction behavior.
64
+
65
+ Mindmap defaults to curved parent-child edges. Set `diagram.curveTension` from `0.2` to `0.8`, override `routing` or `curveTension` on one explicit edge, or use `waypoints` when a persistent manual polyline is required. Bezier control points are not directly editable.
66
+
40
67
  Current limitations:
41
68
 
42
69
  - Groups are flat; nested groups are not supported.
@@ -50,7 +77,7 @@ Current limitations:
50
77
  1. Assign stable IDs to nodes and edges.
51
78
  2. Use `validateDiagram(spec)` to check endpoints, ports, groups, lanes, and layout options.
52
79
  3. Create the chart with `createChart(spec)`.
53
- 4. Use typed commands such as `moveNodes`, `alignNodes`, `snapNodes`, `addEdge`, `toggleGroupCollapse`, `duplicateSelection`, and `pasteSelection` for edits.
80
+ 4. Use typed commands such as `moveNodes`, `alignNodes`, `snapNodes`, `addEdge`, `updateEdge`, `removeEdge`, `toggleGroupCollapse`, `duplicateSelection`, and `pasteSelection` for edits.
54
81
  5. Follow the preview/confirm/commit flow for all business-data changes.
55
82
 
56
83
  ## Implementation Map
@@ -80,3 +107,4 @@ Current limitations:
80
107
  - Copy/paste preserves internal edges and produces deterministic new IDs.
81
108
  - Group collapse hides member nodes and keeps group-level state visible.
82
109
  - Groups, ports, and invalid references produce structured validation results.
110
+ - Canvas and SVG produce equivalent edge selection, handle dragging, persisted waypoints, keyboard behavior, and exports.
@@ -40,6 +40,8 @@ Core APIs:
40
40
  - Command validation does not mutate the input command or source data.
41
41
  - Host confirmation is required by default; `confirmed: true` is not an authorization system.
42
42
  - External persistence, permissions, and authentication belong to the host application.
43
+ - Pointer navigation and editing are disabled by default. `editing.enabled` authorizes edit transactions; `interaction.drag`, `interaction.edgeDrag`, and `interaction.portConnect` separately expose direct-manipulation UI.
44
+ - Diagram edge routes use JSON-safe `waypoints` and update through `updateEdge`; edge deletion uses `removeEdge` and requires structural-edit permission.
43
45
 
44
46
  ## Supported Models
45
47
 
@@ -50,6 +52,9 @@ Core APIs:
50
52
  - `flow-node`
51
53
  - `flow-edge`
52
54
  - `swimlane`
55
+ - `architecture-node`
56
+ - `architecture-edge`
57
+ - `mindmap-node`
53
58
 
54
59
  ## History and Revision
55
60
 
@@ -10,7 +10,7 @@ This is the production component path. For one-off files or Agent-led repository
10
10
  npm install @taylorwong/ichartjs@^2
11
11
  ```
12
12
 
13
- For environments without npm registry access, install from GitHub as a fallback: `npm install github:wanghetommy/ichartjs#v2.0.6`.
13
+ For environments without npm registry access, install from GitHub as a fallback: `npm install github:wanghetommy/ichartjs#v2.0.8`.
14
14
 
15
15
  Use the package through a bundler or another environment that resolves npm ESM imports:
16
16
 
@@ -24,6 +24,7 @@ Agent usage and development guide for project planning, delivery tracking, and p
24
24
  - Keep derived values separate from source rows. State and tooltips may expose variance, float, warnings, and assumptions, but transforms must not mutate source data.
25
25
  - Linked filters and linked selection must use stable record IDs, not array positions.
26
26
  - Forecasts, risk scores, and aging buckets are inspectable heuristics. They are not commitments, causal claims, or hidden inference.
27
+ - Project chart date axes are derived from `date`, `start`, and `end` records in the current contract; generic `xAxis.title/format` and `xAxis.min/max` settings do not customize them.
27
28
 
28
29
  ## Agent Workflow
29
30
 
@@ -67,6 +67,12 @@ Call `planChart(rows, { intent, renderer })`. Read the full result rather than o
67
67
 
68
68
  Stop before rendering when `requiredFields` is not empty. Ask for the missing information or choose a supported alternative without fabricating data.
69
69
 
70
+ #### Use registered intents only
71
+
72
+ `intent` is an exact machine token, not a natural-language sentence. Discover the allowlist from `getCapabilities().intents`, then pass values such as `trend`, `time-series`, `comparison`, `ranking`, `distribution`, `relationship`, `matrix`, `multidimensional`, `schedule`, `architecture`, or `mindmap`. Do not pass `trend over time` or `show a sales trend` directly. If an unknown token is passed, `planChart()` returns an `UNKNOWN_INTENT` warning and a safe fallback, which may select the wrong chart if the warning is ignored.
73
+
74
+ If the user gives prose, map it to a registered token before calling `planChart()` and preserve the original prose separately as user intent.
75
+
70
76
  ### 4. Build a JSON-Friendly Spec
71
77
 
72
78
  For a trend or comparison with one dimension and one or more measures:
@@ -97,6 +103,28 @@ const spec = {
97
103
 
98
104
  Use the selected capability and recipes for Pie, Gauge, Heatmap, Radar, project views, and diagrams because their required encodings differ.
99
105
 
106
+ #### Put options at the contract level
107
+
108
+ Keep `encoding` for field roles and series semantics. Put presentation and axis options at the Spec level:
109
+
110
+ | Need | Correct location | Common mistake |
111
+ | --- | --- | --- |
112
+ | Axis title | `xAxis.title`, `yAxis.title` | `encoding.x.title`, `encoding.y.title` |
113
+ | Axis number/date format | `xAxis.format`, `yAxis.format` | `encoding.x.format`, `encoding.y.format` |
114
+ | Data labels | `labels.enabled`, `labels.format` | `encoding.labels` |
115
+ | Legend | `legend.visible` | `encoding.legend` |
116
+ | Theme and palette | `theme.mode`, `theme.preset`, `theme.palette` | series or encoding color guesses |
117
+
118
+ `validateSpec()` reports these misplaced options as structured warnings. Repair them before presenting the chart. A single-series Cartesian chart shows the encoded field name in the legend by default; set `legend: { visible: false }` when that label adds no value.
119
+
120
+ #### Know the domain contract
121
+
122
+ Numeric Cartesian charts use a readable y-axis domain by default: `yAxis.nice` is `true`, and `yAxis.ticks` is `"auto"`. For an explicit range, use `yAxis.domain: [min, max]`; for example, `{ domain: [0, 2000], ticks: 5 }` produces a stable five-label scale. Set `yAxis.nice: false` to retain the raw data boundary. `yAxis.format` only changes display formatting. `chart.getState().axes` and `chart.explain().axes` expose `rawDomain`, resolved `domain`, `ticks`, `step`, and `policy` for Agent self-checks. `yAxis.right` accepts the same controls for a secondary numeric axis. `xAxis.min/max` and `xAxis.domain` remain unsupported because categorical/time x-axis ranges are derived from records. The other supported domain controls are chart-specific: `gauge.domain`, `heatmap.colorScale.domain`, and `radar.indicators[].min/max`. Project chart date ranges are derived from their records in the current version.
123
+
124
+ Chart-specific encoding is strict: Cartesian charts use `x`/`y`, Pie/Funnel/Gauge use `category`/`value`, Heatmap uses `x`/`y`/`color`, and Radar uses `indicators[].field`. Missing or unsupported fields are validation errors, not silent fallbacks. Gauge Specs must declare `domain`; inspect `VALUE_CLAMPED` when a value falls outside it. Use the complete minimal catalog at `@taylorwong/ichartjs/recipes/minimal-specs` when starting a new chart.
125
+
126
+ For Agent self-checks, `chart.getState().health` and `chart.explain().health` expose `ready`, `degraded`, or `empty`, plus warning, suppressed-label, clamped-value, and rendered-mark metrics. `locale` defaults to `en-US`; use `locale: "zh-CN"` for localized number/date output while keeping input dates in ISO-8601 form.
127
+
100
128
  ### 5. Validate
101
129
 
102
130
  ```js
@@ -177,6 +205,8 @@ Before returning a result, verify:
177
205
  - the branding on/off state is documented so live view and exports stay consistent;
178
206
  - the preview URL or output artifact (JSON/SVG/PNG/JPEG) is provided to the user.
179
207
 
208
+ For deterministic lineage checks and linked updates, give every input row a stable string `id`. Without one, the runtime uses a positional fallback such as `record-0`; that is sufficient for a local render but should not be treated as a durable business identity.
209
+
180
210
  ## Branding (Signature) Defaults
181
211
 
182
212
  - Default `branding: true`: a low-contrast `Powered by iChart.js` signature appears in the bottom-right corner, synchronized across live rendering, PNG/SVG raster export, and JSON state persistence.
@@ -10,16 +10,23 @@ getCapabilities → inspectData → planChart → create Spec → validateSpec
10
10
 
11
11
  Agents should use `getCapabilities()` first instead of hard-coding undeclared types or operations.
12
12
 
13
+ For post-creation visual settings, use `getPreferenceCapabilities(chartType, { locale }) → chart.getPreferences() → validatePreferences(patch) → chart.setPreferences(patch, { source: 'agent' }) → chart.getState().preferences`. This keeps Agent changes on the same allowlisted contract as the built-in settings menu.
14
+
13
15
  Iteration 8 adds per-chart profiles through `getChartCapability(type)`. Each profile declares required data roles, supported interactions, renderers, feature status, exports, and practical limits. Unsupported behavior must be handled from this profile or from validation diagnostics rather than guessed.
14
16
 
15
- `planChart(data, { intent, renderer })` returns a versioned planning result with a primary chart, alternatives, confidence, reasons, required fields, suggested encodings, assumptions, warnings, unsupported requests, safe next actions, and the selected capability profile. Planning never invents business meaning, units, dates, or missing fields.
17
+ `planChart(data, { intent, renderer })` returns a versioned planning result with a primary chart, alternatives, confidence, reasons, required fields, suggested encodings, assumptions, warnings, unsupported requests, safe next actions, and the selected capability profile. `intent` must be one exact token from `getCapabilities().intents`; natural-language prose must be mapped before planning. An unknown token returns `UNKNOWN_INTENT` and a fallback plan, so Agents must inspect warnings before accepting `primary`. Planning never invents business meaning, units, dates, or missing fields.
18
+
19
+ Unknown intent results also include `intentKnown`, `intentSuggestions`, and `fallbackUsed`. A chart Spec is chart-specific: Cartesian channels are `x`/`y`, Pie/Funnel/Gauge channels are `category`/`value`, Heatmap channels are `x`/`y`/`color`, and Radar fields live in `indicators`. `validateSpec()` rejects unsupported channels and missing fields. Gauge requires an explicit `domain` and reports `VALUE_CLAMPED` when the rendered value exceeds it.
16
20
 
17
21
  ## Spec Rules
18
22
 
19
23
  - Specs must be JSON-serializable.
20
24
  - Call `validateSpec()` before rendering.
21
25
  - Chart layout and data semantics are renderer-independent.
22
- - `flow` and `swimlane` use `nodes/edges/lanes`; generic charts use `data.values`.
26
+ - Keep axis titles/formats on `xAxis`/`yAxis`, labels on `labels`, and legend settings on `legend`; misplaced options return structured warnings.
27
+ - Numeric y-axes use readable domains by default (`yAxis.nice: true`, `yAxis.ticks: "auto"`). Use `yAxis.domain: [min, max]` for an explicit range, `yAxis.nice: false` to retain the raw boundary, and `yAxis.right` for a secondary numeric axis. `chart.getState().axes` and `chart.explain().axes` expose the raw domain, resolved domain, ticks, step, and policy for Agent verification. `xAxis.min/max` and `xAxis.domain` remain unsupported for categorical/time layouts. Chart-specific domains remain available through `gauge.domain`, `heatmap.colorScale.domain`, and `radar.indicators[].min/max`.
28
+ - `flow` and `swimlane` use `nodes/edges/lanes`; `architecture` uses `nodes/edges/layers/boundaries`; `mindmap` uses `nodes` with `parentId` and optional `edges`; generic charts use `data.values`.
29
+ - `chart.getState().health` and `chart.explain().health` expose `ready`, `degraded`, or `empty`, with renderability and warning, suppressed-label, clamped-value, and rendered-mark metrics. `locale` defaults to `en-US`; set `locale: "zh-CN"` for output formatting and keep input dates as ISO-8601 strings.
23
30
 
24
31
  ## Renderer
25
32
 
@@ -93,10 +100,18 @@ validateSpec(spec)
93
100
  createChart(spec)
94
101
  getCapabilities()
95
102
  getChartCapability(type)
103
+ getPreferenceCapabilities(type, options)
104
+ validatePreferences(patch, options)
96
105
  chart.describe()
97
106
  chart.explain()
98
107
  chart.getState()
108
+ chart.getPreferences()
109
+ chart.setPreferences(patch, options)
110
+ chart.resetPreferences(options)
99
111
  chart.getSelectedData()
112
+ chart.selectEdges(edgeIds, options)
113
+ chart.getSelectedEdgeIds()
114
+ chart.deleteSelectedEdges(options)
100
115
  chart.export(options)
101
116
  chart.exportAsync(options)
102
117
  chart.toDataURL(type)
@@ -109,6 +124,8 @@ chart.downloadJSON()
109
124
 
110
125
  Validation results contain separate `errors`, `warnings`, and `normalizations`. Diagnostics use stable codes, JSON-oriented paths, expected values where useful, and actionable suggestions. `chart.explain()` returns encodings, transforms, interactions, assumptions, warnings, stable record lineage, and an accessibility summary.
111
126
 
127
+ For lineage checks and linked updates, provide stable string `id` values on input rows. Without one, the runtime uses deterministic positional IDs such as `record-0`; these are suitable for a local self-check but not for durable business identity.
128
+
112
129
  ## Interaction
113
130
 
114
131
  Common interactions include Tooltip, Hover, Click, Selection, Zoom, Pan, Drag, Touch, and Keyboard; each chart's enabled interactions are controlled by its Spec and capability declaration.
@@ -75,7 +75,11 @@ const chart = createChart({
75
75
  data: { values: rows },
76
76
  preferences: pagePreferences
77
77
  });
78
- mountChartSettings(chart, { locale: 'en' });
78
+ const settings = mountChartSettings(chart, {
79
+ locale: 'en',
80
+ placement: 'auto',
81
+ preferredPlacements: ['right', 'top', 'bottom']
82
+ });
79
83
 
80
84
  // The same operation can come from an Agent conversation.
81
85
  chart.setPreferences({
@@ -83,8 +87,36 @@ chart.setPreferences({
83
87
  typography: { scale: 1.15 },
84
88
  components: { grid: false }
85
89
  }, { source: 'agent' });
90
+
91
+ // Call this when the host permanently removes the chart.
92
+ settings.destroy();
93
+ ```
94
+
95
+ The quick-settings panel is portaled outside the clipped chart surface. Automatic placement prefers the button's right side, then the top, then the bottom, and finally constrains the panel inside the browser viewport. On scroll it preserves the selected placement and follows the anchor without viewport snapping; it closes directly when the chart or anchor leaves the viewport. Resize and content changes may recompute placement.
96
+
97
+ ### Agent Discovery and Validation
98
+
99
+ Agents should discover the allowlisted surface instead of hard-coding menu options. `getPreferenceCapabilities(chartType, { locale })` returns every preference field with its type, default value, options, scopes, chart applicability, and `menu.visible` status. Use the same contract for conversational changes and custom settings pages.
100
+
101
+ ```js
102
+ import { getPreferenceCapabilities, validatePreferences } from '@taylorwong/ichartjs';
103
+
104
+ const capabilities = getPreferenceCapabilities(chart.getSpec().type, { locale: 'en' });
105
+ const menuFields = capabilities.fields.filter(field => field.menu.visible);
106
+ const current = chart.getPreferences();
107
+ const patch = {
108
+ theme: { preset: 'dashboard', palette: 'status' },
109
+ typography: { scale: 1.15 },
110
+ components: { grid: false }
111
+ };
112
+ const checked = validatePreferences(patch, { partial: true });
113
+ if (!checked.valid) throw new Error(JSON.stringify(checked.errors));
114
+ chart.setPreferences(checked.value, { scope: 'chart', source: 'agent' });
115
+ const applied = chart.getState().preferences;
86
116
  ```
87
117
 
118
+ The quick menu fields are `theme.mode`, `theme.palette`, `typography.scale`, and capability-supported `components.legend`, `components.labels`, and `components.grid`. The full allowlist additionally includes `theme.preset`, `density`, `branding.enabled`, and `motion`. Unknown locales fall back to English.
119
+
88
120
  The optional per-chart menu uses a compact hamburger icon and intentionally exposes only high-frequency controls: theme mode, palette, font scale, and supported legend/label/grid visibility. Capability checks hide controls that do not apply to the current chart. Changes apply immediately and the UI supports `en`, `zh-CN`, and automatic document-language detection.
89
121
 
90
122
  Keep low-frequency and page-wide controls in a dedicated settings surface outside the chart popover. Share one store across the page, and call `store.setGlobal()` or `chart.setPreferences(patch, { scope: 'global' })`. The full surface may expose preset, density, branding, and other allowlisted preferences without overloading every chart. The store uses memory in Node/SSR unless `localStorage` or a host adapter is explicitly selected. Preview the quick menu in `http://localhost:3000/playground/project-gallery.html` and the full page at `http://localhost:3000/playground/preferences-lab.html`.
@@ -121,7 +121,7 @@ npx skills add wanghetommy/ichartjs --skill ichartjs --agent codex --global --ye
121
121
  For reproducible installation, pin the released Skill directory:
122
122
 
123
123
  ```bash
124
- npx skills add https://github.com/wanghetommy/ichartjs/tree/v2.0.6/skills/ichartjs \
124
+ npx skills add https://github.com/wanghetommy/ichartjs/tree/v2.0.8/skills/ichartjs \
125
125
  --agent codex --global --yes
126
126
  ```
127
127
 
@@ -159,6 +159,8 @@ Use the project and diagram contracts when the data has project semantics rather
159
159
  - `gantt`, `timeline`, `milestone`, and `burndown` for delivery schedules;
160
160
  - project analytics for capacity, velocity, release forecast, risk, and issue aging;
161
161
  - `flow` and `swimlane` for process, ownership, responsibility, groups, ports, and controlled editing.
162
+ - `architecture` for business, data, or technical architecture with explicit layers, boundaries, and relationships.
163
+ - `mindmap` for idea hierarchies where `parentId` is the source of truth and a tree or radial layout is preferred.
162
164
 
163
165
  Preserve stable record, node, edge, lane, group, and port IDs. For business edits, return a preview before commit and include the audit result.
164
166
 
@@ -11,7 +11,7 @@
11
11
  - [视觉样式与主题](theme-guide.md)
12
12
  - [数据分析图表](charting-scenario.md)
13
13
  - [项目管理图表](project-scenario.md)
14
- - [交互式 Diagram](diagram-scenario.md)
14
+ - [交互式 Diagram](diagram-scenario.md):Flow、Swimlane、Architecture、Mindmap 与编辑。
15
15
  - [Runtime 契约](runtime-contract.md)
16
16
  - [编辑契约](editing-contract.md)
17
17
  - 机器可读能力清单位于 `docs/manifests/`,供 Agent 按需读取。