@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,458 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-fe-api
|
|
3
|
+
description: >
|
|
4
|
+
Audit frontend API calls against backend implementation for contract alignment
|
|
5
|
+
and network shape. Use when "API audit", "FE-BE contract", or "review frontend
|
|
6
|
+
API integration". Live 4xx/5xx reproduction → debug-fe-be-integration.
|
|
7
|
+
license: MIT
|
|
8
|
+
effort: high
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Frontend API Audit Skill
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED** — Steps 0, 1, 3–6 `[HIGH freedom]`; Step 2
|
|
14
|
+
Sentry queries and schema SQL `[LOW freedom — run exactly]`.
|
|
15
|
+
|
|
16
|
+
Read-only. Present findings; the Phase 6 snippets are the fix shape to
|
|
17
|
+
recommend, not edits to make in this pass.
|
|
18
|
+
|
|
19
|
+
## How to reason
|
|
20
|
+
|
|
21
|
+
1. **Observe** — quote the FE call site, BE route, and response/error
|
|
22
|
+
2. **Interpret** — does the contract match (path, method, params, types)?
|
|
23
|
+
3. **Classify** — missing route / mismatch / untyped / cache-gap / correct
|
|
24
|
+
4. **Severity** — 404/401/type-mismatch in prod = Critical; cache/prefetch = opportunity
|
|
25
|
+
|
|
26
|
+
## Worked example
|
|
27
|
+
|
|
28
|
+
> **Observe:** `useUser` GETs `/api/users/${id}`; no `app/api/users/[id]/route.ts`;
|
|
29
|
+
> Sentry 25× 404 in 14d.
|
|
30
|
+
> **Interpret:** FE calls a route the BE never registered.
|
|
31
|
+
> **Classify:** missing route (Critical).
|
|
32
|
+
> **Severity:** Critical — guaranteed 404.
|
|
33
|
+
> **Finding:** `hooks/useUser.ts` | GET `/api/users/:id` | Critical | no BE route.
|
|
34
|
+
|
|
35
|
+
## Self-critique before reporting [LOW freedom — do not skip]
|
|
36
|
+
|
|
37
|
+
1. **Evidenced** — FE file + BE route or Sentry event, not "probably 500"
|
|
38
|
+
2. **Contract, not taste** — staleTime advice needs a freshness reason
|
|
39
|
+
3. **Severity justified** — Critical = broken contract in prod
|
|
40
|
+
4. **Right owner** — live 4xx/5xx repro → `debug-fe-be-integration`; DB shape → `audit-db-schema`
|
|
41
|
+
5. **Both sides named** — every mismatch lists FE file and BE path (or NOT FOUND)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 0: Auto-Detect API Layer
|
|
46
|
+
|
|
47
|
+
### 0a. Detect Frontend Stack
|
|
48
|
+
|
|
49
|
+
| Dependency | Technology |
|
|
50
|
+
|------------|-----------|
|
|
51
|
+
| `@tanstack/react-query` | TanStack Query (React Query) |
|
|
52
|
+
| `swr` | SWR |
|
|
53
|
+
| `@reduxjs/toolkit` with `createApi` | RTK Query |
|
|
54
|
+
| `axios` | Axios HTTP client |
|
|
55
|
+
| `ky` | Ky HTTP client |
|
|
56
|
+
| `ofetch` or `$fetch` | Nuxt/ofetch |
|
|
57
|
+
| `@trpc/client` | tRPC (type-safe RPC) |
|
|
58
|
+
| `graphql-request` or `@apollo/client` | GraphQL |
|
|
59
|
+
| `openapi-fetch` or `openapi-typescript` | OpenAPI typed client |
|
|
60
|
+
|
|
61
|
+
### 0b. Detect Backend Stack
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Glob: **/app/api/**/route.ts → Next.js App Router API routes
|
|
66
|
+
Glob: **/pages/api/**/*.ts → Next.js Pages Router API routes
|
|
67
|
+
Glob: **/src/routes/**/*.ts → Express/Hono/Fastify routes
|
|
68
|
+
Glob: **/server/api/**/*.ts → Nuxt server routes
|
|
69
|
+
Glob: **/src/app.py → Flask/Django
|
|
70
|
+
Glob: **/main.go → Go backend
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 0c. Find API Service Files
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Glob: **/services/*api*.ts → API service files
|
|
77
|
+
Glob: **/services/*service*.ts → Service files
|
|
78
|
+
Glob: **/api/*.ts → API client files
|
|
79
|
+
Glob: **/hooks/use*.ts → Custom hooks (may contain API calls)
|
|
80
|
+
Glob: **/lib/api*.ts → API client config
|
|
81
|
+
Glob: **/features/*/api.* → Feature-specific API files
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 0d. Detect Dev Server Port
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Grep: "dev" in package.json scripts → extract port (3000, 3001, 5173, 8080, etc.)
|
|
88
|
+
Grep: "PORT" in .env or .env.local
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 0e. Record Discovery
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
API LAYER DISCOVERY:
|
|
95
|
+
- HTTP client: [axios/fetch/ky/ofetch]
|
|
96
|
+
- State management: [TanStack Query/SWR/RTK Query/none]
|
|
97
|
+
- API style: [REST/GraphQL/tRPC]
|
|
98
|
+
- Backend framework: [Next.js API routes/Express/Hono/etc.]
|
|
99
|
+
- API service files: [list paths]
|
|
100
|
+
- API hooks: [list paths]
|
|
101
|
+
- Dev server: http://localhost:[port]
|
|
102
|
+
- API docs: [path or URL if detected]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Step 1: Research API Best Practices
|
|
108
|
+
|
|
109
|
+
### 1a. Context7 — Library Documentation
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
context7:resolve-library-id
|
|
113
|
+
{
|
|
114
|
+
"libraryName": "<DETECTED_LIBRARY>",
|
|
115
|
+
"query": "caching deduplication error handling best practices"
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
context7:query-docs
|
|
121
|
+
{
|
|
122
|
+
"libraryId": "<RESOLVED_ID>",
|
|
123
|
+
"query": "staleTime cacheTime retry error handling optimistic updates"
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Run for each major dependency (e.g., `@tanstack/react-query`, `axios`, `zod`).
|
|
128
|
+
|
|
129
|
+
### 1b. Firecrawl — Current API Patterns
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
firecrawl:firecrawl_search
|
|
133
|
+
{
|
|
134
|
+
"query": "<FRAMEWORK> API integration best practices [current year]",
|
|
135
|
+
"limit": 5,
|
|
136
|
+
"sources": [{ "type": "web" }]
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
| Topic | Query |
|
|
141
|
+
|-------|-------|
|
|
142
|
+
| Caching | `<state library> caching strategy staleTime production` |
|
|
143
|
+
| Error handling | `<framework> API error handling patterns retry` |
|
|
144
|
+
| Type safety | `<framework> type-safe API client OpenAPI Zod` |
|
|
145
|
+
| Performance | `frontend API request optimization batching deduplication` |
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Step 2: Check Production API Errors (Sentry)
|
|
150
|
+
|
|
151
|
+
### 2a. Find API-Related Production Errors
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
sentry:search_issues
|
|
155
|
+
{
|
|
156
|
+
"organizationSlug": "<ORG_SLUG>",
|
|
157
|
+
"query": "API errors 4xx 5xx fetch axios network from the last 14 days",
|
|
158
|
+
"projectSlugOrId": "<PROJECT_SLUG>",
|
|
159
|
+
"regionUrl": "<REGION_URL>",
|
|
160
|
+
"limit": 25
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 2b. Find Slowest API Calls
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
sentry:search_events
|
|
168
|
+
{
|
|
169
|
+
"organizationSlug": "<ORG_SLUG>",
|
|
170
|
+
"projectSlug": "<PROJECT_SLUG>",
|
|
171
|
+
"regionUrl": "<REGION_URL>",
|
|
172
|
+
"dataset": "spans",
|
|
173
|
+
"query": "span.op:http.client",
|
|
174
|
+
"sort": "-span.duration",
|
|
175
|
+
"limit": 15
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 2c. Cross-Reference with Frontend Code
|
|
180
|
+
|
|
181
|
+
For each Sentry error: identify the endpoint, `Grep` the FE caller, check error/retry/types.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Phase 3: Discover Frontend API Calls
|
|
186
|
+
|
|
187
|
+
### 3a. Find All API Calls
|
|
188
|
+
|
|
189
|
+
Grep (not bash grep):
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Grep: pattern "fetch\(|axios\.|api\.(get|post|patch|put|delete)" glob "*.{ts,tsx,js,jsx}"
|
|
193
|
+
Grep: pattern "useQuery|useMutation|useInfiniteQuery|useSuspenseQuery" glob "*.{ts,tsx}"
|
|
194
|
+
Grep: pattern "createApi|injectEndpoints" glob "*.{ts,tsx}"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 3b. Create API Call Inventory
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
| File | Function/Hook | Method | Endpoint | Params | Used By |
|
|
201
|
+
|------|---------------|--------|----------|--------|---------|
|
|
202
|
+
| `services/user.ts` | `getUsers` | GET | `/api/users` | `page`, `limit` | `UserList.tsx` |
|
|
203
|
+
| `hooks/useUser.ts` | `useUser` | GET | `/api/users/:id` | `id` | `UserProfile.tsx` |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Phase 4: Validate Against Backend
|
|
208
|
+
|
|
209
|
+
### 4a. Check Endpoint Existence
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
Grep: pattern "<ENDPOINT_PATH>" glob "*.{ts,js,py,go,rb}" — in backend source
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
App Router: `app/api/<path>/route.ts` must exist.
|
|
216
|
+
|
|
217
|
+
### 4b. Check Parameter Correctness
|
|
218
|
+
|
|
219
|
+
| Check | How |
|
|
220
|
+
|-------|-----|
|
|
221
|
+
| Required params sent | Compare FE call params with BE validation schema (Zod, Yup, Joi) |
|
|
222
|
+
| Naming convention match | FE camelCase vs BE snake_case — check if transform exists |
|
|
223
|
+
| Type match | FE sends string but BE expects number, or vice versa |
|
|
224
|
+
| Body shape match | Compare FE request body with BE expected schema |
|
|
225
|
+
|
|
226
|
+
### 4c. Verify Schema with Supabase MCP
|
|
227
|
+
|
|
228
|
+
If the backend reads from Supabase, verify the DB schema matches what the frontend expects:
|
|
229
|
+
|
|
230
|
+
```json
|
|
231
|
+
supabase:execute_sql
|
|
232
|
+
{
|
|
233
|
+
"query": "SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = '<TABLE>' ORDER BY ordinal_position"
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Compare columns/types to FE TypeScript interfaces.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Phase 5: Identify Issues
|
|
242
|
+
|
|
243
|
+
### Critical Issues
|
|
244
|
+
|
|
245
|
+
| Issue | Impact | Detection |
|
|
246
|
+
|-------|--------|-----------|
|
|
247
|
+
| Endpoint does not exist | 404 errors | Grep backend for route — not found |
|
|
248
|
+
| Missing required parameter | 500/422 errors | Compare FE params with BE schema |
|
|
249
|
+
| Wrong HTTP method | 405 errors | FE uses GET, BE expects POST |
|
|
250
|
+
| Auth header missing | 401 errors | Check API client interceptor |
|
|
251
|
+
| Type mismatch | Runtime errors | FE interface vs BE response shape |
|
|
252
|
+
|
|
253
|
+
### Warnings
|
|
254
|
+
|
|
255
|
+
| Issue | Impact | Detection |
|
|
256
|
+
|-------|--------|-----------|
|
|
257
|
+
| Parameter name mismatch | Silently ignored params | camelCase vs snake_case comparison |
|
|
258
|
+
| Deprecated endpoint | Future breakage | Version markers in BE routes |
|
|
259
|
+
| Missing error handling | Poor UX | useQuery without error state handling |
|
|
260
|
+
| No loading state | Poor UX | No `isLoading` / `isPending` check |
|
|
261
|
+
|
|
262
|
+
### Optimization Opportunities
|
|
263
|
+
|
|
264
|
+
| Issue | Impact | Detection |
|
|
265
|
+
|-------|--------|-----------|
|
|
266
|
+
| Duplicate requests | Wasted bandwidth | Same queryKey in multiple components |
|
|
267
|
+
| No caching configured | Slow UX | `staleTime` not set (default 0) |
|
|
268
|
+
| No request batching | Too many requests | N+1 query pattern in lists |
|
|
269
|
+
| Missing prefetch | Slow navigation | No prefetchQuery on hover/focus |
|
|
270
|
+
| No optimistic updates | Slow mutations | Mutation waits for server response |
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Phase 6: Frontend Optimizations
|
|
275
|
+
|
|
276
|
+
### 6a. Caching Strategy
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
// Per-query staleTime based on data freshness needs
|
|
280
|
+
const { data } = useQuery({
|
|
281
|
+
queryKey: ['user', userId],
|
|
282
|
+
queryFn: () => getUser(userId),
|
|
283
|
+
staleTime: 1000 * 60 * 10, // User data: 10 minutes
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
const { data: settings } = useQuery({
|
|
287
|
+
queryKey: ['settings'],
|
|
288
|
+
queryFn: getSettings,
|
|
289
|
+
staleTime: Infinity, // Settings rarely change
|
|
290
|
+
});
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### 6b. Optimistic Updates
|
|
294
|
+
|
|
295
|
+
```typescript
|
|
296
|
+
const mutation = useMutation({
|
|
297
|
+
mutationFn: updateUser,
|
|
298
|
+
onMutate: async (newData) => {
|
|
299
|
+
await queryClient.cancelQueries({ queryKey: ['user', userId] });
|
|
300
|
+
const previous = queryClient.getQueryData(['user', userId]);
|
|
301
|
+
queryClient.setQueryData(['user', userId], newData);
|
|
302
|
+
return { previous };
|
|
303
|
+
},
|
|
304
|
+
onError: (_err, _newData, context) => {
|
|
305
|
+
queryClient.setQueryData(['user', userId], context?.previous);
|
|
306
|
+
},
|
|
307
|
+
onSettled: () => {
|
|
308
|
+
queryClient.invalidateQueries({ queryKey: ['user', userId] });
|
|
309
|
+
},
|
|
310
|
+
});
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### 6c. Prefetching
|
|
314
|
+
|
|
315
|
+
```typescript
|
|
316
|
+
const prefetchUser = (userId: string) => {
|
|
317
|
+
queryClient.prefetchQuery({
|
|
318
|
+
queryKey: ['user', userId],
|
|
319
|
+
queryFn: () => getUser(userId),
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
// On hover or focus
|
|
324
|
+
<Link onMouseEnter={() => prefetchUser(userId)} to={`/users/${userId}`}>
|
|
325
|
+
View User
|
|
326
|
+
</Link>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### 6d. Error Handling
|
|
330
|
+
|
|
331
|
+
```typescript
|
|
332
|
+
const { data, error, isError, isLoading } = useQuery({
|
|
333
|
+
queryKey: ['users'],
|
|
334
|
+
queryFn: getUsers,
|
|
335
|
+
retry: 3,
|
|
336
|
+
retryDelay: (attempt) => Math.min(1000 * 2 ** attempt, 30000),
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
if (isLoading) return <Skeleton />;
|
|
340
|
+
if (isError) return <ErrorDisplay error={error} />;
|
|
341
|
+
if (!data?.length) return <EmptyState message="No users found" />;
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### 6e. Response Validation (Zod)
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
import { z } from 'zod';
|
|
348
|
+
|
|
349
|
+
const UserSchema = z.object({
|
|
350
|
+
id: z.string().uuid(),
|
|
351
|
+
email: z.string().email(),
|
|
352
|
+
name: z.string(),
|
|
353
|
+
createdAt: z.string().datetime(),
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
type User = z.infer<typeof UserSchema>;
|
|
357
|
+
|
|
358
|
+
const getUser = async (id: string): Promise<User> => {
|
|
359
|
+
const response = await api.get(`/api/users/${id}`);
|
|
360
|
+
return UserSchema.parse(response.data);
|
|
361
|
+
};
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Output Template
|
|
367
|
+
|
|
368
|
+
```markdown
|
|
369
|
+
## Frontend API Audit Report
|
|
370
|
+
|
|
371
|
+
**Audited:** [date]
|
|
372
|
+
**Framework:** [detected framework]
|
|
373
|
+
**API client:** [detected client]
|
|
374
|
+
**State management:** [detected library]
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
### Production Error Summary (Sentry)
|
|
379
|
+
|
|
380
|
+
| Endpoint | Error | Frequency | Has Error Handling |
|
|
381
|
+
|----------|-------|-----------|-------------------|
|
|
382
|
+
| [endpoint] | [error type] | [events/week] | [YES/NO] |
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
### Critical Issues (Must Fix)
|
|
387
|
+
|
|
388
|
+
#### 1. [Endpoint/File] — [Issue Type]
|
|
389
|
+
- **Current:** `[current implementation]`
|
|
390
|
+
- **Problem:** [description]
|
|
391
|
+
- **Fix:** `[correct implementation]`
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
### Warnings (Should Fix)
|
|
396
|
+
|
|
397
|
+
#### 1. [Issue description]
|
|
398
|
+
- **File:** `[file path]`
|
|
399
|
+
- **Impact:** [what could go wrong]
|
|
400
|
+
- **Recommendation:** [how to fix]
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
### Optimization Opportunities
|
|
405
|
+
|
|
406
|
+
#### 1. Caching
|
|
407
|
+
- **Missing staleTime:** [list endpoints]
|
|
408
|
+
- **Recommendation:** [suggested values per data type]
|
|
409
|
+
|
|
410
|
+
#### 2. Prefetching
|
|
411
|
+
- **Candidates:** [navigation links that could prefetch]
|
|
412
|
+
|
|
413
|
+
#### 3. Batching
|
|
414
|
+
- **N+1 patterns found:** [list]
|
|
415
|
+
- **Backend batch endpoint exists:** [YES/NO]
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
### API Inventory
|
|
420
|
+
|
|
421
|
+
| Endpoint | Method | Frontend File | Backend Route | Status | Notes |
|
|
422
|
+
|----------|--------|---------------|---------------|--------|-------|
|
|
423
|
+
| `/api/users` | GET | `user-service.ts` | `app/api/users/route.ts` | VALID | — |
|
|
424
|
+
| `/api/reports` | GET | `report-hook.ts` | NOT FOUND | MISSING | Remove or implement |
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
### Type Safety Status
|
|
429
|
+
|
|
430
|
+
| Service | Typed Response | Zod Validation | Notes |
|
|
431
|
+
|---------|---------------|----------------|-------|
|
|
432
|
+
| `user-service.ts` | YES | NO | Add runtime validation |
|
|
433
|
+
| `auth-service.ts` | Partial | NO | Missing error response types |
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### Research Findings Applied
|
|
438
|
+
- [Pattern]: [how it applies]
|
|
439
|
+
- [Best practice]: [gap identified]
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### Next Steps
|
|
444
|
+
|
|
445
|
+
1. [ ] Fix critical: [list]
|
|
446
|
+
2. [ ] Add missing parameters: [list]
|
|
447
|
+
3. [ ] Configure caching: [list with suggested staleTime values]
|
|
448
|
+
4. [ ] Add error handling: [files]
|
|
449
|
+
5. [ ] Add Zod validation: [services]
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Related
|
|
455
|
+
|
|
456
|
+
- `debug-fe-be-integration` — live 4xx/5xx reproduction from BE logs
|
|
457
|
+
- `audit-db-schema` — FE types vs DB columns
|
|
458
|
+
- `debug-sentry-monitor` — production error volume on the same endpoints
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-gate-logic
|
|
3
|
+
description: >
|
|
4
|
+
Read-only audit of CI gate logic: silent bypass, ratchet gaming,
|
|
5
|
+
required-but-not, duplicate gates. Use when "can CI be bypassed" or "why did
|
|
6
|
+
a regression pass CI". Cost → audit-cicd. Rule content → audit-doctrine.
|
|
7
|
+
license: MIT
|
|
8
|
+
effort: high
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# audit-gate-logic — Does the gate actually stop what it claims?
|
|
12
|
+
|
|
13
|
+
**Degree of freedom: MIXED** — Phases 0–2.5 `[HIGH freedom]`; Phase 3
|
|
14
|
+
history/probe `[LOW freedom — run exactly]` (no scratch branch unless asked).
|
|
15
|
+
|
|
16
|
+
Read-only. `audit-cicd` asks "is the pipeline fast, cheap, and safe to run."
|
|
17
|
+
This asks **"does the gate stop what it claims to stop."** A green check is a
|
|
18
|
+
claim. The expensive failures are the ones where CI passed and shouldn't have.
|
|
19
|
+
|
|
20
|
+
Present findings. Do not edit workflows, branch protection, or baselines.
|
|
21
|
+
Consolidation of the archaeology map → `housekeep-gates`. Rule-to-mechanical
|
|
22
|
+
gaps → `enhance-agent-guardrails`. Whether the *rule content* is right
|
|
23
|
+
(remedy, named token, Tier-D practice) → `audit-doctrine`.
|
|
24
|
+
|
|
25
|
+
## This skill vs neighbors
|
|
26
|
+
|
|
27
|
+
| Skill | Owns |
|
|
28
|
+
|---|---|
|
|
29
|
+
| **audit-gate-logic** (this) | Bypass, ratchet integrity, conflicts, required-vs-actual, archaeology map |
|
|
30
|
+
| `housekeep-gates` | *Executes* the map — aggregator, delete losers, prove |
|
|
31
|
+
| `audit-cicd` | Pipeline cost, speed, storage, runner safety |
|
|
32
|
+
| `workflow-quality-gate` | *Runs* the pre-release sweep — does not audit its soundness |
|
|
33
|
+
| `enhance-agent-guardrails` | *Installs* new gates; does not audit existing gate logic |
|
|
34
|
+
| `burndown-full` / `workflow-green-repo` | Execute MATCH/DONE or green the repo — ratchet holes stay here |
|
|
35
|
+
| `audit-codemod-safety` | Bulk-transform behavior; if CI waved a semantic bug through, that is also a finding here |
|
|
36
|
+
| `test-mutation` | Assertion-strength gate this map should name if coverage is the only test metric |
|
|
37
|
+
|
|
38
|
+
**Degrade honestly.** Highest-value "is it actually required" checks need
|
|
39
|
+
branch-protection / rulesets via the repo settings API (`gh api`), not just
|
|
40
|
+
YAML. If settings are invisible, audit the workflow files and say so — you
|
|
41
|
+
can still catch `continue-on-error` and ratchet classes, but you cannot
|
|
42
|
+
confirm the required-check list.
|
|
43
|
+
|
|
44
|
+
## How to reason
|
|
45
|
+
|
|
46
|
+
1. **Observe** — quote the `if:`, `continue-on-error`, required-check list, or history
|
|
47
|
+
2. **Interpret** — can a merge go green while the claimed check did not run or failed?
|
|
48
|
+
3. **Classify** — silent bypass / ratchet game / conflict / archaeology / correct-as-is
|
|
49
|
+
4. **Severity** — ships-broken-green = critical
|
|
50
|
+
|
|
51
|
+
## Worked example
|
|
52
|
+
|
|
53
|
+
> **Observe:** `lint` job has `continue-on-error: true` and is the only
|
|
54
|
+
> required status check named "Lint".
|
|
55
|
+
> **Interpret:** lint can fail and the required check still reports success.
|
|
56
|
+
> **Classify:** silent bypass (`continue-on-error`).
|
|
57
|
+
> **Severity:** critical — ships-broken-green.
|
|
58
|
+
> **Finding:** lint | continue-on-error | critical | `.github/workflows/ci.yml:24`
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 0 — Map every gate and its enforcement [HIGH freedom]
|
|
63
|
+
|
|
64
|
+
Inventory the full gating surface, not just the obvious jobs:
|
|
65
|
+
|
|
66
|
+
- **Workflows & jobs** (`.github/workflows/*`, or GitLab/CircleCI equivalent):
|
|
67
|
+
each job, its triggers (`on:`), its `if:` conditions, path/branch filters.
|
|
68
|
+
- **Required status checks** (branch protection / rulesets): which checks
|
|
69
|
+
*actually* block merge vs which merely run.
|
|
70
|
+
- **Ratchets / baselines**: coverage floors, lint-error baselines, bundle
|
|
71
|
+
budgets, type-error counts, MATCH/DONE burndown, `workflow-green-repo`
|
|
72
|
+
green baseline.
|
|
73
|
+
- **Pre-commit / pre-push hooks**: local gates that may not mirror CI.
|
|
74
|
+
- **Bot gates**: CodeRabbit / Sonar / Danger — block vs advise.
|
|
75
|
+
|
|
76
|
+
For each gate record: what it checks, what happens on failure (block / warn /
|
|
77
|
+
silently pass), and whether it is enforced server-side or only by convention.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Phase 1 — Silent-bypass failure modes [HIGH freedom]
|
|
82
|
+
|
|
83
|
+
**`continue-on-error` / soft failure** — `continue-on-error: true`, `|| true`,
|
|
84
|
+
`exit 0` swallowing, or `if: always()` masking a failure. The check runs,
|
|
85
|
+
"passes", and enforces nothing.
|
|
86
|
+
|
|
87
|
+
**Required-in-name-only** — Runs in CI but is not in the required list →
|
|
88
|
+
mergeable while failing. Or a required check whose *job* can be skipped
|
|
89
|
+
(`if:`) so it reports success-by-absence. A skipped required check often
|
|
90
|
+
counts as passed.
|
|
91
|
+
|
|
92
|
+
**Path/branch filters that skip the wrong changes** — `paths:` /
|
|
93
|
+
`paths-ignore:` that exclude a gate for the files that needed it (security
|
|
94
|
+
scan skips `.github/`, so a PR that disables the scan is not scanned).
|
|
95
|
+
Filters that never run on the default branch, or only on PRs and not on
|
|
96
|
+
direct pushes.
|
|
97
|
+
|
|
98
|
+
**Condition conflicts** — Two workflows whose `if:` / triggers **both fire**
|
|
99
|
+
on the same event (duplicate work, race on a shared resource, contradictory
|
|
100
|
+
status posts) or **both skip** (each assumes the other ran). Missing
|
|
101
|
+
concurrency groups so two runs race and the loser's failure is discarded.
|
|
102
|
+
|
|
103
|
+
**Fork / permissions bypass** — `pull_request_target` running privileged with
|
|
104
|
+
untrusted code, or gates that do not run on external-contributor PRs.
|
|
105
|
+
|
|
106
|
+
**Event mismatch** — Gate triggers on `push` but merges use squash/PR (or
|
|
107
|
+
vice versa), so the enforced commit was never the gated one.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Phase 2 — Ratchet and baseline soundness [HIGH freedom]
|
|
112
|
+
|
|
113
|
+
**One-way that isn't** — Can the baseline be regenerated in the same PR that
|
|
114
|
+
regresses (`--update-snapshot`, `coverage --update-baseline` committed
|
|
115
|
+
alongside the drop), locking the regression in as the new floor? Baseline
|
|
116
|
+
moves should be a separate, reviewed act.
|
|
117
|
+
|
|
118
|
+
**Exclusion gaming** — Coverage/lint passes because the dropped files are in
|
|
119
|
+
`.eslintignore`, `coveragePathIgnorePatterns`, or `// istanbul ignore`. A
|
|
120
|
+
ratchet that measures a shrinking surface always passes.
|
|
121
|
+
|
|
122
|
+
**Threshold vs reality** — Floor so far below actual that a real drop still
|
|
123
|
+
clears it (60% gate, 90% actual → 89% "passes"). Global thresholds hiding
|
|
124
|
+
per-file collapse. Bundle budgets set above current so growth is free.
|
|
125
|
+
|
|
126
|
+
**Baseline staleness / drift** — Never regenerated (no longer reflects the
|
|
127
|
+
codebase) or auto-regenerated every run (never actually ratchets).
|
|
128
|
+
|
|
129
|
+
**Direction bugs** — Comparison operator backwards (passes when *worse*), or
|
|
130
|
+
comparing against `main` after `main` already absorbed the regression.
|
|
131
|
+
|
|
132
|
+
**Burndown ratchet integrity** — Can MATCH/DONE mark an item DONE without
|
|
133
|
+
verification evidence? Can the count go down (work un-done) without failing?
|
|
134
|
+
Cross-check `completion-judge` / `burndown-full`.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Phase 2.5 — Gate archaeology (accreted gates from multiple sessions) [HIGH freedom]
|
|
139
|
+
|
|
140
|
+
Gates accumulate: each dev, agent session, or "let's add a check" iteration
|
|
141
|
+
layers another workflow without removing the last. Audit the *set*:
|
|
142
|
+
|
|
143
|
+
**Duplicate gates, different vintages** — Two+ jobs checking the same
|
|
144
|
+
thing (two lint jobs with disagreeing configs, ESLint and Biome both
|
|
145
|
+
wired, an old `test.yml` and a newer `ci.yml` both running the suite).
|
|
146
|
+
For each pair: which actually blocks, whether configs disagree, which is
|
|
147
|
+
vestigial.
|
|
148
|
+
|
|
149
|
+
**Competing baselines / ratchets** — Multiple floors for one metric (jest
|
|
150
|
+
threshold + codecov + a committed floor), updated at different times. The
|
|
151
|
+
agent satisfies whichever loaded; the strictest one silently stopped
|
|
152
|
+
being the real gate.
|
|
153
|
+
|
|
154
|
+
**Hook-vs-CI divergence** — Pre-commit / pre-push enforcing a different
|
|
155
|
+
ruleset than CI, so "passes locally" and "passes CI" are different claims
|
|
156
|
+
and people learn `--no-verify`.
|
|
157
|
+
|
|
158
|
+
**Dead gates** — Triggers that can no longer fire (renamed branches,
|
|
159
|
+
removed paths, disabled but not deleted). Still cost comprehension:
|
|
160
|
+
every reader must reason about a gate that does nothing.
|
|
161
|
+
|
|
162
|
+
**Best-of selection** — For each duplicate cluster, name the winner:
|
|
163
|
+
|
|
164
|
+
1. Server-side-enforced beats convention
|
|
165
|
+
2. Aggregator-gate pattern (one required check that `needs:` all others) beats N scattered required checks
|
|
166
|
+
3. Merge-queue-compatible (`merge_group` + matching check names) beats PR-only
|
|
167
|
+
4. Auto-tightening ratchet with reviewed resets beats a static threshold
|
|
168
|
+
5. AST / structural checks beat regex greps
|
|
169
|
+
6. Owned + recently maintained beats abandoned
|
|
170
|
+
|
|
171
|
+
Record winner + losers per cluster — this is the input `housekeep-gates`
|
|
172
|
+
executes.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Phase 3 — Verify against history (where possible) [LOW freedom — do not invent a branch]
|
|
177
|
+
|
|
178
|
+
Where CI history is inspectable, look for a merged PR that introduced a
|
|
179
|
+
failure the gate should have caught. Each one is a proven hole, not a
|
|
180
|
+
hypothetical.
|
|
181
|
+
|
|
182
|
+
Optional cheap probe on a **scratch branch the user already has**: introduce
|
|
183
|
+
a deliberate violation the gate claims to catch and confirm it blocks. A
|
|
184
|
+
gate never tested against a real violation has unknown efficacy. Do not
|
|
185
|
+
create that branch or push it unless the user asked.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Definition of Done
|
|
190
|
+
|
|
191
|
+
- [ ] Every gate inventoried with on-failure behavior and server-side vs convention
|
|
192
|
+
- [ ] All `continue-on-error` / soft-fail / `always()` masking found
|
|
193
|
+
- [ ] Required-check list cross-checked against what actually runs — or explicitly skipped because settings were invisible
|
|
194
|
+
- [ ] Path / branch / event filters checked for excluding the changes that most need gating
|
|
195
|
+
- [ ] Cross-workflow both-fire / both-skip / races surfaced; concurrency groups checked
|
|
196
|
+
- [ ] Fork / `pull_request_target` / external-PR bypass assessed
|
|
197
|
+
- [ ] Every ratchet checked for same-PR overwrite, exclusion gaming, slack threshold, staleness, direction bug
|
|
198
|
+
- [ ] Burndown / completion ratchet integrity checked against its evidence requirement
|
|
199
|
+
- [ ] History scanned for regressions-shipped-green; deliberate-violation probe noted or skipped with reason
|
|
200
|
+
- [ ] Duplicate-gate clusters, competing baselines, hook-vs-CI divergence, and dead gates mapped; a winner named per cluster
|
|
201
|
+
- [ ] Read-only — findings presented, gates not edited; consolidation handed to `housekeep-gates`
|
|
202
|
+
|
|
203
|
+
## Self-critique before reporting [LOW freedom — do not skip]
|
|
204
|
+
|
|
205
|
+
1. **Evidenced** — YAML line, `gh api` result, or merged PR — not "probably bypassable"
|
|
206
|
+
2. **Settings honesty** — if branch protection was invisible, say so; do not invent the required list
|
|
207
|
+
3. **Severity justified** — critical = ships-broken-green
|
|
208
|
+
4. **Right owner** — consolidation → `housekeep-gates`; cost → `audit-cicd`
|
|
209
|
+
5. **Winner named** — every duplicate cluster has a winner + why
|
|
210
|
+
|
|
211
|
+
## Output format
|
|
212
|
+
|
|
213
|
+
1. **Gate inventory** — gate | checks what | on-failure (block/warn/silent) | enforced where
|
|
214
|
+
2. **Bypass findings** — gate | failure mode | severity (critical = ships-broken-green) | evidence
|
|
215
|
+
3. **Ratchet findings** — ratchet | weakness | can it lock in / be gamed? | fix
|
|
216
|
+
4. **Conflict map** — workflow A × workflow B | both-fire / both-skip / race
|
|
217
|
+
5. **Archaeology map** — duplicate cluster | members | winner (+ why) | losers to retire
|
|
218
|
+
6. **Proven holes** — merged PR / probe that passed a gate it shouldn't have
|
|
219
|
+
7. **Fix plan** — silent-bypass first, then ratchet integrity, then conflicts. Consolidation → `housekeep-gates`; pipeline-side → `audit-cicd`; rule-to-mechanical gaps → `enhance-agent-guardrails`. Present and stop.
|