deployment-repo
Skill1 starsChanged 6 days agoMITView on GitHub
Design a deployment (GitOps) repo that orchestrates multiple services in a polyrepo — version pinning, environment promotion, compatibility matrices, system config. Triggers: deployment repo, GitOps repo, polyrepo, multi-repo, version pinning, compatibility matrix, environment promotion, multi-service deployment, orchestration repo, which versions work together.
- Reads credentials
In this repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-designSkill
- ai-evaluationSkill
- api-designSkill
- architecture-designSkill
- architecture-documentationSkill
- brainstormingSkill
- browser-verificationSkill
- bug-investigatingSkill
- build-vs-buySkill
- cicd-pipelineSkill
- code-archaeologySkill
- code-reviewingSkill
- code-slop-cleanupSkill
- compliance-privacySkill
- configuration-strategySkill
- containerizationSkill
- data-modelingSkill
- data-pipeline-designSkill
- data-qualitySkill
- dependency-impact-analysisSkill
- dependency-managementSkill
- deployment-checklistSkill
- dx-auditSkill
- effort-estimationSkill
- exploratory-data-analysisSkill
- feature-planningSkill
- finops-cost-optimizationSkill
- frontend-architectureSkill
- gitops-deliverySkill
- git-workflowSkill
- incident-responseSkill
- infrastructure-as-codeSkill
- llm-app-engineeringSkill
- metrics-and-okrsSkill
- ml-experiment-trackingSkill
- ml-model-deploymentSkill
- ml-pipeline-designSkill
- mobile-architectureSkill
- mobile-releaseSkill
- notebook-to-productionSkill
- observability-designSkill
- performance-optimizationSkill
- plan-executionSkill
- prd-writingSkill
- project-documentationSkill
- project-proposalSkill
- project-reviewSkill
- refactoringSkill
- release-managementSkill
- research-methodologySkill
- resilience-engineeringSkill
- retrospectiveSkill
- rollback-strategySkill
- security-auditSkill
- skill-routerSkill
- statistical-analysisSkill
- strategic-reviewSkill
- subagent-orchestrationSkill
- tdd-workflowSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before designing the repo, map the landscape:
- Distinctive: line 28
Start at the lightest tier that fits.
- Distinctive: line 155
Verify the full lifecycle works:
- Very specific: line 175
KISS: Start lightweight (docker-compose + versions.yaml).
- Distinctive: line 177
YAGNI: Don't set up Helm umbrella charts for 3 services.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deployment Repository Design
The deployment repo is the single source of truth for how a distributed system is composed. Individual app repos answer "where does service X live?" — the deployment repo answers "where does the system live?"
Step 1: Assess the System
Before designing the repo, map the landscape:
- Services: How many repos, what each service does, what language/framework
- Communication: How services talk (REST, gRPC, events/queues, shared database)
- Team structure: One team owns everything vs. multiple teams with service ownership
- Current deployment: How are services deployed today? Manual, CI-driven, ad hoc?
- Environments: Local dev, staging, production? More?
Determine scale tier:
| Tier | Team size | Services | Recommended tooling |
| Lightweight | 1 team | 2-5 | docker-compose, Makefile, .env files |
| Standard | 2-3 teams | 5-15 | Helm or Kustomize, CI-driven promotion |
| Enterprise | Many teams | 15+ | Helm + ArgoCD/Flux, automated promotion, audit trails |
Start at the lightest tier that fits. You can graduate up — premature complexity is worse than growing into it.
Step 2: Design the Repo Structure
The deployment repo contains everything needed to compose, deploy, and validate the full system. See references/deployment-repo-patterns.md for detailed structures per tier and templates/deployment-repo-structure.md for scaffolding.
Core directories (all tiers):
deployment-repo/
├── versions.yaml # Compatible service versions (the compatibility lock)
├── docker-compose.yml # Local dev orchestration
├── .env.example # Environment template
├── Makefile # Developer-friendly commands (make up, make test)
├── environments/ # Per-environment overrides
│ ├── dev/
│ ├── staging/
│ └── production/
├── tests/
│ └── e2e/ # Cross-service E2E tests
├── docs/
│ ├── architecture/ # ADRs, system diagrams
│ └── runbooks/ # Operational procedures
└── scripts/ # Utility scripts (setup, seed, health checks)Standard/Enterprise additions:
├── infrastructure/ # Shared IaC (Terraform modules, network config)
├── helm/ # Helm umbrella chart or per-service charts
│ ├── Chart.yaml # Dependencies with pinned versions
│ └── values/
│ ├── dev.yaml
│ ├── staging.yaml
│ └── production.yaml
├── contracts/ # API contracts (OpenAPI specs, Pact contracts)
└── ci/ # System-level CI/CD pipelinesChoose the manifest format based on tier:
- Lightweight:
docker-compose.ymlwith image tags pinned inversions.yamlor.env - Standard: Helm charts with
values-<env>.yamloverrides, or Kustomize with base + overlays - Enterprise: Helm umbrella chart with sub-charts per service, or Kustomize with ApplicationSets
Step 3: Define the Version Pinning Strategy
This is the core mechanism. The deployment repo acts as a compatibility lock — analogous to package-lock.json but at the system level.
Semantic versioning is the contract. Each app repo tags releases with semver (v1.2.3). The deployment repo's versions.yaml records which versions have been validated together:
# versions.yaml — the compatibility lock
services:
api-gateway:
image: registry.example.com/api-gateway
version: v2.3.1
user-service:
image: registry.example.com/user-service
version: v1.7.0
billing-service:
image: registry.example.com/billing-service
version: v3.1.2
validated:
timestamp: "2025-01-15T14:30:00Z"
e2e_result: pass
contract_result: passVersion pinning rules:
- Pin exact versions, not ranges —
v1.7.0, notv1.xorlatest. The deployment repo records what was tested, not what might work. - Promote version sets, not individual services — When staging's version set passes validation, the entire set promotes to production. This prevents "it worked in staging" failures caused by version drift.
- Breaking changes require coordinated bumps — If
api-gatewayv3.0.0 requiresuser-servicev2.0.0, both versions update in the same deployment repo commit. - Every version combination that reaches an environment is recorded — The deployment repo's git history IS the audit trail of what ran where and when.
See references/version-compatibility.md for semver contract details, compatibility matrices, and breaking change coordination patterns.
Step 4: Design Contract Tests
Version pinning is only trustworthy if compatibility is actually tested. Contract tests validate that pinned versions can talk to each other.
Consumer-driven contracts (recommended for HTTP APIs):
- Each consumer service defines its expectations of a provider's API (a "contract")
- Contracts live in the deployment repo's
contracts/directory or are published to a Pact Broker - The deployment repo CI runs contract verification: for each service pair, verify that the pinned provider version satisfies the pinned consumer's contract
- The
can-i-deploycheck (Pact Broker) answers: "are these specific versions compatible?"
Schema validation (recommended for event-driven systems):
- Event schemas (Avro, Protobuf, JSON Schema) live in the deployment repo or a schema registry
- CI validates that producer schemas are backward-compatible with what consumers expect
- Schema evolution rules: additive changes are safe, field removal/rename is breaking
What to test in the deployment repo CI:
- Contract compatibility between all pinned service versions
- E2E smoke tests against the composed system (docker-compose up + test suite)
- Database migration compatibility (if services share a database)
Step 5: Set Up Environment Promotion
The deployment repo PR is the promotion mechanism. No version reaches any environment without going through it.
Promotion flow:
App repo tags v1.8.0
→ Automated PR to deployment repo: "bump user-service to v1.8.0 in dev"
→ CI runs contract tests + E2E in dev
→ Merge → dev deploys automatically
→ Manual PR: "promote dev version set to staging"
→ CI runs full E2E in staging
→ Merge → staging deploys
→ Manual PR with approval gate: "promote to production"
→ Merge → production deploys (canary optional)Key design decisions:
- Dev: auto-promote on merge, fast feedback
- Staging: manual promotion trigger, full E2E validation
- Production: approval gate (require N reviewers), optional canary rollout
- Rollback: revert the deployment repo commit — the previous version set is restored
For automated cross-repo triggers (app repo build -> deployment repo PR), see gitops-delivery.
Step 6: Validate and Document
Verify the full lifecycle works:
- A version bump in an app repo triggers an update in the deployment repo (manual or automated)
- Contract tests catch an intentionally incompatible version combination
- E2E tests run against the composed system in CI
- Promotion from dev to staging works via PR
- Rollback works by reverting a deployment repo commit
- A new developer can
make upand get the full system running locally - Adding a new service to the deployment repo is documented
Document for the team:
- How to add a new service to the deployment repo
- How to bump a service version (manual process or automated trigger)
- How to promote across environments
- How to rollback
- How to run E2E tests locally
Principles Applied
- Single source of truth: The deployment repo is THE place to understand what's running where. Don't split this knowledge across wikis, Slack threads, and CI configs.
- KISS: Start lightweight (docker-compose + versions.yaml). Graduate to Helm/ArgoCD when the pain of the simple approach exceeds the cost of the complex one.
- Explicit over implicit: Pin exact versions. Record test results. Make the compatibility lock visible, not assumed.
- YAGNI: Don't set up Helm umbrella charts for 3 services. Don't add ArgoCD before you have multiple environments. Scale the tooling to the problem.
- Promote sets, not services: The fundamental principle — a validated version set moves together through environments.
Cross-Skill References
test-data-strategy— name this handoff whenever the question is how to write the contract tests, not which versions to pin. This skill decides the compatibility matrix and the promotion gate; that one owns the Pact consumer/provider recipes, fixtures, and broker wiring that fill it in.gitops-delivery— automate delivery from the deployment repo using ArgoCD/Flux and cross-repo triggerscontainerization— Helm chart structure, Kustomize overlays, and Dockerfile patterns for servicesinfrastructure-as-code— Terraform modules for shared infrastructure in the deployment repocicd-pipeline— system-level CI pipelines and cross-repo pipeline designdependency-impact-analysis— map blast radius of breaking changes across services before updating version pinsrollback-strategy— rollback in a deployment repo context is a git revert of the version setarchitecture-design— ADR for adopting the deployment repo pattern itself
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

