@punks/cli 2.2.6 → 2.2.8
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/AGENTS.md +1 -1
- package/README.md +2 -2
- package/dist/data/AGENTS.md +113 -0
- package/dist/data/control-plane.json +3 -0
- package/dist/data/hooks/format-edited-file.mjs +699 -0
- package/dist/data/hooks/format-edited-file.sh +37 -0
- package/dist/data/hooks/require-tests-for-pr.mjs +206 -0
- package/dist/data/hooks/scaffold-update-check.mjs +181 -0
- package/dist/data/scripts/sync-subagents.mjs +524 -0
- package/dist/data/subagents/manifest.mjs +488 -0
- package/dist/index.js +0 -0
- package/dist/skills/agnostic/backend/backend-domain-structure/SKILL.md +50 -0
- package/dist/skills/agnostic/backend/backend-domain-structure/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/backend/backend-domain-structure/references/layout.md +167 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/SKILL.md +49 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/references/strategy-matrix.md +34 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/references/test-matrix.md +34 -0
- package/dist/skills/agnostic/backend/logging-best-practices/SKILL.md +127 -0
- package/dist/skills/agnostic/backend/logging-best-practices/rules/context.md +157 -0
- package/dist/skills/agnostic/backend/logging-best-practices/rules/pitfalls.md +118 -0
- package/dist/skills/agnostic/backend/logging-best-practices/rules/structure.md +193 -0
- package/dist/skills/agnostic/backend/logging-best-practices/rules/wide-events.md +113 -0
- package/dist/skills/agnostic/cli/dp-cli/SKILL.md +125 -0
- package/dist/skills/agnostic/cli/dp-cli/references/commands.md +70 -0
- package/dist/skills/agnostic/cli/dp-cli/references/post-command-flow.md +70 -0
- package/dist/skills/agnostic/debug/debug-agent/SKILL.md +184 -0
- package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +46 -0
- package/dist/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +67 -0
- package/dist/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +41 -0
- package/dist/skills/agnostic/docs/writing-beats/SKILL.md +69 -0
- package/dist/skills/agnostic/docs/writing-fragments/SKILL.md +76 -0
- package/dist/skills/agnostic/docs/writing-great-skills/GLOSSARY.md +69 -0
- package/dist/skills/agnostic/docs/writing-great-skills/SKILL.md +61 -0
- package/dist/skills/agnostic/docs/writing-shape/SKILL.md +75 -0
- package/dist/skills/agnostic/frontend/agent-browser/.clawdhub/origin.json +7 -0
- package/dist/skills/agnostic/frontend/agent-browser/SKILL.md +229 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/authentication.md +202 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/commands.md +259 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/proxy-support.md +188 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/session-management.md +193 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/snapshot-refs.md +194 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/video-recording.md +173 -0
- package/dist/skills/agnostic/frontend/agent-browser/templates/authenticated-session.sh +97 -0
- package/dist/skills/agnostic/frontend/agent-browser/templates/capture-workflow.sh +69 -0
- package/dist/skills/agnostic/frontend/agent-browser/templates/form-automation.sh +62 -0
- package/dist/skills/agnostic/frontend/design-taste-frontend/SKILL.md +226 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/SKILL.md +55 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/react/structure.md +102 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/structure.md +257 -0
- package/dist/skills/agnostic/frontend/gpt-taste/SKILL.md +74 -0
- package/dist/skills/agnostic/frontend/image-taste-frontend/SKILL.md +1102 -0
- package/dist/skills/agnostic/frontend/redesign-existing-projects/SKILL.md +178 -0
- package/dist/skills/agnostic/generic/handoff/SKILL.md +15 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +39 -0
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +91 -0
- package/dist/skills/agnostic/planning/create-plan/references/backlog-sync.md +44 -0
- package/dist/skills/agnostic/planning/create-plan/references/grill-ambiguity.md +87 -0
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +94 -0
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +42 -0
- package/dist/skills/agnostic/planning/create-plan/references/stop-conditions.md +18 -0
- package/dist/skills/agnostic/planning/create-plan/references/tdd-shaping.md +49 -0
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +111 -0
- package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +91 -0
- package/dist/skills/agnostic/planning/create-spec/references/backlog-sync.md +49 -0
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +54 -0
- package/dist/skills/agnostic/planning/create-spec/references/folder-naming.md +33 -0
- package/dist/skills/agnostic/planning/create-spec/references/grill-phase.md +47 -0
- package/dist/skills/agnostic/planning/create-spec/references/handoff.md +47 -0
- package/dist/skills/agnostic/planning/create-spec/references/questioning.md +51 -0
- package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +58 -0
- package/dist/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +50 -0
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +103 -0
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +65 -0
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +209 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +102 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +79 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +56 -0
- package/dist/skills/agnostic/planning/implement-spec/references/sequential.md +46 -0
- package/dist/skills/agnostic/planning/implement-spec/references/ui-screenshot-evidence.md +61 -0
- package/dist/skills/agnostic/planning/stack/SKILL.md +89 -0
- package/dist/skills/agnostic/planning/swarm-planner/SKILL.md +179 -0
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +191 -0
- package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +1176 -0
- package/dist/skills/agnostic/quality/autoreview/scripts/test-review-harness +176 -0
- package/dist/skills/agnostic/quality/codebase-design/DEEPENING.md +34 -0
- package/dist/skills/agnostic/quality/codebase-design/DESIGN-IT-TWICE.md +43 -0
- package/dist/skills/agnostic/quality/codebase-design/SKILL.md +60 -0
- package/dist/skills/agnostic/quality/simplify/SKILL.md +14 -0
- package/dist/skills/agnostic/quality/tdd/SKILL.md +139 -0
- package/dist/skills/agnostic/quality/tdd/deep-modules.md +33 -0
- package/dist/skills/agnostic/quality/tdd/high-signal-tests.md +39 -0
- package/dist/skills/agnostic/quality/tdd/interface-design.md +31 -0
- package/dist/skills/agnostic/quality/tdd/mocking.md +59 -0
- package/dist/skills/agnostic/quality/tdd/refactoring.md +10 -0
- package/dist/skills/agnostic/quality/tdd/tests.md +61 -0
- package/dist/skills/agnostic/repo-asset-management/SKILL.md +28 -0
- package/dist/skills/agnostic/repo-asset-management/references/acceptance.md +6 -0
- package/dist/skills/agnostic/repo-asset-management/references/azure.md +11 -0
- package/dist/skills/agnostic/repo-asset-management/references/bitbucket.md +8 -0
- package/dist/skills/agnostic/repo-asset-management/references/github.md +11 -0
- package/dist/skills/agnostic/repo-asset-management/references/gitlab.md +11 -0
- package/dist/skills/agnostic/requirements/grilling/SKILL.md +38 -0
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +46 -0
- package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +157 -0
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +71 -0
- package/dist/skills/agnostic/requirements/requirements-grill/references/wiki-output.md +101 -0
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +67 -0
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +264 -0
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +85 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +69 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +66 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +63 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +224 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +76 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +146 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/REFERENCE.md +78 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/SKILL.md +80 -0
- package/dist/skills/agnostic/research/parallel-research/SKILL.md +68 -0
- package/dist/skills/agnostic/research/parallel-research/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/research/prototype/LOGIC.md +31 -0
- package/dist/skills/agnostic/research/prototype/SKILL.md +31 -0
- package/dist/skills/agnostic/research/prototype/UI.md +29 -0
- package/dist/skills/agnostic/subagents/swarm-planner/SKILL.md +179 -0
- package/dist/skills/frameworks/better-auth/better-auth-best-practices/SKILL.md +166 -0
- package/dist/skills/frameworks/better-auth/better-auth-security-best-practices/SKILL.MD +432 -0
- package/dist/skills/frameworks/effect/effect-authoring/SKILL.md +116 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/branded-types.md +98 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/effect-atom-patterns.md +257 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/effect-primitives.md +144 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/error-patterns.md +156 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/otel-patterns.md +113 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/test-patterns.md +146 -0
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +96 -0
- package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +4 -0
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +68 -0
- package/dist/skills/frameworks/effect/effect-best-practices/SKILL.md +517 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/anti-patterns.md +392 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/effect-atom-patterns.md +653 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/error-patterns.md +464 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/language-server.md +287 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/layer-patterns.md +495 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/observability-patterns.md +342 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/rpc-cluster-patterns.md +418 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/schema-patterns.md +353 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/service-patterns.md +299 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/SKILL.md +65 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/agents/openai.yaml +4 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/flow-examples.md +154 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/source-backed-primitives.md +104 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/strategy-matrix.md +34 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/test-matrix.md +36 -0
- package/dist/skills/frameworks/elysia/elysiajs/SKILL.md +475 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/basic.ts +9 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/body-parser.ts +33 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/complex.ts +112 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/cookie.ts +45 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/error.ts +38 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/file.ts +10 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/guard.ts +34 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/map-response.ts +15 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/redirect.ts +6 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/rename.ts +32 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/schema.ts +61 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/state.ts +6 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/upload-file.ts +20 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/websocket.ts +25 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/ai-sdk.md +92 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/astro.md +59 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/better-auth.md +117 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/cloudflare-worker.md +95 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/deno.md +34 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/drizzle.md +258 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/expo.md +95 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/nextjs.md +103 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/nodejs.md +64 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/nuxt.md +67 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/prisma.md +93 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/react-email.md +134 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/sveltekit.md +53 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/tanstack-start.md +87 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/vercel.md +55 -0
- package/dist/skills/frameworks/elysia/elysiajs/patterns/mvc.md +380 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/bearer.md +30 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/cors.md +141 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/cron.md +265 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/graphql-apollo.md +90 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/graphql-yoga.md +87 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/html.md +188 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/jwt.md +197 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/openapi.md +246 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/opentelemetry.md +167 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/server-timing.md +71 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/static.md +84 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/bun-fullstack-dev-server.md +129 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/cookie.md +187 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/deployment.md +413 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/eden.md +158 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/lifecycle.md +198 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/macro.md +83 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/plugin.md +207 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/route.md +331 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/testing.md +385 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/validation.md +491 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/websocket.md +250 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.github/workflows/branch-protection.yml +24 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.github/workflows/deploy.yml +61 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/AGENTS.md +5958 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/SKILL.md +130 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-use-dto-serialization.md +182 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-use-interceptors.md +202 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-use-pipes.md +205 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-versioning.md +191 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-avoid-circular-deps.md +80 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-feature-modules.md +82 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-module-sharing.md +141 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-single-responsibility.md +106 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-use-events.md +108 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-use-repository-pattern.md +97 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/db-avoid-n-plus-one.md +139 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/db-use-migrations.md +129 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/db-use-transactions.md +140 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/devops-graceful-shutdown.md +222 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/devops-use-config-module.md +167 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/devops-use-logging.md +232 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-avoid-service-locator.md +104 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-interface-segregation.md +165 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-liskov-substitution.md +221 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-prefer-constructor-injection.md +86 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-scope-awareness.md +94 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-use-interfaces-tokens.md +101 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/error-handle-async-errors.md +125 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/error-throw-http-exceptions.md +114 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/error-use-exception-filters.md +140 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/micro-use-health-checks.md +226 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/micro-use-patterns.md +167 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/micro-use-queues.md +252 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-async-hooks.md +109 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-lazy-loading.md +121 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-optimize-database.md +131 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-use-caching.md +128 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-auth-jwt.md +146 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-rate-limiting.md +125 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-sanitize-output.md +139 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-use-guards.md +135 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-validate-all-input.md +150 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/test-e2e-supertest.md +178 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/test-mock-external-services.md +179 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/test-use-testing-module.md +153 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/build-agents.ts +299 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/build.sh +16 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/package-lock.json +237 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/package.json +15 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/SKILL.md +208 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/authentication.md +166 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/controllers-routing.md +111 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/dtos-validation.md +153 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/migration-from-express.md +1237 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/services-di.md +140 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/testing-patterns.md +186 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/SKILL.md +153 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/async-patterns.md +87 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/bundling.md +180 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/data-patterns.md +297 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/debug-tricks.md +105 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/directives.md +73 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/error-handling.md +227 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/file-conventions.md +140 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/font.md +245 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/functions.md +108 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/hydration-error.md +91 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/image.md +173 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/metadata.md +301 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/parallel-routes.md +287 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/route-handlers.md +146 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/rsc-boundaries.md +159 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/runtime-selection.md +39 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/scripts.md +141 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/self-hosting.md +371 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/suspense-boundaries.md +67 -0
- package/dist/skills/frameworks/nextjs/next-cache-components/SKILL.md +360 -0
- package/dist/skills/frameworks/react/async-react-patterns/SKILL.md +78 -0
- package/dist/skills/frameworks/react/react-doctor/SKILL.md +64 -0
- package/dist/skills/frameworks/react/react-doctor/references/explain.md +71 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/AGENTS.md +946 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/SKILL.md +89 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/AGENTS.md +3750 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/SKILL.md +148 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-defer-await.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-barrel-imports.md +60 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-request-idle-callback.md +105 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-hoist-static-io.md +149 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-no-shared-module-state.md +50 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/SKILL.md +849 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/assets/example-template.txt +14 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +304 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/common-patterns.md +271 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/example-reference.md +26 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/testing.md +282 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/top-errors.md +332 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/typescript-patterns.md +291 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/v4-to-v5-migration.md +231 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/rules/tanstack-query.md +126 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/scripts/example-script.sh +15 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/custom-hooks-pattern.tsx +281 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +248 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/error-boundary.tsx +243 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/package.json +31 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/provider-setup.tsx +50 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/query-client-config.ts +72 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-infinite-query.tsx +214 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-mutation-basic.tsx +201 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-mutation-optimistic.tsx +234 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-query-basic.tsx +119 -0
- package/dist/skills/frameworks/tanstack-start/tanstack-start/SKILL.md +250 -0
- package/dist/skills/frameworks/trpc/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/dist/skills/frameworks/trpc/tanstack-query/SKILL.md +1058 -0
- package/dist/skills/frameworks/trpc/tanstack-query/assets/example-template.txt +14 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/best-practices.md +304 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/common-patterns.md +271 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/example-reference.md +26 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/testing.md +282 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/top-errors.md +332 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/typescript-patterns.md +291 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/v4-to-v5-migration.md +231 -0
- package/dist/skills/frameworks/trpc/tanstack-query/rules/tanstack-query.md +126 -0
- package/dist/skills/frameworks/trpc/tanstack-query/scripts/example-script.sh +15 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/custom-hooks-pattern.tsx +281 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +248 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/error-boundary.tsx +243 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/package.json +31 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/provider-setup.tsx +50 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/query-client-config.ts +72 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-infinite-query.tsx +214 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-mutation-basic.tsx +201 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-mutation-optimistic.tsx +234 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-query-basic.tsx +119 -0
- package/dist/skills/frameworks/turborepo/turborepo/SKILL.md +914 -0
- package/dist/skills/frameworks/turborepo/turborepo/command/turborepo.md +70 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/RULE.md +241 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/dependencies.md +246 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/packages.md +335 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/structure.md +270 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/boundaries/RULE.md +126 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/caching/RULE.md +107 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/caching/gotchas.md +169 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/caching/remote-cache.md +127 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/RULE.md +79 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/github-actions.md +162 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/patterns.md +145 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/vercel.md +103 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/cli/RULE.md +100 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/cli/commands.md +297 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/RULE.md +211 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/global-options.md +187 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/gotchas.md +348 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/tasks.md +285 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/environment/RULE.md +96 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/environment/gotchas.md +141 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/environment/modes.md +101 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/filtering/RULE.md +148 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/filtering/patterns.md +152 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/watch/RULE.md +99 -0
- package/dist/skills/languages/python/async-python-patterns/SKILL.md +735 -0
- package/dist/skills/languages/python/python-code-style/SKILL.md +360 -0
- package/dist/skills/languages/python/python-design-patterns/SKILL.md +433 -0
- package/dist/skills/languages/python/python-project-structure/SKILL.md +252 -0
- package/dist/skills/languages/python/python-testing-patterns/SKILL.md +622 -0
- package/dist/skills/languages/python/python-testing-patterns/references/advanced-patterns.md +411 -0
- package/dist/skills/languages/typescript/quality-types/SKILL.md +93 -0
- package/dist/skills/phases/bug-discovery-phase/REFERENCE.md +193 -0
- package/dist/skills/phases/bug-discovery-phase/SKILL.md +45 -0
- package/dist/skills/phases/bug-resolution-phase/REFERENCE.md +183 -0
- package/dist/skills/phases/bug-resolution-phase/SKILL.md +49 -0
- package/dist/skills/phases/debugging-phase/SKILL.md +88 -0
- package/dist/skills/phases/delivery-phase/SKILL.md +51 -0
- package/dist/skills/phases/delivery-phase/phases/closeout.md +35 -0
- package/dist/skills/phases/delivery-phase/phases/debug.md +30 -0
- package/dist/skills/phases/delivery-phase/phases/docs-ingest.md +27 -0
- package/dist/skills/phases/delivery-phase/phases/implement.md +32 -0
- package/dist/skills/phases/delivery-phase/phases/plan.md +27 -0
- package/dist/skills/phases/delivery-phase/phases/review.md +29 -0
- package/dist/skills/phases/delivery-phase/phases/router.md +46 -0
- package/dist/skills/phases/delivery-phase/phases/spec.md +26 -0
- package/dist/skills/phases/delivery-phase/references/artifact-state.md +42 -0
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +27 -0
- package/dist/skills/phases/design-phase/SKILL.md +47 -0
- package/dist/skills/phases/design-phase/phases/approval.md +37 -0
- package/dist/skills/phases/design-phase/phases/backlog.md +28 -0
- package/dist/skills/phases/design-phase/phases/delivery-handoff.md +29 -0
- package/dist/skills/phases/design-phase/phases/grill.md +37 -0
- package/dist/skills/phases/design-phase/phases/intake.md +25 -0
- package/dist/skills/phases/design-phase/phases/prototype.md +30 -0
- package/dist/skills/phases/design-phase/phases/router.md +66 -0
- package/dist/skills/phases/docs-ingest-phase/SKILL.md +46 -0
- package/dist/skills/phases/docs-ingest-phase/agents/openai.yaml +4 -0
- package/dist/skills/phases/docs-ingest-phase/phases/private-internal.md +57 -0
- package/dist/skills/phases/docs-ingest-phase/phases/public-docs.md +52 -0
- package/dist/skills/phases/docs-ingest-phase/phases/router.md +42 -0
- package/dist/skills/phases/docs-ingest-phase/references/concept-pages.md +70 -0
- package/dist/skills/phases/docs-ingest-phase/references/flow-pages.md +56 -0
- package/dist/skills/phases/docs-ingest-phase/references/fumadocs-routing.md +74 -0
- package/dist/skills/phases/docs-ingest-phase/references/learning-artifacts.md +96 -0
- package/dist/skills/phases/docs-ingest-phase/references/public-docs.md +90 -0
- package/dist/skills/phases/docs-ingest-phase/references/repo-docs.md +38 -0
- package/dist/skills/phases/docs-ingest-phase/references/wiki-ingest.md +134 -0
- package/dist/skills/phases/goalify/EXAMPLES.md +11 -0
- package/dist/skills/phases/goalify/SKILL.md +65 -0
- package/dist/skills/phases/requirements-phase/SKILL.md +70 -0
- package/dist/skills/phases/resolve-debt-phase/SKILL.md +87 -0
- package/dist/skills/phases/review-phase/REFERENCE.md +106 -0
- package/dist/skills/phases/review-phase/SKILL.md +46 -0
- package/package.json +1 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-taste-frontend
|
|
3
|
+
description: Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# High-Agency Frontend Skill
|
|
7
|
+
|
|
8
|
+
## 1. ACTIVE BASELINE CONFIGURATION
|
|
9
|
+
* DESIGN_VARIANCE: 8 (1=Perfect Symmetry, 10=Artsy Chaos)
|
|
10
|
+
* MOTION_INTENSITY: 6 (1=Static/No movement, 10=Cinematic/Magic Physics)
|
|
11
|
+
* VISUAL_DENSITY: 4 (1=Art Gallery/Airy, 10=Pilot Cockpit/Packed Data)
|
|
12
|
+
|
|
13
|
+
**AI Instruction:** The standard baseline for all generations is strictly set to these values (8, 6, 4). Do not ask the user to edit this file. Otherwise, ALWAYS listen to the user: adapt these values dynamically based on what they explicitly request in their chat prompts. Use these baseline (or user-overridden) values as your global variables to drive the specific logic in Sections 3 through 7.
|
|
14
|
+
|
|
15
|
+
## 2. DEFAULT ARCHITECTURE & CONVENTIONS
|
|
16
|
+
Unless the user explicitly specifies a different stack, adhere to these structural constraints to maintain consistency:
|
|
17
|
+
|
|
18
|
+
* **DEPENDENCY VERIFICATION [MANDATORY]:** Before importing ANY 3rd party library (e.g. `framer-motion`, `lucide-react`, `zustand`), you MUST check `package.json`. If the package is missing, you MUST output the installation command (e.g. `npm install package-name`) before providing the code. **Never** assume a library exists.
|
|
19
|
+
* **Framework & Interactivity:** React or Next.js. Default to Server Components (`RSC`).
|
|
20
|
+
* **RSC SAFETY:** Global state works ONLY in Client Components. In Next.js, wrap providers in a `"use client"` component.
|
|
21
|
+
* **INTERACTIVITY ISOLATION:** If Sections 4 or 7 (Motion/Liquid Glass) are active, the specific interactive UI component MUST be extracted as an isolated leaf component with `'use client'` at the very top. Server Components must exclusively render static layouts.
|
|
22
|
+
* **State Management:** Use local `useState`/`useReducer` for isolated UI. Use global state strictly for deep prop-drilling avoidance.
|
|
23
|
+
* **Styling Policy:** Use Tailwind CSS (v3/v4) for 90% of styling.
|
|
24
|
+
* **TAILWIND VERSION LOCK:** Check `package.json` first. Do not use v4 syntax in v3 projects.
|
|
25
|
+
* **T4 CONFIG GUARD:** For v4, do NOT use `tailwindcss` plugin in `postcss.config.js`. Use `@tailwindcss/postcss` or the Vite plugin.
|
|
26
|
+
* **ANTI-EMOJI POLICY [CRITICAL]:** NEVER use emojis in code, markup, text content, or alt text. Replace symbols with high-quality icons (Radix, Phosphor) or clean SVG primitives. Emojis are BANNED.
|
|
27
|
+
* **Responsiveness & Spacing:**
|
|
28
|
+
* Standardize breakpoints (`sm`, `md`, `lg`, `xl`).
|
|
29
|
+
* Contain page layouts using `max-w-[1400px] mx-auto` or `max-w-7xl`.
|
|
30
|
+
* **Viewport Stability [CRITICAL]:** NEVER use `h-screen` for full-height Hero sections. ALWAYS use `min-h-[100dvh]` to prevent catastrophic layout jumping on mobile browsers (iOS Safari).
|
|
31
|
+
* **Grid over Flex-Math:** NEVER use complex flexbox percentage math (`w-[calc(33%-1rem)]`). ALWAYS use CSS Grid (`grid grid-cols-1 md:grid-cols-3 gap-6`) for reliable structures.
|
|
32
|
+
* **Icons:** You MUST use exactly `@phosphor-icons/react` or `@radix-ui/react-icons` as the import paths (check installed version). Standardize `strokeWidth` globally (e.g., exclusively use `1.5` or `2.0`).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## 3. DESIGN ENGINEERING DIRECTIVES (Bias Correction)
|
|
36
|
+
LLMs have statistical biases toward specific UI cliché patterns. Proactively construct premium interfaces using these engineered rules:
|
|
37
|
+
|
|
38
|
+
**Rule 1: Deterministic Typography**
|
|
39
|
+
* **Display/Headlines:** Default to `text-4xl md:text-6xl tracking-tighter leading-none`.
|
|
40
|
+
* **ANTI-SLOP:** Discourage `Inter` for "Premium" or "Creative" vibes. Force unique character using `Geist`, `Outfit`, `Cabinet Grotesk`, or `Satoshi`.
|
|
41
|
+
* **TECHNICAL UI RULE:** Serif fonts are strictly BANNED for Dashboard/Software UIs. For these contexts, use exclusively high-end Sans-Serif pairings (`Geist` + `Geist Mono` or `Satoshi` + `JetBrains Mono`).
|
|
42
|
+
* **Body/Paragraphs:** Default to `text-base text-gray-600 leading-relaxed max-w-[65ch]`.
|
|
43
|
+
|
|
44
|
+
**Rule 2: Color Calibration**
|
|
45
|
+
* **Constraint:** Max 1 Accent Color. Saturation < 80%.
|
|
46
|
+
* **THE LILA BAN:** The "AI Purple/Blue" aesthetic is strictly BANNED. No purple button glows, no neon gradients. Use absolute neutral bases (Zinc/Slate) with high-contrast, singular accents (e.g. Emerald, Electric Blue, or Deep Rose).
|
|
47
|
+
* **COLOR CONSISTENCY:** Stick to one palette for the entire output. Do not fluctuate between warm and cool grays within the same project.
|
|
48
|
+
|
|
49
|
+
**Rule 3: Layout Diversification**
|
|
50
|
+
* **ANTI-CENTER BIAS:** Centered Hero/H1 sections are strictly BANNED when `LAYOUT_VARIANCE > 4`. Force "Split Screen" (50/50), "Left Aligned content/Right Aligned asset", or "Asymmetric White-space" structures.
|
|
51
|
+
|
|
52
|
+
**Rule 4: Materiality, Shadows, and "Anti-Card Overuse"**
|
|
53
|
+
* **DASHBOARD HARDENING:** For `VISUAL_DENSITY > 7`, generic card containers are strictly BANNED. Use logic-grouping via `border-t`, `divide-y`, or purely negative space. Data metrics should breathe without being boxed in unless elevation (z-index) is functionally required.
|
|
54
|
+
* **Execution:** Use cards ONLY when elevation communicates hierarchy. When a shadow is used, tint it to the background hue.
|
|
55
|
+
|
|
56
|
+
**Rule 5: Interactive UI States**
|
|
57
|
+
* **Mandatory Generation:** LLMs naturally generate "static" successful states. You MUST implement full interaction cycles:
|
|
58
|
+
* **Loading:** Skeletal loaders matching layout sizes (avoid generic circular spinners).
|
|
59
|
+
* **Empty States:** Beautifully composed empty states indicating how to populate data.
|
|
60
|
+
* **Error States:** Clear, inline error reporting (e.g., forms).
|
|
61
|
+
* **Tactile Feedback:** On `:active`, use `-translate-y-[1px]` or `scale-[0.98]` to simulate a physical push indicating success/action.
|
|
62
|
+
|
|
63
|
+
**Rule 6: Data & Form Patterns**
|
|
64
|
+
* **Forms:** Label MUST sit above input. Helper text is optional but should exist in markup. Error text below input. Use a standard `gap-2` for input blocks.
|
|
65
|
+
|
|
66
|
+
## 4. CREATIVE PROACTIVITY (Anti-Slop Implementation)
|
|
67
|
+
To actively combat generic AI designs, systematically implement these high-end coding concepts as your baseline:
|
|
68
|
+
* **"Liquid Glass" Refraction:** When glassmorphism is needed, go beyond `backdrop-blur`. Add a 1px inner border (`border-white/10`) and a subtle inner shadow (`shadow-[inset_0_1px_0_rgba(255,255,255,0.1)]`) to simulate physical edge refraction.
|
|
69
|
+
* **Magnetic Micro-physics (If MOTION_INTENSITY > 5):** Implement buttons that pull slightly toward the mouse cursor. **CRITICAL:** NEVER use React `useState` for magnetic hover or continuous animations. Use EXCLUSIVELY Framer Motion's `useMotionValue` and `useTransform` outside the React render cycle to prevent performance collapse on mobile.
|
|
70
|
+
* **Perpetual Micro-Interactions:** When `MOTION_INTENSITY > 5`, embed continuous, infinite micro-animations (Pulse, Typewriter, Float, Shimmer, Carousel) in standard components (avatars, status dots, backgrounds). Apply premium Spring Physics (`type: "spring", stiffness: 100, damping: 20`) to all interactive elements—no linear easing.
|
|
71
|
+
* **Layout Transitions:** Always utilize Framer Motion's `layout` and `layoutId` props for smooth re-ordering, resizing, and shared element transitions across state changes.
|
|
72
|
+
* **Staggered Orchestration:** Do not mount lists or grids instantly. Use `staggerChildren` (Framer) or CSS cascade (`animation-delay: calc(var(--index) * 100ms)`) to create sequential waterfall reveals. **CRITICAL:** For `staggerChildren`, the Parent (`variants`) and Children MUST reside in the identical Client Component tree. If data is fetched asynchronously, pass the data as props into a centralized Parent Motion wrapper.
|
|
73
|
+
|
|
74
|
+
## 5. PERFORMANCE GUARDRAILS
|
|
75
|
+
* **DOM Cost:** Apply grain/noise filters exclusively to fixed, pointer-event-none pseudo-elements (e.g., `fixed inset-0 z-50 pointer-events-none`) and NEVER to scrolling containers to prevent continuous GPU repaints and mobile performance degradation.
|
|
76
|
+
* **Hardware Acceleration:** Never animate `top`, `left`, `width`, or `height`. Animate exclusively via `transform` and `opacity`.
|
|
77
|
+
* **Z-Index Restraint:** NEVER spam arbitrary `z-50` or `z-10` unprompted. Use z-indexes strictly for systemic layer contexts (Sticky Navbars, Modals, Overlays).
|
|
78
|
+
|
|
79
|
+
## 6. TECHNICAL REFERENCE (Dial Definitions)
|
|
80
|
+
|
|
81
|
+
### DESIGN_VARIANCE (Level 1-10)
|
|
82
|
+
* **1-3 (Predictable):** Flexbox `justify-center`, strict 12-column symmetrical grids, equal paddings.
|
|
83
|
+
* **4-7 (Offset):** Use `margin-top: -2rem` overlapping, varied image aspect ratios (e.g., 4:3 next to 16:9), left-aligned headers over center-aligned data.
|
|
84
|
+
* **8-10 (Asymmetric):** Masonry layouts, CSS Grid with fractional units (e.g., `grid-template-columns: 2fr 1fr 1fr`), massive empty zones (`padding-left: 20vw`).
|
|
85
|
+
* **MOBILE OVERRIDE:** For levels 4-10, any asymmetric layout above `md:` MUST aggressively fall back to a strict, single-column layout (`w-full`, `px-4`, `py-8`) on viewports `< 768px` to prevent horizontal scrolling and layout breakage.
|
|
86
|
+
|
|
87
|
+
### MOTION_INTENSITY (Level 1-10)
|
|
88
|
+
* **1-3 (Static):** No automatic animations. CSS `:hover` and `:active` states only.
|
|
89
|
+
* **4-7 (Fluid CSS):** Use `transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`. Use `animation-delay` cascades for load-ins. Focus strictly on `transform` and `opacity`. Use `will-change: transform` sparingly.
|
|
90
|
+
* **8-10 (Advanced Choreography):** Complex scroll-triggered reveals or parallax. Use Framer Motion hooks. NEVER use `window.addEventListener('scroll')`.
|
|
91
|
+
|
|
92
|
+
### VISUAL_DENSITY (Level 1-10)
|
|
93
|
+
* **1-3 (Art Gallery Mode):** Lots of white space. Huge section gaps. Everything feels very expensive and clean.
|
|
94
|
+
* **4-7 (Daily App Mode):** Normal spacing for standard web apps.
|
|
95
|
+
* **8-10 (Cockpit Mode):** Tiny paddings. No card boxes; just 1px lines to separate data. Everything is packed. **Mandatory:** Use Monospace (`font-mono`) for all numbers.
|
|
96
|
+
|
|
97
|
+
## 7. AI TELLS (Forbidden Patterns)
|
|
98
|
+
To guarantee a premium, non-generic output, you MUST strictly avoid these common AI design signatures unless explicitly requested:
|
|
99
|
+
|
|
100
|
+
### Visual & CSS
|
|
101
|
+
* **NO Neon/Outer Glows:** Do not use default `box-shadow` glows or auto-glows. Use inner borders or subtle tinted shadows.
|
|
102
|
+
* **NO Pure Black:** Never use `#000000`. Use Off-Black, Zinc-950, or Charcoal.
|
|
103
|
+
* **NO Oversaturated Accents:** Desaturate accents to blend elegantly with neutrals.
|
|
104
|
+
* **NO Excessive Gradient Text:** Do not use text-fill gradients for large headers.
|
|
105
|
+
* **NO Custom Mouse Cursors:** They are outdated and ruin performance/accessibility.
|
|
106
|
+
|
|
107
|
+
### Typography
|
|
108
|
+
* **NO Inter Font:** Banned. Use `Geist`, `Outfit`, `Cabinet Grotesk`, or `Satoshi`.
|
|
109
|
+
* **NO Oversized H1s:** The first heading should not scream. Control hierarchy with weight and color, not just massive scale.
|
|
110
|
+
* **Serif Constraints:** Use Serif fonts ONLY for creative/editorial designs. **NEVER** use Serif on clean Dashboards.
|
|
111
|
+
|
|
112
|
+
### Layout & Spacing
|
|
113
|
+
* **Align & Space Perfectly:** Ensure padding and margins are mathematically perfect. Avoid floating elements with awkward gaps.
|
|
114
|
+
* **NO 3-Column Card Layouts:** The generic "3 equal cards horizontally" feature row is BANNED. Use a 2-column Zig-Zag, asymmetric grid, or horizontal scrolling approach instead.
|
|
115
|
+
|
|
116
|
+
### Content & Data (The "Jane Doe" Effect)
|
|
117
|
+
* **NO Generic Names:** "John Doe", "Sarah Chan", or "Jack Su" are banned. Use highly creative, realistic-sounding names.
|
|
118
|
+
* **NO Generic Avatars:** DO NOT use standard SVG "egg" or Lucide user icons for avatars. Use creative, believable photo placeholders or specific styling.
|
|
119
|
+
* **NO Fake Numbers:** Avoid predictable outputs like `99.99%`, `50%`, or basic phone numbers (`1234567`). Use organic, messy data (`47.2%`, `+1 (312) 847-1928`).
|
|
120
|
+
* **NO Startup Slop Names:** "Acme", "Nexus", "SmartFlow". Invent premium, contextual brand names.
|
|
121
|
+
* **NO Filler Words:** Avoid AI copywriting clichés like "Elevate", "Seamless", "Unleash", or "Next-Gen". Use concrete verbs.
|
|
122
|
+
|
|
123
|
+
### External Resources & Components
|
|
124
|
+
* **NO Broken Unsplash Links:** Do not use Unsplash. Use absolute, reliable placeholders like `https://picsum.photos/seed/{random_string}/800/600` or SVG UI Avatars.
|
|
125
|
+
* **shadcn/ui Customization:** You may use `shadcn/ui`, but NEVER in its generic default state. You MUST customize the radii, colors, and shadows to match the high-end project aesthetic.
|
|
126
|
+
* **Production-Ready Cleanliness:** Code must be extremely clean, visually striking, memorable, and meticulously refined in every detail.
|
|
127
|
+
|
|
128
|
+
## 8. THE CREATIVE ARSENAL (High-End Inspiration)
|
|
129
|
+
Do not default to generic UI. Pull from this library of advanced concepts to ensure the output is visually striking and memorable. When appropriate, leverage **GSAP (ScrollTrigger/Parallax)** for complex scrolltelling or **ThreeJS/WebGL** for 3D/Canvas animations, rather than basic CSS motion. **CRITICAL:** Never mix GSAP/ThreeJS with Framer Motion in the same component tree. Default to Framer Motion for UI/Bento interactions. Use GSAP/ThreeJS EXCLUSIVELY for isolated full-page scrolltelling or canvas backgrounds, wrapped in strict useEffect cleanup blocks.
|
|
130
|
+
|
|
131
|
+
### The Standard Hero Paradigm
|
|
132
|
+
* Stop doing centered text over a dark image. Try asymmetric Hero sections: Text cleanly aligned to the left or right. The background should feature a high-quality, relevant image with a subtle stylistic fade (darkening or lightening gracefully into the background color depending on if it is Light or Dark mode).
|
|
133
|
+
|
|
134
|
+
### Navigation & Menüs
|
|
135
|
+
* **Mac OS Dock Magnification:** Nav-bar at the edge; icons scale fluidly on hover.
|
|
136
|
+
* **Magnetic Button:** Buttons that physically pull toward the cursor.
|
|
137
|
+
* **Gooey Menu:** Sub-items detach from the main button like a viscous liquid.
|
|
138
|
+
* **Dynamic Island:** A pill-shaped UI component that morphs to show status/alerts.
|
|
139
|
+
* **Contextual Radial Menu:** A circular menu expanding exactly at the click coordinates.
|
|
140
|
+
* **Floating Speed Dial:** A FAB that springs out into a curved line of secondary actions.
|
|
141
|
+
* **Mega Menu Reveal:** Full-screen dropdowns that stagger-fade complex content.
|
|
142
|
+
|
|
143
|
+
### Layout & Grids
|
|
144
|
+
* **Bento Grid:** Asymmetric, tile-based grouping (e.g., Apple Control Center).
|
|
145
|
+
* **Masonry Layout:** Staggered grid without fixed row heights (e.g., Pinterest).
|
|
146
|
+
* **Chroma Grid:** Grid borders or tiles showing subtle, continuously animating color gradients.
|
|
147
|
+
* **Split Screen Scroll:** Two screen halves sliding in opposite directions on scroll.
|
|
148
|
+
* **Curtain Reveal:** A Hero section parting in the middle like a curtain on scroll.
|
|
149
|
+
|
|
150
|
+
### Cards & Containers
|
|
151
|
+
* **Parallax Tilt Card:** A 3D-tilting card tracking the mouse coordinates.
|
|
152
|
+
* **Spotlight Border Card:** Card borders that illuminate dynamically under the cursor.
|
|
153
|
+
* **Glassmorphism Panel:** True frosted glass with inner refraction borders.
|
|
154
|
+
* **Holographic Foil Card:** Iridescent, rainbow light reflections shifting on hover.
|
|
155
|
+
* **Tinder Swipe Stack:** A physical stack of cards the user can swipe away.
|
|
156
|
+
* **Morphing Modal:** A button that seamlessly expands into its own full-screen dialog container.
|
|
157
|
+
|
|
158
|
+
### Scroll-Animations
|
|
159
|
+
* **Sticky Scroll Stack:** Cards that stick to the top and physically stack over each other.
|
|
160
|
+
* **Horizontal Scroll Hijack:** Vertical scroll translates into a smooth horizontal gallery pan.
|
|
161
|
+
* **Locomotive Scroll Sequence:** Video/3D sequences where framerate is tied directly to the scrollbar.
|
|
162
|
+
* **Zoom Parallax:** A central background image zooming in/out seamlessly as you scroll.
|
|
163
|
+
* **Scroll Progress Path:** SVG vector lines or routes that draw themselves as the user scrolls.
|
|
164
|
+
* **Liquid Swipe Transition:** Page transitions that wipe the screen like a viscous liquid.
|
|
165
|
+
|
|
166
|
+
### Galleries & Media
|
|
167
|
+
* **Dome Gallery:** A 3D gallery feeling like a panoramic dome.
|
|
168
|
+
* **Coverflow Carousel:** 3D carousel with the center focused and edges angled back.
|
|
169
|
+
* **Drag-to-Pan Grid:** A boundless grid you can freely drag in any compass direction.
|
|
170
|
+
* **Accordion Image Slider:** Narrow vertical/horizontal image strips that expand fully on hover.
|
|
171
|
+
* **Hover Image Trail:** The mouse leaves a trail of popping/fading images behind it.
|
|
172
|
+
* **Glitch Effect Image:** Brief RGB-channel shifting digital distortion on hover.
|
|
173
|
+
|
|
174
|
+
### Typography & Text
|
|
175
|
+
* **Kinetic Marquee:** Endless text bands that reverse direction or speed up on scroll.
|
|
176
|
+
* **Text Mask Reveal:** Massive typography acting as a transparent window to a video background.
|
|
177
|
+
* **Text Scramble Effect:** Matrix-style character decoding on load or hover.
|
|
178
|
+
* **Circular Text Path:** Text curved along a spinning circular path.
|
|
179
|
+
* **Gradient Stroke Animation:** Outlined text with a gradient continuously running along the stroke.
|
|
180
|
+
* **Kinetic Typography Grid:** A grid of letters dodging or rotating away from the cursor.
|
|
181
|
+
|
|
182
|
+
### Micro-Interactions & Effects
|
|
183
|
+
* **Particle Explosion Button:** CTAs that shatter into particles upon success.
|
|
184
|
+
* **Liquid Pull-to-Refresh:** Mobile reload indicators acting like detaching water droplets.
|
|
185
|
+
* **Skeleton Shimmer:** Shifting light reflections moving across placeholder boxes.
|
|
186
|
+
* **Directional Hover Aware Button:** Hover fill entering from the exact side the mouse entered.
|
|
187
|
+
* **Ripple Click Effect:** Visual waves rippling precisely from the click coordinates.
|
|
188
|
+
* **Animated SVG Line Drawing:** Vectors that draw their own contours in real-time.
|
|
189
|
+
* **Mesh Gradient Background:** Organic, lava-lamp-like animated color blobs.
|
|
190
|
+
* **Lens Blur Depth:** Dynamic focus blurring background UI layers to highlight a foreground action.
|
|
191
|
+
|
|
192
|
+
## 9. THE "MOTION-ENGINE" BENTO PARADIGM
|
|
193
|
+
When generating modern SaaS dashboards or feature sections, you MUST utilize the following "Bento 2.0" architecture and motion philosophy. This goes beyond static cards and enforces a "Vercel-core meets Dribbble-clean" aesthetic heavily reliant on perpetual physics.
|
|
194
|
+
|
|
195
|
+
### A. Core Design Philosophy
|
|
196
|
+
* **Aesthetic:** High-end, minimal, and functional.
|
|
197
|
+
* **Palette:** Background in `#f9fafb`. Cards are pure white (`#ffffff`) with a 1px border of `border-slate-200/50`.
|
|
198
|
+
* **Surfaces:** Use `rounded-[2.5rem]` for all major containers. Apply a "diffusion shadow" (a very light, wide-spreading shadow, e.g., `shadow-[0_20px_40px_-15px_rgba(0,0,0,0.05)]`) to create depth without clutter.
|
|
199
|
+
* **Typography:** Strict `Geist`, `Satoshi`, or `Cabinet Grotesk` font stack. Use subtle tracking (`tracking-tight`) for headers.
|
|
200
|
+
* **Labels:** Titles and descriptions must be placed **outside and below** the cards to maintain a clean, gallery-style presentation.
|
|
201
|
+
* **Pixel-Perfection:** Use generous `p-8` or `p-10` padding inside cards.
|
|
202
|
+
|
|
203
|
+
### B. The Animation Engine Specs (Perpetual Motion)
|
|
204
|
+
All cards must contain **"Perpetual Micro-Interactions."** Use the following Framer Motion principles:
|
|
205
|
+
* **Spring Physics:** No linear easing. Use `type: "spring", stiffness: 100, damping: 20` for a premium, weighty feel.
|
|
206
|
+
* **Layout Transitions:** Heavily utilize the `layout` and `layoutId` props to ensure smooth re-ordering, resizing, and shared element state transitions.
|
|
207
|
+
* **Infinite Loops:** Every card must have an "Active State" that loops infinitely (Pulse, Typewriter, Float, or Carousel) to ensure the dashboard feels "alive".
|
|
208
|
+
* **Performance:** Wrap dynamic lists in `<AnimatePresence>` and optimize for 60fps. **PERFORMANCE CRITICAL:** Any perpetual motion or infinite loop MUST be memoized (React.memo) and completely isolated in its own microscopic Client Component. Never trigger re-renders in the parent layout.
|
|
209
|
+
|
|
210
|
+
### C. The 5-Card Archetypes (Micro-Animation Specs)
|
|
211
|
+
Implement these specific micro-animations when constructing Bento grids (e.g., Row 1: 3 cols | Row 2: 2 cols split 70/30):
|
|
212
|
+
1. **The Intelligent List:** A vertical stack of items with an infinite auto-sorting loop. Items swap positions using `layoutId`, simulating an AI prioritizing tasks in real-time.
|
|
213
|
+
2. **The Command Input:** A search/AI bar with a multi-step Typewriter Effect. It cycles through complex prompts, including a blinking cursor and a "processing" state with a shimmering loading gradient.
|
|
214
|
+
3. **The Live Status:** A scheduling interface with "breathing" status indicators. Include a pop-up notification badge that emerges with an "Overshoot" spring effect, stays for 3 seconds, and vanishes.
|
|
215
|
+
4. **The Wide Data Stream:** A horizontal "Infinite Carousel" of data cards or metrics. Ensure the loop is seamless (using `x: ["0%", "-100%"]`) with a speed that feels effortless.
|
|
216
|
+
5. **The Contextual UI (Focus Mode):** A document view that animates a staggered highlight of a text block, followed by a "Float-in" of a floating action toolbar with micro-icons.
|
|
217
|
+
|
|
218
|
+
## 10. FINAL PRE-FLIGHT CHECK
|
|
219
|
+
Evaluate your code against this matrix before outputting. This is the **last** filter you apply to your logic.
|
|
220
|
+
- [ ] Is global state used appropriately to avoid deep prop-drilling rather than arbitrarily?
|
|
221
|
+
- [ ] Is mobile layout collapse (`w-full`, `px-4`, `max-w-7xl mx-auto`) guaranteed for high-variance designs?
|
|
222
|
+
- [ ] Do full-height sections safely use `min-h-[100dvh]` instead of the bugged `h-screen`?
|
|
223
|
+
- [ ] Do `useEffect` animations contain strict cleanup functions?
|
|
224
|
+
- [ ] Are empty, loading, and error states provided?
|
|
225
|
+
- [ ] Are cards omitted in favor of spacing where possible?
|
|
226
|
+
- [ ] Did you strictly isolate CPU-heavy perpetual animations in their own Client Components?
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-domain-structure
|
|
3
|
+
description: |
|
|
4
|
+
Organize frontend applications into domain-first layers with thin framework composition entrypoints,
|
|
5
|
+
user-facing features, reusable app-local modules, and shared libraries. Use when creating or
|
|
6
|
+
refactoring frontend code, replacing flat components/hooks/lib/utils folders, deciding whether code
|
|
7
|
+
belongs in framework composition, features/, modules/, or shared packages, or reviewing frontend
|
|
8
|
+
import boundaries across React, Vue, Svelte, Solid, or other UI frameworks.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Frontend Domain Structure
|
|
12
|
+
|
|
13
|
+
Use this skill to keep frontend code domain-based instead of folder-type-based.
|
|
14
|
+
Treat `features/*` and `modules/*` as the main app-local domain containers.
|
|
15
|
+
|
|
16
|
+
Read `references/structure.md` before structure decisions or large refactors.
|
|
17
|
+
For React scopes, also read `references/react/structure.md`.
|
|
18
|
+
|
|
19
|
+
## Quick Classifier
|
|
20
|
+
|
|
21
|
+
Place code by responsibility first, framework file type second.
|
|
22
|
+
|
|
23
|
+
- Put route files, screen entrypoints, layout shells, metadata, and framework-owned composition in the framework composition layer.
|
|
24
|
+
- Put user-visible flows, screens, sections, and product orchestration in feature domains under `features/*`.
|
|
25
|
+
- Put reusable app-local concerns such as providers, client wiring, routing helpers, metadata helpers, API clients, form foundations, and UI libraries in module domains under `modules/*`.
|
|
26
|
+
- Put cross-app reusable domains, UI foundations, tokens, primitives, and framework-neutral helpers in shared libraries or packages.
|
|
27
|
+
|
|
28
|
+
Inside each feature or module domain, use local technical folders only when useful.
|
|
29
|
+
|
|
30
|
+
## Boundary Rules
|
|
31
|
+
|
|
32
|
+
- Keep framework composition thin. Compose features and modules there; do not accumulate domain logic.
|
|
33
|
+
- Let `features/*` depend on `modules/*` and shared libraries.
|
|
34
|
+
- Do not let `modules/*` import `features/*`.
|
|
35
|
+
- Do not move app-specific product features into shared libraries.
|
|
36
|
+
- Avoid root-level generic buckets like `components`, `hooks`, `utils`, `helpers`, or `lib` when code can belong to a domain.
|
|
37
|
+
|
|
38
|
+
## Shared Library Rule
|
|
39
|
+
|
|
40
|
+
Use shared libraries for code reused across app boundaries.
|
|
41
|
+
|
|
42
|
+
- Keep app-local reusable domains in `modules/*`.
|
|
43
|
+
- Keep user-facing product domains in `features/*`.
|
|
44
|
+
- Move only truly shared domains, presentation layers, primitives, tokens, or utilities into shared libraries.
|
|
45
|
+
|
|
46
|
+
In a monorepo, shared packages should still be domain-first internally instead of becoming global buckets.
|
|
47
|
+
|
|
48
|
+
## Use This Skill
|
|
49
|
+
|
|
50
|
+
- Read `references/structure.md`.
|
|
51
|
+
- Add framework-specific references only when the current scope uses that framework.
|
|
52
|
+
- Classify each file by responsibility first.
|
|
53
|
+
- Group by domain second.
|
|
54
|
+
- Organize inside each domain by local technical role only when needed.
|
|
55
|
+
- Keep imports flowing downward: framework composition -> `features` -> `modules` -> shared libraries or shared packages.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Frontend Domain Structure"
|
|
3
|
+
short_description: "Domain-first frontend structure"
|
|
4
|
+
default_prompt: "Use $frontend-domain-structure to place frontend code in the correct framework composition, features, modules, or shared-library layer; in React scopes, also apply references/react/structure.md for hooks, context, providers, components, route modules, and Next.js route files."
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# React Domain Structure Addendum
|
|
2
|
+
|
|
3
|
+
Use this after the agnostic frontend structure reference when the current frontend scope is React, Next.js, Remix, TanStack Router, Expo web, tRPC-backed React, or another React-based stack.
|
|
4
|
+
|
|
5
|
+
The agnostic frontend skill owns the shared layer model:
|
|
6
|
+
|
|
7
|
+
- framework composition
|
|
8
|
+
- `features/*`
|
|
9
|
+
- `modules/*`
|
|
10
|
+
- shared libraries and packages
|
|
11
|
+
|
|
12
|
+
This reference owns React-specific placement for hooks, context, providers, components, route modules, and Next.js route files.
|
|
13
|
+
|
|
14
|
+
## Framework Composition
|
|
15
|
+
|
|
16
|
+
React framework entrypoints should stay thin.
|
|
17
|
+
|
|
18
|
+
Common composition folders:
|
|
19
|
+
|
|
20
|
+
- `app/` in Next.js App Router
|
|
21
|
+
- `pages/` in Next.js Pages Router or Remix-style route modules
|
|
22
|
+
- `routes/` in TanStack Router, Remix, or file-route setups
|
|
23
|
+
- `src/app/` in app-shell conventions
|
|
24
|
+
|
|
25
|
+
Good fits:
|
|
26
|
+
|
|
27
|
+
- `page.tsx`
|
|
28
|
+
- `layout.tsx`
|
|
29
|
+
- route modules
|
|
30
|
+
- route-level `loading`, `error`, and `not-found`
|
|
31
|
+
- route metadata
|
|
32
|
+
- tiny route composition wrappers
|
|
33
|
+
|
|
34
|
+
Bad fits:
|
|
35
|
+
|
|
36
|
+
- long client components
|
|
37
|
+
- data orchestration that belongs to a feature
|
|
38
|
+
- reusable product sections
|
|
39
|
+
- provider setup repeated across routes
|
|
40
|
+
- low-level hooks imported directly by routes when a feature entrypoint should own them
|
|
41
|
+
|
|
42
|
+
Route files should import feature entrypoints instead of several low-level hooks, helpers, and components.
|
|
43
|
+
|
|
44
|
+
## React Domain Internals
|
|
45
|
+
|
|
46
|
+
Inside `features/*`, `modules/*`, and shared package domains, React-specific technical folders are allowed when they are local to the domain.
|
|
47
|
+
|
|
48
|
+
Common local folders:
|
|
49
|
+
|
|
50
|
+
- `components/`
|
|
51
|
+
- `hooks/`
|
|
52
|
+
- `context/`
|
|
53
|
+
- `providers/`
|
|
54
|
+
- `state/` or `store/`
|
|
55
|
+
- `queries/`
|
|
56
|
+
- `mutations/`
|
|
57
|
+
- `actions/`
|
|
58
|
+
- `forms/`
|
|
59
|
+
- `lib/`
|
|
60
|
+
- `utils/`
|
|
61
|
+
|
|
62
|
+
Keep these folders under a domain. Avoid root-level `components/`, `hooks/`, `context/`, or `providers/` unless they are temporary migration debt or genuinely global app shell code.
|
|
63
|
+
|
|
64
|
+
## Placement Examples
|
|
65
|
+
|
|
66
|
+
Prefer:
|
|
67
|
+
|
|
68
|
+
- `features/auth/components/LoginForm.tsx`
|
|
69
|
+
- `features/auth/hooks/useLoginForm.ts`
|
|
70
|
+
- `features/settings/context/SettingsDraftContext.tsx`
|
|
71
|
+
- `features/dashboard/queries/useDashboardSummary.ts`
|
|
72
|
+
- `modules/auth/providers/AuthProvider.tsx`
|
|
73
|
+
- `modules/auth/hooks/useCurrentUser.ts`
|
|
74
|
+
- `modules/api/lib/httpClient.ts`
|
|
75
|
+
- `modules/ui/components/Button.tsx`
|
|
76
|
+
- `<shared-ui-root>/src/primitives/button.tsx`
|
|
77
|
+
- `<shared-ui-root>/src/brand/components/Logo.tsx`
|
|
78
|
+
|
|
79
|
+
Avoid:
|
|
80
|
+
|
|
81
|
+
- `src/components/LoginForm.tsx`
|
|
82
|
+
- `src/hooks/useCurrentUser.ts`
|
|
83
|
+
- `src/context/SettingsDraftContext.tsx`
|
|
84
|
+
- `src/providers/AuthProvider.tsx`
|
|
85
|
+
- `src/lib/httpClient.ts`
|
|
86
|
+
|
|
87
|
+
## React Boundary Rules
|
|
88
|
+
|
|
89
|
+
- Route components may import feature entrypoints and app-local modules.
|
|
90
|
+
- Feature components may import hooks, context, providers, and helpers from the same feature, modules, or shared libraries.
|
|
91
|
+
- Module hooks and providers must not import feature components.
|
|
92
|
+
- Shared UI packages must not import app-local modules or features.
|
|
93
|
+
- Context providers should live where their scope lives: feature-scoped context in `features/*`, app-wide reusable providers in `modules/*`, cross-app providers in shared packages.
|
|
94
|
+
- Hooks follow the same ownership rule as the state or side effect they wrap.
|
|
95
|
+
|
|
96
|
+
## React Review Checklist
|
|
97
|
+
|
|
98
|
+
- Is the route file mostly composition?
|
|
99
|
+
- Are React hooks under the domain that owns their state or side effect?
|
|
100
|
+
- Is context scoped to the smallest domain that needs it?
|
|
101
|
+
- Are providers app-local modules unless they are feature-specific or shared across apps?
|
|
102
|
+
- Are root-level React technical folders avoided unless the project has an explicit app-shell convention?
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Frontend Domain Structure Reference
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Organize frontend code by responsibility and domain instead of by file type.
|
|
6
|
+
|
|
7
|
+
Prefer this shape:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
src/
|
|
11
|
+
<framework-composition>/
|
|
12
|
+
features/
|
|
13
|
+
modules/
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Interpret the layers like this:
|
|
17
|
+
|
|
18
|
+
- framework composition layer
|
|
19
|
+
Framework-owned user-land entrypoints such as routes, pages, screens, layouts, loading states, errors, metadata, and navigation shells.
|
|
20
|
+
- `features/*`
|
|
21
|
+
Domain containers for user-visible product logic and page- or screen-facing slices.
|
|
22
|
+
- `modules/*`
|
|
23
|
+
Domain containers for reusable app-local support building blocks, integrations, and root-level dependencies reused by multiple features.
|
|
24
|
+
- shared libraries
|
|
25
|
+
Cross-app or cross-surface domains, primitives, tokens, utilities, and presentation helpers.
|
|
26
|
+
|
|
27
|
+
The exact names of framework composition folders and shared libraries vary by project. The rule does not.
|
|
28
|
+
|
|
29
|
+
`features` and `modules` are both domain layers. They are not flat dumping grounds. Each domain may contain local technical folders when those folders serve that domain.
|
|
30
|
+
|
|
31
|
+
The same principle applies to packages in a monorepo. A package should still be structured by domain internally instead of becoming one flat global `components`, `hooks`, or `utils` bucket.
|
|
32
|
+
|
|
33
|
+
## Why This Shape
|
|
34
|
+
|
|
35
|
+
Flat folders such as `components`, `hooks`, `lib`, and `utils` scale poorly because they group by technical type instead of business purpose.
|
|
36
|
+
|
|
37
|
+
Group around domains first, then use technical subfolders inside the domain when useful.
|
|
38
|
+
|
|
39
|
+
Root-level escape hatches like `utils/` and `lib/` should stay rare. Small truly global helpers can exist, but most code placed there eventually belongs to a feature domain, a module domain, or a shared library.
|
|
40
|
+
|
|
41
|
+
This structure improves:
|
|
42
|
+
|
|
43
|
+
- discoverability
|
|
44
|
+
- ownership
|
|
45
|
+
- reuse boundaries
|
|
46
|
+
- thin route or screen entrypoints
|
|
47
|
+
- resistance to feature leakage across the app
|
|
48
|
+
|
|
49
|
+
## Decision Table
|
|
50
|
+
|
|
51
|
+
Classify each file in this order.
|
|
52
|
+
|
|
53
|
+
1. Is this a framework entrypoint or composition shell?
|
|
54
|
+
Put it in the framework composition layer.
|
|
55
|
+
2. Is this a user-facing business section, screen flow, or product workflow that an entrypoint should import?
|
|
56
|
+
Put it in a feature domain under `features/*`.
|
|
57
|
+
3. Is this reusable inside the app but not itself a page- or screen-facing product slice?
|
|
58
|
+
Put it in a module domain under `modules/*`.
|
|
59
|
+
4. Is this generic enough to reuse across apps, packages, or surfaces?
|
|
60
|
+
Put it in a shared library or shared package.
|
|
61
|
+
|
|
62
|
+
If a file is named by type instead of purpose, rename around the domain or concern when moving it.
|
|
63
|
+
|
|
64
|
+
## Layer Meanings
|
|
65
|
+
|
|
66
|
+
### Framework Composition Layer
|
|
67
|
+
|
|
68
|
+
Keep this layer thin.
|
|
69
|
+
|
|
70
|
+
Good fits:
|
|
71
|
+
|
|
72
|
+
- route files
|
|
73
|
+
- screen entrypoint files
|
|
74
|
+
- layouts and navigation shells
|
|
75
|
+
- loading, error, empty, and not-found boundaries
|
|
76
|
+
- route or screen metadata
|
|
77
|
+
- tiny composition wrappers
|
|
78
|
+
|
|
79
|
+
Bad fits:
|
|
80
|
+
|
|
81
|
+
- domain logic
|
|
82
|
+
- long form flows
|
|
83
|
+
- reusable product sections
|
|
84
|
+
- app client setup scattered across many entrypoints
|
|
85
|
+
- business state orchestration
|
|
86
|
+
|
|
87
|
+
The entrypoint should mostly assemble higher-level pieces.
|
|
88
|
+
|
|
89
|
+
### `features/*`
|
|
90
|
+
|
|
91
|
+
Use features for meaningful user-facing domains.
|
|
92
|
+
|
|
93
|
+
Good fits:
|
|
94
|
+
|
|
95
|
+
- authentication screens and flows
|
|
96
|
+
- dashboard sections
|
|
97
|
+
- account settings areas
|
|
98
|
+
- navigation experiences
|
|
99
|
+
- user-facing forms and workflows
|
|
100
|
+
- domain-specific business state and orchestration
|
|
101
|
+
|
|
102
|
+
A feature domain may contain local UI, state, data access, config, helpers, and sub-sections.
|
|
103
|
+
|
|
104
|
+
Do not create a feature for every tiny component. A feature should represent a coherent user-facing capability.
|
|
105
|
+
|
|
106
|
+
### `modules/*`
|
|
107
|
+
|
|
108
|
+
Use modules for reusable app-local support domains.
|
|
109
|
+
|
|
110
|
+
Good fits:
|
|
111
|
+
|
|
112
|
+
- auth client setup
|
|
113
|
+
- API client wiring
|
|
114
|
+
- providers
|
|
115
|
+
- routes or navigation configuration
|
|
116
|
+
- metadata helpers
|
|
117
|
+
- form foundations reused across several features
|
|
118
|
+
- domain service adapters used by many features
|
|
119
|
+
- UI library domains
|
|
120
|
+
- framework integration layers
|
|
121
|
+
- root-level dependencies shared by several features
|
|
122
|
+
|
|
123
|
+
Modules are reusable inside the app, but they are not page-facing product slices.
|
|
124
|
+
|
|
125
|
+
A `modules/ui` domain is valid when it is effectively the app's local UI library: primitives, brand-styled abstractions, UI behavior, and UI-specific logic reused across many features.
|
|
126
|
+
|
|
127
|
+
### Shared Libraries
|
|
128
|
+
|
|
129
|
+
Use shared libraries for code that is reused across app boundaries.
|
|
130
|
+
|
|
131
|
+
Good fits:
|
|
132
|
+
|
|
133
|
+
- shared domain abstractions
|
|
134
|
+
- UI primitives
|
|
135
|
+
- design tokens
|
|
136
|
+
- framework-neutral helpers
|
|
137
|
+
- icons
|
|
138
|
+
- styling foundations
|
|
139
|
+
- generic presentation helpers
|
|
140
|
+
|
|
141
|
+
Bad fits:
|
|
142
|
+
|
|
143
|
+
- page sections
|
|
144
|
+
- product workflows
|
|
145
|
+
- app-specific domain widgets
|
|
146
|
+
- route- or screen-specific logic
|
|
147
|
+
|
|
148
|
+
If the code is only reusable within one app, keep it inside that app, usually in `modules/*`.
|
|
149
|
+
|
|
150
|
+
In a monorepo, shared packages should still be domain-based internally.
|
|
151
|
+
|
|
152
|
+
Good package patterns:
|
|
153
|
+
|
|
154
|
+
- a package that is itself one coherent shared domain
|
|
155
|
+
- a package with a small number of clearly separated internal domains
|
|
156
|
+
|
|
157
|
+
Examples:
|
|
158
|
+
|
|
159
|
+
- `<shared-ui-root>/src/primitives/*`
|
|
160
|
+
- `<shared-ui-root>/src/brand/*`
|
|
161
|
+
- `<auth-package-root>/src/client/*`
|
|
162
|
+
- `<auth-package-root>/src/server/*`
|
|
163
|
+
- `<forms-package-root>/src/fields/*`
|
|
164
|
+
|
|
165
|
+
Bad package patterns:
|
|
166
|
+
|
|
167
|
+
- a giant `<shared-ui-root>/src/components` folder holding unrelated concerns
|
|
168
|
+
- `<shared-foundation-root>/src/utils` growing without domain ownership
|
|
169
|
+
- a single package collecting every reusable concern just because it is shared
|
|
170
|
+
|
|
171
|
+
If a package contains several unrelated concerns, split the package or introduce internal domain folders.
|
|
172
|
+
|
|
173
|
+
## Import Boundaries
|
|
174
|
+
|
|
175
|
+
Keep dependencies flowing downward.
|
|
176
|
+
|
|
177
|
+
- framework composition layer may import:
|
|
178
|
+
- `features/*`
|
|
179
|
+
- `modules/*`
|
|
180
|
+
- bootstrapping helpers
|
|
181
|
+
- `features/*` may import:
|
|
182
|
+
- sibling files in the same feature
|
|
183
|
+
- `modules/*`
|
|
184
|
+
- shared libraries
|
|
185
|
+
- `modules/*` may import:
|
|
186
|
+
- sibling files in the same module
|
|
187
|
+
- shared libraries
|
|
188
|
+
- external libraries
|
|
189
|
+
- shared packages may import:
|
|
190
|
+
- sibling files inside the same package domain
|
|
191
|
+
- lower-level shared utilities inside that package
|
|
192
|
+
- external libraries
|
|
193
|
+
|
|
194
|
+
Avoid these inversions:
|
|
195
|
+
|
|
196
|
+
- `modules/*` importing `features/*`
|
|
197
|
+
- shared libraries importing app-local code
|
|
198
|
+
- one shared package domain importing unrelated package domains without a clear boundary
|
|
199
|
+
- framework entrypoints importing many low-level helpers instead of a feature-level entrypoint
|
|
200
|
+
|
|
201
|
+
## Refactoring Guide
|
|
202
|
+
|
|
203
|
+
When migrating from flat buckets like `components`, `hooks`, `lib`, and `utils`:
|
|
204
|
+
|
|
205
|
+
- move framework-facing composition into the framework composition layer
|
|
206
|
+
- group page- or screen-facing workflows under domain folders in `features/*`
|
|
207
|
+
- group reusable app-local support code under domain folders in `modules/*`
|
|
208
|
+
- move only truly shared code into shared libraries or shared packages
|
|
209
|
+
|
|
210
|
+
Name folders by domain or responsibility, not by file type.
|
|
211
|
+
|
|
212
|
+
Prefer:
|
|
213
|
+
|
|
214
|
+
- `features/auth`
|
|
215
|
+
- `features/settings`
|
|
216
|
+
- `features/layout`
|
|
217
|
+
- `modules/auth`
|
|
218
|
+
- `modules/providers`
|
|
219
|
+
- `modules/api`
|
|
220
|
+
- `modules/ui`
|
|
221
|
+
|
|
222
|
+
In monorepos, also prefer:
|
|
223
|
+
|
|
224
|
+
- `<shared-ui-root>/src/primitives`
|
|
225
|
+
- `<shared-ui-root>/src/brand`
|
|
226
|
+
- `<auth-package-root>/src/client`
|
|
227
|
+
- `<auth-package-root>/src/server`
|
|
228
|
+
- `<table-package-root>/src/hooks`
|
|
229
|
+
|
|
230
|
+
Then, inside a domain, use local technical folders only when they help:
|
|
231
|
+
|
|
232
|
+
- `features/auth/components`
|
|
233
|
+
- `features/auth/state`
|
|
234
|
+
- `features/auth/api`
|
|
235
|
+
- `modules/auth/config`
|
|
236
|
+
- `modules/api/lib`
|
|
237
|
+
- `<auth-package-root>/src/client`
|
|
238
|
+
- `<shared-ui-root>/src/brand/components`
|
|
239
|
+
|
|
240
|
+
Avoid:
|
|
241
|
+
|
|
242
|
+
- `components/common`
|
|
243
|
+
- `components/shared`
|
|
244
|
+
- `utils/misc`
|
|
245
|
+
- `lib/helpers`
|
|
246
|
+
|
|
247
|
+
When root-level `utils/` already exists, treat it as migration debt unless the helpers are genuinely global and domain-neutral.
|
|
248
|
+
|
|
249
|
+
## Review Checklist
|
|
250
|
+
|
|
251
|
+
When reviewing or designing structure:
|
|
252
|
+
|
|
253
|
+
- Can the framework composition file get thinner?
|
|
254
|
+
- Is the entrypoint importing a feature instead of several low-level files?
|
|
255
|
+
- Is reusable app-local logic living in a module instead of scattered buckets?
|
|
256
|
+
- Is truly shared code kept out of app-local layers?
|
|
257
|
+
- Are shared packages internally domain-based instead of flat dumping grounds?
|