@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,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
glob: database-migrations-guide
|
|
4
|
+
description: all DB schema changes must be explicit, versioned, and testable via Alembic
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Database & Migration Rule
|
|
8
|
+
|
|
9
|
+
**Goal:** schema changes must be explicit, versioned, traceable, and tested.
|
|
10
|
+
|
|
11
|
+
**Rules:**
|
|
12
|
+
|
|
13
|
+
- Use **Alembic** for all schema changes; never rely only on ORM metadata or manual SQL.
|
|
14
|
+
- Each change in a migration script with upgrade/downgrade; idempotent if possible; consistent naming/versioning.
|
|
15
|
+
- Include tables, columns, indexes, constraints, relationships explicitly.
|
|
16
|
+
- Tests must apply migrations to clean DB and validate structure & integrity (Postgres & SQLite if supported).
|
|
17
|
+
- Avoid destructive ops without backup; group related changes; keep scripts small; document dependencies/order.
|
|
18
|
+
|
|
19
|
+
**Violations:**
|
|
20
|
+
|
|
21
|
+
- Schema changes outside Alembic.
|
|
22
|
+
- Missing tests or incomplete upgrade/downgrade.
|
|
23
|
+
- Hardcoded schema in code.
|
|
24
|
+
- Drift between environments.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
glob: domain-models-guide
|
|
4
|
+
description: ensure strong, explicit, validated domain models
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Domain Models Rule
|
|
8
|
+
|
|
9
|
+
**Goal:** all domain data must be explicit, validated, and modeled.
|
|
10
|
+
|
|
11
|
+
**Rules:**
|
|
12
|
+
|
|
13
|
+
- No raw data flows; every domain concept must have a model.
|
|
14
|
+
- **Pydantic mandatory** for domain models, I/O contracts, config, validation.
|
|
15
|
+
- **SQLModel mandatory** for database models.
|
|
16
|
+
- Validation logic lives inside models; models are explicit, strongly typed.
|
|
17
|
+
- Prefer value objects over primitives when meaning or validation exists.
|
|
18
|
+
- Explicit fields/types only; no dynamic fields, magic defaults, or hybrid models.
|
|
19
|
+
- Serialization explicit; no dict spreading, no leaking internal structure.
|
|
20
|
+
|
|
21
|
+
**Violations:**
|
|
22
|
+
|
|
23
|
+
- Raw dicts between layers.
|
|
24
|
+
- Validation outside models.
|
|
25
|
+
- Optional fields “just in case”.
|
|
26
|
+
- Models depend on infrastructure.
|
|
27
|
+
- Silent coercion of invalid data.
|
|
28
|
+
- Pydantic bypassed or inconsistent.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
glob: e2e-test-guide
|
|
4
|
+
description: enforce full blackbox end-to-end testing after code & unit tests
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Rule — E2E Test
|
|
8
|
+
|
|
9
|
+
**Purpose:** Verify all business logic in full scenarios.
|
|
10
|
+
|
|
11
|
+
- Launch services via Docker.
|
|
12
|
+
- Feed input data/files.
|
|
13
|
+
- Call APIs to run the complete workflow.
|
|
14
|
+
- Verify output matches expected results.
|
|
15
|
+
- Run via Makefile: `make e2e-test`.
|
|
16
|
+
- Must **not** be confused with unit tests.
|
|
17
|
+
|
|
18
|
+
**Violations:** Missing E2E test, logs contain errors, output incorrect.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
glob: env-settings-guide
|
|
4
|
+
description: enforce DSN-based configuration via Pydantic BaseSettings
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Environment & DSN Settings Rule
|
|
8
|
+
|
|
9
|
+
**Rules:**
|
|
10
|
+
|
|
11
|
+
- All service connections (DB, cache, brokers, APIs) MUST use **DSN variables**.
|
|
12
|
+
- Use a single DSN env var instead of splitting config into `USER/HOST/DB`.
|
|
13
|
+
- All configuration MUST be defined via Pydantic `BaseSettings`.
|
|
14
|
+
- Parsing, validation, and defaults live inside the Settings model only.
|
|
15
|
+
|
|
16
|
+
### Environment Files
|
|
17
|
+
|
|
18
|
+
- `.env.example` MUST exist and be kept up to date.
|
|
19
|
+
- `.env.example` MUST contain **test / placeholder credentials only**.
|
|
20
|
+
- `.env` MUST contain **real (production or local) credentials**.
|
|
21
|
+
- `.env` MUST be listed in `.gitignore`.
|
|
22
|
+
- `docker-compose.yml` MUST explicitly load `.env`.
|
|
23
|
+
|
|
24
|
+
**Examples:**
|
|
25
|
+
|
|
26
|
+
- ✅ `DATABASE_DSN=postgresql+asyncpg://test_user:test_pass@localhost:5432/app`
|
|
27
|
+
- ❌ `DB_USER`, `DB_PASSWORD`, `DB_HOST`, `DB_NAME`
|
|
28
|
+
|
|
29
|
+
**Violations:**
|
|
30
|
+
|
|
31
|
+
- Real credentials inside `.env.example`.
|
|
32
|
+
- Splitting DSN into multiple env variables.
|
|
33
|
+
- Accessing env vars outside `BaseSettings`.
|
|
34
|
+
- Missing `.env.example` or docker-compose env loading.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
glob: error-handling-guide
|
|
4
|
+
description: explicit exception management and retry policies
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Error Handling Rule
|
|
8
|
+
|
|
9
|
+
**Rules:**
|
|
10
|
+
|
|
11
|
+
- Catch specific exceptions only; never base Exception.
|
|
12
|
+
- Retry with backoff for transient failures.
|
|
13
|
+
- Use circuit breakers for external calls.
|
|
14
|
+
- Log errors with context; propagate critical exceptions.
|
|
15
|
+
|
|
16
|
+
**Violations:**
|
|
17
|
+
|
|
18
|
+
- Root Exception is caught.
|
|
19
|
+
- Retries missing for transient errors.
|
|
20
|
+
- Critical failures are silenced.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
glob: logging-observability-guide
|
|
4
|
+
description: structured logging, metrics, and error context
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Logging & Observability Rule
|
|
8
|
+
|
|
9
|
+
**Rules:**
|
|
10
|
+
|
|
11
|
+
- Use structured logs (JSON or similar) with timestamps, context, Task IDs, user IDs.
|
|
12
|
+
- Avoid logging secrets or PII.
|
|
13
|
+
- Log errors with stack trace and actionable info.
|
|
14
|
+
- Use loguru for Python projects (from loguru import logger)
|
|
15
|
+
- Emit metrics for key events and performance.
|
|
16
|
+
|
|
17
|
+
**Violations:**
|
|
18
|
+
|
|
19
|
+
- Logs are free text only.
|
|
20
|
+
- Used print or default python logger in code
|
|
21
|
+
- Sensitive info is logged.
|
|
22
|
+
- Metrics or errors lack context.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
glob: project-guide
|
|
4
|
+
description: agent execution rules and project workflow
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Directive
|
|
8
|
+
|
|
9
|
+
**Core Principle:** Artifact First
|
|
10
|
+
|
|
11
|
+
- Non-trivial tasks start with artifacts; no immediate coding.
|
|
12
|
+
|
|
13
|
+
**Artifact Protocol:**
|
|
14
|
+
|
|
15
|
+
- Plan first: `artifacts/plan_<task_id>.md`
|
|
16
|
+
- Evidence: test logs in `artifacts/logs/`
|
|
17
|
+
- UI changes: `Generates Artifact: Screenshot`
|
|
18
|
+
|
|
19
|
+
**Mission & Context:**
|
|
20
|
+
|
|
21
|
+
- Read `mission.md` before work.
|
|
22
|
+
- Review full `src/` tree before architecture.
|
|
23
|
+
|
|
24
|
+
**Agent Behavior:**
|
|
25
|
+
|
|
26
|
+
- Confirm full plan before execution.
|
|
27
|
+
- Optimize code for AI readability & context efficiency.
|
|
28
|
+
- Prefer explicit structure to implicit behavior.
|
|
29
|
+
|
|
30
|
+
**Execution Safety:**
|
|
31
|
+
|
|
32
|
+
- Run tests after logic changes.
|
|
33
|
+
- Browser only for read-only verification.
|
|
34
|
+
- Never execute destructive system commands.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: glob
|
|
3
|
+
glob: python-venv-guide
|
|
4
|
+
globs: *.py
|
|
5
|
+
description: enforce Python 3, virtual environments, and Poetry for dependency management
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Python Venv & Poetry Rule
|
|
9
|
+
|
|
10
|
+
**Rules:**
|
|
11
|
+
|
|
12
|
+
- Use Python 3 in a project-specific venv (`.venv_projectname`).
|
|
13
|
+
- Activate venv before running code/tests.
|
|
14
|
+
- Initialize project structure with `src/` directory and place all code files inside it.
|
|
15
|
+
- Install and manage all dependencies via Poetry (`poetry add/install/update`).
|
|
16
|
+
- Commit `pyproject.toml` and `poetry.lock`.
|
|
17
|
+
- Ignore `.venv_projectname/` in Git.
|
|
18
|
+
|
|
19
|
+
**Violations:**
|
|
20
|
+
|
|
21
|
+
- Running code outside venv.
|
|
22
|
+
- Installing packages globally.
|
|
23
|
+
- Not using Poetry for dependency management.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: model_decision
|
|
3
|
+
glob: security-guide
|
|
4
|
+
description: enforce secrets handling, input validation, and least privilege
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Rule
|
|
8
|
+
|
|
9
|
+
**Rules:**
|
|
10
|
+
|
|
11
|
+
- Never hardcode secrets or credentials.
|
|
12
|
+
- Validate all external input (API, DB, files).
|
|
13
|
+
- Use Bearer Auth in headers.
|
|
14
|
+
- Apply the least privilege for DB, API, files.
|
|
15
|
+
- Encrypt sensitive data in transit and at rest.
|
|
16
|
+
- Audit and sanitize logs to avoid secrets leakage.
|
|
17
|
+
|
|
18
|
+
**Violations:**
|
|
19
|
+
|
|
20
|
+
- Raw secrets in code.
|
|
21
|
+
- Unvalidated user input.
|
|
22
|
+
- Elevated privileges without justification.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
glob: svt-test-guide
|
|
4
|
+
description: enforce simultaneous user/system tests on simplified data
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Rule — SVT Test
|
|
8
|
+
|
|
9
|
+
**Purpose:** Verify system stability under concurrent usage.
|
|
10
|
+
|
|
11
|
+
- Run N users/systems on simple data.
|
|
12
|
+
- Simulate load (e.g., Locust for FastAPI).
|
|
13
|
+
- Check outputs and service logs.
|
|
14
|
+
- Run via Makefile: `make svt-test`.
|
|
15
|
+
- Must **not** be confused with unit tests.
|
|
16
|
+
|
|
17
|
+
**Violations:** Missing SVT test, logs contain errors, concurrency failures.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
glob: testing-ci-guide
|
|
4
|
+
description: enforce unit, integration, and e2e testing with formatting and deployment checks
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Testing & CI Rule
|
|
8
|
+
|
|
9
|
+
**Rules:**
|
|
10
|
+
|
|
11
|
+
- Every new code file must have a corresponding unit test file.
|
|
12
|
+
- Run formatting & linting and fix until passed.
|
|
13
|
+
- Run unit tests and ensure coverage meets the required threshold (default ≥70%). Add tests for positive/negative scenarios.
|
|
14
|
+
- Start dependent services and ensure logs are clean.
|
|
15
|
+
- Apply migrations without errors.
|
|
16
|
+
- Develop blackbox e2e-test with input data; full API scenario must pass.
|
|
17
|
+
|
|
18
|
+
**Violations:**
|
|
19
|
+
|
|
20
|
+
- Missing unit tests.
|
|
21
|
+
- Coverage below threshold.
|
|
22
|
+
- Format/lint errors not fixed.
|
|
23
|
+
- Service logs contain errors.
|
|
24
|
+
- Migrations fail.
|
|
25
|
+
- E2E test fails.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-design-principles
|
|
3
|
+
type: skill
|
|
4
|
+
description: REST API design decisions — URL conventions, error contracts, versioning, pagination, idempotency, auth patterns.
|
|
5
|
+
related-rules:
|
|
6
|
+
- api-design-guide.md
|
|
7
|
+
- security-guide.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# API Design Principles Skill
|
|
12
|
+
|
|
13
|
+
> Practical reference for consistent, production-ready API design decisions.
|
|
14
|
+
|
|
15
|
+
## URL & Method Conventions
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
✅ Plural nouns, kebab-case, resource hierarchy max 2 levels
|
|
19
|
+
GET /users/{id}
|
|
20
|
+
POST /orders
|
|
21
|
+
PATCH /orders/{id}
|
|
22
|
+
DELETE /orders/{id}
|
|
23
|
+
POST /orders/{id}/cancel ← actions as sub-resource verbs
|
|
24
|
+
|
|
25
|
+
❌ Verbs in base path
|
|
26
|
+
POST /createOrder
|
|
27
|
+
GET /getUser?id=123
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Operation | Method | Success code |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Create | POST | 201 |
|
|
33
|
+
| Read | GET | 200 |
|
|
34
|
+
| Full update | PUT | 200 |
|
|
35
|
+
| Partial update | PATCH | 200 |
|
|
36
|
+
| Delete | DELETE | 204 |
|
|
37
|
+
| Async action | POST | 202 |
|
|
38
|
+
|
|
39
|
+
## Standard Error Contract
|
|
40
|
+
|
|
41
|
+
Every error must follow the same shape — never return raw exception messages.
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"error": {
|
|
46
|
+
"code": "ORDER_NOT_FOUND",
|
|
47
|
+
"message": "Order ord_123 not found",
|
|
48
|
+
"details": [{ "field": "items[0].quantity", "issue": "must be > 0" }],
|
|
49
|
+
"request_id": "req_abc123"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
# FastAPI
|
|
56
|
+
raise HTTPException(
|
|
57
|
+
status_code=404,
|
|
58
|
+
detail={"code": "ORDER_NOT_FOUND", "message": f"Order {id} not found",
|
|
59
|
+
"request_id": request.state.request_id}
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Pagination
|
|
64
|
+
|
|
65
|
+
**Cursor-based** — preferred for live/large datasets:
|
|
66
|
+
```python
|
|
67
|
+
class PaginatedResponse(BaseModel, Generic[T]):
|
|
68
|
+
items: List[T]
|
|
69
|
+
next_cursor: Optional[str] = None # base64-encoded, opaque to client
|
|
70
|
+
|
|
71
|
+
def encode_cursor(last_id: int) -> str:
|
|
72
|
+
return base64.b64encode(str(last_id).encode()).decode()
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Offset-based** — only for small static datasets where total count is cheap.
|
|
76
|
+
|
|
77
|
+
## Versioning
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
URL versioning for breaking changes: /api/v1/orders → /api/v2/orders
|
|
81
|
+
Header for minor variations: Accept: application/vnd.myapi.v2+json
|
|
82
|
+
|
|
83
|
+
Rules:
|
|
84
|
+
- v1 stays alive ≥ 6 months after v2 launch
|
|
85
|
+
- Deprecated: return Deprecation: true + Sunset: <date> headers
|
|
86
|
+
- Never remove a field without a major version bump
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Idempotency (POST mutations)
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
@router.post("/orders", status_code=201)
|
|
93
|
+
async def create_order(
|
|
94
|
+
body: CreateOrderRequest,
|
|
95
|
+
idempotency_key: Optional[str] = Header(None, alias="X-Idempotency-Key"),
|
|
96
|
+
):
|
|
97
|
+
if idempotency_key:
|
|
98
|
+
cached = await redis.get(f"idempotency:{idempotency_key}")
|
|
99
|
+
if cached:
|
|
100
|
+
return JSONResponse(json.loads(cached), status_code=200)
|
|
101
|
+
|
|
102
|
+
order = await order_service.create(body)
|
|
103
|
+
|
|
104
|
+
if idempotency_key:
|
|
105
|
+
await redis.setex(f"idempotency:{idempotency_key}", 86400, order.model_dump_json())
|
|
106
|
+
return order
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Security Checklist
|
|
110
|
+
|
|
111
|
+
- [ ] Auth middleware applied before handler — never inside handler
|
|
112
|
+
- [ ] Ownership check: `if resource.owner_id != current_user.id: raise 403`
|
|
113
|
+
- [ ] All inputs validated via Pydantic/Zod before use
|
|
114
|
+
- [ ] Rate limiting on public + auth endpoints
|
|
115
|
+
- [ ] No secrets or PII in URL parameters
|
|
116
|
+
- [ ] CORS: no `allow_origins=["*"]` in production
|
|
117
|
+
- [ ] Response never leaks internal IDs, stack traces, or system paths
|
|
118
|
+
|
|
119
|
+
## Response Design Checklist
|
|
120
|
+
|
|
121
|
+
- [ ] Consistent envelope: `{ data: T }` or flat — choose one, never mix
|
|
122
|
+
- [ ] Dates always ISO 8601 with timezone: `2024-03-15T14:30:00Z`
|
|
123
|
+
- [ ] Monetary values: string decimal or integer cents — never float
|
|
124
|
+
- [ ] Nullable fields explicit in schema (not absent)
|
|
125
|
+
- [ ] List responses always return array, never `null` when empty
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# API Design Checklist
|
|
2
|
+
|
|
3
|
+
## Pre-Implementation Review
|
|
4
|
+
|
|
5
|
+
### Resource Design
|
|
6
|
+
|
|
7
|
+
- [ ] Resources are nouns, not verbs
|
|
8
|
+
- [ ] Plural names for collections
|
|
9
|
+
- [ ] Consistent naming across all endpoints
|
|
10
|
+
- [ ] Clear resource hierarchy (avoid deep nesting >2 levels)
|
|
11
|
+
- [ ] All CRUD operations properly mapped to HTTP methods
|
|
12
|
+
|
|
13
|
+
### HTTP Methods
|
|
14
|
+
|
|
15
|
+
- [ ] GET for retrieval (safe, idempotent)
|
|
16
|
+
- [ ] POST for creation
|
|
17
|
+
- [ ] PUT for full replacement (idempotent)
|
|
18
|
+
- [ ] PATCH for partial updates
|
|
19
|
+
- [ ] DELETE for removal (idempotent)
|
|
20
|
+
|
|
21
|
+
### Status Codes
|
|
22
|
+
|
|
23
|
+
- [ ] 200 OK for successful GET/PATCH/PUT
|
|
24
|
+
- [ ] 201 Created for POST
|
|
25
|
+
- [ ] 204 No Content for DELETE
|
|
26
|
+
- [ ] 400 Bad Request for malformed requests
|
|
27
|
+
- [ ] 401 Unauthorized for missing auth
|
|
28
|
+
- [ ] 403 Forbidden for insufficient permissions
|
|
29
|
+
- [ ] 404 Not Found for missing resources
|
|
30
|
+
- [ ] 422 Unprocessable Entity for validation errors
|
|
31
|
+
- [ ] 429 Too Many Requests for rate limiting
|
|
32
|
+
- [ ] 500 Internal Server Error for server issues
|
|
33
|
+
|
|
34
|
+
### Pagination
|
|
35
|
+
|
|
36
|
+
- [ ] All collection endpoints paginated
|
|
37
|
+
- [ ] Default page size defined (e.g., 20)
|
|
38
|
+
- [ ] Maximum page size enforced (e.g., 100)
|
|
39
|
+
- [ ] Pagination metadata included (total, pages, etc.)
|
|
40
|
+
- [ ] Cursor-based or offset-based pattern chosen
|
|
41
|
+
|
|
42
|
+
### Filtering & Sorting
|
|
43
|
+
|
|
44
|
+
- [ ] Query parameters for filtering
|
|
45
|
+
- [ ] Sort parameter supported
|
|
46
|
+
- [ ] Search parameter for full-text search
|
|
47
|
+
- [ ] Field selection supported (sparse fieldsets)
|
|
48
|
+
|
|
49
|
+
### Versioning
|
|
50
|
+
|
|
51
|
+
- [ ] Versioning strategy defined (URL/header/query)
|
|
52
|
+
- [ ] Version included in all endpoints
|
|
53
|
+
- [ ] Deprecation policy documented
|
|
54
|
+
|
|
55
|
+
### Error Handling
|
|
56
|
+
|
|
57
|
+
- [ ] Consistent error response format
|
|
58
|
+
- [ ] Detailed error messages
|
|
59
|
+
- [ ] Field-level validation errors
|
|
60
|
+
- [ ] Error codes for client handling
|
|
61
|
+
- [ ] Timestamps in error responses
|
|
62
|
+
|
|
63
|
+
### Authentication & Authorization
|
|
64
|
+
|
|
65
|
+
- [ ] Authentication method defined (Bearer token, API key)
|
|
66
|
+
- [ ] Authorization checks on all endpoints
|
|
67
|
+
- [ ] 401 vs 403 used correctly
|
|
68
|
+
- [ ] Token expiration handled
|
|
69
|
+
|
|
70
|
+
### Rate Limiting
|
|
71
|
+
|
|
72
|
+
- [ ] Rate limits defined per endpoint/user
|
|
73
|
+
- [ ] Rate limit headers included
|
|
74
|
+
- [ ] 429 status code for exceeded limits
|
|
75
|
+
- [ ] Retry-After header provided
|
|
76
|
+
|
|
77
|
+
### Documentation
|
|
78
|
+
|
|
79
|
+
- [ ] OpenAPI/Swagger spec generated
|
|
80
|
+
- [ ] All endpoints documented
|
|
81
|
+
- [ ] Request/response examples provided
|
|
82
|
+
- [ ] Error responses documented
|
|
83
|
+
- [ ] Authentication flow documented
|
|
84
|
+
|
|
85
|
+
### Testing
|
|
86
|
+
|
|
87
|
+
- [ ] Unit tests for business logic
|
|
88
|
+
- [ ] Integration tests for endpoints
|
|
89
|
+
- [ ] Error scenarios tested
|
|
90
|
+
- [ ] Edge cases covered
|
|
91
|
+
- [ ] Performance tests for heavy endpoints
|
|
92
|
+
|
|
93
|
+
### Security
|
|
94
|
+
|
|
95
|
+
- [ ] Input validation on all fields
|
|
96
|
+
- [ ] SQL injection prevention
|
|
97
|
+
- [ ] XSS prevention
|
|
98
|
+
- [ ] CORS configured correctly
|
|
99
|
+
- [ ] HTTPS enforced
|
|
100
|
+
- [ ] Sensitive data not in URLs
|
|
101
|
+
- [ ] No secrets in responses
|
|
102
|
+
|
|
103
|
+
### Performance
|
|
104
|
+
|
|
105
|
+
- [ ] Database queries optimized
|
|
106
|
+
- [ ] N+1 queries prevented
|
|
107
|
+
- [ ] Caching strategy defined
|
|
108
|
+
- [ ] Cache headers set appropriately
|
|
109
|
+
- [ ] Large responses paginated
|
|
110
|
+
|
|
111
|
+
### Monitoring
|
|
112
|
+
|
|
113
|
+
- [ ] Logging implemented
|
|
114
|
+
- [ ] Error tracking configured
|
|
115
|
+
- [ ] Performance metrics collected
|
|
116
|
+
- [ ] Health check endpoint available
|
|
117
|
+
- [ ] Alerts configured for errors
|
|
118
|
+
|
|
119
|
+
## GraphQL-Specific Checks
|
|
120
|
+
|
|
121
|
+
### Schema Design
|
|
122
|
+
|
|
123
|
+
- [ ] Schema-first approach used
|
|
124
|
+
- [ ] Types properly defined
|
|
125
|
+
- [ ] Non-null vs nullable decided
|
|
126
|
+
- [ ] Interfaces/unions used appropriately
|
|
127
|
+
- [ ] Custom scalars defined
|
|
128
|
+
|
|
129
|
+
### Queries
|
|
130
|
+
|
|
131
|
+
- [ ] Query depth limiting
|
|
132
|
+
- [ ] Query complexity analysis
|
|
133
|
+
- [ ] DataLoaders prevent N+1
|
|
134
|
+
- [ ] Pagination pattern chosen (Relay/offset)
|
|
135
|
+
|
|
136
|
+
### Mutations
|
|
137
|
+
|
|
138
|
+
- [ ] Input types defined
|
|
139
|
+
- [ ] Payload types with errors
|
|
140
|
+
- [ ] Optimistic response support
|
|
141
|
+
- [ ] Idempotency considered
|
|
142
|
+
|
|
143
|
+
### Performance
|
|
144
|
+
|
|
145
|
+
- [ ] DataLoader for all relationships
|
|
146
|
+
- [ ] Query batching enabled
|
|
147
|
+
- [ ] Persisted queries considered
|
|
148
|
+
- [ ] Response caching implemented
|
|
149
|
+
|
|
150
|
+
### Documentation
|
|
151
|
+
|
|
152
|
+
- [ ] All fields documented
|
|
153
|
+
- [ ] Deprecations marked
|
|
154
|
+
- [ ] Examples provided
|
|
155
|
+
- [ ] Schema introspection enabled
|