@kensaurus/skills 0.0.0-stage → 2.1.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/.claude-plugin/marketplace.json +53 -0
- package/.claude-plugin/plugin.json +40 -0
- package/.cursor-plugin/plugin.json +38 -0
- package/.mcp.json +28 -0
- package/CHANGELOG.md +1790 -0
- package/LICENSE +21 -0
- package/LICENSE-APACHE +62 -0
- package/NOTICE +13 -0
- package/README.md +821 -2
- package/SECURITY.md +55 -0
- package/agents/code-reviewer.md +60 -0
- package/agents/completion-judge.md +89 -0
- package/agents/db-migrator.md +125 -0
- package/agents/debugger.md +47 -0
- package/agents/deploy-checker.md +100 -0
- package/agents/perf-monitor.md +74 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-light.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +6 -0
- package/assets/og.png +0 -0
- package/bin/install.mjs +1127 -0
- package/bin/kenji.js +2 -0
- package/commands/adr.md +17 -0
- package/commands/aeo-plan.md +18 -0
- package/commands/arch-boundaries.md +17 -0
- package/commands/aso-plan.md +18 -0
- package/commands/auth-flows.md +19 -0
- package/commands/backup-plan.md +17 -0
- package/commands/burndown-full.md +25 -0
- package/commands/capacitor-plan.md +18 -0
- package/commands/codemod-safety.md +22 -0
- package/commands/commit.md +18 -0
- package/commands/complete-everything.md +40 -0
- package/commands/cost-plan.md +19 -0
- package/commands/deadcode-plan.md +26 -0
- package/commands/deadcode.md +32 -0
- package/commands/debug-issue.md +17 -0
- package/commands/deps-plan.md +18 -0
- package/commands/docs-plan.md +17 -0
- package/commands/doctrine.md +19 -0
- package/commands/error-plan.md +19 -0
- package/commands/feedback-to-closure.md +36 -0
- package/commands/fix-issue.md +76 -0
- package/commands/gate-logic.md +26 -0
- package/commands/green-repo.md +36 -0
- package/commands/grill-me.md +19 -0
- package/commands/gtm-plan.md +21 -0
- package/commands/gtm-weekly.md +17 -0
- package/commands/gtm.md +22 -0
- package/commands/handoff.md +15 -0
- package/commands/housekeep-backlog.md +18 -0
- package/commands/housekeep-files.md +22 -0
- package/commands/housekeep-gates.md +18 -0
- package/commands/instant-nav.md +11 -0
- package/commands/integrity-plan.md +19 -0
- package/commands/launch-kit.md +16 -0
- package/commands/mcp-guide.md +40 -0
- package/commands/mobile-plan.md +19 -0
- package/commands/native-rn-monorepo/README.md +78 -0
- package/commands/native-rn-monorepo/android-build.md +26 -0
- package/commands/native-rn-monorepo/android-install.md +32 -0
- package/commands/native-rn-monorepo/android-logcat.md +37 -0
- package/commands/native-rn-monorepo/ios-ci-logs.md +56 -0
- package/commands/native-rn-monorepo/ios-ci-status.md +52 -0
- package/commands/native-rn-monorepo/ios-ci-trigger.md +59 -0
- package/commands/native-rn-monorepo/rn-reset.md +50 -0
- package/commands/native-rn-monorepo/rn-ship-ios.md +67 -0
- package/commands/native-rn-monorepo/rn-verify.md +53 -0
- package/commands/perf-plan.md +18 -0
- package/commands/plan-mode.md +74 -0
- package/commands/pr.md +16 -0
- package/commands/pricing-plan.md +20 -0
- package/commands/privacy-plan.md +18 -0
- package/commands/readability.md +12 -0
- package/commands/readme.md +15 -0
- package/commands/refactor.md +15 -0
- package/commands/release-prep.md +17 -0
- package/commands/research.md +25 -0
- package/commands/responsive-audit.md +21 -0
- package/commands/review-code.md +18 -0
- package/commands/rls-plan.md +18 -0
- package/commands/secrets-plan.md +18 -0
- package/commands/security-plan.md +19 -0
- package/commands/ship-and-observe.md +36 -0
- package/commands/skill-conflicts.md +19 -0
- package/commands/slop-plan.md +18 -0
- package/commands/stub-plan.md +18 -0
- package/commands/test-mutation.md +16 -0
- package/commands/test-plan.md +17 -0
- package/commands/test.md +29 -0
- package/commands/thirdparty-web-interface-guidelines.md +185 -0
- package/commands/uiux-plan.md +18 -0
- package/commands/uiux.md +45 -0
- package/commands/update-deps.md +21 -0
- package/commands/validation-plan.md +19 -0
- package/commands-portable/fix-issue.md +72 -0
- package/commands-portable/plan-mode.md +92 -0
- package/commands-portable/research.md +91 -0
- package/docs/screenshots/README.md +5 -0
- package/docs/screenshots/audit-dark.png +0 -0
- package/docs/screenshots/build-dark.png +0 -0
- package/docs/screenshots/grill-dark.png +0 -0
- package/docs/screenshots/hero-dark.png +0 -0
- package/docs/screenshots/hero-light.png +0 -0
- package/docs/screenshots/ship-dark.png +0 -0
- package/docs/screenshots/src/showcase.html +320 -0
- package/hooks/completion-gate.mjs +258 -0
- package/hooks/cursor-hooks.json +13 -0
- package/hooks/hooks.json +15 -0
- package/install.sh +21 -0
- package/llms.txt +40 -0
- package/mcp/README.md +266 -0
- package/mcp/VERSIONS.md +41 -0
- package/mcp/mcp-full.json.template +124 -0
- package/mcp/mcp.json.template +29 -0
- package/mcp/pinned-versions.json +27 -0
- package/package.json +94 -4
- package/rules/approved-plan-execution.mdc +65 -0
- package/rules/full-stack-ship-discipline.mdc +37 -0
- package/rules/native-rn-monorepo/README.md +63 -0
- package/rules/native-rn-monorepo/_project.mdc +69 -0
- package/rules/native-rn-monorepo/native-android.mdc +72 -0
- package/rules/native-rn-monorepo/native-ios.mdc +61 -0
- package/rules/native-rn-monorepo/react-native-js.mdc +78 -0
- package/rules/native-rn-monorepo/web.mdc +60 -0
- package/rules/project-starter/components.mdc +54 -0
- package/rules/project-starter/data-fetching.mdc +77 -0
- package/rules/project-starter/git.mdc +41 -0
- package/rules/project-starter/supabase.mdc +37 -0
- package/rules/project-starter/tailwind.mdc +48 -0
- package/rules/project-starter/typescript.mdc +36 -0
- package/rules/project-starter/web-performance.mdc +42 -0
- package/rules/senior-engineer.mdc +30 -0
- package/rules/shell-first-search.mdc +19 -0
- package/rules/skill-workflows.mdc +35 -0
- package/rules/verification-before-completion.mdc +57 -0
- package/skills/audit-accessibility/SKILL.md +441 -0
- package/skills/audit-agent-speed/SKILL.md +181 -0
- package/skills/audit-agent-speed/scripts/stop-typecheck.mjs +151 -0
- package/skills/audit-analytics/SKILL.md +138 -0
- package/skills/audit-auth-flows/SKILL.md +267 -0
- package/skills/audit-backend-architecture/SKILL.md +266 -0
- package/skills/audit-backend-architecture/references/patterns.md +386 -0
- package/skills/audit-bundle-size/SKILL.md +295 -0
- package/skills/audit-cicd/SKILL.md +218 -0
- package/skills/audit-code-quality/SKILL.md +314 -0
- package/skills/audit-code-review/SKILL.md +289 -0
- package/skills/audit-codemod-safety/SKILL.md +159 -0
- package/skills/audit-db-schema/SKILL.md +465 -0
- package/skills/audit-db-schema/references/details.md +110 -0
- package/skills/audit-doctrine/SKILL.md +189 -0
- package/skills/audit-env-parity/SKILL.md +133 -0
- package/skills/audit-fe-api/SKILL.md +458 -0
- package/skills/audit-gate-logic/SKILL.md +219 -0
- package/skills/audit-i18n/SKILL.md +339 -0
- package/skills/audit-infra-cost/SKILL.md +142 -0
- package/skills/audit-langfuse-llm/SKILL.md +468 -0
- package/skills/audit-langfuse-llm/references/details.md +226 -0
- package/skills/audit-llm-security/SKILL.md +147 -0
- package/skills/audit-monetization-iap/SKILL.md +137 -0
- package/skills/audit-payment-system/SKILL.md +268 -0
- package/skills/audit-payment-system/references/checklist.md +283 -0
- package/skills/audit-performance/SKILL.md +383 -0
- package/skills/audit-performance/references/loading-priority-2026.md +81 -0
- package/skills/audit-realworld/SKILL.md +287 -0
- package/skills/audit-registry-listing/SKILL.md +122 -0
- package/skills/audit-resilience/SKILL.md +153 -0
- package/skills/audit-responsive/SKILL.md +221 -0
- package/skills/audit-responsive/references/checklist.md +166 -0
- package/skills/audit-security/SKILL.md +289 -0
- package/skills/audit-skill-conflicts/SKILL.md +178 -0
- package/skills/audit-ui-states/SKILL.md +146 -0
- package/skills/audit-uiux-design-system/SKILL.md +475 -0
- package/skills/audit-uiux-design-system/references/details.md +71 -0
- package/skills/audit-ux/SKILL.md +381 -0
- package/skills/audit-ux/references/details.md +245 -0
- package/skills/audit-ux-journeys/SKILL.md +215 -0
- package/skills/audit-ux-journeys/references/checklist.md +179 -0
- package/skills/backend-db-performance/SKILL.md +441 -0
- package/skills/backend-error-handling/SKILL.md +489 -0
- package/skills/backend-error-handling/references/details.md +58 -0
- package/skills/backend-observability/SKILL.md +88 -0
- package/skills/backend-patterns/SKILL.md +499 -0
- package/skills/backend-patterns/references/architecture-patterns.md +298 -0
- package/skills/backend-realtime/SKILL.md +403 -0
- package/skills/backend-realtime/references/patterns.md +74 -0
- package/skills/burndown-full/SKILL.md +174 -0
- package/skills/complete-everything/SKILL.md +295 -0
- package/skills/data-pipeline/SKILL.md +109 -0
- package/skills/data-visualization/SKILL.md +488 -0
- package/skills/debug-error/SKILL.md +322 -0
- package/skills/debug-fe-be-integration/SKILL.md +459 -0
- package/skills/debug-sentry-monitor/SKILL.md +497 -0
- package/skills/debug-sentry-monitor/references/details.md +165 -0
- package/skills/deploy-npm/SKILL.md +394 -0
- package/skills/deploy-npm/references/example-mushi-mushi.md +52 -0
- package/skills/deploy-verify/SKILL.md +489 -0
- package/skills/design-api/SKILL.md +379 -0
- package/skills/design-canvas/SKILL.md +155 -0
- package/skills/design-email/SKILL.md +370 -0
- package/skills/design-frontend/SKILL.md +143 -0
- package/skills/design-generative-art/SKILL.md +474 -0
- package/skills/design-mobile-first/SKILL.md +506 -0
- package/skills/design-motion/SKILL.md +333 -0
- package/skills/design-motion/references/delight-interactions.md +191 -0
- package/skills/design-prd/SKILL.md +443 -0
- package/skills/design-system/SKILL.md +457 -0
- package/skills/design-theme/SKILL.md +226 -0
- package/skills/design-theme/themes/tsumagoi-ranch.md +150 -0
- package/skills/docs-adr/SKILL.md +168 -0
- package/skills/docs-coauthor/SKILL.md +368 -0
- package/skills/docs-comparison-pages/SKILL.md +117 -0
- package/skills/docs-domain-modeling/SKILL.md +97 -0
- package/skills/docs-launch-kit/SKILL.md +139 -0
- package/skills/docs-writer/SKILL.md +469 -0
- package/skills/enhance-agent-guardrails/SKILL.md +164 -0
- package/skills/enhance-arch-boundaries/SKILL.md +154 -0
- package/skills/enhance-capacitor-ui/SKILL.md +463 -0
- package/skills/enhance-capacitor-ui/references/details.md +750 -0
- package/skills/enhance-email-deliverability/SKILL.md +143 -0
- package/skills/enhance-growth-loops/SKILL.md +122 -0
- package/skills/enhance-lifecycle-email/SKILL.md +130 -0
- package/skills/enhance-motion/SKILL.md +193 -0
- package/skills/enhance-onboarding/SKILL.md +148 -0
- package/skills/enhance-pwa/SKILL.md +303 -0
- package/skills/enhance-readability/SKILL.md +146 -0
- package/skills/enhance-readme/SKILL.md +496 -0
- package/skills/enhance-readme/package-lock.json +187 -0
- package/skills/enhance-readme/package.json +17 -0
- package/skills/enhance-readme/scripts/generate-readme-blocks.mjs +199 -0
- package/skills/enhance-readme/scripts/record-readme-tour.mjs +442 -0
- package/skills/enhance-skill-prompts/SKILL.md +167 -0
- package/skills/enhance-skill-prompts/references/exemplar-audit-auth-flows.md +311 -0
- package/skills/enhance-ux-laws/SKILL.md +409 -0
- package/skills/enhance-web-conversion/SKILL.md +155 -0
- package/skills/enhance-web-forms/SKILL.md +154 -0
- package/skills/enhance-web-instant-nav/SKILL.md +138 -0
- package/skills/enhance-web-instant-nav/references/bfcache-blockers.md +23 -0
- package/skills/enhance-web-instant-nav/references/early-hints.md +33 -0
- package/skills/enhance-web-instant-nav/references/speculation-rules.md +44 -0
- package/skills/enhance-web-landing/SKILL.md +459 -0
- package/skills/enhance-web-landing/references/details.md +773 -0
- package/skills/enhance-web-redesign/SKILL.md +228 -0
- package/skills/enhance-web-seo/SKILL.md +276 -0
- package/skills/enhance-web-ui/SKILL.md +473 -0
- package/skills/enhance-web-ui/references/details.md +674 -0
- package/skills/enhance-web-ux/HEURISTICS.md +248 -0
- package/skills/enhance-web-ux/PATTERNS.md +375 -0
- package/skills/enhance-web-ux/SKILL.md +464 -0
- package/skills/enhance-web-ux/examples.md +222 -0
- package/skills/enhance-web-ux/references/details.md +406 -0
- package/skills/enhance-web-web3d/SKILL.md +397 -0
- package/skills/enhance-web-web3d/references/css-canvas-effects.md +180 -0
- package/skills/handoff/SKILL.md +66 -0
- package/skills/housekeep-backlog/SKILL.md +149 -0
- package/skills/housekeep-dead-code/SKILL.md +387 -0
- package/skills/housekeep-dead-code/references/ratchet-ci.md +205 -0
- package/skills/housekeep-dead-code/references/supabase-hygiene.md +152 -0
- package/skills/housekeep-design/SKILL.md +207 -0
- package/skills/housekeep-files/SKILL.md +220 -0
- package/skills/housekeep-files/references/naming-and-catalog.md +86 -0
- package/skills/housekeep-files/scripts/housekeep-files.ps1 +360 -0
- package/skills/housekeep-files/scripts/housekeep-files.sh +238 -0
- package/skills/housekeep-gates/SKILL.md +174 -0
- package/skills/iterate-agent-harness/SKILL.md +137 -0
- package/skills/iterate-gtm-weekly/SKILL.md +103 -0
- package/skills/iterate-post-launch/SKILL.md +292 -0
- package/skills/meta-mcp-builder/SKILL.md +313 -0
- package/skills/meta-skill-creator/SKILL.md +304 -0
- package/skills/mobile-capacitor-platform/SKILL.md +103 -0
- package/skills/mobile-emulator-start/SKILL.md +296 -0
- package/skills/mobile-emulator-test/SKILL.md +491 -0
- package/skills/mobile-emulator-test/references/details.md +478 -0
- package/skills/mobile-rn-performance/SKILL.md +107 -0
- package/skills/mobile-rn-screen/SKILL.md +476 -0
- package/skills/mobile-rn-screen/references/details.md +785 -0
- package/skills/mushi-health/SKILL.md +206 -0
- package/skills/mushi-integration/SKILL.md +257 -0
- package/skills/plan-aeo-readiness/SKILL.md +166 -0
- package/skills/plan-antislop/SKILL.md +281 -0
- package/skills/plan-aso/SKILL.md +149 -0
- package/skills/plan-backup-dr/SKILL.md +131 -0
- package/skills/plan-capacitor-hardening/SKILL.md +217 -0
- package/skills/plan-data-integrity/SKILL.md +187 -0
- package/skills/plan-dead-code/SKILL.md +386 -0
- package/skills/plan-dead-code/references/knip-config.md +214 -0
- package/skills/plan-dead-code/references/output-templates.md +133 -0
- package/skills/plan-dead-code/references/preservation-contract.md +50 -0
- package/skills/plan-dead-code/references/residue-greps.md +84 -0
- package/skills/plan-dependency-provenance/SKILL.md +200 -0
- package/skills/plan-docs-sync/SKILL.md +143 -0
- package/skills/plan-docs-sync/references/drift-taxonomy.md +43 -0
- package/skills/plan-docs-sync/references/output-templates.md +33 -0
- package/skills/plan-docs-sync/references/preservation-contract.md +17 -0
- package/skills/plan-error-handling/SKILL.md +205 -0
- package/skills/plan-gtm/SKILL.md +276 -0
- package/skills/plan-gtm/references/benchmarks-2026.md +183 -0
- package/skills/plan-input-validation/SKILL.md +179 -0
- package/skills/plan-llm-cost-guardrails/SKILL.md +176 -0
- package/skills/plan-mobile-readiness/SKILL.md +171 -0
- package/skills/plan-perf-audit/SKILL.md +145 -0
- package/skills/plan-perf-audit/references/audit-scope.md +51 -0
- package/skills/plan-perf-audit/references/output-templates.md +33 -0
- package/skills/plan-perf-audit/references/preservation-contract.md +13 -0
- package/skills/plan-pricing/SKILL.md +173 -0
- package/skills/plan-privacy-compliance/SKILL.md +148 -0
- package/skills/plan-rls-audit/SKILL.md +231 -0
- package/skills/plan-secrets-audit/SKILL.md +181 -0
- package/skills/plan-security-audit/SKILL.md +168 -0
- package/skills/plan-security-audit/references/output-templates.md +36 -0
- package/skills/plan-security-audit/references/owasp-supabase-scope.md +55 -0
- package/skills/plan-security-audit/references/preservation-contract.md +18 -0
- package/skills/plan-stub-checker/SKILL.md +216 -0
- package/skills/plan-stub-checker/references/detection-methodology.md +75 -0
- package/skills/plan-stub-checker/references/detection-taxonomy.md +34 -0
- package/skills/plan-stub-checker/references/output-templates.md +63 -0
- package/skills/plan-stub-checker/references/preservation-contract.md +24 -0
- package/skills/plan-test-coverage/SKILL.md +170 -0
- package/skills/plan-test-coverage/references/methodology.md +54 -0
- package/skills/plan-test-coverage/references/output-templates.md +34 -0
- package/skills/plan-test-coverage/references/preservation-contract.md +15 -0
- package/skills/plan-uiux-unification/SKILL.md +230 -0
- package/skills/plan-uiux-unification/references/output-templates.md +67 -0
- package/skills/plan-uiux-unification/references/phase-workbook.md +85 -0
- package/skills/plan-uiux-unification/references/preservation-contract.md +24 -0
- package/skills/protocol-browser-anti-stall/SKILL.md +211 -0
- package/skills/protocol-browser-anti-stall/references/mcp-to-cli-map.md +113 -0
- package/skills/protocol-browser-anti-stall/references/playwright-session-coordination.md +170 -0
- package/skills/research/SKILL.md +422 -0
- package/skills/test-exploratory/SKILL.md +165 -0
- package/skills/test-exploratory/references/charter-template.md +29 -0
- package/skills/test-load/SKILL.md +126 -0
- package/skills/test-mutation/SKILL.md +160 -0
- package/skills/test-playwright/SKILL.md +354 -0
- package/skills/test-qa/SKILL.md +364 -0
- package/skills/test-qa/references/details.md +268 -0
- package/skills/test-red-team/SKILL.md +386 -0
- package/skills/test-red-team/references/owasp-attack-checklist.md +193 -0
- package/skills/test-unit/SKILL.md +259 -0
- package/skills/test-unit/references/details.md +267 -0
- package/skills/test-visual-regression/SKILL.md +132 -0
- package/skills/thirdparty-emil-design-eng/ATTRIBUTION.md +20 -0
- package/skills/thirdparty-emil-design-eng/SKILL.md +21 -0
- package/skills/thirdparty-emil-design-eng/references/emil-design-eng.md +676 -0
- package/skills/thirdparty-ui-ux-pro-max/ATTRIBUTION.md +22 -0
- package/skills/thirdparty-ui-ux-pro-max/SKILL.md +304 -0
- package/skills/thirdparty-ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/thirdparty-ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/thirdparty-ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/thirdparty-ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/thirdparty-ui-ux-pro-max/data/products.csv +97 -0
- package/skills/thirdparty-ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/thirdparty-ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/thirdparty-ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/thirdparty-ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/thirdparty-ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/thirdparty-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/thirdparty-ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/thirdparty-ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/thirdparty-web-interface-guidelines/ATTRIBUTION.md +23 -0
- package/skills/thirdparty-web-interface-guidelines/SKILL.md +190 -0
- package/skills/workflow-build-feature/SKILL.md +118 -0
- package/skills/workflow-coding-discipline/SKILL.md +140 -0
- package/skills/workflow-environment-ready/SKILL.md +128 -0
- package/skills/workflow-feature-flag/SKILL.md +262 -0
- package/skills/workflow-feedback-to-closure/SKILL.md +165 -0
- package/skills/workflow-fix-and-ship/SKILL.md +136 -0
- package/skills/workflow-git-commit/SKILL.md +200 -0
- package/skills/workflow-green-repo/SKILL.md +166 -0
- package/skills/workflow-grilling/SKILL.md +73 -0
- package/skills/workflow-gtm/SKILL.md +153 -0
- package/skills/workflow-housekeep/SKILL.md +453 -0
- package/skills/workflow-housekeep/references/templates.md +109 -0
- package/skills/workflow-launch-ready/SKILL.md +145 -0
- package/skills/workflow-merge-conflicts/SKILL.md +62 -0
- package/skills/workflow-onboard/SKILL.md +99 -0
- package/skills/workflow-parallel-agents/SKILL.md +164 -0
- package/skills/workflow-pr/SKILL.md +197 -0
- package/skills/workflow-quality-gate/SKILL.md +147 -0
- package/skills/workflow-refactor/SKILL.md +274 -0
- package/skills/workflow-release-prep/SKILL.md +207 -0
- package/skills/workflow-ship-and-observe/SKILL.md +164 -0
- package/skills/workflow-spec-tdd/SKILL.md +141 -0
- package/skills/workflow-spec-tdd/references/spec-template.md +126 -0
- package/skills/workflow-spec-tdd/references/tdd-patterns.md +167 -0
- package/skills-cursor/babysit/SKILL.md +17 -0
- package/skills-cursor/canvas/SKILL.md +142 -0
- package/skills-cursor/canvas/sdk/canvas-tokens.d.ts +235 -0
- package/skills-cursor/canvas/sdk/chart-primitives.d.ts +200 -0
- package/skills-cursor/canvas/sdk/dag-layout.d.ts +102 -0
- package/skills-cursor/canvas/sdk/diff-view.d.ts +130 -0
- package/skills-cursor/canvas/sdk/form-primitives.d.ts +194 -0
- package/skills-cursor/canvas/sdk/hooks.d.ts +117 -0
- package/skills-cursor/canvas/sdk/index.d.ts +47 -0
- package/skills-cursor/canvas/sdk/theme.d.ts +61 -0
- package/skills-cursor/canvas/sdk/todo-list.d.ts +49 -0
- package/skills-cursor/canvas/sdk/ui-primitives.d.ts +549 -0
- package/skills-cursor/canvas/sdk/ui-primitives.test.d.ts +2 -0
- package/skills-cursor/create-hook/SKILL.md +238 -0
- package/skills-cursor/create-rule/SKILL.md +185 -0
- package/skills-cursor/create-skill/SKILL.md +269 -0
- package/skills-cursor/create-skill/references/authoring-guide.md +182 -0
- package/skills-cursor/create-subagent/SKILL.md +228 -0
- package/skills-cursor/migrate-to-skills/SKILL.md +121 -0
- package/skills-cursor/shell/SKILL.md +22 -0
- package/skills-cursor/split-to-prs/SKILL.md +47 -0
- package/skills-cursor/statusline/SKILL.md +193 -0
- package/skills-cursor/update-cli-config/SKILL.md +85 -0
- package/skills-cursor/update-cursor-settings/SKILL.md +137 -0
- package/skills.sh.json +297 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: housekeep-backlog
|
|
3
|
+
description: >
|
|
4
|
+
Inventory parked work — unfinished plans, deferred phases, TODO/FIXME,
|
|
5
|
+
skipped tests, open findings — into a living BACKLOG.md that diffs
|
|
6
|
+
new/done/stale. Use when "what's left behind", "inventory TODOs", or
|
|
7
|
+
"consolidate the backlog".
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# housekeep-backlog — Living register of parked work
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED.** Discovery scan `[LOW freedom — run exactly]`.
|
|
14
|
+
Classification, dedup, priority `[HIGH freedom]`.
|
|
15
|
+
|
|
16
|
+
Apply-now for the **register only**. You do not implement backlog items
|
|
17
|
+
here. Every `plan-*` skill *creates* parked work; this is the collector.
|
|
18
|
+
**The failure mode is not making the inventory — it goes stale within a
|
|
19
|
+
month and nobody can tell if debt is shrinking.** So this is `docs-adr`
|
|
20
|
+
for parked work: regenerate, diff against the last run, keep stable IDs.
|
|
21
|
+
|
|
22
|
+
Prefer `docs/BACKLOG.md`. Use a root `BACKLOG.md` only if the host already
|
|
23
|
+
has one.
|
|
24
|
+
|
|
25
|
+
## This skill vs neighbors
|
|
26
|
+
|
|
27
|
+
| Skill | Owns |
|
|
28
|
+
|---|---|
|
|
29
|
+
| **housekeep-backlog** (this) | Discover + dedup + write/diff the register |
|
|
30
|
+
| `complete-everything` | Execute **one** approved plan to closure |
|
|
31
|
+
| `burndown-full` | Drive **one** mechanical change to 100% |
|
|
32
|
+
| `docs-adr` | Decision memory, not parked-work inventory |
|
|
33
|
+
| `plan-stub-checker` | Stub/dead-UI plan (feeds this register) |
|
|
34
|
+
| `workflow-feature-flag` | Flag debt execution |
|
|
35
|
+
| `workflow-housekeep` | README / dead files / deps — not the backlog |
|
|
36
|
+
| `workflow-release-prep` | What's *done* in the dirty tree → merge-ready PR |
|
|
37
|
+
| `enhance-agent-guardrails` | Installs the same-PR / "read BACKLOG.md" wording |
|
|
38
|
+
|
|
39
|
+
## How to reason (every candidate)
|
|
40
|
+
|
|
41
|
+
1. **Locate** — file:line or doc path; form (TODO / parked phase / skip /
|
|
42
|
+
open finding / flag)
|
|
43
|
+
2. **Interpret** — what actual work is it? A bare `// TODO: fix` is itself
|
|
44
|
+
a finding — tag `needs-triage`, do not drop it
|
|
45
|
+
3. **Classify** — tech-debt / unfinished-feature / deferred-plan-phase /
|
|
46
|
+
test-gap / known-bug / decision-needed
|
|
47
|
+
4. **Status** — still-relevant / verify-done / stale-or-obsolete
|
|
48
|
+
|
|
49
|
+
Skipping Interpret produces a register of context-free TODOs nobody can
|
|
50
|
+
action.
|
|
51
|
+
|
|
52
|
+
## Worked example
|
|
53
|
+
|
|
54
|
+
> **Locate:** `docs/plans/auth-refactor.md` — phases 1–2 checked, 3–4
|
|
55
|
+
> unchecked; last commit 4 months ago.
|
|
56
|
+
> **Interpret:** phase 3 is refresh-token rotation; phase 4 is audit
|
|
57
|
+
> follow-ups parked mid-plan.
|
|
58
|
+
> **Classify:** deferred-plan-phase (two items).
|
|
59
|
+
> **Status:** ph3 still-relevant; ph4 — `audit-auth-flows` has since run,
|
|
60
|
+
> so verify-done before carrying it.
|
|
61
|
+
> **Rows:**
|
|
62
|
+
> `BL-014 | deferred-phase | auth-refactor ph3: refresh rotation | relevant | high | docs/plans/auth-refactor.md`
|
|
63
|
+
> `BL-015 | deferred-phase | auth-refactor ph4: audit follow-ups | verify-done | med | docs/plans/auth-refactor.md`
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Phase 1 — Discover every source [LOW freedom — run all]
|
|
68
|
+
|
|
69
|
+
Use workspace Grep/`rg` (not unbounded `find`). Load any
|
|
70
|
+
existing `BACKLOG.md` first — this run is a regeneration + diff.
|
|
71
|
+
|
|
72
|
+
The scans are independent and their raw output is long: run them in one read-only Explore subagent per source class, launched in one message, and bring back only candidate rows (file:line, form, one-line context). Keep Interpret/Classify in the main thread — they need the repo context.
|
|
73
|
+
|
|
74
|
+
- **Code markers** — `TODO|FIXME|HACK|XXX|WIP|@todo|@deprecated` with
|
|
75
|
+
surrounding context; `git blame` when the age matters
|
|
76
|
+
- **Plan/burndown docs** — `docs/`, `plans/`, `plan-*.md`,
|
|
77
|
+
`.cursor/*-state.md`: unchecked `- [ ]`, "Phase N", "out of scope",
|
|
78
|
+
MATCH/DONE leftovers
|
|
79
|
+
- **Closure deferrals** — `complete-everything` / `burndown-full` /
|
|
80
|
+
`completion-judge` recorded as deferred, blocked, or out-of-scope
|
|
81
|
+
- **Disabled tests** — `.skip` / `.todo` / `xit` / `xdescribe` /
|
|
82
|
+
`@Ignore` / `pytest.mark.skip`
|
|
83
|
+
- **Open audit findings** — leftover `audit-*` / `plan-*` reports not
|
|
84
|
+
yet burned down
|
|
85
|
+
- **Commented-out blocks** and flags gating unfinished features →
|
|
86
|
+
`workflow-feature-flag` for flag debt
|
|
87
|
+
- **Tracker linkage** — which items have tickets vs code-only
|
|
88
|
+
(untracked = highest risk of being lost)
|
|
89
|
+
|
|
90
|
+
## Phase 2 — Deduplicate [HIGH freedom]
|
|
91
|
+
|
|
92
|
+
One real piece of work = one register row, even when a TODO, a plan
|
|
93
|
+
phase, and a deferral all describe it. Keep every source reference on
|
|
94
|
+
that row.
|
|
95
|
+
|
|
96
|
+
## Phase 3 — Classify, status, prioritize [HIGH freedom]
|
|
97
|
+
|
|
98
|
+
- Status: relevant / verify-done (check before carrying) / stale
|
|
99
|
+
(propose removal — do not auto-delete)
|
|
100
|
+
- Priority: impact × effort as a signal, not a fake score. Security,
|
|
101
|
+
data-loss, and auth items are **high** regardless of effort
|
|
102
|
+
- Owner/context enough that a future session can act. No context →
|
|
103
|
+
`needs-triage`, not a guess
|
|
104
|
+
|
|
105
|
+
## Phase 4 — Write the register [LOW freedom on format]
|
|
106
|
+
|
|
107
|
+
- **Header** — last-regenerated date, counts by class and status, delta
|
|
108
|
+
vs last run (new / closed / newly-stale)
|
|
109
|
+
- **Index** — `id | class | title | status | priority | source(s) | ticket?`
|
|
110
|
+
- **Stable IDs** — `BL-NNN`, never reused. Closed items move to
|
|
111
|
+
**Recently closed** (history is how you see debt shrinking)
|
|
112
|
+
- **Agent hook** — point agent rules at the register: read it before a
|
|
113
|
+
sprint/plan; new parked work adds a `BL-` row in the **same PR**.
|
|
114
|
+
`enhance-agent-guardrails` installs that wording
|
|
115
|
+
|
|
116
|
+
## Phase 5 — Keep it alive
|
|
117
|
+
|
|
118
|
+
Re-run diffs: gone markers → closed; new markers → new `BL-`; unchanged
|
|
119
|
+
rows keep ID and history. A scheduled pass fits `workflow-housekeep`.
|
|
120
|
+
High-priority items hand off to `complete-everything` / `burndown-full`.
|
|
121
|
+
Flag debt → `workflow-feature-flag`. Decisions-needed → `docs-adr`.
|
|
122
|
+
|
|
123
|
+
## Self-critique before writing [LOW freedom — do not skip]
|
|
124
|
+
|
|
125
|
+
1. **Sources complete** — every Phase-1 class was searched
|
|
126
|
+
2. **Deduped** — one work item, one `BL-`, all sources listed
|
|
127
|
+
3. **Actionable or tagged** — context-free rows are `needs-triage`, not dropped
|
|
128
|
+
4. **Inventory only** — no implementation of backlog items this pass
|
|
129
|
+
5. **Diff honest** — first run says so; later runs report new / closed / newly-stale
|
|
130
|
+
6. **IDs stable** — no reuse; closed rows stay in Recently closed
|
|
131
|
+
|
|
132
|
+
## Definition of Done
|
|
133
|
+
|
|
134
|
+
- [ ] All Phase-1 sources scanned; existing register loaded and diffed
|
|
135
|
+
- [ ] Every item Locate→Interpret→Classify→Status
|
|
136
|
+
- [ ] Duplicates merged; security/data/auth flagged high
|
|
137
|
+
- [ ] `BACKLOG.md` written with stable IDs, counts, delta, Recently closed
|
|
138
|
+
- [ ] Same-PR / agent-rule hook recorded
|
|
139
|
+
- [ ] Stale items proposed, not auto-deleted
|
|
140
|
+
- [ ] High-priority handoffs named; items not implemented here
|
|
141
|
+
|
|
142
|
+
## Output format
|
|
143
|
+
|
|
144
|
+
1. **Summary** — totals by class and status; delta vs last run
|
|
145
|
+
2. **BACKLOG.md** — index + Recently closed
|
|
146
|
+
3. **Newly discovered** — the left-behind catch
|
|
147
|
+
4. **Verify-done / stale** — await confirmation
|
|
148
|
+
5. **Handoffs** — high → `complete-everything` / `burndown-full`; flags →
|
|
149
|
+
`workflow-feature-flag`; decisions → `docs-adr`
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: housekeep-dead-code
|
|
3
|
+
description: >
|
|
4
|
+
Remove dead code by category — one commit each, typecheck and tests between,
|
|
5
|
+
bisect on red — then add a Knip ratchet. Use when "delete the dead code" or
|
|
6
|
+
"wire up Knip". Audit first → plan-dead-code. README/deps →
|
|
7
|
+
workflow-housekeep.
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# housekeep-dead-code — Delete by category, then ratchet
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED.** Category order, the `--fix-type` sequence,
|
|
14
|
+
one-commit-per-category, and verification between commits `[LOW freedom —
|
|
15
|
+
run exactly]`; whether a specific flagged item is truly dead
|
|
16
|
+
`[HIGH freedom]`.
|
|
17
|
+
|
|
18
|
+
Apply-now. `plan-dead-code` produced the reviewed keep/kill list and the
|
|
19
|
+
baseline; this makes the repo match it and installs the gate that keeps it
|
|
20
|
+
matched. **Net dead code strictly ≤ before, and no behavior change.**
|
|
21
|
+
|
|
22
|
+
This is the execution arm of `plan-dead-code`, the same way
|
|
23
|
+
`housekeep-gates` executes `audit-gate-logic` and `housekeep-design`
|
|
24
|
+
executes `plan-uiux-unification`.
|
|
25
|
+
|
|
26
|
+
Deletion is the *approved execution* of a plan. The `plan-*` preservation
|
|
27
|
+
contract ("no removal without an approved proposal") is satisfied by that
|
|
28
|
+
approval — not bypassed by this skill.
|
|
29
|
+
|
|
30
|
+
## This skill vs neighbors
|
|
31
|
+
|
|
32
|
+
| Skill | Owns |
|
|
33
|
+
|---|---|
|
|
34
|
+
| **housekeep-dead-code** (this) | Delete per approved list, cascade, install the ratchet |
|
|
35
|
+
| `plan-dead-code` | Prove it is dead first — config, baseline, keep/kill list |
|
|
36
|
+
| `housekeep-gates` | The aggregator this skill's CI job plugs into |
|
|
37
|
+
| `housekeep-backlog` | Parked-work register — not deletion |
|
|
38
|
+
| `workflow-housekeep` | README sync, build artifacts, dependency **bumps** |
|
|
39
|
+
| `workflow-refactor` | Restructuring code that stays (duplication fixes land here) |
|
|
40
|
+
| `burndown-full` | One mechanical change to 100% when a prior pass stalled |
|
|
41
|
+
| `db-migrator` | Authoring any `DROP` migration |
|
|
42
|
+
| `plan-data-integrity` | Whether a destructive migration is safe at all |
|
|
43
|
+
| `workflow-green-repo` | Repo already red before this pass started |
|
|
44
|
+
|
|
45
|
+
## How to reason (every commit)
|
|
46
|
+
|
|
47
|
+
1. **Scope** — one category, one commit, from the approved list only
|
|
48
|
+
2. **Verify** — typecheck + affected tests + build after each category
|
|
49
|
+
3. **Attribute** — red after a batch means *this* batch; bisect the batch
|
|
50
|
+
4. **Cascade** — deletion exposes new deadness; re-run, don't assume
|
|
51
|
+
|
|
52
|
+
Never carry two categories in one commit. The whole value of the sequence
|
|
53
|
+
is that a failure names its own cause.
|
|
54
|
+
|
|
55
|
+
## Worked example
|
|
56
|
+
|
|
57
|
+
> **Scope:** approved list has 9 unused files (7 unused shadcn components).
|
|
58
|
+
> `knip --fix-type files --allow-remove-files` → 9 deleted.
|
|
59
|
+
> **Verify:** `tsc --noEmit` clean, 214 tests pass, build ok → commit
|
|
60
|
+
> `chore(dead-code): remove 9 unreferenced modules`.
|
|
61
|
+
> **Cascade:** re-run Knip — unused exports fell 22 → 6 and unused deps
|
|
62
|
+
> 4 → 6 (two deps were only used by deleted files). The plan's numbers were
|
|
63
|
+
> already stale in the right direction.
|
|
64
|
+
> **Next:** `--fix-type exports,types` → typecheck flags 11 now-unused
|
|
65
|
+
> locals → `remove-unused-vars` → re-run Knip → clean.
|
|
66
|
+
> **Then:** `--fix-type dependencies` → 6 removed → `npm ci` + build.
|
|
67
|
+
> **Red:** build breaks. `date-fns` was referenced only inside a Tailwind
|
|
68
|
+
> config string. Restore that one dep, tag the finding `keep-config`, add
|
|
69
|
+
> the config file as an `entry`. **Do not** restore the other five.
|
|
70
|
+
> **Ratchet:** baseline was 41/12; now 3/0. CI pinned at `--max-issues 3`.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Phase 0 — Preconditions [LOW freedom — all four, or stop]
|
|
75
|
+
|
|
76
|
+
1. **An approved `plan-dead-code.md` exists** with a keep/kill list. No
|
|
77
|
+
plan → run `plan-dead-code` first. Never delete from a raw tool dump.
|
|
78
|
+
2. **Working tree is clean** and the repo is green *before* you start. A
|
|
79
|
+
pre-existing red build makes every later failure unattributable — that
|
|
80
|
+
is `workflow-green-repo`'s job first.
|
|
81
|
+
3. **Verification commands are known and executed once** to establish the
|
|
82
|
+
baseline: typecheck, lint, test, build. Discover them from
|
|
83
|
+
`package.json`/CI, don't invent them.
|
|
84
|
+
4. **Behavior is locked, or the risk is stated.** If the code being deleted
|
|
85
|
+
has no test coverage, deletion has no safety net. Say so out loud;
|
|
86
|
+
consider `plan-test-coverage` first for anything load-bearing.
|
|
87
|
+
|
|
88
|
+
Config is already settled by the plan. If `knip.json` is still producing
|
|
89
|
+
hints, you are in the plan phase — go back. Knip's FAQ, verbatim:
|
|
90
|
+
"Auto-fixing in this state can lead to deleting code that your application
|
|
91
|
+
relies on."
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Phase 1 — Delete by category [LOW freedom — this order, one commit each]
|
|
96
|
+
|
|
97
|
+
`--fix` never runs bare. Always `--fix-type`, one class at a time. Fix
|
|
98
|
+
types are `files`, `exports`, `types`, `dependencies`, `catalog`.
|
|
99
|
+
`--fix-type` implies `--fix`, so it needs no companion flag.
|
|
100
|
+
|
|
101
|
+
> **`--allow-remove-files` alone is also a bare fix.** With no
|
|
102
|
+
> `--fix-type`, Knip enables *every* fix type plus file removal. Never
|
|
103
|
+
> pass it by itself.
|
|
104
|
+
|
|
105
|
+
After **every** category: typecheck → affected tests → build → commit.
|
|
106
|
+
|
|
107
|
+
### C1 · Unused files — the pre-approved list only
|
|
108
|
+
|
|
109
|
+
Knip deletes what it reports *now*, not what the plan listed, and it has no
|
|
110
|
+
dry-run. So read the set first, diff it, then fix:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
npx knip --files --reporter json > knip-files.json # what would be deleted
|
|
114
|
+
# diff that set against the plan's approved list BEFORE fixing
|
|
115
|
+
npx knip --fix-type files --allow-remove-files
|
|
116
|
+
git status --short # confirm the deletion set
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`--allow-remove-files` is opt-in precisely to prevent accidental deletion;
|
|
120
|
+
it is safe here *only because a human already reviewed this exact list in
|
|
121
|
+
the plan*. If Knip removed a file the plan did not list, `git restore` it
|
|
122
|
+
immediately and fix the config that caused it. Do not commit it, and do not
|
|
123
|
+
treat it as a new finding.
|
|
124
|
+
|
|
125
|
+
Files go first because their removal cascades: it collapses phantom
|
|
126
|
+
export and dependency findings instead of leaving you to churn files you
|
|
127
|
+
are about to delete anyway.
|
|
128
|
+
|
|
129
|
+
### C2 · Unused exports and types
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
npx knip --fix-type exports,types
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
This removes the `export` keyword (and unused enum/namespace members), not
|
|
136
|
+
the implementation. What is left behind is now a module-private symbol —
|
|
137
|
+
which is exactly what C3 collects.
|
|
138
|
+
|
|
139
|
+
### C3 · Cascade — unused locals [do not skip]
|
|
140
|
+
|
|
141
|
+
Knip does not remove unused variables inside files; that is a linter's
|
|
142
|
+
job, and the official guidance is to run one and then re-run Knip.
|
|
143
|
+
|
|
144
|
+
`remove-unused-vars` reads linter JSON **on stdin** — run it bare and it
|
|
145
|
+
hangs waiting for input. Pipe it, and never combine it with a linter's own
|
|
146
|
+
`--fix`, or the reported positions stop matching:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
npx eslint --rule 'no-unused-vars: error' --quiet -f json | npx remove-unused-vars
|
|
150
|
+
npx knip # rinse and repeat
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
It is version 0.0.x and self-describes as "highly experimental". Your
|
|
154
|
+
linter's own unused-symbol autofix is the conservative substitute; either
|
|
155
|
+
way, review the diff rather than trusting it.
|
|
156
|
+
|
|
157
|
+
Repeat C2–C3 until the count stops moving. Each round of unexporting
|
|
158
|
+
creates a new round of unused locals, whose removal can orphan more
|
|
159
|
+
exports.
|
|
160
|
+
|
|
161
|
+
### C4 · Unused dependencies
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
npx knip --fix-type dependencies
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Then a **clean** install (`npm ci` / `pnpm install --frozen-lockfile`) and
|
|
168
|
+
a full build. Dependencies referenced only from config strings, CLI
|
|
169
|
+
invocations, or peer requirements are the classic false positive here — a
|
|
170
|
+
broken build after C4 usually means one dep to restore plus one `entry`
|
|
171
|
+
pattern to add, not a rollback of the category.
|
|
172
|
+
|
|
173
|
+
### C5 · Debug residue [mechanical]
|
|
174
|
+
|
|
175
|
+
Delete, never comment out. Commenting out *is* the dead code.
|
|
176
|
+
|
|
177
|
+
- `console.*` / `debugger` outside intentional logging paths — if the repo
|
|
178
|
+
has a real logger, this is also a `backend-observability` handoff
|
|
179
|
+
- `.only` / `.skip` / `.todo` / `xit` / `xdescribe` / `fdescribe` — remove
|
|
180
|
+
the **modifier, never the test.** `.only` is the highest-priority item in
|
|
181
|
+
this whole skill, because it silently disables every other test in its
|
|
182
|
+
file. Removing it can turn the suite red: that is a **bug it was
|
|
183
|
+
hiding**, not a regression you caused. Fix or file it; never re-add
|
|
184
|
+
`.only`. A `.skip`/`.todo` is usually parked work — un-skip and fix it,
|
|
185
|
+
or leave it and register it in `housekeep-backlog`. **Deleting a test to
|
|
186
|
+
lower this count is forbidden.**
|
|
187
|
+
- Commented-out code blocks — git has the history
|
|
188
|
+
- `utils`/`helpers` dumping grounds — split by concern
|
|
189
|
+
|
|
190
|
+
### C6 · Duplication → hand off to `workflow-refactor`
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
npx jscpd src --min-tokens 50 --reporters json
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Near-identical components get parameterized into one; repeated try/catch
|
|
197
|
+
becomes a wrapper. **That is behavior-preserving restructuring, not
|
|
198
|
+
deletion — so it belongs to `workflow-refactor`.** Measure it here, ratchet
|
|
199
|
+
the percentage here, and hand the fixes over. If you do land them in this
|
|
200
|
+
pass, they are separate commits that never mix with C1–C4.
|
|
201
|
+
|
|
202
|
+
### C7 · Orphan assets
|
|
203
|
+
|
|
204
|
+
Delete only names with zero references in source, CSS, and HTML. Anything
|
|
205
|
+
reachable through a template string or hashed name stays until an owner
|
|
206
|
+
confirms — a name-based scan cannot see `` `/img/${slug}.png` ``.
|
|
207
|
+
|
|
208
|
+
### C8 · Suppression debt — shrink, don't sweep
|
|
209
|
+
|
|
210
|
+
Remove suppressions whose underlying error is gone (a stale
|
|
211
|
+
`@ts-expect-error` is itself dead code and the compiler will say so). For
|
|
212
|
+
the rest, **fix the cause**. Never blanket-delete `@ts-ignore` lines to
|
|
213
|
+
move a number; never widen a type to `any` to remove a suppression.
|
|
214
|
+
|
|
215
|
+
### C9 · Dead schema [HUMAN GATE — do not proceed unasked]
|
|
216
|
+
|
|
217
|
+
Full playbook: [`references/supabase-hygiene.md`](references/supabase-hygiene.md).
|
|
218
|
+
|
|
219
|
+
**Ask the human to name the target database and wait for their reply.** Do
|
|
220
|
+
not infer it from `.env`, a linked project ref, or anything said earlier in
|
|
221
|
+
the session. Then: retire in code → verify zero usage across a valid stats
|
|
222
|
+
window → author a reversible migration.
|
|
223
|
+
|
|
224
|
+
Three traps that make a "dead" object alive, all covered in the reference:
|
|
225
|
+
|
|
226
|
+
- **In-database callers.** An RPC used only by an RLS policy, a trigger, or
|
|
227
|
+
a `pg_cron` job has zero client references and is load-bearing. Check
|
|
228
|
+
`pg_policies`, `pg_trigger`, and `pg_proc.prosrc` before believing a grep.
|
|
229
|
+
- **External callers.** An Edge Function targeted by a Stripe or GitHub
|
|
230
|
+
webhook is never in your `functions.invoke()` grep.
|
|
231
|
+
- **Young statistics.** `pg_stat_*` counts from `stats_reset`; a staging
|
|
232
|
+
database with no traffic makes everything look unused.
|
|
233
|
+
|
|
234
|
+
Tables drop in **two steps** — rename to `_deprecated_<name>` first (errors
|
|
235
|
+
surface immediately, data intact, rollback is another rename), drop a release
|
|
236
|
+
later. Regenerate types in the same commit. Migrations go to `db-migrator`;
|
|
237
|
+
safety judgment stays with `plan-data-integrity`.
|
|
238
|
+
|
|
239
|
+
**Never author or run a `DROP` against production in this skill.** Index
|
|
240
|
+
drops are reversible; column and table drops destroy data.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Phase 2 — Install the ratchet [LOW freedom — the point of the whole pass]
|
|
245
|
+
|
|
246
|
+
Cleanup without a gate regrows within weeks. This is the deliverable that
|
|
247
|
+
makes the pass durable. Full config — scripts, tsconfig, ESLint flat config,
|
|
248
|
+
lint-staged, the job, aggregator wiring, and the Supabase types-drift guard —
|
|
249
|
+
is in [`references/ratchet-ci.md`](references/ratchet-ci.md).
|
|
250
|
+
|
|
251
|
+
**2a. Script it** so humans, hooks, and CI run one definition — the same
|
|
252
|
+
flags, or "passes locally" stops predicting CI:
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"scripts": {
|
|
257
|
+
"knip": "knip --production --max-issues 0",
|
|
258
|
+
"knip:all": "knip --max-issues 3 --treat-config-hints-as-errors"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**2b. CI job pinned to today's count.** `--max-issues` defaults to `0`;
|
|
264
|
+
set it to the post-cleanup number and **only ever lower it**. Run both
|
|
265
|
+
modes — Knip's CI guide suggests considering a default run alongside a
|
|
266
|
+
production run.
|
|
267
|
+
|
|
268
|
+
Put `--treat-config-hints-as-errors` on the **default-mode** run only:
|
|
269
|
+
production mode disables configuration hints entirely
|
|
270
|
+
(`isDisableConfigHints = --no-config-hints || isProduction`), so the flag
|
|
271
|
+
can never fire there. Exit codes: `0` clean, `1` issues found, `2` Knip
|
|
272
|
+
itself failed — treat `2` as a broken gate, never as a pass, or a crashed
|
|
273
|
+
run reads as green.
|
|
274
|
+
|
|
275
|
+
**2c. Wire it into the single aggregator**, don't add a fourth parallel
|
|
276
|
+
required check. The job joins the existing `needs:` list per
|
|
277
|
+
`housekeep-gates`. Ratchet policy also follows that skill: one baseline per
|
|
278
|
+
metric, and lowering the number is a separate reviewed PR from a code
|
|
279
|
+
change.
|
|
280
|
+
|
|
281
|
+
**2d. Ratchet the other counts too** — duplication %, suppression count,
|
|
282
|
+
`console.*` count. A number with no gate is a number that grows back.
|
|
283
|
+
|
|
284
|
+
**2e. Local hooks** — `lint-staged` runs ESLint per file; Knip is repo-wide
|
|
285
|
+
and belongs in **pre-push**, not pre-commit. Either way the hook calls the
|
|
286
|
+
same npm script CI calls, so "passes locally" predicts CI.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Phase 3 — Prove the ratchet bites [LOW freedom — run both probes]
|
|
291
|
+
|
|
292
|
+
A gate nobody tested is a gate nobody has.
|
|
293
|
+
|
|
294
|
+
- **Fresh-clone probe** — deletions can pass locally on a warm
|
|
295
|
+
`node_modules` and fail on a clean install:
|
|
296
|
+
```
|
|
297
|
+
git clone . /tmp/dc-probe && cd /tmp/dc-probe && npm ci \
|
|
298
|
+
&& npm run typecheck && npm test && npm run build && npm run knip
|
|
299
|
+
```
|
|
300
|
+
- **Deliberate-violation probe** — on a scratch branch, add
|
|
301
|
+
`export const zz = 1` to any file and push. The `dead-code` job **and** the
|
|
302
|
+
aggregator must go red. If the aggregator stays green, it is counting a
|
|
303
|
+
skipped job as success — that is `housekeep-gates` Phase 1. Delete the
|
|
304
|
+
branch after.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Anti-patterns [LOW freedom — refuse these]
|
|
309
|
+
|
|
310
|
+
- **`knip --fix` bare, or before config settles.** Always `--fix-type`.
|
|
311
|
+
`--allow-remove-files` with no `--fix-type` counts as bare.
|
|
312
|
+
- **Lowering a number without lowering dead code.** All of these move the
|
|
313
|
+
metric and remove no code: `ignore`, `ignoreFiles`, `ignoreIssues`,
|
|
314
|
+
`ignoreDependencies`, `--exclude`, a narrowed `--include`, `--workspace`
|
|
315
|
+
scoping, `--no-exit-code`, switching off `noUnusedLocals` or a lint rule,
|
|
316
|
+
and — the quietest one — a `rules` entry downgraded to `warn`. Knip's
|
|
317
|
+
`--max-issues` total counts only issue types whose rule is `error`, so
|
|
318
|
+
`rules: { files: "warn" }` reports every dead file and still exits `0`.
|
|
319
|
+
Use `entry`, `paths`, `--production`, or a `@public`/`@internal` tag to
|
|
320
|
+
fix a *false positive*; use deletion to fix a true one.
|
|
321
|
+
- **Ignoring instead of deleting.** An unused shadcn component gets
|
|
322
|
+
deleted — `npx shadcn add` restores it in seconds. Ignoring it keeps
|
|
323
|
+
dead code *and* adds an exemption to maintain.
|
|
324
|
+
- **Commenting out.** Git is the archive.
|
|
325
|
+
- **Big-bang commit.** One category per commit or a bisect is impossible.
|
|
326
|
+
- **Skipping the gate to finish.** Red after a batch means bisect the
|
|
327
|
+
batch. Never `--no-verify`, never delete the failing test.
|
|
328
|
+
- **Deleting the test instead of the dead code**, or weakening an assertion
|
|
329
|
+
so a deletion passes.
|
|
330
|
+
- **Counting instead of curing.** Forty unused exports from one barrel is
|
|
331
|
+
one finding: the barrel.
|
|
332
|
+
- **Deleting untested load-bearing code** because typecheck was green.
|
|
333
|
+
Typecheck cannot see a string-referenced route.
|
|
334
|
+
|
|
335
|
+
## Self-critique before claiming done [LOW freedom — do not skip]
|
|
336
|
+
|
|
337
|
+
1. **Approved list only** — nothing deleted that the plan did not list, or
|
|
338
|
+
the extra was justified in writing
|
|
339
|
+
2. **One category per commit** — history is bisectable
|
|
340
|
+
3. **Verified between** — typecheck, tests, build ran *after each* category
|
|
341
|
+
with fresh output; the final gate ran after the final edit
|
|
342
|
+
4. **Cascade completed** — C2/C3 looped until stable, not run once
|
|
343
|
+
5. **No suppression laundering** — no `@ts-ignore`, `any`, skipped or
|
|
344
|
+
deleted test, or weakened assertion used to get green
|
|
345
|
+
6. **Nothing hidden** — the count fell because code left the repo. No
|
|
346
|
+
`ignore*` entry, `--exclude`, narrowed `--include`, `--workspace` scope,
|
|
347
|
+
`--no-exit-code`, `rules: warn` downgrade, or disabled compiler/lint
|
|
348
|
+
flag was used to move a number
|
|
349
|
+
7. **Ratchet live** — script + CI job + aggregator wiring exist, the
|
|
350
|
+
baseline is the post-cleanup number, and both probes ran (fresh clone
|
|
351
|
+
green, deliberate violation red)
|
|
352
|
+
8. **Schema gated** — no `DROP` without a confirmed target and a reviewed
|
|
353
|
+
reversible migration
|
|
354
|
+
9. **Restores recorded** — every false positive is written back into
|
|
355
|
+
`knip.json`/tags so the next run does not re-report it
|
|
356
|
+
10. **Net enforcement ≥ before** — dead code down, gate coverage up
|
|
357
|
+
|
|
358
|
+
## Definition of Done
|
|
359
|
+
|
|
360
|
+
- [ ] Approved plan loaded; tree clean; repo green at baseline
|
|
361
|
+
- [ ] C1–C4 applied via `--fix-type`, one commit each, verified between
|
|
362
|
+
- [ ] C2/C3 cascade repeated until counts stabilized
|
|
363
|
+
- [ ] Residue, assets, suppressions handled or explicitly deferred
|
|
364
|
+
- [ ] Duplication measured and ratcheted; fixes handed to `workflow-refactor`
|
|
365
|
+
(or landed as separate refactor commits, never mixed with deletions)
|
|
366
|
+
- [ ] Schema arm gated, or completed with a reversible reviewed migration
|
|
367
|
+
- [ ] False positives written back as config/tags, not `ignore`
|
|
368
|
+
- [ ] `knip` script + CI job with `--max-issues` at the new count
|
|
369
|
+
- [ ] Job wired into the one aggregator gate; other counts ratcheted
|
|
370
|
+
- [ ] Fresh-clone probe green; deliberate-violation probe red
|
|
371
|
+
- [ ] Full verification ladder re-run after the last edit
|
|
372
|
+
- [ ] Before/after numbers reported against the plan's baseline
|
|
373
|
+
|
|
374
|
+
## Output format
|
|
375
|
+
|
|
376
|
+
1. **Per-category log** — category | plan rows applied | items removed | new chain items surfaced | gate result | commit SHA
|
|
377
|
+
2. **Baseline vs now** — every metric from the plan's 4a table, before → after
|
|
378
|
+
3. **False positives** — item | why it was live | config/tag written back
|
|
379
|
+
4. **Ratchet** — scripts, CI job, aggregator wiring, pinned numbers
|
|
380
|
+
5. **Probe evidence** — fresh clone | deliberate violation | bundle leak
|
|
381
|
+
6. **Deferred** — what was left and why (owner, risk, or missing coverage)
|
|
382
|
+
6. **Handoffs** — duplication → `workflow-refactor`; migrations →
|
|
383
|
+
`db-migrator`; leftover parked items → `housekeep-backlog`; gate
|
|
384
|
+
consolidation → `housekeep-gates`
|
|
385
|
+
|
|
386
|
+
Applied category-by-category. Pause for approval when a category's blast
|
|
387
|
+
radius is large. Schema deletion always gets explicit confirmation.
|