Use when producing or updating infrastructure documentation for topology, environments, dependencies, configuration ownership, recovery, and change controls. Use deployment-guide for the neighbouring concern; this skill owns the named document contract and its acceptance evidence.
Failures and unavailable checks cannot appear as passes.
Review record
Reviewer, date, disposition, open actions
The consumer can reproduce the acceptance decision.
Capability and Permission Boundaries
Minimum capabilities: read and search the authorised project sources. Execution is optional and limited to non-destructive validation.
Assessment and planning default to read-only. Create or edit the named project document only when the request explicitly authorises it. Production mutation, publishing, destructive action, spending, external communication, or certification claims require separate explicit authority.
Treat secrets, tenant data, incident evidence, and financial records as least-privilege inputs; expose only the minimum evidence needed for review.
Degraded Mode
If files, execution, network, rendering, environment access, fonts, or current evidence are unavailable, return the narrowest useful draft plus a gap register. Label affected checks not assessed, retain the intended acceptance oracle, and state who must supply or verify the missing evidence. Never convert an unavailable check into a pass.
Decision Rules
Choice
Action
Failure or risk avoided
Evidence is complete and authority is explicit
Choose documentation depth from operational and audit risk and produce the full artefact.
A diagram that omits dependencies or recovery.
A required source or approval is missing
Stop the affected branch; record the gap, owner, and unblock condition.
Fabricated requirements or unauthorised action.
Evidence conflicts across sources
Preserve both claims, identify the controlling owner, and request a recorded decision.
Silent selection of a convenient but wrong source.
A check cannot run in the available environment
Keep its oracle and mark it not assessed; require later execution evidence.
False assurance from capability limits.
Workflow
Confirm the named deliverable, consumer, scope, environment, authority, and neighbouring-skill boundary.
Inventory required sources and validate provenance, freshness, internal consistency, and missing inputs. Stop the affected branch on a mandatory gap.
Extract traceable requirements, invariants, risks, and measurable acceptance criteria; record conflicts before choosing a design or procedure.
Apply the decision rules and the domain workflow below. For a failed branch, preserve evidence, choose the documented recovery path, or escalate to the named owner.
Draft the artefact, decision register, and evidence record together. Do not defer failure handling, rollback, security, tenancy, accessibility, or operational ownership.
Run available checks, review every result, repair failures, and hand off only when acceptance is observable. If recovery fails or authority is exceeded, stop and escalate without mutation.
Quality Standards
Ground every section in a named project source, decision, measured result, or accountable owner.
Give each requirement or procedure a deterministic oracle that another reviewer can reproduce.
Keep assumptions, exclusions, degraded checks, residual risks, and waivers visible at handoff.
Preserve the domain invariants and more specific controls in the existing workflow below; this contract does not replace them.
Run the repository anti-AI-slop gate: remove filler, verify named standards and dependencies, and retain purposeful domain detail.
Anti-Patterns
Copying a generic template without mapping it to project sources. Fix: attach each section to an approved requirement, configuration, risk, or owner.
Choosing a threshold because it is common practice. Fix: derive it from a requirement, measured baseline, risk decision, or current verified source.
Reporting an inaccessible or unexecuted check as passed. Fix: mark it not assessed, preserve the oracle, and name the verifier.
Mixing the neighbouring deployment-guide concern into this artefact without a boundary. Fix: cross-reference its output and keep ownership explicit.
Omitting failure, rollback, empty-state, security, tenancy, or escalation behaviour. Fix: specify the trigger, safe action, verification, and owner for each applicable case.
Mutating a repository, environment, tenant, ledger, or external system while drafting guidance. Fix: remain read-only until the exact mutation and authority are explicit.
Claiming compliance, certification, readiness, or release from prose alone. Fix: require source-attributed evidence and a named acceptance decision.
Worked Example
Given an approved project source and a conflicting implementation detail, record both with provenance, stop the affected branch, and obtain the accountable owner's decision. Then update the relevant contract, define a reproducible acceptance check, and retain its observed result. The artefact is accepted only when the documented topology matches deployed evidence and names ownership, recovery assumptions, and sensitive configuration boundaries.
References
logic.prompt - load only when its template, logic, or detail is needed.
README.md - load only when its template, logic, or detail is needed.
Overview
This is the fourth skill in Phase 06 (Deployment & Operations). It produces infrastructure documentation that defines architecture diagrams (Mermaid), compute resource specifications per environment, network topology, storage architecture, Infrastructure-as-Code references, and backup/disaster recovery procedures. The output conforms to IEEE 1016-2009 and provides a complete infrastructure reference for DevOps and platform engineering teams.
When to Use
After 02-runbook and 03-monitoring-setup complete (they provide operational and observability context).
When HLD.md exists in projects/<ProjectName>/<phase>/<document>/ with system architecture and component topology.
When tech_stack.md is present in projects/<ProjectName>/_context/ with technology choices and infrastructure tooling.
Complete infrastructure documentation with diagrams, resources, network, storage, IaC, and DR
Core Instructions
Follow these seven steps in order. Halt and notify the user if a required input file is missing.
Step 1: Read Context Files
Read HLD.md from projects/<ProjectName>/<phase>/<document>/ and tech_stack.md from projects/<ProjectName>/_context/. Log the absolute path of each file read. Halt if any required file is missing.
CI/CD pipeline configuration file locations
Document backup and disaster recovery:
Backup schedule, retention policy, and storage location
Recovery Point Objective (RPO) and Recovery Time Objective (RTO)
Disaster recovery procedure (failover steps, data restoration)
DR testing schedule
Step 7: Write Output with Cost Estimates
Produce a cost estimate summary table per environment. Write the completed document to projects/<ProjectName>/<phase>/<document>/Infrastructure_Docs.md. Log the total count of compute resources, network components, and storage systems documented.
1---2name: 04-infrastructure-docs3description: Use when producing or updating infrastructure documentation for topology, environments, dependencies, configuration ownership, recovery, and change controls. Use deployment-guide for the neighbouring concern; this skill owns the named document contract and its acceptance evidence.4---567# Infrastructure Docs Skill89<!-- dual-compat-start -->10## Use When1112- Produce or update infrastructure documentation from approved project evidence.13- Resolve decisions about topology, environments, dependencies, configuration ownership, recovery, and change controls.14- Prepare a reviewable handoff for Platform engineers and auditors.1516## Do Not Use When1718- The task is primarily owned by deployment-guide; route there and use this skill only for its named output.19- Required project evidence or decision authority is unavailable and the requester expects a pass, release, certification, or production change.2021## Required Inputs2223| Artefact | Source/provider | Required? | Behaviour when absent |24|---|---|---|---|25| Project _context/, approved requirements, and relevant architecture | Project owner and upstream phase skills | Required | Stop at a gap register; do not invent scope, thresholds, integrations, or owners. |26| Existing artefact, implementation, configuration, and evidence named below | Repository, delivery team, or service owner | Required when updating or assessing | Mark inaccessible items `not assessed`; do not treat them as passed. |27| Target audience, environment, risk tolerance, and authority | Requester and accountable owner | Required | Produce a read-only outline with explicit assumptions; do not mutate project or production state. |28## Outputs2930| Artefact | Consumer | Observable acceptance condition |31|---|---|---|32| Infrastructure Documentation | Platform engineers and auditors | The documented topology matches deployed evidence and names ownership, recovery assumptions, and sensitive configuration boundaries. |33| Decision and gap register | Reviewer and downstream phase owner | Every assumption, rejected option, unresolved dependency, waiver, and owner is explicit. |34| Validation evidence | Release or governance reviewer | Checks identify command or method, date, result, evidence location, and all unassessed items. |3536## Evidence Produced3738| Evidence | Minimum content | Acceptance |39|---|---|---|40| Traceability record | Source artefact, decision, output section, owner | No mandatory decision is source-free. |41| Quality-gate result | Check, expected result, observed result, evidence path | Failures and unavailable checks cannot appear as passes. |42| Review record | Reviewer, date, disposition, open actions | The consumer can reproduce the acceptance decision. |4344## Capability and Permission Boundaries4546- Minimum capabilities: read and search the authorised project sources. Execution is optional and limited to non-destructive validation.47- Assessment and planning default to read-only. Create or edit the named project document only when the request explicitly authorises it. Production mutation, publishing, destructive action, spending, external communication, or certification claims require separate explicit authority.48- Treat secrets, tenant data, incident evidence, and financial records as least-privilege inputs; expose only the minimum evidence needed for review.4950## Degraded Mode5152If files, execution, network, rendering, environment access, fonts, or current evidence are unavailable, return the narrowest useful draft plus a gap register. Label affected checks `not assessed`, retain the intended acceptance oracle, and state who must supply or verify the missing evidence. Never convert an unavailable check into a pass.5354## Decision Rules5556| Choice | Action | Failure or risk avoided |57|---|---|---|58| Evidence is complete and authority is explicit | Choose documentation depth from operational and audit risk and produce the full artefact. | A diagram that omits dependencies or recovery. |59| A required source or approval is missing | Stop the affected branch; record the gap, owner, and unblock condition. | Fabricated requirements or unauthorised action. |60| Evidence conflicts across sources | Preserve both claims, identify the controlling owner, and request a recorded decision. | Silent selection of a convenient but wrong source. |61| A check cannot run in the available environment | Keep its oracle and mark it `not assessed`; require later execution evidence. | False assurance from capability limits. |6263## Workflow64651. Confirm the named deliverable, consumer, scope, environment, authority, and neighbouring-skill boundary.662. Inventory required sources and validate provenance, freshness, internal consistency, and missing inputs. Stop the affected branch on a mandatory gap.673. Extract traceable requirements, invariants, risks, and measurable acceptance criteria; record conflicts before choosing a design or procedure.684. Apply the decision rules and the domain workflow below. For a failed branch, preserve evidence, choose the documented recovery path, or escalate to the named owner.695. Draft the artefact, decision register, and evidence record together. Do not defer failure handling, rollback, security, tenancy, accessibility, or operational ownership.706. Run available checks, review every result, repair failures, and hand off only when acceptance is observable. If recovery fails or authority is exceeded, stop and escalate without mutation.7172## Quality Standards7374- Ground every section in a named project source, decision, measured result, or accountable owner.75- Give each requirement or procedure a deterministic oracle that another reviewer can reproduce.76- Keep assumptions, exclusions, degraded checks, residual risks, and waivers visible at handoff.77- Preserve the domain invariants and more specific controls in the existing workflow below; this contract does not replace them.78- Run the repository anti-AI-slop gate: remove filler, verify named standards and dependencies, and retain purposeful domain detail.7980## Anti-Patterns8182- Copying a generic template without mapping it to project sources. Fix: attach each section to an approved requirement, configuration, risk, or owner.83- Choosing a threshold because it is common practice. Fix: derive it from a requirement, measured baseline, risk decision, or current verified source.84- Reporting an inaccessible or unexecuted check as passed. Fix: mark it `not assessed`, preserve the oracle, and name the verifier.85- Mixing the neighbouring deployment-guide concern into this artefact without a boundary. Fix: cross-reference its output and keep ownership explicit.86- Omitting failure, rollback, empty-state, security, tenancy, or escalation behaviour. Fix: specify the trigger, safe action, verification, and owner for each applicable case.87- Mutating a repository, environment, tenant, ledger, or external system while drafting guidance. Fix: remain read-only until the exact mutation and authority are explicit.88- Claiming compliance, certification, readiness, or release from prose alone. Fix: require source-attributed evidence and a named acceptance decision.8990## Worked Example9192Given an approved project source and a conflicting implementation detail, record both with provenance, stop the affected branch, and obtain the accountable owner's decision. Then update the relevant contract, define a reproducible acceptance check, and retain its observed result. The artefact is accepted only when the documented topology matches deployed evidence and names ownership, recovery assumptions, and sensitive configuration boundaries.9394## References9596- [logic.prompt](logic.prompt) - load only when its template, logic, or detail is needed.97- [README.md](README.md) - load only when its template, logic, or detail is needed.98<!-- dual-compat-end -->99## Overview100101This is the fourth skill in Phase 06 (Deployment & Operations). It produces infrastructure documentation that defines architecture diagrams (Mermaid), compute resource specifications per environment, network topology, storage architecture, Infrastructure-as-Code references, and backup/disaster recovery procedures. The output conforms to IEEE 1016-2009 and provides a complete infrastructure reference for DevOps and platform engineering teams.102103## When to Use104105- After 02-runbook and 03-monitoring-setup complete (they provide operational and observability context).106- When `HLD.md` exists in `projects/<ProjectName>/<phase>/<document>/` with system architecture and component topology.107- When `tech_stack.md` is present in `projects/<ProjectName>/_context/` with technology choices and infrastructure tooling.108109## Quick Reference110111| Attribute | Value |112|-------------|-------|113| **Inputs** | `projects/<ProjectName>/<phase>/<document>/HLD.md`, `projects/<ProjectName>/_context/tech_stack.md` |114| **Output** | `projects/<ProjectName>/<phase>/<document>/Infrastructure_Docs.md` |115| **Tone** | Technical, architecture-focused, DevOps-facing |116| **Standard** | IEEE 1016-2009 |117118## Input Files119120| File | Location | Required | Purpose |121|------|----------|----------|---------|122| HLD.md | `projects/<ProjectName>/<phase>/<document>/HLD.md` | Yes | System architecture, component topology, deployment targets |123| tech_stack.md | `projects/<ProjectName>/_context/tech_stack.md` | Yes | Technology choices, infrastructure tooling, cloud provider details |124125## Output Files126127| File | Location | Description |128|------|----------|-------------|129| Infrastructure_Docs.md | `projects/<ProjectName>/<phase>/<document>/Infrastructure_Docs.md` | Complete infrastructure documentation with diagrams, resources, network, storage, IaC, and DR |130131## Core Instructions132133Follow these seven steps in order. Halt and notify the user if a required input file is missing.134135### Step 1: Read Context Files136137Read `HLD.md` from `projects/<ProjectName>/<phase>/<document>/` and `tech_stack.md` from `projects/<ProjectName>/_context/`. Log the absolute path of each file read. Halt if any required file is missing.138139### Step 2: Generate Infrastructure Architecture Diagram140141Produce a Mermaid diagram representing the infrastructure layout:142- Compute nodes (application servers, worker nodes, cron servers)143- Data stores (databases, caches, message queues)144- Network components (load balancers, API gateways, CDN)145- External integrations (third-party APIs, SaaS services)146- The diagram shall show connectivity and data flow between components147148### Step 3: Define Compute Resources per Environment149150For each environment (dev, staging, production), specify:151- Instance type or container resource limits (CPU cores, RAM)152- Storage allocation (root volume, data volume)153- Scaling policy (minimum, maximum, scaling trigger)154- Estimated monthly cost per resource where feasible155156### Step 4: Define Network Topology157158Document the network architecture:159- VPC/VNET layout with CIDR blocks160- Subnet design (public, private, data tier)161- Security groups and firewall rules (ingress/egress)162- Load balancer configuration (type, health check, routing rules)163- DNS configuration (domain, records, TTL)164165### Step 5: Define Storage Architecture166167Document storage systems and their configuration:168- Primary database (engine, version, instance size, storage type, replication)169- Cache layer (engine, cluster size, eviction policy)170- File/object storage (bucket names, access policies, lifecycle rules)171- CDN configuration (origin, cache behavior, invalidation strategy)172173### Step 6: Define IaC References and Backup/DR174175Document Infrastructure-as-Code artifacts:176- Terraform module locations and purpose177- Docker Compose or Kubernetes manifest locations178- CI/CD pipeline configuration file locations179Document backup and disaster recovery:180- Backup schedule, retention policy, and storage location181- Recovery Point Objective (RPO) and Recovery Time Objective (RTO)182- Disaster recovery procedure (failover steps, data restoration)183- DR testing schedule184185### Step 7: Write Output with Cost Estimates186187Produce a cost estimate summary table per environment. Write the completed document to `projects/<ProjectName>/<phase>/<document>/Infrastructure_Docs.md`. Log the total count of compute resources, network components, and storage systems documented.188189## Output Format190191The generated `Infrastructure_Docs.md` shall contain these sections in order: Document Header (project name, date, version, standards), 1. Infrastructure Architecture Diagram, 2. Compute Resources, 3. Network Topology, 4. Storage Architecture, 5. IaC References, 6. Backup & DR, 7. Cost Estimates.192193## Common Pitfalls194195| Pitfall | Remedy |196|---------|--------|197| Architecture diagrams without data flow direction | Every diagram shall show directional connectivity between components |198| Compute resources without scaling policies | Every production resource shall define minimum, maximum, and scaling trigger |199| Network topology without security groups | Every subnet shall have associated security group rules |200| Missing RPO/RTO definitions | Backup and DR shall define RPO and RTO targets explicitly |201202## Verification Checklist203204- [ ] `Infrastructure_Docs.md` exists in `projects/<ProjectName>/<phase>/<document>/` with all seven sections populated.205- [ ] Infrastructure architecture diagram renders valid Mermaid with directional data flows.206- [ ] Compute resources specify instance types, scaling policies for dev/staging/prod.207- [ ] Network topology defines VPC layout, subnets, security groups, and load balancers.208- [ ] Storage architecture covers database, cache, file storage, and CDN.209- [ ] IaC references list Terraform, Docker, or K8s manifest locations.210- [ ] Backup and DR define RPO, RTO, and DR testing schedule.211212## Integration213214| Direction | Skill | Relationship |215|-----------|-------|-------------|216| Upstream | 01-deployment-guide | Consumes deployment topology for infrastructure layout |217| Upstream | 02-runbook | Consumes operational context for DR procedures |218| Upstream | 03-monitoring-setup | Consumes monitoring architecture for infrastructure diagram |219| Downstream | Phase 08 (User Documentation) | Feeds infrastructure details into administrator guides |220221## Standards222223- **IEEE 1016-2009** -- Software Design Descriptions. Governs architecture viewpoints and design documentation structure.224225## Resources226227- `logic.prompt` -- Executable prompt containing the step-by-step infrastructure documentation generation logic.228- `README.md` -- Quick-start guide for this skill.
Run npx skillmds@latest add peterbamuhigire/04-infrastructure-docs in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Use when producing or updating infrastructure documentation for topology, environments, dependencies, configuration ownership, recovery, and change controls. Use deployment-guide for the neighbouring concern; this skill owns the named document contract and its acceptance evidence. It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
peterbamuhigire (@peterbamuhigire) published this skill. Their other Agent Skills are listed on their SkillMD profile.