Render HTML
Take an artifact (file path or in-context material) plus a one-line intent and produce a single, self-contained HTML file optimized for the moment a human reads it once to make a decision.
Core principle (from Thariq's HTML-over-Markdown thesis): every invocation produces bespoke HTML, picked widget-by-widget for this artifact. No templates. A template forces the format back into the Markdown mindset of pre-baked structure and defeats the point.
When to use
Use when all three are true:
- The artifact is a synthesis the human will read once to decide something.
- The Markdown version would exceed ~100 lines or carry signal a table/SVG/collapsible would express more cleanly (severity, dependency, status, time).
- No downstream pipeline (Ralph, GitHub, another LLM, grep) consumes the artifact.
Common targets in this harness:
/harness-audit tier-ranked report → filterable findings dashboard
/strategic-proposal council artifact → phase-column roadmap with critic challenges inline
/skill-lint verdict matrix → sortable scoring table with CURRENT/STALE/BROKEN/DELETE badges
- Weekly memory digest from N days of
log.md → timeline coloured by skill outcome
When NOT to use
Skip when the artifact is source or pipeline input — Markdown stays the substrate of the harness:
- PRDs (
tasks/*/prd.md), briefings, commit messages, PR bodies, CHANGELOG.md
- Memory log entries themselves (
memory/<date>/log.md)
- Skill/rule/identity sources (
CLAUDE.md, context/rules/, .claude/skills/)
- Agent-to-agent handoffs (advisor → executor briefings)
If asked to render any of the above, refuse and explain.
Instructions
1. Parse arguments
Arguments received: $ARGUMENTS
| Position |
Meaning |
$0 |
slug (required, kebab-case, no extension) — becomes the filename |
--from <path> |
optional source artifact to read |
--intent <one-line> |
optional human-purpose hint (e.g. "pick next 3 audit actions") |
If slug is missing, ask the user for one. Slug rules: lowercase, kebab-case, no slashes, no .html extension.
If slug collides with an existing file in today's date directory, append -2, -3, etc. — never overwrite.
2. Resolve output path
TODAY=$(date -u +%Y-%m-%d)
mkdir -p "memory/$TODAY"
OUT="memory/$TODAY/<slug>.html"
Always use UTC. Always create the directory first.
3. Gather source material
- If
--from is given: read the file. If it does not exist, error out — do not invent content.
- If
--from is absent: use the conversation context the orchestrator already has. Do not re-fetch what you already know.
- If both are absent and the conversation has no obvious artifact: ask the user what to render.
4. Generate bespoke HTML
Produce one self-contained .html file. Rules:
- Single file, inline everything. All CSS in
<style>. All SVG inline. No <link> to external CSS or fonts. No <script src="https://...">. The artifact must work offline and travel as one file.
- Semantic HTML5.
<header>, <main>, <section>, <nav>, <table>, <details>/<summary> for collapsibles. Skip divs when a semantic tag fits.
- System-font stack.
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; — no Google Fonts.
- Colour as meaning, not decoration. Severity, status, phase. Pick a small palette (3–5 tokens) and apply consistently. Include a legend if non-obvious.
- Pick widgets for the data shape:
- tabular →
<table> with sortable headers (inline JS allowed for sort/filter only)
- dependency / flow → inline
<svg>
- long evidence →
<details> (collapsed by default past the third one)
- timelines → flex row with date axis, or inline SVG
- multi-perspective synthesis → tabs or side-by-side columns
- Print-friendly. Add
@media print rules that expand <details> and drop interactive chrome.
- Header block. Title, generated-at UTC timestamp, source citation (path or "in-context"), one-line intent.
- JavaScript is opt-in, not default. Only include JS when interaction earns its keep (filter, sort, copy-to-clipboard, expand-all). Never for animations. Never for analytics.
- No external fetches at runtime. No
fetch(), no images by URL — use inline SVG or data URIs only.
5. Write the file
Use the Write tool. Confirm the byte size is plausible (>2 KB for any non-trivial artifact, <500 KB unless the artifact genuinely warrants it).
6. Report to the user
Return three lines:
- Absolute path:
memory/<date>/<slug>.html
- A one-sentence summary of what was rendered (so the user knows what they'll see).
- The open command suggestion:
/agent-browser file://$(pwd)/memory/<date>/<slug>.html (or open file://... if running locally).
7. Memory Protocol
Append to memory/<UTC-date>/log.md:
## render-html -- HH:MM UTC
- **Result**: OP | DRY-RUN | PARTIAL | FAIL
- **Slug**: <slug>
- **Source**: <path or "in-context">
- **Intent**: <one-line>
- **Path**: memory/<date>/<slug>.html
- **Size**: <bytes>
- **Observation**: <one sentence — what shape the artifact took, e.g. "filterable severity table with 17 rows + inline SVG dependency map">
Then run the qualify/improve loop per context/rules/memory.md. If you learned something non-obvious about which HTML shape suited this artifact type, that may merit a line in memory/MEMORY.md.
Anti-patterns
- Templating. "Generic dashboard template, fill in the variables." Defeats the thesis. Generate bespoke each time.
- External assets. CDN links to Tailwind, Google Fonts, Chart.js, etc. The artifact must work offline and travel as one file.
- Decorative JS. Animations, fade-ins, gradients. The reader is making a decision, not watching a demo.
- Rendering source. Producing
prd.html, CLAUDE.html, MEMORY.html. Those files are pipeline input or indexed source — leave them in Markdown.
- Multi-file output. Separate
.css/.js companions. Single file or nothing.
- Writing outside
memory/<date>/. No exceptions. The location is the convention.
- Overwriting an existing artifact. Suffix
-2, -3 instead — older renders may still be referenced in the conversation.
- Skipping the memory log. Every run logs, op or fail. The qualify/improve loop is not optional.
Examples
/render-html harness-audit-tier --from memory/2026-05-18/audit-raw.md --intent "pick next 3 actions"
→ memory/2026-05-18/harness-audit-tier.html
/render-html roadmap-council --intent "review council deliberation before publishing pinned issue"
→ memory/2026-05-18/roadmap-council.html
(source was the strategic-proposal output already in context)
/render-html week-19-digest --from memory/ --intent "what shipped this week"
→ memory/2026-05-18/week-19-digest.html
1---2name: render-html3description: Render an artifact (or in-context material) as a bespoke, self-contained HTML file for one-shot human consumption. Writes to memory/<UTC-date>/<slug>.html. Output is gitignored — these are consumption artifacts, not source. TRIGGER when: asked to render HTML, generate an HTML report, visualize an audit/council/lint/digest, "make this readable", "make a dashboard for", or as a follow-up to /harness-audit, /strategic-proposal, /skill-lint.4---56# Render HTML78Take an artifact (file path or in-context material) plus a one-line intent and produce a single, self-contained HTML file optimized for the moment a human reads it once to make a decision.910**Core principle (from Thariq's HTML-over-Markdown thesis):** every invocation produces bespoke HTML, picked widget-by-widget for *this* artifact. **No templates.** A template forces the format back into the Markdown mindset of pre-baked structure and defeats the point.1112## When to use1314Use when **all three** are true:151. The artifact is a synthesis the human will read once to decide something.162. The Markdown version would exceed ~100 lines or carry signal a table/SVG/collapsible would express more cleanly (severity, dependency, status, time).173. No downstream pipeline (Ralph, GitHub, another LLM, grep) consumes the artifact.1819Common targets in this harness:20- `/harness-audit` tier-ranked report → filterable findings dashboard21- `/strategic-proposal` council artifact → phase-column roadmap with critic challenges inline22- `/skill-lint` verdict matrix → sortable scoring table with CURRENT/STALE/BROKEN/DELETE badges23- Weekly memory digest from N days of `log.md` → timeline coloured by skill outcome2425## When NOT to use2627Skip when the artifact is **source or pipeline input** — Markdown stays the substrate of the harness:28- PRDs (`tasks/*/prd.md`), briefings, commit messages, PR bodies, `CHANGELOG.md`29- Memory log entries themselves (`memory/<date>/log.md`)30- Skill/rule/identity sources (`CLAUDE.md`, `context/rules/`, `.claude/skills/`)31- Agent-to-agent handoffs (advisor → executor briefings)3233If asked to render any of the above, refuse and explain.3435## Instructions3637### 1. Parse arguments3839Arguments received: `$ARGUMENTS`4041| Position | Meaning |42|----------|---------|43| `$0` | **slug** (required, kebab-case, no extension) — becomes the filename |44| `--from <path>` | optional source artifact to read |45| `--intent <one-line>` | optional human-purpose hint (e.g. "pick next 3 audit actions") |4647If `slug` is missing, ask the user for one. Slug rules: lowercase, kebab-case, no slashes, no `.html` extension.4849If `slug` collides with an existing file in today's date directory, append `-2`, `-3`, etc. — never overwrite.5051### 2. Resolve output path5253```bash54TODAY=$(date -u +%Y-%m-%d)55mkdir -p "memory/$TODAY"56OUT="memory/$TODAY/<slug>.html"57```5859Always use UTC. Always create the directory first.6061### 3. Gather source material6263- If `--from` is given: read the file. If it does not exist, error out — do not invent content.64- If `--from` is absent: use the conversation context the orchestrator already has. Do not re-fetch what you already know.65- If both are absent and the conversation has no obvious artifact: ask the user what to render.6667### 4. Generate bespoke HTML6869Produce **one** self-contained `.html` file. Rules:7071- **Single file, inline everything.** All CSS in `<style>`. All SVG inline. No `<link>` to external CSS or fonts. No `<script src="https://...">`. The artifact must work offline and travel as one file.72- **Semantic HTML5.** `<header>`, `<main>`, `<section>`, `<nav>`, `<table>`, `<details>`/`<summary>` for collapsibles. Skip divs when a semantic tag fits.73- **System-font stack.** `font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;` — no Google Fonts.74- **Colour as meaning, not decoration.** Severity, status, phase. Pick a small palette (3–5 tokens) and apply consistently. Include a legend if non-obvious.75- **Pick widgets for the data shape:**76 - tabular → `<table>` with sortable headers (inline JS allowed for sort/filter only)77 - dependency / flow → inline `<svg>`78 - long evidence → `<details>` (collapsed by default past the third one)79 - timelines → flex row with date axis, or inline SVG80 - multi-perspective synthesis → tabs or side-by-side columns81- **Print-friendly.** Add `@media print` rules that expand `<details>` and drop interactive chrome.82- **Header block.** Title, generated-at UTC timestamp, source citation (path or "in-context"), one-line intent.83- **JavaScript is opt-in, not default.** Only include JS when interaction earns its keep (filter, sort, copy-to-clipboard, expand-all). Never for animations. Never for analytics.84- **No external fetches at runtime.** No `fetch()`, no images by URL — use inline SVG or data URIs only.8586### 5. Write the file8788Use the `Write` tool. Confirm the byte size is plausible (>2 KB for any non-trivial artifact, <500 KB unless the artifact genuinely warrants it).8990### 6. Report to the user9192Return three lines:931. Absolute path: `memory/<date>/<slug>.html`942. A one-sentence summary of what was rendered (so the user knows what they'll see).953. The open command suggestion: `/agent-browser file://$(pwd)/memory/<date>/<slug>.html` (or `open file://...` if running locally).9697### 7. Memory Protocol9899Append to `memory/<UTC-date>/log.md`:100101```markdown102## render-html -- HH:MM UTC103- **Result**: OP | DRY-RUN | PARTIAL | FAIL104- **Slug**: <slug>105- **Source**: <path or "in-context">106- **Intent**: <one-line>107- **Path**: memory/<date>/<slug>.html108- **Size**: <bytes>109- **Observation**: <one sentence — what shape the artifact took, e.g. "filterable severity table with 17 rows + inline SVG dependency map">110```111112Then run the qualify/improve loop per `context/rules/memory.md`. If you learned something non-obvious about which HTML shape suited this artifact type, that may merit a line in `memory/MEMORY.md`.113114## Anti-patterns115116- **Templating.** "Generic dashboard template, fill in the variables." Defeats the thesis. Generate bespoke each time.117- **External assets.** CDN links to Tailwind, Google Fonts, Chart.js, etc. The artifact must work offline and travel as one file.118- **Decorative JS.** Animations, fade-ins, gradients. The reader is making a decision, not watching a demo.119- **Rendering source.** Producing `prd.html`, `CLAUDE.html`, `MEMORY.html`. Those files are pipeline input or indexed source — leave them in Markdown.120- **Multi-file output.** Separate `.css`/`.js` companions. Single file or nothing.121- **Writing outside `memory/<date>/`.** No exceptions. The location is the convention.122- **Overwriting an existing artifact.** Suffix `-2`, `-3` instead — older renders may still be referenced in the conversation.123- **Skipping the memory log.** Every run logs, op or fail. The qualify/improve loop is not optional.124125## Examples126127```128/render-html harness-audit-tier --from memory/2026-05-18/audit-raw.md --intent "pick next 3 actions"129→ memory/2026-05-18/harness-audit-tier.html130131/render-html roadmap-council --intent "review council deliberation before publishing pinned issue"132→ memory/2026-05-18/roadmap-council.html133 (source was the strategic-proposal output already in context)134135/render-html week-19-digest --from memory/ --intent "what shipped this week"136→ memory/2026-05-18/week-19-digest.html137```