@jetrabbits/agentic 0.0.1
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 +143 -0
- package/README.md +154 -0
- package/agentic +1615 -0
- package/areas/devops/ci-cd/AGENTS.md +48 -0
- package/areas/devops/ci-cd/PROMPTS.md +7 -0
- package/areas/devops/ci-cd/prompts/onboard-repo.md +97 -0
- package/areas/devops/ci-cd/prompts/pipeline-debug.md +103 -0
- package/areas/devops/ci-cd/prompts/release-pipeline.md +115 -0
- package/areas/devops/ci-cd/rules/pipeline-standards.md +33 -0
- package/areas/devops/ci-cd/rules/quality-gates.md +24 -0
- package/areas/devops/ci-cd/rules/supply-chain-security.md +34 -0
- package/areas/devops/ci-cd/skills/artifact-management/SKILL.md +157 -0
- package/areas/devops/ci-cd/skills/build-optimization/SKILL.md +168 -0
- package/areas/devops/ci-cd/skills/github-actions-patterns/SKILL.md +190 -0
- package/areas/devops/ci-cd/skills/gitlab-ci-patterns/SKILL.md +169 -0
- package/areas/devops/ci-cd/skills/pipeline-security/SKILL.md +161 -0
- package/areas/devops/ci-cd/workflows/onboard-repo.md +73 -0
- package/areas/devops/ci-cd/workflows/pipeline-debug.md +66 -0
- package/areas/devops/ci-cd/workflows/release-pipeline.md +115 -0
- package/areas/devops/database-ops/AGENTS.md +47 -0
- package/areas/devops/database-ops/prompts/backup-verify.md +83 -0
- package/areas/devops/database-ops/prompts/db-incident.md +127 -0
- package/areas/devops/database-ops/rules/access-control.md +20 -0
- package/areas/devops/database-ops/rules/backup-policy.md +33 -0
- package/areas/devops/database-ops/rules/migration-runbook.md +32 -0
- package/areas/devops/database-ops/skills/backup-restore/SKILL.md +226 -0
- package/areas/devops/database-ops/skills/db-performance/SKILL.md +205 -0
- package/areas/devops/database-ops/skills/migration-safety/SKILL.md +155 -0
- package/areas/devops/database-ops/skills/postgres-operations/SKILL.md +156 -0
- package/areas/devops/database-ops/skills/redis-operations/SKILL.md +174 -0
- package/areas/devops/database-ops/workflows/backup-verify.md +107 -0
- package/areas/devops/database-ops/workflows/db-incident.md +86 -0
- package/areas/devops/devsecops/AGENTS.md +47 -0
- package/areas/devops/devsecops/prompts/policy-onboard.md +79 -0
- package/areas/devops/devsecops/prompts/security-scan-pipeline.md +131 -0
- package/areas/devops/devsecops/rules/container-security.md +22 -0
- package/areas/devops/devsecops/rules/policy-as-code.md +37 -0
- package/areas/devops/devsecops/rules/shift-left-policy.md +26 -0
- package/areas/devops/devsecops/skills/container-hardening/SKILL.md +146 -0
- package/areas/devops/devsecops/skills/opa-policies/SKILL.md +188 -0
- package/areas/devops/devsecops/skills/sbom-supply-chain/SKILL.md +165 -0
- package/areas/devops/devsecops/skills/secret-detection/SKILL.md +190 -0
- package/areas/devops/devsecops/skills/sigstore-signing/SKILL.md +184 -0
- package/areas/devops/devsecops/workflows/policy-onboard.md +104 -0
- package/areas/devops/devsecops/workflows/security-scan-pipeline.md +155 -0
- package/areas/devops/infrastructure/AGENTS.md +50 -0
- package/areas/devops/infrastructure/prompts/destroy-environment.md +81 -0
- package/areas/devops/infrastructure/prompts/drift-remediation.md +71 -0
- package/areas/devops/infrastructure/prompts/module-development.md +69 -0
- package/areas/devops/infrastructure/prompts/provision-environment.md +121 -0
- package/areas/devops/infrastructure/rules/iac-standards.md +80 -0
- package/areas/devops/infrastructure/rules/immutability.md +28 -0
- package/areas/devops/infrastructure/rules/secret-hygiene.md +53 -0
- package/areas/devops/infrastructure/rules/state-management.md +47 -0
- package/areas/devops/infrastructure/skills/ansible-playbooks/SKILL.md +174 -0
- package/areas/devops/infrastructure/skills/cost-optimization/SKILL.md +177 -0
- package/areas/devops/infrastructure/skills/drift-detection/SKILL.md +178 -0
- package/areas/devops/infrastructure/skills/state-management/SKILL.md +159 -0
- package/areas/devops/infrastructure/skills/terraform-modules/SKILL.md +169 -0
- package/areas/devops/infrastructure/workflows/destroy-environment.md +96 -0
- package/areas/devops/infrastructure/workflows/drift-remediation.md +66 -0
- package/areas/devops/infrastructure/workflows/module-development.md +101 -0
- package/areas/devops/infrastructure/workflows/provision-environment.md +96 -0
- package/areas/devops/kubernetes/AGENTS.md +57 -0
- package/areas/devops/kubernetes/PROMPTS.md +9 -0
- package/areas/devops/kubernetes/prompts/cluster-bootstrap.md +67 -0
- package/areas/devops/kubernetes/prompts/debug-workload.md +91 -0
- package/areas/devops/kubernetes/prompts/onboard-service.md +101 -0
- package/areas/devops/kubernetes/prompts/upgrade-cluster.md +63 -0
- package/areas/devops/kubernetes/rules/cluster-standards.md +51 -0
- package/areas/devops/kubernetes/rules/resource-governance.md +80 -0
- package/areas/devops/kubernetes/rules/upgrade-policy.md +52 -0
- package/areas/devops/kubernetes/rules/workload-security.md +64 -0
- package/areas/devops/kubernetes/skills/cluster-operations/SKILL.md +136 -0
- package/areas/devops/kubernetes/skills/helm-charts/SKILL.md +152 -0
- package/areas/devops/kubernetes/skills/network-policies/SKILL.md +169 -0
- package/areas/devops/kubernetes/skills/pod-troubleshooting/SKILL.md +129 -0
- package/areas/devops/kubernetes/skills/rbac-design/SKILL.md +148 -0
- package/areas/devops/kubernetes/skills/resource-tuning/SKILL.md +156 -0
- package/areas/devops/kubernetes/workflows/cluster-bootstrap.md +194 -0
- package/areas/devops/kubernetes/workflows/debug-workload.md +108 -0
- package/areas/devops/kubernetes/workflows/onboard-service.md +124 -0
- package/areas/devops/kubernetes/workflows/upgrade-cluster.md +165 -0
- package/areas/devops/networking/AGENTS.md +47 -0
- package/areas/devops/networking/prompts/onboard-ingress.md +119 -0
- package/areas/devops/networking/prompts/service-mesh-onboard.md +77 -0
- package/areas/devops/networking/rules/ingress-standards.md +17 -0
- package/areas/devops/networking/rules/network-segmentation.md +24 -0
- package/areas/devops/networking/rules/tls-policy.md +32 -0
- package/areas/devops/networking/skills/dns-management/SKILL.md +169 -0
- package/areas/devops/networking/skills/ingress-patterns/SKILL.md +165 -0
- package/areas/devops/networking/skills/service-mesh/SKILL.md +206 -0
- package/areas/devops/networking/skills/tls-termination/SKILL.md +198 -0
- package/areas/devops/networking/skills/vpc-design/SKILL.md +132 -0
- package/areas/devops/networking/workflows/onboard-ingress.md +64 -0
- package/areas/devops/networking/workflows/service-mesh-onboard.md +122 -0
- package/areas/devops/observability/AGENTS.md +48 -0
- package/areas/devops/observability/prompts/alert-investigation.md +117 -0
- package/areas/devops/observability/prompts/observability-stack-setup.md +99 -0
- package/areas/devops/observability/prompts/onboard-service-monitoring.md +79 -0
- package/areas/devops/observability/rules/alerting-standards.md +36 -0
- package/areas/devops/observability/rules/data-retention.md +19 -0
- package/areas/devops/observability/rules/golden-signals.md +28 -0
- package/areas/devops/observability/skills/distributed-tracing/SKILL.md +149 -0
- package/areas/devops/observability/skills/grafana-dashboards/SKILL.md +201 -0
- package/areas/devops/observability/skills/log-aggregation/SKILL.md +159 -0
- package/areas/devops/observability/skills/prometheus-alertmanager/SKILL.md +188 -0
- package/areas/devops/observability/skills/slo-implementation/SKILL.md +189 -0
- package/areas/devops/observability/workflows/alert-investigation.md +98 -0
- package/areas/devops/observability/workflows/observability-stack-setup.md +156 -0
- package/areas/devops/observability/workflows/onboard-service-monitoring.md +83 -0
- package/areas/devops/sre/AGENTS.md +48 -0
- package/areas/devops/sre/prompts/incident-response.md +129 -0
- package/areas/devops/sre/prompts/postmortem.md +101 -0
- package/areas/devops/sre/prompts/slo-review.md +125 -0
- package/areas/devops/sre/rules/error-budget-policy.md +25 -0
- package/areas/devops/sre/rules/on-call-standards.md +25 -0
- package/areas/devops/sre/rules/slo-policy.md +31 -0
- package/areas/devops/sre/skills/capacity-planning/SKILL.md +162 -0
- package/areas/devops/sre/skills/chaos-engineering/SKILL.md +186 -0
- package/areas/devops/sre/skills/incident-command/SKILL.md +119 -0
- package/areas/devops/sre/skills/postmortem-analysis/SKILL.md +104 -0
- package/areas/devops/sre/skills/slo-sli-design/SKILL.md +145 -0
- package/areas/devops/sre/workflows/incident-response.md +66 -0
- package/areas/devops/sre/workflows/postmortem.md +90 -0
- package/areas/devops/sre/workflows/slo-review.md +95 -0
- package/areas/software/backend/AGENTS.md +59 -0
- package/areas/software/backend/PROMPTS.md +50 -0
- package/areas/software/backend/README.md +48 -0
- package/areas/software/backend/prompts/add-migration.md +93 -0
- package/areas/software/backend/prompts/create-endpoint.md +97 -0
- package/areas/software/backend/prompts/debug-issue.md +87 -0
- package/areas/software/backend/prompts/develop-epic.md +83 -0
- package/areas/software/backend/prompts/develop-feature.md +91 -0
- package/areas/software/backend/prompts/refactor-module.md +79 -0
- package/areas/software/backend/prompts/test-feature.md +89 -0
- package/areas/software/backend/rules/architecture.md +20 -0
- package/areas/software/backend/rules/data_access.md +20 -0
- package/areas/software/backend/rules/security.md +20 -0
- package/areas/software/backend/rules/testing.md +19 -0
- package/areas/software/backend/skills/api-design/SKILL.md +170 -0
- package/areas/software/backend/skills/async-processing/SKILL.md +152 -0
- package/areas/software/backend/skills/database-modeling/SKILL.md +173 -0
- package/areas/software/backend/skills/observability/SKILL.md +162 -0
- package/areas/software/backend/skills/troubleshooting/SKILL.md +139 -0
- package/areas/software/backend/workflows/add-migration.md +79 -0
- package/areas/software/backend/workflows/create-endpoint.md +89 -0
- package/areas/software/backend/workflows/debug-issue.md +77 -0
- package/areas/software/backend/workflows/develop-epic.md +78 -0
- package/areas/software/backend/workflows/develop-feature.md +98 -0
- package/areas/software/backend/workflows/refactor-module.md +73 -0
- package/areas/software/backend/workflows/test-feature.md +67 -0
- package/areas/software/data-engineering/AGENTS.md +59 -0
- package/areas/software/data-engineering/PROMPTS.md +32 -0
- package/areas/software/data-engineering/prompts/backfill-data.md +107 -0
- package/areas/software/data-engineering/prompts/data-quality-incident.md +109 -0
- package/areas/software/data-engineering/prompts/lineage-trace.md +121 -0
- package/areas/software/data-engineering/prompts/new-model.md +117 -0
- package/areas/software/data-engineering/prompts/schema-migration.md +111 -0
- package/areas/software/data-engineering/rules/data-governance.md +11 -0
- package/areas/software/data-engineering/rules/pii-handling.md +19 -0
- package/areas/software/data-engineering/rules/pipeline-integrity.md +11 -0
- package/areas/software/data-engineering/rules/schema-management.md +21 -0
- package/areas/software/data-engineering/skills/data-modeling/SKILL.md +49 -0
- package/areas/software/data-engineering/skills/dbt-patterns/SKILL.md +43 -0
- package/areas/software/data-engineering/skills/lineage-governance/SKILL.md +38 -0
- package/areas/software/data-engineering/skills/orchestration/SKILL.md +35 -0
- package/areas/software/data-engineering/skills/quality-checks/SKILL.md +50 -0
- package/areas/software/data-engineering/skills/sql-optimization/SKILL.md +47 -0
- package/areas/software/data-engineering/skills/streaming-patterns/SKILL.md +48 -0
- package/areas/software/data-engineering/workflows/backfill-data.md +59 -0
- package/areas/software/data-engineering/workflows/data-quality-incident.md +64 -0
- package/areas/software/data-engineering/workflows/lineage-trace.md +56 -0
- package/areas/software/data-engineering/workflows/new-model.md +71 -0
- package/areas/software/data-engineering/workflows/schema-migration.md +67 -0
- package/areas/software/frontend/AGENTS.md +60 -0
- package/areas/software/frontend/PROMPTS.md +32 -0
- package/areas/software/frontend/prompts/a11y-fix.md +75 -0
- package/areas/software/frontend/prompts/bundle-analyze.md +75 -0
- package/areas/software/frontend/prompts/release-prep.md +83 -0
- package/areas/software/frontend/prompts/scaffold-component.md +69 -0
- package/areas/software/frontend/prompts/visual-regression.md +73 -0
- package/areas/software/frontend/rules/accessibility.md +16 -0
- package/areas/software/frontend/rules/architecture.md +29 -0
- package/areas/software/frontend/rules/performance.md +23 -0
- package/areas/software/frontend/rules/quality.md +12 -0
- package/areas/software/frontend/skills/a11y-audit/SKILL.md +61 -0
- package/areas/software/frontend/skills/api-integration/SKILL.md +58 -0
- package/areas/software/frontend/skills/component-design/SKILL.md +171 -0
- package/areas/software/frontend/skills/css-architecture/SKILL.md +146 -0
- package/areas/software/frontend/skills/error-handling/SKILL.md +55 -0
- package/areas/software/frontend/skills/performance-tuning/SKILL.md +58 -0
- package/areas/software/frontend/skills/state-management/SKILL.md +54 -0
- package/areas/software/frontend/skills/testing-patterns/SKILL.md +69 -0
- package/areas/software/frontend/workflows/a11y-fix.md +63 -0
- package/areas/software/frontend/workflows/bundle-analyze.md +56 -0
- package/areas/software/frontend/workflows/release-prep.md +66 -0
- package/areas/software/frontend/workflows/scaffold-component.md +67 -0
- package/areas/software/frontend/workflows/visual-regression.md +65 -0
- package/areas/software/full-stack/AGENTS.md +72 -0
- package/areas/software/full-stack/PROMPTS.md +66 -0
- package/areas/software/full-stack/prompts/backend-project-full-cycle.md +141 -0
- package/areas/software/full-stack/prompts/debug-issue.md +115 -0
- package/areas/software/full-stack/prompts/develop-feature.md +119 -0
- package/areas/software/full-stack/prompts/feature-implementation-flow.md +137 -0
- package/areas/software/full-stack/prompts/testing-ci-pipeline.md +119 -0
- package/areas/software/full-stack/rules/api-design-guide.md +24 -0
- package/areas/software/full-stack/rules/async-concurrency-guide.md +21 -0
- package/areas/software/full-stack/rules/backend-architecture-rule.md +41 -0
- package/areas/software/full-stack/rules/background-jobs-guide.md +20 -0
- package/areas/software/full-stack/rules/code-quality-guide.md +22 -0
- package/areas/software/full-stack/rules/database-access-guide.md +24 -0
- package/areas/software/full-stack/rules/database-migrations-guide.md +24 -0
- package/areas/software/full-stack/rules/domain-models-guide.md +28 -0
- package/areas/software/full-stack/rules/e2e-test-guide.md +18 -0
- package/areas/software/full-stack/rules/env-settings-guide.md +34 -0
- package/areas/software/full-stack/rules/error-handling-guide.md +20 -0
- package/areas/software/full-stack/rules/logging-observability-guide.md +22 -0
- package/areas/software/full-stack/rules/project-guide.md +34 -0
- package/areas/software/full-stack/rules/python-venv-guide.md +23 -0
- package/areas/software/full-stack/rules/security-guide.md +22 -0
- package/areas/software/full-stack/rules/svt-test-guide.md +17 -0
- package/areas/software/full-stack/rules/testing-ci-guide.md +25 -0
- package/areas/software/full-stack/skills/api-design-principles/SKILL.md +125 -0
- package/areas/software/full-stack/skills/api-design-principles/assets/api-design-checklist.md +155 -0
- package/areas/software/full-stack/skills/api-design-principles/assets/rest-api-template.py +182 -0
- package/areas/software/full-stack/skills/api-design-principles/references/graphql-schema-design.md +583 -0
- package/areas/software/full-stack/skills/api-design-principles/references/rest-best-practices.md +408 -0
- package/areas/software/full-stack/skills/api-design-principles/resources/implementation-playbook.md +513 -0
- package/areas/software/full-stack/skills/api-patterns/SKILL.md +81 -0
- package/areas/software/full-stack/skills/api-patterns/api-style.md +42 -0
- package/areas/software/full-stack/skills/api-patterns/auth.md +24 -0
- package/areas/software/full-stack/skills/api-patterns/documentation.md +26 -0
- package/areas/software/full-stack/skills/api-patterns/graphql.md +41 -0
- package/areas/software/full-stack/skills/api-patterns/rate-limiting.md +31 -0
- package/areas/software/full-stack/skills/api-patterns/response.md +37 -0
- package/areas/software/full-stack/skills/api-patterns/rest.md +40 -0
- package/areas/software/full-stack/skills/api-patterns/scripts/api_validator.py +211 -0
- package/areas/software/full-stack/skills/api-patterns/security-testing.md +122 -0
- package/areas/software/full-stack/skills/api-patterns/trpc.md +41 -0
- package/areas/software/full-stack/skills/api-patterns/versioning.md +22 -0
- package/areas/software/full-stack/skills/app-builder/SKILL.md +135 -0
- package/areas/software/full-stack/skills/app-builder/agent-coordination.md +71 -0
- package/areas/software/full-stack/skills/app-builder/feature-building.md +53 -0
- package/areas/software/full-stack/skills/app-builder/project-detection.md +34 -0
- package/areas/software/full-stack/skills/app-builder/scaffolding.md +118 -0
- package/areas/software/full-stack/skills/app-builder/tech-stack.md +40 -0
- package/areas/software/full-stack/skills/app-builder/templates/SKILL.md +39 -0
- package/areas/software/full-stack/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/areas/software/full-stack/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/areas/software/full-stack/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/areas/software/full-stack/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/areas/software/full-stack/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/areas/software/full-stack/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/areas/software/full-stack/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/areas/software/full-stack/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/areas/software/full-stack/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/areas/software/full-stack/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/areas/software/full-stack/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/areas/software/full-stack/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/areas/software/full-stack/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/areas/software/full-stack/skills/backend-developer/SKILL.md +58 -0
- package/areas/software/full-stack/skills/bash-pro/SKILL.md +310 -0
- package/areas/software/full-stack/skills/blackbox-test/SKILL.md +84 -0
- package/areas/software/full-stack/skills/prompt-project-planner/SKILL.md +130 -0
- package/areas/software/full-stack/skills/prompt-project-planner/output.schema.md +68 -0
- package/areas/software/full-stack/skills/prompt-project-planner/questions.md +80 -0
- package/areas/software/full-stack/skills/python-pro/SKILL.md +158 -0
- package/areas/software/full-stack/skills/skill-creator/LICENSE.txt +202 -0
- package/areas/software/full-stack/skills/skill-creator/SKILL.md +356 -0
- package/areas/software/full-stack/skills/skill-creator/references/output-patterns.md +82 -0
- package/areas/software/full-stack/skills/skill-creator/references/workflows.md +28 -0
- package/areas/software/full-stack/skills/skill-creator/scripts/init_skill.py +303 -0
- package/areas/software/full-stack/skills/skill-creator/scripts/package_skill.py +110 -0
- package/areas/software/full-stack/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/areas/software/full-stack/workflows/backend-project-full-cycle.md +132 -0
- package/areas/software/full-stack/workflows/debug-issue.md +70 -0
- package/areas/software/full-stack/workflows/develop-feature.md +85 -0
- package/areas/software/full-stack/workflows/feature-implementation-flow.md +78 -0
- package/areas/software/full-stack/workflows/testing-ci-pipeline.md +65 -0
- package/areas/software/general/AGENTS.md +68 -0
- package/areas/software/general/prompts/code-review-workflow.md +87 -0
- package/areas/software/general/prompts/development-cycle-workflow.md +83 -0
- package/areas/software/general/prompts/project-setup-workflow.md +93 -0
- package/areas/software/general/rules/code-style-guide.md +31 -0
- package/areas/software/general/rules/docker-compose-guide.md +27 -0
- package/areas/software/general/rules/git-workflow-guide.md +27 -0
- package/areas/software/general/rules/github-workflow-guide.md +27 -0
- package/areas/software/general/rules/gitlab-ci-guide.md +27 -0
- package/areas/software/general/rules/lint-format-guide.md +29 -0
- package/areas/software/general/rules/makefile-guide.md +34 -0
- package/areas/software/general/rules/readme-sync-guide.md +40 -0
- package/areas/software/general/rules/sdlc-methodology-guide.md +27 -0
- package/areas/software/general/rules/sdlc-role-responsibilities.md +108 -0
- package/areas/software/general/skills/general-dev-tools/SKILL.md +324 -0
- package/areas/software/general/workflows/code-review-workflow.md +84 -0
- package/areas/software/general/workflows/development-cycle-workflow.md +85 -0
- package/areas/software/general/workflows/project-setup-workflow.md +94 -0
- package/areas/software/mlops/AGENTS.md +57 -0
- package/areas/software/mlops/PROMPTS.md +32 -0
- package/areas/software/mlops/prompts/champion-challenger.md +87 -0
- package/areas/software/mlops/prompts/deploy-endpoint.md +91 -0
- package/areas/software/mlops/prompts/evaluate-model.md +87 -0
- package/areas/software/mlops/prompts/model-incident.md +87 -0
- package/areas/software/mlops/prompts/train-experiment.md +83 -0
- package/areas/software/mlops/rules/data-integrity.md +9 -0
- package/areas/software/mlops/rules/model-governance.md +9 -0
- package/areas/software/mlops/rules/production-safety.md +9 -0
- package/areas/software/mlops/rules/reproducibility.md +9 -0
- package/areas/software/mlops/skills/experiment-tracking/SKILL.md +29 -0
- package/areas/software/mlops/skills/feature-engineering/SKILL.md +44 -0
- package/areas/software/mlops/skills/inference-serving/SKILL.md +35 -0
- package/areas/software/mlops/skills/model-evaluation/SKILL.md +40 -0
- package/areas/software/mlops/skills/model-monitoring/SKILL.md +32 -0
- package/areas/software/mlops/workflows/champion-challenger.md +65 -0
- package/areas/software/mlops/workflows/deploy-endpoint.md +70 -0
- package/areas/software/mlops/workflows/evaluate-model.md +63 -0
- package/areas/software/mlops/workflows/model-incident.md +64 -0
- package/areas/software/mlops/workflows/train-experiment.md +56 -0
- package/areas/software/mobile/AGENTS.md +58 -0
- package/areas/software/mobile/PROMPTS.md +32 -0
- package/areas/software/mobile/prompts/crash-triage.md +63 -0
- package/areas/software/mobile/prompts/device-testing.md +83 -0
- package/areas/software/mobile/prompts/ota-update.md +75 -0
- package/areas/software/mobile/prompts/release-build.md +67 -0
- package/areas/software/mobile/prompts/store-submission.md +79 -0
- package/areas/software/mobile/rules/offline-first.md +10 -0
- package/areas/software/mobile/rules/performance-budget.md +20 -0
- package/areas/software/mobile/rules/platform-compliance.md +17 -0
- package/areas/software/mobile/rules/security-mobile.md +9 -0
- package/areas/software/mobile/skills/app-store-prep/SKILL.md +27 -0
- package/areas/software/mobile/skills/mobile-testing/SKILL.md +36 -0
- package/areas/software/mobile/skills/native-modules/SKILL.md +38 -0
- package/areas/software/mobile/skills/navigation-patterns/SKILL.md +49 -0
- package/areas/software/mobile/skills/push-notifications/SKILL.md +40 -0
- package/areas/software/mobile/skills/state-sync/SKILL.md +48 -0
- package/areas/software/mobile/workflows/crash-triage.md +63 -0
- package/areas/software/mobile/workflows/device-testing.md +54 -0
- package/areas/software/mobile/workflows/ota-update.md +54 -0
- package/areas/software/mobile/workflows/release-build.md +67 -0
- package/areas/software/mobile/workflows/store-submission.md +63 -0
- package/areas/software/platform/AGENTS.md +67 -0
- package/areas/software/platform/PROMPTS.md +32 -0
- package/areas/software/platform/prompts/cost-audit.md +117 -0
- package/areas/software/platform/prompts/deploy-production.md +109 -0
- package/areas/software/platform/prompts/drift-check.md +107 -0
- package/areas/software/platform/prompts/incident-response.md +121 -0
- package/areas/software/platform/prompts/provision-env.md +113 -0
- package/areas/software/platform/rules/cost-governance.md +11 -0
- package/areas/software/platform/rules/immutability.md +17 -0
- package/areas/software/platform/rules/reliability.md +19 -0
- package/areas/software/platform/rules/security-posture.md +12 -0
- package/areas/software/platform/skills/ci-cd-pipelines/SKILL.md +58 -0
- package/areas/software/platform/skills/incident-response/SKILL.md +41 -0
- package/areas/software/platform/skills/k8s-manifests/SKILL.md +56 -0
- package/areas/software/platform/skills/networking/SKILL.md +44 -0
- package/areas/software/platform/skills/observability-setup/SKILL.md +49 -0
- package/areas/software/platform/skills/secrets-management/SKILL.md +43 -0
- package/areas/software/platform/skills/terraform-patterns/SKILL.md +75 -0
- package/areas/software/platform/workflows/cost-audit.md +61 -0
- package/areas/software/platform/workflows/deploy-production.md +67 -0
- package/areas/software/platform/workflows/drift-check.md +61 -0
- package/areas/software/platform/workflows/incident-response.md +69 -0
- package/areas/software/platform/workflows/provision-env.md +77 -0
- package/areas/software/qa/AGENTS.md +58 -0
- package/areas/software/qa/PROMPTS.md +32 -0
- package/areas/software/qa/prompts/flakiness-investigation.md +61 -0
- package/areas/software/qa/prompts/performance-audit.md +65 -0
- package/areas/software/qa/prompts/regression-suite.md +61 -0
- package/areas/software/qa/prompts/smoke-test.md +65 -0
- package/areas/software/qa/prompts/test-coverage-report.md +61 -0
- package/areas/software/qa/rules/flakiness-policy.md +12 -0
- package/areas/software/qa/rules/quality-gates.md +28 -0
- package/areas/software/qa/rules/test-data.md +9 -0
- package/areas/software/qa/rules/test-strategy.md +11 -0
- package/areas/software/qa/skills/accessibility-testing/SKILL.md +139 -0
- package/areas/software/qa/skills/api-testing/SKILL.md +140 -0
- package/areas/software/qa/skills/e2e-patterns/SKILL.md +152 -0
- package/areas/software/qa/skills/performance-testing/SKILL.md +177 -0
- package/areas/software/qa/skills/test-data-management/SKILL.md +161 -0
- package/areas/software/qa/skills/test-pyramid/SKILL.md +127 -0
- package/areas/software/qa/workflows/flakiness-investigation.md +63 -0
- package/areas/software/qa/workflows/performance-audit.md +59 -0
- package/areas/software/qa/workflows/regression-suite.md +59 -0
- package/areas/software/qa/workflows/smoke-test.md +64 -0
- package/areas/software/qa/workflows/test-coverage-report.md +57 -0
- package/areas/software/security/AGENTS.md +58 -0
- package/areas/software/security/PROMPTS.md +32 -0
- package/areas/software/security/prompts/compliance-report.md +113 -0
- package/areas/software/security/prompts/pen-test-sim.md +113 -0
- package/areas/software/security/prompts/secret-rotation.md +115 -0
- package/areas/software/security/prompts/security-scan.md +91 -0
- package/areas/software/security/prompts/threat-model-review.md +105 -0
- package/areas/software/security/rules/compliance-baseline.md +23 -0
- package/areas/software/security/rules/dependency-policy.md +12 -0
- package/areas/software/security/rules/secrets-policy.md +22 -0
- package/areas/software/security/rules/secure-coding.md +22 -0
- package/areas/software/security/skills/auth-patterns/SKILL.md +42 -0
- package/areas/software/security/skills/crypto-standards/SKILL.md +42 -0
- package/areas/software/security/skills/dependency-audit/SKILL.md +29 -0
- package/areas/software/security/skills/sast-dast-interpretation/SKILL.md +33 -0
- package/areas/software/security/skills/security-headers/SKILL.md +29 -0
- package/areas/software/security/skills/threat-modeling/SKILL.md +36 -0
- package/areas/software/security/workflows/compliance-report.md +57 -0
- package/areas/software/security/workflows/pen-test-sim.md +63 -0
- package/areas/software/security/workflows/secret-rotation.md +67 -0
- package/areas/software/security/workflows/security-scan.md +64 -0
- package/areas/software/security/workflows/threat-model-review.md +62 -0
- package/areas/template/AGENTS-area.tmpl.md +61 -0
- package/areas/template/AGENTS.tmpl.md +67 -0
- package/areas/template/GUIDE.md +102 -0
- package/areas/template/PROMPTS.tmpl.md +29 -0
- package/areas/template/README.md +57 -0
- package/areas/template/README.tmpl.md +51 -0
- package/areas/template/prompt.tmpl.md +101 -0
- package/areas/template/rule.tmpl.md +71 -0
- package/areas/template/skill.tmpl.md +108 -0
- package/areas/template/workflow.tmpl.md +104 -0
- package/bin/agentic.js +24 -0
- package/extensions/antigravity/GEMINI.md +10 -0
- package/extensions/claude/CLAUDE.md +10 -0
- package/extensions/codex/AGENTS.override.md +93 -0
- package/extensions/gemini/GEMINI.md +10 -0
- package/extensions/opencode/agents/designer.md +65 -0
- package/extensions/opencode/agents/developer.md +63 -0
- package/extensions/opencode/agents/devops-engineer.md +69 -0
- package/extensions/opencode/agents/pm.md +61 -0
- package/extensions/opencode/agents/product-owner.md +76 -0
- package/extensions/opencode/agents/qa.md +66 -0
- package/extensions/opencode/agents/team-lead.md +67 -0
- package/extensions/opencode/commands/feature.md +75 -0
- package/extensions/opencode/opencode.json +93 -0
- package/extensions/opencode/plugins/model-checker.json +14 -0
- package/extensions/opencode/plugins/model-checker.ts +279 -0
- package/extensions/opencode/plugins/sound-notification.ts +13 -0
- package/extensions/opencode/plugins/telegram-notification.ts +86 -0
- package/extensions/opencode/skills/code_review_expert/SKILL.md +144 -0
- package/extensions/opencode/skills/design_expert/SKILL.md +42 -0
- package/extensions/opencode/skills/qa_expert/SKILL.md +116 -0
- package/package.json +19 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Rule: Performance Budget
|
|
2
|
+
|
|
3
|
+
**Priority**: P1 — Must be resolved before release; tracked per PR.
|
|
4
|
+
|
|
5
|
+
## Core Web Vitals Targets (Production)
|
|
6
|
+
|
|
7
|
+
| Metric | Target | Hard Limit |
|
|
8
|
+
|:---|:---|:---|
|
|
9
|
+
| LCP (Largest Contentful Paint) | < 2.0s | < 2.5s |
|
|
10
|
+
| INP (Interaction to Next Paint) | < 100ms | < 200ms |
|
|
11
|
+
| CLS (Cumulative Layout Shift) | < 0.05 | < 0.1 |
|
|
12
|
+
|
|
13
|
+
## Bundle Constraints
|
|
14
|
+
|
|
15
|
+
1. **Initial JS bundle**: ≤ 200 KB gzipped for the critical path.
|
|
16
|
+
2. **Route-level chunks**: Every route must be lazy-loaded via `React.lazy()` + `Suspense`.
|
|
17
|
+
3. **Third-party libraries**: Any dependency > 50 KB gzipped must be explicitly approved in `bundle-policy.md`.
|
|
18
|
+
4. **No synchronous localStorage access** in the render path.
|
|
19
|
+
5. Images must use modern formats (WebP/AVIF) and include `width`/`height` attributes.
|
|
20
|
+
|
|
21
|
+
## Enforcement
|
|
22
|
+
|
|
23
|
+
Bundle size is tracked via `bundlesize` in CI. PRs that increase the initial bundle by > 5 KB trigger a mandatory `/bundle-analyze` workflow run.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Rule: Code Quality
|
|
2
|
+
|
|
3
|
+
**Priority**: P1 — Violations block merge via automated lint gates.
|
|
4
|
+
|
|
5
|
+
## Constraints
|
|
6
|
+
|
|
7
|
+
1. **TypeScript strict mode** is non-negotiable (`strict: true` in `tsconfig.json`). No `any` without an explicit `// eslint-disable` comment explaining why.
|
|
8
|
+
2. **No hardcoded user-facing strings**: All copy must use i18n keys (`t('key.path')`).
|
|
9
|
+
3. **No direct DOM manipulation**: Never use `document.getElementById` or `querySelector` from within React components. Use `useRef`.
|
|
10
|
+
4. **State immutability**: Never mutate state objects directly.
|
|
11
|
+
5. **Test coverage**: New components must ship with ≥ 1 rendering test and ≥ 1 interaction test.
|
|
12
|
+
6. **No `console.log` in committed code**: Use the project's structured logger (`lib/logger.ts`).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Skill: Accessibility Audit & Remediation
|
|
2
|
+
|
|
3
|
+
## When to load
|
|
4
|
+
|
|
5
|
+
When building interactive components, reviewing a PR for accessibility, or fixing a11y lint errors.
|
|
6
|
+
|
|
7
|
+
## Most Common Violations & Fixes
|
|
8
|
+
|
|
9
|
+
### 1. Icon-only button without label
|
|
10
|
+
```tsx
|
|
11
|
+
// ❌
|
|
12
|
+
<button onClick={onClose}><CloseIcon /></button>
|
|
13
|
+
|
|
14
|
+
// ✅
|
|
15
|
+
<button onClick={onClose} aria-label="Close dialog">
|
|
16
|
+
<CloseIcon aria-hidden="true" />
|
|
17
|
+
</button>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Input without label
|
|
21
|
+
```tsx
|
|
22
|
+
// ❌
|
|
23
|
+
<input type="email" placeholder="Email address" />
|
|
24
|
+
|
|
25
|
+
// ✅
|
|
26
|
+
<label htmlFor="email">Email address</label>
|
|
27
|
+
<input id="email" type="email" placeholder="jane@example.com" />
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 3. Modal focus management
|
|
31
|
+
```tsx
|
|
32
|
+
const Modal = ({ isOpen, onClose, children }: ModalProps) => {
|
|
33
|
+
const firstFocusableRef = useRef<HTMLButtonElement>(null);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (isOpen) firstFocusableRef.current?.focus();
|
|
36
|
+
}, [isOpen]);
|
|
37
|
+
|
|
38
|
+
return isOpen ? (
|
|
39
|
+
<div role="dialog" aria-modal="true" aria-labelledby="dialog-title">
|
|
40
|
+
{children}
|
|
41
|
+
<button ref={firstFocusableRef} onClick={onClose}>Close</button>
|
|
42
|
+
</div>
|
|
43
|
+
) : null;
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 4. Dynamic content announcements
|
|
48
|
+
```tsx
|
|
49
|
+
const StatusMessage = ({ message }: { message: string }) => (
|
|
50
|
+
<div aria-live="polite" aria-atomic="true" className="sr-only">
|
|
51
|
+
{message}
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Keyboard Navigation Checklist
|
|
57
|
+
|
|
58
|
+
- [ ] Tab order follows visual reading order (no `tabindex > 0`)
|
|
59
|
+
- [ ] Custom dropdown: Arrow keys navigate, Escape closes, Enter selects
|
|
60
|
+
- [ ] Modals: Focus trapped inside; Escape closes; focus returns to trigger
|
|
61
|
+
- [ ] All hover interactions have keyboard equivalent
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Skill: API Integration Patterns
|
|
2
|
+
|
|
3
|
+
## When to load
|
|
4
|
+
|
|
5
|
+
When connecting a component to a REST API, handling loading/error states, or implementing optimistic updates.
|
|
6
|
+
|
|
7
|
+
## Standard Fetch Layer
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
const apiClient = {
|
|
11
|
+
get: async <T>(path: string, options?: RequestInit): Promise<T> => {
|
|
12
|
+
const res = await fetch(`${import.meta.env.VITE_API_URL}${path}`, {
|
|
13
|
+
...options,
|
|
14
|
+
headers: {
|
|
15
|
+
'Content-Type': 'application/json',
|
|
16
|
+
Authorization: `Bearer ${getToken()}`,
|
|
17
|
+
...options?.headers,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
if (!res.ok) throw new ApiError(res.status, await res.json());
|
|
21
|
+
return res.json();
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Loading & Error States
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
const UserList = () => {
|
|
30
|
+
const { data, isLoading, isError, error } = useQuery({
|
|
31
|
+
queryKey: ['users'],
|
|
32
|
+
queryFn: () => apiClient.get<User[]>('/users'),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (isLoading) return <UserListSkeleton />;
|
|
36
|
+
if (isError) return <ErrorMessage message={error.message} />;
|
|
37
|
+
|
|
38
|
+
return <ul>{data.map(user => <UserItem key={user.id} user={user} />)}</ul>;
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Optimistic Updates
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
const mutation = useMutation({
|
|
46
|
+
mutationFn: (id: string) => apiClient.delete(`/todos/${id}`),
|
|
47
|
+
onMutate: async (id) => {
|
|
48
|
+
await queryClient.cancelQueries({ queryKey: ['todos'] });
|
|
49
|
+
const previous = queryClient.getQueryData<Todo[]>(['todos']);
|
|
50
|
+
queryClient.setQueryData<Todo[]>(['todos'], old => old?.filter(t => t.id !== id));
|
|
51
|
+
return { previous };
|
|
52
|
+
},
|
|
53
|
+
onError: (_err, _id, context) => {
|
|
54
|
+
queryClient.setQueryData(['todos'], context?.previous);
|
|
55
|
+
},
|
|
56
|
+
onSettled: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
|
|
57
|
+
});
|
|
58
|
+
```
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: component-design
|
|
3
|
+
type: skill
|
|
4
|
+
description: Design reusable React/Vue components with correct patterns, typed APIs, state handling, and accessibility.
|
|
5
|
+
related-rules:
|
|
6
|
+
- architecture.md
|
|
7
|
+
- accessibility.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Component Design Patterns Skill
|
|
12
|
+
|
|
13
|
+
> **Expertise:** Compound components, controlled/uncontrolled, render props, component API design, accessibility requirements.
|
|
14
|
+
|
|
15
|
+
## Pattern Selection Guide
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Multiple visual zones in one component? → Slot / Children Props
|
|
19
|
+
Coordinated subcomponents sharing state? → Compound Components
|
|
20
|
+
Works with react-hook-form / external control? → Controlled/Uncontrolled Hybrid
|
|
21
|
+
Self-contained widget with internal state? → Uncontrolled with defaults
|
|
22
|
+
Highly customizable rendering? → Render Props / Headless
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Pattern 1: Compound Components
|
|
26
|
+
|
|
27
|
+
Use when: a component has multiple coordinated parts sharing implicit state.
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
// Context shared between sub-components
|
|
31
|
+
const MenuContext = createContext<{ open: boolean; toggle: () => void } | null>(null);
|
|
32
|
+
|
|
33
|
+
const Menu = ({ children }: { children: React.ReactNode }) => {
|
|
34
|
+
const [open, setOpen] = useState(false);
|
|
35
|
+
return (
|
|
36
|
+
<MenuContext.Provider value={{ open, toggle: () => setOpen(o => !o) }}>
|
|
37
|
+
<div role="menu" aria-expanded={open}>{children}</div>
|
|
38
|
+
</MenuContext.Provider>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
Menu.Trigger = function MenuTrigger({ children }: { children: React.ReactNode }) {
|
|
43
|
+
const ctx = useContext(MenuContext)!;
|
|
44
|
+
return (
|
|
45
|
+
<button onClick={ctx.toggle} aria-haspopup="true" aria-expanded={ctx.open}>
|
|
46
|
+
{children}
|
|
47
|
+
</button>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
Menu.Items = function MenuItems({ children }: { children: React.ReactNode }) {
|
|
52
|
+
const { open } = useContext(MenuContext)!;
|
|
53
|
+
if (!open) return null;
|
|
54
|
+
return <ul role="listbox">{children}</ul>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Usage — caller controls structure
|
|
58
|
+
<Menu>
|
|
59
|
+
<Menu.Trigger>Options</Menu.Trigger>
|
|
60
|
+
<Menu.Items>
|
|
61
|
+
<li role="option">Edit</li>
|
|
62
|
+
<li role="option">Delete</li>
|
|
63
|
+
</Menu.Items>
|
|
64
|
+
</Menu>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Pattern 2: Controlled / Uncontrolled Hybrid
|
|
68
|
+
|
|
69
|
+
Use when: component works standalone OR integrates with external form libraries.
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
interface InputProps {
|
|
73
|
+
value?: string; // controlled mode if provided
|
|
74
|
+
defaultValue?: string; // uncontrolled mode
|
|
75
|
+
onChange?: (value: string) => void;
|
|
76
|
+
label: string;
|
|
77
|
+
error?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const Input = ({ value, onChange, defaultValue, label, error }: InputProps) => {
|
|
81
|
+
const [internal, setInternal] = useState(defaultValue ?? '');
|
|
82
|
+
const isControlled = value !== undefined;
|
|
83
|
+
const current = isControlled ? value : internal;
|
|
84
|
+
|
|
85
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
86
|
+
if (!isControlled) setInternal(e.target.value);
|
|
87
|
+
onChange?.(e.target.value);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const id = useId(); // stable ID for label association
|
|
91
|
+
return (
|
|
92
|
+
<div>
|
|
93
|
+
<label htmlFor={id}>{label}</label>
|
|
94
|
+
<input id={id} value={current} onChange={handleChange}
|
|
95
|
+
aria-invalid={!!error} aria-describedby={error ? `${id}-error` : undefined} />
|
|
96
|
+
{error && <span id={`${id}-error`} role="alert">{error}</span>}
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Component States — Always Implement All
|
|
103
|
+
|
|
104
|
+
Every component that fetches or receives async data must handle all states:
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
interface DataComponentProps {
|
|
108
|
+
userId: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const UserCard = ({ userId }: DataComponentProps) => {
|
|
112
|
+
const { data, isLoading, isError, error } = useUser(userId);
|
|
113
|
+
|
|
114
|
+
// 1. Loading state — skeleton or spinner
|
|
115
|
+
if (isLoading) return <UserCardSkeleton />;
|
|
116
|
+
|
|
117
|
+
// 2. Error state — meaningful message, not blank
|
|
118
|
+
if (isError) return (
|
|
119
|
+
<div role="alert">
|
|
120
|
+
<p>Failed to load user data.</p>
|
|
121
|
+
<button onClick={() => refetch()}>Try again</button>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
// 3. Empty state — explicit, not silent blank area
|
|
126
|
+
if (!data) return <p>No user found.</p>;
|
|
127
|
+
|
|
128
|
+
// 4. Success state — the happy path
|
|
129
|
+
return <div>{data.name}</div>;
|
|
130
|
+
};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Props API Design Rules
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
// ✅ Good: explicit, typed, small surface area
|
|
137
|
+
interface ButtonProps {
|
|
138
|
+
variant: 'primary' | 'secondary' | 'ghost';
|
|
139
|
+
size?: 'sm' | 'md' | 'lg';
|
|
140
|
+
isLoading?: boolean;
|
|
141
|
+
onClick?: () => void;
|
|
142
|
+
children: React.ReactNode;
|
|
143
|
+
'aria-label'?: string; // Allow a11y override
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// ❌ Bad: too many booleans (boolean explosion)
|
|
147
|
+
interface ButtonProps {
|
|
148
|
+
isPrimary?: boolean;
|
|
149
|
+
isSecondary?: boolean;
|
|
150
|
+
isSmall?: boolean;
|
|
151
|
+
isLarge?: boolean;
|
|
152
|
+
// Can set isPrimary + isSecondary simultaneously — ambiguous
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ❌ Bad: style overrides passed as strings
|
|
156
|
+
interface ButtonProps {
|
|
157
|
+
className?: string; // Breaks component encapsulation
|
|
158
|
+
style?: CSSProperties; // Creates leaky styling contract
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Accessibility Requirements Per Component
|
|
163
|
+
|
|
164
|
+
| Component | Required ARIA | Keyboard | Notes |
|
|
165
|
+
|---|---|---|---|
|
|
166
|
+
| Dialog/Modal | `role="dialog"`, `aria-modal`, `aria-labelledby` | Trap focus; Escape closes | Focus returns to trigger on close |
|
|
167
|
+
| Dropdown/Select | `role="listbox"`, `aria-expanded` | Arrow keys navigate; Enter selects | Announce selection |
|
|
168
|
+
| Toggle/Switch | `role="switch"`, `aria-checked` | Space toggles | |
|
|
169
|
+
| Alert/Toast | `role="alert"` or `aria-live="polite"` | — | Screen reader announces immediately |
|
|
170
|
+
| Tab panel | `role="tablist"`, `role="tab"`, `role="tabpanel"` | Arrow keys between tabs | |
|
|
171
|
+
| Form field | `<label>` with `htmlFor` | — | Never skip label |
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: css-architecture
|
|
3
|
+
type: skill
|
|
4
|
+
description: Structure CSS/Tailwind for maintainability — tokens, BEM naming, specificity control, responsive patterns.
|
|
5
|
+
related-rules:
|
|
6
|
+
- architecture.md
|
|
7
|
+
- accessibility.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# CSS Architecture Skill
|
|
12
|
+
|
|
13
|
+
> **Expertise:** Design tokens, BEM, Tailwind utility classes, CSS custom properties, responsive design, dark mode.
|
|
14
|
+
|
|
15
|
+
## Design Tokens — Never Hardcode Values
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
/* tokens.css — single source of truth */
|
|
19
|
+
:root {
|
|
20
|
+
/* Color — semantic names, not visual */
|
|
21
|
+
--color-primary: #3b82f6;
|
|
22
|
+
--color-primary-hover: #2563eb;
|
|
23
|
+
--color-surface: #ffffff;
|
|
24
|
+
--color-surface-raised: #f8fafc;
|
|
25
|
+
--color-text-primary: #0f172a;
|
|
26
|
+
--color-text-muted: #64748b;
|
|
27
|
+
--color-error: #ef4444;
|
|
28
|
+
--color-success: #22c55e;
|
|
29
|
+
|
|
30
|
+
/* Spacing — 4px base unit */
|
|
31
|
+
--space-1: 0.25rem; /* 4px */
|
|
32
|
+
--space-2: 0.5rem; /* 8px */
|
|
33
|
+
--space-4: 1rem; /* 16px */
|
|
34
|
+
--space-6: 1.5rem; /* 24px */
|
|
35
|
+
--space-8: 2rem; /* 32px */
|
|
36
|
+
|
|
37
|
+
/* Typography */
|
|
38
|
+
--font-size-sm: 0.875rem;
|
|
39
|
+
--font-size-base: 1rem;
|
|
40
|
+
--font-size-lg: 1.125rem;
|
|
41
|
+
--font-size-xl: 1.25rem;
|
|
42
|
+
--line-height-tight: 1.25;
|
|
43
|
+
--line-height-normal: 1.5;
|
|
44
|
+
|
|
45
|
+
/* Borders */
|
|
46
|
+
--radius-sm: 0.25rem;
|
|
47
|
+
--radius-md: 0.5rem;
|
|
48
|
+
--radius-lg: 1rem;
|
|
49
|
+
--border-color: #e2e8f0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Dark mode via media query or class */
|
|
53
|
+
@media (prefers-color-scheme: dark) {
|
|
54
|
+
:root {
|
|
55
|
+
--color-surface: #0f172a;
|
|
56
|
+
--color-text-primary: #f1f5f9;
|
|
57
|
+
--border-color: #1e293b;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## BEM Naming Convention
|
|
63
|
+
|
|
64
|
+
```css
|
|
65
|
+
/* Block */
|
|
66
|
+
.card { }
|
|
67
|
+
|
|
68
|
+
/* Element (part of block) */
|
|
69
|
+
.card__header { }
|
|
70
|
+
.card__body { }
|
|
71
|
+
.card__footer { }
|
|
72
|
+
|
|
73
|
+
/* Modifier (variation of block or element) */
|
|
74
|
+
.card--featured { }
|
|
75
|
+
.card__header--sticky { }
|
|
76
|
+
|
|
77
|
+
/* Avoid deep nesting — max 2 levels */
|
|
78
|
+
/* ❌ .card__header__title__icon { } */
|
|
79
|
+
/* ✅ .card__icon { } */
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Tailwind: Extracting Repeated Patterns
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
// ❌ Repeating long class strings — hard to maintain
|
|
86
|
+
<button className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 disabled:opacity-50">
|
|
87
|
+
<button className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 disabled:opacity-50">
|
|
88
|
+
|
|
89
|
+
// ✅ Extract to component variant
|
|
90
|
+
const buttonVariants = cva(
|
|
91
|
+
"px-4 py-2 rounded-md focus:ring-2 disabled:opacity-50 transition-colors",
|
|
92
|
+
{
|
|
93
|
+
variants: {
|
|
94
|
+
variant: {
|
|
95
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",
|
|
96
|
+
secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 focus:ring-gray-400",
|
|
97
|
+
ghost: "text-gray-700 hover:bg-gray-100 focus:ring-gray-400",
|
|
98
|
+
},
|
|
99
|
+
size: {
|
|
100
|
+
sm: "px-3 py-1.5 text-sm",
|
|
101
|
+
md: "px-4 py-2",
|
|
102
|
+
lg: "px-6 py-3 text-lg",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
defaultVariants: { variant: "primary", size: "md" },
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Responsive Design Patterns
|
|
111
|
+
|
|
112
|
+
```css
|
|
113
|
+
/* Mobile-first — base styles for mobile, then override for larger */
|
|
114
|
+
.card {
|
|
115
|
+
padding: var(--space-4); /* mobile */
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (min-width: 768px) {
|
|
119
|
+
.card { padding: var(--space-6); } /* tablet */
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (min-width: 1024px) {
|
|
123
|
+
.card { padding: var(--space-8); } /* desktop */
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Container queries (modern — prefer over media queries for components) */
|
|
127
|
+
.card-container { container-type: inline-size; }
|
|
128
|
+
|
|
129
|
+
@container (min-width: 400px) {
|
|
130
|
+
.card { display: grid; grid-template-columns: auto 1fr; }
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Specificity Rules
|
|
135
|
+
|
|
136
|
+
```css
|
|
137
|
+
/* Target specificity range: 0-1-0 to 0-2-0 */
|
|
138
|
+
/* ❌ Too high — hard to override */
|
|
139
|
+
#app .container .card.featured > .header span.title { } /* 1-3-1 */
|
|
140
|
+
|
|
141
|
+
/* ✅ Right level — component-scoped */
|
|
142
|
+
.card__title { } /* 0-1-0 */
|
|
143
|
+
.card--featured .card__title { } /* 0-2-0 */
|
|
144
|
+
|
|
145
|
+
/* Never use !important in component styles — signals architecture problem */
|
|
146
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Skill: Frontend Error Handling
|
|
2
|
+
|
|
3
|
+
## When to load
|
|
4
|
+
|
|
5
|
+
When adding error boundaries, handling async errors, or building error UI states.
|
|
6
|
+
|
|
7
|
+
## Error Boundary
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
class ErrorBoundary extends React.Component<
|
|
11
|
+
{ fallback: React.ComponentType<{ error: Error; reset: () => void }> },
|
|
12
|
+
{ error: Error | null }
|
|
13
|
+
> {
|
|
14
|
+
state = { error: null };
|
|
15
|
+
|
|
16
|
+
static getDerivedStateFromError(error: Error) {
|
|
17
|
+
return { error };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
componentDidCatch(error: Error, info: React.ErrorInfo) {
|
|
21
|
+
logger.error('UI Error', { error: error.message, componentStack: info.componentStack });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
render() {
|
|
25
|
+
if (this.state.error) {
|
|
26
|
+
const Fallback = this.props.fallback;
|
|
27
|
+
return <Fallback error={this.state.error} reset={() => this.setState({ error: null })} />;
|
|
28
|
+
}
|
|
29
|
+
return this.props.children;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Usage:
|
|
34
|
+
<ErrorBoundary fallback={RouteErrorFallback}>
|
|
35
|
+
<UserDashboard />
|
|
36
|
+
</ErrorBoundary>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Error Classification
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
export class ApiError extends Error {
|
|
43
|
+
constructor(public status: number, public body: unknown) {
|
|
44
|
+
super(`API Error ${status}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// In components:
|
|
49
|
+
if (error instanceof ApiError) {
|
|
50
|
+
if (error.status === 401) return <LoginRedirect />;
|
|
51
|
+
if (error.status === 403) return <ForbiddenMessage />;
|
|
52
|
+
if (error.status === 404) return <NotFound />;
|
|
53
|
+
}
|
|
54
|
+
return <GenericError message={error.message} />;
|
|
55
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Skill: Frontend Performance Tuning
|
|
2
|
+
|
|
3
|
+
## When to load
|
|
4
|
+
|
|
5
|
+
When optimizing Core Web Vitals, reducing bundle size, diagnosing render performance, or reviewing images/fonts.
|
|
6
|
+
|
|
7
|
+
## Re-render Prevention
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
// Memoize expensive computations
|
|
11
|
+
const sorted = useMemo(
|
|
12
|
+
() => [...items].sort((a, b) => a.name.localeCompare(b.name)),
|
|
13
|
+
[items]
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// Stable callback references
|
|
17
|
+
const handleClick = useCallback(() => doSomething(id), [id]);
|
|
18
|
+
|
|
19
|
+
// Memoize child components receiving object/function props
|
|
20
|
+
const ExpensiveList = React.memo(({ items, onSelect }: ListProps) => (
|
|
21
|
+
// rendering
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
// ❌ Inline objects create new references every render
|
|
25
|
+
<MyComponent config={{ timeout: 3000 }} />
|
|
26
|
+
// ✅ Stable reference
|
|
27
|
+
const CONFIG = { timeout: 3000 };
|
|
28
|
+
<MyComponent config={CONFIG} />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Code Splitting (Mandatory)
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
const UserDashboard = lazy(() => import('./features/users/UserDashboard'));
|
|
35
|
+
|
|
36
|
+
<Suspense fallback={<PageSkeleton />}>
|
|
37
|
+
<UserDashboard />
|
|
38
|
+
</Suspense>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Image Optimization Checklist
|
|
42
|
+
|
|
43
|
+
- [ ] Explicit `width` and `height` to prevent CLS
|
|
44
|
+
- [ ] WebP/AVIF via `<picture>` with JPG fallback
|
|
45
|
+
- [ ] `loading="lazy"` for below-fold images
|
|
46
|
+
- [ ] `loading="eager"` + `fetchpriority="high"` for LCP image
|
|
47
|
+
|
|
48
|
+
## Bundle Analysis
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx vite-bundle-visualizer
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
| Library | Problem | Solution |
|
|
55
|
+
|:---|:---|:---|
|
|
56
|
+
| `moment.js` | 300KB+ | Replace with `date-fns` |
|
|
57
|
+
| `lodash` | Full import | Use `lodash-es` named imports |
|
|
58
|
+
| `@mui/material` | Full import | Path imports: `@mui/material/Button` |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Skill: State Management
|
|
2
|
+
|
|
3
|
+
## When to load
|
|
4
|
+
|
|
5
|
+
When deciding where to put state, choosing between local/global state, integrating server state, or debugging stale data.
|
|
6
|
+
|
|
7
|
+
## State Classification Matrix
|
|
8
|
+
|
|
9
|
+
| State Type | Example | Solution |
|
|
10
|
+
|:---|:---|:---|
|
|
11
|
+
| **Local UI State** | Modal open/close, input focus | `useState` / `useReducer` |
|
|
12
|
+
| **Shared UI State** | Theme, sidebar collapse | React Context + `useReducer` |
|
|
13
|
+
| **Server/Remote State** | API data, pagination | React Query / SWR |
|
|
14
|
+
| **URL State** | Filters, search params | `useSearchParams` |
|
|
15
|
+
| **Global App State** | Auth session, shopping cart | Zustand / Redux Toolkit |
|
|
16
|
+
| **Form State** | Input values, validation errors | React Hook Form |
|
|
17
|
+
|
|
18
|
+
## Colocation Rule
|
|
19
|
+
|
|
20
|
+
State should live as **close to where it's used** as possible. Only lift state up when two components genuinely need to share it.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
❌ Storing modal visibility in a global store
|
|
24
|
+
✅ Storing modal visibility in the component that renders the modal
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## React Query: Key Patterns
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
const { data } = useQuery({
|
|
31
|
+
queryKey: ['users', { page, filters }],
|
|
32
|
+
queryFn: () => fetchUsers({ page, filters }),
|
|
33
|
+
staleTime: 5 * 60 * 1000,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const mutation = useMutation({
|
|
37
|
+
mutationFn: createUser,
|
|
38
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['users'] }),
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Zustand: Slice Pattern
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
export const useAuthStore = create<AuthState>((set) => ({
|
|
46
|
+
user: null,
|
|
47
|
+
token: null,
|
|
48
|
+
login: async (credentials) => {
|
|
49
|
+
const { user, token } = await authApi.login(credentials);
|
|
50
|
+
set({ user, token });
|
|
51
|
+
},
|
|
52
|
+
logout: () => set({ user: null, token: null }),
|
|
53
|
+
}));
|
|
54
|
+
```
|