@hegemonart/get-design-done 1.33.5 → 1.34.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/.claude-plugin/marketplace.json +6 -3
- package/.claude-plugin/plugin.json +5 -2
- package/CHANGELOG.md +48 -0
- package/README.md +14 -0
- package/SKILL.md +1 -0
- package/agents/compose-executor.md +142 -0
- package/agents/design-authority-watcher.md +4 -0
- package/agents/design-context-builder.md +35 -1
- package/agents/design-verifier.md +14 -18
- package/agents/flutter-executor.md +147 -0
- package/agents/swift-executor.md +226 -0
- package/connections/android-emulator.md +107 -0
- package/connections/connections.md +6 -0
- package/connections/openrouter.md +86 -0
- package/connections/xcode-simulator.md +108 -0
- package/hooks/budget-enforcer.ts +103 -0
- package/package.json +3 -2
- package/reference/gdd-threat-model.md +63 -0
- package/reference/native-platforms.md +273 -0
- package/reference/openrouter-tier-mapping.md +98 -0
- package/reference/prices.openrouter.md +26 -0
- package/reference/registry.json +21 -0
- package/scripts/lib/authority-watcher/index.cjs +147 -0
- package/scripts/lib/budget-enforcer.cjs +16 -0
- package/scripts/lib/design-tokens/_native-shared.cjs +206 -0
- package/scripts/lib/design-tokens/compose.cjs +150 -0
- package/scripts/lib/design-tokens/flutter.cjs +128 -0
- package/scripts/lib/design-tokens/index.cjs +13 -0
- package/scripts/lib/design-tokens/swift.cjs +122 -0
- package/scripts/lib/openrouter/catalog-fetcher.cjs +326 -0
- package/scripts/lib/tier-resolver-openrouter.cjs +343 -0
- package/sdk/event-stream/types.ts +24 -2
- package/skills/openrouter-status/SKILL.md +86 -0
|
@@ -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.
|
|
8
|
+
"version": "1.34.1"
|
|
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.
|
|
15
|
+
"version": "1.34.1",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "hegemonart"
|
|
18
18
|
},
|
|
@@ -71,7 +71,10 @@
|
|
|
71
71
|
"agent-sdk",
|
|
72
72
|
"figma",
|
|
73
73
|
"extractor",
|
|
74
|
-
"design-system-sync"
|
|
74
|
+
"design-system-sync",
|
|
75
|
+
"swift",
|
|
76
|
+
"compose",
|
|
77
|
+
"flutter"
|
|
75
78
|
]
|
|
76
79
|
}
|
|
77
80
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-design-done",
|
|
3
3
|
"short_name": "gdd",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.34.1",
|
|
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,10 @@
|
|
|
65
65
|
"cross-session",
|
|
66
66
|
"figma",
|
|
67
67
|
"extractor",
|
|
68
|
-
"design-system-sync"
|
|
68
|
+
"design-system-sync",
|
|
69
|
+
"swift",
|
|
70
|
+
"compose",
|
|
71
|
+
"flutter"
|
|
69
72
|
],
|
|
70
73
|
"skills": [
|
|
71
74
|
"./skills/"
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,54 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.34.1] - 2026-05-31
|
|
8
|
+
|
|
9
|
+
### Phase 34.1 — Non-Web Output Layer: Native Mobile
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **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).
|
|
16
|
+
- **`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.
|
|
17
|
+
- **`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.
|
|
18
|
+
- **`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`).
|
|
19
|
+
- **`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.
|
|
20
|
+
- **`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.
|
|
21
|
+
- **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.
|
|
22
|
+
|
|
23
|
+
### Notes
|
|
24
|
+
|
|
25
|
+
- 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).
|
|
26
|
+
- 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.
|
|
27
|
+
- 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).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [1.33.6] - 2026-05-31
|
|
32
|
+
|
|
33
|
+
### Phase 33.6 — OpenRouter Provider Adapter
|
|
34
|
+
|
|
35
|
+
Adds **OpenRouter** as a tier-resolver provider so users can route any agent's tier (`opus`/`sonnet`/`haiku`) through OpenRouter's aggregator catalog (one API key → Claude/GPT/Llama/Gemini/DeepSeek) **alongside** native provider auth. This introduces the plugin's **first plugin-side outbound REST client** — it lands under the Phase-33.5 audited outbound baseline (the catalog-fetcher's egress is explicitly allowlisted, the outbound CI gate stays green). A decimal release on the v1.33.x arc (CHANGELOG-only, D-01); no new runtime dependency (Node built-in `fetch` only, D-10). OpenRouter is **opt-in alongside** native auth, never OpenRouter-only (D-08).
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **Dynamic OpenRouter catalog fetcher.** `scripts/lib/openrouter/catalog-fetcher.cjs` fetches `https://openrouter.ai/api/v1/models`, maps it into the cache shape, and writes it ATOMICALLY to `.design/cache/openrouter-models.json` (gitignored runtime artifact) with a **24h TTL** skip-if-fresh (D-02, configurable via `.design/config.json#openrouter_catalog_ttl_hours`). The fetch is gated behind an **injectable `fetchImpl`** (default global `fetch`) so the entire default test suite is hermetic — no live network in `npm test` (D-07) — and uses the `sdk/primitives` jittered-backoff + error-classifier + `rate-guard` for bounded transient/rate-limit retry. The `fetch(` egress is allowlisted via `scripts/lib/openrouter/**` in `scripts/security/outbound-allowlist.json`, with a matching egress entry in `reference/gdd-threat-model.md` (D-06). The `OPENROUTER_API_KEY` is sent only as an `Authorization: Bearer` header and is never persisted to the cache.
|
|
40
|
+
- **OpenRouter tier-resolver adapter.** `scripts/lib/tier-resolver-openrouter.cjs` — `resolve(tier) → openrouter-model-id | null` — maps GDD's `opus`/`sonnet`/`haiku` vocabulary (D-04) onto a concrete catalog id via a deterministic closed-vs-open + completion-price heuristic (opus = top closed, sonnet = mid/top-open, haiku = cheap open), with a `.design/config.json#openrouter_tier_overrides` escape hatch that wins verbatim (D-03). Never throws; an absent key / missing cache / unknown tier degrades to `null` so the caller falls back to the native provider via the existing Phase-26 tier-resolver chain (graceful-degrade — D-08). `reference/openrouter-tier-mapping.md` documents the heuristic and is registered in `reference/registry.json` in the same plan that created it (D-11).
|
|
41
|
+
- **OpenRouter connection + status skill.** `connections/openrouter.md` (the Phase-14 connection spec — Setup / Probe Pattern / Tools / Pipeline Integration / Fallback Behavior) and the `/gdd:openrouter-status` skill (`skills/openrouter-status/SKILL.md`) report catalog freshness, the resolved tier→model mapping, and override state.
|
|
42
|
+
- **Optional `cost.update` provider tag (back-compat).** The `cost.update` event payload gains an OPTIONAL `provider` field, set to `'openrouter'` when the adapter resolved the model; absent otherwise. Additive — the events JSON schema is unchanged, so existing consumers are unaffected.
|
|
43
|
+
- **OpenRouter price sub-table + catalog-drift watch.** `reference/prices.openrouter.md` (a catalog-derived view; the dynamic catalog stays the source of truth) and an authority-watcher catalog-drift classifier (`diffOpenRouterCatalog`) that surfaces deprecated/withdrawn models matching `openrouter_tier_overrides` (noise-controlled — new-model / pricing-change are classified but not surfaced).
|
|
44
|
+
- **Regression baseline.** `test/fixtures/baselines/phase-33-6/` freezes the OpenRouter surface — a golden tier-resolution snapshot (the `opus`/`sonnet`/`haiku` ids the adapter resolves from the shared fixture catalog) plus encoded TTL / fallback-no-key / drift-on-synthetic-deprecation expectations — pinned by `test/suite/phase-33-6-baseline.test.cjs` so a future change cannot silently undo the heuristic, the TTL, the graceful-degrade, or the drift classifier.
|
|
45
|
+
|
|
46
|
+
### Notes
|
|
47
|
+
|
|
48
|
+
- **OpenRouter is a tier-RESOLUTION-layer adapter, not an install-registry runtime (D-12).** SC#5's "runtimes.cjs extension" wording is reinterpreted: `scripts/lib/install/runtimes.cjs` is the Phase-24-locked install matrix (how to install GDD *into* a runtime; guarded at exactly 16 entries) — you don't install GDD "into" OpenRouter. OpenRouter lives only in the tier-resolution adapter (`scripts/lib/tier-resolver-openrouter.cjs`), which reads the dynamic catalog rather than the install registry, so it fully delivers SC#5's intent without polluting or weakening the Phase-24 install lock. `install/runtimes.cjs` and its 16-count guard are preserved intact.
|
|
49
|
+
- All Phase 33.6 tests are hermetic (injected stub fetch + a fixture catalog; no network, no real `OPENROUTER_API_KEY`), so the default `npm test` stays green (D-07), and `npm run scan:outbound` stays green with the OpenRouter egress allowlisted (D-06).
|
|
50
|
+
- The 31.5 tarball golden (`test/fixtures/baselines/phase-31-5/tarball-manifest.txt`) was regenerated as a reviewed delta: **+6** shipped OpenRouter files (`connections/openrouter.md`, `reference/openrouter-tier-mapping.md`, `reference/prices.openrouter.md`, `scripts/lib/openrouter/catalog-fetcher.cjs`, `scripts/lib/tier-resolver-openrouter.cjs`, `skills/openrouter-status/SKILL.md`), zero removals (627 paths).
|
|
51
|
+
- 6-manifest lockstep at **v1.33.6** (`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`). Version-sync hygiene done upfront (D-09): `OFF_CADENCE_VERSIONS.add('1.33.6')` + the 14 live-pinned `manifests-version.txt` baselines forward-propagated 1.33.5 → 1.33.6.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
7
55
|
## [1.33.5] - 2026-05-31
|
|
8
56
|
|
|
9
57
|
### Phase 33.5 — GDD Runtime Security Hardening
|
package/README.md
CHANGED
|
@@ -100,6 +100,20 @@ Closes the **outbound** half of multi-runtime: gdd agents now OPTIONALLY delegat
|
|
|
100
100
|
|
|
101
101
|
See [docs/PEER-DELEGATION.md](docs/PEER-DELEGATION.md) for the ops guide (when delegation fires, fallback diagnostics, broker lifecycle, Windows quirks) and [reference/peer-protocols.md](reference/peer-protocols.md) for the ACP + ASP protocol cheat sheet.
|
|
102
102
|
|
|
103
|
+
### OpenRouter provider (v1.33.6, opt-in)
|
|
104
|
+
|
|
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
|
+
|
|
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
|
+
|
|
103
117
|
### Previous releases
|
|
104
118
|
|
|
105
119
|
- **v1.26.0** — Headless Model Resolver (per-runtime tier→model map, `resolved_models` router field, per-runtime price tables, `reasoning-class` runtime-neutral alias).
|
package/SKILL.md
CHANGED
|
@@ -92,6 +92,7 @@ Each stage produces artifacts in `.design/` inside the current project.
|
|
|
92
92
|
| `quality-gate` | `get-design-done:quality-gate` | Phase 25 — parallel lint/type/test/visual command runner; classifies failures via quality-gate-runner agent |
|
|
93
93
|
| `turn-closeout` | `get-design-done:turn-closeout` | Phase 25 — Stop-hook mirror skill; finalizes per-turn STATE blocks and emits closeout events |
|
|
94
94
|
| `bandit-status` | `get-design-done:bandit-status` | Phase 27.5 — read-only diagnostic surface for the bandit posterior; per-(agent, bin, delegate, tier) snapshots (alpha, beta, mean, stddev, count, last-used). Use `/gdd:bandit-reset` to mutate. |
|
|
95
|
+
| `openrouter-status [--refresh]` | `get-design-done:gdd-openrouter-status` | Phase 33.6 — read-only OpenRouter catalog + tier-mapping diagnostic; surfaces catalog freshness (vs 24h TTL), last-fetch, resolved opus/sonnet/haiku → model mappings, per-tier preview. `--refresh` re-fetches (needs `OPENROUTER_API_KEY`). |
|
|
95
96
|
| `peers` | `get-design-done:peers` | Phase 27 — `/gdd:peers` capability matrix command; shows installed peer-CLIs (codex/gemini/cursor/copilot/qwen), allowlist status, claimed roles, posterior delta vs local |
|
|
96
97
|
| `peer-cli-customize` | `get-design-done:peer-cli-customize` | Phase 27 — rewire role→peer mappings on a per-agent basis (edits frontmatter `delegate_to:` directly) |
|
|
97
98
|
| `peer-cli-add` | `get-design-done:peer-cli-add` | Phase 27 — guided ladder for adding a brand-new peer (verification ladder + adapter scaffolding + capability-matrix update) |
|
|
@@ -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
|
|
@@ -115,6 +115,10 @@ Apply the decision table below to each new entry. Emit `{ ...entry, classificati
|
|
|
115
115
|
|
|
116
116
|
The skip row is evaluated LAST and overrides the kind-based row — a component-system release titled "Sponsored: shipping our new sponsor tier" still ends up `skip`.
|
|
117
117
|
|
|
118
|
+
### OpenRouter catalog drift (Phase 33.6, SC#8)
|
|
119
|
+
|
|
120
|
+
Beyond the design-authority feeds above, the **OpenRouter model catalog** (`.design/cache/openrouter-models.json`, fetched by `scripts/lib/openrouter/catalog-fetcher.cjs`) is a **weekly-diff feed**. Diff the prior vs current catalog via `scripts/lib/authority-watcher/index.cjs#diffOpenRouterCatalog(prevModels, currModels, { overrides })`, which classifies each delta as `new-model` / `pricing-change` / `deprecated` / `withdrawn`. To keep the report actionable and quiet, **surface ONLY `deprecated`/`withdrawn` entries whose id matches a configured `.design/config.json#openrouter_tier_overrides` pin** — i.e. the user pinned a model that is going away. `new-model` and `pricing-change` deltas are classified (returned, `surfaced:false`) but never surfaced as alerts (noise control). When OpenRouter is not configured (no catalog), this feed is silently skipped.
|
|
121
|
+
|
|
118
122
|
## Step 6 — Write Snapshot
|
|
119
123
|
|
|
120
124
|
For each feed, merge the newly-fetched entries into `feeds[feed-id].entries`:
|
|
@@ -212,7 +212,39 @@ 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
|
|
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 (4 values — D-06):** `web` (DEFAULT) · `native-ios` · `native-android` · `flutter`.
|
|
222
|
+
|
|
223
|
+
**Detection signals + precedence** (first match wins; brief overrides — if the user explicitly says "iOS app" / "Android app" / "Flutter app", 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 package.json 2>/dev/null # → web (default; also the fallback when none match)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Precedence: `pubspec.yaml` (flutter) > `*.xcodeproj`/`Package.swift` (native-ios) > `build.gradle*`/`settings.gradle` (native-android) > `package.json` / none (web — DEFAULT).
|
|
233
|
+
|
|
234
|
+
**Routing table** (project type → executor — one row per type, trivially appendable):
|
|
235
|
+
|
|
236
|
+
| Project type | Executor |
|
|
237
|
+
|------------------|-------------------|
|
|
238
|
+
| web (default) | design-executor |
|
|
239
|
+
| native-ios | swift-executor |
|
|
240
|
+
| native-android | compose-executor |
|
|
241
|
+
| flutter | flutter-executor |
|
|
242
|
+
|
|
243
|
+
<!-- 34.2 (email) / 34.3 (print) append their project type + executor row here — this enum and routing table are intentionally OPEN and extensible; 34.1 adds the native types ONLY (D-06). Do NOT add email/print rows in 34.1. -->
|
|
244
|
+
|
|
245
|
+
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` — do not inline them here.
|
|
246
|
+
|
|
247
|
+
Proceed to Step 1 regardless of outcome.
|
|
216
248
|
|
|
217
249
|
## Step 1 — Auto-Detect Design System State
|
|
218
250
|
|
|
@@ -525,6 +557,8 @@ baseline_grade: [A/B/C/D/F]
|
|
|
525
557
|
[What's in scope. Specific files/directories if relevant.]
|
|
526
558
|
</domain>
|
|
527
559
|
|
|
560
|
+
<project_type>[web | native-ios | native-android | flutter — from Step 0E; routes to design/swift/compose/flutter-executor]</project_type>
|
|
561
|
+
|
|
528
562
|
<audience>
|
|
529
563
|
Primary: [one sentence]
|
|
530
564
|
Usage context: [when/where/how long they use the interface]
|
|
@@ -354,6 +354,17 @@ 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).
|
|
363
|
+
|
|
364
|
+
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.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
357
368
|
## Phase 4C — paper.design Canvas Screenshots (when paper-design: available)
|
|
358
369
|
|
|
359
370
|
**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 +566,7 @@ Grade: [before] → [after]
|
|
|
555
566
|
|
|
556
567
|
### Response Body
|
|
557
568
|
|
|
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
|
-
```
|
|
569
|
+
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
570
|
|
|
574
571
|
## Record
|
|
575
572
|
|
|
@@ -581,11 +578,10 @@ At run-end, append one JSONL line to `.design/intel/insights.jsonl`:
|
|
|
581
578
|
|
|
582
579
|
Schema: `reference/schemas/insight-line.schema.json`. Use an empty `artifacts_written` array for read-only agents.
|
|
583
580
|
|
|
584
|
-
## VERIFICATION COMPLETE
|
|
585
|
-
```
|
|
586
|
-
|
|
587
581
|
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
582
|
|
|
583
|
+
## VERIFICATION COMPLETE
|
|
584
|
+
|
|
589
585
|
---
|
|
590
586
|
|
|
591
587
|
## Handoff Faithfulness Phase (post_handoff mode only)
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-executor
|
|
3
|
+
description: Executes one plan task by generating Flutter widgets (Dart) with multi-target theme adaptation — Material 3 + Cupertino across web/iOS/Android — from the plan task plus the token-bridge (emitFlutter). Single-shot; mirrors design-executor.
|
|
4
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
color: cyan
|
|
6
|
+
default-tier: sonnet
|
|
7
|
+
tier-rationale: "Follows an Opus-authored plan; executes Flutter codegen rather than plans it"
|
|
8
|
+
size_budget: XXL
|
|
9
|
+
size_budget_rationale: "Flutter is the one cross-platform executor: a single Dart codebase rendering to web, iOS, and Android, so it carries BOTH the Material 3 (ThemeData/ColorScheme/TextTheme) AND the Cupertino (CupertinoThemeData) adaptation contract plus token-bridge consumption — roughly double the per-target surface of swift/compose. Per-platform convention detail is delegated to reference/platforms.md and the token mapping to reference/native-platforms.md to keep the body well under the XXL cap, but the multi-target contract itself (which idiom per target, one bridge → per-target theme) must be explicit here."
|
|
10
|
+
parallel-safe: conditional-on-touches
|
|
11
|
+
typical-duration-seconds: 60
|
|
12
|
+
reads-only: false
|
|
13
|
+
writes:
|
|
14
|
+
- "**/*.dart"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
@reference/shared-preamble.md
|
|
18
|
+
|
|
19
|
+
# flutter-executor
|
|
20
|
+
|
|
21
|
+
## Role
|
|
22
|
+
|
|
23
|
+
You execute **exactly one task** from the plan: you generate **Flutter widgets (Dart)** with **target-appropriate theme adaptation**. 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.
|
|
24
|
+
|
|
25
|
+
You are a single-shot agent: receive context, read the references, generate Dart, write the file(s), commit, emit the completion marker, done.
|
|
26
|
+
|
|
27
|
+
You are an **agent-prompt**, not a compiler (D-04): GDD generates native code when an LLM (you) invokes this prompt, consistent with `design-executor.md`. You do **not** require a running device, simulator, emulator, or the Flutter/Dart SDK to produce code — rendered verification is the verify stage's degraded-mode concern, never a precondition here (D-10).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Required Reading
|
|
32
|
+
|
|
33
|
+
Read every file the stage lists in its `<required_reading>` block before taking any action. At minimum:
|
|
34
|
+
|
|
35
|
+
- `.design/STATE.md` — pipeline state (decisions, blockers, must-haves)
|
|
36
|
+
- `.design/DESIGN-PLAN.md` — your task is identified by `task_id`
|
|
37
|
+
- `.design/DESIGN-CONTEXT.md` — brand decisions, constraints, locked choices
|
|
38
|
+
- **`reference/platforms.md`** — the **authoritative** iOS + Android + Web interaction conventions (navigation, safe areas, gestures, native typography). This is how you pick the **target-appropriate idiom** — Material vs Cupertino — per target.
|
|
39
|
+
- **`reference/native-platforms.md`** — the **authoritative** token→native-code **bridge** spec (the canonical-token → Flutter `ThemeData`/`ColorScheme`/`TextTheme` mapping + the precision contract).
|
|
40
|
+
|
|
41
|
+
**Invariant:** read all listed files FIRST, before making any changes.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Token Consumption — via the bridge, never re-derived
|
|
46
|
+
|
|
47
|
+
Canonical design tokens become Flutter theme primitives through the **34.1-01 token-bridge**, not through ad-hoc conversion you invent. The bridge is:
|
|
48
|
+
|
|
49
|
+
- the spec — `reference/native-platforms.md` (§5 Flutter mapping + §6 precision contract), and
|
|
50
|
+
- the emitter — **`emitFlutter`** from `scripts/lib/design-tokens/` (the Phase-23 facade extended with the Flutter sink, D-02).
|
|
51
|
+
|
|
52
|
+
`emitFlutter(tokenSet)` turns the flat `{ tokens }` map into the Dart `ThemeData`/`ColorScheme`/`TextTheme` constants (colors as `Color(0xAARRGGBB)`, dimensions as logical-px `double`, families as `String`). **You consume that output** — you do **not** re-derive how `#3B82F6` becomes a `Color`. The **same token set** drives every target (one bridge); only the *theme wrapper* differs per target.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## MULTI-TARGET Theme Adaptation (the SC#4 distinctive)
|
|
57
|
+
|
|
58
|
+
Flutter is the one **cross-platform** target — a single Dart codebase rendering to **web, iOS, and Android**. The executor must adapt the **theme per target**, not emit one theme. This is what separates `flutter-executor` from `swift-executor`/`compose-executor` (which each target one platform):
|
|
59
|
+
|
|
60
|
+
| Target | Idiom | Theme from the bridge |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| **Android** (Material) | **Material 3** widgets | `ThemeData(useMaterial3: true)` + `ColorScheme` + `TextTheme` |
|
|
63
|
+
| **Web** (Material) | **Material 3** widgets | `ThemeData(useMaterial3: true)` + `ColorScheme` + `TextTheme` |
|
|
64
|
+
| **iOS** (Cupertino) | **Cupertino** widgets | `CupertinoThemeData` + `CupertinoTextThemeData` |
|
|
65
|
+
|
|
66
|
+
Rules for picking the idiom per target (per `reference/platforms.md`):
|
|
67
|
+
|
|
68
|
+
- **Material targets (Android, web)** → emit **Material 3** (`useMaterial3: true`): `ThemeData` + `ColorScheme` + `TextTheme` fed by the bridge; Material widgets (`Scaffold`, `NavigationBar`, `AppBar`, `FilledButton`).
|
|
69
|
+
- **Cupertino / iOS target** → emit **`CupertinoThemeData`** + Cupertino widgets (`CupertinoPageScaffold`, `CupertinoNavigationBar`, `CupertinoButton`); honor iOS conventions — bottom tab bar (2–5), left-edge back-swipe reservation, SF Pro / system type, safe-area insets.
|
|
70
|
+
- One token set, **per-target theme**: the bridge produces the color/dimension/type primitives once; you wrap them in the **target-appropriate** theme object. When a brief targets multiple platforms, adapt the *navigation, components, and theme* to each platform's idiom while keeping color, type scale, and brand voice consistent (the `platforms.md` "follow the platform for behavior, apply the brand to the visual layer" rule).
|
|
71
|
+
- Use `Platform`/`kIsWeb` (or `Theme.of`/`CupertinoTheme.of`) selection where a single widget tree must adapt at runtime; otherwise emit the target-specific tree the task asks for.
|
|
72
|
+
|
|
73
|
+
State, in the generated code's header comment and in your output, **which target(s)** the file serves and **which idiom** (Material 3 vs Cupertino) it uses.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Execution Principles
|
|
78
|
+
|
|
79
|
+
1. **Honor DESIGN-CONTEXT.md decisions as locked.** `D-XX:` decisions are non-negotiable.
|
|
80
|
+
2. **`reference/platforms.md` + `reference/native-platforms.md` are authoritative** for conventions and the token mapping respectively. Apply their rules directly; do not paste them wholesale.
|
|
81
|
+
3. **Observable outcomes only.** Acceptance criteria describe observable states ("the file emits a `CupertinoThemeData`", "Material targets use `useMaterial3: true`").
|
|
82
|
+
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.
|
|
83
|
+
5. **Single-task scope.** Do not modify the plan, the context file, or any file outside the task's `Touches:`/`writes` list (unless a deviation fix requires it — document it).
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Deviation Rules
|
|
88
|
+
|
|
89
|
+
Apply automatically; track each in the task output `## Deviations` section.
|
|
90
|
+
|
|
91
|
+
- **Rule 1 — Bug:** broken Dart, wrong theme wiring, type errors in files you author → fix inline.
|
|
92
|
+
- **Rule 2 — Missing Critical:** missing safe-area handling, missing per-target idiom, missing `useMaterial3: true` on a Material target, missing `CupertinoThemeData` on the iOS target → add it.
|
|
93
|
+
- **Rule 3 — Blocking:** a referenced file/import missing, the bridge emitter not resolvable → fix (resolve import, create stub) and note it.
|
|
94
|
+
- **Rule 4 — Architectural:** switching state-management approach, restructuring the app shell, schema-level change, or anything contradicting a locked D-XX → STOP, write a `<blocker>`, mark `status: deviation`, still emit the marker.
|
|
95
|
+
|
|
96
|
+
**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.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Verification — degraded / optional (no SDK required)
|
|
101
|
+
|
|
102
|
+
Code generation needs **no** device/SDK (D-04/D-10). Rendered verification is the **verify stage's** degraded-mode concern (D-03) — point it at the **reused** connections, by name, never a precondition here:
|
|
103
|
+
|
|
104
|
+
- **iOS** target → `xcode-simulator` connection (from 34.1-02).
|
|
105
|
+
- **Android** target → `android-emulator` connection (from 34.1-03).
|
|
106
|
+
- **Web** target → the existing **Preview** connection.
|
|
107
|
+
|
|
108
|
+
Flutter ships **no connection doc of its own** — its targets reuse those three. When a connection is absent, verification degrades to snapshot-diff on supplied screenshots, then a code-only structural audit (D-03). Never hard-require a simulator.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Output
|
|
113
|
+
|
|
114
|
+
Emit the Dart Flutter widget(s) + the target-appropriate theme object(s) to the path(s) the task declares. In your final response, state: the file(s) written, the **target(s)** served and the **idiom** used (Material 3 and/or Cupertino), and how the theme was sourced from the bridge (`emitFlutter`). 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`).
|
|
115
|
+
|
|
116
|
+
Terminate with exactly this line, on its own line:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
## EXECUTION COMPLETE
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Constraints
|
|
125
|
+
|
|
126
|
+
This agent MUST NOT:
|
|
127
|
+
|
|
128
|
+
- Run `git clean` (any flags) — absolute prohibition.
|
|
129
|
+
- Require a running device/simulator/emulator or the Flutter/Dart SDK to generate code (D-04/D-10).
|
|
130
|
+
- Re-derive the token→theme mapping — consume the bridge (`emitFlutter` / `reference/native-platforms.md`).
|
|
131
|
+
- Emit a single shared theme for all targets — Material targets get Material 3, the iOS target gets Cupertino (the multi-target contract).
|
|
132
|
+
- Create a connection doc for Flutter or edit the connection index — its targets reuse `xcode-simulator`/`android-emulator`/`Preview`.
|
|
133
|
+
- Modify the plan or context file, re-plan, spawn other agents, ask clarifying questions, or `git add .`/`-A`.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Record
|
|
138
|
+
|
|
139
|
+
At run-end, append one JSONL line to `.design/intel/insights.jsonl`:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{"ts":"<ISO-8601>","agent":"flutter-executor","cycle":"<cycle from STATE.md>","stage":"<stage from STATE.md>","one_line_insight":"<which Flutter widget(s) + target(s)/idiom were generated>","artifacts_written":["<files written>"]}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Schema: `reference/schemas/insight-line.schema.json`.
|
|
146
|
+
|
|
147
|
+
## EXECUTION COMPLETE
|