@prestyj/cli 5.32.2 → 5.34.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/README.md +16 -16
- package/assets/motion/skills/motion/SKILL.md +1 -1
- package/assets/skills/bulletproof/SKILL.md +72 -131
- package/assets/skills/bulletproof/references/agent-surface.md +22 -1
- package/assets/skills/bulletproof/references/audit-protocol.md +23 -6
- package/assets/skills/bulletproof/references/platform-playbooks.md +12 -0
- package/assets/skills/bulletproof/references/provenance.md +19 -2
- package/assets/skills/bulletproof/references/secure-defaults.md +13 -1
- package/assets/skills/bulletproof/references/supply-chain.md +8 -5
- package/assets/skills/bulletproof/references/threat-landscape.md +46 -57
- package/assets/skills/compliance-guard/SKILL.md +59 -212
- package/assets/skills/compliance-guard/references/artifacts.md +14 -1
- package/assets/skills/compliance-guard/references/eu-uk.md +17 -7
- package/assets/skills/compliance-guard/references/exposure-triage.md +16 -0
- package/assets/skills/compliance-guard/references/full-review.md +155 -0
- package/assets/skills/compliance-guard/references/lawsuit-vectors.md +14 -2
- package/assets/skills/compliance-guard/references/provenance.md +33 -2
- package/assets/skills/compliance-guard/references/sector-gates.md +15 -1
- package/assets/skills/compliance-guard/references/security-baseline.md +21 -34
- package/assets/skills/compliance-guard/references/trigger-map.md +15 -1
- package/assets/skills/compliance-guard/references/us.md +32 -8
- package/assets/skills/durable/SKILL.md +22 -29
- package/assets/skills/durable/references/agent-db-safety.md +2 -2
- package/assets/skills/durable/references/backups-and-runtime.md +6 -6
- package/assets/skills/durable/references/migrations-and-schema.md +5 -4
- package/assets/skills/lean/SKILL.md +36 -50
- package/assets/skills/lean/references/playbooks.md +9 -7
- package/dist/app-sidecar/app-settings.d.ts +5 -0
- package/dist/app-sidecar/app-settings.js +16 -0
- package/dist/app-sidecar/app-settings.js.map +1 -1
- package/dist/app-sidecar/auth-routes.js +45 -2
- package/dist/app-sidecar/auth-routes.js.map +1 -1
- package/dist/app-sidecar/autopilot-runner.d.ts +7 -0
- package/dist/app-sidecar/autopilot-runner.js +79 -19
- package/dist/app-sidecar/autopilot-runner.js.map +1 -1
- package/dist/app-sidecar/desktop-guidance.d.ts +1 -0
- package/dist/app-sidecar/desktop-guidance.js +27 -0
- package/dist/app-sidecar/desktop-guidance.js.map +1 -0
- package/dist/app-sidecar/history-routes.d.ts +6 -0
- package/dist/app-sidecar/history-routes.js +57 -2
- package/dist/app-sidecar/history-routes.js.map +1 -1
- package/dist/app-sidecar/history.d.ts +17 -0
- package/dist/app-sidecar/history.js.map +1 -1
- package/dist/app-sidecar/http.d.ts +1 -1
- package/dist/app-sidecar/http.js +2 -2
- package/dist/app-sidecar/http.js.map +1 -1
- package/dist/app-sidecar/integration-routes.js +4 -0
- package/dist/app-sidecar/integration-routes.js.map +1 -1
- package/dist/app-sidecar/live-preview/dev-url.d.ts +32 -0
- package/dist/app-sidecar/live-preview/dev-url.js +97 -0
- package/dist/app-sidecar/live-preview/dev-url.js.map +1 -0
- package/dist/app-sidecar/live-preview/frame-server.d.ts +31 -0
- package/dist/app-sidecar/live-preview/frame-server.js +193 -0
- package/dist/app-sidecar/live-preview/frame-server.js.map +1 -0
- package/dist/app-sidecar/live-preview/manager.d.ts +44 -0
- package/dist/app-sidecar/live-preview/manager.js +215 -0
- package/dist/app-sidecar/live-preview/manager.js.map +1 -0
- package/dist/app-sidecar/live-preview/proxy.d.ts +30 -0
- package/dist/app-sidecar/live-preview/proxy.js +235 -0
- package/dist/app-sidecar/live-preview/proxy.js.map +1 -0
- package/dist/app-sidecar/live-preview/routes.d.ts +4 -0
- package/dist/app-sidecar/live-preview/routes.js +52 -0
- package/dist/app-sidecar/live-preview/routes.js.map +1 -0
- package/dist/app-sidecar/live-preview/servers.d.ts +36 -0
- package/dist/app-sidecar/live-preview/servers.js +228 -0
- package/dist/app-sidecar/live-preview/servers.js.map +1 -0
- package/dist/app-sidecar/mcp-routes.js +9 -0
- package/dist/app-sidecar/mcp-routes.js.map +1 -1
- package/dist/app-sidecar/mcp-shell-command.d.ts +36 -0
- package/dist/app-sidecar/mcp-shell-command.js +302 -0
- package/dist/app-sidecar/mcp-shell-command.js.map +1 -0
- package/dist/app-sidecar/mcp-sync.d.ts +18 -0
- package/dist/app-sidecar/mcp-sync.js +38 -0
- package/dist/app-sidecar/mcp-sync.js.map +1 -0
- package/dist/app-sidecar/prompt-routes.js +58 -30
- package/dist/app-sidecar/prompt-routes.js.map +1 -1
- package/dist/app-sidecar/route-context.d.ts +13 -2
- package/dist/app-sidecar/run-control-routes.js +17 -3
- package/dist/app-sidecar/run-control-routes.js.map +1 -1
- package/dist/app-sidecar/session-routes.js +8 -0
- package/dist/app-sidecar/session-routes.js.map +1 -1
- package/dist/app-sidecar/shell-routes.d.ts +12 -0
- package/dist/app-sidecar/shell-routes.js +140 -0
- package/dist/app-sidecar/shell-routes.js.map +1 -0
- package/dist/app-sidecar/shell-runs.d.ts +103 -0
- package/dist/app-sidecar/shell-runs.js +268 -0
- package/dist/app-sidecar/shell-runs.js.map +1 -0
- package/dist/app-sidecar/shell-suggestions.d.ts +33 -0
- package/dist/app-sidecar/shell-suggestions.js +152 -0
- package/dist/app-sidecar/shell-suggestions.js.map +1 -0
- package/dist/app-sidecar/task-routes.js +1 -1
- package/dist/app-sidecar/task-routes.js.map +1 -1
- package/dist/app-sidecar/usage.js +26 -2
- package/dist/app-sidecar/usage.js.map +1 -1
- package/dist/app-sidecar/workspace-routes.js +35 -37
- package/dist/app-sidecar/workspace-routes.js.map +1 -1
- package/dist/app-sidecar-sessions.js +13 -3
- package/dist/app-sidecar-sessions.js.map +1 -1
- package/dist/app-sidecar.js +365 -96
- package/dist/app-sidecar.js.map +1 -1
- package/dist/chat-agents/index.d.ts +1 -1
- package/dist/chat-agents/index.js +1 -1
- package/dist/chat-agents/index.js.map +1 -1
- package/dist/chat-agents/shared.d.ts +4 -0
- package/dist/chat-agents/shared.js +8 -1
- package/dist/chat-agents/shared.js.map +1 -1
- package/dist/cli/mcp.js +19 -5
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/shared.js +4 -0
- package/dist/cli/shared.js.map +1 -1
- package/dist/cli.js +41 -9
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +22 -2
- package/dist/config.js +42 -97
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session/mcp-tools.d.ts +17 -0
- package/dist/core/agent-session/mcp-tools.js +31 -0
- package/dist/core/agent-session/mcp-tools.js.map +1 -1
- package/dist/core/agent-session/verification-tracker.js +2 -10
- package/dist/core/agent-session/verification-tracker.js.map +1 -1
- package/dist/core/agent-session.d.ts +129 -11
- package/dist/core/agent-session.js +925 -171
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agents.d.ts +0 -10
- package/dist/core/agents.js +5 -1
- package/dist/core/agents.js.map +1 -1
- package/dist/core/ask-user.d.ts +8 -0
- package/dist/core/ask-user.js +28 -6
- package/dist/core/ask-user.js.map +1 -1
- package/dist/core/autopilot-gate.js +2 -3
- package/dist/core/autopilot-gate.js.map +1 -1
- package/dist/core/bundled-agents.js +9 -29
- package/dist/core/bundled-agents.js.map +1 -1
- package/dist/core/cache-diagnostics.d.ts +4 -0
- package/dist/core/cache-diagnostics.js +4 -1
- package/dist/core/cache-diagnostics.js.map +1 -1
- package/dist/core/cache-expiry.d.ts +2 -0
- package/dist/core/cache-expiry.js +6 -0
- package/dist/core/cache-expiry.js.map +1 -1
- package/dist/core/checklist-items.d.ts +2 -10
- package/dist/core/checklist-items.js +14 -10
- package/dist/core/checklist-items.js.map +1 -1
- package/dist/core/checklist-prompt.d.ts +1 -1
- package/dist/core/checklist-prompt.js +1 -1
- package/dist/core/checkpoint-store.d.ts +17 -0
- package/dist/core/checkpoint-store.js +72 -0
- package/dist/core/checkpoint-store.js.map +1 -1
- package/dist/core/claude-code/complete.d.ts +35 -0
- package/dist/core/claude-code/complete.js +115 -0
- package/dist/core/claude-code/complete.js.map +1 -0
- package/dist/core/claude-code/events.d.ts +65 -0
- package/dist/core/claude-code/events.js +434 -0
- package/dist/core/claude-code/events.js.map +1 -0
- package/dist/core/claude-code/live-session.d.ts +92 -0
- package/dist/core/claude-code/live-session.js +519 -0
- package/dist/core/claude-code/live-session.js.map +1 -0
- package/dist/core/claude-code/loop.d.ts +9 -0
- package/dist/core/claude-code/loop.js +15 -0
- package/dist/core/claude-code/loop.js.map +1 -0
- package/dist/core/claude-code/session-sync.d.ts +28 -0
- package/dist/core/claude-code/session-sync.js +53 -0
- package/dist/core/claude-code/session-sync.js.map +1 -0
- package/dist/core/claude-code/tool-bridge.d.ts +49 -0
- package/dist/core/claude-code/tool-bridge.js +352 -0
- package/dist/core/claude-code/tool-bridge.js.map +1 -0
- package/dist/core/claude-code/transcripts.d.ts +29 -0
- package/dist/core/claude-code/transcripts.js +117 -0
- package/dist/core/claude-code/transcripts.js.map +1 -0
- package/dist/core/claude-code-version.d.ts +1 -1
- package/dist/core/claude-code-version.js +1 -1
- package/dist/core/claude-code-version.js.map +1 -1
- package/dist/core/code-retrieval.d.ts +1 -1
- package/dist/core/code-retrieval.js +2 -2
- package/dist/core/code-retrieval.js.map +1 -1
- package/dist/core/codex-request-shape.js +1 -1
- package/dist/core/compaction/compactor.d.ts +27 -1
- package/dist/core/compaction/compactor.js +143 -9
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/plan-step-policy.d.ts +1 -1
- package/dist/core/compaction/plan-step-policy.js +1 -1
- package/dist/core/compaction/policy.d.ts +18 -0
- package/dist/core/compaction/policy.js +27 -7
- package/dist/core/compaction/policy.js.map +1 -1
- package/dist/core/compaction/tool-result-pruner.d.ts +20 -0
- package/dist/core/compaction/tool-result-pruner.js +25 -0
- package/dist/core/compaction/tool-result-pruner.js.map +1 -1
- package/dist/core/env-delta.d.ts +3 -3
- package/dist/core/env-delta.js +4 -5
- package/dist/core/env-delta.js.map +1 -1
- package/dist/core/extensions/plugin-bundles.d.ts +0 -9
- package/dist/core/extensions/plugin-bundles.js +0 -185
- package/dist/core/extensions/plugin-bundles.js.map +1 -1
- package/dist/core/goals-store.d.ts +9 -2
- package/dist/core/goals-store.js +111 -55
- package/dist/core/goals-store.js.map +1 -1
- package/dist/core/internal-diagnostics.d.ts +17 -0
- package/dist/core/internal-diagnostics.js +45 -0
- package/dist/core/internal-diagnostics.js.map +1 -1
- package/dist/core/language-detector.d.ts +2 -3
- package/dist/core/language-detector.js.map +1 -1
- package/dist/core/live-preview.d.ts +24 -0
- package/dist/core/live-preview.js +76 -0
- package/dist/core/live-preview.js.map +1 -0
- package/dist/core/local-endpoint-store.d.ts +4 -0
- package/dist/core/local-endpoint-store.js +31 -15
- package/dist/core/local-endpoint-store.js.map +1 -1
- package/dist/core/logger.d.ts +5 -0
- package/dist/core/logger.js +10 -2
- package/dist/core/logger.js.map +1 -1
- package/dist/core/lsp/edit-telemetry.js +3 -1
- package/dist/core/lsp/edit-telemetry.js.map +1 -1
- package/dist/core/lsp/manager.d.ts +15 -0
- package/dist/core/lsp/manager.js +31 -0
- package/dist/core/lsp/manager.js.map +1 -1
- package/dist/core/mcp/client.d.ts +9 -0
- package/dist/core/mcp/client.js +58 -5
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/deferred-catalog.d.ts +1 -1
- package/dist/core/mcp/deferred-catalog.js +1 -1
- package/dist/core/mcp/oauth-provider.d.ts +7 -1
- package/dist/core/mcp/oauth-provider.js +11 -4
- package/dist/core/mcp/oauth-provider.js.map +1 -1
- package/dist/core/mcp/oauth-store.d.ts +6 -0
- package/dist/core/mcp/oauth-store.js +14 -0
- package/dist/core/mcp/oauth-store.js.map +1 -1
- package/dist/core/mcp/parse-add-command.d.ts +29 -3
- package/dist/core/mcp/parse-add-command.js +196 -26
- package/dist/core/mcp/parse-add-command.js.map +1 -1
- package/dist/core/mcp/store.d.ts +16 -0
- package/dist/core/mcp/store.js +28 -0
- package/dist/core/mcp/store.js.map +1 -1
- package/dist/core/mcp/types.d.ts +9 -0
- package/dist/core/nolan-ask-answer.d.ts +24 -0
- package/dist/core/nolan-ask-answer.js +96 -0
- package/dist/core/nolan-ask-answer.js.map +1 -0
- package/dist/core/nolan-context.d.ts +20 -0
- package/dist/core/nolan-context.js +55 -0
- package/dist/core/nolan-context.js.map +1 -1
- package/dist/core/nolan-prompt.js +6 -0
- package/dist/core/nolan-prompt.js.map +1 -1
- package/dist/core/opencode-catalog-store.d.ts +20 -0
- package/dist/core/opencode-catalog-store.js +82 -0
- package/dist/core/opencode-catalog-store.js.map +1 -0
- package/dist/core/openrouter-catalog-store.d.ts +24 -0
- package/dist/core/openrouter-catalog-store.js +140 -0
- package/dist/core/openrouter-catalog-store.js.map +1 -0
- package/dist/core/package-cooldown.d.ts +0 -2
- package/dist/core/package-cooldown.js +0 -4
- package/dist/core/package-cooldown.js.map +1 -1
- package/dist/core/plan-delta.d.ts +23 -0
- package/dist/core/plan-delta.js +36 -0
- package/dist/core/plan-delta.js.map +1 -0
- package/dist/core/process-gate.d.ts +17 -0
- package/dist/core/process-gate.js +24 -0
- package/dist/core/process-gate.js.map +1 -1
- package/dist/core/process-manager.d.ts +1 -1
- package/dist/core/process-manager.js +1 -1
- package/dist/core/project-discovery.js +2 -2
- package/dist/core/project-discovery.js.map +1 -1
- package/dist/core/project-files.js +1 -1
- package/dist/core/project-files.js.map +1 -1
- package/dist/core/prompt-commands.js +106 -107
- package/dist/core/prompt-commands.js.map +1 -1
- package/dist/core/radio-players.d.ts +28 -0
- package/dist/core/radio-players.js +133 -0
- package/dist/core/radio-players.js.map +1 -0
- package/dist/core/radio.js +20 -3
- package/dist/core/radio.js.map +1 -1
- package/dist/core/runtime-mode.d.ts +9 -8
- package/dist/core/runtime-mode.js +26 -0
- package/dist/core/runtime-mode.js.map +1 -1
- package/dist/core/session-history.d.ts +7 -0
- package/dist/core/session-history.js +48 -4
- package/dist/core/session-history.js.map +1 -1
- package/dist/core/session-manager.d.ts +10 -1
- package/dist/core/session-manager.js +48 -14
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-preview.js +2 -2
- package/dist/core/session-preview.js.map +1 -1
- package/dist/core/session-storage.d.ts +0 -2
- package/dist/core/session-storage.js +0 -2
- package/dist/core/session-storage.js.map +1 -1
- package/dist/core/session-summary-index.d.ts +18 -4
- package/dist/core/session-summary-index.js +28 -8
- package/dist/core/session-summary-index.js.map +1 -1
- package/dist/core/settings-manager.d.ts +9 -0
- package/dist/core/settings-manager.js +56 -8
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/shell-path.d.ts +2 -0
- package/dist/core/shell-path.js +10 -1
- package/dist/core/shell-path.js.map +1 -1
- package/dist/core/shell.d.ts +4 -0
- package/dist/core/shell.js +15 -1
- package/dist/core/shell.js.map +1 -1
- package/dist/core/skills.d.ts +10 -0
- package/dist/core/skills.js +20 -5
- package/dist/core/skills.js.map +1 -1
- package/dist/core/steering.d.ts +4 -0
- package/dist/core/steering.js +8 -1
- package/dist/core/steering.js.map +1 -1
- package/dist/core/stream-diag-level.d.ts +3 -0
- package/dist/core/stream-diag-level.js +24 -0
- package/dist/core/stream-diag-level.js.map +1 -0
- package/dist/core/subagent-manager.d.ts +11 -0
- package/dist/core/subagent-manager.js +16 -4
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/subagent-policy.d.ts +6 -0
- package/dist/core/subagent-policy.js +22 -3
- package/dist/core/subagent-policy.js.map +1 -1
- package/dist/core/subagent-receipt.d.ts +3 -3
- package/dist/core/subagent-receipt.js +6 -9
- package/dist/core/subagent-receipt.js.map +1 -1
- package/dist/core/task-store.d.ts +0 -1
- package/dist/core/task-store.js +0 -3
- package/dist/core/task-store.js.map +1 -1
- package/dist/core/trophies/catalog-more.js +16 -36
- package/dist/core/trophies/catalog-more.js.map +1 -1
- package/dist/core/trophies/catalog.js +3 -3
- package/dist/core/trophies/catalog.js.map +1 -1
- package/dist/core/trophies/engine.js +0 -4
- package/dist/core/trophies/engine.js.map +1 -1
- package/dist/core/trophies/types.d.ts +1 -1
- package/dist/core/trophies/types.js +0 -2
- package/dist/core/trophies/types.js.map +1 -1
- package/dist/core/user-shell-context.d.ts +8 -0
- package/dist/core/user-shell-context.js +12 -0
- package/dist/core/user-shell-context.js.map +1 -0
- package/dist/core/verify-commands.d.ts +1 -1
- package/dist/goals-agent/goal-team.js +3 -4
- package/dist/goals-agent/goal-team.js.map +1 -1
- package/dist/goals-agent/goals-agent.d.ts +1 -1
- package/dist/goals-agent/goals-agent.js +4 -3
- package/dist/goals-agent/goals-agent.js.map +1 -1
- package/dist/modes/acp-mode.d.ts +2 -2
- package/dist/modes/acp-mode.js +4 -5
- package/dist/modes/acp-mode.js.map +1 -1
- package/dist/modes/agent-home-mode.js +5 -5
- package/dist/modes/agent-home-mode.js.map +1 -1
- package/dist/modes/json-mode.js +5 -0
- package/dist/modes/json-mode.js.map +1 -1
- package/dist/modes/serve-mode.js +5 -5
- package/dist/modes/serve-mode.js.map +1 -1
- package/dist/motion-agent/motion-agent.d.ts +12 -5
- package/dist/motion-agent/motion-agent.js +24 -9
- package/dist/motion-agent/motion-agent.js.map +1 -1
- package/dist/motion-agent/motion-review.d.ts +0 -75
- package/dist/motion-agent/motion-review.js +0 -189
- package/dist/motion-agent/motion-review.js.map +1 -1
- package/dist/subagent-entry.d.ts +1 -0
- package/dist/subagent-entry.js +50 -0
- package/dist/subagent-entry.js.map +1 -0
- package/dist/system-prompt.d.ts +11 -4
- package/dist/system-prompt.js +38 -22
- package/dist/system-prompt.js.map +1 -1
- package/dist/test-support/system-tools.d.ts +6 -0
- package/dist/test-support/system-tools.js +36 -0
- package/dist/test-support/system-tools.js.map +1 -0
- package/dist/tools/ask-user.js +5 -3
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/bash.d.ts +9 -2
- package/dist/tools/bash.js +382 -362
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/checklist.js +6 -11
- package/dist/tools/checklist.js.map +1 -1
- package/dist/tools/debug.js +6 -9
- package/dist/tools/debug.js.map +1 -1
- package/dist/tools/document-text.d.ts +6 -0
- package/dist/tools/document-text.js +154 -0
- package/dist/tools/document-text.js.map +1 -0
- package/dist/tools/enter-plan.js +4 -7
- package/dist/tools/enter-plan.js.map +1 -1
- package/dist/tools/find.d.ts +9 -0
- package/dist/tools/find.js +38 -1
- package/dist/tools/find.js.map +1 -1
- package/dist/tools/generate-image.d.ts +18 -0
- package/dist/tools/generate-image.js +208 -17
- package/dist/tools/generate-image.js.map +1 -1
- package/dist/tools/goals.d.ts +2 -2
- package/dist/tools/index.d.ts +5 -2
- package/dist/tools/index.js +5 -13
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/live-preview.d.ts +21 -0
- package/dist/tools/live-preview.js +37 -0
- package/dist/tools/live-preview.js.map +1 -0
- package/dist/tools/operations.js +1 -1
- package/dist/tools/operations.js.map +1 -1
- package/dist/tools/overflow.d.ts +2 -0
- package/dist/tools/overflow.js +10 -0
- package/dist/tools/overflow.js.map +1 -1
- package/dist/tools/path-utils.d.ts +0 -15
- package/dist/tools/path-utils.js +0 -17
- package/dist/tools/path-utils.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts +2 -0
- package/dist/tools/prompt-hints.js +16 -9
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read.js +25 -10
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/routine-output.d.ts +10 -1
- package/dist/tools/routine-output.js +79 -1
- package/dist/tools/routine-output.js.map +1 -1
- package/dist/tools/screenshot.js +6 -10
- package/dist/tools/screenshot.js.map +1 -1
- package/dist/tools/side-web-search.d.ts +35 -0
- package/dist/tools/side-web-search.js +147 -0
- package/dist/tools/side-web-search.js.map +1 -0
- package/dist/tools/skill.d.ts +2 -0
- package/dist/tools/skill.js +33 -6
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/steroids.d.ts +7 -6
- package/dist/tools/steroids.js +193 -87
- package/dist/tools/steroids.js.map +1 -1
- package/dist/tools/subagent-control.js +66 -10
- package/dist/tools/subagent-control.js.map +1 -1
- package/dist/tools/subagent-shared.d.ts +19 -2
- package/dist/tools/subagent-shared.js +35 -10
- package/dist/tools/subagent-shared.js.map +1 -1
- package/dist/tools/subagent.js +23 -7
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/tool-search.js +7 -1
- package/dist/tools/tool-search.js.map +1 -1
- package/dist/tools/tool-tiers.d.ts +3 -2
- package/dist/tools/tool-tiers.js +7 -5
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/truncate.d.ts +0 -2
- package/dist/tools/truncate.js +4 -10
- package/dist/tools/truncate.js.map +1 -1
- package/dist/tools/web-fetch.d.ts +15 -1
- package/dist/tools/web-fetch.js +138 -21
- package/dist/tools/web-fetch.js.map +1 -1
- package/dist/tools/web-search.d.ts +3 -2
- package/dist/tools/web-search.js +25 -1
- package/dist/tools/web-search.js.map +1 -1
- package/dist/ui/App.js +37 -38
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/app-items.d.ts +0 -2
- package/dist/ui/app-items.js +0 -2
- package/dist/ui/app-items.js.map +1 -1
- package/dist/ui/components/Footer.js +8 -5
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/components/ModelSelector.js +2 -0
- package/dist/ui/components/ModelSelector.js.map +1 -1
- package/dist/ui/components/SkillsOverlay.js +2 -1
- package/dist/ui/components/SkillsOverlay.js.map +1 -1
- package/dist/ui/constants/figures.d.ts +0 -8
- package/dist/ui/constants/figures.js +0 -8
- package/dist/ui/constants/figures.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +3 -0
- package/dist/ui/hooks/useAgentLoop.js +54 -4
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/hooks/useContextCompaction.js +1 -0
- package/dist/ui/hooks/useContextCompaction.js.map +1 -1
- package/dist/ui/language-pack-update.d.ts +25 -0
- package/dist/ui/language-pack-update.js +19 -0
- package/dist/ui/language-pack-update.js.map +1 -0
- package/dist/ui/layout-decisions.d.ts +0 -5
- package/dist/ui/layout-decisions.js +1 -10
- package/dist/ui/layout-decisions.js.map +1 -1
- package/dist/ui/terminal-history-status-renderers.d.ts +0 -1
- package/dist/ui/terminal-history-status-renderers.js +0 -12
- package/dist/ui/terminal-history-status-renderers.js.map +1 -1
- package/dist/ui/terminal-history.js +3 -1
- package/dist/ui/terminal-history.js.map +1 -1
- package/dist/ui/transcript/presentation.d.ts +1 -2
- package/dist/ui/transcript/presentation.js +0 -4
- package/dist/ui/transcript/presentation.js.map +1 -1
- package/dist/utils/http-body.d.ts +5 -0
- package/dist/utils/http-body.js +5 -0
- package/dist/utils/http-body.js.map +1 -1
- package/dist/utils/image.d.ts +11 -4
- package/dist/utils/image.js +34 -11
- package/dist/utils/image.js.map +1 -1
- package/dist/utils/plan-steps.d.ts +1 -0
- package/dist/utils/plan-steps.js +10 -0
- package/dist/utils/plan-steps.js.map +1 -1
- package/dist/utils/prompt-enhancer.d.ts +3 -1
- package/dist/utils/prompt-enhancer.js +21 -16
- package/dist/utils/prompt-enhancer.js.map +1 -1
- package/dist/web.d.ts +5 -0
- package/dist/web.js +5 -0
- package/dist/web.js.map +1 -0
- package/package.json +27 -6
- package/assets/skills/clarify/SKILL.md +0 -39
- package/assets/skills/code-review/SKILL.md +0 -88
- package/assets/skills/code-review/references/agent-diffs.md +0 -27
- package/assets/skills/code-review/references/tests.md +0 -19
- package/assets/skills/evidence-led-ui/LICENSES.md +0 -80
- package/assets/skills/evidence-led-ui/SKILL.md +0 -100
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/LICENSE +0 -21
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/airbnb/DESIGN.md +0 -545
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/airtable/DESIGN.md +0 -554
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/apple/DESIGN.md +0 -562
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/binance/DESIGN.md +0 -634
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/bmw/DESIGN.md +0 -544
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/bmw-m/DESIGN.md +0 -503
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/bugatti/DESIGN.md +0 -454
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/cal/DESIGN.md +0 -542
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/claude/DESIGN.md +0 -589
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/clay/DESIGN.md +0 -541
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/clickhouse/DESIGN.md +0 -544
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/cohere/DESIGN.md +0 -451
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/coinbase/DESIGN.md +0 -570
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/composio/DESIGN.md +0 -506
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/cursor/DESIGN.md +0 -537
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/dell-1996/DESIGN.md +0 -632
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/elevenlabs/DESIGN.md +0 -504
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/expo/DESIGN.md +0 -526
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/ferrari/DESIGN.md +0 -531
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/figma/DESIGN.md +0 -578
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/framer/DESIGN.md +0 -544
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/hashicorp/DESIGN.md +0 -575
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/hp/DESIGN.md +0 -670
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/ibm/DESIGN.md +0 -550
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/intercom/DESIGN.md +0 -546
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/kraken/DESIGN.md +0 -125
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/lamborghini/DESIGN.md +0 -288
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/linear.app/DESIGN.md +0 -548
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/lovable/DESIGN.md +0 -298
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mastercard/DESIGN.md +0 -365
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/meta/DESIGN.md +0 -683
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/minimax/DESIGN.md +0 -746
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mintlify/DESIGN.md +0 -852
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/miro/DESIGN.md +0 -825
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mistral.ai/DESIGN.md +0 -773
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mongodb/DESIGN.md +0 -767
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/nike/DESIGN.md +0 -575
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/nintendo-2001/DESIGN.md +0 -649
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/notion/DESIGN.md +0 -821
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/nvidia/DESIGN.md +0 -640
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/ollama/DESIGN.md +0 -539
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/opencode.ai/DESIGN.md +0 -521
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/pinterest/DESIGN.md +0 -597
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/playstation/DESIGN.md +0 -661
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/posthog/DESIGN.md +0 -690
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/raycast/DESIGN.md +0 -669
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/renault/DESIGN.md +0 -589
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/replicate/DESIGN.md +0 -616
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/resend/DESIGN.md +0 -585
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/revolut/DESIGN.md +0 -636
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/runwayml/DESIGN.md +0 -244
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/sanity/DESIGN.md +0 -357
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/sentry/DESIGN.md +0 -551
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/shopify/DESIGN.md +0 -516
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/slack/DESIGN.md +0 -482
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/spacex/DESIGN.md +0 -363
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/spotify/DESIGN.md +0 -246
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/starbucks/DESIGN.md +0 -580
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/stripe/DESIGN.md +0 -487
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/supabase/DESIGN.md +0 -462
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/superhuman/DESIGN.md +0 -448
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/tesla/DESIGN.md +0 -286
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/theverge/DESIGN.md +0 -339
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/together.ai/DESIGN.md +0 -633
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/uber/DESIGN.md +0 -636
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/vercel/DESIGN.md +0 -736
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/vodafone/DESIGN.md +0 -538
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/voltagent/DESIGN.md +0 -521
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/warp/DESIGN.md +0 -526
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/webflow/DESIGN.md +0 -588
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/wired/DESIGN.md +0 -497
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/wise/DESIGN.md +0 -544
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/x.ai/DESIGN.md +0 -465
- package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/zapier/DESIGN.md +0 -537
- package/assets/skills/evidence-led-ui/data/corpus-manifest.json +0 -768
- package/assets/skills/evidence-led-ui/data/observations.json +0 -47053
- package/assets/skills/evidence-led-ui/references/anti-defaults.md +0 -110
- package/assets/skills/evidence-led-ui/references/archetypes.md +0 -97
- package/assets/skills/evidence-led-ui/references/craft-rulings.md +0 -242
- package/assets/skills/evidence-led-ui/references/direction.md +0 -124
- package/assets/skills/evidence-led-ui/references/methodology.md +0 -72
- package/assets/skills/evidence-led-ui/references/observed-patterns.md +0 -68
- package/assets/skills/evidence-led-ui/references/production-contract.md +0 -148
- package/assets/skills/evidence-led-ui/references/provenance.md +0 -142
- package/assets/skills/evidence-led-ui/references/quality-rubric.md +0 -126
- package/assets/skills/evidence-led-ui/references/ui-libraries.md +0 -30
- package/assets/skills/refactoring/SKILL.md +0 -87
- package/assets/skills/refactoring/references/agent-pitfalls.md +0 -46
- package/assets/skills/refactoring/references/legacy.md +0 -70
- package/assets/skills/refactoring/references/smells.md +0 -71
- package/assets/skills/root-cause/SKILL.md +0 -46
- package/assets/skills/shared-language/SKILL.md +0 -32
- package/assets/skills/tdd/SKILL.md +0 -42
- package/dist/core/setup-history.d.ts +0 -6
- package/dist/core/setup-history.js +0 -55
- package/dist/core/setup-history.js.map +0 -1
- package/dist/core/style-packs/index.d.ts +0 -18
- package/dist/core/style-packs/index.js +0 -60
- package/dist/core/style-packs/index.js.map +0 -1
- package/dist/core/style-packs/packs.d.ts +0 -8
- package/dist/core/style-packs/packs.js +0 -188
- package/dist/core/style-packs/packs.js.map +0 -1
- package/dist/interactive.d.ts +0 -2
- package/dist/interactive.js +0 -257
- package/dist/interactive.js.map +0 -1
- package/dist/motion-agent/motion-review-coverage.d.ts +0 -12
- package/dist/motion-agent/motion-review-coverage.js +0 -33
- package/dist/motion-agent/motion-review-coverage.js.map +0 -1
- package/dist/motion-agent/motion-review-gate.d.ts +0 -48
- package/dist/motion-agent/motion-review-gate.js +0 -88
- package/dist/motion-agent/motion-review-gate.js.map +0 -1
- package/dist/motion-agent/motion-review-session.d.ts +0 -65
- package/dist/motion-agent/motion-review-session.js +0 -422
- package/dist/motion-agent/motion-review-session.js.map +0 -1
- package/dist/tools/code-nav.d.ts +0 -29
- package/dist/tools/code-nav.js +0 -299
- package/dist/tools/code-nav.js.map +0 -1
- package/dist/tools/code-skeleton.d.ts +0 -28
- package/dist/tools/code-skeleton.js +0 -115
- package/dist/tools/code-skeleton.js.map +0 -1
- package/dist/tools/search-code.d.ts +0 -10
- package/dist/tools/search-code.js +0 -90
- package/dist/tools/search-code.js.map +0 -1
- package/dist/ui/stores/index.d.ts +0 -2
- package/dist/ui/stores/index.js +0 -3
- package/dist/ui/stores/index.js.map +0 -1
- package/dist/utils/format.d.ts +0 -16
- package/dist/utils/format.js +0 -159
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/shell.d.ts +0 -2
- package/dist/utils/shell.js +0 -8
- package/dist/utils/shell.js.map +0 -1
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# United States
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Contents
|
|
4
|
+
- 0. Scoping reality for a tiny startup
|
|
5
|
+
- 1. State comprehensive privacy laws
|
|
6
|
+
- 2. California specifics
|
|
7
|
+
- 3. Children and teens
|
|
8
|
+
- 4. Health, biometric, genetic, location
|
|
9
|
+
- 5. AI laws
|
|
10
|
+
- 6. Cross-cutting federal
|
|
11
|
+
- 7. PRA ranking — what actually produces suits against small companies
|
|
12
|
+
- 8. Verify before relying
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
Snapshot **11 Aug 2026**, spot re-verified 3 Oct 2026 and 22 Oct 2026 (see `provenance.md`). Markers: **[V]** verified against a primary/first-tier source · **[S]** snapshot, re-verify · **[U]** contested or fast-moving.
|
|
4
16
|
|
|
5
17
|
**PRA** = private right of action. This is the field that matters most for a small company: regulator-only laws are a compliance project, PRA laws are a lawsuit.
|
|
6
18
|
|
|
@@ -37,6 +49,8 @@ Disclose signal handling in the privacy notice.
|
|
|
37
49
|
```
|
|
38
50
|
Honouring GPC for **every** visitor is the safe default: it satisfies the strictest state and violates none **[V]**.
|
|
39
51
|
|
|
52
|
+
**Taking effect in 2027** — Oklahoma and Louisiana on 1 Jan 2027, Alabama on 1 May 2027 **[S]**; Vermont's date conflicts across trackers (1 Jan 2027 vs 1 Jan 2028) **[U]**. Delaware's threshold drops to 10,000 consumers (5,000 with data-sale revenue) from 1 Jan 2027 **[S]**. Which states add a GPC duty in 2027 is disputed (trackers disagree even on Alabama) **[U]**; honouring GPC for everyone stays the safe default.
|
|
53
|
+
|
|
40
54
|
**Why an ordinary ad pixel triggers everything.** "Sale" requires no money — any disclosure for other valuable consideration counts — and "sharing" expressly covers cross-context behavioural advertising **[V]**. Meta Pixel, GA4 with ad features, TikTok, Reddit and LinkedIn tags are a sale/share/targeted ad in nearly every state. Build: a tag inventory, consent-gated loading, and an opt-out that actually severs the pixel rather than filing a form.
|
|
41
55
|
|
|
42
56
|
**Sensitive data requires opt-in** in Virginia-model states (precise geolocation, race, religion, health, sex life/orientation, immigration status, biometrics, genetic data, children's data) **[V]**. California instead grants a right to limit use.
|
|
@@ -60,15 +74,21 @@ Honouring GPC for **every** visitor is the safe default: it satisfies the strict
|
|
|
60
74
|
- *ADMT* — pre-use notice, access, and opt-out (or a qualifying exception) for automated decision-making about significant decisions (including employees, contractors, applicants). **Compliance deadline 1 Jan 2027**; ADMT deployed after that date must comply before first use. Targeted advertising alone is not a significant decision.
|
|
61
75
|
- *Cyber audits* — only above revenue plus scale thresholds; first certifications due 1 Apr 2028 (>$100M revenue), 1 Apr 2029 ($50–100M), 1 Apr 2030 (<$50M) **[V]**. A pre-revenue startup is out of scope.
|
|
62
76
|
|
|
63
|
-
**Delete Act / DROP** — if you sell PI of consumers you have no direct relationship with, you are a data broker. **No revenue threshold.** Registration plus, **from 1 Aug 2026**, processing consumer deletion requests through the state mechanism every 45 days with downstream deletion directives; per-day penalties apply whether or not you registered **[V]** (1 Aug 2026 / 45-day cadence re-confirmed on cppa.ca.gov/data_brokers, 3 Oct 2026). All brokers operating in 2025 or 2026 must have a DROP account **[V]**.
|
|
77
|
+
**Delete Act / DROP** — if you sell PI of consumers you have no direct relationship with, you are a data broker. **No revenue threshold.** Registration plus, **from 1 Aug 2026**, processing consumer deletion requests through the state mechanism every 45 days with downstream deletion directives; per-day penalties apply whether or not you registered **[V]** (1 Aug 2026 / 45-day cadence re-confirmed on cppa.ca.gov/data_brokers, 3 Oct 2026). All brokers operating in 2025 or 2026 must have a DROP account **[V]**. AB 883 (signed Sep 2026) cuts a broker turnaround from 45 to 30 days; sources disagree whether that is the request-response deadline or the DROP check cadence **[U]**.
|
|
78
|
+
|
|
79
|
+
**AB 2561 (signed 27 Sep 2026)** — an OS or app may not undo a user's privacy setting (including after an update) without consent **[S]**. Never reset privacy toggles in a migration. Enforcement has already hit companies of exactly this size. Ask at design review: *do we sell PI of people who never used us?*
|
|
64
80
|
|
|
65
81
|
**Breach notice (SB 446)** — since 1 Jan 2026, notify affected California residents within **30 calendar days** of discovery, and report to the AG within **15 calendar days** of notifying individuals **[V]**.
|
|
66
82
|
|
|
67
83
|
**AI transparency (SB 942 as amended by AB 853)** — covered providers are generative-AI systems with **over 1M monthly users**; duties operative 2 Aug 2026, with hosting-platform duties from 1 Jan 2027 **[V]**. Most small devs are out of scope, but the hosting-platform duty catches anyone distributing GenAI systems.
|
|
68
84
|
|
|
85
|
+
**AB 2713 (2026)** amends the AI Transparency Act: large online platforms must show whether content was AI-generated or altered (provenance data) **[S]**.
|
|
86
|
+
|
|
87
|
+
**AB 1609 (signed 28 Sep 2026)** — customer-service chatbot disclosure and human access for large businesses; the reported revenue threshold of $500M is **[U]**.
|
|
88
|
+
|
|
69
89
|
**AB 2013 training-data transparency** — **no size threshold**. Developers of generative AI systems made available to Californians must publish training-data documentation; compliance required from 1 Jan 2026 and on substantial modification **[V]**. Catches small fine-tuners, not mere API consumers.
|
|
70
90
|
|
|
71
|
-
**SB 243 companion chatbots — the highest-risk new law for small AI apps.** Effective 1 Jan 2026. Applies to chatbots sustaining a relationship or human-like emotional engagement (excludes customer-service bots, limited game NPCs, voice assistants). Requires non-human disclosure, mental-health crisis protocols, and minor protections including blocking sexual content and enforcing breaks; annual reporting to the state Office of Suicide Prevention is reported to start 1 Jul 2027 **[S]** (bill text not reachable 3 Oct 2026). **PRA: YES** — minimum $1,000 damages plus fees, and UCL pairing can reach individuals personally **[V]**.
|
|
91
|
+
**SB 243 companion chatbots — the highest-risk new law for small AI apps.** Effective 1 Jan 2026. Applies to chatbots sustaining a relationship or human-like emotional engagement (excludes customer-service bots, limited game NPCs, voice assistants). Requires non-human disclosure, mental-health crisis protocols, and minor protections including blocking sexual content and enforcing breaks; annual reporting to the state Office of Suicide Prevention is reported to start 1 Jul 2027 **[S]** (bill text not reachable 3 Oct 2026). **PRA: YES** — minimum $1,000 damages plus fees, and UCL pairing can reach individuals personally **[V]**. **SB 1119** (signed 10 Sep 2026 **[V]**) adds minor protections from 1 Jan 2027, core duties 1 Jul 2027, and independent child-safety audits from 1 Jan 2029 **[S]**. **SB 867** bans toys with a companion chatbot for under-16s from 1 Jan 2027 to 1 Jan 2031 **[S]**.
|
|
72
92
|
|
|
73
93
|
**Employment ADS regulations** under state anti-discrimination law add notice and recordkeeping duties for automated decision systems **[S]**.
|
|
74
94
|
|
|
@@ -84,14 +104,16 @@ Honouring GPC for **every** visitor is the safe default: it satisfies the strict
|
|
|
84
104
|
- A written children's information security programme with vendor due diligence.
|
|
85
105
|
- Parent review/deletion flows must cover biometric data.
|
|
86
106
|
|
|
87
|
-
**App Store Accountability Acts (TX, UT, LA, AL) and California's Digital Age Assurance Act** — these impose duties on **app developers**, not just the stores **[V]**. Status as of
|
|
88
|
-
- **Texas SB 2420** — in
|
|
107
|
+
**App Store Accountability Acts (TX, UT, LA, AL) and California's Digital Age Assurance Act** — these impose duties on **app developers**, not just the stores **[V]**. Status as of 22 Oct 2026:
|
|
108
|
+
- **Texas SB 2420** — in force under the Fifth Circuit's 4 June 2026 stay pending appeal; the Supreme Court denied vacatur on 6 Jul 2026 (not a merits ruling); the merits appeal was argued 4 Aug 2026 with no opinion at 22 Oct 2026 **[S]** (court orders not opened).
|
|
89
109
|
- **Utah** — HB 498 (2026) pushed the main store/developer duties to **6 May 2027**, removed AG enforcement, and left a private right of action effective **31 Dec 2026** **[S]**.
|
|
90
110
|
- **Louisiana** — HB 977 (signed 15 May 2026) pushed the effective date to **1 July 2027** **[S]**.
|
|
91
111
|
- **California AB 1043** — effective **1 Jan 2027**: OS-level self-declared age brackets; developers must request the age signal and are then treated as having actual knowledge of the user's age range; no per-download parental consent; AG enforcement up to $2,500 negligent / $7,500 wilful per violation **[S]**.
|
|
92
112
|
- **Alabama** — enacted; effective date not re-verified **[U]**.
|
|
93
113
|
Build: consume the store/OS age-signal API, branch features on age category, store only a category flag, re-request consent on significant app changes.
|
|
94
114
|
|
|
115
|
+
**California 2026 minors package (signed 10 Sep 2026 [V], gov.ca.gov)** — AB 1709: no addictive features (activity-based feeds, autoplay) for under-16s on covered UGC platforms from 1 Jan 2027; AB 2246 repeals and replaces the Age-Appropriate Design Code with a reasonable-steps duty for services likely accessed by under-18s, from 1 Jan 2027; AB 1856 amends AB 1043 (OS and app stores only; developers deemed to know the age range from the device signal) **[S]**.
|
|
116
|
+
|
|
95
117
|
**NY SAFE for Kids** — final rules July 2026, effective **25 Jan 2027**, targeting platforms with addictive feeds **[V]**.
|
|
96
118
|
|
|
97
119
|
**Adult content age verification** — 26 states with live laws following the 2025 Supreme Court decision upholding Texas's law **[V]**. Typical trigger is ≥1/3 sexual material harmful to minors, a few with no threshold. Use a third-party verifier returning a boolean; retain nothing reconstructable; geo-route per state. Several states allow private suits.
|
|
@@ -108,6 +130,8 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
108
130
|
|
|
109
131
|
**Washington My Health My Data Act (RCW 19.373) — the top small-company landmine.** **No revenue or volume threshold**, in effect since 31 Mar 2024 (small businesses from 30 June 2024) **[V]**. "Consumer health data" is defined broadly enough to include precise location that could indicate seeking health services. Requires a **standalone** consumer-health-data privacy policy at its own link, **separate consent for collection**, **separate consent for sharing**, and a **distinct signed authorisation to sell**, plus a geofencing prohibition and processor contracts. **PRA: YES**, via the state Consumer Protection Act: actual damages, trebling up to $25,000, and fees; the AG can separately seek civil penalties **[S]**. The lawsuits on record (from Feb 2025) target ad SDKs and website/app tracking, not hospitals **[S]**. Any period tracker, fitness, mental-health, or symptom app — or anything collecting precise location — is squarely in scope. Nevada (SB 370) and Connecticut have similar consent and geofencing rules without a PRA; New York bans geofencing health facilities; New York's broader Health Information Privacy Act had not become law at 3 Oct 2026 **[S]**.
|
|
110
132
|
|
|
133
|
+
**California AB 1979 (signed Sep 2026, from 1 Jan 2027)** — a business offering a healthcare chatbot to consumers is treated as a provider of health care under the CMIA (California's medical-confidentiality law), and AI may not independently perform functions reserved to licensed clinicians **[S]**.
|
|
134
|
+
|
|
111
135
|
**Illinois BIPA** — see `lawsuit-vectors.md` §3. Required **before first capture**: written notice of collection and specific purpose, notice of the retention schedule and destruction guidelines, a **written release**, a publicly available retention/destruction policy, no profiting from biometrics, and reasonable-care storage **[V]**. Texas and Washington have AG-enforced analogues.
|
|
112
136
|
|
|
113
137
|
**Genetic data** — roughly 14 states require separate express consent per purpose and per disclosure; some allow private suits **[S]**. Treat raw DNA as opt-in-per-purpose and get counsel.
|
|
@@ -120,7 +144,7 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
120
144
|
|
|
121
145
|
## 5. AI laws
|
|
122
146
|
|
|
123
|
-
- **Colorado** — SB 24-205 never took effect: SB 26-189 (signed 14 May 2026) repealed and replaced it with a narrower automated-decision-making (ADMT) disclosure law effective **1 Jan 2027** — point-of-interaction notice, post-adverse-decision explanation, correction and human-review rights for consequential decisions. Repeal-and-reenact confirmed on leg.colorado.gov **[V]**; the 1 Jan 2027 date and obligation detail
|
|
147
|
+
- **Colorado** — SB 24-205 never took effect: SB 26-189 (signed 14 May 2026) repealed and replaced it with a narrower automated-decision-making (ADMT) disclosure law effective **1 Jan 2027** — point-of-interaction notice, post-adverse-decision explanation, correction and human-review rights for consequential decisions. Repeal-and-reenact confirmed on leg.colorado.gov **[V]**; the 1 Jan 2027 date and obligation detail are consistent across law-firm summaries **[S]**. AG rules (4 CCR 904-6, also covering the HB 26-1263 chatbot law): proposed 11 Aug 2026, interim draft 6 Oct, comments close 26 Oct 2026 **[V]** (coag.gov/ai), with the rulemaking hearing that day **[S]**. Final rules are due by 1 Jan 2027 and pending xAI litigation could still delay it; re-check before building **[S]**.
|
|
124
148
|
- **Texas TRAIGA (HB 149)** — signed 22 Jun 2025, effective 1 Jan 2026 (capitol.texas.gov bill history, 3 Oct 2026), reaching out-of-state developers whose AI is accessible to Texas users. Intent-based liability for AI that promotes self-harm, facilitates crime, discriminates, or produces prohibited deepfakes. AG-only with a 60-day cure; **safe harbour for documented NIST AI RMF-aligned compliance** **[V]**. Practical step for a small dev: a one-page RMF-aligned policy plus retained prompt/eval logs.
|
|
125
149
|
- **Illinois HB 3773** — from 1 Jan 2026, using AI with a discriminatory *effect* in employment violates the state human-rights act; intent is no defence **[V]**.
|
|
126
150
|
- **NYC Local Law 144** — annual independent bias audit plus published summary and candidate notice for automated employment decision tools used for NYC roles **[V]**.
|
|
@@ -136,7 +160,7 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
136
160
|
- **FTC Act §5** — any statement in your privacy policy, marketing page, app-store listing or in-app copy that is not literally true of your code is deception. Dark patterns in consent and cancellation flows are deception/unfairness; failure to maintain reasonable security is unfairness **[V]**. No federal PRA, but most state UDAP analogues have one.
|
|
137
161
|
- **Consumer Reviews and Testimonials Rule** — prohibits fake, incentivised-by-sentiment, and undisclosed insider reviews, with civil penalties in the tens of thousands per violation; enforcement is active **[V]**.
|
|
138
162
|
- **Negative option / click-to-cancel** — the 2024 rule was vacated by the Eighth Circuit on 8 July 2025; the FTC published a new advance notice of proposed rulemaking in March 2026, so no new federal rule is in force **[S]**. The FTC keeps pleading the same three duties (disclose terms, express informed consent, easy cancel) under §5 and ROSCA. Do not tell a user they are safe: ROSCA and roughly 30 state auto-renewal laws still govern, and California's amended law broadened liability **[V]**.
|
|
139
|
-
- **TCPA** — see `lawsuit-vectors.md` §4. Consent records, revocation handling on any channel, quiet hours in the recipient's timezone, DNC scrubbing, carrier campaign registration **[V]**. Revocation: opt-outs must be honoured within 10 business days **[S]**.
|
|
163
|
+
- **TCPA** — see `lawsuit-vectors.md` §4. Consent records, revocation handling on any channel, quiet hours in the recipient's timezone, DNC scrubbing, carrier campaign registration **[V]**. Revocation: opt-outs must be honoured within 10 business days **[S]**. FCC 26-67 (adopted 30 Sep 2026, released 1 Oct) replaces the 2024 "revoke-all" rule and its 31 Jan 2027 date: an opt-out from an informational message may be limited to that category, a marketing opt-out still stops all marketing, callers may designate an exclusive opt-out method, and the 10-business-day window stays **[V]**. It takes effect 30 days after Federal Register publication **[V]**; publication was not found at 22 Oct 2026, so the effective date is **[U]**. Build to the strict reading: any STOP-type reply stops all marketing on every channel.
|
|
140
164
|
- **CAN-SPAM** — accurate headers and subject, advertising identification, **valid physical postal address**, working opt-out honoured within **10 business days** and functional for 30 days after send; you are liable for your sending platform and affiliates **[V]**.
|
|
141
165
|
- **State breach notification** — all states; deadlines and AG-notice thresholds vary; several sector rules add shorter clocks **[V]**.
|
|
142
166
|
- **ADA accessibility** — **Title II** (state and local government, including their contractors' web and app content): a DOJ interim final rule of 20 Apr 2026 moved the WCAG 2.1 AA compliance dates to **26 Apr 2027** (population ≥50,000) and **26 Apr 2028** (smaller entities and special districts); the technical standard is unchanged and DOJ signalled further review **[S]** (law-firm and SBA Office of Advocacy reports; the Federal Register text was not retrieved). **Title III** (private businesses) has no technical rule and no deadline — exposure is private litigation, which rose in 2025: 3,117 federal website suits, up 27% on 2024, over 5,000 counting state courts, with e-commerce the main target **[S]**. WCAG 2.1 AA is the practical benchmark; build to 2.2 AA.
|
|
@@ -167,4 +191,4 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
167
191
|
|
|
168
192
|
## 8. Verify before relying
|
|
169
193
|
|
|
170
|
-
Colorado AG rules under SB 26-189 · Vermont and Nebraska children's-code dates ·
|
|
194
|
+
Colorado AG rules under SB 26-189 · Vermont and Nebraska children's-code dates · FCC 26-67 effective date (Federal Register publication) · Utah, Louisiana and Alabama app-store law dates and litigation · DOJ's further Title II review · state privacy laws taking effect in 2027 · VPPA scope · state mini-TCPA and mini-wiretap lists · genetic-privacy specifics per state · SaaS sales-tax nexus.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: durable
|
|
3
|
-
description: "Use
|
|
3
|
+
description: "Use to keep stored data from being lost: before running or writing anything that could delete, overwrite or reshape it, and when asked whether data is backed up and recoverable. Do NOT use for read-only queries or query speed."
|
|
4
4
|
license: Data-durability engineering guidance, not a DBA certification. Sources and snapshot date are recorded at the foot of each reference file.
|
|
5
|
-
compatibility: Snapshot dated 3 October 2026
|
|
5
|
+
compatibility: Snapshot dated 3 October 2026; Prisma 7/8 status and agent safeguards, PostgreSQL 19 status and the Neon, RDS and D1 retention rows re-verified 22 October 2026. Re-verify version behaviours and provider defaults before asserting them as current.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Durable
|
|
@@ -15,17 +15,17 @@ compatibility: Snapshot dated 3 October 2026. Version behaviours, provider reten
|
|
|
15
15
|
| Writing code that touches stored data (table, migration, import, delete endpoint, webhook write, backup cron) | **Inline gate** | Apply binding defaults; one line on the guard you built; keep building. |
|
|
16
16
|
| Asked "is my data safe / back up my app", a migration is about to hit production, or after a data scare | **Full pass** | Run the full-pass workflow. |
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Never say data is "safe": say what loss is survivable and what is not.
|
|
19
19
|
|
|
20
20
|
## Agent gate — binding rules for you, the agent
|
|
21
21
|
|
|
22
|
-
Coding agents have wiped production data
|
|
22
|
+
Coding agents have wiped production data during a natural-language code freeze (Replit, July 2025; `references/agent-db-safety.md`). These rules are the mechanism.
|
|
23
23
|
|
|
24
|
-
1. **Identify the target before every command.** Resolve which database the command will hit
|
|
24
|
+
1. **Identify the target before every command.** Resolve which database the command will hit. Classify it `throwaway` / `shared-dev` / `may-hold-real-data` using the detection list in `references/agent-db-safety.md`. Unknown = `may-hold-real-data`.
|
|
25
25
|
2. **On `may-hold-real-data`, read-only by default.** Inspect with `SELECT`/`EXPLAIN`/`\d`, a read-only role, or `BEGIN READ ONLY`. No DDL, no writes, no `migrate dev|reset`, `db push`, `--force`, `--accept-data-loss`, `flush`, `dropDatabase`, `TRUNCATE`, seed scripts.
|
|
26
26
|
3. **Destructive or schema-changing commands on real data require all of:** (a) a backup or PITR point you verified exists *for this database* (`RUNTIME` or provider-console evidence, not assumption), (b) a dry-run count of affected rows shown to the user, (c) the exact command shown, and (d) the user's explicit go-ahead in this conversation for that command. "Go ahead and fix it" does not cover a `DROP`.
|
|
27
|
-
4. **Experiment on a branch, not the original.**
|
|
28
|
-
5. **Never bypass a tool's safety interlock yourself.** If a CLI refuses because it detected an agent (e.g. Prisma's AI-consent check) or asks for confirmation
|
|
27
|
+
4. **Experiment on a branch, not the original.** Use a provider branch, restored clone or local copy; prove the change there, then hand back the production step with evidence.
|
|
28
|
+
5. **Never bypass a tool's safety interlock yourself.** If a CLI refuses because it detected an agent (e.g. Prisma 7's AI-consent check), a platform holds your request for the user's approval (e.g. Prisma Console agent approvals), or a prompt asks for confirmation: stop and ask. Never set a consent variable, approve your own request, or pass `--force`/`--yes` on your own initiative.
|
|
29
29
|
6. **Surprising results mean stop, not fix.** Empty tables, missing rows, failed restores: report what you observed and ask. Never "repair" by recreating, reseeding, or fabricating data, and never declare data unrecoverable without checking the provider's backups/PITR.
|
|
30
30
|
7. **Report exactly what you ran** — every command that touched a database, its target, and its result, including mistakes, immediately.
|
|
31
31
|
|
|
@@ -47,19 +47,18 @@ Also flag (do not silently fix) setups where the agent's shell holds production
|
|
|
47
47
|
|
|
48
48
|
- **Migration tooling from the first table.** Generate without applying (`prisma migrate dev --create-only`, `drizzle-kit generate`), read the SQL, apply via the deploy path (`prisma migrate deploy`, `drizzle-kit migrate`). Corrections are new migrations.
|
|
49
49
|
- **Destructive code carries its guard**: count-first, `WHERE` + batch, soft delete (`deleted_at` + partial unique index) for user-visible data.
|
|
50
|
-
- **Constraints in the store** per rule 1; integer cents or `NUMERIC` for money; `bigint`/UUID keys (
|
|
50
|
+
- **Constraints in the store** per rule 1; integer cents or `NUMERIC` for money; `bigint`/UUID keys (`uuidv7()` built in from Postgres 18).
|
|
51
51
|
- **Transactions around multi-write invariants**; across systems, use an outbox.
|
|
52
52
|
- **Idempotency keys on retried writes**: unique event/job IDs + `INSERT … ON CONFLICT`.
|
|
53
53
|
- **Batched, resumable bulk work** (keyset, fixed batch, checkpoint, sleep) — never one unbounded `UPDATE` on production.
|
|
54
54
|
- **Backups the moment real data exists**: confirm the plan actually includes them (free tiers often do not), add an off-account copy, state RPO/RTO where configured. Uploads need bucket versioning — DB backups do not cover objects.
|
|
55
|
-
- **Separate credentials per environment**; production URL never the default in local `.env`.
|
|
56
55
|
- **Serverless connections**: assume transaction-mode pooling (no session state); one pool per instance; release in `finally`.
|
|
57
56
|
- **SQLite as SQLite**: WAL, `busy_timeout`, `foreign_keys=ON` per connection, one writer, local disk, continuous or scheduled backup.
|
|
58
57
|
|
|
59
58
|
## Full-pass workflow
|
|
60
59
|
|
|
61
|
-
1. **Profile from the code.** Stores
|
|
62
|
-
2. **Define loss.** Recreatable
|
|
60
|
+
1. **Profile from the code.** Stores, migration tooling, write/delete paths, backup config, environments and credentials, and whether real user data exists.
|
|
61
|
+
2. **Define loss.** Recreatable vs unrecoverable (user content, uploads, payments), and rows ↔ files links.
|
|
63
62
|
3. **Sweep the seven areas** (detail in references):
|
|
64
63
|
|
|
65
64
|
| # | Area | Hunting for |
|
|
@@ -81,39 +80,33 @@ Also flag (do not silently fix) setups where the agent's shell holds production
|
|
|
81
80
|
| Medium | Bites at scale or in recovery: missing constraints, drift, non-idempotent jobs, non-atomic writes |
|
|
82
81
|
| Low | Hygiene; fix only when adjacent |
|
|
83
82
|
|
|
84
|
-
5. **
|
|
83
|
+
5. **Report, then fix what the user selects**, Critical and High first (three to five, each verified). Fix straight away only when the user asked for fixes.
|
|
85
84
|
6. **Verify.**
|
|
86
85
|
- *Restore drill* (any backup fix): note a point, insert a canary, restore to the point **into a separate location**, confirm the canary is absent, record wall-clock time as the real RTO. `RUNTIME` or it did not happen.
|
|
87
86
|
- *Guard drill* (destructive fix): on a copy, one row that must survive and one that must not; assert both.
|
|
88
87
|
- *Migration drill*: apply pending migrations to a branch or prod-shaped copy first, with `lock_timeout` set.
|
|
89
|
-
-
|
|
90
|
-
7. **Leave a guard behind
|
|
88
|
+
- Not run: label it unverified and give the exact command.
|
|
89
|
+
7. **Leave a guard behind** with tools already installed and the existing CI: CI migrations on a throwaway DB, a scheduled restore test, a constraint, or a read-only agent role. A new package or workflow (e.g. a migration linter) is a recommendation unless the user agrees.
|
|
91
90
|
8. **Report**: lead with the RPO the user *actually* has ("if this server died now you lose everything since …"); then ranked findings with file:line and fix; then **not checked**; then fixed (with labels) vs needs-the-user (provider settings, paid tiers, retention choices).
|
|
92
91
|
|
|
93
92
|
## Scaling: one agent or several
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
| Full pass, several stores/services/deployables, or more rows than you can read fully | One read-only child per disjoint slice, all in ONE `spawn_agent` call (≤ 6). `owl` for code slices; `researcher` for dated provider/version claims. |
|
|
100
|
-
| Production migration plan or "is my data safe" verdict | Add a fresh-context verifier child that tries to disprove the findings and the restore evidence. |
|
|
94
|
+
- Stay single-threaded for the agent gate, inline gate, small edits, and a full pass on one store and one deployable.
|
|
95
|
+
- Fan out a full pass over several stores, services or deployables: read-only repo helpers, one per disjoint slice of the ledger (7 areas × stores/services); a researcher for dated provider or version claims.
|
|
96
|
+
- Helpers never connect to or run commands against any database. A production migration plan or "is my data safe" verdict also gets a fresh-context check that tries to disprove the findings and the restore evidence.
|
|
97
|
+
- **Database commands are never parallel.** Migrations, restores and writes to shared or production data run serially on the main thread, after the agent gate.
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
- **Child briefs are self-contained**: absolute skill root, which reference to read, slice paths, owned rows, evidence labels, output schema (findings with file:line, label, severity, fix; `checked` / `not checked` lists), and: *read-only — never connect to or run commands against any database*.
|
|
104
|
-
- **Child output is evidence, not truth**: re-open each file:line before reporting.
|
|
105
|
-
- **Database commands are never parallel.** Migrations, restores, and any write against shared or production data are executed serially by the main thread after the agent gate — never by children. Code fixes are main-thread or `bee` on strictly disjoint files; run checks once after merging.
|
|
99
|
+
Helper types, brief contents and merge rules come with the skill loader.
|
|
106
100
|
|
|
107
101
|
## Honesty rules
|
|
108
102
|
|
|
109
103
|
- "Backups are configured" is `CODE`; "recoverable" needs a `RUNTIME` restore. Never say "safe".
|
|
110
|
-
- Provider retention, tiers and version behaviour are `SNAPSHOT` with a date — verify before quoting.
|
|
111
104
|
- Never claim data is gone, or restored, without checking. A fabricated restore test is the worst lie this skill could tell.
|
|
112
105
|
|
|
113
106
|
## Reference map
|
|
114
107
|
|
|
115
|
-
Resolve paths from the
|
|
108
|
+
Resolve paths from the skill root; load only what the profile triggers.
|
|
116
109
|
|
|
117
|
-
- `references/agent-db-safety.md` — incident
|
|
118
|
-
- `references/migrations-and-schema.md` — expand/contract, lock-safety table
|
|
119
|
-
- `references/backups-and-runtime.md` — tiers
|
|
110
|
+
- `references/agent-db-safety.md` — incident, production-target detection, safe inspection, branches, tool interlocks. Before any agent-run command on a non-throwaway database; area 3.
|
|
111
|
+
- `references/migrations-and-schema.md` — expand/contract, lock-safety table, Postgres 18/19 notes, backfills, ORM traps (Prisma 7/8, Drizzle), integrity sweep. Areas 2, 4, 6.
|
|
112
|
+
- `references/backups-and-runtime.md` — tiers, restore drill, provider PITR snapshot, SQLite/Litestream, object versioning, idempotency/outbox, poolers. Areas 1, 5, 7.
|
|
@@ -49,7 +49,7 @@ Run the migration on the branch, record the result and timing, then present the
|
|
|
49
49
|
|
|
50
50
|
## Tool interlocks — respect, never bypass
|
|
51
51
|
|
|
52
|
-
- **Prisma** (`SNAPSHOT`):
|
|
52
|
+
- **Prisma** (`SNAPSHOT` 22 Oct 2026): the Prisma 7 CLI refuses dangerous actions such as `migrate reset` when it detects an AI agent, until `PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION` holds the user's exact consent message. Stop and ask; only the user's literal words may be passed. Separately, Prisma Console now enrolls a coding agent with its own credential: by default it works freely on preview branches, and writes to production, deletes and connection-string creation wait for the user's approval in the Console. Never approve your own request or use the user's login to get around it.
|
|
53
53
|
- Prompts like "data loss will occur, continue?" (`db push`, `drizzle-kit push`) are a stop sign. Never pipe `yes`, never add `--force`/`--accept-data-loss` yourself.
|
|
54
54
|
- Prefer commands that print the plan without applying: `prisma migrate diff`, `drizzle-kit generate` (then read SQL), Rails `db:migrate:status`, Django `sqlmigrate` / `migrate --plan`.
|
|
55
55
|
|
|
@@ -66,4 +66,4 @@ Before any `DELETE`/`UPDATE` you are asked to run: execute the same `WHERE` as `
|
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
|
-
**Provenance:** snapshot 3 October 2026. Sources (accessed 3 Oct 2026): The Register via Slashdot, 21 Jul 2025 — https://developers.slashdot.org/story/25/07/21/1338204/ ; heise, 25 Jul 2025 — https://www.heise.de/en/news/Artificial-intelligence-Vibe-coding-service-Replit-deletes-production-database-10499597.html ; incident summary — https://openleash.com/blog/ai-agents-deleted-production-databases-replit-pocketos ; Prisma CLI reference (AI-agent consent) — https://www.prisma.io/docs/orm/reference/prisma-cli-reference . Branching surfaces from provider docs; verify flags before asserting.
|
|
69
|
+
**Provenance:** snapshot 3 October 2026. Sources (accessed 3 Oct 2026): The Register via Slashdot, 21 Jul 2025 — https://developers.slashdot.org/story/25/07/21/1338204/ ; heise, 25 Jul 2025 — https://www.heise.de/en/news/Artificial-intelligence-Vibe-coding-service-Replit-deletes-production-database-10499597.html ; incident summary — https://openleash.com/blog/ai-agents-deleted-production-databases-replit-pocketos ; Prisma 7 CLI reference (AI-agent consent, re-verified 22 Oct 2026) — https://www.prisma.io/docs/orm/v7/reference/prisma-cli-reference ; Prisma agent enrollment (22 Oct 2026) — https://www.prisma.io/changelog/2026-10-02 . Branching surfaces from provider docs; verify flags before asserting.
|
|
@@ -22,17 +22,17 @@ Pick both consciously; they dictate the tier. An app where users type for hours
|
|
|
22
22
|
|
|
23
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.
|
|
24
24
|
|
|
25
|
-
### Managed-provider baselines (`SNAPSHOT` 3 Oct 2026
|
|
25
|
+
### Managed-provider baselines (`SNAPSHOT` — Neon, AWS RDS, Cloudflare D1 re-checked on official docs 22 Oct 2026; other rows unchecked since 3 Oct 2026; verify the project's actual settings before quoting)
|
|
26
26
|
|
|
27
27
|
| Provider | What the docs say |
|
|
28
28
|
|---|---|
|
|
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 |
|
|
29
|
+
| Supabase (3 Oct 2026) | 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
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 |
|
|
31
|
+
| PlanetScale Postgres (3 Oct 2026) | Scheduled + on-demand backups and PITR via WAL archiving; check the branch's schedule |
|
|
32
32
|
| AWS RDS | Retention 0–35 days; default 1 day via API/CLI, 7 days via console. 0 disables automated backups and PITR |
|
|
33
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 |
|
|
34
|
+
| Turso (3 Oct 2026) | PITR: Free 24 hours; Developer 10, Scaler 30, Pro 90 days; deleted DBs restorable up to 5 days on paid plans |
|
|
35
|
+
| Firestore (3 Oct 2026) | Without PITR, version retention is 1 hour; enabling PITR gives 7 days. Scheduled exports for longer history |
|
|
36
36
|
| MongoDB Atlas | Cloud backups / continuous backup by cluster tier — not verified this snapshot; check the cluster's backup policy |
|
|
37
37
|
|
|
38
38
|
Not re-verified this snapshot (removed): Crunchy Bridge numbers. Aurora: same 1–35 day continuous backup model as RDS — confirm per cluster.
|
|
@@ -90,4 +90,4 @@ Check-then-act without a constraint (`if not exists: insert`) is a bug that just
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
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.
|
|
93
|
+
**Provenance:** snapshot 3 October 2026; Neon restore window, RDS retention and D1 Time Travel re-checked 22 Oct 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 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.
|
|
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 unless dated otherwise (Prisma and PostgreSQL 19 status re-verified 22 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
|
|
|
@@ -40,7 +40,7 @@ What common DDL actually does to a live table (`SNAPSHOT` — verify per version
|
|
|
40
40
|
|
|
41
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
42
|
|
|
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.
|
|
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. PostgreSQL 19 (RC1 15 Oct 2026, GA planned 19 Nov 2026 — `SNAPSHOT` 22 Oct 2026) adds a built-in `REPACK` command; plain `REPACK` takes `ACCESS EXCLUSIVE`, `REPACK (CONCURRENTLY)` avoids it — on 19+ prefer it over installing `pg_repack` for bloat, after checking the running version.
|
|
44
44
|
|
|
45
45
|
## Resumable backfill skeleton
|
|
46
46
|
|
|
@@ -61,7 +61,8 @@ From application code the same shape applies: select batch by `id > last`, write
|
|
|
61
61
|
|
|
62
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.
|
|
63
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.
|
|
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. Prisma 6 gets security patches only until 19 Nov 2026.
|
|
65
|
+
- **Prisma ORM 8** (`SNAPSHOT` 22 Oct 2026): still a release candidate (GA expected Oct 2026), but `npm install prisma` / `npx prisma` already resolve to the v8 CLI, which does not read `schema.prisma` and has no `generate`, `migrate dev` or `db push`. A Prisma 7 project must pin `prisma@7` in `package.json`; an unpinned `npx prisma migrate …` is a finding. Prisma 7 stays supported for 18 months after v8 GA.
|
|
65
66
|
- **`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.
|
|
66
67
|
- **Never edit an applied migration.** The hash changes, history diverges, teammates' databases desync. Corrections are new migrations.
|
|
67
68
|
- **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.
|
|
@@ -83,4 +84,4 @@ From application code the same shape applies: select batch by `id > last`, write
|
|
|
83
84
|
|
|
84
85
|
---
|
|
85
86
|
|
|
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.
|
|
87
|
+
**Provenance:** snapshot 3 October 2026. Re-verified 22 Oct 2026: Prisma release status https://www.prisma.io/docs/orm/release-status and changelog https://www.prisma.io/changelog/2026-10-02 ; PostgreSQL 19 RC1 https://www.postgresql.org/about/news/postgresql-19-rc-1-released-3409/ and https://www.postgresql.org/docs/19/sql-repack.html . 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,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lean
|
|
3
|
-
description: Use when speed or
|
|
3
|
+
description: "Use to make software faster or lighter when speed, memory, CPU or size is the problem. Do NOT use for correctness bugs."
|
|
4
|
+
# Checklist audits only (Security, Dependencies, Secrets / Performance); hidden from routine coding after the 27 Oct 2026 skill-value bench.
|
|
5
|
+
hidden: true
|
|
4
6
|
license: Performance engineering guidance, not a benchmark certification. Sources and snapshot date are recorded at the foot of each reference file.
|
|
5
|
-
compatibility: Snapshot dated 3 October 2026
|
|
7
|
+
compatibility: Snapshot dated 3 October 2026; Node release schedule, Core Web Vitals browser support and the current Next.js version re-verified 22 October 2026. Thresholds and tool names decay — re-verify before asserting them as current.
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Lean
|
|
@@ -13,48 +15,40 @@ compatibility: Snapshot dated 3 October 2026. Thresholds, tool names, and defaul
|
|
|
13
15
|
|---|---|---|
|
|
14
16
|
| Writing or editing a feature (any size) | **Inline gate** | Apply *Binding defaults* + *AI-code traps* while you write. One line in the reply on what you did. No benchmarks, no spawning. |
|
|
15
17
|
| Asked "make it faster / why slow / eating RAM / will it run smoothly", a regression, pre-ship | **Full pass** | Run *Full-pass workflow*. Read `references/playbooks.md` sections for the stacks found; `references/memory-and-processes.md` for any memory or process finding. |
|
|
16
|
-
| About to run `kill`/`pkill`/`taskkill`, or "stop that stuck process" | **Process safety** | Obey *Never kill your own host* first. |
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
**Process safety:** kill only an exact PID you started (the bash tool's rule); a process using lots of CPU/RAM is a finding to report, not a target. Details: `references/memory-and-processes.md`.
|
|
20
|
+
|
|
21
|
+
On from the first line of code: never ship the heavy version intending to "optimize later".
|
|
19
22
|
|
|
20
23
|
## Governing rules
|
|
21
24
|
|
|
22
|
-
1. **Measure, then cut.** In a pass, never optimize from vibes: baseline → find the bottleneck → fix → re-measure.
|
|
23
|
-
2. **Fix the shared cause once.** The N+1 belongs in the query layer, not a memo at each call site.
|
|
24
|
-
3. **Optimize user time, not machine time.** Startup, first paint, navigation, hot interactions, the nightly job.
|
|
25
|
-
4. **Memory should be flat.** After N cycles of the core loop, committed memory ≈ after 1. A climbing staircase is a leak
|
|
26
|
-
5. **Nothing outlives its job.** Timers, listeners,
|
|
25
|
+
1. **Measure, then cut.** In a pass, never optimize from vibes: baseline → find the bottleneck → fix → re-measure. Build-mode defaults apply without benchmarking.
|
|
26
|
+
2. **Fix the shared cause once.** The N+1 belongs in the query layer, not a memo at each call site.
|
|
27
|
+
3. **Optimize user time, not machine time.** Startup, first paint, navigation, hot interactions, the nightly job.
|
|
28
|
+
4. **Memory should be flat.** After N cycles of the core loop, committed memory ≈ after 1. A climbing staircase is a leak; a sawtooth back to baseline is GC.
|
|
29
|
+
5. **Nothing outlives its job.** Timers, listeners, subscriptions, watchers, child processes, temp files, locks: each has an owner that ends it on success *and* every failure path.
|
|
27
30
|
6. **Bounded by default.** Cache, queue, buffer, retry, log, list render: cap and eviction policy at creation.
|
|
28
|
-
7. **Small is fast.**
|
|
31
|
+
7. **Small is fast.** Deleting dead code, unused deps and duplicate styles is the cheapest optimization.
|
|
29
32
|
8. **Numbers or silence.** Before/after on the same machine and data, cold and warm. Say what moved, X → Y, and what you could not measure.
|
|
30
|
-
9. **No perf theater.** Complexity must pay for itself in measured user time, or revert it.
|
|
31
|
-
10. **Label evidence** on every claim: `RUNTIME` (measured), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source).
|
|
32
|
-
|
|
33
|
-
## Never kill your own host
|
|
34
|
-
|
|
35
|
-
Agent sessions run *inside* a host process (EZ Coder's daemon/sidecar, an editor, a terminal multiplexer). Killing it kills this session and every sibling session mid-turn. This has happened.
|
|
36
|
-
|
|
37
|
-
- **Never kill by pattern.** No `pkill -f`, `killall`, `kill $(pgrep …)`, `taskkill /IM`, or loops over `ps | grep` output. Kill only an **exact PID or process group you started in this task** (you hold the PID from your own spawn or background-task handle).
|
|
38
|
-
- **Before touching any PID you did not start:** walk its ancestry (`ps -o pid,ppid,command -p <pid>`, repeat up the PPID chain) and your own (`$$`, `$PPID` upward). If it is you, an ancestor, or another instance of the same host binary (e.g. another `app-sidecar`/daemon) — **do not kill. Report it.**
|
|
39
|
-
- **A process using lots of CPU/RAM is a finding, not a target.** Report PID, command, RSS, age; recommend the fix. Orphan cleanup belongs to the app's startup sweep, never to a live session.
|
|
40
|
-
- Unsure whether you own it? You don't. Ask the user.
|
|
33
|
+
9. **No perf theater.** Complexity must pay for itself in measured user time, or revert it.
|
|
34
|
+
10. **Label evidence** on every claim: `RUNTIME` (measured), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source).
|
|
41
35
|
|
|
42
36
|
## Binding defaults (build mode)
|
|
43
37
|
|
|
44
|
-
- **Teardown ships with the feature.** Whatever you start is torn down in the same module, success and error paths. One cleanup handle per owner
|
|
38
|
+
- **Teardown ships with the feature.** Whatever you start is torn down in the same module, success and error paths. One cleanup handle per owner (`AbortController`, `dispose()`, `finally`).
|
|
45
39
|
- **Cap every accumulation.** LRU/TTL cache, bounded queue, paginated query, virtualized long list, capped retries with backoff + jitter, rotating logs.
|
|
46
|
-
- **Never block the interactive thread.** Work that can exceed a frame (web long-task threshold: 50 ms) is chunked (`scheduler.yield()` where supported, else `setTimeout` chunking), deferred, or moved to a worker / utility process / background thread.
|
|
47
|
-
- **Lazy by default, eager only for the first screen.** Rare routes, heavy editors, charts, optional SDKs: dynamic `import()
|
|
40
|
+
- **Never block the interactive thread.** Work that can exceed a frame (web long-task threshold: 50 ms) is chunked (`scheduler.yield()` where supported, else `setTimeout` chunking), deferred, or moved to a worker / utility process / background thread.
|
|
41
|
+
- **Lazy by default, eager only for the first screen.** Rare routes, heavy editors, charts, optional SDKs: dynamic `import()`.
|
|
48
42
|
- **Right-size media.** AVIF/WebP with fallback, explicit `width`/`height`, `srcset`/`sizes`, `loading="lazy"` below the fold, `fetchpriority="high"` on the one LCP image only — never lazy-load it.
|
|
49
43
|
- **Stream, don't hoard.** Stream files and large responses; cursor-paginate queries; chunk big jobs.
|
|
50
44
|
- **Timeout everything external.** Network, subprocesses, locks, queues — and tear down on timeout.
|
|
51
45
|
- **Price a dependency before adopting it** in anything user-facing (bundle impact client-side; `node --cpu-prof -e "require('mod')"` server/desktop).
|
|
52
46
|
- **Batch I/O.** One query for N rows; DOM reads before writes; debounce/throttle expensive handlers.
|
|
53
|
-
- **Events over polling.** Prefer push (WebSocket/SSE,
|
|
47
|
+
- **Events over polling.** Prefer push (WebSocket/SSE, watchers, webhooks). If you must poll: slowest tolerable interval, back off when idle, pause when hidden, stop on unmount.
|
|
54
48
|
|
|
55
49
|
## AI-code traps (check every generated diff)
|
|
56
50
|
|
|
57
|
-
|
|
51
|
+
Scan your own diff before replying.
|
|
58
52
|
|
|
59
53
|
| Trap | Detect | Fix |
|
|
60
54
|
|---|---|---|
|
|
@@ -70,9 +64,9 @@ The patterns agents produce most. Scan your own diff for them before replying.
|
|
|
70
64
|
|
|
71
65
|
## Full-pass workflow
|
|
72
66
|
|
|
73
|
-
1. **Profile the target from the code.** Shape
|
|
74
|
-
2. **Baseline, or say you cannot.**
|
|
75
|
-
3. **Sweep the
|
|
67
|
+
1. **Profile the target from the code.** Shape, surfaces users wait on, scale, platform constraints (low-end devices over the dev machine). Build the coverage ledger: areas × units.
|
|
68
|
+
2. **Baseline, or say you cannot.** Startup, p50/p99 latency, bundle sizes, RSS/heap at rest and after repeated cycles (`references/playbooks.md`). If nothing runs, do a `CODE`-labeled static pass and say plainly nothing was measured.
|
|
69
|
+
3. **Sweep the five areas, in order:**
|
|
76
70
|
|
|
77
71
|
| # | Area | Hunting |
|
|
78
72
|
|---|---|---|
|
|
@@ -80,10 +74,9 @@ The patterns agents produce most. Scan your own diff for them before replying.
|
|
|
80
74
|
| 2 | Runtime responsiveness | Long tasks / long animation frames, layout thrash, re-render storms, N+1, sync hot paths, missing pagination/virtualization, allocation churn |
|
|
81
75
|
| 3 | Memory | Forgotten timers/listeners/observers, detached DOM, unbounded maps, large captured closures, non-GC cycles, full-size media, whole-file loads |
|
|
82
76
|
| 4 | Processes & lifecycle | Unreaped children, orphans (killed node not tree), no signal handling, leaked ports/fds/locks/temp files, no startup sweep |
|
|
83
|
-
| 5 | Payload & dead weight | Unused deps/files/exports, dead CSS, two libs for one job, debug payloads shipped, tree-shaking blockers |
|
|
84
|
-
| 6 | Styling consistency | Same visual thing built three ways, literals duplicating tokens (design decisions are evidence-led-ui's call) |
|
|
77
|
+
| 5 | Payload & dead weight | Unused deps/files/exports, dead or duplicate CSS, two libs for one job, debug payloads shipped, tree-shaking blockers |
|
|
85
78
|
|
|
86
|
-
4. **Rank by user impact; fix the top three to five
|
|
79
|
+
4. **Rank by user impact; fix the top three to five**: straight away when the user asked to make it faster, otherwise report first and fix what they select.
|
|
87
80
|
|
|
88
81
|
| Severity | Meaning |
|
|
89
82
|
|---|---|
|
|
@@ -93,37 +86,30 @@ The patterns agents produce most. Scan your own diff for them before replying.
|
|
|
93
86
|
| Low | Dead code/styles, micro-tuning — only when adjacent to a real fix |
|
|
94
87
|
|
|
95
88
|
Record each baseline first. Prefer removing work over hiding it (delete the eager import > code-split it > defer it); prefer the platform primitive.
|
|
96
|
-
5. **Verify.** Re-measure exactly as baselined. Memory: cycle the path
|
|
97
|
-
6. **Leave one guard
|
|
89
|
+
5. **Verify.** Re-measure exactly as baselined. Memory: cycle the path, force GC, compare. Number didn't move → revert and say so.
|
|
90
|
+
6. **Leave one guard** with tools already installed and the existing CI: bundle budget, slow-query threshold, repeated-cycle memory assertion, a test that fails if the eager import returns. A guard needing a new package or CI workflow (`size-limit`, Lighthouse CI) is a recommendation unless the user agrees.
|
|
98
91
|
7. **Report.** Numbers first (X → Y, machine, data, date) → remaining findings ranked with file:line and fix → **not checked** list → changed vs recommended → dropped candidates (false positives). Label every claim.
|
|
99
92
|
|
|
100
93
|
## Scaling: one agent or several
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- **Ledger:** rows = six areas × in-scope units. Each row ends checked-with-findings / checked-clean / not-checked(reason).
|
|
110
|
-
- **Child brief (self-contained):** absolute skill root and which `references/*.md` sections to read; slice paths; owned ledger rows; evidence labels; output = findings (file:line, label, severity, fix) + explicit `checked` / `not checked` lists; "read-only: do not kill, start, or benchmark anything". Use `owl`, or a general-purpose child if it must load this skill.
|
|
111
|
-
- **Measurement does not fan out on one machine.** Benchmarks, load tests, and memory-cycle runs stay in the main thread, or one child per *separate environment*, so numbers stay comparable (same machine, same data, same build). Never run benchmarks in parallel on the same machine — they distort each other.
|
|
112
|
-
- **Merge:** a failed, timed-out, or silent child → its rows are `not checked`, never clean. Re-open every reported file:line before reporting it.
|
|
113
|
-
- **Large pre-ship pass:** one fresh-context verifier child tries to disprove the top findings.
|
|
114
|
-
- **Edits stay serialized** in the main thread (or `bee` children on strictly disjoint files); re-measure once after merging.
|
|
95
|
+
- Stay single-threaded for the inline gate, single fixes, and a full pass on one deployable you can read fully.
|
|
96
|
+
- Fan out static review for several deployables or more ledger rows (five areas × units) than you can read: read-only repo helpers, one per surface (frontend / backend / processes & lifecycle).
|
|
97
|
+
- One researcher for a dated threshold or tool-status claim.
|
|
98
|
+
- **Measurement does not fan out on one machine.** Benchmarks, load tests and memory-cycle runs stay in the main thread, or one per separate environment, so numbers stay comparable.
|
|
99
|
+
- Helpers never kill, start, or benchmark anything. Re-measure once after merging.
|
|
100
|
+
|
|
101
|
+
Helper types, brief contents and merge rules come with the skill loader.
|
|
115
102
|
|
|
116
103
|
## Honesty rules
|
|
117
104
|
|
|
118
105
|
- Never state or imply the software is "fast", "optimized", or "leak-free". State what was measured, fixed, and left unchecked.
|
|
119
106
|
- A lint rule, analyzer, or profiler is never proof of absence; tools find a minority of what matters.
|
|
120
107
|
- Never invent a number, threshold, or version. Date-sensitive and unverified → `SNAPSHOT` or "verify this".
|
|
121
|
-
- "I could not measure this" is a useful output. A fabricated confirmation is not.
|
|
122
108
|
- Prototype with no users or load → say proportionality applies and stop early.
|
|
123
109
|
|
|
124
110
|
## Reference map
|
|
125
111
|
|
|
126
112
|
Resolve paths from the installed skill root. Load only what the profile triggered.
|
|
127
113
|
|
|
128
|
-
- `references/playbooks.md` — per-stack measurement and sweeps: web (Core Web Vitals, LoAF, React/Next/Vite), Node/backend, data & N+1, Electron, Tauri, mobile, native, Python, payload/dead-code tooling,
|
|
129
|
-
- `references/memory-and-processes.md` — leak taxonomy and detection per runtime; process lifecycle: host-safety
|
|
114
|
+
- `references/playbooks.md` — per-stack measurement and sweeps: web (Core Web Vitals, LoAF, React/Next/Vite), Node/backend, data & N+1, Electron, Tauri, mobile, native, Python, payload/dead-code tooling, duplicate styles.
|
|
115
|
+
- `references/memory-and-processes.md` — leak taxonomy and detection per runtime; process lifecycle: host-safety detail, zombies, orphans, tree kills, graceful shutdown, startup sweeps, container PID 1, leaked handles.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Lean — per-stack playbooks
|
|
2
2
|
|
|
3
|
-
Load only the sections the profile triggered. Commands assume a POSIX shell unless noted. Claims
|
|
3
|
+
Load only the sections the profile triggered. Commands assume a POSIX shell unless noted. Claims carry `SNAPSHOT` with their date (most 3 Oct 2026; Node, Next.js and Core Web Vitals support re-verified 22 Oct 2026); tool versions and thresholds decay — re-verify with web access before asserting as current.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
Web frontend · React / Next.js / Vite · Node.js / backend / API · Electron · Tauri · Mobile · Native / compiled · Python · Data & queries (N+1) · Payload & dead weight (incl. duplicate styles)
|
|
6
8
|
|
|
7
9
|
## Web frontend
|
|
8
10
|
|
|
@@ -19,7 +21,7 @@ SEO blogs claim 2026 "tightenings" (LCP 2.0 s, stricter INP). None appear on web
|
|
|
19
21
|
**Measure:**
|
|
20
22
|
|
|
21
23
|
- Lab: Lighthouse (DevTools, or `npx lighthouse <url> --output json`), DevTools Performance panel (long tasks, long animation frames, layout shifts), Network waterfall, Coverage tab for shipped-but-unused JS/CSS.
|
|
22
|
-
- Field: the `web-vitals` npm package; use its **attribution build** (`import { onINP } from "web-vitals/attribution"`) to get INP phase breakdown (input delay / processing / presentation) and the **Long Animation Frames (LoAF)** entries for the slow interaction — LoAF names the script and function that blocked the frame. LoAF is Chromium-only (
|
|
24
|
+
- Field: the `web-vitals` npm package; use its **attribution build** (`import { onINP } from "web-vitals/attribution"`) to get INP phase breakdown (input delay / processing / presentation) and the **Long Animation Frames (LoAF)** entries for the slow interaction — LoAF names the script and function that blocked the frame. LCP and INP are Baseline Newly available since Safari 26.2 (Dec 2025), so RUM collects them in Safari too; LoAF is still Chromium-only (`SNAPSHOT` 22 Oct 2026); script attribution misses cross-origin iframes, workers, and extensions.
|
|
23
25
|
- SPAs: route changes after the first load are not separate page views in CrUX. Chrome's **Soft Navigations API** was in a final origin trial (Chrome 147–149) with a planned 2026 ship; how CrUX will use it is undecided (`SNAPSHOT`). Until it ships, measure SPA route transitions yourself (`performance.mark` around route change → next paint).
|
|
24
26
|
- Regression gate: Lighthouse CI with assertions (budgets on LCP/CLS/TBT and resource sizes) and/or `size-limit` on bundle bytes.
|
|
25
27
|
|
|
@@ -39,12 +41,12 @@ SEO blogs claim 2026 "tightenings" (LCP 2.0 s, stricter INP). None appear on web
|
|
|
39
41
|
## React / Next.js / Vite
|
|
40
42
|
|
|
41
43
|
- **React Compiler 1.0** (stable Oct 2025; works for React and React Native) auto-memoizes components and hooks. With it on, write plain code; React's guidance keeps `useMemo`/`useCallback` only as an escape hatch (e.g. a value used as an effect dependency). In existing code, don't mass-delete manual memo — removing it can change compiled output; remove only with tests. Without the compiler, memo only what the React DevTools Profiler implicates. The compiler does **not** fix effects: an effect that refetches on every render is still a bug.
|
|
42
|
-
- **Next.js 16** (Oct
|
|
44
|
+
- **Next.js 16** (16.4 current, `SNAPSHOT` 22 Oct 2026): Turbopack is the default bundler for dev and build. Caching is explicit — with `cacheComponents: true`, dynamic code runs per request and only `"use cache"` functions/components are cached (tune with `cacheLife`/`cacheTag`, invalidate with `revalidateTag`/`updateTag`). Perf checks: is expensive shared data cached? is per-user data kept out of shared cache (`"use cache: private"`)? is `"use client"` pushed down to leaves? are request waterfalls in server components parallelized? Turn on `reactCompiler: true` when the codebase passes the compiler's rules.
|
|
43
45
|
- **Vite 8** (stable 12 Mar 2026): Rolldown (Rust) replaces esbuild + Rollup as the single bundler; config key `build.rollupOptions` → `build.rolldownOptions`; needs Node 20.19+/22.12+. Vite 7 projects still use Rollup. Build-time wins are not runtime wins — measure the shipped bundle, not the build clock.
|
|
44
46
|
|
|
45
47
|
## Node.js / backend / API
|
|
46
48
|
|
|
47
|
-
**Runtime:** Node
|
|
49
|
+
**Runtime:** Node 24 has been in maintenance since 20 Oct 2026 (EOL 30 Apr 2028); Node 26 becomes Active LTS on 28 Oct 2026; Node 22 EOL 30 Apr 2027. From 27.x Node ships one major per year and every major becomes LTS (`SNAPSHOT` 22 Oct 2026, nodejs/Release schedule). New projects target 26. Bun/Deno: same rules apply; benchmark your workload before switching runtimes for speed — vendor benchmarks are not your app.
|
|
48
50
|
|
|
49
51
|
**Measure:** `autocannon` or `k6` for load (watch p99, not the average — the average lies), `clinic doctor` / `clinic flame` / `0x` for CPU and event-loop diagnosis, `--inspect` + Chrome DevTools for heap. DB: slow-query log, `EXPLAIN ANALYZE`.
|
|
50
52
|
|
|
@@ -123,10 +125,10 @@ Generators/streams instead of list-building for large data; vectorize hot loops
|
|
|
123
125
|
|
|
124
126
|
**Sweep list:** `knip` in CI; duplicate dependencies (`pnpm why <pkg>`, `npm ls <pkg>`) — two versions of one library is double weight; "two of the same job" audit (two icon sets, two date libs, two CSS systems, a utility lib plus hand-rolled copies of its functions); polyfills for browsers no longer supported; debug/symbol payloads shipped in release (strip; source maps to a symbol server, not the bundle); largest-files audit (`du`, bundle analyzer) — the top ten files are usually the whole story; unused assets in repos (images, fonts nobody references).
|
|
125
127
|
|
|
126
|
-
##
|
|
128
|
+
## Duplicate styles (payload view)
|
|
127
129
|
|
|
128
130
|
The rule: **one way to express one visual decision.** Hunt repeated rule blocks that differ by one value, spacing/color literals that duplicate existing design tokens, the same component styled three ways, utility classes wrapped around handwritten CSS doing the same job, dead rules for removed components. Each duplication is bytes today and divergence tomorrow. Kill the copies, keep the token. If resolving it requires a design *decision* (which of three styles is right), that call belongs to evidence-led-ui — coordinate rather than decide unilaterally.
|
|
129
131
|
|
|
130
132
|
---
|
|
131
133
|
|
|
132
|
-
**Provenance:** snapshot 3 October 2026 (
|
|
134
|
+
**Provenance:** snapshot 3 October 2026; re-verified 22 Oct 2026: Node schedule (https://github.com/nodejs/Release/blob/main/schedule.json , https://nodejs.org/en/blog/announcements/evolving-the-nodejs-release-schedule), LCP/INP Baseline (https://web.dev/blog/lcp-and-inp-are-now-baseline-newly-available), Next.js 16.4 (npm `next` latest). Other sources accessed 3 Oct 2026: https://web.dev/articles/vitals (thresholds); https://web.dev/articles/find-slow-interactions-in-the-field and https://developer.chrome.com/docs/web-platform/long-animation-frames (attribution build, LoAF); https://developer.chrome.com/blog/final-soft-navigations-origin-trial (Chrome 147–149, CrUX use undecided); Speculation Rules support from secondary 2026 coverage (corewebvitals.io, uploadcare.com — Chromium default, Safari 26.2 flag; re-verify on caniuse); https://react.dev/blog/2025/10/07/react-compiler-1; https://nextjs.org/docs/app/api-reference/directives/use-cache; https://vite.dev/blog/announcing-vite8; https://github.com/nodejs/Release/blob/main/schedule.json (Node release dates); https://docs.python.org/3/whatsnew/3.14.html (PEP 779); React Native 0.82 release coverage (New Architecture only, Hermes V1 experimental). Carried from the 17 Aug 2026 snapshot, not re-verified: Electron official performance tutorial (module cost, lazy loading, main-process blocking, profiling guidance), Rust std `process::Child` docs (zombie reaping), Knip documentation and 2026 ecosystem coverage (dead-code standard claim — `SNAPSHOT`), Valgrind/LeakCanary/Instruments/pprof public docs for tool usage. Version-specific flags and thresholds decay fastest; re-verify before asserting.
|