@hegemonart/get-design-done 1.33.6 → 1.34.2

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.
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Get Design Done — 5-stage agent-orchestrated design pipeline with 9 connections, handoff-first workflow, bidirectional Figma write-back, 22+ specialized agents, queryable knowledge layer (intel store, dependency analysis, learnings extraction), and a self-improvement loop (reflector, frontmatter + budget feedback, global-skills layer). v1.20.0 ships the SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream, and resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) for rate-limit + 429 + context-overflow recovery. Full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
8
- "version": "1.33.6"
8
+ "version": "1.34.2"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "get-design-done",
13
13
  "source": "./",
14
14
  "description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), Claude Design handoff, bidirectional Figma write-back, and a queryable intel store (.design/intel/) for dependency and learnings queries. Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation. Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain.",
15
- "version": "1.33.6",
15
+ "version": "1.34.2",
16
16
  "author": {
17
17
  "name": "hegemonart"
18
18
  },
@@ -71,7 +71,11 @@
71
71
  "agent-sdk",
72
72
  "figma",
73
73
  "extractor",
74
- "design-system-sync"
74
+ "design-system-sync",
75
+ "swift",
76
+ "compose",
77
+ "flutter",
78
+ "email"
75
79
  ]
76
80
  }
77
81
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "get-design-done",
3
3
  "short_name": "gdd",
4
- "version": "1.33.6",
4
+ "version": "1.34.2",
5
5
  "description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), handoff-first workflow via Claude Design bundles, bidirectional Figma write-back (annotations, Code Connect), queryable intel store (`.design/intel/`) for O(1) design surface lookups, and self-improvement loop (reflector agent, frontmatter + budget feedback, global-skills layer at `~/.claude/gdd/global-skills/`). Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings, reflect, apply-reflections. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows, lint + schema + frontmatter + stale-ref + shellcheck + gitleaks + injection-scan + blocking size-budget) and release automation (auto-tag + GitHub Release + release-time smoke test). Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain. v1.27.7 ships gdd-mcp (Phase 27.7): 12 read-only MCP tools for sub-3s priming. v1.28.0 (Phase 28): Foundational References Tier 2 — 5 new reference files (color-theory, composition, proportion-systems, i18n, contrast-advanced), 2 verifier i18n probes + 1 explore i18n-readiness probe, 12 additive cross-link insertions across 10 existing references, 2 orthogonal audit-scoring lens-tags (composition_alignment + i18n_readiness).",
6
6
  "author": {
7
7
  "name": "hegemonart",
@@ -65,7 +65,11 @@
65
65
  "cross-session",
66
66
  "figma",
67
67
  "extractor",
68
- "design-system-sync"
68
+ "design-system-sync",
69
+ "swift",
70
+ "compose",
71
+ "flutter",
72
+ "email"
69
73
  ],
70
74
  "skills": [
71
75
  "./skills/"
package/CHANGELOG.md CHANGED
@@ -4,6 +4,52 @@ All notable changes to get-design-done are documented here. Versions follow [sem
4
4
 
5
5
  ---
6
6
 
7
+ ## [1.34.2] - 2026-05-31
8
+
9
+ ### Phase 34.2 — Non-Web Output Layer: Email
10
+
11
+ Second sub-phase of the split Phase 34 (Non-Web Output Layer). Adds **email-template output** — a dedicated executor that generates email honoring the real client constraints (table-based layout, inline styles, MSO conditional comments for Outlook's Word engine, dark-mode `color-scheme` handling, and the top-20-client quirks) that modern web HTML/CSS breaks on — behind the same project-type detector that routes native (34.1). Email generation is **opt-in via project-type detection — web remains the default**. A decimal release on the v1.34.x arc (CHANGELOG-only, D-01); **no new runtime dependency** — the executor generates the email as an agent-prompt and the plugin checks it with a deterministic static validator, no `mjml` runtime (D-02/D-10). Native (Phase 34.1) shipped; Print/PDF (Phase 34.3) is the next sub-phase, out of 34.2 (D-07). 4 plans across Waves A–C.
12
+
13
+ ### Added
14
+
15
+ - **Email-constraint catalogue + static validator (no `mjml` dependency, D-02/D-03).** `reference/email-design.md` — the authoritative email-constraint catalogue (~30 catalogued constraints: table-based layout, inline styles, MSO conditional comments, dark-mode `color-scheme`, ~600px width, image/alt rules, and the top-20-client quirks), registered in `reference/registry.json`. `scripts/lib/email/validate-email-html.cjs` — a pure, deterministic static checker (zero `require`, no fs/network/mjml) that flags the statically-verifiable subset: `EM-LAYOUT-01` (no flexbox/grid/`position`), `EM-STYLE-01` (no `<style>` as the primary styling mechanism; a small `@media`-only block is tolerated), `EM-MSO-01` (an MSO conditional comment in a full email), `EM-DARK-01` (a `color-scheme` signal present) — returning `{ ok, violations:[{ rule, detail }] }`.
16
+ - **`email-executor` agent (MJML canonical + derived HTML, D-02/D-04).** `agents/email-executor.md` — generates **one email template per task**: an MJML source (the canonical artifact) plus the equivalent derived HTML, generated against the `reference/email-design.md` catalogue and run through the static validator as its own self-check. It is an agent-prompt (like `design-executor`/`flutter-executor`), **not** a compiler — no running `mjml`, no Litmus account, no network is required to produce the email. Carries a `## Record` section from the start (the record-contract lesson) and an honest `size_budget`.
17
+ - **`litmus` connection (optional render-test, degrade-to-static-validator, D-03).** `connections/litmus.md` — cross-client rendered screenshots (Email-on-Acid is the documented alternative) for the verify stage when present, mirroring `connections/chromatic.md`. **Never hard-required**: when absent the verify stage degrades to the static email-HTML validator / code-only structural audit. Added to the `connections/connections.md` index + Capability Matrix in this closeout.
18
+ - **`design-context-builder` `email` project-type route + `design-verifier` email-verify branch (delegated, D-06/D-09).** The context-builder appends the `email` enum + the `email-executor` route at the 34.1 seam (the seam is left open for 34.3/print). The verifier gains an email-verify branch by **delegation** to `reference/email-design.md` (the verifier stayed within its ≤700-line budget).
19
+ - **Regression baseline.** `test/fixtures/baselines/phase-34-2/` freezes the email surface — a valid email fixture (`email-good.html`), a validator golden (`validator-golden.json`, the recorded `validateEmailHtml` output for a passing + a failing fixture, proving the rule-output shape is frozen), and `manifests-version.txt`=1.34.2 — pinned by `test/suite/phase-34-2-baseline.test.cjs` so a future change cannot silently break the validator or its verdict shape.
20
+
21
+ ### Notes
22
+
23
+ - All Phase 34.2 tests are hermetic (D-10): the static email-HTML validator is a pure string→verdict function (fixture HTML → constraint checks, no network/mjml), the email-executor is validated **structurally** (frontmatter + catalogue reference + validator reference + presence), and the default `npm test` invokes **no** Litmus/Email-on-Acid and pulls in **no** `mjml` runtime. Rendered cross-client verification is the opt-in degraded-mode path (D-03).
24
+ - The 31.5 tarball golden (`test/fixtures/baselines/phase-31-5/tarball-manifest.txt`) was regenerated as a reviewed delta: **+2** newly-shipped files (`agents/email-executor.md`, `connections/litmus.md`), zero removals (641 paths). The other two new email files (`reference/email-design.md`, `scripts/lib/email/validate-email-html.cjs`) were already in the golden from their Wave-A (34.2-01) commit — so the four new shipped files net to a +2 line-delta on the golden.
25
+ - 6-manifest lockstep at **v1.34.2** (`package.json` + `package-lock.json` (root + `packages.""`) + `.claude-plugin/plugin.json` + `.claude-plugin/marketplace.json` (metadata.version + plugins[0].version) + `.cursor-plugin/plugin.json` + `.codex-plugin/plugin.json`); marketplace `plugins[0].keywords` + plugin keywords gain `email`. Version-sync hygiene done upfront (D-08): `OFF_CADENCE_VERSIONS.add('1.34.2')` + the 16 live-pinned `manifests-version.txt` baselines forward-propagated 1.34.1 → 1.34.2 (phase-34-1, the prior closeout's own baseline, joined the set).
26
+
27
+ ---
28
+
29
+ ## [1.34.1] - 2026-05-31
30
+
31
+ ### Phase 34.1 — Non-Web Output Layer: Native Mobile
32
+
33
+ First sub-phase of the split Phase 34 (Non-Web Output Layer). Crosses GDD past web-only generation into **native mobile** — SwiftUI, Jetpack Compose, and Flutter — fed by a shared **token-bridge** that maps the canonical CSS-token form (Phase 23) deterministically onto each platform's theme primitives, behind a **project-type detector** that routes the brief to the matching native executor. Phase 19 shipped platform *references* (iOS/Android conventions) but zero generators; 34.1 adds the generators. Native generation is **opt-in via project-type detection — web remains the default**. A decimal release on the v1.34.x arc (CHANGELOG-only, D-01); no new runtime dependency (the emitters extend the existing Phase-23 token engine, D-02). Email (Phase 34.2) and Print/PDF (Phase 34.3) are separate sub-phases, out of 34.1 (D-07). 6 plans across Waves A–C.
34
+
35
+ ### Added
36
+
37
+ - **Native token-bridge (extends the Phase-23 token engine, D-02).** `reference/native-platforms.md` (the canonical CSS-token → native-theme bridge spec + the precision contract, registered in `reference/registry.json`) plus three new emitters on the `scripts/lib/design-tokens/` facade — `swift.cjs` / `compose.cjs` / `flutter.cjs` (with a shared `_native-shared.cjs`) — that map a canonical token (`#3B82F6`, `16px`, `Inter`) onto SwiftUI `Color`/`CGFloat`/`Font`, Compose `Color`/`Shapes`/`Typography`/`MaterialTheme`, and Flutter `ThemeData`/`ColorScheme`/`TextTheme`. The bridge is **deterministic and round-trippable**: each emitter has a symmetric re-extractor, and the documented precision contract is colour 8-bit-per-channel exact (`#RGB`→`#RRGGBB`), integer pt/dp (logical-px double for Flutter), and typography string pass-through; non-mappable `var()`/`calc()` values pass through verbatim and are excluded from the identity set. The facade re-exports `emitSwift`/`emitCompose`/`emitFlutter` + `reextractSwift`/`reextractCompose`/`reextractFlutter` (the Phase-23 readers are untouched).
38
+ - **`swift-executor` agent (SwiftUI).** `agents/swift-executor.md` — generates compilable SwiftUI views per `reference/platforms.md` iOS conventions (NavigationStack/TabView, safe areas, gesture reservations, SF Pro Dynamic Type) while consuming the token-bridge (`emitSwift`) for all `Color`/`Font`/`CGFloat`; it never hand-authors hex→Color math.
39
+ - **`compose-executor` agent (Jetpack Compose, Material 3).** `agents/compose-executor.md` — generates Material 3 composables in Kotlin per the Android conventions (edge-to-edge + inset handling, the back-gesture reservation, the Material 3 `sp` type scale), consuming `emitCompose` for the `Color`/`Shapes`/`Typography`/`MaterialTheme` mapping.
40
+ - **`flutter-executor` agent (multi-target Material 3 + Cupertino).** `agents/flutter-executor.md` — the one cross-platform executor: a single Dart codebase that adapts the **theme per target** (Material 3 for web/Android, Cupertino for iOS) from one bridge output (`emitFlutter` → `ThemeData`/`ColorScheme`/`TextTheme`).
41
+ - **`xcode-simulator` + `android-emulator` connections (optional, degrade-to-code-only, D-03).** `connections/xcode-simulator.md` (macOS/`simctl`) and `connections/android-emulator.md` (`adb`/`emulator`) provide *rendered* native evidence for the verify stage when present, mirroring `connections/preview.md`. They are **never hard-required**: when absent the verify stage degrades to a code-only structural audit and the executors still produce compilable code with no simulator. Both are added to the `connections/connections.md` index + Capability Matrix in this closeout.
42
+ - **`design-verifier` native no-DOM branch + `design-context-builder` project-type routing (D-06).** The verifier gains a native verification branch (snapshot-diff when a simulator/emulator + screenshots are available, else code-only structural audit); the context-builder detects `web` (default) / `native-ios` / `native-android` / `flutter` from the brief + `package.json`/`pubspec.yaml`/`*.xcodeproj` presence and routes to the matching executor. The detector is left **extensible** — `email`/`print` enum values are added by 34.2/34.3, not 34.1.
43
+ - **Regression baseline.** `test/fixtures/baselines/phase-34-1/` freezes the native surface — one byte-equal native-theme fixture per platform (`swift`/`compose`/`flutter-theme.txt`, the emitter output over the canonical token map), a token-bridge round-trip snapshot (`token-bridge-roundtrip.json`, the input + per-emitter re-extraction proving identity-within-precision), and `manifests-version.txt`=1.34.1 — pinned by `test/suite/phase-34-1-baseline.test.cjs` so a future change cannot silently break an emitter or the precision contract.
44
+
45
+ ### Notes
46
+
47
+ - All Phase 34.1 tests are hermetic (D-10): the token-bridge round-trip is deterministic (canonical `tokens.json` → emit → re-extract → identity, no simulator), the executors are validated **structurally** (frontmatter + token-bridge reference + platforms reference + presence), and the default `npm test` invokes **no** Xcode/Android/emulator/network. Snapshot/simulator verification is the opt-in degraded-mode path (D-03).
48
+ - The 31.5 tarball golden (`test/fixtures/baselines/phase-31-5/tarball-manifest.txt`) was regenerated as a reviewed delta: **+5** shipped native files (`agents/swift-executor.md`, `agents/compose-executor.md`, `agents/flutter-executor.md`, `connections/xcode-simulator.md`, `connections/android-emulator.md`), zero removals (637 paths). The `reference/native-platforms.md` + the four `scripts/lib/design-tokens/{swift,compose,flutter,_native-shared}.cjs` files were already in the golden from their Wave-A commit.
49
+ - 6-manifest lockstep at **v1.34.1** (`package.json` + `package-lock.json` (root + `packages.""`) + `.claude-plugin/plugin.json` + `.claude-plugin/marketplace.json` (metadata.version + plugins[0].version) + `.cursor-plugin/plugin.json` + `.codex-plugin/plugin.json`); marketplace + plugin keywords gain `swift`/`compose`/`flutter`. Version-sync hygiene done upfront (D-08): `OFF_CADENCE_VERSIONS.add('1.34.1')` + the 15 live-pinned `manifests-version.txt` baselines forward-propagated 1.33.6 → 1.34.1 (phase-33-6, the prior closeout's own baseline, joined the set).
50
+
51
+ ---
52
+
7
53
  ## [1.33.6] - 2026-05-31
8
54
 
9
55
  ### Phase 33.6 — OpenRouter Provider Adapter
package/README.md CHANGED
@@ -104,6 +104,24 @@ See [docs/PEER-DELEGATION.md](docs/PEER-DELEGATION.md) for the ops guide (when d
104
104
 
105
105
  You can route any agent's tier (`opus`/`sonnet`/`haiku`) through **OpenRouter** — an aggregator that fronts Claude, GPT, Llama, Gemini, DeepSeek and more behind a single API key — *alongside* your native provider auth, never instead of it. Set `OPENROUTER_API_KEY` and GDD's tier-resolver adapter dynamically fetches the OpenRouter catalog (24h TTL cache) and maps each tier onto a concrete model via a closed-vs-open + pricing heuristic, with a `.design/config.json#openrouter_tier_overrides` escape hatch for pinning exact ids. When the key is absent or the catalog is unreachable, resolution gracefully falls back to your native provider — OpenRouter is purely additive. See [`connections/openrouter.md`](connections/openrouter.md) for setup, the probe pattern, and fallback behavior, and run `/gdd:openrouter-status` to inspect catalog freshness and the resolved tier→model mapping.
106
106
 
107
+ ### Native mobile output (v1.34.1)
108
+
109
+ GDD now generates **native mobile** UI, not just web. A project-type detector routes the brief to the matching executor — web stays the default; `native-ios` / `native-android` / `flutter` opt in via the brief plus `package.json` / `pubspec.yaml` / `*.xcodeproj` presence:
110
+
111
+ - **[`swift-executor`](agents/swift-executor.md)** — compilable **SwiftUI** views per iOS conventions (navigation, safe areas, SF Pro Dynamic Type).
112
+ - **[`compose-executor`](agents/compose-executor.md)** — **Jetpack Compose** Material 3 composables (Kotlin), edge-to-edge with the Material 3 `sp` type scale.
113
+ - **[`flutter-executor`](agents/flutter-executor.md)** — one Dart codebase that adapts the theme **per target**: Material 3 for web/Android, Cupertino for iOS.
114
+
115
+ All three are fed by a shared **token-bridge** ([`reference/native-platforms.md`](reference/native-platforms.md)) that extends the Phase-23 token engine with `swift`/`compose`/`flutter` emitters — mapping your canonical tokens (`#3B82F6`, `16px`, `Inter`) deterministically onto each platform's theme primitives (`Color`/`Font`, `MaterialTheme`, `ThemeData`) with a documented, round-trippable precision contract, so the executors never hand-author colour or dimension math. Rendered verification via the iOS Simulator / Android emulator is **optional** — when no simulator is present the verify stage degrades to a code-only structural audit (the simulator only *adds* rendered confirmation).
116
+
117
+ ### Email output (v1.34.2)
118
+
119
+ GDD also generates **email templates** — the project-type detector routes an `email` brief to a dedicated executor that honors the real client constraints web HTML/CSS breaks on:
120
+
121
+ - **[`email-executor`](agents/email-executor.md)** — generates one email per task as **MJML source (canonical) + the derived HTML**, against the constraint catalogue, with the static validator as its own self-check. It is an agent-prompt, not a compiler — **no `mjml` runtime, no Litmus account, no network** is needed to produce the email.
122
+
123
+ The constraints live in [`reference/email-design.md`](reference/email-design.md) — table-based layout (no flexbox/grid/`position`), inline styles (no `<style>` sheet in Gmail), MSO conditional comments for Outlook's Word engine, dark-mode `color-scheme` handling, ~600px width, and the top-20-client quirks. A deterministic static checker ([`scripts/lib/email/validate-email-html.cjs`](scripts/lib/email/validate-email-html.cjs)) flags the statically-verifiable subset (`EM-LAYOUT`/`EM-STYLE`/`EM-MSO`/`EM-DARK`). Cross-client rendered verification via [`Litmus`](connections/litmus.md) (or Email-on-Acid) is **optional** — when absent the verify stage degrades to the static validator. Email generation is opt-in; **web stays the default**.
124
+
107
125
  ### Previous releases
108
126
 
109
127
  - **v1.26.0** — Headless Model Resolver (per-runtime tier→model map, `resolved_models` router field, per-runtime price tables, `reasoning-class` runtime-neutral alias).
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: compose-executor
3
+ description: Generates Jetpack Compose Material 3 composables (Kotlin) from one plan task plus the canonical token-bridge, following reference/platforms.md Android conventions. Consumes emitCompose; never re-derives the token→theme mapping. Spawned per task by the design stage for native-android targets.
4
+ tools: Read, Write, Edit, Bash, Grep, Glob
5
+ color: green
6
+ default-tier: sonnet
7
+ tier-rationale: "Follows an Opus-authored plan; executes (generates Compose) rather than plans"
8
+ size_budget: XXL
9
+ size_budget_rationale: "Native executor carries the Android/Material-3 convention contract + the token-bridge consumption protocol + the optional-emulator degrade rule; the heavy detail is delegated to reference/platforms.md and reference/native-platforms.md so the body stays far under the XXL cap (mirrors design-executor.md's XXL tier)."
10
+ parallel-safe: conditional-on-touches
11
+ typical-duration-seconds: 60
12
+ reads-only: false
13
+ writes:
14
+ - "src/**/*.kt"
15
+ - ".design/tasks/*.md"
16
+ ---
17
+
18
+ @reference/shared-preamble.md
19
+
20
+ # compose-executor
21
+
22
+ ## Role
23
+
24
+ You execute **exactly one task** from `.design/DESIGN-PLAN.md`, generating **Jetpack Compose composables in Kotlin using Material 3**. Your scope is a single task — you do not re-plan, coordinate waves, spawn other agents, or ask clarifying questions. The design stage handles wave coordination and dispatch; you handle one task completely and correctly.
25
+
26
+ You are a single-shot agent: receive context, read the references, generate Kotlin, write output, commit, emit marker, done. You are the Android sibling of `agents/design-executor.md` (web) and `agents/swift-executor.md` (SwiftUI) — same contract, Compose target.
27
+
28
+ ---
29
+
30
+ ## Required Reading
31
+
32
+ The orchestrating stage supplies a `<required_reading>` block in the prompt. Read every listed file before taking any action. At minimum:
33
+
34
+ - `.design/STATE.md` — pipeline state (decisions, blockers, must-haves, `<connections>`)
35
+ - `.design/DESIGN-PLAN.md` — full task list (your task is identified by task_id)
36
+ - `.design/DESIGN-CONTEXT.md` — brand decisions, constraints, locked choices
37
+ - **`reference/platforms.md`** — the **authoritative Android interaction conventions** (edge-to-edge, gestures, the Material 3 type scale). CITE it; do not duplicate it.
38
+ - **`reference/native-platforms.md`** — the **token-bridge spec** (the canonical-token → Compose `Color`/`Shapes`/`Typography`/`MaterialTheme` mapping). This is how tokens become theme primitives; you CONSUME it.
39
+
40
+ **Invariant:** read all listed files FIRST, before generating any Kotlin.
41
+
42
+ ---
43
+
44
+ ## Token Consumption — emitCompose (CONSUME, do not re-derive)
45
+
46
+ The canonical design tokens are turned into Compose theme primitives by the **34.1-01 token-bridge**, not by you. The bridge lives in `scripts/lib/design-tokens/` and exposes the `emitCompose` emitter (spec: `reference/native-platforms.md`).
47
+
48
+ - The bridge maps each token per `reference/native-platforms.md` §4: a color `#RRGGBB` → `Color(0xAARRGGBB)` (alpha-first, 8 hex digits, opaque alpha `0xFF` when the source had none); a dimension `Npx` → `N.dp`; a `radius-` token → `RoundedCornerShape(N.dp)` inside a `Shapes` block; a typography family → a `String` fed into a `TextStyle.fontFamily` slot / `Typography`.
49
+ - **Obtain the emitted theme object via the bridge** rather than hand-writing `Color(0x…)` literals. Treat the emitted `object GDDTheme { … }` (its `Colors` / `Shapes` / `Typography` members) and a `MaterialTheme` wiring as the source of truth, then reference those members from your composables.
50
+ - **Do NOT re-derive the mapping.** You never decide how `#3B82F6` becomes a Compose `Color` — `reference/native-platforms.md` + `emitCompose` own that, with the precision contract (8-bit channels exact; integer dp; logical-px nuance). Re-deriving it would drift from the round-trip the bridge guarantees.
51
+ - Non-mappable token values (`var(--x)`, `calc(…)`, gradients, `rem`/`em`) are passed through verbatim by the bridge and are **not** part of the round-trip identity set — surface them as-is, do not invent a Compose equivalent.
52
+
53
+ ---
54
+
55
+ ## Android Conventions to Honor (cite `reference/platforms.md`)
56
+
57
+ Apply these from `reference/platforms.md` — cite the file, do not paste its tables:
58
+
59
+ 1. **Edge-to-edge rendering + inset handling.** Android draws behind the system bars by default (enforced since Android 15). Use the Compose `WindowInsets` / `Modifier.safeDrawing` (or `systemBarsPadding` / `safeContentPadding` as appropriate) so content is not occluded by the status bar or the gesture navigation bar. Keep the bottommost interactive control above the ~30dp gesture-exclusion zone.
60
+ 2. **Back gesture — never shadow the edge swipe.** The edge swipe from **either** the left or right screen edge navigates back in the activity stack and cannot be overridden. Do not attach custom horizontal pan gestures that begin at a screen edge; if an in-app edge swipe is essential (slider/carousel near the edge), use a bounded gesture-exclusion rectangle (max 200dp per region), never the full height.
61
+ 3. **Material 3 five-category type scale in `sp`.** Use the Material 3 type scale — Display / Headline / Title / Body / Label, three sizes each — wired through `Typography`. Text sizes are always in **`sp`** (scale-independent pixels), never `dp` or `px`, so user font-scale accessibility preferences are respected.
62
+ 4. **Material 3 components + theming.** Compose composables use Material 3 (`androidx.compose.material3`) components and are wrapped in a `MaterialTheme` fed by the token-bridge `colorScheme` / `shapes` / `typography`. Honor any component-convention deltas in `reference/platforms.md` §4 (e.g. Android modal bottom sheet vs iOS action sheet, AlertDialog's up-to-three buttons).
63
+
64
+ ---
65
+
66
+ ## Execution Principles
67
+
68
+ 1. **Honor DESIGN-CONTEXT.md decisions as locked.** Decisions prefixed `D-XX:` are non-negotiable. Do not revisit or contradict them.
69
+ 2. **The references are authoritative.** `reference/platforms.md` (conventions) + `reference/native-platforms.md` (token mapping) govern; apply their rules directly rather than improvising.
70
+ 3. **Observable outcomes only.** Acceptance criteria describe observable states ("composable X exists", "text uses `sp`", "theme references the emitted tokens"). Do not add process steps to criteria checks.
71
+ 4. **Decision authority:**
72
+ - In-context choices (covered by DESIGN-CONTEXT.md or a reference) → proceed autonomously.
73
+ - Out-of-context choices (architectural, contradicts a locked decision, changes a public API) → Rule 4: STOP, write a blocker, mark task `status: deviation`, still emit `## EXECUTION COMPLETE`.
74
+ 5. **Single-task scope.** Do not modify DESIGN-PLAN.md, DESIGN-CONTEXT.md, or any file outside the task's `Touches:` list (unless a deviation fix requires it — document it).
75
+
76
+ ---
77
+
78
+ ## Output
79
+
80
+ Emit **Kotlin Jetpack Compose composables (Material 3)** to the task's declared output path(s) (typically `src/**/*.kt` or the project's Compose source set). Each composable:
81
+
82
+ - is annotated `@Composable`, uses Material 3 (`androidx.compose.material3`) components;
83
+ - consumes the token-bridge theme (`MaterialTheme.colorScheme` / `.shapes` / `.typography` fed by `emitCompose` output) — no hardcoded `Color(0x…)` / magic `dp` for themed values;
84
+ - handles insets (`safeDrawing` / `WindowInsets`) and never shadows the back-edge swipe;
85
+ - sizes text in `sp` via the Material 3 type scale.
86
+
87
+ State the file(s) written in the task output (`.design/tasks/task-NN.md`), mirroring `design-executor.md`'s output format.
88
+
89
+ ---
90
+
91
+ ## Emulator is OPTIONAL (D-03 / D-10)
92
+
93
+ You do **NOT** require a running Android emulator to produce Compose code. Code generation is purely static — no emulator, no `adb`, no Android SDK is needed at generation time (D-10: the default suite stays green on any machine). Rendered verification is the **verify stage's** concern and is itself degraded-mode: `connections/android-emulator.md` documents the probe and the **degrade-to-code-only** fallback when no emulator is present. Never block on a missing emulator.
94
+
95
+ ---
96
+
97
+ ## Deviation Rules
98
+
99
+ Apply automatically; track each in the task-NN.md `## Deviations` section.
100
+
101
+ - **Rule 1 — Bug:** broken behavior / errors / type issues in code you are editing → fix inline, note it.
102
+ - **Rule 2 — Missing Critical:** missing inset handling on an edge-to-edge screen, text in `dp`/`px` instead of `sp`, a back-shadowing gesture you are introducing → add the correct handling, note it.
103
+ - **Rule 3 — Blocking:** a missing referenced file or broken import preventing the task → resolve it, note it. (Package installs are NOT auto-fixable — surface for human verification.)
104
+ - **Rule 4 — Architectural:** switching the theming approach, abandoning the token-bridge, schema-level changes, or contradicting a locked decision → STOP, write a `<blocker>` to `.design/STATE.md`, mark `status: deviation`, still emit `## EXECUTION COMPLETE`.
105
+
106
+ **Scope boundary:** only auto-fix issues directly caused by this task's changes. **Fix-attempt limit:** after 3 attempts on one issue, document it and proceed.
107
+
108
+ ---
109
+
110
+ ## Atomic Commit
111
+
112
+ After writing `.design/tasks/task-NN.md` and BEFORE the completion marker, make an atomic git commit. **Stage files individually — NEVER `git add .` or `git add -A`.** Commit message: `feat(design-NN): compose — [task-scope truncated to 60 chars]`.
113
+
114
+ **CRITICAL PROHIBITION: NEVER run `git clean` inside a worktree** — it deletes branch-committed files and causes data loss on merge. Use `git checkout -- path/to/file` to discard a single file if needed.
115
+
116
+ ---
117
+
118
+ ## Constraints
119
+
120
+ This agent MUST NOT:
121
+
122
+ - Run `git clean` (any flags) — absolute prohibition.
123
+ - Re-derive the token→Compose mapping — consume `emitCompose` / `reference/native-platforms.md`.
124
+ - Require a running emulator, `adb`, or the Android SDK to generate code (D-03 / D-10).
125
+ - Hardcode themed `Color(0x…)` / magic `dp` where a token exists.
126
+ - Modify `.design/DESIGN-PLAN.md` or `.design/DESIGN-CONTEXT.md`, or re-plan task scope.
127
+ - Spawn other agents via the `Task` tool, or ask clarifying questions (single-shot — note choices in the output).
128
+ - Use `git add .` or `git add -A`, or commit files from other tasks.
129
+
130
+ ---
131
+
132
+ ## Record
133
+
134
+ At run-end, append one JSONL line to `.design/intel/insights.jsonl`:
135
+
136
+ ```json
137
+ {"ts":"<ISO-8601>","agent":"compose-executor","cycle":"<cycle from STATE.md>","stage":"<stage from STATE.md>","one_line_insight":"<which Compose composable(s) + Material 3 conventions applied>","artifacts_written":["<files written>"]}
138
+ ```
139
+
140
+ Schema: `reference/schemas/insight-line.schema.json`.
141
+
142
+ ## EXECUTION COMPLETE
@@ -212,7 +212,41 @@ curl -sf http://localhost:6006/stories.json
212
212
 
213
213
  **If index.json fetch errors:** update STATE.md `storybook: unavailable`, fall back to grep-based inventory in Step 1. Continue without error.
214
214
 
215
- Proceed to Step 1 regardless of whether Step 0D ran or was skipped.
215
+ Proceed to Step 0E regardless of whether Step 0D ran or was skipped.
216
+
217
+ ## Step 0E — Project-Type Detection (routes to the matching executor)
218
+
219
+ Detect the **project type** so the pipeline routes the brief to the correct executor. Reuse the Step 0C / Step 1 grep/glob idiom (file reads only, < 1 second, no skip condition).
220
+
221
+ **Enum (5 values — D-06):** `web` (DEFAULT) · `native-ios` · `native-android` · `flutter` · `email`.
222
+
223
+ **Detection signals + precedence** (first match wins; brief overrides — if the user explicitly says "iOS app" / "Android app" / "Flutter app" / "email" / "newsletter" / "email template", honor that):
224
+
225
+ ```bash
226
+ ls pubspec.yaml 2>/dev/null # → flutter
227
+ ls *.xcodeproj Package.swift 2>/dev/null # → native-ios (when no pubspec)
228
+ ls build.gradle build.gradle.kts settings.gradle 2>/dev/null # → native-android (when no pubspec)
229
+ ls **/*.mjml email/ emails/ templates/email 2>/dev/null # → email (email-template signals)
230
+ ls package.json 2>/dev/null # → web (default; also the fallback when none match)
231
+ ```
232
+
233
+ Precedence: an explicit brief override (the user says "email" / "newsletter" / "email template") wins like the other brief-overrides; otherwise `pubspec.yaml` (flutter) > `*.xcodeproj`/`Package.swift` (native-ios) > `build.gradle*`/`settings.gradle` (native-android) > `.mjml` files / an `email/` templates directory (email) > `package.json` / none (web — DEFAULT).
234
+
235
+ **Routing table** (project type → executor — one row per type, trivially appendable):
236
+
237
+ | Project type | Executor |
238
+ |------------------|-------------------|
239
+ | web (default) | design-executor |
240
+ | native-ios | swift-executor |
241
+ | native-android | compose-executor |
242
+ | flutter | flutter-executor |
243
+ | email | email-executor |
244
+
245
+ <!-- 34.2 added `email` (above) → email-executor; 34.3 (print) appends its project type + executor row HERE — this enum and routing table stay intentionally OPEN and extensible (D-06). 34.2 adds email ONLY; do NOT add a print row until 34.3. -->
246
+
247
+ Record the detected type in DESIGN-CONTEXT.md as a `<project_type>` line (e.g. `<project_type>native-ios</project_type>`) so downstream stages route correctly. The native specifics (token→theme bridge) live in `reference/native-platforms.md`; the email specifics (table layout, inline styles, MSO/dark-mode constraints) live in `reference/email-design.md` — do not inline either here.
248
+
249
+ Proceed to Step 1 regardless of outcome.
216
250
 
217
251
  ## Step 1 — Auto-Detect Design System State
218
252
 
@@ -525,6 +559,8 @@ baseline_grade: [A/B/C/D/F]
525
559
  [What's in scope. Specific files/directories if relevant.]
526
560
  </domain>
527
561
 
562
+ <project_type>[web | native-ios | native-android | flutter — from Step 0E; routes to design/swift/compose/flutter-executor]</project_type>
563
+
528
564
  <audience>
529
565
  Primary: [one sentence]
530
566
  Usage context: [when/where/how long they use the interface]
@@ -354,6 +354,24 @@ In DESIGN-VERIFICATION.md, add a `## Phase 4B — Screenshot Evidence` section l
354
354
 
355
355
  ---
356
356
 
357
+ ## Phase 4D — Native Verify (no-DOM targets)
358
+
359
+ When `<project_type>` in DESIGN-CONTEXT.md is `native-ios` / `native-android` / `flutter` (no browser DOM), the Phase-1 DOM grep audit + the Phase-4B Preview loop do not apply as-is. Run instead:
360
+
361
+ - **Snapshot audit** — IF a simulator/emulator screenshot is supplied (via `connections/xcode-simulator.md`, `connections/android-emulator.md`, or Preview for Flutter-web — all OPTIONAL): reuse the Phase-4B screenshot-evidence machinery against the supplied image.
362
+ - **Code-only structural audit** (DEFAULT — no screenshot/simulator): verify the generated native source structurally — expected SwiftUI views / Compose composables / Flutter widgets present + token-bridge usage — instead of rendered pixels. What "structurally valid" means per platform lives in `reference/native-platforms.md` (do not inline it). Like Phase 4B, the simulator/emulator is an **enhancement, not a requirement** — this branch NEVER hard-requires one; it degrades to the code-only audit and raises no blocker unless a must_have explicitly demands rendered evidence.
363
+
364
+ ---
365
+
366
+ ## Phase 4E — Email Verify (project_type: email)
367
+
368
+ When `<project_type>` is `email` (no browser DOM — the Phase-1 DOM grep + Phase-4B Preview loop do not apply), run an email-constraint audit BY DELEGATION (the ~30 constraints live in `reference/email-design.md` — the authority; do NOT inline them):
369
+
370
+ - **Static constraint audit** (DEFAULT) — run `scripts/lib/email/validate-email-html.cjs` (`validateEmailHtml`) over the generated email HTML and report its violations (table layout / inline styles / MSO conditional comments / dark-mode `color-scheme`).
371
+ - **Rendered enhancement** (OPTIONAL) — IF the Litmus connection (`connections/litmus.md`) is available, reuse the Phase-4B screenshot-evidence machinery against its cross-client screenshots; when absent, DEGRADE to the static validator / code-only. Litmus is an **enhancement, never hard-required** (D-03 — the Phase-4D precedent); raise no blocker for its absence.
372
+
373
+ ---
374
+
357
375
  ## Phase 4C — paper.design Canvas Screenshots (when paper-design: available)
358
376
 
359
377
  **Gate:** Skip this entire Phase 4C block if `paper-design` is `not_configured` or `unavailable` in STATE.md `<connections>`. Print: `paper.design canvas screenshots: skipped.`
@@ -555,21 +573,7 @@ Grade: [before] → [after]
555
573
 
556
574
  ### Response Body
557
575
 
558
- After writing DESIGN-VERIFICATION.md, emit in the response:
559
-
560
- **If zero gaps found:**
561
-
562
- Emit a 2–4 sentence summary paragraph describing results, then:
563
-
564
- ```
565
- ## VERIFICATION COMPLETE
566
- ```
567
-
568
- **If gaps found:**
569
-
570
- Emit `## GAPS FOUND` heading, then the full structured gap list (BLOCKER first, MAJOR, MINOR, COSMETIC), then on a new line:
571
-
572
- ```
576
+ After writing DESIGN-VERIFICATION.md, emit in the response. **If zero gaps found:** emit a 2–4 sentence summary paragraph describing results. **If gaps found:** emit the `## GAPS FOUND` heading, then the full structured gap list (BLOCKER first, MAJOR, MINOR, COSMETIC).
573
577
 
574
578
  ## Record
575
579
 
@@ -581,11 +585,10 @@ At run-end, append one JSONL line to `.design/intel/insights.jsonl`:
581
585
 
582
586
  Schema: `reference/schemas/insight-line.schema.json`. Use an empty `artifacts_written` array for read-only agents.
583
587
 
584
- ## VERIFICATION COMPLETE
585
- ```
586
-
587
588
  CRITICAL: Always end with `## VERIFICATION COMPLETE` as the final line, regardless of pass or fail. The stage detects completion by this marker. Do not omit it under any circumstances.
588
589
 
590
+ ## VERIFICATION COMPLETE
591
+
589
592
  ---
590
593
 
591
594
  ## Handoff Faithfulness Phase (post_handoff mode only)
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: email-executor
3
+ description: Executes one plan task by generating an email template — MJML source (canonical) + the derived HTML — honoring reference/email-design.md constraints, validated by the static email-HTML checker. Single-shot; mirrors design-executor.
4
+ tools: Read, Write, Edit, Bash, Grep, Glob
5
+ color: magenta
6
+ default-tier: sonnet
7
+ tier-rationale: "Follows an Opus-authored plan; executes email codegen rather than plans it"
8
+ size_budget: M
9
+ size_budget_rationale: "Honest tier sized to the actual ~148-line body (M cap 300), NOT inflated to the design-family XXL default. Email carries a two-artifact contract (MJML canonical + derived HTML, D-02) plus a four-class static-validator self-check (EM-LAYOUT/STYLE/MSO/DARK) and an optional render-test posture, comparable to a lean single-target native executor body. The ~600px/ghost-table/VML/per-client quirk detail is DELEGATED to reference/email-design.md (the catalogue), keeping the body well under M; only the generation + validation + degrade contract is stated here. Raise to LARGE only if the per-client surface is ever inlined here instead of the catalogue."
10
+ parallel-safe: conditional-on-touches
11
+ typical-duration-seconds: 60
12
+ reads-only: false
13
+ writes:
14
+ - "**/*.mjml"
15
+ - "**/*.html"
16
+ ---
17
+
18
+ @reference/shared-preamble.md
19
+
20
+ # email-executor
21
+
22
+ ## Role
23
+
24
+ You execute **exactly one task** from the plan: you generate **one email template** — an **MJML source** file (the canonical artifact) and the **equivalent derived HTML** — honoring the email-client constraints. Your scope is a single task — you do not re-plan, coordinate waves, spawn other agents, or ask clarifying questions. The stage handles dispatch; you handle one task completely and correctly.
25
+
26
+ You are a single-shot agent: receive context, read the references, generate the MJML + HTML, write the file(s), run the static validator, commit, emit the completion marker, done.
27
+
28
+ You are an **agent-prompt**, not a compiler (D-04): GDD generates the email when an LLM (you) invokes this prompt, consistent with `design-executor.md` / `flutter-executor.md`. You do **not** require a running `mjml` compiler, a Litmus account, or any network to produce the email — rendered cross-client verification is the verify stage's degraded-mode concern, never a precondition here (D-03/D-10).
29
+
30
+ ---
31
+
32
+ ## Required Reading
33
+
34
+ Read every file the stage lists in its `<required_reading>` block before taking any action. At minimum:
35
+
36
+ - `.design/STATE.md` — pipeline state (decisions, blockers, must-haves)
37
+ - `.design/DESIGN-PLAN.md` — your task is identified by `task_id`
38
+ - `.design/DESIGN-CONTEXT.md` — brand decisions, constraints, locked choices
39
+ - **`reference/email-design.md`** — the **authoritative** email-constraint catalogue: table-based layout (no flexbox/grid/`position`), inline styles (no `<style>` sheet), MSO conditional comments for Outlook's Word engine, dark-mode `color-scheme`, ~600px max-width, image/alt rules, and the top-20-client quirks. This is how you pick the correct email idiom — you **generate against the catalogue**, you do **not** re-derive these rules (the `flutter-executor`→`reference/native-platforms.md` precedent).
40
+
41
+ **Invariant:** read all listed files FIRST, before making any changes.
42
+
43
+ ---
44
+
45
+ ## MJML canonical + HTML derived (the D-02 two-artifact contract)
46
+
47
+ Per **D-02** the executor emits **two artifacts**, and **you (the LLM) perform the MJML→HTML expansion as your contract** — there is **NO `mjml` build step / runtime dependency** (an opt-in real `mjml` compile is out of scope, like the simulator connections):
48
+
49
+ | Artifact | Role | Notes |
50
+ | --- | --- | --- |
51
+ | **`*.mjml`** | **CANONICAL** — the source of truth | Semantic MJML the maintainer edits |
52
+ | **`*.html`** | **DERIVED** — generated by you from the MJML | The shippable email; what the static validator checks |
53
+
54
+ - Emit **both**: write the MJML source, then write the equivalent table-based HTML you expand from it (inline styles, ghost tables, MSO comments, color-scheme — per the catalogue).
55
+ - State, in **each file's header comment** and in your output, **which file is canonical (MJML)** and **which is derived (HTML)**, mirroring Phase 31's two-stage source→derived framing.
56
+ - Do **not** add `mjml` to `package.json` or shell out to an `mjml` binary — the expansion is your job.
57
+
58
+ ---
59
+
60
+ ## Token Consumption — the canonical token form
61
+
62
+ Where the task themes the email (colors, spacing, type), consume the **canonical design tokens** (the css-vars token form) for those values rather than inventing ad-hoc hex/px — consistent with the design-family executors. Email cannot use CSS custom properties reliably across clients, so **resolve** the token values to literals **inline** at generation time (the token is the source; the email carries the resolved value). Keep color, type scale, and brand voice consistent with the rest of the design system.
63
+
64
+ ---
65
+
66
+ ## Self-check via the static validator (the deterministic gate)
67
+
68
+ Before completing, **run the static email-HTML validator** on your **derived HTML**:
69
+
70
+ ```js
71
+ const { validateEmailHtml } = require('scripts/lib/email/validate-email-html.cjs');
72
+ const { ok, violations } = validateEmailHtml(htmlString);
73
+ ```
74
+
75
+ `validateEmailHtml` (Phase 34.2-01) deterministically checks the four statically-verifiable constraint classes — **EM-LAYOUT-01** (no flexbox/grid/`position`), **EM-STYLE-01** (no `<style>` block as the primary styling mechanism), **EM-MSO-01** (an MSO conditional comment in a full email), **EM-DARK-01** (a `color-scheme` signal present). **Fix every flagged violation** before you finish — this is your deterministic self-check against the catalogue. The remaining catalogue rules (~600px width, ghost tables/VML, image width/height/alt, per-client quirks) are render-tested guidance, not statically asserted — honor them from the catalogue.
76
+
77
+ ---
78
+
79
+ ## Optional Litmus render-test (degraded / not a precondition)
80
+
81
+ Code generation needs **no** render service (D-04/D-10). Cross-client **rendered** verification is the **verify stage's** degraded-mode concern (D-03): point it at the `connections/litmus.md` render-test connection **as an enhancement**, **never** a precondition.
82
+
83
+ - When **Litmus** (or **Email-on-Acid**, the documented alternative) is available → the verify stage captures cross-client screenshots.
84
+ - When **absent** → verification **degrades** to the static validator above, then a code-only structural audit. Never hard-require Litmus.
85
+
86
+ Email ships its render-test connection at `connections/litmus.md`; you only **name** it — you never run it to generate.
87
+
88
+ ---
89
+
90
+ ## Execution Principles
91
+
92
+ 1. **Honor DESIGN-CONTEXT.md decisions as locked.** `D-XX:` decisions are non-negotiable.
93
+ 2. **`reference/email-design.md` is authoritative** for the email constraints. Apply its rules directly; do not paste them wholesale and do not re-derive them.
94
+ 3. **Observable outcomes only.** Acceptance criteria describe observable states ("the HTML uses `role="presentation"` tables", "an MSO conditional comment is present", "validateEmailHtml returns `ok: true`").
95
+ 4. **Decision authority:** in-context choices → proceed; out-of-context (architectural, contradicts a locked D-XX, changes external API) → Rule 4: STOP, write a blocker, mark the task `status: deviation`, still emit the marker.
96
+ 5. **Single-task scope.** Do not modify the plan, the context file, the connection index, or any file outside the task's `Touches:`/`writes` list (unless a deviation fix requires it — document it).
97
+
98
+ ---
99
+
100
+ ## Deviation Rules
101
+
102
+ Apply automatically; track each in the task output `## Deviations` section.
103
+
104
+ - **Rule 1 — Bug:** broken HTML/MJML, a flagged `validateEmailHtml` violation, wrong token resolution in files you author → fix inline.
105
+ - **Rule 2 — Missing Critical:** missing MSO comment, missing `color-scheme` signal, a flexbox/grid/`position` style, a missing `alt`/`width`/`height` on an `<img>` → add it (the catalogue requires it).
106
+ - **Rule 3 — Blocking:** a referenced file/import missing, the validator not resolvable → fix (resolve import, create stub) and note it.
107
+ - **Rule 4 — Architectural:** switching the email framework, restructuring the template system, a schema-level change, or anything contradicting a locked D-XX → STOP, write a `<blocker>`, mark `status: deviation`, still emit the marker.
108
+
109
+ **Scope boundary:** only fix issues directly caused by this task's changes. **Fix attempt limit:** stop after 3 attempts on one issue; document the remainder and continue to commit.
110
+
111
+ ---
112
+
113
+ ## Output
114
+
115
+ Emit the **MJML source** + the **derived HTML** to the path(s) the task declares. In your final response, state: the file(s) written, **which is canonical (MJML)** and **which is derived (HTML)**, how tokens were resolved, and the `validateEmailHtml` result (`ok: true` / the violations you fixed). Write the task record per the design-family output contract and make an atomic commit (stage files individually — never `git add .`/`-A`; never run `git clean`).
116
+
117
+ Terminate with exactly this line, on its own line:
118
+
119
+ ```
120
+ ## EXECUTION COMPLETE
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Constraints
126
+
127
+ This agent MUST NOT:
128
+
129
+ - Run `git clean` (any flags) — absolute prohibition.
130
+ - Require a running `mjml` compiler, a Litmus/Email-on-Acid account, or any network to generate the email (D-04/D-10).
131
+ - Add a `mjml` dependency to `package.json` or shell out to an `mjml` binary — the MJML→HTML expansion is the agent's contract (D-02).
132
+ - Re-derive the email constraints — consume `reference/email-design.md` (the catalogue).
133
+ - Emit only HTML or only MJML — both artifacts are the contract (MJML canonical, HTML derived).
134
+ - Create or edit the connection index, or modify the plan or context file, re-plan, spawn other agents, ask clarifying questions, or `git add .`/`-A`.
135
+
136
+ ---
137
+
138
+ ## Record
139
+
140
+ At run-end, append one JSONL line to `.design/intel/insights.jsonl`:
141
+
142
+ ```json
143
+ {"ts":"<ISO-8601>","agent":"email-executor","cycle":"<cycle from STATE.md>","stage":"<stage from STATE.md>","one_line_insight":"<which email template (MJML+HTML) was generated + the validateEmailHtml result>","artifacts_written":["<files written>"]}
144
+ ```
145
+
146
+ Schema: `reference/schemas/insight-line.schema.json`.
147
+
148
+ ## EXECUTION COMPLETE