haac-aikit 0.8.3 → 0.10.0
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.
- package/README.md +7 -0
- package/catalog/commands/html.md +54 -22
- package/catalog/release-notes.json +31 -0
- package/catalog/rules/AGENTS.md.tmpl +10 -0
- package/catalog/skills/tier1/html-artifacts.md +192 -96
- package/catalog/templates/html-artifacts/01-exploration-code-approaches.html +453 -0
- package/catalog/templates/html-artifacts/02-exploration-visual-designs.html +515 -0
- package/catalog/templates/html-artifacts/03-code-review-pr.html +638 -0
- package/catalog/templates/html-artifacts/04-code-understanding.html +491 -0
- package/catalog/templates/html-artifacts/05-design-system.html +629 -0
- package/catalog/templates/html-artifacts/06-component-variants.html +605 -0
- package/catalog/templates/html-artifacts/07-prototype-animation.html +455 -0
- package/catalog/templates/html-artifacts/08-prototype-interaction.html +396 -0
- package/catalog/templates/html-artifacts/09-slide-deck.html +596 -0
- package/catalog/templates/html-artifacts/10-svg-illustrations.html +495 -0
- package/catalog/templates/html-artifacts/11-status-report.html +528 -0
- package/catalog/templates/html-artifacts/12-incident-report.html +596 -0
- package/catalog/templates/html-artifacts/13-flowchart-diagram.html +396 -0
- package/catalog/templates/html-artifacts/14-research-feature-explainer.html +381 -0
- package/catalog/templates/html-artifacts/15-research-concept-explainer.html +368 -0
- package/catalog/templates/html-artifacts/16-implementation-plan.html +703 -0
- package/catalog/templates/html-artifacts/17-pr-writeup.html +595 -0
- package/catalog/templates/html-artifacts/18-editor-triage-board.html +573 -0
- package/catalog/templates/html-artifacts/19-editor-feature-flags.html +663 -0
- package/catalog/templates/html-artifacts/20-editor-prompt-tuner.html +722 -0
- package/catalog/templates/html-artifacts/MANIFEST.json +182 -0
- package/catalog/templates/html-artifacts/README.md +88 -0
- package/catalog/templates/html-artifacts/index.html +822 -0
- package/dist/cli.mjs +812 -314
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
One command drops a working AI-coding setup into any repo — rules, skills, safety hooks, subagents, MCP stub, CI templates — for Claude Code, Cursor, Copilot, Windsurf, Aider, Gemini CLI, and Codex.
|
|
8
8
|
|
|
9
|
+
> [!TIP]
|
|
10
|
+
> **Just want HTML output from Claude Code?** Skip the full kit and install only the html-artifacts skill + 20 templates:
|
|
11
|
+
>
|
|
12
|
+
> ```bash
|
|
13
|
+
> npx haac-aikit init html
|
|
14
|
+
> ```
|
|
15
|
+
|
|
9
16
|
## Quickstart
|
|
10
17
|
|
|
11
18
|
```bash
|
package/catalog/commands/html.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Produce an HTML artifact for the current context using the `html-artifacts` skill and the forked reference templates.
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
`/html [optional intent]`
|
|
@@ -6,24 +6,56 @@ Generate an HTML artifact for the current context using the html-artifacts skill
|
|
|
6
6
|
## Steps
|
|
7
7
|
|
|
8
8
|
1. **Determine intent**
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
2. **Pick the
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
9
|
+
- With args (e.g. `/html code review of today's PR`): use the args as the intent.
|
|
10
|
+
- Without args: infer from the current conversation — what task is in progress, what was just discussed, what files are open.
|
|
11
|
+
|
|
12
|
+
2. **Pick the pattern**
|
|
13
|
+
Match the intent to one of the **9 patterns** in `.claude/skills/html-artifacts.md`:
|
|
14
|
+
- Exploration & Planning (code approaches · visual directions · implementation plans)
|
|
15
|
+
- Code Review & Understanding (PR review · PR writeup · module map)
|
|
16
|
+
- Design (design system · component variants)
|
|
17
|
+
- Prototyping (animation · interaction)
|
|
18
|
+
- Illustrations & Diagrams (SVG figures · flowcharts)
|
|
19
|
+
- Decks (slide presentations)
|
|
20
|
+
- Research & Learning (feature explainer · concept explainer)
|
|
21
|
+
- Reports (status · incident)
|
|
22
|
+
- Custom Editing Interfaces (triage board · feature flags · prompt tuner)
|
|
23
|
+
|
|
24
|
+
3. **Look up the template**
|
|
25
|
+
Read `.aikit/templates/html-artifacts/MANIFEST.json`. Find the entry whose `category` matches the pattern from step 2 and whose `slug` matches the intent best (e.g. for a PR review intent → slug `pr-review`).
|
|
26
|
+
|
|
27
|
+
4. **Read the template**
|
|
28
|
+
Use the Read tool on `.aikit/templates/html-artifacts/<file>.html` for that entry. This is the structural ground truth — copy its CSS variables, class names, layout grids, and visual conventions **verbatim**.
|
|
29
|
+
|
|
30
|
+
5. **Gather project context**
|
|
31
|
+
Pull real facts the artifact needs to display:
|
|
32
|
+
- For Code Review: `git diff main...HEAD`, file list with classifications
|
|
33
|
+
- For Reports: `git log --since=...`, deploy logs, incident notes
|
|
34
|
+
- For Design System: read `docs/aikit-html-design-system.html` if it exists, else use the tokens from the template
|
|
35
|
+
- For Research/Explainer: read the source files the explainer covers
|
|
36
|
+
- For Implementation Plan: milestones, packages affected, risky code
|
|
37
|
+
|
|
38
|
+
6. **Produce the filled artifact**
|
|
39
|
+
Write a new HTML file that mirrors the template's structure but with the gathered context replacing the placeholder content. Preserve:
|
|
40
|
+
- All CSS `:root` design tokens
|
|
41
|
+
- All class names and layout grids
|
|
42
|
+
- All cross-cutting techniques (sticky toolbars, scroll-margin-top, microinteractions, `<details>` collapsibles)
|
|
43
|
+
- The visual language: severity colors, badge styles, dot indicators, monospace meta text
|
|
44
|
+
Required in `<head>`:
|
|
45
|
+
- `<title>` and `<meta name="description">`
|
|
46
|
+
- `<meta name="aikit-pattern" content="...">` — exactly one of: `Exploration`, `Code Review`, `Design`, `Prototype`, `Illustrations`, `Deck`, `Research`, `Report`, `Editor`
|
|
47
|
+
Add an `AUTO-GENERATED` pill top-right and a provenance footer (`Sources: ... — generated <ISO timestamp>`).
|
|
48
|
+
|
|
49
|
+
7. **Save with sequential numbering**
|
|
50
|
+
- Slug from intent: e.g. `code-review-auth-pr`, `weekly-status-mar-10`
|
|
51
|
+
- Determine `NN` by listing `.aikit/artifacts/*.html` (excluding `index.html`) and incrementing the highest number; start at `01`
|
|
52
|
+
- Save to `.aikit/artifacts/NN-<slug>.html`
|
|
53
|
+
|
|
54
|
+
8. **Regenerate the gallery index**
|
|
55
|
+
Rebuild `.aikit/artifacts/index.html` from scratch per the "Gallery index protocol" in the skill. List all artifacts, group by `<meta name="aikit-pattern">`, drop empty groups.
|
|
56
|
+
|
|
57
|
+
9. **Report**
|
|
58
|
+
Print both paths and suggest: `open .aikit/artifacts/index.html` (macOS) / `xdg-open .aikit/artifacts/index.html` (Linux).
|
|
59
|
+
|
|
60
|
+
## Fallback
|
|
61
|
+
If `.aikit/templates/html-artifacts/` does not exist (e.g. project synced before this kit version), run `aikit sync` first, or use the user-driven path: `aikit scaffold html <slug>` to drop a starter, then ask the agent to fill it.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"releases": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.9.0",
|
|
6
|
+
"date": "2026-05-12",
|
|
7
|
+
"headline": "HTML artifact scaffolding + 20 forked templates + cross-tool skill discovery",
|
|
8
|
+
"highlights": [
|
|
9
|
+
"NEW `aikit scaffold html <slug>` — drops one of 20 HTML reference templates into the current dir",
|
|
10
|
+
"NEW 20 forked templates at `.aikit/templates/html-artifacts/` (with permission from ThariqS)",
|
|
11
|
+
"NEW `aikit whatsnew` command for release notes",
|
|
12
|
+
"NEW Update-available banner (runs once per 24h; opt out with AIKIT_NO_UPDATE_CHECK=1)",
|
|
13
|
+
"CHANGED `html-artifacts` skill v1.1.0 → v2.0.0: 9 patterns, mandatory template-read protocol",
|
|
14
|
+
"CHANGED `aikit sync` now also syncs templates; `aikit list` shows them as a category",
|
|
15
|
+
"CHANGED Skill discovery propagates to all 6 non-Claude tools via AGENTS.md.tmpl",
|
|
16
|
+
"FIXED gitignore — only `.aikit/artifacts/` ignored; templates are now committable"
|
|
17
|
+
],
|
|
18
|
+
"breaking": [
|
|
19
|
+
"`html-artifacts.md` skill is a complete rewrite — if you customized it, `aikit sync` will flag a conflict"
|
|
20
|
+
],
|
|
21
|
+
"migration": [
|
|
22
|
+
"Run `aikit sync` to pull the 20 new templates into `.aikit/templates/html-artifacts/`",
|
|
23
|
+
"Templates will now appear in `git status` after sync (intentional — they're reference material)"
|
|
24
|
+
],
|
|
25
|
+
"links": {
|
|
26
|
+
"changelog": "https://github.com/Hamad-Center/haac-aikit/blob/main/CHANGELOG.md#090--2026-05-12",
|
|
27
|
+
"release": "https://github.com/Hamad-Center/haac-aikit/releases/tag/v0.9.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -47,6 +47,16 @@ TODO: How to run a single test; framework quirks.
|
|
|
47
47
|
|
|
48
48
|
TODO: Project-specific security notes.
|
|
49
49
|
|
|
50
|
+
## Skills and templates
|
|
51
|
+
<!-- This section is shipped by haac-aikit so every tool (Claude, Cursor, Aider,
|
|
52
|
+
Copilot, Windsurf, Gemini, Codex) sees the same skill-discovery rules.
|
|
53
|
+
The .claude/ path name is historical; the content there is tool-agnostic. -->
|
|
54
|
+
|
|
55
|
+
- <!-- id: skills.read-on-match --> Skill instructions live at `.claude/skills/*.md`. When a task matches a skill's `## When to use` rules, **read that skill before producing output** — it ships pattern-specific techniques and protocols that this file does not repeat.
|
|
56
|
+
- <!-- id: skills.html-artifacts --> For HTML artifact production (specs, plans, PR reviews, design systems, prototypes, diagrams, decks, research explainers, reports, custom editing interfaces): the `html-artifacts` skill at `.claude/skills/html-artifacts.md` is **mandatory**. Forked reference templates live at `.aikit/templates/html-artifacts/` with a machine-readable `MANIFEST.json`. **Read the matching template first** before writing; do not invent HTML structure from scratch.
|
|
57
|
+
- <!-- id: skills.scaffold-cli --> User-driven scaffolding: `aikit scaffold html <slug>` drops a starter template into the current directory. Run `aikit scaffold html --list` to see all 20.
|
|
58
|
+
- <!-- id: artifacts.output-path --> Filled artifacts go to `.aikit/artifacts/NN-<slug>.html` (incrementing `NN`). Regenerate `.aikit/artifacts/index.html` after each write; the gallery is auto-maintained.
|
|
59
|
+
|
|
50
60
|
## Gotchas
|
|
51
61
|
<!-- High-signal section. Add things the agent repeatedly gets wrong.
|
|
52
62
|
Tip: prefix the most load-bearing rules with `IMPORTANT:` or `YOU MUST` —
|
|
@@ -1,109 +1,205 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: html-artifacts
|
|
3
|
-
description: Use when
|
|
4
|
-
version: "
|
|
3
|
+
description: Use when producing structured output that benefits from rich layout, comparison, drill-in, or interaction — specs, plans, PR reviews, design systems, prototypes, diagrams, decks, research explainers, reports, and custom editors. Scaffolds from 20 forked reference templates at `.aikit/templates/html-artifacts/` and fills them with project context. Maintains a gallery at `.aikit/artifacts/index.html`.
|
|
4
|
+
version: "2.3.0"
|
|
5
5
|
source: haac-aikit
|
|
6
6
|
license: MIT
|
|
7
|
+
inspired-by: https://thariqs.github.io/html-effectiveness (templates forked with permission, 2026-05-12)
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
## When to use
|
|
10
|
-
- Output is
|
|
11
|
-
- Task
|
|
12
|
-
- User
|
|
13
|
-
-
|
|
11
|
+
- Output is comparison, drill-in, or interactive — not linear prose
|
|
12
|
+
- Task is a spec, plan, review, report, prototype, design system, diagram, deck, explainer, or editor
|
|
13
|
+
- User says "share", "review", "scan", "click through", "demo", "tune"
|
|
14
|
+
- Output would otherwise be > ~80 lines of markdown
|
|
15
|
+
|
|
16
|
+
Default to markdown for linear prose. HTML earns its weight only when structure or interaction is the point.
|
|
14
17
|
|
|
15
18
|
## Proactive offer rule
|
|
16
|
-
When conditions
|
|
17
|
-
|
|
18
|
-
> "I can
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
**
|
|
26
|
-
**
|
|
27
|
-
**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**
|
|
31
|
-
**
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
**
|
|
36
|
-
**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
**
|
|
46
|
-
**
|
|
47
|
-
**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
**
|
|
56
|
-
|
|
57
|
-
**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
**
|
|
61
|
-
|
|
62
|
-
**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
19
|
+
When conditions match but the user didn't ask for HTML, say one sentence and wait:
|
|
20
|
+
|
|
21
|
+
> "I can produce this as an interactive HTML artifact (scaffolded from a template) — want that?"
|
|
22
|
+
|
|
23
|
+
## Cross-cutting techniques (apply to ALL patterns)
|
|
24
|
+
- **Design tokens** in `:root`: `--clay #D97757`, `--slate #141413`, `--ivory #FAF9F5`, `--oat #E3DACC`, `--olive #788C5D`, `--gray-150 #F0EEE6`, `--gray-300 #D1CFC5`, `--gray-500 #87867F`, `--gray-700 #3D3D3A`, `--white #FFFFFF`
|
|
25
|
+
- **Font stack**: `system-ui, -apple-system, "Segoe UI", Roboto` for sans; `ui-serif, Georgia` for `--serif`; `ui-monospace, "SF Mono"` for `--mono`
|
|
26
|
+
- **Layout**: CSS Grid for structure; flex + gap for toolbars and rows
|
|
27
|
+
- **Sticky**: toolbars / TOCs / column headers use `position: sticky; top: 0; z-index: 1`
|
|
28
|
+
- **Responsive type**: `font-size: clamp(min, Nvw, max)` for headings — no breakpoint jumps
|
|
29
|
+
- **Microinteractions**: `:hover { transform: translateY(-1px) }`, `:active { transform: translateY(1px) }`, transitions 120–600ms with explicit properties — **never `transition: all`**
|
|
30
|
+
- **Semantic HTML**: `<details>`, `<summary>`, native `<button>`, native `<input>` — **never div-button hacks**
|
|
31
|
+
- **Mobile**: at least one `@media (max-width: 960px)` breakpoint per artifact
|
|
32
|
+
- **Dot indicators**: small colored circles via `::before` pseudo-elements (severity, ownership, status)
|
|
33
|
+
- **Shadows**: subtle only — `0 1px 3px rgba(20, 20, 19, 0.06)`; never heavy drop shadows
|
|
34
|
+
- **Anchors**: every section heading has an `id`; `scroll-margin-top: 28px` on sections
|
|
35
|
+
- **Provenance footer**: every generated artifact ends with `Sources: … — generated <ISO timestamp>`
|
|
36
|
+
- **AUTO-GENERATED pill**: top-right badge on agent-produced artifacts so readers know the origin
|
|
37
|
+
- **Prompt callout**: exploration / planning artifacts preserve the originating user request in a cream-tinted box at top
|
|
38
|
+
- **Density-adaptive rendering**: when the artifact's total visible items (milestones + risks + cards + rows across all sections) is ≤ 6, drop decorations designed for dense pages — section numbers, tag chips, colored dot indicators, multi-column summary cards. These visuals were tuned for ~12-item artifacts; on sparse content they read as noise instead of hierarchy. The point of structure is signal; if there's little content, decoration buries it.
|
|
39
|
+
- **Decision callout first**: any artifact that asks the user to decide something starts with a "Decision needed" block at the top — the call-to-action in one sentence, options in chips (`A —` / `B —`), the recommendation marked. Don't make decision-makers scroll to find what to approve.
|
|
40
|
+
|
|
41
|
+
## Accessibility (a11y)
|
|
42
|
+
|
|
43
|
+
Decision documents get read on phones, with screen readers, in high-contrast mode, by keyboard-only users. The bar is the same as the voice rule — make the artifact work for the actual reading environment, not just a desktop browser.
|
|
44
|
+
|
|
45
|
+
**Hard rules:**
|
|
46
|
+
|
|
47
|
+
1. **Landmark roles** — wrap top-level structure in `<main>`, `<nav>`, `<article>`, `<aside>`. Screen readers use these to navigate; readers without them have to crawl the document linearly.
|
|
48
|
+
2. **Alt text on every diagram and icon** — inline `<svg>` gets `<title>` + `aria-labelledby` or `aria-label`; `<img>` gets `alt="..."`. Purely decorative icons get `aria-hidden="true"` so they don't announce as noise.
|
|
49
|
+
3. **Heading hierarchy never skips levels** — `<h1>` → `<h2>` → `<h3>`. Exactly one `<h1>` per artifact (the title).
|
|
50
|
+
4. **Native form controls only** — `<input>` paired with `<label for="...">`, `<button>` for buttons, native `<select>`. No div-button hacks.
|
|
51
|
+
5. **Color contrast ≥ 4.5:1 for body text, ≥ 3:1 for large text** — design tokens already meet WCAG AA; don't override per-artifact in ways that break the ratio.
|
|
52
|
+
6. **Keyboard focus visible** — never `outline: none` without a `:focus-visible` replacement that meets contrast.
|
|
53
|
+
|
|
54
|
+
## Voice & plain-language rule
|
|
55
|
+
|
|
56
|
+
The default reader is a smart non-specialist taking a decision. They should understand every sentence on first read without expanding tooltips, looking up jargon, or having prior domain context.
|
|
57
|
+
|
|
58
|
+
**Four sub-rules:**
|
|
59
|
+
|
|
60
|
+
1. **One concept per sentence** — no "X with Y and Z" compounds.
|
|
61
|
+
2. **Plain-language verb + concrete object** — "Load images only when the reader scrolls to them" beats "Implement lazy-loading via IntersectionObserver."
|
|
62
|
+
3. **Jargon lives in tag chips, `<code>` spans, or collapsed `<details>`** — never in the main reading path.
|
|
63
|
+
4. **Concrete first, abstract term in parens** — "Make sure failed requests retry safely (idempotent)" beats "Idempotent retry on failure."
|
|
64
|
+
|
|
65
|
+
**Three side-by-side examples (bad → good):**
|
|
66
|
+
|
|
67
|
+
| Bad | Good |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| "Schema & API contract — tRPC router stubs reviewed before anything else lands" | "Define the API the backend will expose. Review the contract before any UI work." |
|
|
70
|
+
| "Optimistic insert with rollback on failure, one level of nesting only" | "Show the comment immediately. Roll back if the server rejects it. One level of replies — no deeper threads." |
|
|
71
|
+
| "Fan-out via realtime channel, per-user read cursors track unread state" | "When a card is open, listen for new comments on it. Push updates to everyone watching." |
|
|
72
|
+
|
|
73
|
+
The technical details (`tRPC`, `optimistic insert`, `fan-out`) still appear in the artifact — but as tag chips beneath the prose, not in the reading path. The visible layer is decision-grade scannable; the chip layer keeps the artifact grep-able and AI-readable.
|
|
74
|
+
|
|
75
|
+
## Pattern playbook (9 patterns, aligned with the source)
|
|
76
|
+
|
|
77
|
+
### 1. Exploration & Planning
|
|
78
|
+
**Templates**: `01-exploration-code-approaches.html`, `02-exploration-visual-designs.html`, `16-implementation-plan.html`
|
|
79
|
+
**Use for**: comparing N approaches, exploring visual directions, handing off a plan
|
|
80
|
+
**Concrete techniques**: numbered approach badges (`01`/`02`/`03`) in oat chips · equal-width code blocks for visual symmetry · pro/con tables with colored dot bullets (olive=pro, clay=con) · chip metrics footer (bundle, testability, reuse, SSR safety) · recommendation callout with left clay border + serif 22px · light/dark toggle via single `:root` swap · numbered milestone rows with date columns on left · phase cards with package chips · risks table (RISK / SEV / MITIGATION) · "Decide with · person · before slice N" footer on open questions
|
|
81
|
+
**Must-haves**: preserve the originating prompt as a top callout; numbered section dots if > 4 sections; **Decision needed block at the very top** — a clay-bordered card stating the call-to-action, the options considered (chips: `A —` / `B —`), and which one is recommended. Buried decisions are the failure mode this prevents.
|
|
82
|
+
|
|
83
|
+
### 2. Code Review & Understanding
|
|
84
|
+
**Templates**: `03-code-review-pr.html`, `17-pr-writeup.html`, `04-code-understanding.html`
|
|
85
|
+
**Use for**: PR reviews, author writeups, module / architecture explainers
|
|
86
|
+
**Concrete techniques**: PR header card (repo · PR# · title · author avatar · branch arrow `→` · `+lines / -lines` · file count) · risk map: horizontal chip cluster with 3-state legend (safe / worth a look / needs attention) · per-file expandable `<details>` with severity badge + line-count chip · diff grid `[line# | mark | code]` on dark slate, `.add/.del/.ctx/.hunk` states at 15% opacity · review comment bubble: left accent + `::before` triangle pointer + line# tag + BLOCKING (clay) / NIT (gray) label · "Suggested next steps" checkbox list at the end · for module maps: inline SVG with hot path in clay, right sidebar with "Key files" + "Gotchas" panels · `<details>` "show source" toggle on long code blocks
|
|
87
|
+
**Must-haves**: severity color coding; collapsed files at the end; clickable jump links between sections
|
|
88
|
+
|
|
89
|
+
### 3. Design
|
|
90
|
+
**Templates**: `05-design-system.html`, `06-component-variants.html`
|
|
91
|
+
**Use for**: design system references, component-variant matrices
|
|
92
|
+
**Concrete techniques**: color groups in named bands (PRIMARY / NEUTRAL / SEMANTIC) · each swatch shows 64×64 chip + hex + token name · typography table with shared specimen text repeated at each scale, size/leading/weight as right-aligned monospace meta · vertical spacing-bar ruler (`overflow-x: auto`) · radius + elevation showcase cards · core-components stage with `<Button />`-style XML labels above each section · for variants: live control panel (slider + segmented + checkbox) affecting all variants live · "best for: ..." rationale below each variant · hovered-variant code-preview pane
|
|
93
|
+
**Must-haves**: tokens have both hex AND name; components on the page are real HTML, not images
|
|
94
|
+
|
|
95
|
+
### 4. Prototyping
|
|
96
|
+
**Templates**: `07-prototype-animation.html`, `08-prototype-interaction.html`
|
|
97
|
+
**Use for**: animation tuning, interaction prototypes
|
|
98
|
+
**Concrete techniques**: stage area with the actual interactive element + "click to toggle" caption · right-side knob panel: easing presets as selectable cards with `cubic-bezier(...)` formulas visible · keyframe timeline strip with milestone markers (`fill 0ms · check 80ms · strike 120ms · confetti 200ms · collapse 600ms`) · copy-paste CSS panel below stage with commented sections · for interactions: 2-col layout with stage left, "What you're feeling" design-notes right, "Open questions" deferral panel below
|
|
99
|
+
**Must-haves**: explicit "design decisions baked in" annotations; explicit "open questions" deferred to reviewer; exportable CSS/params
|
|
100
|
+
|
|
101
|
+
### 5. Illustrations & Diagrams
|
|
102
|
+
**Templates**: `10-svg-illustrations.html`, `13-flowchart-diagram.html`
|
|
103
|
+
**Use for**: SVG figure sheets, interactive flowcharts
|
|
104
|
+
**Concrete techniques**: inline SVG with CSS-var theming (`fill="var(--panel)"`, `stroke="var(--line)"`) · per-figure card with download-each-as-standalone button · "Palette & rules" section at bottom (palette swatches + stroke/radius/label rules) · for flowcharts: process rectangles · decision diamonds · terminal rounded nodes (✅ green for success) · failure paths drawn dashed clay · edge labels on arrows (pass / fail / healthy) · legend at bottom (process step / decision / terminal success / failure path) · click-to-detail right sidebar showing clicked node's metadata
|
|
105
|
+
**Must-haves**: every figure self-contained with its own `<style>` block (downloadable standalone); legend visible for non-trivial diagrams
|
|
106
|
+
|
|
107
|
+
### 6. Decks
|
|
108
|
+
**Template**: `09-slide-deck.html`
|
|
109
|
+
**Use for**: slide presentations, walkthroughs, pitches
|
|
110
|
+
**Concrete techniques**: `width: 100vw; height: 100vh` per slide · `scroll-snap-type: y mandatory` on body, `scroll-snap-stop: always` on `.slide` · responsive type `font-size: clamp(40px, 6vw, 64px)` · invert variant (`.slide.invert { bg slate; color ivory }`) for decision slides · large-serif metric values (52px) · slide counter top-right (`N / total`) · uppercase mono eyebrow on each slide ("SHIPPED THIS WEEK", "DECISION NEEDED", "ON DECK") · decision card with option chips prefixed `A —` / `B —` · footnote at bottom (absolute, monospace 11px)
|
|
111
|
+
**Must-haves**: arrow-key nav (or scroll-snap); one idea per slide; if user would scroll inside a slide, it's a Report not a Deck
|
|
112
|
+
|
|
113
|
+
### 7. Research & Learning
|
|
114
|
+
**Templates**: `14-research-feature-explainer.html`, `15-research-concept-explainer.html`
|
|
115
|
+
**Use for**: explaining a feature in your repo, teaching a concept
|
|
116
|
+
**Concrete techniques**: sticky left "ON THIS PAGE" TOC (200px) with nested children · "FILES READ" panel below TOC for provenance · TL;DR callout with clay left border · collapsed `<details>` step rows that expand on click · file:line tags right-aligned in step headers · tabbed code blocks (e.g., `limits.yaml` / `route.ts` / `client response`) for the same concept in different views · ★ tip callouts with cream background distinct from • bullets · for concepts: live interactive widget (manipulable, not just diagram) · hover-linked glossary terms underlined in prose, defined in right sidebar · comparison table with color-coded values (red=bad, green=good)
|
|
117
|
+
**Must-haves**: TL;DR at the very top; clickable TOC; explicit "FILES READ" provenance for repo-specific explainers
|
|
118
|
+
|
|
119
|
+
### 8. Reports
|
|
120
|
+
**Templates**: `11-status-report.html`, `12-incident-report.html`
|
|
121
|
+
**Use for**: weekly status, sprint reviews, incident post-mortems
|
|
122
|
+
**Concrete techniques**: 4-card metric band with delta sub-labels ("+3 vs wk10", "±0", "SEV-2 · 47m") · incident pills (SEV-2 clay / Resolved olive / Duration / Detected / Owner) · dark TL;DR box at top of incidents · vertical timeline with colored dots (clay = impact, olive = mitigated) and monospace time chips · shipped table with PR# / TITLE / AUTHOR / RISK columns and colored risk badges · velocity bar chart with the spike day colored · carryover items prefixed with status pills (IN REVIEW / BLOCKED / SLIPPED) · impact table (Requests failed / Peak error rate / Users affected / Data loss / SLA breach) · action-items checklist with avatar + due date · footer cites sources ("git log main..HEAD · CI dashboard · deploy log") and generation timestamp · "AUTO-GENERATED" pill top-right
|
|
123
|
+
**Must-haves**: provenance footer; quantified impact for incidents; action items with owners + dates
|
|
124
|
+
|
|
125
|
+
### 9. Custom Editing Interfaces
|
|
126
|
+
**Templates**: `18-editor-triage-board.html`, `19-editor-feature-flags.html`, `20-editor-prompt-tuner.html`
|
|
127
|
+
**Use for**: throwaway editors for tasks that are hard to describe — kanban, flag configs, prompt tuning
|
|
128
|
+
**Concrete techniques**: native drag-and-drop (`draggable="true"` + `dragstart` / `dragover` / `drop`) with `.dragover` 2px dashed outline · 4-col kanban grid with `data-col` attribute → colored `border-top: 3px` per column · sticky column headers · filter toggle: `display: none` → `inline-block` on `.on` · live summary row that updates on drag · checkbox-based toggle switches with large click targets · dependency warning banners (`display: none` → `flex` on `.show`) · 2-col layout with sticky 320px right control panel · for prompt tuners: editable textarea left + sample-input panels right that re-render live
|
|
129
|
+
**Must-haves**: **always end with an export button** — "Copy as markdown" / "Copy diff" / "Copy params" — that turns the in-UI state back into something pasteable to the next prompt or committable to the repo
|
|
130
|
+
|
|
131
|
+
## Failure modes (anti-patterns)
|
|
132
|
+
- `transition: all` — animates layout shifts and lags; use explicit property lists
|
|
133
|
+
- Div-based button hacks — breaks keyboard nav; use native `<button>`
|
|
134
|
+
- Unlabeled colors — every swatch and badge needs hex AND token AND role
|
|
135
|
+
- Desktop-only layouts — every artifact needs at least one `@media` breakpoint
|
|
136
|
+
- Hover-only critical info — invisible on touch; use `<details>` or always-visible cards
|
|
137
|
+
- Static code blocks for diffs — color and structure are the point; render `.add`/`.del`/`.ctx` states
|
|
138
|
+
- Walls of prose where structure would earn its weight — re-evaluate; default to markdown
|
|
139
|
+
- Missing `scroll-margin-top` — anchors land under sticky headers
|
|
140
|
+
- Neglected `:active` feedback — clicks feel dead without `translateY(1px)`
|
|
141
|
+
- Missing keyboard nav for editors — native form controls, not div-clicks
|
|
142
|
+
- Missing AUTO-GENERATED badge on agent-produced artifacts — readers deserve to know
|
|
143
|
+
- Missing provenance footer — "where did these numbers come from?" should always be answerable
|
|
144
|
+
- **Jargon-heavy main prose** — using `tRPC`, `fan-out`, `idempotent`, `IntersectionObserver` in the reading path makes the artifact unreadable for non-specialists. Plain-language verb + concrete object in prose; technical terms in tag chips and code blocks.
|
|
145
|
+
- **Decision buried below the fold** — artifact asks the user to approve, choose, or sign off but the call-to-action lives in Milestones or Risks, not at the top. Decision-makers shouldn't have to scroll to find what they're approving.
|
|
146
|
+
- **Missing alt text / aria-label on SVG and `<img>`** — diagrams and charts become invisible to screen readers, low-vision users, and search / indexing. Every visual element gets a text equivalent.
|
|
147
|
+
|
|
148
|
+
## Template scaffolding
|
|
149
|
+
|
|
150
|
+
**YOU MUST NOT invent HTML structure from scratch.** Reference templates are the ground truth. Reading one before writing is mandatory.
|
|
151
|
+
|
|
152
|
+
**Template location**: `.aikit/templates/html-artifacts/` (synced from the catalog). Manifest at `.aikit/templates/html-artifacts/MANIFEST.json` maps `slug` → `category` → `file`.
|
|
153
|
+
|
|
154
|
+
### Scaffolding protocol (agent-driven — follow exactly)
|
|
155
|
+
|
|
156
|
+
1. **Read the manifest first**: `Read .aikit/templates/html-artifacts/MANIFEST.json`. Find the entry whose `category` matches the pattern from the playbook above and whose `slug` best matches the user's intent.
|
|
157
|
+
2. **Read the matching template**: `Read .aikit/templates/html-artifacts/<file>.html` (the `file` field from the manifest entry). This is non-optional. If the file is missing, ask the user to run `aikit sync`; do not proceed without it.
|
|
158
|
+
3. **Gather real project context**: run the appropriate commands — `git diff main...HEAD`, `git log --since=...`, read files mentioned in the prompt, etc. Replace the template's placeholder content with these real facts.
|
|
159
|
+
4. **Prune irrelevant sections before filling**. Scan the template's `<section>` blocks; for any not required by the user's intent, OMIT them from the filled artifact entirely (don't render them with empty placeholders). Aim for the minimum sections that carry signal — keeping all sections "just in case" forces the reader to skim each one to decide whether it's relevant. Section-keep guide:
|
|
160
|
+
|
|
161
|
+
| Templates | Always include | Optional (only if relevant) |
|
|
162
|
+
| --- | --- | --- |
|
|
163
|
+
| `01`, `02`, `16` (Exploration & Planning) | Milestones / Approaches + Risks | Data flow §02 (only if client↔server movement) · Mockups §03 (only if UI work) · Key code §04 (only if specific patterns to highlight) |
|
|
164
|
+
| `03`, `17`, `04` (Code Review) | PR header · Per-file details · Comments | Risk map (only if multiple severities) · Module-map SVG (only for arch reviews) |
|
|
165
|
+
| `11`, `12` (Reports) | Metric band + main table | Velocity chart (only if time series) · Incident timeline (only for incidents) |
|
|
166
|
+
| `18`, `19`, `20` (Editors) | Real columns + export button | Dependency warnings (only if dependencies) |
|
|
167
|
+
| All others | Core content sections of the pattern | Any section where placeholders would carry no signal |
|
|
168
|
+
|
|
169
|
+
5. **Preserve structure verbatim** when writing the filled artifact:
|
|
170
|
+
- All `:root` CSS variables (`--clay`, `--slate`, `--ivory`, `--oat`, `--olive`, `--gray-*`)
|
|
171
|
+
- All class names, layout grids, and microinteraction conventions
|
|
172
|
+
- All cross-cutting techniques (sticky positioning, `scroll-margin-top`, `<details>` collapsibles, native form controls)
|
|
173
|
+
- The pattern's visual language (severity colors, badge styles, dot indicators, monospace meta text)
|
|
174
|
+
- **Apply the Voice & plain-language rule** when writing prose into content nodes (`<p>`, `<h3>`, milestone bodies, risk explanations). Jargon goes in tag chips, `<code>` spans, or `<details>` — never in main prose.
|
|
175
|
+
6. **Add required `<head>` elements**: `<title>`, `<meta name="description">`, and `<meta name="aikit-pattern" content="...">` with one of: `Exploration`, `Code Review`, `Design`, `Prototype`, `Illustrations`, `Deck`, `Research`, `Report`, `Editor`.
|
|
176
|
+
7. **Add AUTO-GENERATED pill** top-right and **provenance footer** (`Sources: ... — generated <ISO timestamp>`).
|
|
177
|
+
8. **Save** to `.aikit/artifacts/NN-<slug>.html` (increment `NN` from existing files).
|
|
178
|
+
9. **Regenerate gallery index** per the protocol below.
|
|
179
|
+
|
|
180
|
+
### User-driven scaffolding (alternative)
|
|
181
|
+
|
|
182
|
+
When the user wants a pristine starter to look at first: `aikit scaffold html <slug>` drops the template into the current directory unmodified. Slugs match the manifest: `code-approaches`, `visual-designs`, `pr-review`, `pr-writeup`, `code-understanding`, `design-system`, `component-variants`, `animation`, `interaction`, `slide-deck`, `svg-illustrations`, `status-report`, `incident-report`, `flowchart`, `feature-explainer`, `concept-explainer`, `implementation-plan`, `triage-board`, `feature-flags`, `prompt-tuner`. Numbers (`03`) and `--list` also work.
|
|
87
183
|
|
|
88
184
|
## Output rules
|
|
89
|
-
- Save to `.aikit/artifacts/NN-<slug>.html`
|
|
90
|
-
-
|
|
91
|
-
- Every artifact MUST include `<meta name="
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
5. Reuse the built-in design system CSS so the gallery matches the artifacts
|
|
105
|
-
|
|
106
|
-
Drop empty groups. Sort entries within a group by filename (which is by `NN`). The index itself uses `<meta name="aikit-pattern" content="Index">` so future tooling can recognize it but it is excluded from its own listing.
|
|
185
|
+
- Save filled artifacts to `.aikit/artifacts/NN-<slug>.html` (`NN` zero-padded; increment from existing files; start at `01`). This path is gitignored.
|
|
186
|
+
- Every artifact MUST include `<meta name="aikit-pattern" content="...">` in `<head>`. Valid values match the 9-pattern playbook: `Exploration`, `Code Review`, `Design`, `Prototype`, `Illustrations`, `Deck`, `Research`, `Report`, `Editor`. The gallery groups by this.
|
|
187
|
+
- Every artifact MUST include `<title>` and `<meta name="description">` — the gallery renders these.
|
|
188
|
+
- Pure HTML / CSS / JS only — no CDNs, no build step. Inline `<style>` and `<script>` blocks are fine.
|
|
189
|
+
- After saving, **regenerate `.aikit/artifacts/index.html` from scratch** (see Gallery protocol below), then print both paths and suggest `open .aikit/artifacts/index.html`.
|
|
190
|
+
|
|
191
|
+
## Gallery index protocol
|
|
192
|
+
After every artifact write, rebuild `.aikit/artifacts/index.html`:
|
|
193
|
+
|
|
194
|
+
1. List `.aikit/artifacts/*.html` excluding `index.html`.
|
|
195
|
+
2. For each file read `<title>`, `<meta name="description">`, `<meta name="aikit-pattern">`.
|
|
196
|
+
3. Group by pattern; drop empty groups; sort within a group by filename (`NN` order).
|
|
197
|
+
4. Render each group as a section with cards: filename badge, title, one-line description, link.
|
|
198
|
+
5. Reuse the cross-cutting design tokens so the gallery matches the artifacts.
|
|
199
|
+
6. The gallery itself uses `<meta name="aikit-pattern" content="Index">` so future tooling can recognize it; it is excluded from its own listing.
|
|
107
200
|
|
|
108
201
|
## Markdown-first rule
|
|
109
|
-
Existing brainstorming and planning skills stay markdown-first. Only switch to HTML when the user accepts the proactive offer or explicitly
|
|
202
|
+
Existing brainstorming, debugging, and planning skills stay markdown-first. Only switch to HTML when the user accepts the proactive offer or explicitly invokes `/html`. Cross-tool compatibility depends on this.
|
|
203
|
+
|
|
204
|
+
## Attribution
|
|
205
|
+
Templates forked with permission from [github.com/ThariqS/html-effectiveness](https://github.com/ThariqS/html-effectiveness) (2026-05-12). The pattern taxonomy, sub-types, and technique inventory above are derived from the same source. Adapted for cross-tool agent scaffolding under haac-aikit's MIT license.
|