haac-aikit 0.11.1 → 0.12.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.
Files changed (56) hide show
  1. package/README.md +34 -40
  2. package/catalog/commands/directions.md +29 -0
  3. package/catalog/commands/roadmap.md +31 -0
  4. package/catalog/rules/AGENTS.md.tmpl +3 -4
  5. package/catalog/rules/aikit-rules.json +11 -25
  6. package/catalog/skills/tier1/directions.md +72 -0
  7. package/catalog/skills/tier1/roadmap.md +71 -0
  8. package/catalog/templates/decide/template.html +13 -0
  9. package/catalog/templates/directions/template.html +287 -0
  10. package/catalog/templates/docs/starter.html +13 -0
  11. package/catalog/templates/roadmap/template.html +498 -0
  12. package/dist/cli.mjs +754 -1004
  13. package/dist/cli.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/catalog/agents/tier1/architect.md +0 -86
  16. package/catalog/agents/tier1/data-migration.md +0 -102
  17. package/catalog/agents/tier1/debugger.md +0 -64
  18. package/catalog/agents/tier1/devops.md +0 -74
  19. package/catalog/agents/tier1/implementer.md +0 -55
  20. package/catalog/agents/tier1/planner.md +0 -59
  21. package/catalog/agents/tier1/researcher.md +0 -62
  22. package/catalog/agents/tier1/reviewer.md +0 -70
  23. package/catalog/agents/tier1/security-auditor.md +0 -73
  24. package/catalog/agents/tier1/technical-writer.md +0 -56
  25. package/catalog/agents/tier1/tester.md +0 -63
  26. package/catalog/agents/tier2/changelog-curator.md +0 -60
  27. package/catalog/agents/tier2/dependency-upgrader.md +0 -67
  28. package/catalog/agents/tier2/evals-author.md +0 -65
  29. package/catalog/agents/tier2/flake-hunter.md +0 -57
  30. package/catalog/agents/tier2/prompt-engineer.md +0 -58
  31. package/catalog/agents/tier2/simplifier.md +0 -57
  32. package/catalog/ci/ci.yml +0 -24
  33. package/catalog/ci/secret-scan.yml +0 -20
  34. package/catalog/commands/debug.md +0 -17
  35. package/catalog/commands/execute.md +0 -13
  36. package/catalog/commands/explore.md +0 -26
  37. package/catalog/commands/plan.md +0 -19
  38. package/catalog/commands/review.md +0 -17
  39. package/catalog/commands/tdd.md +0 -21
  40. package/catalog/devcontainer/devcontainer.json +0 -24
  41. package/catalog/docs/claude-md-reference.md +0 -316
  42. package/catalog/hooks/format-on-save.sh +0 -43
  43. package/catalog/husky/commit-msg +0 -4
  44. package/catalog/husky/commitlint.config.js +0 -8
  45. package/catalog/husky/gitleaks.toml +0 -10
  46. package/catalog/husky/lintstagedrc.json +0 -5
  47. package/catalog/husky/pre-commit +0 -4
  48. package/catalog/husky/pre-push +0 -18
  49. package/catalog/plugin/plugin.json +0 -10
  50. package/catalog/release-notes.json +0 -69
  51. package/catalog/skills/tier2/claude-md-improver.md +0 -42
  52. /package/catalog/skills/{tier2 → tier1}/decide.md +0 -0
  53. /package/catalog/skills/{tier1 → tier2}/api-design.md +0 -0
  54. /package/catalog/skills/{tier1 → tier2}/incident-response.md +0 -0
  55. /package/catalog/skills/{tier1 → tier2}/performance-profiling.md +0 -0
  56. /package/catalog/skills/{tier1 → tier2}/software-architect.md +0 -0
package/README.md CHANGED
@@ -1,66 +1,60 @@
1
1
  # haac-aikit
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/haac-aikit.svg)](https://www.npmjs.com/package/haac-aikit)
4
- [![GitHub](https://img.shields.io/badge/github-Hamad--Center%2Fhaac--aikit-blue?logo=github)](https://github.com/Hamad-Center/haac-aikit)
3
+ [![npm](https://img.shields.io/npm/v/haac-aikit.svg)](https://www.npmjs.com/package/haac-aikit)
5
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
6
5
 
7
- **Docs that update themselves.** A cross-tool AI-coding kit (Claude Code, Cursor, Copilot, Windsurf, Aider, Gemini, Codex) that drops opinionated rules + skills + safety hooks into any repo. Headline feature: two new skills that maintain your project's HTML documentation and decision log as the code changes.
6
+ One `AGENTS.md` config, seven AI coding tools see it. Plus four HTML skills that produce single-page artifacts instead of walls of markdown.
7
+
8
+ Works with **Claude Code · Cursor · Copilot · Windsurf · Aider · Gemini CLI · OpenAI Codex CLI**.
9
+
10
+ ## Install
8
11
 
9
12
  ```bash
10
13
  npx haac-aikit
11
14
  ```
12
15
 
13
- ## The two headline skills (v0.11)
14
-
15
- - **`/docs`** — keeps a living HTML documentation tree at `docs/` current. The agent reads only the section it needs (via marker-bounded blocks), proposes the edit in chat, writes after you confirm. Your README stops going stale.
16
- - **`/decide`** — generates one rich HTML tradeoff page per architectural choice, saved to `docs/decisions/YYYY-MM-DD-<slug>.html`. Options as cards, pros/cons as colored dots, technical bit explained in plain language. A permanent decision log accumulates.
16
+ 30-second wizard. Headless: `npx haac-aikit --yes --tools=claude`.
17
17
 
18
- Built on Thariq Shihipar's [Unreasonable Effectiveness of HTML for Claude Code](https://thariqs.github.io/html-effectiveness/) — generating HTML instead of markdown gives you scannable, interactive output. We took the insight and built the workflows that compound the longest.
19
-
20
- ## What else you get
18
+ ## The four HTML skills
21
19
 
22
- Beyond `/docs` and `/decide`, a `standard` install drops in:
20
+ ```bash
21
+ aikit add --html
22
+ ```
23
23
 
24
- - **Cross-tool rules** one canonical `AGENTS.md`, dialect-translated per tool (proper MDC for Cursor, emphasis tokens for Claude, imperative phrasing for Aider). Stop maintaining four copies.
25
- - **Safety hooks** — block force-push to main, secret commits, `rm -rf`, reads of `.env*` / `.ssh*` / `.aws*`. Fires before the tool call.
26
- - **Rule observability** telemetry tells you which rules fire, get violated, or are dead weight. `aikit doctor --rules` shows the buckets.
27
- - **Learn from PR history** `aikit learn --limit=30` mines merged PR reviews for repeated corrections, proposes them as new rules.
28
- - **18 process skills + 14 agents** TDD, brainstorming, debugging, planner, reviewer, debugger, pr-describer, more.
29
- - **CI templates** gitleaks, standard CI, optional `@claude` PR responder.
24
+ | Skill | Use it when | Output |
25
+ |---|---|---|
26
+ | **`/docs`** | Documenting a feature or gotcha | `docs/<name>.html` |
27
+ | **`/decide`** | Picking between 2-4 technical options | `docs/decisions/<date>-<slug>.html` |
28
+ | **`/directions`** | Exploring visual design variants | `docs/directions/<date>-<slug>.html` |
29
+ | **`/roadmap`** | Handing an implementation plan to an implementer | `docs/roadmaps/<date>-<slug>.html` |
30
30
 
31
- Run `npx haac-aikit` for the wizard, or `npx haac-aikit --yes --tools=claude --preset=standard` for headless / CI.
31
+ Each command writes one self-contained HTML file — no build step, no CDN, commit and share the link. Built on [Thariq Shihipar's "Unreasonable Effectiveness of HTML for Claude Code"](https://thariqs.github.io/html-effectiveness/).
32
32
 
33
- ## How it compares
33
+ ## What else you get
34
34
 
35
- | | haac-aikit | rulesync | ruler | claudekit |
36
- |---|---|---|---|---|
37
- | Includes content (skills, agents, hooks) | yes | no | no | Claude-only |
38
- | Cross-tool (7 tools) | yes | yes | yes | no |
39
- | Rule observability | yes | no | no | no |
40
- | Dialect translation | yes | no | no | no |
41
- | Learn from PR history | yes | no | no | no |
42
- | Living HTML docs (`/docs`) + decision log (`/decide`) | yes | no | no | no |
43
- | Idempotent BEGIN/END markers | yes | no | `.bak` backups | no |
35
+ - **Cross-tool fan-out.** Skills, agents, hooks, and MCP servers fan out per selected tool in its native format. Pick `--tools=cursor` and get `.cursor/rules/` + `.cursor/hooks.json` + `.cursor/mcp.json`. Pick `--tools=codex` and get `.codex/agents/*.toml` + `.codex/config.toml` with MCP servers.
36
+ - **Safety hooks.** Blocks force-push to `main`, secret commits, `rm -rf` on sensitive paths, reads of `.ssh/` / `.aws/` / `secrets/`.
37
+ - **Rule observability.** Telemetry tracks which rules fire, which are violated, which are dead weight. `aikit doctor --rules` shows the report.
38
+ - **Built-in skills + agents.** 14 always-on skills (TDD, debugging, brainstorming, planning, ...) + 11 opt-in. Specialist agents for orchestration and PR description.
44
39
 
45
40
  ## Commands
46
41
 
47
42
  ```
48
- aikit interactive wizard
49
- aikit sync regenerate from .aikitrc.json
50
- aikit update pull latest templates, show diff
51
- aikit add <item> add a single skill / command / agent / hook
52
- aikit list show installed items + catalog
53
- aikit doctor [--rules] sanity / observability check
54
- aikit report [--format=...] adherence summary (markdown or json)
55
- aikit learn --limit=30 propose rules from your PR review history
43
+ aikit interactive wizard
44
+ aikit add --html install the four HTML skills + templates
45
+ aikit add <name> add a single skill / agent / hook
46
+ aikit sync regenerate per-tool files from .aikitrc.json
47
+ aikit doctor --rules sanity check + observability report
48
+ aikit report rule-adherence summary (markdown or json)
56
49
  ```
57
50
 
58
- ## Status & links
51
+ Full reference: `aikit --help`. Detailed audit per tool: [`AUDIT.md`](AUDIT.md).
52
+
53
+ ## Status
59
54
 
60
- **0.11.0** holding 1.0 until at least three external teams have used the observability loop on real PRs. Expect breaking changes between minor versions until then.
55
+ Pre-1.0. Expect breaking changes between minor versions. **0.12.0** ships with cross-tool parity for 6 of 7 tools (Aider has no native rule loader; we ship a skills index in `CONVENTIONS.md` instead). All blockers from the [pre-publish audit](audits/) have been fixed.
61
56
 
62
57
  - Site: <https://hamad-center.github.io/haac-aikit/>
63
- - Discussion / try-it sign-up: [issue #1](https://github.com/Hamad-Center/haac-aikit/issues/1)
64
- - Why we cut the old 20-template HTML skill: [the landing page](https://hamad-center.github.io/haac-aikit/) explains it — short version: developers don't browse a 20-template menu, two real workflows do 100% of the job. Recover the deleted templates with `git checkout v0.10.0 -- catalog/templates/html-artifacts/` if you want them.
58
+ - Try / discuss: [issue #1](https://github.com/Hamad-Center/haac-aikit/issues/1)
65
59
 
66
60
  MIT. See [ATTRIBUTIONS.md](ATTRIBUTIONS.md).
@@ -0,0 +1,29 @@
1
+ Render 2-4 visual design directions on a single self-contained HTML page using the `directions` skill.
2
+
3
+ ## Usage
4
+ `/directions <surface>`
5
+
6
+ Examples:
7
+ - `/directions empty state for the projects view`
8
+ - `/directions hero section for the marketing landing`
9
+ - `/directions dashboard card — three density options`
10
+
11
+ ## Steps
12
+
13
+ 1. **Confirm the brief** with the user before writing. Say back: *"Directions page for `<surface>` with `<N>` variants emphasizing `<axes>` (e.g. minimal · illustrated · instructional). I'll render each live on light and dark stages. Okay?"* Wait for yes.
14
+
15
+ 2. **Read the template** at `.aikit/templates/directions/template.html`. Copy its structure verbatim — design tokens, sticky toolbar, artboard grid, light/dark stage flip.
16
+
17
+ 3. **Pick variants that differ in strategy, not detail.** Each direction should have a one-word personality (`Minimal`, `Illustrated`, `Playful`, `Instructional`, `Editorial`, `Technical`). A 1px font tweak isn't a direction.
18
+
19
+ 4. **Render, don't describe.** Each variant's stage must contain real HTML/CSS that actually displays the design. A wall of bullet points describing the variant defeats the skill.
20
+
21
+ 5. **Use the user's domain language.** Real copy ("New task", "No projects yet"), not lorem ipsum.
22
+
23
+ 6. **Write the file** to `docs/directions/YYYY-MM-DD-<slug>.html` (today's date, kebab-case slug from the surface).
24
+
25
+ 7. **Report.** Print the file path and suggest `open docs/directions/YYYY-MM-DD-<slug>.html` (macOS) / `xdg-open` (Linux). One-sentence summary of what each variant emphasizes.
26
+
27
+ ## Fallback
28
+
29
+ If `.aikit/templates/directions/template.html` is missing, run `aikit sync` first.
@@ -0,0 +1,31 @@
1
+ Generate a thorough single-page implementation roadmap as HTML using the `roadmap` skill.
2
+
3
+ ## Usage
4
+ `/roadmap <feature>`
5
+
6
+ Examples:
7
+ - `/roadmap comment threads on task cards`
8
+ - `/roadmap migrate session store from cookies to Redis`
9
+ - `/roadmap add real-time presence to the editor`
10
+
11
+ ## Steps
12
+
13
+ 1. **Confirm the shape** with the user before writing. Say back: *"Roadmap for `<feature>`. I'll lay out ~`<N>` milestones, a data-flow diagram, mockups of `<surfaces>`, code for the migration and the `<key piece>`, and a risk table. Anything I should change before I write?"* Wait for yes.
14
+
15
+ 2. **Read the template** at `.aikit/templates/roadmap/template.html`. Copy its structure verbatim — design tokens, summary strip, milestone timeline, SVG diagram pattern, mockup grid, code panel, risk table, open-questions callouts.
16
+
17
+ 3. **Gather concrete inputs**: real package/file names, real effort estimates, real risks. If you don't know a number, ask — don't invent one.
18
+
19
+ 4. **Render mockups as HTML**, not screenshots. Use the project's real domain language and component names.
20
+
21
+ 5. **Code blocks are illustrative.** 15-30 lines of the load-bearing logic per block (migration + the optimistic mutation, say). Don't dump entire files.
22
+
23
+ 6. **Every roadmap needs at least one open question.** If you genuinely can't think of one, state explicitly *why* the design is fully settled in a one-sentence aside.
24
+
25
+ 7. **Write the file** to `docs/roadmaps/YYYY-MM-DD-<slug>.html` (today's date, kebab-case slug from the feature).
26
+
27
+ 8. **Report.** Print the file path and suggest `open docs/roadmaps/YYYY-MM-DD-<slug>.html` (macOS) / `xdg-open` (Linux). One-sentence summary of milestone count, surfaces touched, and severity-high risks.
28
+
29
+ ## Fallback
30
+
31
+ If `.aikit/templates/roadmap/template.html` is missing, run `aikit sync` first.
@@ -53,9 +53,9 @@ TODO: Project-specific security notes.
53
53
  The .claude/ path name is historical; the content there is tool-agnostic. -->
54
54
 
55
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.
56
+ - <!-- id: skills.html-artifacts --> For HTML artifact production, this kit ships four skills under `.claude/skills/`: `docs` (living project documentation tree at `docs/`), `decide` (single-page tradeoff doc under `docs/decisions/`), `directions` (2-4 live-rendered visual design variants under `docs/directions/`), and `roadmap` (single-page implementation roadmap under `docs/roadmaps/`). Each skill has a matching slash command (`/docs`, `/decide`, `/directions`, `/roadmap`) and a reference template under `.aikit/templates/<name>/`. **Read the matching template first** before writing; do not invent HTML structure from scratch.
57
+ - <!-- id: skills.html-install --> Install or refresh just the HTML-artifact bundle (skills + commands + templates) with `aikit add --html`. Run `aikit list` to see what's already installed.
58
+ - <!-- id: artifacts.output-path --> HTML artifacts go to `docs/<file>.html` (docs), `docs/decisions/YYYY-MM-DD-<slug>.html` (decide), `docs/directions/YYYY-MM-DD-<slug>.html` (directions), or `docs/roadmaps/YYYY-MM-DD-<slug>.html` (roadmap). All four are committed to git as a permanent log.
59
59
 
60
60
  ## Gotchas
61
61
  <!-- High-signal section. Add things the agent repeatedly gets wrong.
@@ -72,6 +72,5 @@ TODO
72
72
  Always preserve: the full list of files modified this session, any failing test names + error messages, and the current task being worked on.
73
73
 
74
74
  ## Further reading
75
- - `docs/claude-md-reference.md` — Anthropic 2026 reference for CLAUDE.md / memory / `.claude/rules/` (shipped by `aikit` when `claude` is selected at scope ≥ standard).
76
75
  - `.claude/rules/` — drop topic-scoped or path-scoped rule files here (see the example shipped with this kit). Path-scoped rules load only when Claude reads matching files, saving context.
77
76
  <!-- END:haac-aikit -->
@@ -1,36 +1,22 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/Hamad-Center/haac-aikit/main/schema/aikit-rules.schema.json",
3
3
  "version": 1,
4
- "comment": "Maps rule IDs (in AGENTS.md / .claude/rules/*.md) to machine-checkable patterns. The PostToolUse hook reads this to detect violations in just-written files. Pattern-checkable rules are a SUBSET of all rules many rules can only be observed (loaded/cited) but not auto-validated. Add your own; remove what you don't want.",
4
+ "comment": "Maps rule IDs (in AGENTS.md / .claude/rules/*.md) to machine-checkable patterns. The PostToolUse hook reads this to detect violations in just-written files. The rules below are a starter setlanguage-agnostic safety patterns + a TypeScript example to copy. Add patterns for your stack and delete what you don't need.",
5
5
  "rules": [
6
+ {
7
+ "id": "security.no-hardcoded-secrets",
8
+ "title": "No hardcoded API keys, tokens, or passwords",
9
+ "pattern": "(?i)(api[_-]?key|secret|token|password|access[_-]?key)\\s*[:=]\\s*['\"][A-Za-z0-9_\\-]{16,}['\"]",
10
+ "fileGlobs": ["**/*"],
11
+ "exclude": ["**/*.test.*", "**/*.spec.*", "**/fixtures/**", "**/__mocks__/**", "**/node_modules/**"],
12
+ "severity": "error"
13
+ },
6
14
  {
7
15
  "id": "code-style.no-console-log",
8
- "title": "No console.log in production code",
16
+ "title": "Example: no console.log in production code (TypeScript / JavaScript)",
9
17
  "pattern": "(?<!//\\s)console\\.log\\(",
10
18
  "fileGlobs": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"],
11
- "exclude": ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts"],
12
- "severity": "warn"
13
- },
14
- {
15
- "id": "code-style.no-default-export",
16
- "title": "Use named exports, not default",
17
- "pattern": "^\\s*export\\s+default\\b",
18
- "fileGlobs": ["src/**/*.ts", "src/**/*.tsx"],
19
- "severity": "warn"
20
- },
21
- {
22
- "id": "code-style.no-any",
23
- "title": "Use unknown + type guards, not any",
24
- "pattern": ":\\s*any\\b|<any>|as\\s+any\\b",
25
- "fileGlobs": ["src/**/*.ts", "src/**/*.tsx"],
26
- "exclude": ["**/*.d.ts"],
27
- "severity": "warn"
28
- },
29
- {
30
- "id": "code-style.no-ts-ignore-without-comment",
31
- "title": "@ts-ignore must include a reason",
32
- "pattern": "@ts-ignore(?!\\s*[—:-])",
33
- "fileGlobs": ["src/**/*.ts", "src/**/*.tsx"],
19
+ "exclude": ["**/*.test.*", "**/*.spec.*"],
34
20
  "severity": "warn"
35
21
  }
36
22
  ]
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: directions
3
+ description: Use when the user is exploring visual options for a UI surface and wants 2-4 design directions rendered side-by-side on a single self-contained HTML page they can scan, A/B compare on light/dark, and commit to the project's exploration log. Generates one HTML file per exploration under `docs/directions/YYYY-MM-DD-<slug>.html`. Opt-in only — do not invoke without user request.
4
+ version: "1.0.0"
5
+ source: haac-aikit
6
+ license: MIT
7
+ ---
8
+
9
+ ## When to use
10
+
11
+ Explicit invocation only: `/directions <surface>`, "use the directions skill", "show me design directions for X", "explore visual options for the empty state / hero / dashboard card".
12
+
13
+ Do **not** invoke proactively. This is divergent-exploration tooling — the user picks the moment they want options laid out. Silent generation creates noise and surprise files.
14
+
15
+ ## What this skill is for (and what it isn't)
16
+
17
+ - **It is for**: rendering 2-4 visual *takes* on the same surface side by side so a human can pick by looking, not by reading.
18
+ - **It isn't for**: choosing between technical options (use `/decide`), writing a sequenced build plan (use `/roadmap`), or producing a finished design system page (use `/docs`).
19
+
20
+ The output is one HTML page; each variant is rendered live on its own "stage". The user picks one, mixes traits, or asks for round two.
21
+
22
+ ## Structure of a directions page
23
+
24
+ Every page has the same five blocks. Order is load-bearing — first paint must let the reader see the variants without scrolling past explanations.
25
+
26
+ 1. **Sticky toolbar** — light/dark toggle (and optional density/locale toggles). Variants must hold up on both surfaces; the toggle is how reviewers check.
27
+ 2. **Page header** — eyebrow + h1 + a `prompt-box` echoing the user's original ask, so the page carries its own provenance.
28
+ 3. **Artboard grid (2-4 cards)** — one card per variant. Each card has:
29
+ - A monospace tag (e.g. `A — Minimal`, `B — Illustrated`).
30
+ - A `stage` element with the variant rendered live (real HTML/CSS, not screenshots, not descriptions).
31
+ - A one-paragraph `rationale` below the stage: what this direction emphasizes and when it's the right choice.
32
+ 4. **Comparison row (optional)** — small chip grid or table summarizing the dimensions that matter (density, tone, motion, accessibility load).
33
+ 5. **Pick guidance** — a short closing aside: "Pick A if X, pick B if Y. Mix A's typography with C's illustration if you want Z."
34
+
35
+ ## Output
36
+
37
+ - Path: `docs/directions/YYYY-MM-DD-<slug>.html` (today's date, kebab-case slug from the surface name).
38
+ - Template: `.aikit/templates/directions/template.html` — read first, copy structure verbatim, fill placeholders.
39
+ - Self-contained: pure HTML/CSS/JS, no CDNs, no build step.
40
+ - Committed to git (permanent exploration log — round two often references round one).
41
+
42
+ ## Variant rules (non-negotiable)
43
+
44
+ - **Render, don't describe.** Each variant must actually display — typography, colors, layout, motion if relevant. A wall of bullet points describing the variant defeats the point of the skill.
45
+ - **Theme-aware.** Variants use CSS custom properties scoped under `.stage`; `.stage.dark` flips the theme tokens. The toolbar's light/dark toggle just swaps a class.
46
+ - **Real content, not lorem.** Use the user's domain language ("New task", "Inbox empty", "No projects yet") so the comparison is meaningful.
47
+ - **2-4 variants.** Three is the sweet spot. One isn't an exploration; five becomes a catalog.
48
+ - **Each variant gets a one-word personality.** `Minimal`, `Illustrated`, `Playful`, `Instructional`, `Editorial`, `Technical`. The personality tag is the shortcut a reviewer uses to talk about it.
49
+
50
+ ## Voice rule for rationale paragraphs
51
+
52
+ - One sentence on what the direction emphasizes.
53
+ - One sentence on when it's the right choice (the user persona or context it serves).
54
+ - Optionally one sentence on its tradeoff.
55
+ - Plain-language verbs, concrete objects. *"A small spot illustration anchors the eye and explains the object model"* beats *"Leverages illustration to communicate information architecture"*.
56
+
57
+ ## A11y baseline (every directions page)
58
+
59
+ - `<title>`, exactly one `<h1>`, heading hierarchy never skips levels.
60
+ - Landmark roles: `<main>` for the artboard grid, the toolbar is a sticky `<nav>` or unstyled `<div>` with explicit `role` only if needed.
61
+ - Color contrast ≥ 4.5:1 for body text on both light and dark surfaces — design tokens already meet this; don't override per-variant.
62
+ - Inline SVG illustrations get `aria-hidden="true"` if purely decorative; meaningful diagrams get `<title>` + `aria-labelledby`.
63
+ - The light/dark toggle uses native radio inputs (already in the template) — don't replace with custom toggles that break keyboard navigation.
64
+
65
+ ## Anti-patterns
66
+
67
+ - **Describing variants instead of rendering them.** This is the single most common failure. If a variant is "a card with a softer feel", that's a description — write the CSS that makes it softer and show it.
68
+ - **More than 4 variants.** Past four, the page becomes hard to scan and impossible to mentally diff. Pre-narrow.
69
+ - **Variants that are too similar.** A 1px font-size change isn't a direction; it's a tweak. Each direction should differ in *strategy* (typography-led, illustration-led, motion-led, density-led, etc.).
70
+ - **Silent generation.** Opt-in only. Wait for explicit `/directions`.
71
+ - **Skipping the date in the filename.** The directions log sorts chronologically; round-two filenames reference round-one slugs.
72
+ - **CDN dependencies.** The page must render offline. No `<link rel="stylesheet" href="https://...">`, no remote fonts (system stacks only).
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: roadmap
3
+ description: Use when the user has agreed on what to build and now wants a thorough, skimmable single-page implementation artifact — milestones, data-flow diagram, mockups, key code snippets, risks, and open questions — to hand to an implementer or a reviewer. Generates one HTML file per feature under `docs/roadmaps/YYYY-MM-DD-<slug>.html`. Opt-in only — do not invoke without user request. This is the visual artifact for hand-off; for AI-executable text plans use `writing-plans`.
4
+ version: "1.0.0"
5
+ source: haac-aikit
6
+ license: MIT
7
+ ---
8
+
9
+ ## When to use
10
+
11
+ Explicit invocation only: `/roadmap <feature>`, "use the roadmap skill", "draw up a roadmap for X", "I want a one-page implementation doc for the new comments feature".
12
+
13
+ Do **not** invoke proactively. Roadmaps are committed artifacts — they go in git and get referenced in PRs. Surprise generation creates noise.
14
+
15
+ ## Roadmap vs. adjacent skills
16
+
17
+ - **Use `/decide`** when you're picking *which* approach (option A vs B vs C). `/roadmap` assumes the approach is settled.
18
+ - **Use `/directions`** when you're exploring *visual* options. `/roadmap` is structural and engineering-facing.
19
+ - **Use `writing-plans`** when you want a text plan an AI agent will execute step by step. `/roadmap` is for humans — implementers reading on a phone, reviewers skimming on a Monday.
20
+ - **Use `/docs`** when the feature is already built and you're recording how it works for the team. `/roadmap` is forward-looking; `/docs` is backward-looking.
21
+
22
+ ## Structure of a roadmap page
23
+
24
+ Every page has the same six sections. Order matters: a phone reader scans top-to-bottom and should know the shape by the time they reach milestones.
25
+
26
+ 1. **Header + prompt-box** — eyebrow + h1 + a `prompt-box` echoing the user's original ask, so the page carries its own provenance.
27
+ 2. **Summary strip (4 cells)** — at-a-glance: `Effort` (e.g. `~2 weeks`), `Surfaces touched` (e.g. `3 packages`), one concrete unit (e.g. `New tables: 2`), and feature-flag/ramp identifier. These are the numbers a manager will quote in standup.
28
+ 3. **Milestones** — vertical timeline with 3-5 slices. Each slice has a *when* (Week 1 · Mon–Tue), a dot (`done` filled, future hollow), a title, a one-paragraph description, and tag chips for packages/surfaces touched. Slices should be independently reviewable.
29
+ 4. **Data flow** — inline SVG diagram. Boxes are components/services; arrows are calls; solid lines = request path, dashed clay = realtime/async/fan-out. Always include a one-line caption distinguishing the two.
30
+ 5. **Mockups (2 panels)** — two mock cards in a 2-up grid showing the *most ambiguous surfaces* (the comment thread + the digest, the editor + the toast, etc.). Render as real HTML, not screenshots. These exist to lock down nesting, placement, and copy — not pixel-final.
31
+ 6. **Key code** — two side-by-side code blocks for *the two pieces most likely to be done wrong* (e.g. the migration and the optimistic mutation). Syntax-highlighted via classed spans (`.kw`, `.str`, `.cm`, `.fn`). Don't dump entire files; show the load-bearing 15-30 lines.
32
+ 7. **Risks & mitigations table** — three columns (Risk · Severity · Mitigation). Severity chips: `HIGH` clay-pink, `MED` oat, `LOW` olive-pale. Three rows max for v1; more becomes noise.
33
+ 8. **Open questions** — clay-bordered callouts. Each: question title, one-paragraph context, owner line (`Decide with · design, before slice 2`). These force the document to admit what's unsettled.
34
+
35
+ ## Output
36
+
37
+ - Path: `docs/roadmaps/YYYY-MM-DD-<slug>.html` (today's date, kebab-case slug from the feature).
38
+ - Template: `.aikit/templates/roadmap/template.html` — read first, copy structure verbatim, fill placeholders.
39
+ - Self-contained: pure HTML/CSS/SVG, no CDNs, no build step.
40
+ - Committed to git (permanent implementation record).
41
+
42
+ ## Content rules (non-negotiable)
43
+
44
+ - **Concrete numbers, not vibes.** "~2 weeks" beats "moderate effort". "3 packages" beats "a few surfaces". If you don't have a number, ask the user — don't invent one.
45
+ - **Real package and file names** in tags and labels. `packages/db`, `apps/web`, `migration 0042`. Generic labels like `frontend` and `backend` are anti-signal.
46
+ - **Real risks, not platitudes.** "Realtime duplicate when socket append races the HTTP response" is a risk. "Things might be slow" is not. If you can't write the mitigation in one sentence, the risk isn't sharp enough.
47
+ - **Open questions are required.** Every non-trivial feature has at least one unsettled point. A roadmap with zero open questions is hiding something — flag it.
48
+ - **Code blocks are illustrative, not complete.** 15-30 lines of the load-bearing logic. Use ellipsis or comments for omitted boilerplate; the reader is a senior engineer, not a copy-paste consumer.
49
+
50
+ ## Voice rule
51
+
52
+ - Plain-language verbs + concrete objects in body prose. *"Ship in four slices, each independently reviewable, each behind the flag"* beats *"Leverage a phased rollout strategy"*.
53
+ - Jargon lives in `<code>` chips or table cells, never in main body prose.
54
+ - Section intros are one sentence. The point of the artifact is the *content*, not the prose explaining the content.
55
+
56
+ ## A11y baseline
57
+
58
+ - `<title>`, exactly one `<h1>`, heading hierarchy never skips levels.
59
+ - Each section gets `<section>` with an `aria-labelledby` linking to its heading.
60
+ - Inline SVG diagrams get `<title>` + `<desc>` and `aria-labelledby`; the caption underneath also describes the diagram in prose for screen readers.
61
+ - Severity chips have text content (`HIGH`, `MED`, `LOW`), not just color — color is reinforcement, never the only signal.
62
+ - Color contrast ≥ 4.5:1 — design tokens already meet this; don't override.
63
+
64
+ ## Anti-patterns
65
+
66
+ - **One giant milestone.** If your timeline has a single 3-week slice, the artifact has no shape. Split into 3-5 reviewable pieces.
67
+ - **Mockups that are screenshots.** Render as HTML. Screenshots rot the moment a class name changes; HTML mocks update with the design system.
68
+ - **Code dumps.** A roadmap with 200 lines of code in one block is a draft PR, not a roadmap. Show only the parts most likely to be done wrong.
69
+ - **Risk table with HIGH for everything.** Severity loses meaning. If three risks are HIGH, the project shouldn't ship in the proposed shape — escalate instead.
70
+ - **Zero open questions.** No real feature has zero ambiguity. If the answer is genuinely "nothing unsettled", state that explicitly with one sentence on why ("All API contracts already exist; this is purely UI assembly").
71
+ - **Silent generation.** Opt-in only. Wait for explicit `/roadmap`.
@@ -22,6 +22,19 @@
22
22
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
23
23
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
24
24
  }
25
+
26
+ @media (prefers-color-scheme: dark) {
27
+ :root {
28
+ --ivory: #1a1714;
29
+ --slate: #FAF9F5;
30
+ --oat: #2a241e;
31
+ --gray-150: #211d18;
32
+ --gray-300: #3a3530;
33
+ --gray-500: #8a8682;
34
+ --gray-700: #c8c4be;
35
+ --white: #211d18;
36
+ }
37
+ }
25
38
  * { box-sizing: border-box; }
26
39
  body {
27
40
  margin: 0;