agent-templates 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-templates",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Catalog of multi-agent development architecture patterns - design write-ups plus drop-in scaffolding (agents, slash commands, workflows, templates).",
5
5
  "license": "MIT",
6
6
  "author": "Horace Hou",
@@ -67,6 +67,8 @@ Figures are transcribed from the team-finalized specification dated 2026-07-17 (
67
67
  | **Nightly grinding** — the sweep re-attempts the same unfixable issue night after night, burning tokens | Design risk of the nightly loop (not a measured incident) | Unsolved/failed issues get `nightly:escalated` and are excluded from later sweeps until a human clears the label; `maxIssues` caps each night's spend | 2026-07-17 |
68
68
  | **Autonomous misjudgment of "invalid"** — the sweep wrongly declares a real issue invalid and it gets ignored | Design risk | Invalid verdicts only **label** (`triage:invalid`) and comment with evidence — never auto-close; the morning human is the final judge; triage is instructed to prefer `needs-human` when uncertain | 2026-07-17 |
69
69
  | **CRLF workflow scripts rejected on Windows** — the Workflow tool's permission layer refuses scripts containing `\r` ("control characters that would be hidden in the approval dialog"), so `/start-milestone` and `/nightly-issues` cannot launch their workflows when git autocrlf has rewritten the installed `.js` files | `[internal]` — **first field observation**: Ruihang2017/Groundwork, Windows 11, Claude Code, 2026-07-18 (catalog issue #21; workaround used: inline `script` param with LF) | Fixed 2026-07-18: catalog ships `.gitattributes` (`* text=auto eol=lf`), `adopt.mjs` normalizes all text installs to LF regardless of source state, and E2E guards assert no `\r` in runtime files (scaffold + installs + catalog self-host) | 2026-07-18 |
70
+ | **CRLF regression on target checkouts** — issue #21's install-time LF normalization does not survive the target repo's own git: a later `checkout`/clone with `core.autocrlf=true` re-CRLFs the installed workflow scripts, and `Workflow({name: …})` (including `start-all`'s name-resolved `run-milestone` child) is rejected again for control characters | `[internal]` — recurrence: Ruihang2017/Groundwork, Windows 11, Claude Code, 2026-07-18 (catalog issue #23; workaround used: inline `script` param with LF) | Fixed 2026-07-18: `adopt.mjs` installs/appends a `.gitattributes` in the **target repo** pinning `.claude/workflows/*.js` and `.claude/scripts/*.mjs` to `text eol=lf` (marker-checked, append-once); E2E asserts fresh install, append-to-existing, and idempotent re-run | 2026-07-18 |
71
+ | **Workflow `args` arrive JSON-stringified** — some harness paths deliver the Workflow tool's `args` as a JSON **string**, so `Object.assign(defaults, args)` merges nothing and launch validation throws in milliseconds (`args.tickets must be a non-empty array`, `args.modules must be a non-empty array`) | `[internal]` — Ruihang2017/Groundwork, Windows 11, Claude Code, 2026-07-18 (catalog issue #23; killed the first `run-milestone` launch in 10ms and would crash `/start-all` identically) | Fixed 2026-07-18: all three workflow scripts (`run-milestone.js`, `start-all.js`, `nightly-issues.js`) parse first — `typeof args === 'string' ? JSON.parse(args) : (args \|\| {})`; E2E runs runner + start-all scenarios with stringified args end-to-end | 2026-07-18 |
70
72
  | **Harness-specific timeouts/failures** for these exact model+effort combinations | **None recorded yet** (as of 2026-07-17) | When observed: record here with harness name, conditions, and date | — |
71
73
 
72
74
  ## 5. Upstream / downstream integration
@@ -150,6 +152,7 @@ Install steps and usage modes: [scaffold/INSTALL.md](scaffold/INSTALL.md). Front
150
152
  | 2026-07-17 | Gate 1 made concrete: `/start-milestone` = the human start signal → tickets auto-published as tracker issues (`publish-tickets.mjs`, adapted from fx-eye-tracking `create-issues.mjs`; `[<id>]` title prefix as dedupe key; smoke-tested dry-run/no-CLI/usage paths) → deterministic milestone runner (`run-milestone.js` Workflow script: stage order, reviewer freshness, bounce cap, merge policy in code). Added `templates/ticket.template.md` (adapted from fx ticket discipline). Recorded the Bash guard boundary as a known pitfall. Clarified `ultracode`: a session setting (`xhigh` + automatic workflow orchestration), not a model effort level — role efforts unchanged. | Maintainer direction (Horace Hou), 2026-07-17. fx-eye-tracking conventions read the same day (read-only). Workflow tool, `.claude/workflows/`, and `ultracode` semantics verified against live docs (workflows, claude-directory, model-config — record in `scaffold/INSTALL.md`). | Horace Hou (direction) / Claude Fable 5 (write-up) |
151
153
  | 2026-07-18 | **`/start-all` shipped** (catalog issue #20; maintainer-decided semantics: failed module blocks dependents, independent branches continue in `autonomous`, any non-CLEAR stops everything in `supervised`, no cost cap, resume via closed-issue filtering): deterministic DAG script (`milestone-dag.mjs`, ticket `blocked_by` as ground truth, cycles/dangling refs are hard errors) + `start-all` workflow composing `run-milestone` per module + `/start-all` command. 19 new E2E checks (DAG fixtures incl. cycle; module-policy scenarios via stubbed child workflows). Per-ticket stages unchanged. | Maintainer answers on issue #20, 2026-07-18. | Horace Hou (decisions) / Claude Fable 5 (build) |
152
154
  | 2026-07-18 | **First field bug fixed** (catalog issue #21, reported from Ruihang2017/Groundwork through the upstream feedback channel): CRLF-rewritten workflow scripts are rejected by the Workflow tool on Windows. Fix: repo-wide `.gitattributes` (`eol=lf`), working tree renormalized (67 files), `adopt.mjs` installs all text as LF, E2E `\r` guards added. Recorded as the pattern's first true `[internal]` pitfall observation. | Field report (Horace Hou via Groundwork), 2026-07-18. | Horace Hou (report) / Claude Fable 5 (fix) |
155
+ | 2026-07-18 | **Field bug #2 fixed** (catalog issue #23, same reporter channel): (a) #21's install-time LF fix did not survive target-side git checkouts — `adopt.mjs` now installs/appends a target-repo `.gitattributes` pinning `.claude/workflows/*.js` + `.claude/scripts/*.mjs` to `eol=lf` (marker-checked, append-once); (b) Workflow `args` can arrive JSON-stringified — all three workflow scripts gained the `typeof args === 'string' ? JSON.parse(args) : (args \|\| {})` shim. Both recorded as §4 pitfalls; E2E extended (stringified-args runner + start-all scenarios; `.gitattributes` install/append/idempotency). Per-ticket stages and model/effort table unchanged. | Field report (Horace Hou via Groundwork), 2026-07-18. | Horace Hou (report) / Claude Fable 5 (fix) |
153
156
  | 2026-07-17 | **Catalog site**: claymorphic GitHub Pages page generated from pattern data (`scripts/build-site.mjs` — parses pattern README metadata/§1/§3 + package.json; live npm-version fetch with build-time fallback; deployed via `gh-pages` branch). Style spec + generated-not-handwritten rationale in catalog issue #17. | Maintainer direction (Horace Hou) with reference designs, 2026-07-17. | Horace Hou (direction) / Claude Fable 5 (build) |
154
157
  | 2026-07-17 | **Released**: catalog published to public npm as `agent-templates` under MIT (maintainer decisions: MIT + personal ownership + publish, 2026-07-17 — catalog issue #15). README carries the scaffold-output attribution carve-out. Adoption command is now `npx agent-templates@latest adopt …`. | Maintainer decision (Horace Hou), 2026-07-17. | Horace Hou (decision) / Claude Fable 5 (release) |
155
158
  | 2026-07-17 | **Registry decision — public npm over GitHub Packages** (repo is public; goal is public sharing): GH Packages requires a token even to install public packages (`[official]` GitHub docs, verified live 2026-07-17) and is scope-only; npm allows anonymous installs and the bare name `agent-templates` was unclaimed (registry 404, same day). Publish itself is gated on maintainer decisions — license (repo has none), npm account/name — tracked in catalog issue #13; `package.json` carries the publish-prep (`files`, `repository`) with `private: true` until then. | Maintainer direction (Horace Hou) + live verification, 2026-07-17. | Horace Hou (direction) / Claude Fable 5 (write-up) |
@@ -22,7 +22,9 @@ export const meta = {
22
22
  // end — comments, labels, and the "Nightly report <date>" issue the human reads
23
23
  // over morning email (tracker notifications).
24
24
 
25
- const cfg = Object.assign({ maxIssues: 5, defaultBranch: 'main', platform: 'gh' }, args)
25
+ // args may arrive as a JSON string depending on the harness (catalog issue #23)
26
+ const parsedArgs = typeof args === 'string' ? JSON.parse(args) : (args || {})
27
+ const cfg = Object.assign({ maxIssues: 5, defaultBranch: 'main', platform: 'gh' }, parsedArgs)
26
28
  if (!Array.isArray(cfg.issues)) throw new Error('args.issues must be an array (may be empty)')
27
29
  if (typeof cfg.reportDate !== 'string' || !cfg.reportDate) throw new Error('args.reportDate is required (the caller stamps the date)')
28
30
  if (!Number.isInteger(cfg.maxIssues) || cfg.maxIssues < 1) throw new Error('args.maxIssues must be an integer >= 1')
@@ -23,9 +23,11 @@ export const meta = {
23
23
  // - supervised mode STOPS the run after each CLEAR (later tickets may depend on the merge);
24
24
  // re-running /start-milestone continues — already-closed issues are filtered out upstream
25
25
 
26
+ // args may arrive as a JSON string depending on the harness (catalog issue #23)
27
+ const parsedArgs = typeof args === 'string' ? JSON.parse(args) : (args || {})
26
28
  const cfg = Object.assign(
27
29
  { maxBounces: 2, continueOnFailure: false, defaultBranch: 'main', platform: 'gh' },
28
- args
30
+ parsedArgs
29
31
  )
30
32
  if (!Array.isArray(cfg.tickets) || cfg.tickets.length === 0) {
31
33
  throw new Error('args.tickets must be a non-empty array of {id, path, issue}')
@@ -23,7 +23,9 @@ export const meta = {
23
23
  // issues are filtered upstream, so completed modules arrive as already-complete);
24
24
  // - no cost ceiling.
25
25
 
26
- const cfg = Object.assign({ defaultBranch: 'main', platform: 'gh' }, args)
26
+ // args may arrive as a JSON string depending on the harness (catalog issue #23)
27
+ const parsedArgs = typeof args === 'string' ? JSON.parse(args) : (args || {})
28
+ const cfg = Object.assign({ defaultBranch: 'main', platform: 'gh' }, parsedArgs)
27
29
  if (!Array.isArray(cfg.modules) || cfg.modules.length === 0) {
28
30
  throw new Error('args.modules must be a non-empty array of {name, dependsOn, tickets}')
29
31
  }
package/scripts/adopt.mjs CHANGED
@@ -11,6 +11,7 @@
11
11
  // docs/PRD.md copied from a root PRD.md if present and docs/PRD.md is absent
12
12
  // docs/prd/ docs/adr/ docs/plans/ the docs skeleton the pipeline assumes
13
13
  // CLAUDE.md created from the snippet, or snippet appended once (marker-checked)
14
+ // .gitattributes eol=lf rules for scaffold runtime files, appended once (marker-checked)
14
15
  //
15
16
  // Idempotent: re-running skips everything that exists (--force overwrites files, never
16
17
  // re-appends the snippet). Exit 0 = installed/verified; exit 1 = bad invocation.
@@ -174,6 +175,25 @@ if (!existsSync(claudeMd)) {
174
175
  skipped++
175
176
  }
176
177
 
178
+ // 7. .gitattributes: pin scaffold runtime files to LF. Install-time normalization
179
+ // (above) is not enough on Windows — a later `git checkout` with autocrlf re-CRLFs
180
+ // them and the Workflow tool rejects the script content (catalog issue #23).
181
+ const GA_MARKER = '# agent-templates: Workflow tool rejects CRLF scripts (keep LF)'
182
+ const GA_RULES = `${GA_MARKER}\n.claude/workflows/*.js text eol=lf\n.claude/scripts/*.mjs text eol=lf\n`
183
+ const gaPath = join(target, '.gitattributes')
184
+ if (!existsSync(gaPath)) {
185
+ writeFileSync(gaPath, GA_RULES)
186
+ console.log('+ install .gitattributes (eol=lf for scaffold runtime files)')
187
+ installed++
188
+ } else if (!readFileSync(gaPath, 'utf8').includes(GA_MARKER)) {
189
+ writeFileSync(gaPath, readFileSync(gaPath, 'utf8').trimEnd() + '\n\n' + GA_RULES)
190
+ console.log('+ append .gitattributes (eol=lf rules for scaffold runtime files)')
191
+ installed++
192
+ } else {
193
+ console.log('= exists .gitattributes (eol=lf rules already present)')
194
+ skipped++
195
+ }
196
+
177
197
  console.log(`\nadopt: ${installed} installed, ${skipped} already present. Pattern: ${pattern}, platform: ${PLATFORM}.`)
178
198
  console.log(`
179
199
  NEXT STEPS (details: ${join(CATALOG, 'ADOPTING.md')})
@@ -6,8 +6,11 @@
6
6
  // Usage: node scripts/build-site.mjs [--out <dir>] (default: site/)
7
7
  // Output: <out>/index.html (self-contained) + <out>/.nojekyll
8
8
  //
9
- // Style: claymorphism per catalog issue #17cream background, pastel clay palette,
10
- // puffy cards, soft extruded shadows, rounded chunky type, emoji as clay icons.
9
+ // Style: clay-morphism per the approved hi-fi mock on catalog issue #19layered
10
+ // clay shadows (outer drop + inset top highlight + inset bottom ink), Baloo 2 +
11
+ // Nunito, five build-time palettes with mint baked as default, pure-CSS clay icons
12
+ // (no emoji, no icon fonts). The mock is the source of truth for colors/shadows/
13
+ // spacing; the pattern catalog stays the source of truth for all copy.
11
14
 
12
15
  import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'
13
16
  import { join } from 'node:path'
@@ -58,17 +61,7 @@ function parsePattern(dir) {
58
61
  }
59
62
  }
60
63
 
61
- // first three "Use when" bullets from §1
62
- const useWhen = []
63
- const sec1 = md.split(/\*\*Use when:\*\*/)[1]
64
- if (sec1) {
65
- for (const l of sec1.split(/\*\*Do not use when:\*\*/)[0].split('\n')) {
66
- const m = l.match(/^- (.+)$/)
67
- if (m && useWhen.length < 3) useWhen.push(strip(m[1]))
68
- }
69
- }
70
-
71
- return { dir, title, status, asOf, summary, roles, useWhen }
64
+ return { dir, title, status, asOf, summary, roles }
72
65
  }
73
66
 
74
67
  const patterns = readdirSync(join(ROOT, 'patterns'), { withFileTypes: true })
@@ -76,45 +69,100 @@ const patterns = readdirSync(join(ROOT, 'patterns'), { withFileTypes: true })
76
69
  .map((d) => parsePattern(d.name))
77
70
  .filter(Boolean)
78
71
 
79
- const STATUS_STYLE = {
80
- proposed: ['var(--blue)', 'var(--blue-d)', '🧪'],
81
- trialed: ['var(--butter)', 'var(--butter-d)', '🌱'],
82
- adopted: ['var(--sage)', 'var(--sage-d)', '✅'],
83
- deprecated: ['var(--pink)', 'var(--pink-d)', '🗄️'],
72
+ // ---------------------------------------------------------------------------
73
+ // Theme palettes, distilled from the approved mock (issue #19). The mock names
74
+ // them cream / mint / lavender / sakura / sky; mint is the approved default.
75
+ // Swapping the palette is a build-time constant change — no runtime switcher.
76
+ // amb/ins/flt are bare R,G,B triplets consumed via rgba(var(--amb), a).
77
+ // ---------------------------------------------------------------------------
78
+ const THEMES = {
79
+ cream: { page: '#ffeecb', heroA: '#fbd2b0', heroB: '#f5b98f', heroInk: 'rgba(190,110,60,0.18)', heroAmb: 'rgba(199,141,109,0.32)', heroTitle: '#5a3520', heroBody: '#8a5a3d', card: '#fdf4e6', pill: '#fff7e9', ink: '#4a3020', sub: '#7b5a42', mut: '#a3805f', code: '#7b4a2a', amb: '199,141,109', ins: '214,160,120', flt: '150,90,60' },
80
+ mint: { page: '#e0f3e0', heroA: '#c3e6bd', heroB: '#a3d49a', heroInk: 'rgba(40,110,50,0.18)', heroAmb: 'rgba(110,160,120,0.35)', heroTitle: '#2f5a30', heroBody: '#4f7a52', card: '#f0f9ec', pill: '#f8fdf5', ink: '#2f4a28', sub: '#567a50', mut: '#7fa077', code: '#4f6b3a', amb: '110,150,115', ins: '160,195,155', flt: '80,120,85' },
81
+ lavender: { page: '#f0e7fa', heroA: '#ddcbf3', heroB: '#c4abe8', heroInk: 'rgba(90,50,140,0.16)', heroAmb: 'rgba(140,110,180,0.35)', heroTitle: '#46306b', heroBody: '#6b5490', card: '#f6f1fc', pill: '#fbf9fe', ink: '#3f2f5c', sub: '#6b5a86', mut: '#9284ab', code: '#5f4a8a', amb: '130,110,165', ins: '185,165,215', flt: '100,80,135' },
82
+ sakura: { page: '#fde7ee', heroA: '#f9c9d7', heroB: '#f3abc2', heroInk: 'rgba(180,60,100,0.15)', heroAmb: 'rgba(190,120,140,0.35)', heroTitle: '#6b2f45', heroBody: '#96556b', card: '#fcf1f5', pill: '#fef8fa', ink: '#5c2f40', sub: '#86566a', mut: '#ab8494', code: '#8a4a62', amb: '180,120,140', ins: '215,165,185', flt: '150,80,105' },
83
+ sky: { page: '#e3eefa', heroA: '#c8ddf4', heroB: '#a8c7ec', heroInk: 'rgba(50,90,150,0.15)', heroAmb: 'rgba(110,140,180,0.35)', heroTitle: '#2c4a6b', heroBody: '#4f6f96', card: '#eff5fc', pill: '#f7fafe', ink: '#2b3f5c', sub: '#52698a', mut: '#8095ad', code: '#3f5a80', amb: '100,130,170', ins: '155,180,215', flt: '70,100,140' },
84
+ }
85
+ const THEME = THEMES.mint
86
+
87
+ // Status chips: trialed/adopted/proposed use the mock's yellow/green("stable")/
88
+ // pink("experimental") recipes; deprecated (catalog-only status) is a neutral clay.
89
+ const STATUS_CHIP = {
90
+ trialed: { chip: 'background:linear-gradient(180deg,#f9d66e,#f0c14a);color:#6b4a15;box-shadow:inset 0 2px 2px rgba(255,255,255,0.6),inset 0 -3px 4px rgba(180,120,20,0.3),0 5px 10px rgba(180,130,60,0.3)', dot: 'inset -1px -1px 2px rgba(180,120,20,0.4)' },
91
+ proposed: { chip: 'background:linear-gradient(180deg,#f792ab,#ef6f92);color:#fff;text-shadow:0 1px 2px rgba(170,30,80,0.35);box-shadow:inset 0 2px 2px rgba(255,255,255,0.5),inset 0 -3px 4px rgba(170,30,80,0.3),0 5px 10px rgba(199,100,110,0.3)', dot: 'inset -1px -1px 2px rgba(170,30,80,0.35)' },
92
+ adopted: { chip: 'background:linear-gradient(180deg,#b3dcab,#98cb8e);color:#fff;text-shadow:0 1px 2px rgba(30,90,40,0.35);box-shadow:inset 0 2px 2px rgba(255,255,255,0.5),inset 0 -3px 4px rgba(30,100,40,0.28),0 5px 10px rgba(120,150,100,0.3)', dot: 'inset -1px -1px 2px rgba(30,90,40,0.35)' },
93
+ deprecated: { chip: 'background:linear-gradient(180deg,#cfc4b4,#b8aa96);color:#fff;text-shadow:0 1px 2px rgba(110,90,60,0.35);box-shadow:inset 0 2px 2px rgba(255,255,255,0.5),inset 0 -3px 4px rgba(110,90,60,0.3),0 5px 10px rgba(150,130,100,0.3)', dot: 'inset -1px -1px 2px rgba(110,90,60,0.35)' },
94
+ }
95
+
96
+ const ROLE_DOT = {
97
+ Architect: ['#a98fd6', 'rgba(80,40,140,0.3)'],
98
+ Builder: ['#f28ba3', 'rgba(170,30,80,0.3)'],
99
+ Reviewer: ['#8fb4e6', 'rgba(40,80,150,0.3)'],
84
100
  }
85
- const ROLE_EMOJI = { Architect: '📐', Builder: '🔨', Reviewer: '🔍' }
86
- const roleEmoji = (r) => ROLE_EMOJI[Object.keys(ROLE_EMOJI).find((k) => r.startsWith(k))] || '🌙'
101
+ const roleDot = (r) => ROLE_DOT[Object.keys(ROLE_DOT).find((k) => r.startsWith(k))] || ['#f2c44e', 'rgba(180,120,20,0.35)']
87
102
 
103
+ // --- pure-CSS clay icons, markup lifted from the approved mock -------------
104
+ const LOGO_ICON = `<span class="gx" style="width:26px;height:26px;filter:drop-shadow(0 2px 3px rgba(var(--flt),0.3))"><span style="position:absolute;left:1px;top:2px;width:15px;height:20px;border-radius:5px;background:#b7a0e2;transform:rotate(-9deg);box-shadow:inset 0 2px 2px rgba(255,255,255,0.5)"></span><span style="position:absolute;left:9px;top:3px;width:15px;height:20px;border-radius:5px;background:var(--pill);transform:rotate(7deg);box-shadow:inset 0 -2px 3px rgba(var(--ins),0.35);display:flex;flex-direction:column;gap:3px;padding:4px 3px;box-sizing:border-box"><span style="height:2.5px;border-radius:2px;background:#f4a0b5"></span><span style="height:2.5px;border-radius:2px;background:#d9c8f0"></span><span style="height:2.5px;border-radius:2px;background:#d9c8f0;width:70%"></span></span></span>`
105
+ const STAR_ICON = `<span style="width:14px;height:14px;background:#f9d66e;clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);display:inline-block"></span>`
106
+ const NPM_ICON = `<span class="gx" style="width:14px;height:14px"><span style="position:absolute;inset:0;border-radius:4px;background:#fff3df;box-shadow:inset 0 -2px 3px rgba(190,110,60,0.4)"></span><span style="position:absolute;left:0;right:0;top:5.5px;height:3px;background:#e8b48c"></span></span>`
107
+ const PATTERNS_ICON = `<span style="display:inline-grid;grid-template-columns:9px 9px;gap:2.5px;filter:drop-shadow(0 2px 3px rgba(var(--flt),0.3))"><span style="width:9px;height:9px;border-radius:3px;background:#9ed095"></span><span style="width:9px;height:9px;border-radius:3px;background:#f6a5bb"></span><span style="width:9px;height:9px;border-radius:3px;background:#f4cd6d"></span><span style="width:9px;height:9px;border-radius:3px;background:#c3abe9"></span></span>`
108
+ const PIPELINE_ICON = `<span class="gx" style="width:22px;height:18px;border-radius:5px;background:#a9c6ec;overflow:hidden;filter:drop-shadow(0 2px 3px rgba(var(--flt),0.3))"><span style="position:absolute;left:3px;top:3px;width:6px;height:6px;border-radius:50%;background:#f9d66e"></span><span style="position:absolute;left:-5px;bottom:-9px;width:17px;height:17px;border-radius:50%;background:#9ed095"></span><span style="position:absolute;right:-4px;bottom:-8px;width:15px;height:15px;border-radius:50%;background:#8fc98b"></span></span>`
109
+
110
+ // hero side facts: [icon-tile style, glyph markup, copy]
111
+ const FACTS = [
112
+ ['background:#d9c8f0;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.55),inset -3px -4px 6px rgba(90,50,140,0.18)',
113
+ `<span class="gx" style="width:15px;height:18px"><span style="position:absolute;inset:0;border-radius:3px;background:#fffaf2;box-shadow:0 2px 4px rgba(90,50,140,0.25)"></span><span style="position:absolute;left:3px;right:3px;top:4px;height:2px;border-radius:2px;background:#c3abe9"></span><span style="position:absolute;left:3px;right:3px;top:8px;height:2px;border-radius:2px;background:#c3abe9"></span><span style="position:absolute;left:3px;right:6px;top:12px;height:2px;border-radius:2px;background:#c3abe9"></span></span>`,
114
+ 'Every model/effort claim carries a source label and an expiry date'],
115
+ ['background:#b3cdf0;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.55),inset -3px -4px 6px rgba(40,80,150,0.2)',
116
+ `<span style="width:16px;height:18px;background:#fffaf2;border-radius:5px 5px 50% 50% / 5px 5px 75% 75%;box-shadow:inset 0 -3px 4px rgba(40,80,150,0.25),0 2px 4px rgba(40,80,150,0.3);display:inline-block"></span>`,
117
+ 'Role boundaries enforced by hooks, not prose'],
118
+ ['background:#f9d66e;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.6),inset -3px -4px 6px rgba(180,120,20,0.25)',
119
+ `<span class="gx" style="width:17px;height:17px"><span style="position:absolute;inset:0;border-radius:50%;background:#fffaf2;box-shadow:0 2px 4px rgba(160,100,20,0.3)"></span><span style="position:absolute;left:6px;top:-2px;width:14px;height:14px;border-radius:50%;background:#f9d66e"></span></span>`,
120
+ 'Nightly sweep triages and fixes issues while you sleep'],
121
+ ]
122
+
123
+ // pipeline steps: [icon-tile style, glyph markup, title, description]
124
+ const STEPS = [
125
+ ['background:#9ed095;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.55),inset -3px -4px 6px rgba(30,90,40,0.2),0 6px 10px rgba(var(--amb),0.22)',
126
+ `<span class="gx" style="width:20px;height:16px"><span style="position:absolute;inset:0;border-radius:4px;background:#fffaf2;box-shadow:inset 0 -2px 3px rgba(30,90,40,0.2),0 3px 5px rgba(30,90,40,0.3)"></span><span style="position:absolute;left:8.5px;top:0;width:3px;height:16px;background:#f4cd6d"></span></span>`,
127
+ 'Adopt', `<code>${esc(QUICKSTART)}</code> — scaffold, templates, docs skeleton, CLAUDE.md, in one idempotent command.`],
128
+ ['background:#f4cd6d;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.6),inset -3px -4px 6px rgba(180,120,20,0.25),0 6px 10px rgba(var(--amb),0.22)',
129
+ `<span class="gx" style="width:22px;height:16px"><span style="position:absolute;inset:0;border-radius:3px;background:#fffaf2;box-shadow:0 3px 5px rgba(160,100,20,0.3)"></span><span style="position:absolute;left:6.5px;top:0;width:1.5px;height:16px;background:rgba(var(--flt),0.25)"></span><span style="position:absolute;left:14px;top:0;width:1.5px;height:16px;background:rgba(var(--flt),0.25)"></span><span style="position:absolute;left:9px;top:5px;width:4px;height:4px;border-radius:50%;background:#f2789a"></span></span>`,
130
+ 'Break down', '<code>/breakdown-prd</code> — the Architect turns your PRD into sub-PRDs and cold-startable tickets, then stops.'],
131
+ ['background:#f3e6d0;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.7),inset -3px -4px 6px rgba(170,120,70,0.2),0 6px 10px rgba(var(--amb),0.22)',
132
+ `<span style="width:13px;height:28px;border-radius:6.5px;background:#7a6a58;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;box-shadow:inset 0 2px 2px rgba(255,255,255,0.25),0 3px 5px rgba(90,60,30,0.35)"><span style="width:6px;height:6px;border-radius:50%;background:#f28b8b"></span><span style="width:6px;height:6px;border-radius:50%;background:#f9d66e"></span><span style="width:6px;height:6px;border-radius:50%;background:#8fc98b"></span></span>`,
133
+ 'Gate 1 — you decide', 'Review the breakdown, then <code>/start-milestone</code>: tickets become tracker issues and the pipeline starts.'],
134
+ ['background:#c3abe9;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.55),inset -3px -4px 6px rgba(90,50,140,0.22),0 6px 10px rgba(var(--amb),0.22)',
135
+ `<span class="gx" style="width:24px;height:24px"><span style="position:absolute;left:11px;top:0;width:2px;height:4px;background:#fffaf2"></span><span style="position:absolute;left:9.5px;top:-3px;width:5px;height:5px;border-radius:50%;background:#f2789a"></span><span style="position:absolute;left:0;top:5px;width:24px;height:18px;border-radius:7px;background:#fffaf2;box-shadow:inset 0 -3px 4px rgba(90,50,140,0.2),0 3px 5px rgba(70,30,120,0.3)"></span><span style="position:absolute;left:5px;top:11px;width:5px;height:5px;border-radius:50%;background:#8f74c4"></span><span style="position:absolute;left:14px;top:11px;width:5px;height:5px;border-radius:50%;background:#8f74c4"></span></span>`,
136
+ 'Autonomous middle', 'Plan → build → fresh-context review (bounce-capped in code) → merge on <code>CLEAR</code> → issue closed → delivery verified.'],
137
+ ['background:#f6a5bb;box-shadow:inset 2px 3px 4px rgba(255,255,255,0.55),inset -3px -4px 6px rgba(170,30,80,0.2),0 6px 10px rgba(var(--amb),0.22)',
138
+ `<span class="gx" style="width:22px;height:22px"><span style="position:absolute;left:0;top:0;width:13px;height:13px;border-radius:50%;border:4px solid #fffaf2;box-shadow:0 3px 5px rgba(150,60,90,0.3)"></span><span style="position:absolute;left:16px;top:15px;width:4.5px;height:9px;border-radius:2.5px;background:#fffaf2;transform:rotate(-45deg)"></span></span>`,
139
+ 'Gate 2 — smoke test', 'Agents own unit/integration/E2E all along; you test once, when the PRD is done. A nightly sweep fixes issues while you sleep.'],
140
+ ]
141
+
142
+ // Use-when bullets are intentionally gone (parse + render): the approved mock's
143
+ // pattern card is title + status chip + summary + role chips + links only.
88
144
  const patternCards = patterns
89
145
  .map((p) => {
90
- const [bg, fg, ico] = STATUS_STYLE[p.status] || STATUS_STYLE.proposed
146
+ const c = STATUS_CHIP[p.status] || STATUS_CHIP.proposed
147
+ const summary = esc(p.summary).replace(/→/g, '<span class="arr">→</span>')
91
148
  return `
92
- <article class="card pattern">
149
+ <article class="panel pattern">
93
150
  <div class="pattern-head">
94
151
  <h3>${esc(p.title)}</h3>
95
- <span class="pill status" style="background:${bg};color:${fg}">${ico} ${esc(p.status)} · as of ${esc(p.asOf)}</span>
152
+ <span class="chip" style="${c.chip}"><span class="chip-dot" style="box-shadow:${c.dot}"></span>${esc(p.status)} · as of ${esc(p.asOf)}</span>
96
153
  </div>
97
- <p class="summary">${esc(p.summary)}</p>
154
+ <p class="summary">${summary}</p>
98
155
  <div class="roles">
99
- ${p.roles.map((r) => `<span class="pill role">${roleEmoji(r.role)} <b>${esc(r.role)}</b>&nbsp;· ${esc(r.model)} <code>@${esc(r.effort)}</code></span>`).join('\n ')}
156
+ ${p.roles.map((r) => { const [dot, dotInk] = roleDot(r.role); return `<span class="role"><span class="dot" style="background:${dot};box-shadow:inset 1px 1.5px 1.5px rgba(255,255,255,0.6),inset -1px -1.5px 2px ${dotInk}"></span><b>${esc(r.role)}</b><span class="sep">·</span><code>${esc(r.model)} <span class="eff">@${esc(r.effort)}</span></code></span>` }).join('\n ')}
100
157
  </div>
101
- ${p.useWhen.length ? `<ul class="usewhen">${p.useWhen.map((u) => `<li>${esc(u)}</li>`).join('')}</ul>` : ''}
102
158
  <div class="links">
103
- <a class="btn small sage" href="${GITHUB}/tree/main/patterns/${esc(p.dir)}">📖 Pattern write-up</a>
104
- <a class="btn small lav" href="${GITHUB}/tree/main/patterns/${esc(p.dir)}/scaffold">🧰 Scaffold</a>
159
+ <a class="btn btn-green" href="${GITHUB}/tree/main/patterns/${esc(p.dir)}">Pattern write-up</a>
160
+ <a class="btn btn-purple" href="${GITHUB}/tree/main/patterns/${esc(p.dir)}/scaffold">Scaffold</a>
105
161
  </div>
106
162
  </article>`
107
163
  })
108
164
  .join('\n')
109
165
 
110
- const STEPS = [
111
- ['📦', 'Adopt', `<code>${esc(QUICKSTART)}</code> — scaffold, templates, docs skeleton, CLAUDE.md, in one idempotent command.`],
112
- ['🗺️', 'Break down', '<code>/breakdown-prd</code> — the Architect turns your PRD into sub-PRDs and cold-startable tickets, then stops.'],
113
- ['🚦', 'Gate 1 — you decide', 'Review the breakdown, then <code>/start-milestone</code>: tickets become tracker issues and the pipeline starts.'],
114
- ['🤖', 'Autonomous middle', 'Plan → build → fresh-context review (bounce-capped in code) → merge on CLEAR → issue closed → delivery verified.'],
115
- ['🔎', 'Gate 2 — smoke test', 'Agents own unit/integration/E2E all along; you test once, when the PRD is done. A nightly sweep fixes issues while you sleep.'],
116
- ]
117
-
118
166
  const html = `<!doctype html>
119
167
  <html lang="en">
120
168
  <head>
@@ -124,133 +172,187 @@ const html = `<!doctype html>
124
172
  <meta name="description" content="A catalog of multi-agent development architecture patterns: design write-ups plus drop-in scaffolding, E2E-tested, published on npm.">
125
173
  <link rel="preconnect" href="https://fonts.googleapis.com">
126
174
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
127
- <link href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:ital,wght@0,400;0,600;0,700;1,400&display=swap" rel="stylesheet">
175
+ <link href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap" rel="stylesheet">
128
176
  <style>
129
177
  :root{
130
- --bg:#f7f0e6; --card:#fdf8f2; --ink:#5b4a3f; --muted:#96826f;
131
- --sage:#cfe3d0; --sage-d:#5f9c6c; --peach:#f9d3b5; --peach-d:#d97f45;
132
- --pink:#f7c6d0; --pink-d:#cf6d87; --butter:#f7e0a8; --butter-d:#a97e1c;
133
- --blue:#c5d7ee; --blue-d:#5c82b6; --lav:#d9cdf0; --lav-d:#8266bd;
134
- --clay:0 10px 24px rgba(91,74,63,.13), inset 0 3px 8px rgba(255,255,255,.95), inset 0 -4px 8px rgba(91,74,63,.07);
135
- --clay-sm:0 6px 14px rgba(91,74,63,.12), inset 0 2px 5px rgba(255,255,255,.9), inset 0 -2px 5px rgba(91,74,63,.06);
178
+ --page:${THEME.page}; --hero-a:${THEME.heroA}; --hero-b:${THEME.heroB};
179
+ --hero-ink:${THEME.heroInk}; --hero-amb:${THEME.heroAmb};
180
+ --hero-title:${THEME.heroTitle}; --hero-body:${THEME.heroBody};
181
+ --card:${THEME.card}; --pill:${THEME.pill};
182
+ --ink:${THEME.ink}; --sub:${THEME.sub}; --mut:${THEME.mut}; --code:${THEME.code};
183
+ --amb:${THEME.amb}; --ins:${THEME.ins}; --flt:${THEME.flt};
184
+ --mono:ui-monospace,'Cascadia Code',Consolas,Menlo,monospace;
136
185
  }
137
186
  *{box-sizing:border-box}
138
- body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 "Nunito",system-ui,sans-serif;
139
- background-image:radial-gradient(600px 300px at 85% -50px, rgba(247,198,208,.35), transparent 70%),
140
- radial-gradient(500px 260px at -60px 30%, rgba(207,227,208,.4), transparent 70%),
141
- radial-gradient(520px 300px at 110% 75%, rgba(217,205,240,.32), transparent 70%);}
142
- h1,h2,h3{font-family:"Baloo 2","Nunito",sans-serif;line-height:1.15;margin:0}
143
- a{color:inherit;text-decoration:none}
144
- .wrap{max-width:1060px;margin:0 auto;padding:28px 20px 60px}
145
- header.nav{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:26px}
146
- .logo{font-family:"Baloo 2",sans-serif;font-weight:800;font-size:1.35rem;background:var(--card);
147
- padding:10px 20px;border-radius:999px;box-shadow:var(--clay-sm);border:1.5px solid #fff}
148
- .nav .spacer{flex:1}
149
- .btn{display:inline-flex;align-items:center;gap:8px;font-weight:700;padding:10px 20px;border-radius:999px;
150
- box-shadow:var(--clay-sm);border:1.5px solid #fff;transition:transform .15s ease, box-shadow .15s ease;cursor:pointer}
151
- .btn:hover{transform:translateY(-2px)}
152
- .btn.small{padding:8px 14px;font-size:.9rem}
153
- .btn.sage{background:var(--sage);color:var(--sage-d)} .btn.peach{background:var(--peach);color:var(--peach-d)}
154
- .btn.blue{background:var(--blue);color:var(--blue-d)} .btn.lav{background:var(--lav);color:var(--lav-d)}
155
- .card{background:var(--card);border-radius:28px;box-shadow:var(--clay);border:1.5px solid #fff;padding:26px 28px}
156
- .hero{display:grid;grid-template-columns:1.5fr 1fr;gap:22px;align-items:stretch;margin-bottom:22px}
157
- .hero .main{background:linear-gradient(145deg,#fbe3cd, #f9d3b5);}
158
- .hero h1{font-size:clamp(1.9rem,4.5vw,2.9rem);color:#7a4b28;margin-bottom:10px}
159
- .hero p.lede{color:#8a5a35;font-size:1.06rem;max-width:34em;margin:0 0 18px}
160
- .cta{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}
161
- .quick{background:rgba(255,255,255,.75);border-radius:18px;box-shadow:var(--clay-sm);border:1.5px solid #fff;
162
- padding:12px 16px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
163
- .quick code{font:600 .85rem/1.4 ui-monospace,Consolas,monospace;color:#7a4b28;word-break:break-all}
164
- .hero .side{display:flex;flex-direction:column;gap:14px;justify-content:center}
165
- .side .fact{display:flex;gap:12px;align-items:center;background:var(--card);border-radius:20px;
166
- box-shadow:var(--clay-sm);border:1.5px solid #fff;padding:12px 16px;font-weight:600}
167
- .side .fact .ico{font-size:1.5rem}
168
- .chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin:22px 0}
169
- .chip{border-radius:24px;padding:18px 20px;box-shadow:var(--clay);border:1.5px solid #fff}
170
- .chip .big{font-family:"Baloo 2",sans-serif;font-weight:800;font-size:1.7rem;display:block}
171
- .chip small{font-weight:700;opacity:.75}
172
- .chip.c1{background:var(--sage);color:var(--sage-d)} .chip.c2{background:var(--peach);color:var(--peach-d)}
173
- .chip.c3{background:var(--butter);color:var(--butter-d)} .chip.c4{background:var(--blue);color:var(--blue-d)}
174
- section{margin-top:34px}
175
- section > h2{font-size:1.6rem;margin-bottom:14px}
176
- .pattern{margin-bottom:18px}
177
- .pattern-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:8px}
178
- .pattern h3{font-size:1.3rem}
179
- .pill{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;font-weight:700;
180
- font-size:.85rem;box-shadow:var(--clay-sm);border:1.5px solid #fff}
181
- .summary{color:var(--muted);margin:6px 0 14px;font-weight:600}
182
- .roles{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
183
- .pill.role{background:#f3ece1;color:var(--ink)} .pill.role code{color:var(--lav-d)}
184
- .usewhen{margin:0 0 14px;padding-left:22px;color:var(--muted)} .usewhen li{margin:4px 0}
185
- .links{display:flex;gap:10px;flex-wrap:wrap}
186
- .steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}
187
- .step{border-radius:24px;padding:20px;box-shadow:var(--clay);border:1.5px solid #fff;background:var(--card)}
188
- .step .n{display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;font-size:1.4rem;
189
- border-radius:16px;box-shadow:var(--clay-sm);border:1.5px solid #fff;margin-bottom:10px}
190
- .step:nth-child(1) .n{background:var(--sage)} .step:nth-child(2) .n{background:var(--butter)}
191
- .step:nth-child(3) .n{background:var(--peach)} .step:nth-child(4) .n{background:var(--lav)}
192
- .step:nth-child(5) .n{background:var(--pink)}
193
- .step h3{font-size:1.05rem;margin-bottom:6px} .step p{margin:0;font-size:.9rem;color:var(--muted)}
194
- .step code{font-size:.8rem;color:var(--lav-d);word-break:break-all}
195
- footer{margin-top:44px;text-align:center;color:var(--muted);font-weight:600;font-size:.9rem}
196
- footer a{color:var(--lav-d)}
197
- @media (max-width:760px){.hero{grid-template-columns:1fr}}
187
+ body{margin:0;background:var(--page);font-family:'Nunito',sans-serif}
188
+ a{color:#e7548c;text-decoration:none}
189
+ a:hover{color:#c13a63}
190
+ .wrap{max-width:880px;margin:0 auto;padding:22px 0 34px}
191
+ .gx{position:relative;display:inline-block}
192
+ .arr{color:#e7548c}
193
+
194
+ .nav{display:flex;align-items:center;margin-bottom:22px}
195
+ .logo{display:flex;align-items:center;gap:10px;padding:8px 18px 8px 13px;border-radius:19px;background:var(--pill);
196
+ box-shadow:inset 0 2px 2px #fff,inset 0 -3px 5px rgba(var(--ins),0.2),0 8px 16px rgba(var(--amb),0.25)}
197
+ .logo b{font-family:'Baloo 2',cursive;font-weight:800;font-size:19px;color:var(--ink)}
198
+ .nav-links{margin-left:auto;display:flex;gap:10px}
199
+
200
+ .btn{display:inline-flex;align-items:center;gap:8px;padding:9px 18px;border-radius:18px;color:#fff;
201
+ font-size:12.5px;font-weight:900;transition:transform .15s ease;cursor:pointer}
202
+ .btn:hover{transform:translateY(-2px);color:#fff}
203
+ .btn:active{transform:translateY(1px)}
204
+ .btn-lg{padding:10px 20px;font-size:13px}
205
+ .btn-green{background:linear-gradient(180deg,#b3dcab,#98cb8e);text-shadow:0 1px 2px rgba(30,90,40,0.35);
206
+ box-shadow:inset 0 2px 3px rgba(255,255,255,0.5),inset 0 -3px 5px rgba(30,100,40,0.25),0 8px 14px rgba(120,150,100,0.35)}
207
+ .btn-orange{background:linear-gradient(180deg,#f6c9a2,#efb185);text-shadow:0 1px 2px rgba(160,80,30,0.35);
208
+ box-shadow:inset 0 2px 3px rgba(255,255,255,0.5),inset 0 -3px 5px rgba(170,90,30,0.25),0 8px 14px rgba(190,130,90,0.35)}
209
+ .btn-blue{background:linear-gradient(180deg,#b3cdf0,#96b8e5);text-shadow:0 1px 2px rgba(40,80,150,0.4);
210
+ box-shadow:inset 0 2px 3px rgba(255,255,255,0.55),inset 0 -3px 5px rgba(40,80,150,0.28),0 8px 14px rgba(var(--amb),0.3)}
211
+ .btn-purple{background:linear-gradient(180deg,#c3abe9,#a78cd8);text-shadow:0 1px 2px rgba(90,50,130,0.4);
212
+ box-shadow:inset 0 2px 3px rgba(255,255,255,0.55),inset 0 -4px 6px rgba(94,58,140,0.28),0 8px 14px rgba(var(--amb),0.3)}
213
+
214
+ .hero{display:grid;grid-template-columns:1fr 300px;gap:16px;align-items:stretch}
215
+ .hero-main{border-radius:30px;padding:30px 34px 26px;background:linear-gradient(170deg,var(--hero-a),var(--hero-b));
216
+ box-shadow:inset 0 3px 4px rgba(255,255,255,0.6),inset 0 -6px 10px var(--hero-ink),0 16px 30px var(--hero-amb)}
217
+ .hero-main h1{margin:0;font-family:'Baloo 2',cursive;font-weight:800;font-size:38px;line-height:1.1;
218
+ color:var(--hero-title);text-shadow:0 2px 0 rgba(255,255,255,0.4)}
219
+ .lede{margin:14px 0 0;max-width:410px;font-size:13.5px;line-height:1.6;font-weight:700;color:var(--hero-body)}
220
+ .cta{display:flex;gap:12px;margin-top:20px}
221
+ .quick{margin-top:20px;border-radius:16px;background:var(--pill);padding:14px 16px 12px;
222
+ box-shadow:inset 0 3px 6px rgba(var(--flt),0.2),inset 0 -2px 2px rgba(255,255,255,0.8)}
223
+ .quick code{display:block;font-family:var(--mono);font-size:12px;font-weight:700;color:var(--code);line-height:1.55;word-break:break-all}
224
+ .copy{display:inline-flex;margin-top:10px;padding:6px 16px;border-radius:13px;border:0;
225
+ background:linear-gradient(180deg,#f9d66e,#f0c14a);cursor:pointer;font-family:'Nunito',sans-serif;
226
+ font-size:12px;font-weight:900;color:#6b4a15;transition:transform .15s ease;
227
+ box-shadow:inset 0 2px 2px rgba(255,255,255,0.6),inset 0 -3px 4px rgba(180,120,20,0.3),0 5px 10px rgba(180,130,60,0.3)}
228
+ .copy:hover{transform:translateY(-1.5px)}
229
+ .copy:active{transform:translateY(1px)}
230
+ .hero-side{display:flex;flex-direction:column;gap:14px;justify-content:center}
231
+ .fact{display:flex;align-items:center;gap:12px;padding:13px 16px;border-radius:20px;background:var(--card);
232
+ box-shadow:inset 0 2px 2px #fff,inset 0 -3px 6px rgba(var(--ins),0.16),0 10px 20px rgba(var(--amb),0.22)}
233
+ .fact-ico{flex:none;width:38px;height:38px;border-radius:12px;display:grid;place-items:center}
234
+ .fact p{margin:0;font-size:12.5px;font-weight:800;color:var(--sub);line-height:1.5}
235
+
236
+ .stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-top:18px}
237
+ .stat{border-radius:22px;padding:16px 18px 18px}
238
+ .stat .big{font-family:'Baloo 2',cursive;font-weight:800;font-size:23px}
239
+ .stat p{margin:3px 0 0;font-size:11.5px;font-weight:800;line-height:1.5}
240
+ .stat-green{background:linear-gradient(180deg,#b9dfb1,#9bce92);
241
+ box-shadow:inset 0 3px 4px rgba(255,255,255,0.55),inset 0 -5px 8px rgba(30,90,40,0.2),0 10px 20px rgba(var(--amb),0.25)}
242
+ .stat-green .big{color:#2f6b35} .stat-green p{color:#3f7a45}
243
+ .stat-orange{background:linear-gradient(180deg,#f9cba6,#f1af85);
244
+ box-shadow:inset 0 3px 4px rgba(255,255,255,0.55),inset 0 -5px 8px rgba(170,90,30,0.2),0 10px 20px rgba(var(--amb),0.25)}
245
+ .stat-orange .big{color:#94481c} .stat-orange p{color:#9c5426}
246
+ .stat-yellow{background:linear-gradient(180deg,#fae09c,#f3cb6a);
247
+ box-shadow:inset 0 3px 4px rgba(255,255,255,0.6),inset 0 -5px 8px rgba(180,120,20,0.22),0 10px 20px rgba(var(--amb),0.25)}
248
+ .stat-yellow .big{color:#7e5a12} .stat-yellow p{color:#8a6218}
249
+ .stat-blue{background:linear-gradient(180deg,#b7d2f4,#9abfe9);
250
+ box-shadow:inset 0 3px 4px rgba(255,255,255,0.55),inset 0 -5px 8px rgba(40,80,150,0.22),0 10px 20px rgba(var(--amb),0.25)}
251
+ .stat-blue .big{color:#2c548c} .stat-blue p{color:#315e9c}
252
+
253
+ .sec-head{display:flex;align-items:center;gap:11px;margin:32px 0 14px}
254
+ .sec-head h2{margin:0;font-family:'Baloo 2',cursive;font-weight:800;font-size:25px;color:var(--ink)}
255
+
256
+ .panel{border-radius:24px;background:var(--card);padding:20px 24px 22px;
257
+ box-shadow:inset 0 2px 2px #fff,inset 0 -4px 8px rgba(var(--ins),0.15),0 14px 26px rgba(var(--amb),0.25)}
258
+ .pattern + .pattern{margin-top:16px}
259
+ .pattern-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
260
+ .pattern-head h3{margin:0;font-family:'Baloo 2',cursive;font-weight:700;font-size:20px;color:var(--ink);flex:1}
261
+ .chip{display:inline-flex;align-items:center;gap:7px;padding:7px 15px;border-radius:15px;font-size:11.5px;font-weight:900}
262
+ .chip-dot{width:8px;height:8px;border-radius:50%;background:#fffaf2}
263
+ .summary{margin:12px 0 0;font-size:13px;line-height:1.6;font-weight:700;color:var(--sub);max-width:760px}
264
+ .roles{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px}
265
+ .role{display:inline-flex;align-items:center;gap:8px;padding:8px 15px;border-radius:16px;background:var(--pill);
266
+ box-shadow:inset 0 2px 2px #fff,inset 0 -3px 5px rgba(var(--ins),0.25),0 5px 10px rgba(var(--amb),0.2)}
267
+ .role .dot{width:9px;height:9px;border-radius:50%}
268
+ .role b{font-size:12px;font-weight:900;color:var(--ink)}
269
+ .role .sep{font-size:11px;font-weight:700;color:var(--mut)}
270
+ .role code{font-family:var(--mono);font-size:11px;font-weight:700;color:#8a5fd0}
271
+ .role .eff{color:#e7548c}
272
+ .links{display:flex;gap:12px;margin-top:17px}
273
+
274
+ .steps{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
275
+ .step{border-radius:20px;background:var(--card);padding:15px 14px 17px;
276
+ box-shadow:inset 0 2px 2px #fff,inset 0 -3px 6px rgba(var(--ins),0.15),0 10px 20px rgba(var(--amb),0.22)}
277
+ .step-ico{width:42px;height:42px;border-radius:13px;display:grid;place-items:center}
278
+ .step h3{margin:11px 0 0;font-size:13px;font-weight:900;color:var(--ink);font-family:'Nunito',sans-serif}
279
+ .step p{margin:6px 0 0;font-size:11.5px;font-weight:700;color:var(--sub);line-height:1.55}
280
+ .step code{font-family:var(--mono);font-size:10px;background:rgba(var(--flt),0.12);border-radius:5px;padding:1px 4px;color:var(--code);word-break:break-all}
281
+
282
+ footer{margin-top:30px;text-align:center;font-size:12.5px;font-weight:700;color:var(--mut)}
283
+ footer code{font-family:var(--mono);font-size:11.5px;color:#8a5fd0}
284
+
285
+ @media (max-width:912px){.wrap{padding-left:16px;padding-right:16px}}
286
+ @media (max-width:860px){.hero{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}.steps{grid-template-columns:repeat(2,1fr)}}
287
+ @media (max-width:540px){.stats,.steps{grid-template-columns:1fr}.pattern-head h3{flex-basis:100%}}
198
288
  </style>
199
289
  </head>
200
290
  <body>
201
291
  <div class="wrap">
202
292
  <header class="nav">
203
- <span class="logo">🏗️ agent-templates</span>
204
- <span class="spacer"></span>
205
- <a class="btn sage" href="${GITHUB}">⭐ GitHub</a>
206
- <a class="btn peach" href="${NPM}">📦 npm <span data-npm-version>v${esc(pkg.version)}</span></a>
293
+ <span class="logo">${LOGO_ICON}<b>agent-templates</b></span>
294
+ <span class="nav-links">
295
+ <a class="btn btn-green" href="${GITHUB}">${STAR_ICON} GitHub</a>
296
+ <a class="btn btn-orange" href="${NPM}">${NPM_ICON} npm&nbsp;&nbsp;<span data-npm-version>v${esc(pkg.version)}</span></a>
297
+ </span>
207
298
  </header>
208
299
 
209
300
  <div class="hero">
210
- <div class="card main">
301
+ <div class="hero-main">
211
302
  <h1>Multi-agent patterns,<br>ready to drop in.</h1>
212
- <p class="lede">Field-proven architectures for AI-agent development — each one a design write-up <b>plus</b> working scaffolding. Humans decide at two gates; the agents do the rest.</p>
303
+ <p class="lede">Field-proven architectures for AI-agent development — each one a design write-up <em>plus</em> working scaffolding. Humans decide at two gates; the agents do the rest.</p>
213
304
  <div class="cta">
214
- <a class="btn blue" href="${GITHUB}/blob/main/ADOPTING.md">🚀 Adoption guide</a>
215
- <a class="btn lav" href="${GITHUB}/blob/main/CLAUDE.md">📜 Operating manual</a>
305
+ <a class="btn btn-lg btn-blue" href="${GITHUB}/blob/main/ADOPTING.md">Adoption guide</a>
306
+ <a class="btn btn-lg btn-purple" href="${GITHUB}/blob/main/CLAUDE.md">Operating manual</a>
307
+ </div>
308
+ <div class="quick">
309
+ <code id="qs">${esc(QUICKSTART)}</code>
310
+ <button class="copy" id="copy-btn" type="button">Copy</button>
216
311
  </div>
217
- <div class="quick"><code id="qs">${esc(QUICKSTART)}</code><button class="btn small butter" style="background:var(--butter);color:var(--butter-d)" onclick="navigator.clipboard.writeText(document.getElementById('qs').textContent).then(()=>{this.textContent='Copied ✓'})">Copy</button></div>
218
312
  </div>
219
- <div class="side">
220
- <div class="fact"><span class="ico">🧾</span> Every model/effort claim carries a source label and an expiry date</div>
221
- <div class="fact"><span class="ico">🛡️</span> Role boundaries enforced by hooks, not prose</div>
222
- <div class="fact"><span class="ico">🌙</span> Nightly sweep triages and fixes issues while you sleep</div>
313
+ <div class="hero-side">
314
+ ${FACTS.map(([tile, glyph, copy]) => `<div class="fact"><span class="fact-ico" style="${tile}">${glyph}</span><p>${copy}</p></div>`).join('\n ')}
223
315
  </div>
224
316
  </div>
225
317
 
226
- <div class="chips">
227
- <div class="chip c1"><span class="big">${patterns.length}</span><small>pattern${patterns.length === 1 ? '' : 's'} in the catalog</small></div>
228
- <div class="chip c2"><span class="big" data-npm-version>v${esc(pkg.version)}</span><small>on npm · MIT</small></div>
229
- <div class="chip c3"><span class="big">E2E</span><small>gated merges — deterministic, zero-token tests</small></div>
230
- <div class="chip c4"><span class="big">2</span><small>human gates: sign-off &amp; smoke test</small></div>
318
+ <div class="stats">
319
+ <div class="stat stat-green"><span class="big">${patterns.length}</span><p>pattern${patterns.length === 1 ? '' : 's'} in the catalog</p></div>
320
+ <div class="stat stat-orange"><span class="big" data-npm-version>v${esc(pkg.version)}</span><p>on npm · MIT</p></div>
321
+ <div class="stat stat-yellow"><span class="big">E2E</span><p>gated merges — deterministic, zero-token tests</p></div>
322
+ <div class="stat stat-blue"><span class="big">2</span><p>human gates: sign-off &amp; smoke test</p></div>
231
323
  </div>
232
324
 
233
325
  <section>
234
- <h2>🧩 Patterns</h2>
326
+ <div class="sec-head">${PATTERNS_ICON}<h2>Patterns</h2></div>
235
327
  ${patternCards}
236
328
  </section>
237
329
 
238
330
  <section>
239
- <h2>🛤️ From a bare PRD.md to shipped</h2>
331
+ <div class="sec-head">${PIPELINE_ICON}<h2>From a bare PRD.md to shipped</h2></div>
240
332
  <div class="steps">
241
- ${STEPS.map(([ico, t, d], i) => `<div class="step"><span class="n">${ico}</span><h3>${i + 1}. ${t}</h3><p>${d}</p></div>`).join('\n ')}
333
+ ${STEPS.map(([tile, glyph, t, d], i) => `<div class="step"><span class="step-ico" style="${tile}">${glyph}</span><h3>${i + 1}. ${t}</h3><p>${d}</p></div>`).join('\n ')}
242
334
  </div>
243
335
  </section>
244
336
 
245
337
  <footer>
246
- Generated from the pattern catalog by <a href="${GITHUB}/blob/main/scripts/build-site.mjs">scripts/build-site.mjs</a>
338
+ Generated from the pattern catalog by <a href="${GITHUB}/blob/main/scripts/build-site.mjs"><code>scripts/build-site.mjs</code></a>
247
339
  · ${new Date().toISOString().slice(0, 10)} · <a href="${GITHUB}/blob/main/LICENSE">MIT</a>
248
340
  · <a href="${GITHUB}/issues/new/choose">Feedback → issues</a>
249
341
  </footer>
250
342
  </div>
251
343
  <script>
252
- fetch('https://registry.npmjs.org/agent-templates').then(r=>r.json()).then(d=>{
253
- var v=d['dist-tags']&&d['dist-tags'].latest;
344
+ (function(){
345
+ var b=document.getElementById('copy-btn'),q=document.getElementById('qs'),t
346
+ if(!b||!q)return
347
+ b.addEventListener('click',function(){
348
+ try{navigator.clipboard.writeText(q.textContent).catch(function(){})}catch(e){}
349
+ b.textContent='Copied!'
350
+ clearTimeout(t)
351
+ t=setTimeout(function(){b.textContent='Copy'},1400)
352
+ })
353
+ })()
354
+ fetch('https://registry.npmjs.org/agent-templates').then(function(r){return r.json()}).then(function(d){
355
+ var v=d['dist-tags']&&d['dist-tags'].latest
254
356
  if(v){document.querySelectorAll('[data-npm-version]').forEach(function(e){e.textContent='v'+v})}
255
357
  }).catch(function(){})
256
358
  </script>