@prestyj/cli 5.28.1 → 5.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/motion/bin/contact-sheet.mjs +9 -3
- package/assets/motion/bin/cues.mjs +337 -0
- package/assets/motion/bin/library.mjs +53 -10
- package/assets/motion/bin/motion-blur.mjs +943 -0
- package/assets/motion/bin/motion-check.mjs +354 -3
- package/assets/motion/bin/music-fit.mjs +436 -0
- package/assets/motion/bin/pdf-extract.mjs +22 -10
- package/assets/motion/bin/reference-study.mjs +346 -0
- package/assets/motion/bin/score-synth.mjs +1052 -93
- package/assets/motion/library/README.md +50 -14
- package/assets/motion/library/kit/moves.js +1981 -0
- package/assets/motion/library/library.json +232 -0
- package/assets/motion/library/pieces/camera-rig/meta.json +13 -0
- package/assets/motion/library/pieces/camera-rig/piece.html +153 -0
- package/assets/motion/library/pieces/camera-rig/preview.jpg +0 -0
- package/assets/motion/library/pieces/chain-knock/meta.json +13 -0
- package/assets/motion/library/pieces/chain-knock/piece.html +195 -0
- package/assets/motion/library/pieces/chain-knock/preview.jpg +0 -0
- package/assets/motion/library/pieces/gather-to-logo/meta.json +13 -0
- package/assets/motion/library/pieces/gather-to-logo/piece.html +159 -0
- package/assets/motion/library/pieces/gather-to-logo/preview.jpg +0 -0
- package/assets/motion/library/pieces/morph-carry/meta.json +13 -0
- package/assets/motion/library/pieces/morph-carry/piece.html +173 -0
- package/assets/motion/library/pieces/morph-carry/preview.jpg +0 -0
- package/assets/motion/library/pieces/one-shape-journey/meta.json +13 -0
- package/assets/motion/library/pieces/one-shape-journey/piece.html +195 -0
- package/assets/motion/library/pieces/one-shape-journey/preview.jpg +0 -0
- package/assets/motion/library/pieces/open-from-subject/meta.json +13 -0
- package/assets/motion/library/pieces/open-from-subject/piece.html +168 -0
- package/assets/motion/library/pieces/open-from-subject/preview.jpg +0 -0
- package/assets/motion/library/pieces/request-to-result/meta.json +13 -0
- package/assets/motion/library/pieces/request-to-result/piece.html +212 -0
- package/assets/motion/library/pieces/request-to-result/preview.jpg +0 -0
- package/assets/motion/library/pieces/scale-dive/meta.json +13 -0
- package/assets/motion/library/pieces/scale-dive/piece.html +321 -0
- package/assets/motion/library/pieces/scale-dive/preview.jpg +0 -0
- package/assets/motion/library/pieces/screen-replica-steps/meta.json +13 -0
- package/assets/motion/library/pieces/screen-replica-steps/piece.html +366 -0
- package/assets/motion/library/pieces/screen-replica-steps/preview.jpg +0 -0
- package/assets/motion/library/pieces/zoom-into-card/meta.json +13 -0
- package/assets/motion/library/pieces/zoom-into-card/piece.html +179 -0
- package/assets/motion/library/pieces/zoom-into-card/preview.jpg +0 -0
- package/assets/motion/library/sheets/diagram.jpg +0 -0
- package/assets/motion/library/sheets/frame.jpg +0 -0
- package/assets/motion/library/sheets/transition.jpg +0 -0
- package/assets/motion/library/sheets/ui.jpg +0 -0
- package/assets/motion/references/build-sheet.md +206 -0
- package/assets/motion/references/runtime/determinism-rules.md +1 -1
- package/assets/motion/references/runtime/gsap-easing-and-stagger.md +29 -29
- package/assets/motion/references/runtime/inputs-and-assets.md +7 -12
- package/assets/motion/references/runtime/lint-validate-inspect.md +3 -3
- package/assets/motion/references/runtime/minimal-composition.md +1 -1
- package/assets/motion/references/runtime/preview-render.md +3 -3
- package/assets/motion/skills/app-walkthrough/SKILL.md +66 -0
- package/assets/motion/skills/before-after/SKILL.md +53 -0
- package/assets/motion/skills/brand-kit/SKILL.md +3 -3
- package/assets/motion/skills/dev-tool-video/SKILL.md +57 -0
- package/assets/motion/skills/launch-video/SKILL.md +62 -0
- package/assets/motion/skills/match-reference/SKILL.md +58 -0
- package/assets/motion/skills/motion/SKILL.md +78 -85
- package/assets/motion/skills/source-ingest/SKILL.md +17 -6
- package/assets/motion/skills/website-video/SKILL.md +59 -0
- package/assets/skills/bulletproof/SKILL.md +36 -11
- package/assets/skills/bulletproof/references/agent-surface.md +19 -9
- package/assets/skills/bulletproof/references/audit-protocol.md +20 -5
- package/assets/skills/bulletproof/references/platform-playbooks.md +5 -4
- package/assets/skills/bulletproof/references/provenance.md +26 -1
- package/assets/skills/bulletproof/references/secure-defaults.md +6 -5
- package/assets/skills/bulletproof/references/supply-chain.md +21 -17
- package/assets/skills/bulletproof/references/threat-landscape.md +28 -26
- package/assets/skills/bulletproof/references/verification.md +2 -0
- package/assets/skills/clarify/SKILL.md +25 -16
- package/assets/skills/code-review/SKILL.md +71 -13
- package/assets/skills/code-review/references/agent-diffs.md +27 -0
- package/assets/skills/code-review/references/tests.md +19 -0
- package/assets/skills/compliance-guard/SKILL.md +20 -5
- package/assets/skills/compliance-guard/references/artifacts.md +1 -1
- package/assets/skills/compliance-guard/references/eu-uk.md +16 -16
- package/assets/skills/compliance-guard/references/lawsuit-vectors.md +5 -5
- package/assets/skills/compliance-guard/references/provenance.md +41 -2
- package/assets/skills/compliance-guard/references/sector-gates.md +3 -3
- package/assets/skills/compliance-guard/references/security-baseline.md +2 -2
- package/assets/skills/compliance-guard/references/trigger-map.md +5 -5
- package/assets/skills/compliance-guard/references/us.md +27 -21
- package/assets/skills/durable/SKILL.md +87 -79
- package/assets/skills/durable/references/agent-db-safety.md +69 -0
- package/assets/skills/durable/references/backups-and-runtime.md +19 -12
- package/assets/skills/durable/references/migrations-and-schema.md +13 -6
- package/assets/skills/evidence-led-ui/SKILL.md +69 -127
- package/assets/skills/evidence-led-ui/references/anti-defaults.md +107 -208
- package/assets/skills/evidence-led-ui/references/direction.md +124 -0
- package/assets/skills/evidence-led-ui/references/production-contract.md +8 -0
- package/assets/skills/evidence-led-ui/references/provenance.md +24 -1
- package/assets/skills/lean/SKILL.md +90 -71
- package/assets/skills/lean/references/memory-and-processes.md +3 -2
- package/assets/skills/lean/references/playbooks.md +37 -12
- package/assets/skills/refactoring/SKILL.md +24 -3
- package/assets/skills/refactoring/references/agent-pitfalls.md +4 -1
- package/assets/skills/refactoring/references/legacy.md +21 -0
- package/assets/skills/root-cause/SKILL.md +20 -10
- package/assets/skills/shared-language/SKILL.md +16 -14
- package/assets/skills/tdd/SKILL.md +27 -15
- package/dist/app-sidecar.js +203 -47
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.js +17 -26
- package/dist/cli.js.map +1 -1
- package/dist/core/acceptance-checks.d.ts +48 -0
- package/dist/core/acceptance-checks.js +144 -0
- package/dist/core/acceptance-checks.js.map +1 -0
- package/dist/core/agent-session.d.ts +106 -72
- package/dist/core/agent-session.js +539 -399
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agents.d.ts +6 -5
- package/dist/core/agents.js.map +1 -1
- package/dist/core/ask-user.d.ts +90 -8
- package/dist/core/ask-user.js +124 -13
- package/dist/core/ask-user.js.map +1 -1
- package/dist/core/bundled-agents.js +1 -3
- package/dist/core/bundled-agents.js.map +1 -1
- package/dist/core/cache-diagnostics.d.ts +68 -0
- package/dist/core/cache-diagnostics.js +196 -0
- package/dist/core/cache-diagnostics.js.map +1 -0
- package/dist/core/cache-expiry.d.ts +87 -0
- package/dist/core/cache-expiry.js +111 -0
- package/dist/core/cache-expiry.js.map +1 -0
- package/dist/core/compaction/compactor.js +78 -48
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/plan-step-policy.d.ts +46 -0
- package/dist/core/compaction/plan-step-policy.js +57 -0
- package/dist/core/compaction/plan-step-policy.js.map +1 -0
- package/dist/core/destructive-git-guard.d.ts +90 -0
- package/dist/core/destructive-git-guard.js +871 -0
- package/dist/core/destructive-git-guard.js.map +1 -0
- package/dist/core/event-bus.d.ts +3 -0
- package/dist/core/event-bus.js +5 -0
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/injection-detect.d.ts +38 -0
- package/dist/core/injection-detect.js +232 -0
- package/dist/core/injection-detect.js.map +1 -0
- package/dist/core/keep-awake.d.ts +88 -0
- package/dist/core/keep-awake.js +251 -0
- package/dist/core/keep-awake.js.map +1 -0
- package/dist/core/mcp/client.d.ts +72 -0
- package/dist/core/mcp/client.js +264 -41
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/content.js +6 -2
- package/dist/core/mcp/content.js.map +1 -1
- package/dist/core/mcp/store.d.ts +6 -1
- package/dist/core/mcp/store.js +12 -1
- package/dist/core/mcp/store.js.map +1 -1
- package/dist/core/mcp/types.d.ts +18 -0
- package/dist/core/model-unavailable.d.ts +14 -0
- package/dist/core/model-unavailable.js +23 -0
- package/dist/core/model-unavailable.js.map +1 -0
- package/dist/core/node-debugger.d.ts +148 -0
- package/dist/core/node-debugger.js +642 -0
- package/dist/core/node-debugger.js.map +1 -0
- package/dist/core/package-threats.d.ts +18 -0
- package/dist/core/package-threats.js +168 -0
- package/dist/core/package-threats.js.map +1 -0
- package/dist/core/persistent-shell.d.ts +58 -6
- package/dist/core/persistent-shell.js +331 -49
- package/dist/core/persistent-shell.js.map +1 -1
- package/dist/core/process-manager.d.ts +14 -0
- package/dist/core/process-manager.js +61 -0
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/progress/git-xp.js +8 -14
- package/dist/core/progress/git-xp.js.map +1 -1
- package/dist/core/session-history.d.ts +12 -0
- package/dist/core/session-history.js +27 -0
- package/dist/core/session-history.js.map +1 -1
- package/dist/core/session-manager.d.ts +13 -1
- package/dist/core/session-manager.js +38 -18
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-summary-index.d.ts +37 -0
- package/dist/core/session-summary-index.js +172 -0
- package/dist/core/session-summary-index.js.map +1 -0
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.js +10 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/shell-threats-popular-packages.d.ts +11 -0
- package/dist/core/shell-threats-popular-packages.js +675 -0
- package/dist/core/shell-threats-popular-packages.js.map +1 -0
- package/dist/core/shell-threats.d.ts +8 -0
- package/dist/core/shell-threats.js +186 -0
- package/dist/core/shell-threats.js.map +1 -0
- package/dist/core/skills.js +3 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/stream-rules.d.ts +30 -0
- package/dist/core/stream-rules.js +151 -0
- package/dist/core/stream-rules.js.map +1 -0
- package/dist/core/subagent-manager.d.ts +20 -5
- package/dist/core/subagent-manager.js +22 -8
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/subagent-receipt.d.ts +54 -0
- package/dist/core/subagent-receipt.js +276 -0
- package/dist/core/subagent-receipt.js.map +1 -0
- package/dist/core/subagent-turn-record.d.ts +2 -0
- package/dist/core/subagent-turn-record.js.map +1 -1
- package/dist/core/test-impact.d.ts +73 -0
- package/dist/core/test-impact.js +467 -0
- package/dist/core/test-impact.js.map +1 -0
- package/dist/core/thinking-level.d.ts +1 -1
- package/dist/core/thinking-level.js +1 -1
- package/dist/core/thinking-level.js.map +1 -1
- package/dist/core/verification-gate.d.ts +2 -0
- package/dist/core/verification-gate.js +4 -0
- package/dist/core/verification-gate.js.map +1 -1
- package/dist/core/verification-snapshot.js +3 -5
- package/dist/core/verification-snapshot.js.map +1 -1
- package/dist/core/workspace-guard.d.ts +18 -7
- package/dist/core/workspace-guard.js +227 -60
- package/dist/core/workspace-guard.js.map +1 -1
- package/dist/interactive.js +2 -1
- package/dist/interactive.js.map +1 -1
- package/dist/modes/subagent-worker-mode.js +34 -6
- package/dist/modes/subagent-worker-mode.js.map +1 -1
- package/dist/motion-agent/motion-agent.d.ts +6 -2
- package/dist/motion-agent/motion-agent.js +5 -7
- package/dist/motion-agent/motion-agent.js.map +1 -1
- package/dist/motion-agent/motion-prompt.d.ts +1 -1
- package/dist/motion-agent/motion-prompt.js +14 -19
- package/dist/motion-agent/motion-prompt.js.map +1 -1
- package/dist/motion-agent/motion-review.d.ts +10 -3
- package/dist/motion-agent/motion-review.js +15 -7
- package/dist/motion-agent/motion-review.js.map +1 -1
- package/dist/motion-agent/motion-studio-context.js +1 -1
- package/dist/motion-agent/motion-studio-context.js.map +1 -1
- package/dist/system-prompt.js +3 -1
- package/dist/system-prompt.js.map +1 -1
- package/dist/test-support/keep-alive.d.ts +14 -0
- package/dist/test-support/keep-alive.js +17 -0
- package/dist/test-support/keep-alive.js.map +1 -0
- package/dist/tools/ask-user.js +3 -3
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/bash-read-evidence.d.ts +10 -0
- package/dist/tools/bash-read-evidence.js +133 -0
- package/dist/tools/bash-read-evidence.js.map +1 -0
- package/dist/tools/bash.d.ts +10 -1
- package/dist/tools/bash.js +115 -7
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/debug.d.ts +54 -0
- package/dist/tools/debug.js +233 -0
- package/dist/tools/debug.js.map +1 -0
- package/dist/tools/edit.js +12 -4
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/goals.d.ts +1 -1
- package/dist/tools/index.d.ts +19 -2
- package/dist/tools/index.js +47 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.js +2 -0
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read-tracker.d.ts +5 -0
- package/dist/tools/read-tracker.js +19 -9
- package/dist/tools/read-tracker.js.map +1 -1
- package/dist/tools/read.js +3 -2
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/skill.js +5 -0
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/subagent-control.js +44 -8
- package/dist/tools/subagent-control.js.map +1 -1
- package/dist/tools/subagent-shared.d.ts +29 -8
- package/dist/tools/subagent-shared.js +45 -14
- package/dist/tools/subagent-shared.js.map +1 -1
- package/dist/tools/subagent.d.ts +8 -2
- package/dist/tools/subagent.js +28 -10
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/task-output.js +3 -2
- package/dist/tools/task-output.js.map +1 -1
- package/dist/tools/task-send.d.ts +1 -1
- package/dist/tools/task-send.js +15 -1
- package/dist/tools/task-send.js.map +1 -1
- package/dist/tools/tool-tiers.d.ts +2 -2
- package/dist/tools/tool-tiers.js +3 -2
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/truncate.d.ts +21 -0
- package/dist/tools/truncate.js +187 -0
- package/dist/tools/truncate.js.map +1 -1
- package/dist/tools/ui-adopt.js +2 -0
- package/dist/tools/ui-adopt.js.map +1 -1
- package/dist/ui/App.d.ts +0 -4
- package/dist/ui/App.js +5 -28
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +1 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +1 -8
- package/dist/ui/hooks/useAgentLoop.js +1 -119
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/render.d.ts +0 -4
- package/dist/ui/render.js +0 -2
- package/dist/ui/render.js.map +1 -1
- package/dist/utils/git.d.ts +77 -0
- package/dist/utils/git.js +285 -21
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/github-ci.js +2 -1
- package/dist/utils/github-ci.js.map +1 -1
- package/dist/utils/github.js +11 -9
- package/dist/utils/github.js.map +1 -1
- package/dist/utils/image.d.ts +14 -0
- package/dist/utils/image.js +16 -0
- package/dist/utils/image.js.map +1 -1
- package/dist/utils/process.d.ts +20 -0
- package/dist/utils/process.js +98 -0
- package/dist/utils/process.js.map +1 -1
- package/package.json +5 -5
- package/assets/motion/references/motion-language.md +0 -128
- package/assets/motion/skills/video-qa/SKILL.md +0 -89
- package/dist/core/ideal-review-subagent.d.ts +0 -56
- package/dist/core/ideal-review-subagent.js +0 -112
- package/dist/core/ideal-review-subagent.js.map +0 -1
- package/dist/core/ideal-review.d.ts +0 -82
- package/dist/core/ideal-review.js +0 -242
- package/dist/core/ideal-review.js.map +0 -1
- package/dist/motion-agent/motion-check-tool.d.ts +0 -35
- package/dist/motion-agent/motion-check-tool.js +0 -514
- package/dist/motion-agent/motion-check-tool.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Durable — backups, recovery & runtime data safety
|
|
2
2
|
|
|
3
|
-
Load for any backup, recovery, or runtime finding. `SNAPSHOT` = sourced
|
|
3
|
+
Load for any backup, recovery, or runtime finding. `SNAPSHOT` = sourced 3 October 2026 — provider tiers and defaults change often; verify before asserting.
|
|
4
|
+
|
|
5
|
+
Contents: Part 1 — RPO/RTO, tiers, provider snapshot, restore drill, uploads. Part 2 — idempotency/outbox, poolers, SQLite, atomic files.
|
|
4
6
|
|
|
5
7
|
## Part 1 — Backups & recovery
|
|
6
8
|
|
|
@@ -20,19 +22,24 @@ Pick both consciously; they dictate the tier. An app where users type for hours
|
|
|
20
22
|
|
|
21
23
|
**3-2-1 floor**: at least 3 copies, 2 different media/systems, 1 off-site (different provider or account is fine). A dump cron writing to the same VPS is one disk failure from zero.
|
|
22
24
|
|
|
23
|
-
### Managed-provider baselines (`SNAPSHOT`
|
|
25
|
+
### Managed-provider baselines (`SNAPSHOT` 3 Oct 2026 — verify the project's actual settings before quoting)
|
|
24
26
|
|
|
25
|
-
| Provider | What
|
|
27
|
+
| Provider | What the docs say |
|
|
26
28
|
|---|---|
|
|
27
|
-
| Supabase |
|
|
28
|
-
| Neon |
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
29
|
+
| Supabase | Daily backups: Pro 7 days, Team 14, Enterprise up to 30. PITR is a paid **add-on** (Pro+, needs at least Small compute). Backups exclude Storage objects — restoring does not bring back deleted files. Custom-role passwords not in daily backups |
|
|
30
|
+
| Neon | Restore window (WAL history) powers instant restore, time travel, and branching from the past: Free capped at 6 hours (1 GB); Launch default 1 day, max 7; Scale default 1 day, max 30 |
|
|
31
|
+
| PlanetScale Postgres | Scheduled + on-demand backups and PITR via WAL archiving; check the branch's schedule |
|
|
32
|
+
| AWS RDS | Retention 0–35 days; default 1 day via API/CLI, 7 days via console. 0 disables automated backups and PITR |
|
|
33
|
+
| Cloudflare D1 | Time Travel always on: restore to any minute in the last 30 days |
|
|
34
|
+
| Turso | PITR: Free 24 hours; Developer 10, Scaler 30, Pro 90 days; deleted DBs restorable up to 5 days on paid plans |
|
|
35
|
+
| Firestore | Without PITR, version retention is 1 hour; enabling PITR gives 7 days. Scheduled exports for longer history |
|
|
36
|
+
| MongoDB Atlas | Cloud backups / continuous backup by cluster tier — not verified this snapshot; check the cluster's backup policy |
|
|
37
|
+
|
|
38
|
+
Not re-verified this snapshot (removed): Crunchy Bridge numbers. Aurora: same 1–35 day continuous backup model as RDS — confirm per cluster.
|
|
32
39
|
|
|
33
40
|
The recurring failure: the free tier's weekly backup or none at all, assumed to be PITR because the marketing page said "backups". Check the project's actual settings, not the provider's homepage.
|
|
34
41
|
|
|
35
|
-
**Self-hosted Postgres**: pgBackRest, Barman, or WAL-G → S3-compatible storage. **Self-hosted/embedded SQLite**: Litestream (continuous
|
|
42
|
+
**Self-hosted Postgres**: pgBackRest, Barman, or WAL-G → S3-compatible storage. **Self-hosted/embedded SQLite**: Litestream (continuous replication to object storage). The 2025 rewrite (v0.5.x, `SNAPSHOT`) stores changes as LTX files (sorted page changesets that compact), giving faster point-in-time restores, and uses compare-and-swap leases on object storage to avoid two primaries; configs from 0.3.x need review on upgrade. Weaker floor: `sqlite3 .backup` / `VACUUM INTO` on a schedule, shipped off-machine with restic/borg. **Firestore/DynamoDB-style**: scheduled exports to storage — PITR is a paid or absent feature; check the project's state.
|
|
36
43
|
|
|
37
44
|
### The restore drill (the only proof)
|
|
38
45
|
|
|
@@ -42,7 +49,7 @@ The recurring failure: the free tier's weekly backup or none at all, assumed to
|
|
|
42
49
|
4. Verify the canary is absent. Time the whole operation — that measured duration is the real RTO; write it down.
|
|
43
50
|
5. Repeat on a schedule (quarterly is the common bar); the drill doc itself is the runbook you'll follow at 3am.
|
|
44
51
|
|
|
45
|
-
**File uploads need their own answer** — DB backups don't cover a disk of user uploads unless the backup includes the volume or the uploads live in object storage with versioning (S3 versioning or equivalent preserves deleted/overwritten objects — turn it on and
|
|
52
|
+
**File uploads need their own answer** — DB backups don't cover a disk of user uploads unless the backup includes the volume or the uploads live in object storage with versioning (S3 versioning or equivalent preserves deleted/overwritten objects — turn it on and add a lifecycle rule for noncurrent versions). For ransomware-grade or compliance retention, S3 Object Lock (requires versioning) stores objects write-once-read-many; use governance mode unless you truly need compliance mode, which nobody — including you — can shorten. A credential that can delete the bucket can delete its backups: keep backup copies in a different account. DB row + orphaned-file mismatch is a finding: cleanup discipline (delete file then row, in that order, with the row's file path recorded for resweep) or accept orphans.
|
|
46
53
|
|
|
47
54
|
### What a backup must exclude/include
|
|
48
55
|
|
|
@@ -63,7 +70,7 @@ Check-then-act without a constraint (`if not exists: insert`) is a bug that just
|
|
|
63
70
|
|
|
64
71
|
### Connection & session pitfalls (correctness, not speed)
|
|
65
72
|
|
|
66
|
-
- **Transaction-mode poolers** (PgBouncer
|
|
73
|
+
- **Transaction-mode poolers** (PgBouncer, Supabase port 6543 — Supavisor on the shared pooler, PgBouncer on the dedicated one; port 5432 is direct or session mode — Neon's `-pooler` endpoint which runs PgBouncer, RDS Proxy): each transaction may run on a different connection — session state breaks. Protocol-level named prepared statements work through PgBouncer ≥ 1.21 when `max_prepared_statements` is non-zero (on by default, 200, since PgBouncer 1.24; SQL-level `PREPARE` still breaks). Self-hosted PgBouncer: run ≥ 1.26.0 (23 Sep 2026), which fixes pre-auth crash/hang CVEs (CVE-2026-19888, CVE-2026-6668) and CVE-2026-6669 (`SNAPSHOT`). Run migrations over a **direct/session** connection, not the transaction pooler. Other casualties: session-level `SET`, advisory locks, `LISTEN/NOTIFY`, temp tables, `COPY`. Patterns: keep per-transaction state in SQL (`SET LOCAL`), use `pg_advisory_xact_lock` (transaction-scoped), or route state-needing work to a direct/session connection.
|
|
67
74
|
- **Serverless functions**: one pool per *instance* (module scope), never per request; assume the process freezes between invocations — no in-memory "it'll flush later".
|
|
68
75
|
- **Postgres connections are processes** — exhausting them fails every new client; the fix is a pooler, not a bigger `max_connections`. (Sizing the pool for throughput is lean's lane.)
|
|
69
76
|
- **Always release/close in `finally`** — a leaked connection per request is a slow outage and a durability finding.
|
|
@@ -83,4 +90,4 @@ Check-then-act without a constraint (`if not exists: insert`) is a bug that just
|
|
|
83
90
|
|
|
84
91
|
---
|
|
85
92
|
|
|
86
|
-
**Provenance:** snapshot
|
|
93
|
+
**Provenance:** snapshot 3 October 2026. Accessed 3 Oct 2026: https://supabase.com/docs/guides/platform/backups ; https://neon.com/docs/introduction/restore-window ; https://planetscale.com/docs/postgres/backups ; https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.BackupRetention.html ; https://developers.cloudflare.com/d1/reference/time-travel/ ; https://docs.turso.tech/features/point-in-time-recovery ; https://cloud.google.com/firestore/native/docs/use-pitr ; https://fly.io/blog/litestream-revamped/ ; https://litestream.io/ ; https://www.pgbouncer.org/config.html ; https://www.pgbouncer.org/changelog.html ; https://neon.com/docs/connect/connection-pooling ; https://supabase.com/docs/guides/database/connecting-to-postgres ; https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html . Earlier sources: Postgres WAL/PITR documentation and pgBackRest/Barman/WAL-G docs, Litestream documentation (SQLite WAL replication), provider documentation for Supabase/Neon/RDS/Crunchy/MongoDB Atlas backup tiers (tier specifics are `SNAPSHOT` — they change often), PgBouncer documentation (transaction-mode feature matrix), SQLite documentation (WAL, busy_timeout, foreign_keys pragma, VACUUM INTO), current disaster-recovery practice guides (3-2-1, RPO/RTO, restore drills). Provider tiers and defaults decay fastest — re-verify before asserting.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Durable — migrations & schema
|
|
2
2
|
|
|
3
|
-
Load for any migration or schema finding. Postgres examples dominate because it is the default; MySQL and SQLite divergences are called out. `SNAPSHOT` = sourced
|
|
3
|
+
Load for any migration or schema finding. Postgres examples dominate because it is the default; MySQL and SQLite divergences are called out. `SNAPSHOT` = sourced 3 October 2026 — version behaviours decay, verify before asserting. Run every migration on a branch or copy first, and obey SKILL.md's agent gate before applying anything to a database that may hold real data.
|
|
4
4
|
|
|
5
5
|
## The one rule that prevents most downtime
|
|
6
6
|
|
|
@@ -22,18 +22,24 @@ Rollback at any point is "flip back to the old path", not "restore the database"
|
|
|
22
22
|
|
|
23
23
|
## Lock-safety table (Postgres)
|
|
24
24
|
|
|
25
|
-
What common DDL actually does to a live table (`SNAPSHOT` — verify per version)
|
|
25
|
+
What common DDL actually does to a live table (`SNAPSHOT` — verify per version).
|
|
26
|
+
|
|
27
|
+
**Always set `SET lock_timeout = '5s'` (and a `statement_timeout`) before DDL on a live table.** An `ALTER` queued behind a long transaction blocks every query behind it; the timeout turns that outage into a retryable failure. `CONCURRENTLY` operations cannot run inside a transaction block — keep them in their own migration (many ORMs wrap migrations in a transaction by default).
|
|
26
28
|
|
|
27
29
|
| Operation | Behavior | Safe pattern |
|
|
28
30
|
|---|---|---|
|
|
29
31
|
| `ADD COLUMN` (no default) | Fast, brief lock | Fine as-is |
|
|
30
32
|
| `ADD COLUMN ... NOT NULL DEFAULT x` | Fast since Postgres 11 (default not backfilled); table rewrite before 11 | Fine on ≥11; otherwise add nullable → backfill → `SET NOT NULL` |
|
|
31
|
-
| `SET NOT NULL` on existing column | Full-table scan under lock | Backfill first
|
|
33
|
+
| `SET NOT NULL` on existing column | Full-table scan under lock | Backfill first. Postgres 18: `ADD CONSTRAINT … NOT NULL col NOT VALID`, then `VALIDATE CONSTRAINT`. Older: `CHECK (col IS NOT NULL) NOT VALID` → `VALIDATE` → `SET NOT NULL` (uses the valid check, skipping the scan) → drop the check |
|
|
32
34
|
| `CREATE INDEX` | Blocks writes for the whole build | `CREATE INDEX CONCURRENTLY` (drop with `DROP INDEX CONCURRENTLY`); slower, non-transactional — if it fails, drop the invalid index and retry |
|
|
33
35
|
| `ADD FOREIGN KEY` | Locks while validating all rows | Two-step: `ADD CONSTRAINT ... NOT VALID` then `VALIDATE CONSTRAINT` (weaker lock) |
|
|
34
36
|
| One giant `UPDATE`/`DELETE` | Locks rows, bloats the table, stalls replication | Batch: keyset-select N rows → update → sleep → repeat, resumable from last key |
|
|
35
37
|
| `DROP COLUMN` | Fast (metadata) — but data is gone | Only in the contract phase, after dual-write is verified dead |
|
|
36
38
|
|
|
39
|
+
**Postgres 18 notes** (`SNAPSHOT`, released 25 Sep 2025): `uuidv7()` built in; generated columns are now **virtual by default** (computed on read — say `STORED` if you need it materialised or indexed); `pg_upgrade` keeps planner statistics (not extended statistics), so post-upgrade slow plans are less likely; new clusters get data checksums by default and `pg_upgrade` needs matching checksum settings (`initdb --no-data-checksums` for old non-checksum clusters); asynchronous I/O via `io_method`. **Postgres 13 reached end of life on 13 November 2025** — no more security or data-corruption fixes; flag any project on ≤13 as High.
|
|
40
|
+
|
|
41
|
+
**Tools that automate expand/contract** (`SNAPSHOT`, verify maturity before recommending): pgroll (Xata; serves old and new schema versions via views during a migration), Reshape (same idea, less active), and migration linters — Squawk (Postgres SQL lint), `strong_migrations` (Rails), `django-pg-zero-downtime-migrations` / `django-migration-linter` (Django). For Laravel, no equivalent gem is verified here — review SQL with `php artisan migrate --pretend`.
|
|
42
|
+
|
|
37
43
|
MySQL has no `CONCURRENTLY`: use `ALGORITHM=INSTANT/INPLACE` where the version supports it, `gh-ost` or `pt-online-schema-change` for big tables (`SNAPSHOT` — both maintained; verify current). Postgres big-table rebuilds (PK change, deep bloat, partitioning): `pg_repack`, which rebuilds online with minimal locking and needs ~2x disk temporarily.
|
|
38
44
|
|
|
39
45
|
## Resumable backfill skeleton
|
|
@@ -54,8 +60,9 @@ From application code the same shape applies: select batch by `id > last`, write
|
|
|
54
60
|
## Migration tooling discipline
|
|
55
61
|
|
|
56
62
|
- **Versioned, checked-in migrations from the first table** — Alembic (Python), Flyway/Liquibase (JVM), golang-migrate (Go), sqlx/Diesel (Rust), Drizzle Kit / Prisma Migrate (TS). Hand-run SQL files and "schema.sql we run sometimes" are how drift starts.
|
|
57
|
-
- **Review generated SQL before it touches anything real.** ORM migration generators emit what the schema diff implies: renaming a column in the schema file becomes `DROP COLUMN` + `ADD COLUMN` — the data is dropped. Prisma flow: `migrate dev --create-only`, read the SQL, fix it to a safe expand-contract, then apply. Drizzle: generate
|
|
58
|
-
-
|
|
63
|
+
- **Review generated SQL before it touches anything real.** ORM migration generators emit what the schema diff implies: renaming a column in the schema file becomes `DROP COLUMN` + `ADD COLUMN` — the data is dropped. Prisma flow: `migrate dev --create-only`, read the SQL, fix it to a safe expand-contract, then apply. Drizzle: `drizzle-kit generate`, read the SQL, then `drizzle-kit migrate`. This review is the single highest-value habit in this file.
|
|
64
|
+
- **Prisma 7** (`SNAPSHOT`, Nov 2025): Rust-free TypeScript client via the `prisma-client` generator with a required `output`, driver adapters required, config in `prisma.config.ts`, and automatic seeding after migrate removed. Migration semantics are unchanged: `migrate dev` (dev only, may prompt to reset), `migrate deploy` (production, applies pending only), `migrate reset` (drops everything — agent-gated, see SKILL.md). Upgrading v6→v7 is a client/config change; it should not create a migration — if a diff appears, read it.
|
|
65
|
+
- **`db push` / `drizzle-kit push` / sync-style commands are for throwaway dev databases only** (Drizzle documents push as its rapid-prototyping path). They bypass migration history; on a database with data they can apply destructive diffs without review. If a deploy script or CI contains `db push` against anything shared or persistent, that is a finding.
|
|
59
66
|
- **Never edit an applied migration.** The hash changes, history diverges, teammates' databases desync. Corrections are new migrations.
|
|
60
67
|
- **Forward-only in production.** Down migrations cannot faithfully reverse a migration that touched data (you cannot un-drop a column). "Rollback" is a new forward migration that reverses the change, written and tested like any other. Down migrations are a dev convenience at most.
|
|
61
68
|
- **Apply migrations as a distinct step before the new code rolls out** (deploy script step or pre-deploy Job), never lazily on first request, never concurrently from every replica. One applier, ordered, recorded.
|
|
@@ -76,4 +83,4 @@ From application code the same shape applies: select batch by `id > last`, write
|
|
|
76
83
|
|
|
77
84
|
---
|
|
78
85
|
|
|
79
|
-
**Provenance:** snapshot
|
|
86
|
+
**Provenance:** snapshot 3 October 2026. Accessed 3 Oct 2026: PostgreSQL 18 release notes https://www.postgresql.org/docs/18/release-18.html and announcement https://www.postgresql.org/about/news/postgresql-18-released-3142/ ; versioning policy (13 EOL) https://www.postgresql.org/support/versioning/ ; Prisma 7 https://www.prisma.io/blog/announcing-prisma-orm-7-0-0 and https://www.prisma.io/docs/guides/upgrade-prisma-orm/v7 ; Drizzle push https://orm.drizzle.team/docs/drizzle-kit-push . Earlier sources: Postgres documentation (DDL locking behavior, `CONCURRENTLY`, `NOT VALID`/`VALIDATE`, ADD COLUMN default fast-path), current zero-downtime migration practice guides (expand-contract/parallel-change, batched keyset backfill, forward-only production, pre-deploy application), Prisma/Drizzle documentation (create-only review workflow, `db push` scope), MySQL online-schema-change tooling (gh-ost, pt-online-schema-change) public docs. Version-specific lock behavior decays fastest — re-verify against the running version before asserting.
|
|
@@ -1,158 +1,100 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: evidence-led-ui
|
|
3
|
-
description: Use
|
|
3
|
+
description: Use when building or changing web/mobile UI: net-new screens or pages, redesigns, design systems, visual polish, UI review, and mid-build edits touching colour, type, spacing, icons, focus/hover/selected states, borders, dropdown icons, motion, or UI copy layout. Also use when output looks generic or AI-made. Small styling fixes take the small-edit path. Do NOT use for behavior-only wiring with no visual state, copy-only text changes, database/API schemas, CLI output, or standalone image generation; speed/bundle work is lean, legal/privacy review of public pages is compliance-guard.
|
|
4
4
|
license: See LICENSES.md
|
|
5
|
-
compatibility: Full review requires filesystem inspection and rendered screenshots; web research and
|
|
5
|
+
compatibility: Full review requires filesystem inspection and rendered screenshots (deferred `screenshot` tool); web research and device tooling are optional and unavailable checks must be reported as unverified.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Evidence-Led UI
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Pick your mode, then follow only that section:
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
2. For focus, borders, glass effects, or dropdown icons, read `references/craft-rulings.md` § Control icon insets and § No sticky pointer focus. Identify the rule drawing the defect before adding an override.
|
|
18
|
-
3. Fix the shared owner, not each screen. Check affected variants and remove superseded local treatments within scope. Any supporting copy added or changed must pass § Copy must earn its space in `references/craft-rulings.md`; small edits must not accumulate redundant descriptions.
|
|
19
|
-
4. Run the applicable interaction regression matrix in the craft rulings using the project's browser checks or manual browser verification. Screenshots alone cannot pass interaction checks. Report actual evidence and any unverified platform.
|
|
20
|
-
|
|
21
|
-
## Governing rule
|
|
22
|
-
|
|
23
|
-
Inspect before inventing. Preserve the project's visual language unless the user explicitly requests a redesign. Treat corpus findings as conditional observations, not official brand truth, universal rules, or a house style.
|
|
24
|
-
|
|
25
|
-
Aesthetic distinction is contextual. Semantic structure, operability, responsive stability, performance, honest content, accessibility, and user trust are the non-negotiable floor.
|
|
26
|
-
|
|
27
|
-
## Binding craft defaults
|
|
28
|
-
|
|
29
|
-
Apply these on every UI task. Read `references/craft-rulings.md` when implementing or reviewing their details.
|
|
30
|
-
|
|
31
|
-
- **No emoji UI:** Never use emoji as icons, bullets, status marks, or decoration unless explicitly requested. Reuse the project icon system; otherwise use one coherent icon package.
|
|
32
|
-
- **Uniform geometry:** Align containers, columns, section edges, baselines, dividers, control heights, and repeated component anatomy. Break alignment only for a clear content reason.
|
|
33
|
-
- **One shared content rail:** Default navigation, header, main content, footer, and adjacent sections to the same max-width, inline gutters, and breakpoint padding. Full-bleed backgrounds may differ, but their inner content edges must align. Any different width or offset needs an explicit user or content reason, never one-off margin or padding.
|
|
34
|
-
- **No edge-hugging control icons:** Select, dropdown, and combobox chevrons and other trailing icons need a deliberate inline-end inset plus enough reserved text padding for the icon and gap. They must never touch the control edge or overlap content; use logical properties so the anatomy also works in RTL.
|
|
35
|
-
- **Reuse first:** Search for existing components, variants, tokens, utilities, icon wrappers, focus rings, and motion curves before creating new ones.
|
|
36
|
-
- **Purposeful feedback:** Relevant hover, focus, press, selected, expanded, loading, success, and error states need clear feedback. Avoid abrupt changes when a short transition improves continuity.
|
|
37
|
-
- **No soft semantic tint-on-tint:** Do not default badges, buttons, toasts, cards, selected states, or icon medallions to a low-opacity semantic-color background with saturated same-hue text or icons, with or without a matching border. Unless the user explicitly requests that treatment or an established system must be preserved, choose a product-specific alternative rather than imposing one universal replacement style.
|
|
38
|
-
- **Focus is not selection or decoration:** Diagnose the actual painted layer before changing it. Reuse one shared focus treatment, separate from glass borders/reflections and selected, expanded, or error states. Do not stack local rings on it. Prevent stale pointer-originated highlights without blurring controls, suppressing keyboard focus, or removing legitimate state cues. Prefer native `:focus-visible` behavior; custom modality handling requires a reproduced platform defect and the regression matrix in `references/craft-rulings.md`.
|
|
39
|
-
- **No generic hover lift:** Do not default to `translateY`, bobbing, floating, or scale-up on hover. Prefer color, border, underline, icon fill, opacity, or restrained shadow changes.
|
|
40
|
-
- **No `transition: all`:** Name transition properties, reuse duration/easing tokens, and provide a reduced-motion path.
|
|
41
|
-
- **Intentional type:** Reuse the existing type system. For net-new web work, select an appropriate modern family or pairing; do not use Arial, Helvetica, or bare `system-ui` as the aesthetic direction.
|
|
42
|
-
- **WCAG 2.2 Level AA is the accessibility floor:** Every web UI and complete user flow must meet every applicable Level A and Level AA success criterion, not a hand-picked subset. Native apps apply WCAG2ICT where relevant plus current platform accessibility requirements. Stricter project, contract, platform, or jurisdiction rules win; accessibility cannot be traded for aesthetics, scope, delivery speed, or a higher rubric score.
|
|
43
|
-
- **No unsupported accessibility claims:** Treat ADA as an equal-access legal obligation, not a badge earned by Lighthouse, axe, or another scanner. Never label a UI `ADA compliant` or `WCAG conformant` from source review or automated checks alone; a claim requires a defined scope, per-criterion evidence, manual keyboard and assistive-technology testing, and qualified legal or product-owner review when legal compliance is asserted.
|
|
44
|
-
- **Measured contrast:** Meet WCAG 2.2 contrast for text, controls, icons, focus, and meaningful graphics. Muted text must remain readable.
|
|
45
|
-
- **Consistent flow:** Repeated navigation and actions keep the same order, labels, icons, placement, and behavior across sections and pages.
|
|
46
|
-
- **Copy must earn its space:** Start with clear labels, controls, and relevant status, not automatic subtitles, helper paragraphs, or footer notes. Supporting text must add information needed here that the interface does not already communicate. Remove repetition, show state-specific guidance when needed, and move optional detail into contextual help. Keep essential instructions and consequences visible before action. Reduce unnecessary copy before compressing layout; verify reading effort in the rendered UI. See `references/craft-rulings.md` § Copy must earn its space.
|
|
47
|
-
- **No generated em dashes:** Do not write em dashes in user-facing UI copy unless explicitly requested or exact supplied source text must remain unchanged.
|
|
48
|
-
|
|
49
|
-
## Reference map
|
|
50
|
-
|
|
51
|
-
Resolve every path from the installed skill root. Load only what the task needs:
|
|
52
|
-
|
|
53
|
-
- `references/craft-rulings.md`: implementation detail for the binding defaults above.
|
|
54
|
-
- `references/ui-libraries.md`: real Bklit/Kokonut component discovery/adoption and Motion APIs. Read for relevant React UI creation after checking existing project UI; use deferred `ui_registry` and `ui_adopt` rather than inventing a library lookalike.
|
|
55
|
-
- `references/production-contract.md`: binding pass/fail semantics, WCAG/ADA accessibility, forms, performance, resilience, platform, trust, AI, media, theme, and release checks. Read its accessibility sections for every implemented or reviewed UI; read the full contract for broad features, behavior changes, forms, navigation, data/AI interfaces, native work, performance work, or release review.
|
|
56
|
-
- `references/archetypes.md`: surface-specific direction and relevant source slugs. Read for net-new UI, redesigns, or unresolved visual direction.
|
|
57
|
-
- `references/observed-patterns.md`: measured corpus observations. Read only sections that answer a real design question.
|
|
58
|
-
- `references/anti-defaults.md`: transferable AI-generated patterns to challenge. Read for broad visual work or generic-looking output.
|
|
59
|
-
- `references/quality-rubric.md`: rendered scoring and revision gate. Read before critiquing broad output.
|
|
60
|
-
- `references/methodology.md`: extraction method, denominators, and limitations. Read only to audit evidence.
|
|
61
|
-
- `references/provenance.md` and `LICENSES.md`: sources, licenses, standards status, and Refero boundaries.
|
|
62
|
-
|
|
63
|
-
Do not load `data/observations.json` or the raw corpus by default. Open a raw source only to audit one claim or inspect one selected exemplar. Never load the full corpus into context.
|
|
64
|
-
|
|
65
|
-
## Workflow
|
|
12
|
+
| Situation | Mode | Go to |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| One control, state, border, icon inset, focus bug, or token tweak | Small edit | § Small-edit path |
|
|
15
|
+
| New screen/page/component, redesign, or "make it look less generic" | Build | § Build loop |
|
|
16
|
+
| "Review this UI", audit screens or flows, pre-ship look | Review | § Review mode |
|
|
66
17
|
|
|
67
|
-
|
|
18
|
+
Every mode obeys § Binding defaults. Preserve the project's visual language unless the user asked for a redesign.
|
|
68
19
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Reuse the local system. Do not add a design library merely to obtain a look. For a net-new project with no neighbors, derive direction from the brief and matching archetype rather than choosing a fashionable default.
|
|
72
|
-
|
|
73
|
-
### 2. Write a design read
|
|
74
|
-
|
|
75
|
-
Resolve:
|
|
76
|
-
|
|
77
|
-
- **Surface:** marketing, application UI, dashboard/data-dense, commerce/marketplace, editorial/content, documentation/developer tool, mobile/native, or one named hybrid with a clear leader.
|
|
78
|
-
- **Audience:** user, expertise, environment, and access needs.
|
|
79
|
-
- **Single job:** the one outcome this screen must make easiest.
|
|
80
|
-
- **Task and risk:** frequency, decision cost, error cost, and time pressure.
|
|
81
|
-
- **Content:** real hierarchy, density, variability, media, data, and longest plausible values.
|
|
82
|
-
- **Platform:** viewport/window, input modes, support policy, navigation behavior, and framework conventions.
|
|
83
|
-
- **Constraints:** existing tokens/assets, redesign scope, performance limits, and required tone.
|
|
84
|
-
|
|
85
|
-
Infer missing facts from the project and state the inference. Ask only when code cannot resolve a genuine product or taste decision.
|
|
86
|
-
|
|
87
|
-
### 3. Select evidence only when it helps
|
|
88
|
-
|
|
89
|
-
For broad net-new work or a redesign, read the matching archetype and usually choose two aligned source slugs plus one contrast. Record why each applies.
|
|
90
|
-
|
|
91
|
-
For a small change in an established system, local components and tokens may be sufficient. A frequency can support investigation, not automatically become a recommendation. Prefer local product evidence, then archetype evidence, then corpus-wide frequency.
|
|
92
|
-
|
|
93
|
-
Refero is optional. Use it only through an authorized Refero MCP or user-provided authorized export. Do not scrape Refero, call undocumented endpoints, or access disallowed routes.
|
|
94
|
-
|
|
95
|
-
### 4. Form one design thesis
|
|
96
|
-
|
|
97
|
-
State one compact direction:
|
|
98
|
-
|
|
99
|
-
- semantic color/type/icon/spacing/grid/motion roles and a reuse map;
|
|
100
|
-
- first glance, second glance, primary action, and supporting evidence;
|
|
101
|
-
- composition and uniform alignment rules;
|
|
102
|
-
- reasons for borders, surfaces, shadows, blur, gradients, or imagery;
|
|
103
|
-
- feedback, duration/easing, resting behavior, and reduced-motion equivalent;
|
|
104
|
-
- one memorable device grounded in the subject, content, or interaction.
|
|
105
|
-
|
|
106
|
-
One thesis leads. Do not combine several aesthetic directions into a mood-board compromise.
|
|
20
|
+
## Small-edit path
|
|
107
21
|
|
|
108
|
-
|
|
22
|
+
Skip the design workflow, not verification:
|
|
109
23
|
|
|
110
|
-
|
|
24
|
+
1. Read the shared primitive, tokens, state rules, and callers. Reproduce the reported sequence before editing.
|
|
25
|
+
2. Focus, borders, glass, or dropdown icons: read `references/craft-rulings.md` § Control icon insets and § No sticky pointer focus. Find the rule that paints the defect before adding an override.
|
|
26
|
+
3. Fix the shared owner, not each screen. Check variants; remove superseded local treatments in scope. Added copy must pass § Copy must earn its space.
|
|
27
|
+
4. Run the applicable interaction regression matrix in `references/craft-rulings.md` via browser checks. Screenshots alone cannot pass interaction checks. Report actual evidence and unverified platforms.
|
|
111
28
|
|
|
112
|
-
|
|
29
|
+
## Build loop
|
|
113
30
|
|
|
114
|
-
|
|
31
|
+
One design thesis, one author. Do not blend directions.
|
|
115
32
|
|
|
116
|
-
|
|
33
|
+
1. **Inspect.** Read nearest routes, components, tokens, type, icons, motion, and states. Reuse the local system; add no library just for a look. React and nothing local fits: read `references/ui-libraries.md` and use `ui_registry`/`ui_adopt` (via `tool_search`) for real Bklit/Kokonut source, never a lookalike.
|
|
34
|
+
2. **Content first.** Write real headline, labels, section copy, and realistic data (longest, empty, 0/1/many) before layout. Rank it. Delete sections with nothing true to say. Never invent metrics, testimonials, logos, or ratings; label fixtures. Details: `references/direction.md` § 1.
|
|
35
|
+
3. **Read the job.** Surface type, audience, single job, risk, platform, constraints. Infer from the project and state the inference; ask only for genuine taste or product decisions. Net-new or redesign: read the matching section of `references/archetypes.md`.
|
|
36
|
+
4. **Write the thesis** using the template in `references/direction.md` § 2: signature, type roles, OKLCH colour tokens with intended contrast pairs, spacing/density, radius/material, imagery, motion, rejected defaults. Broad work goes in `DESIGN.md`.
|
|
37
|
+
5. **Slop check the thesis** against `references/anti-defaults.md`. Every tell is replaced or justified with "This belongs because…". Run the neighbour test (§ 7 there).
|
|
38
|
+
6. **Plan states:** loading, empty, error, retry, success, disabled, destructive; hover, focus-visible, press, selected, expanded, pending; keyboard order, overlays, narrow/wide, reduced motion, zoom/reflow, long and localized text. Apply the accessibility sections of `references/production-contract.md`; the full contract for forms, navigation, data/AI, native, or release work.
|
|
39
|
+
7. **Implement** the complete flow with real content. Decision-critical information and the primary action stay visible or one obvious action away on desktop and mobile.
|
|
40
|
+
8. **Verify rendered output** (§ Rendered verification loop).
|
|
117
41
|
|
|
118
|
-
|
|
119
|
-
- hover, focus-visible, press, selected, expanded, and pending feedback;
|
|
120
|
-
- keyboard order, accessible names/status, overlay focus, and drag alternatives;
|
|
121
|
-
- pointer-versus-keyboard focus behavior, including native popup dismissal and clicks onto non-focusable space;
|
|
122
|
-
- narrow, intermediate, desktop, wide/resizable, pointer, touch, and no-hover behavior;
|
|
123
|
-
- reduced motion, forced colors, zoom/reflow, long/localized/RTL text, missing media, and realistic data extremes;
|
|
124
|
-
- text alternatives and media equivalents, landmarks/headings, language, labels/instructions/errors, status announcements, timing, flashing, and sensory-independent instructions where applicable.
|
|
42
|
+
## Rendered verification loop
|
|
125
43
|
|
|
126
|
-
|
|
44
|
+
1. Load `screenshot` via `tool_search`. Capture desktop (~1440 px) and mobile (~390 px), plus key states.
|
|
45
|
+
2. Compare each capture against the written thesis line by line, then against `references/anti-defaults.md`.
|
|
46
|
+
3. Score with `references/quality-rubric.md`. Measure contrast of real rendered pairs; record pass/fail/unverified for applicable contract checks.
|
|
47
|
+
4. Fix the weakest criterion and every contract failure. Remove one decorative idea that does not serve the job. Re-capture.
|
|
48
|
+
5. Stop after one revision unless the gate still fails. Gate: **20/24 or higher**, no zero in accessibility, consistency and flow, responsive behaviour, state completeness, or content authenticity, and no applicable WCAG A/AA failure. Small components: 2 on every applicable floor criterion.
|
|
127
49
|
|
|
128
|
-
|
|
50
|
+
No screenshot tool or browser available: say so, mark visual checks unverified, never claim the look was verified.
|
|
129
51
|
|
|
130
|
-
|
|
52
|
+
## Review mode
|
|
131
53
|
|
|
132
|
-
|
|
54
|
+
Inspect code and rendered output. Return findings ordered by impact, each with screenshot or file:line evidence, label (`RUNTIME` observed, `CODE` read in source, `DEDUCED`, `SNAPSHOT` dated source), and the fix. Separate floor defects (accessibility, states, broken layout) from aesthetic opportunities (slop tells). Recommend one resolved direction.
|
|
133
55
|
|
|
134
|
-
|
|
56
|
+
## Binding defaults
|
|
135
57
|
|
|
136
|
-
|
|
58
|
+
Details and fixes: `references/craft-rulings.md`.
|
|
137
59
|
|
|
138
|
-
|
|
60
|
+
- **No emoji UI.** One coherent icon family; reuse the project's.
|
|
61
|
+
- **Uniform geometry and one content rail.** Shared max-width, gutters, and breakpoint padding for nav, header, main, footer. Break alignment only for a stated content reason.
|
|
62
|
+
- **Control icon insets.** Chevrons and trailing icons get a deliberate inline-end inset plus reserved text padding; never touch the edge or overlap text; logical properties for RTL.
|
|
63
|
+
- **Reuse first.** Existing components, variants, tokens, focus rings, motion curves before new ones.
|
|
64
|
+
- **Focus is not selection or decoration.** Diagnose the painted layer; one shared focus treatment separate from borders, glass, selected, expanded, error. No stacked rings. Prefer native `:focus-visible`; custom modality handling needs a reproduced defect and the regression matrix.
|
|
65
|
+
- **No soft semantic tint-on-tint** unless requested or required by an existing variant.
|
|
66
|
+
- **Motion:** no generic hover lift, no `transition: all`, named properties, tokens, reduced-motion path.
|
|
67
|
+
- **Intentional type and colour:** see `references/direction.md`. Not Inter/violet-gradient by default on brand surfaces.
|
|
68
|
+
- **Copy must earn its space.** No automatic subtitles, helper paragraphs, or footer notes; supporting text adds information the interface lacks. Named-outcome CTAs.
|
|
69
|
+
- **No em dashes in UI copy** unless requested or exact supplied copy.
|
|
70
|
+
- **WCAG 2.2 Level AA is the accessibility floor** for every applicable A/AA criterion across complete flows; native apps add WCAG2ICT and platform rules. Stricter project or legal rules win. Accessibility is never traded for aesthetics or speed.
|
|
71
|
+
- **No unsupported accessibility claims.** Never say `ADA compliant`, `WCAG conformant`, or "accessible" from source review or scanners; that needs a defined scope, per-criterion evidence, manual keyboard and assistive-technology testing, and owner/legal review. Dated legal context: `references/production-contract.md` § 2.
|
|
139
72
|
|
|
140
|
-
|
|
73
|
+
## Scaling: one agent or several
|
|
141
74
|
|
|
142
|
-
|
|
75
|
+
| Situation | Policy |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| Small edit, build, redesign | Main thread only. One thesis, one author; never split a design across children. |
|
|
78
|
+
| Review of one or two flows you can render and read yourself | Main thread only. |
|
|
79
|
+
| Review of many screens/flows, or several apps | Build a ledger: rows = flows/screens × {slop tells, states, accessibility contract, responsive}. Fan out read-only general-purpose children (they have the `skill` tool), one per disjoint flow, all in ONE `spawn_agent` call, ≤ 6 per wave. |
|
|
80
|
+
| A dated legal or platform claim needs checking | One `researcher` child. |
|
|
143
81
|
|
|
144
|
-
|
|
82
|
+
Each child brief contains: the absolute skill root path (the `Skill root directory` shown when this skill loaded), files to read (`references/anti-defaults.md`, `references/quality-rubric.md`, the accessibility sections of `references/production-contract.md`), the flow's routes and how to run the app, the ledger rows it owns, the instruction to capture desktop and mobile screenshots with the `screenshot` tool, the evidence labels, and the output schema: findings (screen, screenshot or file:line, label, severity, fix) plus explicit `checked` and `not checked` lists. Children do not edit.
|
|
145
83
|
|
|
146
|
-
|
|
84
|
+
Merge: a failed, timed-out, or silent row is `not checked`, never clean. Re-open each reported file:line or re-capture before reporting it. Large pre-ship reviews get one fresh verifier child that tries to disprove the findings. Fixes stay on the main thread (or `bee` children on strictly disjoint files) against the single thesis; run checks once after merging.
|
|
147
85
|
|
|
148
|
-
##
|
|
86
|
+
## Reference map
|
|
149
87
|
|
|
150
|
-
|
|
88
|
+
Load only what the task needs; resolve paths from the skill root.
|
|
151
89
|
|
|
152
|
-
|
|
90
|
+
- `references/direction.md`: content-first, thesis template, type, OKLCH colour, spacing, imagery, motion, verified Baseline features, INP practice.
|
|
91
|
+
- `references/anti-defaults.md`: slop tells with replacement moves and the neighbour test.
|
|
92
|
+
- `references/craft-rulings.md`: icons, geometry, insets, focus vs selection, regression matrix, type loading, contrast, copy rules.
|
|
93
|
+
- `references/production-contract.md`: pass/fail semantics, WCAG/ADA/EAA context, forms, performance, platform, trust, AI, release evidence.
|
|
94
|
+
- `references/quality-rubric.md`: rendered scoring gate.
|
|
95
|
+
- `references/ui-libraries.md`: Bklit/Kokonut adoption and Motion APIs.
|
|
96
|
+
- `references/archetypes.md`: surface-specific direction and corpus source slugs.
|
|
97
|
+
- `references/observed-patterns.md`: measured corpus observations; read only the section that answers a question; keep numerator/denominator with any claim.
|
|
98
|
+
- `references/methodology.md`, `references/provenance.md`, `LICENSES.md`: method, sources, standards status, licences, Refero boundary.
|
|
153
99
|
|
|
154
|
-
|
|
155
|
-
- Treat source slugs as observations of selected public surfaces, not official systems or permission to reproduce a brand.
|
|
156
|
-
- Never recommend a color, font, radius, theme, or layout solely because it is frequent.
|
|
157
|
-
- State corpus gaps plainly. Mobile/native has zero direct documents in this snapshot; use platform guidance and device testing.
|
|
158
|
-
- If local evidence conflicts with corpus evidence, follow the product and record why.
|
|
100
|
+
Never load `data/observations.json` or the raw `corpus/` into context; open one raw source only to audit one claim. Corpus frequencies are observations of public surfaces, not brand truth or a reason to pick a colour, font, or layout. Mobile/native has no corpus documents; use platform guidance. Refero only through an authorized MCP or user export.
|