@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,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-optimization
|
|
3
|
+
type: skill
|
|
4
|
+
description: Optimize CI build speed — Docker layer caching, dependency caching, multi-stage builds, parallelism, and build matrix strategies.
|
|
5
|
+
related-rules:
|
|
6
|
+
- pipeline-standards.md
|
|
7
|
+
allowed-tools: Read, Write, Edit
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill: Build Optimization
|
|
11
|
+
|
|
12
|
+
> **Expertise:** Docker BuildKit cache mounts, GitHub Actions/GitLab CI caching, parallelization, selective test runs.
|
|
13
|
+
|
|
14
|
+
## When to load
|
|
15
|
+
|
|
16
|
+
When a pipeline takes > 5 minutes, Docker builds are slow, or you need to reduce CI costs.
|
|
17
|
+
|
|
18
|
+
## Docker Layer Cache Strategy
|
|
19
|
+
|
|
20
|
+
```dockerfile
|
|
21
|
+
# ✅ Order layers by change frequency (least → most)
|
|
22
|
+
FROM python:3.12-slim AS builder
|
|
23
|
+
|
|
24
|
+
# 1. System deps (changes rarely → cache long)
|
|
25
|
+
RUN apt-get update && apt-get install -y --no-install-recommends gcc libpq-dev
|
|
26
|
+
|
|
27
|
+
# 2. Python deps (changes on lockfile update → medium cache)
|
|
28
|
+
WORKDIR /app
|
|
29
|
+
COPY requirements.txt .
|
|
30
|
+
RUN pip install --user --no-cache-dir -r requirements.txt
|
|
31
|
+
|
|
32
|
+
# 3. App code (changes every commit → no cache benefit here)
|
|
33
|
+
COPY src/ ./src/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## BuildKit Cache Mounts (Docker 18.09+)
|
|
37
|
+
|
|
38
|
+
```dockerfile
|
|
39
|
+
# Cache pip downloads across builds (never invalidated by lockfile change)
|
|
40
|
+
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
41
|
+
pip install --user -r requirements.txt
|
|
42
|
+
|
|
43
|
+
# Cache npm across builds
|
|
44
|
+
RUN --mount=type=cache,target=/root/.npm \
|
|
45
|
+
npm ci --cache /root/.npm
|
|
46
|
+
|
|
47
|
+
# Cache Go modules
|
|
48
|
+
RUN --mount=type=cache,target=/go/pkg/mod \
|
|
49
|
+
go build ./...
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## GitHub Actions Cache
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
# Python: built-in setup-python cache
|
|
56
|
+
- uses: actions/setup-python@v5
|
|
57
|
+
with:
|
|
58
|
+
python-version: "3.12"
|
|
59
|
+
cache: pip # hashes requirements*.txt automatically
|
|
60
|
+
|
|
61
|
+
# Node: built-in setup-node cache
|
|
62
|
+
- uses: actions/setup-node@v4
|
|
63
|
+
with:
|
|
64
|
+
node-version: "20"
|
|
65
|
+
cache: npm
|
|
66
|
+
|
|
67
|
+
# Go: manual cache
|
|
68
|
+
- uses: actions/cache@v4
|
|
69
|
+
with:
|
|
70
|
+
path: |
|
|
71
|
+
~/.cache/go-build
|
|
72
|
+
~/go/pkg/mod
|
|
73
|
+
key: go-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
|
|
74
|
+
restore-keys: go-${{ runner.os }}-
|
|
75
|
+
|
|
76
|
+
# Docker layer cache via GHA cache backend (BuildKit)
|
|
77
|
+
- uses: docker/build-push-action@v6
|
|
78
|
+
with:
|
|
79
|
+
cache-from: type=gha
|
|
80
|
+
cache-to: type=gha,mode=max
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## GitLab CI Cache
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
# Global cache shared across jobs (same branch)
|
|
87
|
+
cache:
|
|
88
|
+
key: ${CI_COMMIT_REF_SLUG}
|
|
89
|
+
paths: [.cache/pip, node_modules/]
|
|
90
|
+
|
|
91
|
+
# Per-job cache with fallback
|
|
92
|
+
test:
|
|
93
|
+
cache:
|
|
94
|
+
key:
|
|
95
|
+
files: [requirements.txt] # invalidate only when lockfile changes
|
|
96
|
+
paths: [.cache/pip]
|
|
97
|
+
fallback_keys:
|
|
98
|
+
- ${CI_COMMIT_REF_SLUG}-pip
|
|
99
|
+
- pip
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Parallelization Strategies
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
# GitHub Actions: parallel jobs
|
|
106
|
+
jobs:
|
|
107
|
+
test-unit:
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
steps: [... run pytest tests/unit ...]
|
|
110
|
+
|
|
111
|
+
test-integration:
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps: [... run pytest tests/integration ...]
|
|
114
|
+
|
|
115
|
+
lint:
|
|
116
|
+
runs-on: ubuntu-latest
|
|
117
|
+
steps: [... ruff + mypy ...]
|
|
118
|
+
|
|
119
|
+
# Only after all three pass:
|
|
120
|
+
build:
|
|
121
|
+
needs: [test-unit, test-integration, lint]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
# Matrix builds: test multiple versions in parallel
|
|
126
|
+
strategy:
|
|
127
|
+
matrix:
|
|
128
|
+
python-version: ["3.11", "3.12"]
|
|
129
|
+
os: [ubuntu-latest, windows-latest]
|
|
130
|
+
fail-fast: false # don't cancel other matrix jobs on first failure
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Selective Test Runs (path filtering)
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
# GitHub Actions: only run relevant tests based on changed files
|
|
137
|
+
jobs:
|
|
138
|
+
changes:
|
|
139
|
+
outputs:
|
|
140
|
+
backend: ${{ steps.filter.outputs.backend }}
|
|
141
|
+
frontend: ${{ steps.filter.outputs.frontend }}
|
|
142
|
+
steps:
|
|
143
|
+
- uses: dorny/paths-filter@v3
|
|
144
|
+
id: filter
|
|
145
|
+
with:
|
|
146
|
+
filters: |
|
|
147
|
+
backend: ['src/backend/**', 'requirements.txt']
|
|
148
|
+
frontend: ['src/frontend/**', 'package.json']
|
|
149
|
+
|
|
150
|
+
test-backend:
|
|
151
|
+
needs: changes
|
|
152
|
+
if: needs.changes.outputs.backend == 'true'
|
|
153
|
+
steps: [... pytest src/backend ...]
|
|
154
|
+
|
|
155
|
+
test-frontend:
|
|
156
|
+
needs: changes
|
|
157
|
+
if: needs.changes.outputs.frontend == 'true'
|
|
158
|
+
steps: [... jest src/frontend ...]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Build Time Benchmarks (targets)
|
|
162
|
+
|
|
163
|
+
| Stage | Good | Acceptable | Fix needed |
|
|
164
|
+
|:---|:---|:---|:---|
|
|
165
|
+
| Dependency install (cached) | < 30s | < 90s | > 90s |
|
|
166
|
+
| Docker build (layer cache hit) | < 60s | < 3m | > 3m |
|
|
167
|
+
| Unit tests | < 2m | < 5m | > 5m |
|
|
168
|
+
| Full pipeline (PR) | < 5m | < 10m | > 10m |
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-actions-patterns
|
|
3
|
+
type: skill
|
|
4
|
+
description: Production-grade GitHub Actions workflows — reusable workflows, OIDC auth, caching, matrix builds, environment protection.
|
|
5
|
+
related-rules:
|
|
6
|
+
- pipeline-standards.md
|
|
7
|
+
- quality-gates.md
|
|
8
|
+
- supply-chain-security.md
|
|
9
|
+
allowed-tools: Read, Write, Edit
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Skill: GitHub Actions Patterns
|
|
13
|
+
|
|
14
|
+
> **Expertise:** Reusable workflows, composite actions, OIDC cloud auth, build caching, deployment gates, self-hosted runners.
|
|
15
|
+
|
|
16
|
+
## When to load
|
|
17
|
+
|
|
18
|
+
When creating or reviewing GitHub Actions workflows for CI, CD, or infrastructure automation.
|
|
19
|
+
|
|
20
|
+
## Standard CI Workflow
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
# .github/workflows/ci.yml
|
|
24
|
+
name: CI
|
|
25
|
+
|
|
26
|
+
on:
|
|
27
|
+
push:
|
|
28
|
+
branches: [main]
|
|
29
|
+
pull_request:
|
|
30
|
+
branches: [main]
|
|
31
|
+
|
|
32
|
+
concurrency:
|
|
33
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
34
|
+
cancel-in-progress: true # cancel outdated runs on new push
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
validate:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- name: Set up Python
|
|
43
|
+
uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.12"
|
|
46
|
+
cache: pip # built-in pip caching
|
|
47
|
+
|
|
48
|
+
- name: Install deps
|
|
49
|
+
run: pip install -r requirements.txt -r requirements-dev.txt
|
|
50
|
+
|
|
51
|
+
- name: Lint
|
|
52
|
+
run: ruff check src/ tests/
|
|
53
|
+
|
|
54
|
+
- name: Type check
|
|
55
|
+
run: mypy src/ --strict
|
|
56
|
+
|
|
57
|
+
- name: Test with coverage
|
|
58
|
+
run: |
|
|
59
|
+
pytest tests/ \
|
|
60
|
+
--cov=src \
|
|
61
|
+
--cov-report=xml \
|
|
62
|
+
--cov-fail-under=80
|
|
63
|
+
|
|
64
|
+
- name: Upload coverage
|
|
65
|
+
uses: codecov/codecov-action@v4
|
|
66
|
+
with:
|
|
67
|
+
files: coverage.xml
|
|
68
|
+
|
|
69
|
+
build:
|
|
70
|
+
needs: validate
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
permissions:
|
|
73
|
+
contents: read
|
|
74
|
+
packages: write
|
|
75
|
+
id-token: write # for OIDC
|
|
76
|
+
outputs:
|
|
77
|
+
image-digest: ${{ steps.build.outputs.digest }}
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
|
|
81
|
+
- name: Set up Docker Buildx
|
|
82
|
+
uses: docker/setup-buildx-action@v3
|
|
83
|
+
|
|
84
|
+
- name: Login to registry (OIDC — no long-lived secret)
|
|
85
|
+
uses: docker/login-action@v3
|
|
86
|
+
with:
|
|
87
|
+
registry: ghcr.io
|
|
88
|
+
username: ${{ github.actor }}
|
|
89
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
90
|
+
|
|
91
|
+
- name: Build and push
|
|
92
|
+
id: build
|
|
93
|
+
uses: docker/build-push-action@v6
|
|
94
|
+
with:
|
|
95
|
+
context: .
|
|
96
|
+
push: ${{ github.event_name == 'push' }}
|
|
97
|
+
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
|
|
98
|
+
cache-from: type=gha
|
|
99
|
+
cache-to: type=gha,mode=max
|
|
100
|
+
provenance: true # SLSA provenance attestation
|
|
101
|
+
sbom: true # generate SBOM
|
|
102
|
+
|
|
103
|
+
security-scan:
|
|
104
|
+
needs: build
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- name: Scan image for CVEs
|
|
108
|
+
uses: aquasecurity/trivy-action@master
|
|
109
|
+
with:
|
|
110
|
+
image-ref: ghcr.io/${{ github.repository }}:${{ github.sha }}
|
|
111
|
+
format: sarif
|
|
112
|
+
output: trivy-results.sarif
|
|
113
|
+
severity: CRITICAL,HIGH
|
|
114
|
+
exit-code: 1 # fail pipeline on Critical/High
|
|
115
|
+
|
|
116
|
+
- name: Upload SARIF to Security tab
|
|
117
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
118
|
+
with:
|
|
119
|
+
sarif_file: trivy-results.sarif
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Reusable Workflow Pattern
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
# .github/workflows/_deploy.yml (reusable — called by others)
|
|
126
|
+
name: Deploy (reusable)
|
|
127
|
+
|
|
128
|
+
on:
|
|
129
|
+
workflow_call:
|
|
130
|
+
inputs:
|
|
131
|
+
environment:
|
|
132
|
+
required: true
|
|
133
|
+
type: string
|
|
134
|
+
image-digest:
|
|
135
|
+
required: true
|
|
136
|
+
type: string
|
|
137
|
+
secrets:
|
|
138
|
+
KUBECONFIG_B64:
|
|
139
|
+
required: true
|
|
140
|
+
|
|
141
|
+
jobs:
|
|
142
|
+
deploy:
|
|
143
|
+
runs-on: ubuntu-latest
|
|
144
|
+
environment: ${{ inputs.environment }} # GitHub Environment with protection rules
|
|
145
|
+
steps:
|
|
146
|
+
- name: Deploy via Helm
|
|
147
|
+
env:
|
|
148
|
+
KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64 }}
|
|
149
|
+
run: |
|
|
150
|
+
echo "$KUBECONFIG_B64" | base64 -d > /tmp/kubeconfig
|
|
151
|
+
helm upgrade --install my-service charts/my-service \
|
|
152
|
+
--set image.digest=${{ inputs.image-digest }} \
|
|
153
|
+
--namespace ${{ inputs.environment }} \
|
|
154
|
+
--atomic --timeout 5m
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## OIDC Cloud Authentication (no long-lived keys)
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
# AWS via OIDC (no AWS_ACCESS_KEY_ID needed)
|
|
161
|
+
- name: Configure AWS credentials
|
|
162
|
+
uses: aws-actions/configure-aws-credentials@v4
|
|
163
|
+
with:
|
|
164
|
+
role-to-assume: arn:aws:iam::123456789:role/github-actions-deploy
|
|
165
|
+
aws-region: us-east-1
|
|
166
|
+
|
|
167
|
+
# GCP via OIDC
|
|
168
|
+
- name: Authenticate to Google Cloud
|
|
169
|
+
uses: google-github-actions/auth@v2
|
|
170
|
+
with:
|
|
171
|
+
workload_identity_provider: projects/123/locations/global/workloadIdentityPools/...
|
|
172
|
+
service_account: github-actions@my-project.iam.gserviceaccount.com
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Self-Hosted Runner (bare-metal K8s)
|
|
176
|
+
|
|
177
|
+
```yaml
|
|
178
|
+
# Use self-hosted runner for internal registry / VPN-required builds
|
|
179
|
+
jobs:
|
|
180
|
+
build-internal:
|
|
181
|
+
runs-on: [self-hosted, linux, k8s-runner]
|
|
182
|
+
steps:
|
|
183
|
+
- ...
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Environment Protection Rules
|
|
187
|
+
|
|
188
|
+
Configure in GitHub → Settings → Environments:
|
|
189
|
+
- `production`: require manual approval from `@devops-team` + `@team-lead`; restrict to `main` branch only
|
|
190
|
+
- `staging`: auto-deploy; restrict to `main` branch
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitlab-ci-patterns
|
|
3
|
+
type: skill
|
|
4
|
+
description: GitLab CI/CD pipelines — include templates, environments, OIDC auth, caching, protected runners, deployment gates.
|
|
5
|
+
related-rules:
|
|
6
|
+
- pipeline-standards.md
|
|
7
|
+
- quality-gates.md
|
|
8
|
+
allowed-tools: Read, Write, Edit
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: GitLab CI Patterns
|
|
12
|
+
|
|
13
|
+
> **Expertise:** GitLab CI YAML, include/extends, environments, DAST, protected runners, Kubernetes deploy.
|
|
14
|
+
|
|
15
|
+
## When to load
|
|
16
|
+
|
|
17
|
+
When creating or reviewing `.gitlab-ci.yml` files for build, test, or deployment pipelines.
|
|
18
|
+
|
|
19
|
+
## Standard Pipeline Structure
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
# .gitlab-ci.yml
|
|
23
|
+
stages:
|
|
24
|
+
- validate
|
|
25
|
+
- build
|
|
26
|
+
- scan
|
|
27
|
+
- deploy-staging
|
|
28
|
+
- smoke-test
|
|
29
|
+
- deploy-production
|
|
30
|
+
|
|
31
|
+
variables:
|
|
32
|
+
IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
|
33
|
+
DOCKER_BUILDKIT: "1"
|
|
34
|
+
|
|
35
|
+
# ── Validate ───────────────────────────────────────────
|
|
36
|
+
lint:
|
|
37
|
+
stage: validate
|
|
38
|
+
image: python:3.12-slim
|
|
39
|
+
cache:
|
|
40
|
+
key: pip-$CI_COMMIT_REF_SLUG
|
|
41
|
+
paths: [.cache/pip]
|
|
42
|
+
script:
|
|
43
|
+
- pip install ruff mypy --cache-dir .cache/pip
|
|
44
|
+
- ruff check src/ tests/
|
|
45
|
+
- mypy src/ --strict
|
|
46
|
+
|
|
47
|
+
test:
|
|
48
|
+
stage: validate
|
|
49
|
+
image: python:3.12-slim
|
|
50
|
+
cache:
|
|
51
|
+
key: pip-$CI_COMMIT_REF_SLUG
|
|
52
|
+
paths: [.cache/pip]
|
|
53
|
+
script:
|
|
54
|
+
- pip install -r requirements.txt -r requirements-dev.txt --cache-dir .cache/pip
|
|
55
|
+
- pytest tests/ --cov=src --cov-report=xml --cov-fail-under=80
|
|
56
|
+
coverage: '/TOTAL.*\s+(\d+%)$/'
|
|
57
|
+
artifacts:
|
|
58
|
+
reports:
|
|
59
|
+
coverage_report:
|
|
60
|
+
coverage_format: cobertura
|
|
61
|
+
path: coverage.xml
|
|
62
|
+
|
|
63
|
+
# ── Build ──────────────────────────────────────────────
|
|
64
|
+
build-image:
|
|
65
|
+
stage: build
|
|
66
|
+
image: docker:24
|
|
67
|
+
services: [docker:24-dind]
|
|
68
|
+
before_script:
|
|
69
|
+
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
70
|
+
script:
|
|
71
|
+
- docker build --cache-from $CI_REGISTRY_IMAGE:cache
|
|
72
|
+
--build-arg BUILDKIT_INLINE_CACHE=1
|
|
73
|
+
-t $IMAGE_NAME
|
|
74
|
+
-t $CI_REGISTRY_IMAGE:cache .
|
|
75
|
+
- docker push $IMAGE_NAME
|
|
76
|
+
- docker push $CI_REGISTRY_IMAGE:cache
|
|
77
|
+
only: [main, tags]
|
|
78
|
+
|
|
79
|
+
# ── Scan ───────────────────────────────────────────────
|
|
80
|
+
container-scan:
|
|
81
|
+
stage: scan
|
|
82
|
+
image:
|
|
83
|
+
name: aquasec/trivy:latest
|
|
84
|
+
entrypoint: [""]
|
|
85
|
+
script:
|
|
86
|
+
- trivy image --exit-code 1 --severity CRITICAL,HIGH $IMAGE_NAME
|
|
87
|
+
needs: [build-image]
|
|
88
|
+
|
|
89
|
+
sast:
|
|
90
|
+
stage: scan
|
|
91
|
+
include:
|
|
92
|
+
- template: Security/SAST.gitlab-ci.yml
|
|
93
|
+
|
|
94
|
+
# ── Deploy Staging ─────────────────────────────────────
|
|
95
|
+
deploy-staging:
|
|
96
|
+
stage: deploy-staging
|
|
97
|
+
environment:
|
|
98
|
+
name: staging
|
|
99
|
+
url: https://staging.example.com
|
|
100
|
+
script:
|
|
101
|
+
- helm upgrade --install my-service charts/my-service
|
|
102
|
+
--set image.tag=$CI_COMMIT_SHA
|
|
103
|
+
--namespace staging
|
|
104
|
+
--atomic --timeout 5m
|
|
105
|
+
only: [main]
|
|
106
|
+
|
|
107
|
+
# ── Smoke Test ─────────────────────────────────────────
|
|
108
|
+
smoke-staging:
|
|
109
|
+
stage: smoke-test
|
|
110
|
+
script:
|
|
111
|
+
- curl -f https://staging.example.com/health
|
|
112
|
+
needs: [deploy-staging]
|
|
113
|
+
only: [main]
|
|
114
|
+
|
|
115
|
+
# ── Deploy Production ──────────────────────────────────
|
|
116
|
+
deploy-production:
|
|
117
|
+
stage: deploy-production
|
|
118
|
+
environment:
|
|
119
|
+
name: production
|
|
120
|
+
url: https://app.example.com
|
|
121
|
+
when: manual # manual approval gate
|
|
122
|
+
allow_failure: false
|
|
123
|
+
script:
|
|
124
|
+
- helm upgrade --install my-service charts/my-service
|
|
125
|
+
--set image.tag=$CI_COMMIT_SHA
|
|
126
|
+
--namespace production
|
|
127
|
+
--atomic --timeout 5m
|
|
128
|
+
only: [main]
|
|
129
|
+
needs: [smoke-staging]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Include & Extends (DRY pipelines)
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
# Shared templates in infra repo
|
|
136
|
+
include:
|
|
137
|
+
- project: 'infra/ci-templates'
|
|
138
|
+
file: '/templates/docker-build.yml'
|
|
139
|
+
ref: v1.2.0
|
|
140
|
+
- template: Security/SAST.gitlab-ci.yml
|
|
141
|
+
|
|
142
|
+
# Extend base job
|
|
143
|
+
.base-deploy:
|
|
144
|
+
image: bitnami/helm:3
|
|
145
|
+
before_script:
|
|
146
|
+
- echo $KUBECONFIG_B64 | base64 -d > /tmp/kubeconfig
|
|
147
|
+
- export KUBECONFIG=/tmp/kubeconfig
|
|
148
|
+
|
|
149
|
+
deploy-staging:
|
|
150
|
+
extends: .base-deploy
|
|
151
|
+
environment: staging
|
|
152
|
+
script: helm upgrade --install ...
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Protected Runners (bare-metal / internal registry)
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
# Tag jobs to run on specific runners
|
|
159
|
+
build-internal:
|
|
160
|
+
tags:
|
|
161
|
+
- self-hosted
|
|
162
|
+
- bare-metal
|
|
163
|
+
- docker
|
|
164
|
+
script: ...
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Configure in GitLab → Settings → CI/CD → Runners:
|
|
168
|
+
- Protected runners only run on protected branches (main, tags)
|
|
169
|
+
- Untagged jobs run on shared runners only
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pipeline-security
|
|
3
|
+
type: skill
|
|
4
|
+
description: Secure CI/CD pipelines — OIDC auth, secret scanning, dependency review, SLSA provenance, and runner hardening.
|
|
5
|
+
related-rules:
|
|
6
|
+
- supply-chain-security.md
|
|
7
|
+
- pipeline-standards.md
|
|
8
|
+
allowed-tools: Read, Write, Edit
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: Pipeline Security
|
|
12
|
+
|
|
13
|
+
> **Expertise:** OIDC cloud auth, GitHub Actions security hardening, secret scanning (trufflehog/gitleaks), SLSA provenance, dependency review.
|
|
14
|
+
|
|
15
|
+
## When to load
|
|
16
|
+
|
|
17
|
+
When setting up secure CI credentials, adding secret scanning, implementing SLSA provenance, or hardening runner permissions.
|
|
18
|
+
|
|
19
|
+
## OIDC Authentication (no long-lived secrets)
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
# GitHub Actions → AWS (no AWS_ACCESS_KEY_ID needed)
|
|
23
|
+
jobs:
|
|
24
|
+
deploy:
|
|
25
|
+
permissions:
|
|
26
|
+
id-token: write # required for OIDC
|
|
27
|
+
contents: read
|
|
28
|
+
steps:
|
|
29
|
+
- uses: aws-actions/configure-aws-credentials@v4
|
|
30
|
+
with:
|
|
31
|
+
role-to-assume: arn:aws:iam::123456789012:role/github-actions-deploy
|
|
32
|
+
aws-region: eu-west-1
|
|
33
|
+
role-session-name: github-${{ github.run_id }}
|
|
34
|
+
|
|
35
|
+
# AWS IAM trust policy (configure once)
|
|
36
|
+
# {
|
|
37
|
+
# "Principal": {"Federated": "arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com"},
|
|
38
|
+
# "Condition": {
|
|
39
|
+
# "StringEquals": {"token.actions.githubusercontent.com:sub": "repo:myorg/myrepo:ref:refs/heads/main"}
|
|
40
|
+
# }
|
|
41
|
+
# }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
# GitHub Actions → GCP
|
|
46
|
+
- uses: google-github-actions/auth@v2
|
|
47
|
+
with:
|
|
48
|
+
workload_identity_provider: projects/123456789/locations/global/workloadIdentityPools/github/providers/github
|
|
49
|
+
service_account: github-actions@my-project.iam.gserviceaccount.com
|
|
50
|
+
|
|
51
|
+
# GitHub Actions → K8s (via kubeconfig secret — use when OIDC not available)
|
|
52
|
+
- name: Set up kubeconfig
|
|
53
|
+
run: |
|
|
54
|
+
echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > /tmp/kubeconfig
|
|
55
|
+
chmod 600 /tmp/kubeconfig
|
|
56
|
+
env:
|
|
57
|
+
KUBECONFIG: /tmp/kubeconfig
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Minimal Permissions (principle of least privilege)
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
# Always declare permissions explicitly; defaults are too broad
|
|
64
|
+
jobs:
|
|
65
|
+
build:
|
|
66
|
+
permissions:
|
|
67
|
+
contents: read # checkout only
|
|
68
|
+
packages: write # push to ghcr.io
|
|
69
|
+
id-token: write # OIDC for cloud/registry auth
|
|
70
|
+
security-events: write # upload SARIF to Security tab
|
|
71
|
+
|
|
72
|
+
deploy:
|
|
73
|
+
permissions:
|
|
74
|
+
contents: read
|
|
75
|
+
id-token: write # OIDC for cloud auth
|
|
76
|
+
# NOT: actions:write, administration:write, etc.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Secret Scanning
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
# trufflehog — detect secrets in git history and current diff
|
|
83
|
+
- name: Scan for secrets (trufflehog)
|
|
84
|
+
uses: trufflesecurity/trufflehog@main
|
|
85
|
+
with:
|
|
86
|
+
path: ./
|
|
87
|
+
base: ${{ github.event.repository.default_branch }}
|
|
88
|
+
head: HEAD
|
|
89
|
+
extra_args: --only-verified # reduce noise — only verified secrets
|
|
90
|
+
|
|
91
|
+
# gitleaks — alternative (faster, configurable)
|
|
92
|
+
- name: Scan for secrets (gitleaks)
|
|
93
|
+
uses: gitleaks/gitleaks-action@v2
|
|
94
|
+
env:
|
|
95
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Dependency Review (GitHub)
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
# Block PRs that introduce vulnerable dependencies
|
|
102
|
+
- name: Dependency Review
|
|
103
|
+
uses: actions/dependency-review-action@v4
|
|
104
|
+
with:
|
|
105
|
+
fail-on-severity: high # block on High and Critical
|
|
106
|
+
allow-licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC
|
|
107
|
+
deny-licenses: GPL-3.0, AGPL-3.0 # copyleft licenses blocked
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## SLSA Provenance (Supply chain Level 2)
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
# Generate SLSA L2 provenance attestation with sigstore
|
|
114
|
+
- name: Generate SLSA provenance
|
|
115
|
+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2
|
|
116
|
+
with:
|
|
117
|
+
image: registry.example.com/myorg/order-service
|
|
118
|
+
digest: ${{ steps.build.outputs.digest }}
|
|
119
|
+
registry-username: ${{ github.actor }}
|
|
120
|
+
registry-password: ${{ secrets.GITHUB_TOKEN }}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Runner Hardening
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
# Pin action versions to SHA (not tag — tags are mutable)
|
|
127
|
+
# ✅ Safe
|
|
128
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
129
|
+
# ❌ Unsafe (tag can be moved by attacker)
|
|
130
|
+
- uses: actions/checkout@v4
|
|
131
|
+
|
|
132
|
+
# Restrict third-party actions to verified/trusted
|
|
133
|
+
# In GitHub org settings: only allow selected actions + GitHub Actions
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Self-hosted runner hardening
|
|
138
|
+
# - Run as non-root dedicated user (no sudo)
|
|
139
|
+
# - Ephemeral runners (fresh VM per job) — preferred
|
|
140
|
+
# - Network: egress to required registries only; no inbound
|
|
141
|
+
# - No persistent credentials on runner filesystem
|
|
142
|
+
# - Use actions/runner-container-hooks for K8s ephemeral runners
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Audit: What Your Pipeline Can Access
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Check what secrets are available to a workflow
|
|
149
|
+
# In GitHub: Settings → Secrets → Actions
|
|
150
|
+
# Rule: each secret should only be available to the environment that needs it
|
|
151
|
+
|
|
152
|
+
# Prevent secret leakage in logs
|
|
153
|
+
- name: No secret echo
|
|
154
|
+
run: |
|
|
155
|
+
# ❌ BAD: leaks secret to logs
|
|
156
|
+
echo "DB_PASS=$DB_PASS"
|
|
157
|
+
env # dumps all env vars including secrets
|
|
158
|
+
|
|
159
|
+
# ✅ Use secret only where needed; never echo
|
|
160
|
+
helm upgrade ... --set db.password="$DB_PASS" > /dev/null
|
|
161
|
+
```
|