@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,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: accessibility-testing
|
|
3
|
+
type: skill
|
|
4
|
+
description: Run automated WCAG audits, manual keyboard/screen reader testing, and CI a11y gates.
|
|
5
|
+
related-rules:
|
|
6
|
+
- test-strategy.md
|
|
7
|
+
- quality-gates.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Accessibility Testing Skill
|
|
12
|
+
|
|
13
|
+
> **Expertise:** axe-core automation, WCAG 2.1 AA, keyboard testing, screen reader testing (NVDA/VoiceOver), CI gates.
|
|
14
|
+
|
|
15
|
+
## Automated Testing (Playwright + axe-core)
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// tests/a11y/checkout.a11y.spec.ts
|
|
19
|
+
import AxeBuilder from '@axe-core/playwright';
|
|
20
|
+
|
|
21
|
+
test.describe('Checkout a11y', () => {
|
|
22
|
+
test('step 1 address form has no WCAG AA violations', async ({ page }) => {
|
|
23
|
+
await page.goto('/checkout/address');
|
|
24
|
+
await page.waitForLoadState('networkidle'); // Wait for dynamic content
|
|
25
|
+
|
|
26
|
+
const results = await new AxeBuilder({ page })
|
|
27
|
+
.withTags(['wcag2a', 'wcag2aa', 'wcag21aa'])
|
|
28
|
+
.exclude('#third-party-widget') // Exclude known third-party violations
|
|
29
|
+
.analyze();
|
|
30
|
+
|
|
31
|
+
// Report violations with full context for easier debugging
|
|
32
|
+
if (results.violations.length > 0) {
|
|
33
|
+
const report = results.violations.map(v => ({
|
|
34
|
+
id: v.id,
|
|
35
|
+
impact: v.impact,
|
|
36
|
+
description: v.description,
|
|
37
|
+
elements: v.nodes.map(n => n.html).slice(0, 3),
|
|
38
|
+
}));
|
|
39
|
+
console.log(JSON.stringify(report, null, 2));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Block on critical/serious only; log moderate/minor as warnings
|
|
43
|
+
const blocking = results.violations.filter(
|
|
44
|
+
v => v.impact === 'critical' || v.impact === 'serious'
|
|
45
|
+
);
|
|
46
|
+
expect(blocking).toHaveLength(0);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('form inputs all have associated labels', async ({ page }) => {
|
|
50
|
+
await page.goto('/checkout/address');
|
|
51
|
+
const results = await new AxeBuilder({ page })
|
|
52
|
+
.withRules(['label', 'label-content-name-mismatch'])
|
|
53
|
+
.analyze();
|
|
54
|
+
expect(results.violations).toHaveLength(0);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Keyboard Navigation Checklist (Manual)
|
|
60
|
+
|
|
61
|
+
Run this checklist on every new feature with interactive elements:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Tab order:
|
|
65
|
+
[ ] Tab key moves focus through all interactive elements in visual order
|
|
66
|
+
[ ] Focus never gets trapped (except modals — see below)
|
|
67
|
+
[ ] Focus is always visible (never hidden by CSS outline: none)
|
|
68
|
+
|
|
69
|
+
Activation:
|
|
70
|
+
[ ] Buttons activate with Enter and Space
|
|
71
|
+
[ ] Links activate with Enter only
|
|
72
|
+
[ ] Select/dropdown navigates with Arrow keys
|
|
73
|
+
|
|
74
|
+
Modal dialogs:
|
|
75
|
+
[ ] Focus moves to modal when it opens
|
|
76
|
+
[ ] Tab is trapped inside modal while open
|
|
77
|
+
[ ] Escape key closes modal
|
|
78
|
+
[ ] Focus returns to the trigger element when modal closes
|
|
79
|
+
|
|
80
|
+
Forms:
|
|
81
|
+
[ ] Each input has a visible label (not just placeholder)
|
|
82
|
+
[ ] Error messages are associated with their input (aria-describedby)
|
|
83
|
+
[ ] Required fields marked with aria-required="true"
|
|
84
|
+
[ ] Submit activates with Enter from any field
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Screen Reader Testing (Quick Reference)
|
|
88
|
+
|
|
89
|
+
### VoiceOver (macOS/iOS)
|
|
90
|
+
```
|
|
91
|
+
Enable: Cmd + F5
|
|
92
|
+
Navigate: VO + Right (next element), VO + Left (previous)
|
|
93
|
+
Forms: VO + Shift + Down (enter form mode)
|
|
94
|
+
Tables: VO + Shift + Right/Left (navigate columns)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### NVDA (Windows — free)
|
|
98
|
+
```
|
|
99
|
+
Download: nvaccess.org/download
|
|
100
|
+
Navigate: Tab (interactive), H (headings), F (forms), L (lists)
|
|
101
|
+
Test: Browse mode (default) vs. Forms mode (Enter to switch)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Things to verify with screen reader:
|
|
105
|
+
- [ ] Page title is descriptive and unique
|
|
106
|
+
- [ ] Headings form a logical hierarchy (h1 → h2 → h3)
|
|
107
|
+
- [ ] Images have meaningful alt text (or alt="" for decorative)
|
|
108
|
+
- [ ] Error messages read aloud when form submitted with errors
|
|
109
|
+
- [ ] Dynamic content changes (toast notifications) announced via `aria-live`
|
|
110
|
+
- [ ] Form field labels and error messages read together
|
|
111
|
+
|
|
112
|
+
## CI Integration
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
# .github/workflows/a11y.yml
|
|
116
|
+
a11y:
|
|
117
|
+
steps:
|
|
118
|
+
- name: Run accessibility audit
|
|
119
|
+
run: npx playwright test tests/a11y/ --reporter=html
|
|
120
|
+
- name: Upload report
|
|
121
|
+
uses: actions/upload-artifact@v4
|
|
122
|
+
with:
|
|
123
|
+
name: a11y-report
|
|
124
|
+
path: playwright-report/
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## WCAG 2.1 AA Quick Reference
|
|
128
|
+
|
|
129
|
+
| Criterion | Level | What it means |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| 1.1.1 Non-text content | A | Images need alt text |
|
|
132
|
+
| 1.3.1 Info & Relationships | A | Structure conveyed programmatically |
|
|
133
|
+
| 1.4.3 Contrast (Minimum) | AA | 4.5:1 normal text, 3:1 large text |
|
|
134
|
+
| 2.1.1 Keyboard | A | All functionality keyboard accessible |
|
|
135
|
+
| 2.4.3 Focus Order | A | Focus order preserves meaning |
|
|
136
|
+
| 2.4.7 Focus Visible | AA | Keyboard focus always visible |
|
|
137
|
+
| 3.3.1 Error Identification | A | Errors described in text |
|
|
138
|
+
| 3.3.2 Labels or Instructions | A | Form inputs have labels |
|
|
139
|
+
| 4.1.2 Name, Role, Value | A | UI components have accessible names |
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-testing
|
|
3
|
+
type: skill
|
|
4
|
+
description: Write API integration tests and consumer-driven contract tests (Pact) for service boundaries.
|
|
5
|
+
related-rules:
|
|
6
|
+
- test-strategy.md
|
|
7
|
+
- test-data.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# API Testing Patterns Skill
|
|
12
|
+
|
|
13
|
+
> **Expertise:** API integration tests (supertest/httpx), contract testing (Pact), auth flows, error path coverage.
|
|
14
|
+
|
|
15
|
+
## Integration Test Structure (FastAPI/httpx)
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import pytest
|
|
19
|
+
import pytest_asyncio
|
|
20
|
+
from httpx import AsyncClient
|
|
21
|
+
|
|
22
|
+
# conftest.py — reusable fixtures
|
|
23
|
+
@pytest_asyncio.fixture
|
|
24
|
+
async def client(app, db_session) -> AsyncClient:
|
|
25
|
+
async with AsyncClient(app=app, base_url="http://test") as c:
|
|
26
|
+
yield c
|
|
27
|
+
|
|
28
|
+
@pytest_asyncio.fixture
|
|
29
|
+
async def auth_client(client, create_user) -> AsyncClient:
|
|
30
|
+
user = await create_user(role="viewer")
|
|
31
|
+
response = await client.post("/auth/token",
|
|
32
|
+
data={"username": user.email, "password": "test_password"})
|
|
33
|
+
token = response.json()["access_token"]
|
|
34
|
+
client.headers["Authorization"] = f"Bearer {token}"
|
|
35
|
+
return client
|
|
36
|
+
|
|
37
|
+
# Test — covers happy path + all error cases
|
|
38
|
+
class TestCreateOrder:
|
|
39
|
+
async def test_creates_order_for_authenticated_user(self, auth_client, product_factory):
|
|
40
|
+
product = await product_factory(price="29.99", stock=10)
|
|
41
|
+
|
|
42
|
+
response = await auth_client.post("/api/v1/orders", json={
|
|
43
|
+
"items": [{"product_id": product.id, "quantity": 2}]
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
assert response.status_code == 201
|
|
47
|
+
body = response.json()
|
|
48
|
+
assert body["status"] == "pending"
|
|
49
|
+
assert body["total_amount"] == "59.98"
|
|
50
|
+
assert body["id"].startswith("ord_")
|
|
51
|
+
|
|
52
|
+
async def test_returns_401_without_auth(self, client):
|
|
53
|
+
response = await client.post("/api/v1/orders", json={"items": []})
|
|
54
|
+
assert response.status_code == 401
|
|
55
|
+
|
|
56
|
+
async def test_returns_400_when_product_out_of_stock(self, auth_client, product_factory):
|
|
57
|
+
product = await product_factory(stock=0)
|
|
58
|
+
response = await auth_client.post("/api/v1/orders", json={
|
|
59
|
+
"items": [{"product_id": product.id, "quantity": 1}]
|
|
60
|
+
})
|
|
61
|
+
assert response.status_code == 400
|
|
62
|
+
assert response.json()["error"]["code"] == "PRODUCT_OUT_OF_STOCK"
|
|
63
|
+
|
|
64
|
+
async def test_returns_404_for_nonexistent_product(self, auth_client):
|
|
65
|
+
response = await auth_client.post("/api/v1/orders", json={
|
|
66
|
+
"items": [{"product_id": "prod_nonexistent", "quantity": 1}]
|
|
67
|
+
})
|
|
68
|
+
assert response.status_code == 404
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Error Coverage Checklist (Per Endpoint)
|
|
72
|
+
|
|
73
|
+
Every endpoint must have tests for:
|
|
74
|
+
- [ ] 200/201 happy path with valid input
|
|
75
|
+
- [ ] 401 — missing or invalid auth token
|
|
76
|
+
- [ ] 403 — authenticated but not authorized (wrong role or not owner)
|
|
77
|
+
- [ ] 404 — resource not found
|
|
78
|
+
- [ ] 400/422 — validation errors (missing required field, wrong type, out of range)
|
|
79
|
+
- [ ] 409 — conflict (duplicate, wrong state transition)
|
|
80
|
+
- [ ] Idempotency (if applicable) — same request twice returns same result
|
|
81
|
+
|
|
82
|
+
## Contract Testing (Pact)
|
|
83
|
+
|
|
84
|
+
Use when: two services are developed by different teams and must agree on API shape.
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# consumer side (frontend/service-b defines expectations)
|
|
88
|
+
from pact import Consumer, Provider
|
|
89
|
+
|
|
90
|
+
pact = Consumer("order-consumer").has_pact_with(Provider("order-service"))
|
|
91
|
+
|
|
92
|
+
def test_get_order_contract():
|
|
93
|
+
expected = {
|
|
94
|
+
"id": "ord_123",
|
|
95
|
+
"status": "pending",
|
|
96
|
+
"total_amount": Term(r"^\d+\.\d{2}$", "59.98"),
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
(pact
|
|
100
|
+
.given("order ord_123 exists")
|
|
101
|
+
.upon_receiving("a request to get order ord_123")
|
|
102
|
+
.with_request("GET", "/api/v1/orders/ord_123")
|
|
103
|
+
.will_respond_with(200, body=Like(expected)))
|
|
104
|
+
|
|
105
|
+
with pact:
|
|
106
|
+
response = order_api_client.get_order("ord_123")
|
|
107
|
+
assert response["status"] == "pending"
|
|
108
|
+
# Pact saves contract to pacts/ directory
|
|
109
|
+
|
|
110
|
+
# Provider side verifies against saved pact file
|
|
111
|
+
# Run in CI after consumer tests generate pact files
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Pagination Testing Pattern
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
async def test_list_orders_pagination(auth_client, order_factory):
|
|
118
|
+
# Create 25 orders for cursor-based pagination test
|
|
119
|
+
orders = [await order_factory(user_id=current_user.id) for _ in range(25)]
|
|
120
|
+
|
|
121
|
+
# First page
|
|
122
|
+
response = await auth_client.get("/api/v1/orders?limit=10")
|
|
123
|
+
assert response.status_code == 200
|
|
124
|
+
body = response.json()
|
|
125
|
+
assert len(body["items"]) == 10
|
|
126
|
+
assert body["next_cursor"] is not None
|
|
127
|
+
|
|
128
|
+
# Second page using cursor
|
|
129
|
+
response2 = await auth_client.get(f"/api/v1/orders?limit=10&cursor={body['next_cursor']}")
|
|
130
|
+
assert len(response2.json()["items"]) == 10
|
|
131
|
+
# Items should not overlap with first page
|
|
132
|
+
first_ids = {o["id"] for o in body["items"]}
|
|
133
|
+
second_ids = {o["id"] for o in response2.json()["items"]}
|
|
134
|
+
assert first_ids.isdisjoint(second_ids)
|
|
135
|
+
|
|
136
|
+
# Last page — fewer items, no next cursor
|
|
137
|
+
response3 = await auth_client.get(f"/api/v1/orders?limit=10&cursor={response2.json()['next_cursor']}")
|
|
138
|
+
assert len(response3.json()["items"]) == 5
|
|
139
|
+
assert response3.json()["next_cursor"] is None
|
|
140
|
+
```
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: e2e-patterns
|
|
3
|
+
type: skill
|
|
4
|
+
description: Write robust E2E tests with Playwright — page objects, resilient waiting, auth, and CI integration.
|
|
5
|
+
related-rules:
|
|
6
|
+
- test-strategy.md
|
|
7
|
+
- flakiness-policy.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# E2E Testing Patterns (Playwright) Skill
|
|
12
|
+
|
|
13
|
+
> **Expertise:** Playwright page objects, resilient locators, auth fixtures, parallel execution, CI configuration.
|
|
14
|
+
|
|
15
|
+
## Page Object Model
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// pages/OrderPage.ts
|
|
19
|
+
export class OrderPage {
|
|
20
|
+
readonly page: Page;
|
|
21
|
+
|
|
22
|
+
constructor(page: Page) {
|
|
23
|
+
this.page = page;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// ✅ Role-based locators — resilient to CSS changes + tests a11y
|
|
27
|
+
get orderItems() { return this.page.getByRole('listitem', { name: /order item/i }); }
|
|
28
|
+
get submitButton() { return this.page.getByRole('button', { name: 'Place order' }); }
|
|
29
|
+
get confirmationMessage() { return this.page.getByText('Order confirmed'); }
|
|
30
|
+
|
|
31
|
+
async addItem(productName: string, quantity: number) {
|
|
32
|
+
await this.page.getByLabel('Product').selectOption(productName);
|
|
33
|
+
await this.page.getByLabel('Quantity').fill(String(quantity));
|
|
34
|
+
await this.page.getByRole('button', { name: 'Add to cart' }).click();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async checkout(address: Address) {
|
|
38
|
+
await this.page.getByLabel('Street').fill(address.street);
|
|
39
|
+
await this.page.getByLabel('City').fill(address.city);
|
|
40
|
+
await this.submitButton.click();
|
|
41
|
+
await expect(this.confirmationMessage).toBeVisible({ timeout: 10000 });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Resilient Waiting — Never Use `sleep`
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// ❌ Arbitrary sleep — flaky and slow
|
|
50
|
+
await page.waitForTimeout(2000);
|
|
51
|
+
|
|
52
|
+
// ✅ Wait for specific condition
|
|
53
|
+
await page.waitForURL('**/dashboard');
|
|
54
|
+
await expect(page.getByText('Welcome back')).toBeVisible();
|
|
55
|
+
|
|
56
|
+
// ✅ Wait for network request to complete
|
|
57
|
+
await Promise.all([
|
|
58
|
+
page.waitForResponse(resp => resp.url().includes('/api/orders') && resp.status() === 201),
|
|
59
|
+
page.getByRole('button', { name: 'Place order' }).click(),
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
// ✅ Wait for element to reach a specific state
|
|
63
|
+
await expect(page.getByRole('status')).toHaveText('Processing...', { timeout: 5000 });
|
|
64
|
+
await expect(page.getByRole('status')).toHaveText('Complete', { timeout: 30000 });
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Authentication Fixture (Reuse Across Tests)
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// fixtures/auth.ts — store session state, avoid re-logging in per test
|
|
71
|
+
import { test as base } from '@playwright/test';
|
|
72
|
+
|
|
73
|
+
export const test = base.extend<{ authenticatedPage: Page }>({
|
|
74
|
+
authenticatedPage: async ({ browser }, use) => {
|
|
75
|
+
// Load stored auth state (set up once with `playwright auth`)
|
|
76
|
+
const context = await browser.newContext({
|
|
77
|
+
storageState: 'tests/.auth/user.json',
|
|
78
|
+
});
|
|
79
|
+
const page = await context.newPage();
|
|
80
|
+
await use(page);
|
|
81
|
+
await context.close();
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// Set up auth state (run once before test suite)
|
|
86
|
+
// playwright.config.ts globalSetup points to this
|
|
87
|
+
export async function setupAuth() {
|
|
88
|
+
const browser = await chromium.launch();
|
|
89
|
+
const page = await browser.newPage();
|
|
90
|
+
await page.goto('/login');
|
|
91
|
+
await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!);
|
|
92
|
+
await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!);
|
|
93
|
+
await page.getByRole('button', { name: 'Sign in' }).click();
|
|
94
|
+
await page.waitForURL('**/dashboard');
|
|
95
|
+
await page.context().storageState({ path: 'tests/.auth/user.json' });
|
|
96
|
+
await browser.close();
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Playwright Config (CI-Ready)
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// playwright.config.ts
|
|
104
|
+
export default defineConfig({
|
|
105
|
+
testDir: './tests/e2e',
|
|
106
|
+
fullyParallel: true,
|
|
107
|
+
retries: process.env.CI ? 2 : 0, // Retry on CI only
|
|
108
|
+
workers: process.env.CI ? 4 : 2,
|
|
109
|
+
timeout: 30000,
|
|
110
|
+
|
|
111
|
+
reporter: [
|
|
112
|
+
['html', { outputFolder: 'test-results/html' }],
|
|
113
|
+
['junit', { outputFile: 'test-results/junit.xml' }], // For CI parsing
|
|
114
|
+
],
|
|
115
|
+
|
|
116
|
+
use: {
|
|
117
|
+
baseURL: process.env.E2E_BASE_URL || 'http://localhost:3000',
|
|
118
|
+
trace: 'on-first-retry', // Capture trace on failure
|
|
119
|
+
screenshot: 'only-on-failure',
|
|
120
|
+
video: 'retain-on-failure',
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
projects: [
|
|
124
|
+
{ name: 'setup', testMatch: /global.setup.ts/ },
|
|
125
|
+
{
|
|
126
|
+
name: 'chromium',
|
|
127
|
+
dependencies: ['setup'],
|
|
128
|
+
use: { ...devices['Desktop Chrome'], storageState: 'tests/.auth/user.json' },
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Flakiness Prevention Checklist
|
|
135
|
+
|
|
136
|
+
- [ ] No `waitForTimeout` — all waits target specific conditions
|
|
137
|
+
- [ ] Test data created fresh per test (factory functions, not shared fixtures)
|
|
138
|
+
- [ ] Tests don't depend on order (can run in any sequence)
|
|
139
|
+
- [ ] Network requests mocked when testing UI-only behavior
|
|
140
|
+
- [ ] Assertions use `toBeVisible()` not `isVisible()` — auto-waits
|
|
141
|
+
- [ ] `retries: 2` in CI config catches transient infrastructure failures (not logic bugs)
|
|
142
|
+
|
|
143
|
+
## Locator Priority (Most to Least Resilient)
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
1. getByRole() — semantic, tests a11y
|
|
147
|
+
2. getByLabel() — form elements
|
|
148
|
+
3. getByText() — visible text
|
|
149
|
+
4. getByTestId() — data-testid attribute (explicit contract)
|
|
150
|
+
5. locator('css') — fragile, avoid
|
|
151
|
+
6. locator('xpath') — most fragile, never use
|
|
152
|
+
```
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: performance-testing
|
|
3
|
+
type: skill
|
|
4
|
+
description: Design and execute load/stress tests with k6, establish SLO baselines, and identify bottlenecks.
|
|
5
|
+
related-rules:
|
|
6
|
+
- quality-gates.md
|
|
7
|
+
- test-strategy.md
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Performance Testing Skill (k6)
|
|
12
|
+
|
|
13
|
+
> **Expertise:** k6 load/stress/soak tests, SLO baselines, threshold gates, bottleneck identification, CI integration.
|
|
14
|
+
|
|
15
|
+
## Test Type Selection
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Load test → Validate behavior at expected production traffic (steady state)
|
|
19
|
+
Stress test → Find breaking point; gradually increase load until failure
|
|
20
|
+
Soak test → Detect memory leaks / degradation over time (run 1-8 hours)
|
|
21
|
+
Spike test → Simulate sudden traffic burst (10x normal in seconds)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## k6 Load Test Template
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
// tests/performance/create-order.k6.js
|
|
28
|
+
import http from 'k6/http';
|
|
29
|
+
import { check, sleep } from 'k6';
|
|
30
|
+
import { Trend, Counter } from 'k6/metrics';
|
|
31
|
+
|
|
32
|
+
const orderCreationDuration = new Trend('order_creation_duration');
|
|
33
|
+
const failedOrders = new Counter('failed_orders');
|
|
34
|
+
|
|
35
|
+
export const options = {
|
|
36
|
+
stages: [
|
|
37
|
+
{ duration: '2m', target: 50 }, // Ramp up
|
|
38
|
+
{ duration: '5m', target: 50 }, // Steady state
|
|
39
|
+
{ duration: '2m', target: 200 }, // Stress
|
|
40
|
+
{ duration: '2m', target: 0 }, // Ramp down
|
|
41
|
+
],
|
|
42
|
+
thresholds: {
|
|
43
|
+
// These are your SLO gates — CI fails if breached
|
|
44
|
+
http_req_duration: ['p(95)<500', 'p(99)<2000'],
|
|
45
|
+
http_req_failed: ['rate<0.01'], // < 1% errors
|
|
46
|
+
order_creation_duration: ['p(99)<3000'],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const BASE_URL = __ENV.BASE_URL || 'http://localhost:8000';
|
|
51
|
+
|
|
52
|
+
export function setup() {
|
|
53
|
+
// Create test auth token once before load test
|
|
54
|
+
const res = http.post(`${BASE_URL}/auth/token`, JSON.stringify({
|
|
55
|
+
username: 'loadtest@example.com', password: __ENV.TEST_PASSWORD,
|
|
56
|
+
}), { headers: { 'Content-Type': 'application/json' } });
|
|
57
|
+
return { token: res.json('access_token') };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default function (data) {
|
|
61
|
+
const headers = {
|
|
62
|
+
'Authorization': `Bearer ${data.token}`,
|
|
63
|
+
'Content-Type': 'application/json',
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const start = Date.now();
|
|
67
|
+
const res = http.post(
|
|
68
|
+
`${BASE_URL}/api/v1/orders`,
|
|
69
|
+
JSON.stringify({ items: [{ product_id: 'prod_123', quantity: 1 }] }),
|
|
70
|
+
{ headers },
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
orderCreationDuration.add(Date.now() - start);
|
|
74
|
+
|
|
75
|
+
const ok = check(res, {
|
|
76
|
+
'status is 201': (r) => r.status === 201,
|
|
77
|
+
'has order id': (r) => r.json('id') !== undefined,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
if (!ok) failedOrders.add(1);
|
|
81
|
+
|
|
82
|
+
sleep(1); // Think time between requests
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## SLO Baseline Process
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# 1. Run baseline on known-good release
|
|
90
|
+
k6 run --env BASE_URL=https://staging.myapp.com tests/performance/create-order.k6.js \
|
|
91
|
+
--out json=results/baseline-$(date +%Y%m%d).json
|
|
92
|
+
|
|
93
|
+
# 2. Extract key metrics
|
|
94
|
+
k6 stats results/baseline-$(date +%Y%m%d).json | jq '{
|
|
95
|
+
p50: .metrics.http_req_duration.values["p(50)"],
|
|
96
|
+
p95: .metrics.http_req_duration.values["p(95)"],
|
|
97
|
+
p99: .metrics.http_req_duration.values["p(99)"],
|
|
98
|
+
error_rate: .metrics.http_req_failed.values.rate
|
|
99
|
+
}'
|
|
100
|
+
|
|
101
|
+
# 3. Store in performance-baselines.json
|
|
102
|
+
# 4. On each release candidate: compare vs. baseline
|
|
103
|
+
# - p99 regression > 20% → block deploy
|
|
104
|
+
# - p99 regression 10–20% → warning + required justification
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## CI Integration (GitHub Actions)
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
# .github/workflows/perf.yml
|
|
111
|
+
performance:
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- name: Run k6 load test
|
|
116
|
+
uses: grafana/k6-action@v0.3.1
|
|
117
|
+
with:
|
|
118
|
+
filename: tests/performance/create-order.k6.js
|
|
119
|
+
env:
|
|
120
|
+
BASE_URL: ${{ secrets.STAGING_URL }}
|
|
121
|
+
TEST_PASSWORD: ${{ secrets.LOADTEST_PASSWORD }}
|
|
122
|
+
- name: Upload results
|
|
123
|
+
uses: actions/upload-artifact@v4
|
|
124
|
+
with:
|
|
125
|
+
name: k6-results
|
|
126
|
+
path: results/
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Bottleneck Identification
|
|
130
|
+
|
|
131
|
+
After a test run showing latency regression, investigate in this order:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# 1. Check application metrics during test
|
|
135
|
+
# → CPU saturation? (> 80% sustained) → vertical scale or optimize hot path
|
|
136
|
+
# → Memory growing? → potential leak
|
|
137
|
+
# → Goroutines / threads spiking? → connection pool or lock contention
|
|
138
|
+
|
|
139
|
+
# 2. Check DB during load test
|
|
140
|
+
SELECT query, calls, mean_exec_time
|
|
141
|
+
FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 5;
|
|
142
|
+
-- High mean_exec_time on a simple query → missing index
|
|
143
|
+
|
|
144
|
+
# 3. Check connection pool
|
|
145
|
+
SELECT count(*), state FROM pg_stat_activity GROUP BY state;
|
|
146
|
+
-- Many 'idle in transaction' → long transactions not being released
|
|
147
|
+
-- Many 'waiting' → pool too small; increase max_connections or pool size
|
|
148
|
+
|
|
149
|
+
# 4. Check for lock contention
|
|
150
|
+
SELECT pid, wait_event_type, wait_event, query
|
|
151
|
+
FROM pg_stat_activity WHERE wait_event IS NOT NULL;
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Performance Report Template
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
## Performance Test Report — [Date] — [Endpoint/Flow]
|
|
158
|
+
|
|
159
|
+
### Configuration
|
|
160
|
+
- Tool: k6 | Duration: 10 min | Peak VUs: 200
|
|
161
|
+
- Target: POST /api/v1/orders | Environment: staging
|
|
162
|
+
|
|
163
|
+
### Results vs. SLO
|
|
164
|
+
|
|
165
|
+
| Metric | Baseline | This run | SLO | Status |
|
|
166
|
+
|--------|----------|----------|-----|--------|
|
|
167
|
+
| p50 latency | 45ms | 52ms | < 200ms | ✅ |
|
|
168
|
+
| p95 latency | 120ms | 310ms | < 500ms | ✅ |
|
|
169
|
+
| p99 latency | 280ms | 890ms | < 2000ms | ⚠️ +218% |
|
|
170
|
+
| Error rate | 0.02% | 0.08% | < 1% | ✅ |
|
|
171
|
+
|
|
172
|
+
### Root cause of p99 regression
|
|
173
|
+
N+1 query in OrderRepository.list_items() — loading items one by one inside a loop.
|
|
174
|
+
|
|
175
|
+
### Remediation
|
|
176
|
+
Add joinedload() to the query. Estimated p99 improvement: ~400ms.
|
|
177
|
+
```
|