--- name: htmlspec description: Creates a text-only engineering implementation plan as a single self-contained HTML page saved to specs/.html — the plan authored directly in styled HTML plus a freeform HTML zone where the agent can author any custom HTML/CSS/SVG/JS (inline SVG diagrams, interactive toggles, comparison matrices, decision trees) that aids comprehension. No images are generated; visual richness comes from inline HTML/SVG only. Use when the user says "htmlspec", wants a text-only HTML implementation plan, a browser-openable spec, or a richly-formatted HTML engineering plan without per-section image generation. argument-hint: "[user prompt]" --- # htmlspec ## Purpose Produce an engineering implementation plan as **one self-contained, text-only HTML page** — `specs/.html` — that you can open directly in a browser. Unlike a markdown spec, the plan is authored **directly in HTML** using the template below, and a dedicated **Freeform** zone lets you author any HTML you want (interactive toggles, animated SVG flows, comparison matrices, decision trees, etc.) to make the plan clearer and richer than prose could. **No images are generated** — all visual enrichment comes from inline HTML, CSS, SVG, and JS authored directly into the page. Phases, in order: 1. **Plan phase** — analyze, explore, design (same thinking as a normal spec). 2. **HTML authoring phase** — write the plan into the **HTML Plan Template**. 3. **Freeform phase** — enrich the page with custom HTML per the **Freeform Instruction Set**. ## Variables USER_PROMPT: $1 ALL_ARGUMENTS: $ARGUMENTS PLAN_OUTPUT_DIRECTORY: `specs/` PLAN_SLUG: kebab-case name derived from the plan topic (e.g. `in-memory-ttl-lru-cache`) HTML_OUTPUT: `specs/htmlspec-.html` — **the filename MUST always begin with the `htmlspec-` prefix** ## Instructions ### Plan phase - IMPORTANT: If no `USER_PROMPT` is provided, stop and ask the user to provide it. - Carefully analyze the USER_PROMPT. Determine task type (chore|feature|refactor|fix|enhancement) and complexity (simple|medium|complex). - Think deeply (ultrathink) about the best implementation approach. - Explore the codebase to understand existing patterns and architecture. - Decide which sections from the HTML Plan Template apply (include the conditional sections only when task type/complexity warrants them, exactly like a normal spec). - Generate a descriptive kebab-case PLAN_SLUG from the topic. ### HTML authoring phase - Author the plan **directly in HTML** using the **HTML Plan Template** below — do not write a markdown file. The output is a single `specs/htmlspec-.html`. - Keep the page **self-contained**: all CSS inline in `

Plan: {{TASK_NAME}}

{{TASK_TYPE}} · {{COMPLEXITY}}

Task Description

{{TASK_DESCRIPTION_HTML}}

Objective

{{OBJECTIVE_HTML}}

Problem Statement

{{PROBLEM_STATEMENT_HTML}}

Solution Approach

{{SOLUTION_APPROACH_HTML}}

Relevant Files

{{RELEVANT_FILES_HTML}}

Implementation Phases

{{PHASES_HTML}}

Step by Step Tasks

{{STEPS_HTML}}

Testing Strategy

{{TESTING_HTML}}

Acceptance Criteria

{{ACCEPTANCE_HTML}}

Validation Commands

{{VALIDATION_COMMANDS}}

Freeform

{{FREEFORM_HTML}}

Notes

{{NOTES_HTML}}
``` ## Report Format ```markdown ✅ HTML Implementation Plan Created (text-only) File: specs/htmlspec-.html (open in a browser) Topic: Freeform: Key Components: -
-
-
Open with: open specs/htmlspec-.html ``` ## Validation ```bash # file exists and is non-trivial HTML test -s specs/htmlspec-.html && head -1 specs/htmlspec-.html | grep -qi '' && echo "HTML ok" # text-only: no tags should be present ! grep -q '.html && echo "text-only ok" ```