quiver-cli 1.3.0 → 1.3.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.
Files changed (120) hide show
  1. package/package.json +1 -1
  2. package/template/.agents/skills/agent-browser/SKILL.md +1 -0
  3. package/template/.agents/skills/apps/skybridge/SKILL.md +2 -0
  4. package/template/.agents/skills/data/prisma-cli/SKILL.md +25 -7
  5. package/template/.agents/skills/data/prisma-cli/references/agent-safety.md +27 -0
  6. package/template/.agents/skills/data/prisma-cli/references/complete.md +22 -0
  7. package/template/.agents/skills/data/prisma-cli/references/db-push.md +2 -0
  8. package/template/.agents/skills/data/prisma-cli/references/init.md +3 -0
  9. package/template/.agents/skills/data/prisma-cli/references/mcp.md +2 -1
  10. package/template/.agents/skills/data/prisma-cli/references/migrate-dev.md +1 -1
  11. package/template/.agents/skills/data/prisma-cli/references/migrate-reset.md +2 -0
  12. package/template/.agents/skills/data/prisma-client-api/SKILL.md +1 -1
  13. package/template/.agents/skills/data/prisma-client-api/references/constructor.md +13 -0
  14. package/template/.agents/skills/data/prisma-client-api/references/raw-queries.md +4 -0
  15. package/template/.agents/skills/design/impeccable/SKILL.md +5 -5
  16. package/template/.agents/skills/design/impeccable/reference/android.md +6 -0
  17. package/template/.agents/skills/design/impeccable/reference/animate.md +3 -0
  18. package/template/.agents/skills/design/impeccable/reference/bolder.md +3 -1
  19. package/template/.agents/skills/design/impeccable/reference/craft-floor.md +2 -0
  20. package/template/.agents/skills/design/impeccable/reference/critique.md +23 -5
  21. package/template/.agents/skills/design/impeccable/reference/degraded/asset-producer.md +15 -68
  22. package/template/.agents/skills/design/impeccable/reference/degraded/finish-reviewer.md +13 -12
  23. package/template/.agents/skills/design/impeccable/reference/distill.md +1 -1
  24. package/template/.agents/skills/design/impeccable/reference/doctor.md +1 -0
  25. package/template/.agents/skills/design/impeccable/reference/document.md +1 -1
  26. package/template/.agents/skills/design/impeccable/reference/extract.md +1 -1
  27. package/template/.agents/skills/design/impeccable/reference/hooks.md +17 -11
  28. package/template/.agents/skills/design/impeccable/reference/init.md +9 -3
  29. package/template/.agents/skills/design/impeccable/reference/ios.md +6 -0
  30. package/template/.agents/skills/design/impeccable/reference/new-work.md +69 -29
  31. package/template/.agents/skills/design/impeccable/reference/overdrive.md +1 -1
  32. package/template/.agents/skills/design/impeccable/reference/polish.md +13 -5
  33. package/template/.agents/skills/design/impeccable/reference/quieter.md +1 -1
  34. package/template/.agents/skills/design/impeccable/reference/routing.md +1 -1
  35. package/template/.agents/skills/design/impeccable/reference/visualize.md +21 -22
  36. package/template/.agents/skills/design/impeccable/scripts/build-phase.mjs +1022 -0
  37. package/template/.agents/skills/design/impeccable/scripts/comp-diff.mjs +391 -0
  38. package/template/.agents/skills/design/impeccable/scripts/comp-spec.mjs +513 -0
  39. package/template/.agents/skills/design/impeccable/scripts/concept-seed.mjs +297 -41
  40. package/template/.agents/skills/design/impeccable/scripts/context-signals.mjs +10 -19
  41. package/template/.agents/skills/design/impeccable/scripts/context.mjs +124 -9
  42. package/template/.agents/skills/design/impeccable/scripts/critique-storage.mjs +279 -19
  43. package/template/.agents/skills/design/impeccable/scripts/data/font-index-failures.json +121 -0
  44. package/template/.agents/skills/design/impeccable/scripts/data/font-index.json +1 -0
  45. package/template/.agents/skills/design/impeccable/scripts/detect.mjs +9 -0
  46. package/template/.agents/skills/design/impeccable/scripts/detector/browser/injected/index.mjs +192 -11
  47. package/template/.agents/skills/design/impeccable/scripts/detector/cli/main.mjs +10 -16
  48. package/template/.agents/skills/design/impeccable/scripts/detector/design-system.mjs +339 -11
  49. package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns-browser.js +1482 -722
  50. package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns.mjs +1 -0
  51. package/template/.agents/skills/design/impeccable/scripts/detector/engines/browser/detect-url.mjs +64 -2
  52. package/template/.agents/skills/design/impeccable/scripts/detector/engines/regex/detect-text.mjs +580 -29
  53. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +62 -7
  54. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/detect-html.mjs +31 -7
  55. package/template/.agents/skills/design/impeccable/scripts/detector/node/file-system.mjs +23 -22
  56. package/template/.agents/skills/design/impeccable/scripts/detector/registry/antipatterns.mjs +18 -0
  57. package/template/.agents/skills/design/impeccable/scripts/detector/rules/checks.mjs +471 -370
  58. package/template/.agents/skills/design/impeccable/scripts/detector/shared/color.mjs +474 -2
  59. package/template/.agents/skills/design/impeccable/scripts/detector/shared/constants.mjs +17 -2
  60. package/template/.agents/skills/design/impeccable/scripts/doctor.mjs +14 -21
  61. package/template/.agents/skills/design/impeccable/scripts/embed-prompt.mjs +81 -48
  62. package/template/.agents/skills/design/impeccable/scripts/font-match.mjs +457 -0
  63. package/template/.agents/skills/design/impeccable/scripts/generate-image.mjs +219 -12
  64. package/template/.agents/skills/design/impeccable/scripts/hook-admin.mjs +93 -15
  65. package/template/.agents/skills/design/impeccable/scripts/hook-before-edit.mjs +41 -19
  66. package/template/.agents/skills/design/impeccable/scripts/hook-lib.mjs +507 -117
  67. package/template/.agents/skills/design/impeccable/scripts/hook.mjs +10 -9
  68. package/template/.agents/skills/design/impeccable/scripts/lib/concept-catalog.mjs +40 -1
  69. package/template/.agents/skills/design/impeccable/scripts/lib/design-parser.mjs +120 -82
  70. package/template/.agents/skills/design/impeccable/scripts/lib/font-fingerprint.mjs +564 -0
  71. package/template/.agents/skills/design/impeccable/scripts/lib/font-index.mjs +130 -0
  72. package/template/.agents/skills/design/impeccable/scripts/lib/hero-checks.mjs +246 -0
  73. package/template/.agents/skills/design/impeccable/scripts/lib/image-metrics.mjs +306 -0
  74. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-config.mjs +41 -59
  75. package/template/.agents/skills/design/impeccable/scripts/lib/is-generated.mjs +5 -2
  76. package/template/.agents/skills/design/impeccable/scripts/lib/live-path-globs.mjs +37 -0
  77. package/template/.agents/skills/design/impeccable/scripts/lib/open-system-browser.mjs +26 -0
  78. package/template/.agents/skills/design/impeccable/scripts/lib/png.mjs +281 -0
  79. package/template/.agents/skills/design/impeccable/scripts/lib/raster.mjs +194 -0
  80. package/template/.agents/skills/design/impeccable/scripts/lib/roll-selection.mjs +26 -19
  81. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-deep.mjs +31 -3
  82. package/template/.agents/skills/design/impeccable/scripts/lib/staleness.mjs +93 -17
  83. package/template/.agents/skills/design/impeccable/scripts/lib/surface-briefs.mjs +9 -11
  84. package/template/.agents/skills/design/impeccable/scripts/live/browser-script-parts.mjs +31 -2
  85. package/template/.agents/skills/design/impeccable/scripts/live/project-ignores.mjs +139 -0
  86. package/template/.agents/skills/design/impeccable/scripts/live/svelte-ast.mjs +10 -2
  87. package/template/.agents/skills/design/impeccable/scripts/live/svelte-component.mjs +26 -2
  88. package/template/.agents/skills/design/impeccable/scripts/live/sveltekit-adapter.mjs +15 -27
  89. package/template/.agents/skills/design/impeccable/scripts/live/tanstack-adapter.mjs +4 -25
  90. package/template/.agents/skills/design/impeccable/scripts/live/ui-surfaces.mjs +75 -0
  91. package/template/.agents/skills/design/impeccable/scripts/live-accept.mjs +21 -37
  92. package/template/.agents/skills/design/impeccable/scripts/live-browser-ignores.js +242 -0
  93. package/template/.agents/skills/design/impeccable/scripts/live-browser.js +62 -23
  94. package/template/.agents/skills/design/impeccable/scripts/live-commit-manual-edits.mjs +68 -112
  95. package/template/.agents/skills/design/impeccable/scripts/live-copy-edit-agent.mjs +132 -15
  96. package/template/.agents/skills/design/impeccable/scripts/live-inject.mjs +2 -42
  97. package/template/.agents/skills/design/impeccable/scripts/live-poll.mjs +5 -4
  98. package/template/.agents/skills/design/impeccable/scripts/live-server.mjs +56 -19
  99. package/template/.agents/skills/design/impeccable/scripts/live.mjs +12 -37
  100. package/template/.agents/skills/design/impeccable/scripts/pin.mjs +8 -5
  101. package/template/.agents/skills/design/impeccable/scripts/serve-question.mjs +1006 -155
  102. package/template/.agents/skills/design/shadcn/rules/chat.md +26 -0
  103. package/template/.agents/skills/hono/SKILL.md +17 -3
  104. package/template/.agents/skills/integrations/langfuse/SKILL.md +8 -4
  105. package/template/.agents/skills/integrations/langfuse/references/cli.md +1 -1
  106. package/template/.agents/skills/integrations/langfuse/references/create-dataset.md +35 -0
  107. package/template/.agents/skills/integrations/langfuse/references/error-analysis.md +9 -10
  108. package/template/.agents/skills/integrations/langfuse/references/judge-calibration.md +8 -6
  109. package/template/.agents/skills/integrations/langfuse/references/sdk-upgrade.md +34 -0
  110. package/template/.agents/skills/integrations/langfuse/references/setting-up-evals.md +65 -0
  111. package/template/.agents/skills/integrations/langfuse/references/skill-feedback.md +20 -40
  112. package/template/.agents/skills/integrations/langfuse/references/user-feedback.md +4 -30
  113. package/template/.agents/skills/integrations/langfuse/references/v4-project-migration.md +3 -1
  114. package/template/.agents/skills/supabase/CHANGELOG.md +7 -0
  115. package/template/.agents/skills/supabase/SKILL.md +5 -1
  116. package/template/.agents/skills/writing/humanizer/LICENSE +21 -0
  117. package/template/.agents/skills/writing/humanizer/README.md +209 -0
  118. package/template/.agents/skills/writing/humanizer/SKILL.md +173 -338
  119. package/template/.agents/upstreams.json +21 -22
  120. package/template/.agents/skills/design/impeccable/scripts/live/ui-core.mjs +0 -180
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quiver-cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Compose selected skills, commands, plugins and MCP servers from a central catalog into any repo as native configs for opencode, Claude Code and Codex - with lockfile-based drift awareness.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,6 +32,7 @@ agent-browser skills get slack # Slack workspace automation
32
32
  agent-browser skills get dogfood # Exploratory testing / QA / bug hunts
33
33
  agent-browser skills get derive-client # Record a HAR, derive a standalone API client for a site
34
34
  agent-browser skills get vercel-sandbox # agent-browser inside Vercel Sandbox microVMs
35
+ agent-browser skills get protected-vercel-deployments # Access protected Vercel deployments
35
36
  agent-browser skills get agentcore # AWS Bedrock AgentCore cloud browsers
36
37
  ```
37
38
 
@@ -20,6 +20,8 @@ SPEC.md keeps track of the app's requirements and design decisions. Keep it up t
20
20
 
21
21
  **Migrating from Skybridge `< 0.36.x`?** → Read [migrate-to-v1.md](references/migrate-to-v1.md) first. Users may reference `skybridge >= 0.36.x` as v1.
22
22
 
23
+ **Building an ecommerce app?** → Read [ecommerce.md](references/ecommerce.md) first.
24
+
23
25
  ## Setup
24
26
 
25
27
  1. **Copy template** → [copy-template.md](references/copy-template.md): when starting a new project with ready SPEC.md
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  name: prisma-cli
3
- description: Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, studio, validate, format, debug, and mcp. Use for ORM/database CLI workflows, not Prisma Compute app deployment. For Prisma Compute, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, apps, deployments, logs, or domains, use the `prisma-compute` skill instead. Triggers on "prisma init", "prisma generate", "prisma migrate", "prisma db", "prisma studio", "prisma mcp".
3
+ description: Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, complete, studio, validate, format, debug, and mcp. Use for ORM/database CLI workflows, not the Prisma Platform CLI. Triggers on "prisma init", "prisma generate", "prisma migrate", "prisma db", "prisma complete", "prisma studio", "prisma mcp".
4
4
  license: MIT
5
5
  metadata:
6
6
  author: prisma
7
- version: "7.6.0"
7
+ version: "7.9.1"
8
8
  ---
9
9
 
10
10
  # Prisma CLI Reference
11
11
 
12
12
  Reference for Prisma ORM CLI commands. This skill provides guidance on command usage, options, and best practices for current Prisma ORM releases.
13
13
 
14
- ## Boundary: Compute
14
+ ## Boundary: Platform and Compute
15
15
 
16
- Do not use this skill for Prisma Compute app deployment. Use `prisma-compute` for `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, Compute apps, deployments, logs, domains, and framework deploy readiness.
16
+ Do not confuse the stable ORM command (`prisma`) with the public-beta Platform package (`@prisma/cli`, binary `prisma-cli`). Use `prisma-compute` for Compute apps and workspace auth, and `prisma-postgres` for Platform projects and databases.
17
17
 
18
18
  ## When to Apply
19
19
 
@@ -24,6 +24,7 @@ Reference this skill when:
24
24
  - Managing database state (`prisma db push/pull`)
25
25
  - Using local development database (`prisma dev`)
26
26
  - Debugging Prisma issues (`prisma debug`)
27
+ - Generating shell completions (`prisma complete`)
27
28
 
28
29
  ## Rule Categories by Priority
29
30
 
@@ -34,19 +35,19 @@ Reference this skill when:
34
35
  | 3 | Development | HIGH | `dev` |
35
36
  | 4 | Database | HIGH | `db-` |
36
37
  | 5 | Migrations | CRITICAL | `migrate-` |
37
- | 6 | Utility | MEDIUM | `studio`, `validate`, `format`, `debug`, `mcp` |
38
+ | 6 | Utility | MEDIUM | `complete`, `studio`, `validate`, `format`, `debug`, `mcp` |
38
39
 
39
40
  ## Command Categories
40
41
 
41
42
  | Category | Commands | Purpose |
42
43
  |----------|----------|---------|
43
- | Setup | `init` | Bootstrap new Prisma project |
44
+ | Setup | `init` | Initialize a Prisma project |
44
45
  | Generation | `generate` | Generate Prisma Client |
45
46
  | Validation | `validate`, `format` | Schema validation and formatting |
46
47
  | Development | `dev` | Local Prisma Postgres for development |
47
48
  | Database | `db pull`, `db push`, `db seed`, `db execute` | Direct database operations |
48
49
  | Migrations | `migrate dev`, `migrate deploy`, `migrate reset`, `migrate status`, `migrate diff`, `migrate resolve` | Schema migrations |
49
- | Utility | `studio`, `mcp`, `version`, `debug` | Development and AI tooling |
50
+ | Utility | `complete`, `studio`, `mcp`, `version`, `debug` | Shell, development, and AI tooling |
50
51
 
51
52
  ## Quick Reference
52
53
 
@@ -66,6 +67,7 @@ prisma init --db
66
67
 
67
68
  # Initialize with an example model
68
69
  prisma init --with-model
70
+
69
71
  ```
70
72
 
71
73
  ### Client Generation
@@ -178,8 +180,22 @@ prisma validate
178
180
 
179
181
  # Format schema
180
182
  prisma format
183
+
184
+ # Generate shell completion code
185
+ prisma complete zsh
181
186
  ```
182
187
 
188
+ ## AI Safety Checkpoint
189
+
190
+ Prisma blocks destructive commands when it detects an AI agent until the agent has obtained explicit user consent. This covers `migrate reset`, `db push --force-reset`, and `db push --accept-data-loss`.
191
+
192
+ - Explain the exact data-loss impact and ask for consent immediately before running the command.
193
+ - Do not infer consent from earlier or unrelated messages.
194
+ - If automation needs the consent variable, set `PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION` to the user's exact consent message. Do not invent the text.
195
+ - The Prisma MCP server deliberately has no `migrate-reset` tool.
196
+
197
+ Read `references/agent-safety.md` before any destructive Prisma command.
198
+
183
199
  ## Current Prisma CLI Setup
184
200
 
185
201
  ### New Configuration File
@@ -237,6 +253,8 @@ references/migrate-resolve.md - Migration resolution
237
253
  references/migrate-diff.md - Schema diffing
238
254
  references/studio.md - Database GUI
239
255
  references/mcp.md - Prisma MCP server
256
+ references/complete.md - Shell completion generation
257
+ references/agent-safety.md - AI consent checkpoint for destructive commands
240
258
  references/validate.md - Schema validation
241
259
  references/format.md - Schema formatting
242
260
  references/debug.md - Debug info
@@ -0,0 +1,27 @@
1
+ # AI safety checkpoint for destructive commands
2
+
3
+ Prisma detects common AI-agent environments and blocks these commands until the user gives explicit consent:
4
+
5
+ - `prisma migrate reset`
6
+ - `prisma db push --force-reset`
7
+ - `prisma db push --accept-data-loss`
8
+
9
+ ## Required workflow
10
+
11
+ 1. Inspect the target database/config and explain exactly what can be deleted or reset.
12
+ 2. Ask the user for explicit consent immediately before the action.
13
+ 3. Run the command only after that consent.
14
+
15
+ For an agent-run subprocess, Prisma accepts the exact consent text through:
16
+
17
+ ```bash
18
+ PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION='<exact user consent message>' prisma migrate reset --force
19
+ ```
20
+
21
+ The value must match the user's message exactly and must not contain added quotes or newlines. Never fabricate consent, reuse an old unrelated approval, or bypass the checkpoint by hiding agent-detection environment variables.
22
+
23
+ The MCP server has no `migrate-reset` tool. Use the shell command only after consent.
24
+
25
+ ## Reference
26
+
27
+ - [Prisma ORM 7.9.0 release](https://github.com/prisma/prisma/releases/tag/7.9.0)
@@ -0,0 +1,22 @@
1
+ # prisma complete
2
+
3
+ Prints a shell completion script.
4
+
5
+ ```bash
6
+ prisma complete zsh
7
+ prisma complete bash
8
+ prisma complete fish
9
+ prisma complete powershell
10
+ ```
11
+
12
+ For a direct global CLI installation, load the output using the shell's normal startup mechanism. For example, in zsh:
13
+
14
+ ```bash
15
+ source <(prisma complete zsh)
16
+ ```
17
+
18
+ Prisma also integrates with supported package-manager completion flows. `npx` and `bunx` do not themselves provide completion; invoke the installed binary or the package manager's supported execution form such as `npm exec` or `bun x`.
19
+
20
+ ## Reference
21
+
22
+ - [Prisma ORM 7.9.0 release](https://github.com/prisma/prisma/releases/tag/7.9.0)
@@ -25,6 +25,8 @@ prisma db push [options]
25
25
  | `--config` | Custom path to your Prisma config file |
26
26
  | `--url` | Override the datasource URL from the Prisma config file |
27
27
 
28
+ When Prisma detects an AI agent, `--force-reset` and `--accept-data-loss` require explicit user consent. Follow `agent-safety.md`; never infer or fabricate the consent text.
29
+
28
30
  ### Follow-up Command
29
31
 
30
32
  - Run `prisma generate` explicitly when you need refreshed client output
@@ -34,6 +34,9 @@ bunx --bun prisma init
34
34
  | `--output` | Define Prisma Client generator output path to use | - |
35
35
  | `--preview-feature` | Define a preview feature to use | - |
36
36
  | `--with-model` | Add example model to created schema file | - |
37
+ | `--no-skills` | Skip the best-effort installation of Prisma agent skills | - |
38
+
39
+ `prisma init` attempts to install `prisma/skills` for detected agents. This is best-effort and does not make project initialization fail. Use `--no-skills` in minimal or controlled environments.
37
40
 
38
41
  ## Examples
39
42
 
@@ -30,7 +30,8 @@ prisma mcp
30
30
 
31
31
  - Run this from the project that contains your Prisma schema and `prisma.config.ts`
32
32
  - The command is separate from Prisma Studio and does not open a browser UI
33
- - The MCP server wraps Prisma CLI commands. For exact behavior of commands like `migrate dev` or `migrate reset`, follow the underlying CLI command docs rather than relying only on the MCP tool descriptions.
33
+ - The MCP server exposes `migrate-status`, `migrate-dev`, and Prisma Studio tooling. It does not expose the destructive `migrate-reset` tool; do not claim it is available or try to bypass that safety boundary.
34
+ - For destructive shell commands, follow `agent-safety.md` and obtain explicit user consent.
34
35
 
35
36
  ## References
36
37
 
@@ -31,7 +31,7 @@ prisma migrate dev [options]
31
31
  - Run `prisma generate` explicitly when you need refreshed client output
32
32
  - Run `prisma db seed` explicitly when you need seed data
33
33
 
34
- Note: Prisma CLI help for `7.6.0` still says `migrate dev` "trigger[s] generators", but local verification in a temp Prisma 7.6.0 project did not emit generated client files. Treat `prisma generate` as an explicit follow-up step when you need generated artifacts on disk.
34
+ Run `prisma generate` as an explicit follow-up when you need refreshed generated artifacts. Do not rely on historical CLI help that described generators as part of `migrate dev`.
35
35
 
36
36
  ## Examples
37
37
 
@@ -17,6 +17,8 @@ prisma migrate reset [options]
17
17
 
18
18
  **Warning: All data will be lost.**
19
19
 
20
+ When Prisma detects an AI agent, this command is blocked until the user gives explicit consent. Follow `agent-safety.md`; `--force` skips the ordinary prompt but does not constitute user consent for an agent.
21
+
20
22
  ## Options
21
23
 
22
24
  | Option | Description |
@@ -4,7 +4,7 @@ description: Prisma Client API reference covering model queries, filters, operat
4
4
  license: MIT
5
5
  metadata:
6
6
  author: prisma
7
- version: "7.6.0"
7
+ version: "7.9.1"
8
8
  ---
9
9
 
10
10
  # Prisma Client API Reference
@@ -127,6 +127,19 @@ const prisma = new PrismaClient({
127
127
  })
128
128
  ```
129
129
 
130
+ ### queryPlanCacheMaxSize
131
+
132
+ Use `queryPlanCacheMaxSize` to limit the in-memory query-plan cache:
133
+
134
+ ```typescript
135
+ const prisma = new PrismaClient({
136
+ adapter,
137
+ queryPlanCacheMaxSize: 2_000,
138
+ })
139
+ ```
140
+
141
+ The value must be a non-negative integer. Set it to `0` to disable query-plan caching; omit it to use Prisma's default. Treat this as a process-local memory/performance control, not a database prepared-statement setting.
142
+
130
143
  ## Singleton Pattern
131
144
 
132
145
  Prevent multiple client instances in development:
@@ -192,3 +192,7 @@ const users = await prisma.$queryRaw<Result[]>`
192
192
  `
193
193
  // createdAt is already a Date object
194
194
  ```
195
+
196
+ Invalid JavaScript `Date` values passed to raw queries fail validation instead of being silently serialized as `null`. Validate date input at the application boundary; do not rely on `new Date(badValue)` reaching the database.
197
+
198
+ When a driver adapter returns an unmapped database-specific error, Prisma surfaces `P2039` with the adapter's preserved original code/message. If those details are missing, fix the adapter mapping rather than parsing rendered error text.
@@ -1,24 +1,24 @@
1
1
  ---
2
2
  name: impeccable
3
3
  description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
4
- version: 4.0.4
4
+ version: 4.1.2
5
5
  license: Apache 2.0
6
6
  allowed-tools:
7
7
  - Bash(npx impeccable *)
8
8
  - Bash(node .pi/skills/impeccable/scripts/*)
9
9
  ---
10
10
 
11
- This skill gives you the tools and permission to create design that earns to be called out-of-distribution craft: Whereas before, your design work would have been safe, timid and measured, you now approach every design task as a award-winning design director with impeccable understanding for what makes exceptional design work: production-grade code, peak creativity, a clear POV, deep understanding of the needs of the client and users, and exceptional craft.
11
+ This skill gives you the tools and permission to create design that earns to be called out-of-distribution craft: Whereas before, your design work would have been safe, timid and measured, you now approach every design task as an award-winning design director with impeccable understanding for what makes exceptional design work: production-grade code, peak creativity, a clear POV, deep understanding of the needs of the client and users, and exceptional craft.
12
12
 
13
13
  Core principles:
14
14
  - Go all out. No hedging, no shortcuts. The deliverable must be complete (except assets the user must provide).
15
15
  - Dream big and bold. Distinct, beautiful, outstanding and highly inspiring work.
16
- - Verify in bounded passes, not a loop, and the ceiling covers the whole cycle: screenshots, defect scans, micro-edits, and rebuilds alike. Build fully, inspect once with a batched round (desktop and mobile together), fix everything it shows in one batch, confirm with at most one more round, and stop polishing. Open-ended self-QA burns the user's money doing worse what the finish handoffs do better.
16
+ - Verify in bounded passes, not a loop, and the ceiling covers the whole cycle: screenshots, defect scans, micro-edits, and rebuilds alike. Build fully, inspect once with a batched round (desktop and mobile together on the web; the shipped device classes on a native platform), fix everything it shows in one batch, confirm with at most one more round, and stop polishing. Open-ended self-QA burns the user's money doing worse what the finish handoffs do better.
17
17
 
18
18
  ## Setup
19
19
 
20
- 1. Run `node .pi/skills/impeccable/scripts/context.mjs` once per session (if the runtime shows this skill's loaded base directory, run `node <skill-base-dir>/scripts/context.mjs`; keep cwd at the user's project). Pass a named source file or route as `--target <path>`. It loads PRODUCT.md, DESIGN.md, the matching surface brief, and native-platform guidance when applicable; follow its directives and do not rerun it.
21
- 2. Before acting, load the one playbook that owns the request: the Commands table's reference for an explicit or clearly implied sub-command, or [reference/new-work.md](reference/new-work.md) for a new surface or replacement visual world. Then inspect the target and at least one representative source of incumbent visual truth (tokens, theme, CSS, component, or asset) before editing.
20
+ 1. Run `node <skill-base-dir>/scripts/context.mjs` once per session, where `<skill-base-dir>` is the loaded base directory the runtime reports for this skill; keep cwd at the user's project. That base directory resolves every `node .pi/skills/impeccable/scripts/...` command in this skill and its references, and `.pi/skills/impeccable/scripts` is the fallback only when the runtime reports no base directory. Pass a named source file or route as `--target <path>`. It loads PRODUCT.md, DESIGN.md, the matching surface brief, and native-platform guidance when applicable; follow its directives and do not rerun it.
21
+ 2. Load the request's playbook: its Commands-table reference for an explicit/implied sub-command, or [reference/new-work.md](reference/new-work.md) for a new surface or replacement visual world. Inspect target and incumbent visual truth before editing. When the app cannot run, start with committed visual-regression goldens or screenshot fixtures; verify target and freshness against current tokens, CSS, components, or assets, resolve conflicts, and compare theme/variant captures.
22
22
  3. After analysis and direction are resolved, load [reference/craft-floor.md](reference/craft-floor.md) immediately before editing UI. It carries the quality floor, the absolute bans, and the reflexes no detector catches. Do not load it for planning-only work.
23
23
 
24
24
  ## How to design
@@ -38,3 +38,9 @@ Would a fluent Android user trust this app, or trip on off-spec components? The
38
38
  - **One FAB, one primary action.** Never stack FABs or spend one on a secondary task.
39
39
  - **Snackbars for transient feedback** (actionable when useful, never a toast for that); dialogs only for decisions that must interrupt.
40
40
  - **Material motion patterns.** Container transform, shared-axis, fade-through, with standard easing and durations; honor the system Remove animations setting with a crossfade or instant cut.
41
+
42
+ ## Verifying the build
43
+
44
+ - **Screenshots come from the emulator or a connected device, never a browser.** Build and install, then capture with `adb exec-out screencap -p > <path>` (pick a device with `adb -s <serial>` when several are attached). Capture every device class the app ships to, at least one phone and, when tablets are a target, one tablet, and write the files where the review flow expects them.
45
+ - **Dark theme and font scale belong in the pass.** `adb shell cmd uimode night yes` flips the theme; `adb shell settings put system font_scale 1.3` (restore `1.0` after) catches the clipped labels a fixed layout hides; with several targets attached, the capture's `-s <serial>` goes on these commands too.
46
+ - **Emulators give breadth; gestures, refresh rates, and performance need hardware.** Say which one produced the evidence.
@@ -74,12 +74,15 @@ Keep content visible in the default state so failed scripts do not hide the page
74
74
 
75
75
  Respect autoplay and sound preferences. Any nonessential loop must stop when offscreen or hidden.
76
76
 
77
+ Every web animation needs a `prefers-reduced-motion` path with an intentional alternative. Remove or reduce spatial movement while preserving opacity, color, and state transitions that carry meaning. Reduced motion means fewer and gentler animations, not disabling all motion; feedback that confirms an action should remain legible.
78
+
77
79
  ## Verify
78
80
 
79
81
  - The focal motion is specific to the selected world and surface.
80
82
  - Every supporting animation explains feedback, state, or relationship.
81
83
  - Interruption and repeated use behave correctly.
82
84
  - Desktop, mobile, and keyboard paths remain usable.
85
+ - The `prefers-reduced-motion` path reduces movement without erasing meaningful feedback or state changes.
83
86
  - Expensive effects stay smooth on the target device.
84
87
  - Removing an animation would lose meaning or authored character, not merely decoration.
85
88
 
@@ -1,10 +1,12 @@
1
1
  > **Additional context needed**: which section is the target, and what must stay untouched.
2
2
 
3
+ An open direction round owns the word first: "bolder" said while a direction decision is on the table is the Bolder hand register steer, a fresh deal of foreign forms (see new-work.md), not this command. This command refines a surface whose world already shipped.
4
+
3
5
  "Bolder" is an amplification request, and almost always it is scoped to something that already exists. The surrounding page, its system, and its conventions are the given. Your job is to raise one part to the conviction the rest already implies, without rebuilding anything the brief did not name. The reflex answer, reaching for more effects, is the opposite of bold; reject it first.
4
6
 
5
7
  ## Scope is sovereign
6
8
 
7
- "Everything else stays" is a literal instruction. Touch only the named target. Do not restyle its neighbors, do not migrate the page to a new idea, do not add colors, fonts, radii, shadows, or system primitives the surface does not already own. If the existing system genuinely cannot express the direction, stop and ask the user directly to clarify what you cannot infer. before expanding it, naming the exact addition and the job it would do.
9
+ "Everything else stays" is a literal instruction. Touch only the named target. Do not restyle its neighbors, do not migrate the page to a new idea, do not add colors, fonts, radii, shadows, or system primitives the surface does not already own. If the existing system genuinely cannot express the direction, do not expand it on your own. Ask the user directly to clarify what you cannot infer. Name the exact addition and the job it would do.
8
10
 
9
11
  ## Why it reads flat
10
12
 
@@ -12,6 +12,7 @@ Each of these is a check on the built result, not an intention. Run them togethe
12
12
  - **Type:** body measure 65–75ch, display max 6rem, tracking floor -0.04em, balanced headings, obvious scale and weight steps. Run the real copy at every breakpoint and fix what overflows.
13
13
  - **Motion:** one authored moment, not scattered effects and not one identical entrance on every section. Exponential ease-out from an already-visible default. Reach past transform and opacity: blur, backdrop-filter, clip-path, mask, and shadow belong to the palette when they stay smooth.
14
14
  - **States:** hover, disabled, loading, error, empty. Plus real content, working controls, responsive composition, keyboard focus.
15
+ - **Browser surfaces:** the parts you did not draw still carry the design. Text selection, the caret, custom scrollbars, focus rings, underline offset, and the numerals in tabular data all ship with browser defaults that belong to no design system. Theme them from the palette. This is the cheapest signal that a page was built rather than assembled, and the one models skip most reliably.
15
16
  - **Copy:** the product's own language. Controls name their action; errors name the problem and the recovery.
16
17
  - **Coverage:** every brief requirement present and findable within seconds.
17
18
 
@@ -37,6 +38,7 @@ Surface habits:
37
38
  - Monospace as a costume for "technical" rather than for code, data, or measurement.
38
39
  - A system display face (Impact, Arial Black, the platform sans) as the display voice of an own-world page. Source and self-host a face whose character matches the approved lettering; the closest installed font is a failure, not a fallback.
39
40
  - Unicode glyphs or emoji standing in for an icon system. Icons are drawn, from a real library or authored SVG, in one consistent stroke and weight.
41
+ - Geometric masks standing in for organic contours. A circle, polygon, or radial-gradient cutout approximating a photographic subject's edge is the cheap version of the effect and reads worse than omitting it. Derive an alpha matte from the actual image, or produce a cut-out asset.
40
42
  - Light or dark picked by category. Pick it from the use scene: who, where, under what ambient light.
41
43
 
42
44
  The floor holds the mechanics; it never picks the direction. With every check green, spend the page on the committed world, and when torn between refined and committed, commit.
@@ -1,6 +1,6 @@
1
1
  ### Purpose
2
2
 
3
- Resolve one stable target, run two independent assessments, synthesize a design critique, persist a snapshot, and ask the user what to improve next. The chat response is the primary deliverable; the snapshot is an archive/backlog for future commands.
3
+ Resolve one stable target, run two independent assessments, synthesize a design critique, persist a snapshot, and ask the user what to improve next. The chat response is the primary deliverable; the snapshot is an archive of that run.
4
4
 
5
5
  ### Hard Invariants
6
6
 
@@ -12,6 +12,8 @@ Resolve one stable target, run two independent assessments, synthesize a design
12
12
  - Viewable targets require browser inspection when available.
13
13
  - Any local server started only for critique visualization must run in the background, have a recorded stop method, and be stopped before final reporting unless the user asks to keep it.
14
14
  - Do not claim a user-visible overlay exists unless script injection succeeded and the detector ran in the page.
15
+ - The question is the LAST thing in the response. Write the entire report out first, then ask; nothing follows the question. Prose emitted after a structured question is withheld until the user answers it, so a report written after the question reads as if the critique never ran.
16
+ - A run that ends with neither the targeted questions nor a literal `Questions skipped: <reason>` line is an incomplete run. The report is not the finish; the close is.
15
17
 
16
18
  ### Setup
17
19
 
@@ -82,7 +84,7 @@ After Assessment B returns usable CLI findings, reuse them. Do not rerun `detect
82
84
 
83
85
  Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives.
84
86
 
85
- The chat response is the primary user-facing deliverable. Present the full structured critique below in chat; do not replace it with a summary and a link. The persisted snapshot is only an archive/backlog for later commands.
87
+ The chat response is the primary user-facing deliverable. Present the full structured critique below in chat; do not replace it with a summary and a link. The persisted snapshot is an archive of that run.
86
88
 
87
89
  Structure your feedback as a design director would:
88
90
 
@@ -172,6 +174,14 @@ Provocative questions that might unlock better solutions:
172
174
  - Prioritize ruthlessly. If everything is important, nothing is.
173
175
  - Don't soften criticism. Developers need honest feedback to ship great design.
174
176
 
177
+ ### Deliver the Report
178
+
179
+ Write the full report into the chat response now, before any persistence work. This is the deliverable; everything below it is bookkeeping.
180
+
181
+ Do this first because the alternative is the most common way this command fails: the report gets composed once, straight into the persistence heredoc, and the run ends with a perfect archive nobody has read. Composing it into a file is not delivering it. If the report exists only in `.impeccable/critique/`, the run produced nothing.
182
+
183
+ Persistence is not the end of the run. After it, the response continues with the trend line and the close.
184
+
175
185
  ### Persist the Snapshot
176
186
 
177
187
  Once the report above is finalized, write it to `.impeccable/critique/` so the user can refer back, and so `/impeccable polish` can pick up the priority issues without a copy-paste.
@@ -180,12 +190,14 @@ Skip this step if the Setup slug was null (vague or root-level target).
180
190
 
181
191
  1. **Write the body to a temp file** so you can pipe it to the helper. Use the full critique report (heuristic table, design-specificity verdict, priority issues, persona red flags, minor observations, and questions), but stop before the "Ask the User" / "Recommended Actions" sections that come later.
182
192
 
193
+ This is a copy of the report you already delivered above, for later commands to read. It is not delivery. If you find yourself composing the report for the first time inside this heredoc, you have skipped Deliver the Report; go back and send it.
194
+
183
195
  2. **Pass the structured metadata** through `IMPECCABLE_CRITIQUE_META` (JSON), then run the write command:
184
196
  ```bash
185
197
  IMPECCABLE_CRITIQUE_META='{"target":"<user phrasing>","total_score":<n>,"max_score":<n>,"na_heuristics":"<comma-separated numbers, or empty>","p0_count":<n>,"p1_count":<n>}' \
186
198
  node .pi/skills/impeccable/scripts/critique-storage.mjs write "<resolved target>" <body-file>
187
199
  ```
188
- `max_score` is the applicable maximum from the heuristic table (40 when every heuristic applied), so a later run can tell a renormalized total from a full one. The helper prints the absolute path it wrote.
200
+ `max_score` is the applicable maximum from the heuristic table (40 when every heuristic applied), so a later run can tell a renormalized total from a full one. For a local file target, the helper also records an exact content fingerprint so polish can distinguish the assessed bytes from later edits without relying on Git state or timestamps. The helper prints the absolute path it wrote. Leave that file on disk. Polish closes it; this run does not.
189
201
 
190
202
  3. **Delete the temp body file** after the write attempt completes, whether the write succeeded or failed. If deletion fails, mention `temp-file cleanup failed: <reason>` briefly in the final output, but do not block the critique.
191
203
 
@@ -204,11 +216,15 @@ Skip this step if the Setup slug was null (vague or root-level target).
204
216
 
205
217
  If this is the first run for the slug, the trend is just one score; say so: "First run for this target, no trend yet."
206
218
 
219
+ 6. **Close the run.** Go to Ask the User below and emit the questions, or the `Questions skipped: <reason>` line when the count allows it. The run is not complete until you do. Persistence is bookkeeping and cleanup is not an ending; stopping here leaves the user with a report and no way forward, and leaves `/impeccable polish` with no priorities to inherit.
220
+
207
221
  This is fire-and-forget. Do not show the user the helper's JSON output; only the human-readable trend line and the written path. Failures here should not block the rest of the flow; print the error and move on.
208
222
 
209
223
  ### Ask the User
210
224
 
211
- **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan.
225
+ **After presenting findings**, use targeted questions based on what was actually found. Ask the user directly to clarify what you cannot infer. These answers will shape the action plan.
226
+
227
+ Ask in the same message that carries the report, with the report written out first and the question last. Do not split the two across turns: a turn that ends on the report is a turn that ends, and the questions never arrive. Order within the message is what matters, because prose emitted after a structured question is withheld until the user answers.
212
228
 
213
229
  Ask questions along these lines (adapt to the specific findings; do NOT ask generic questions):
214
230
 
@@ -224,7 +240,9 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene
224
240
  - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions.
225
241
  - Keep it to 2-4 questions maximum. Respect the user's time.
226
242
  - Offer concrete options, not open-ended prompts.
227
- - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions.
243
+ - Skipping is allowed only when the report listed **fewer than 3 Priority Issues**. Count them; do not judge the findings "straightforward" by feel. At 3 or more, the questions are required.
244
+
245
+ **Final-question gate.** The user-visible response must either include the targeted questions or carry the literal line `Questions skipped: <reason>` naming the count that permitted the skip. Each question must include 2-3 concrete answer options tied to the actual critique findings. Do not end with only open-ended questions, and do not end with neither: stopping after the report, having asked nothing and printed no skip line, is the most common way this command fails.
228
246
 
229
247
  ### Recommended Actions
230
248
 
@@ -3,88 +3,35 @@ This harness has no subagent capability, so you are running this role inline. St
3
3
 
4
4
  # Impeccable Asset Producer
5
5
 
6
- You are the asset production agent for Impeccable craft.
7
-
8
- Your job is production cleanup, not new art direction. Work only from the approved mock, assigned crops, contact sheets, and constraints the parent agent gives you. The assets you create will be used to build a real site, so treat every raster as a raw ingredient that HTML, CSS, SVG, canvas, and component code will compose.
6
+ You are the asset production agent for Impeccable craft. Your job is production cleanup, not new art direction. Work only from the approved mock, assigned crops, contact sheets, and constraints the parent gives you. Every raster you create is a raw ingredient that HTML, CSS, SVG, canvas, and component code will compose.
9
7
 
10
8
  ## Core Rule
11
9
 
12
- Do not redesign. Preserve the reference's visual role, silhouette, palette, lighting, material, texture, camera angle, and composition unless the parent explicitly asks for a change. Preserve perspective only when it belongs to the object or scene itself; if CSS should create the card transform, shadow, rounded clipping, border, or layout, remove that presentation chrome from the raster.
10
+ Do not redesign. Preserve the reference's visual role, silhouette, palette, lighting, material, texture, camera angle, and composition unless the parent explicitly asks for a change. Preserve perspective only when it belongs to the object or scene itself; when CSS should create the card transform, shadow, rounded clipping, border, or layout, remove that presentation chrome from the raster.
13
11
 
14
- ## Decision Sketches
12
+ ## Decision Comps
15
13
 
16
- When the parent hands you a decision card packet instead of an approved mock, the job is one sketch: one card, one file, written to the card's declared `sketch` path the moment it renders. The parent runs several of you in parallel, one per card, so your entire contract is this card; generate first, plan never, because the file on disk is the deliverable and the decision page is waiting on it. Work from the card's structured fields and PRODUCT.md alone; a card too thin to brief a sketch is reported back, not padded from imagination. Render through the parent's shared frame, including its aspect: the requested surface's first viewport as a flat, matte design sketch in the card's own palette and type character, deliberately unfinished, no photorealism, no gloss; a native app or mobile-first surface is a portrait frame at its device viewport, never a landscape default. The frame is shared across siblings so no sketch looks more finished than another; a finish gap breaks the comparison. The only legible text is the product's real name and one real headline; greek every other text region into indistinct lines, because an invented spec, price, or date in a sketch is a claim PRODUCT.md never made. Return one line naming the path and any deviation, nothing more. Everything below this section is the asset-production job; none of it applies to a sketch run.
14
+ When the parent hands you a decision card packet instead of an approved mock, the job is one comp: one card, one file, written to the card's declared `comp` path the moment it renders. The parent runs several of you in parallel, one per card, so this card is your entire contract; generate first, plan never, because the file on disk is the deliverable and the decision page is waiting on it. Work from the card's structured fields and PRODUCT.md alone; report a card too thin to brief a comp, never pad it from imagination. Render the card's direction as a north-star comp at full fidelity: the requested surface's first viewport, prompt led by the surface's own structure (regions named in order with their scale relationships, never the world's atmosphere), fully committed in the card's own palette, type character, and material world. A native app or mobile-first surface is a portrait frame at its device viewport, never a landscape default. Every sibling renders at the same full fidelity in its own grammar, one surface, one aspect; equal commitment keeps the comparison honest. Real product name and real content only; never invent commercial claims, prices, benchmarks, or dates PRODUCT.md does not carry. Exclusions bind those claims, never a medium the card's own world has not excluded: a subject that lives in photographs keeps its photographs. Write the prompt sidecar beside the file. Return one line naming the path and any deviation, nothing more. Everything below this section is the asset-production job; none of it applies to a decision-comp run.
17
15
 
18
16
  ## Input Contract
19
17
 
20
- Expect:
21
-
22
- - Approved mock path or screenshot reference.
23
- - Crop paths or a contact sheet with crop ids.
24
- - Output directory.
25
- - Required dimensions, format, transparency needs, and avoid list.
26
- - Notes on what should remain semantic HTML/CSS/SVG instead of raster.
27
-
28
- If the source mock is attached but has no filesystem path, use it for visual planning. Ask for a path only before cropping or writing assets.
29
-
30
- Use defaults unless contradicted:
31
-
32
- - `.webp` for opaque photos, backgrounds, and textures.
33
- - `.png` for transparent cutouts, seals, tickets, and illustrations.
34
- - Target production size or at least 2x display size when dimensions are known. Do not use small full-page mock crop size as the default shipping size.
35
- - Remove UI text, navigation, buttons, labels, and body copy by default.
36
- - Keep physical marks only when the parent says they are part of the asset.
37
- - Remove letterboxing, empty padding, baked card corners, borders, shadows, caption bands, and layout background unless the parent says those pixels are intrinsic to the asset.
38
- - Keep the final assets directory clean: only files the build will consume belong there. Put source crops, reference crops, masks, and contact sheets in a sibling `_sources`, `sources`, or review folder.
39
-
40
- Ask blockers once, globally. Missing source path/crops or output directory blocks production. Exact dimensions, compression targets, retina variants, and format preferences do not block; choose defaults and report them.
41
-
42
- ## Workflow
18
+ Expect the measured spec (`.impeccable/build/spec.json`, written by `comp-spec.mjs` from the approved comp), the approved comp path, and the skill scripts path. Optionally: a subset of region ids to produce, extra prompt notes per region, and format or transparency needs. Everything else you need is in the spec: each raster region's id, kind (plate, image, texture), pixel box, sampled palette, aspect, note, and the plate path it must land on.
43
19
 
44
- 1. Inventory the full approved mock or every assigned crop.
45
- 2. Put each visual role in exactly one bucket:
46
- - `produce`: needs generation, image editing, cleanup, cutout work, or a clean plate before it can ship.
47
- - `direct`: ships after format conversion, compression, or renaming because the parent supplied a real standalone source asset, a project file, stock, or prior production art. A crop from the approved mock is never `direct`, whatever its apparent size.
48
- - `semantic`: build in HTML/CSS/SVG/canvas, no raster output.
49
- 3. Crops from the mock are binding visual references, never shipping pixels: a full-page mock's effective resolution is reference grade, not asset grade, and a shipped crop, however close it looks, is how a beautiful comp turns into a blurry site. Every mock-derived asset goes through `produce` as a clean regeneration.
50
- 4. Give the parent an execution order for the `produce` bucket.
51
- 5. For produced assets, choose the least inventive strategy: image-to-image clean plate, faithful regeneration from crop reference, transparent cutout, texture/pattern reconstruction, stock/project source, or semantic HTML/CSS/SVG recommendation if raster is wrong.
52
- 6. Use the harness's native image tool by default when generation or editing is needed; otherwise use the skill's generate-image.mjs.
20
+ If there is no spec, stop and return one line asking the parent to run `comp-spec.mjs` first. You do not inventory the comp yourself; the spec is the inventory, and a second inventory disagrees with the first.
53
21
 
54
- 7. Remove baked-in UI text, navigation, buttons, body copy, and mock chrome unless the text is part of the asset.
55
- 8. Think through the final DOM/CSS representation before generating. If CSS will own radius, clipping, shadows, borders, perspective, responsive cropping, captions, or card frames, do not bake those into the bitmap.
56
- 9. Save outputs non-destructively in the requested project directory, and leave the intent with the file: after every generation, run `node .pi/skills/impeccable/scripts/embed-prompt.mjs <asset> --prompt "<the prompt used>"` so the prompt is embedded in the image itself, because the build thread composes what you made and needs to know what it is looking at, and the embedding survives copies where sidecars get lost.
57
- 10. Compare each output against its source crop, opening every image by its workspace-relative path; sandboxed viewers reject absolute paths. If a review/QA tool is available, run it before the final manifest, then retry each major/fatal finding once before finalizing.
22
+ ## The job
58
23
 
59
- Use `texture/pattern extraction` only when the source region is already clean enough to sample as texture. If UI, cards, labels, headings, body copy, or footer chrome must be removed to make a reusable texture or background, classify it as crop-derived cleanup or clean-plate work.
24
+ Every region with `medium: raster` in the spec ships as a plate at its `plate` path. A plate is the region regenerated at asset resolution from the comp crop as reference: same subject, same composition, same palette, same lighting and material, with the UI text and page chrome removed, at 1.5x the comp region's pixel size or more. The page draws text, controls, radius, shadow, and layout in code; the plate carries what code cannot draw. Crops from the comp are references, never shipping pixels: a comp is reference grade and a shipped crop is how a beautiful comp becomes a blurry site.
60
25
 
61
- Use `semantic` for dashboards, charts, controls, screenshots of whole UI sections, data widgets, card chrome, app frames, icon toolbars, logos, wordmarks, and anything the final implementation can render crisply in HTML/CSS/SVG/canvas. Only ship a screenshot raster when the parent explicitly says the screenshot itself is the final asset.
26
+ Per region, in the spec's order:
62
27
 
63
- Semantic does not mean ignored. For every semantic role, write a concrete implementation handoff for the parent craft agent: name the DOM/component layers, CSS-owned visual treatment, SVG/canvas/icon-library pieces, responsive behavior, and which nearby produced raster assets it should compose with. For logos and icons, prefer inline SVG/vector or icon-library implementation unless the parent provides a production logo raster.
28
+ 1. `node .pi/skills/impeccable/scripts/comp-spec.mjs --crop <id>` writes the reference crop under `.impeccable/build/crops/`.
29
+ 2. Produce the plate. With the API fallback: `node .pi/skills/impeccable/scripts/generate-image.mjs --plate <id> --quality high` does the whole step (crop as reference, the spec's plate prompt, output size chosen from the region's aspect, the file written to its plate path, prompt embedded, and the plate scored against the crop). With a harness-native image tool: use the crop as the input image and `node .pi/skills/impeccable/scripts/comp-spec.mjs --plate-prompt <id>` as the prompt, write the result to the plate path, then run `node .pi/skills/impeccable/scripts/embed-prompt.mjs <plate> --prompt "<the exact prompt>"`.
30
+ 3. Read the score line. `PLATE-SCORE` under 50%, or a `PLATE-WARN`, means the plate does not read as the region: open the plate beside the crop, name what drifted (subject, framing, palette, style), tighten the prompt with that, and regenerate once. Two misses on one region: keep the better plate, mark it `needs_parent_review`, and say why in one line.
31
+ 4. Transparent cutouts (a figure or object on the page ground): generate on a flat chroma color absent from the subject and key it to alpha before writing the PNG; never ship the keyed background.
64
32
 
65
- ## Prompt Pattern
66
-
67
- Use this shape for image-to-image work:
68
-
69
- ```text
70
- Use the provided crop as the approved visual reference.
71
- Recreate the same asset as a clean reusable production image at the target component aspect ratio and at least 2x display resolution.
72
- Preserve silhouette, object/scene perspective, camera angle, palette, lighting, material, texture, and visual role.
73
- Remove baked-in UI copy, navigation, buttons, labels, body text, watermarks, and mock chrome unless explicitly part of the asset.
74
- Remove letterboxing, padding, card borders, rounded clipping, CSS shadows, perspective transforms, caption bands, and layout backgrounds that the implementation should create in code.
75
- Do not add new objects. Do not change the concept. Do not redesign the composition.
76
- ```
77
-
78
- For transparent cutouts: use true alpha when the tool supports it; otherwise generate on a flat chroma-key color that cannot appear in the subject and post-process that color to alpha before shipping the PNG/WebP. Never ship the keyed background as the final asset.
33
+ Do not redesign. Do not add objects, restyle, or reinterpret; the comp was approved as it is. Do not touch the page code, the spec, or the comp. Do not produce anything the spec does not list; a region the parent forgot goes back as a one-line note, not a plate.
79
34
 
80
35
  ## Output Contract
81
36
 
82
- Return a complete manifest, grouped by `produce`, `direct`, and `semantic`. For each asset include: `id`, `source_crop`, `output_path` when applicable, `strategy`, `prompt_used` when applicable, `dimensions`, `format`, `transparency`, `deviations`, and `qa_status`.
83
-
84
- For each semantic row include `id`, `implementation`, `notes`, and `qa_status`. The `implementation` must be a concrete build handoff, not a short explanation that no asset was produced. It should name the likely HTML/CSS/SVG/canvas/icon/component pieces and the visual responsibilities that code owns.
85
-
86
- `qa_status` must be `accepted`, `needs_parent_review`, or `blocked`. Use `accepted` only after visual comparison passes. Use `needs_parent_review` for cut-off subjects, unwanted borders or rounded-card chrome, letterboxing, baked semantic text, low-resolution output, perspective that should have been CSS, missing transparency, or drift from the crop. Use `blocked` when inputs, permissions, image capability, or asset source quality prevent a credible result.
87
-
88
- End with `execution_order`, `blockers`, and `assumptions` sections. Keep blockers global and minimal. Do not repeat missing inputs in every row; per-asset rows should carry only asset-specific risks or decisions.
89
-
90
- Do not modify implementation code. Do not edit the approved mock. Do not produce final page copy. The parent craft agent owns implementation and final mock fidelity.
37
+ Return one line per raster region: `<id> <plate path> <WxH> <score>% <accepted|needs_parent_review|blocked> <one-line note or ->`. Then `blockers` (missing spec, missing comp, no image capability, exhausted key) and `assumptions`, each global and minimal. Nothing else: no summary, no praise, no implementation advice. The parent runs `build-phase.mjs advance` to verify the plates against the same spec; your line and its line must agree.