Promote four reusable, pure-CSS visual components — a file-tree, a flow/pipeline diagram, a comparison/bar chart, and a data table — into the implementation-plan SKELETON template as opt-in sections, and document in SKILL.md when the skill should reach for each, so generated plans can show file changes, flows, comparisons, and tabular data at a glance.
Read and implement all steps in the plan at docs/plans/add-visual-components-to-plan-skill.html — Add opt-in visual components to the plan template
add-visual-components-to-plan-skill.html
docs/plans/add-visual-components-to-plan-skill.html
Context
The plan-agent:implementation-plan skill generates self-contained HTML plan documents from a template. Today those plans are text-only: numbered step cards, acceptance-criteria checkboxes, a progress bar, and collapsible disclosures. There is no first-class way to show which files a plan touches, the flow/architecture it introduces, comparisons/trade-offs, or tabular data — exactly the visuals that make a plan scannable and concrete.
Two facts make this low-risk, high-value:
- A gold reference already exists in-repo.
docs/plans/build-clean-plugin-dist.htmlwas hand-authored with a.file-tree(lines 848–890), a.pipelineflow diagram (893–937), and a 3-column comparison diagram (940–981) — all pure CSS, token-driven, on-brand. They were one-offs, never promoted into the template. - The gallery scanner is insulated. Both
plans-library/SKILL.mdand the auto-rebuild hookhooks/build-index.shonly regex-match<meta name="plan-*">tags and<title>. New<body>sections are invisible to them — no scanner changes needed.
Hard constraint: plans are single self-contained .html files — no CDN, no external scripts. Every visual must be pure CSS / inline SVG. Mermaid and Chart.js are out; the reference components already honor this.
Decision (confirmed): add all four components, all opt-in — the skill renders a visual only when the plan content warrants it; no mandatory placeholders that would clutter a small plan. This very plan dogfoods the proposal: the sections below are live instances of all four components.
Files to Modify
- kit/plugins/plan-agent/
- skills/implementation-plan/
reference/SKELETON.htmlmodified component CSS + 4 opt-in sections + navSKILL.mdmodified document the components & triggersCHANGELOG.mdmodified v1.5.0 entry- .claude-plugin/
marketplace.jsonmodified bump plan-agent 1.4.1 → 1.5.0- docs/plans/
add-visual-components-to-plan-skill.htmlthis plan
Visual Components & Build Flow
SKELETON.html <style>SKELETON.html <body>SKILL.mdCHANGELOG + marketplace.json- file-tree → which files change
- pipeline → process & data flow
- compare-grid → trade-offs
- bar-chart → distributions
- plan-table → structured mappings
| Component | Source | CSS classes |
|---|---|---|
| File-tree | ported | .file-tree, .file-list, .file-badge |
| Flow diagram | ported | .pipeline, .pipeline-node, .pipeline-arrow |
| Comparison grid | ported + renamed | .compare-grid, .compare-col-* |
| Bar chart | new | .bar-chart, .bar-fill |
| Data table | new | .plan-table |
Steps
<style> block.Verify
.file-tree/.file-list/.file-badge (ref 848–890), .pipeline/.pipeline-node/.pipeline-arrow (893–937), and the comparison rules (940–981) from build-clean-plugin-dist.html into SKELETON.html before </style>; rename .allowlist-*/.allow-keep|drop|generated to generic .compare-grid/.compare-col-add|neutral|remove. grep -n "\.file-tree\|\.pipeline\|\.compare-grid" SKELETON.html returns the rules; browser console shows no CSS errors.:root and add net-new CSS for the bar chart and data table.--val keeps the bar chart script-free.Verify
--amber-bg, --red, --red-bg (and reuse --green/--accent) to :root and repoint the ported rules. Author .bar-chart (label + .bar-track/.bar-fill sized by style="--val:NN%" + visible value) and .plan-table (<caption>, <th scope="col">, zebra rows). Render a scratch snippet: bars fill to width; table exposes caption + scoped headers in the DevTools a11y pane.<body>..plan-workflow and unresolved-questions, so no new mechanism is introduced.Verify
card-files#files, after Context), a Diagram section (card-diagram#diagram) hosting .pipeline/.compare-grid/.bar-chart, and a .plan-table usage — each wrapped in <!-- OPTIONAL … delete this block otherwise --> with {placeholder} tokens. Open SKELETON.html: all render with placeholders; delete one block and the page still renders cleanly with no orphaned styling.IntersectionObserver already iterates only existing sections, so missing ones are a no-op.Verify
<li> entries to .plan-nav ul, documented as add-only-when-section-kept. Scroll a plan with the sections: the matching nav link gains .active/aria-current. Remove a section + its <li>: no console errors; remaining links still highlight.Verify
files/diagram/chart/table sections with one-line "include when…" triggers. In HTML Output Requirements add bullets for each component's classes, the keep/remove rule, the no-CDN/pure-CSS constraint, and a11y (table scope/caption, bar-chart visible numeric labels, badges not color-only). Add a Visual Components subsection naming each trigger (Files → multi-file; Diagram → flow/architecture; Chart → distribution/before-after; Table → mappings/matrices). Re-read SKILL.md to confirm.marketplace.md; the changelog keeps the marketplace discoverable and honest.Verify
## v1.5.0 — 2026-06-05 — Add visual components … under ### Added in CHANGELOG.md; change plan-agent version in marketplace.json from 1.4.1 to 1.5.0; leave plugin.json without a version. grep '"version"' .claude-plugin/marketplace.json shows 1.5.0; the settings auto-validator reports valid JSON.Acceptance Criteria
Verification
1. Visual render check. Serve the updated SKELETON.html (or a test plan exercising all four components) via python3 -m http.server and confirm each renders correctly, themed by the design tokens, with the existing progress bar / step cards / completion checklist unaffected.
2. Opt-in / removal check. Produce a second minimal test plan with all optional visual blocks removed; confirm it renders identically to a pre-change plan — no orphaned CSS, no dead nav anchors, clean console.
3. Accessibility spot-check. In DevTools, confirm the data table exposes a caption + column headers, the bar chart shows visible numeric values (not color-only), and file badges pair color with a text label.
4. Gallery integrity. Trigger the rebuild hook (write a plan into docs/plans/) and confirm docs/plans/index.html still lists plans with correct status/type/title — proving the new sections didn't disturb the scanner.
5. Manifest validity. Confirm the marketplace.json auto-validator passes and the version guard (scripts/check-version-bump.sh) is satisfied at 1.5.0.
Completion Checklist
Completion Report
No items to report — all requirements met.