Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
DevOps Documentation Creator
L3 Worker that creates infrastructure.md and runbook.md. Infrastructure inventory is always created; runbook is conditional on Docker presence.
Purpose & Scope
- Creates infrastructure.md (always) — declarative inventory: WHAT is deployed WHERE
- Creates runbook.md (if hasDocker) — procedural guide: HOW to deploy/restart/troubleshoot
- Receives Context Store from ln-110-project-docs-coordinator
- Never gathers context itself; uses coordinator input
Invocation (who/when)
- ln-110-project-docs-coordinator: ALWAYS invoked (infrastructure.md is unconditional)
- Never called directly by users
Inputs
From coordinator:
contextStore: Context Store with DevOps-specific data
- DOCKER_COMPOSE_DEV (development setup)
- DOCKER_COMPOSE_PROD (production setup)
- ENV_VARIABLES (from .env.example)
- STARTUP_SEQUENCE (services order)
- DEPLOYMENT_TARGET (AWS, Vercel, Heroku)
- CI_CD_PIPELINE (from .github/workflows)
- DOCKER_SERVICES (parsed from docker-compose.yml services)
- DEPLOYMENT_SCALE ("single" | "multi" | "auto-scaling" | "gpu-based")
- DEVOPS_CONTACTS (from CODEOWNERS, package.json author, git log)
- HAS_GPU (detected from docker-compose nvidia runtime)
- SERVER_INVENTORY (from SSH config, deploy targets)
- DOMAIN_DNS (from docker-compose VIRTUAL_HOST vars, nginx configs)
- ARTIFACT_REPOSITORY (from .env registry URLs, .npmrc, pip.conf)
- HOST_REQUIREMENTS (from docker-compose deploy.resources.limits)
targetDir: Project root directory
flags: { hasDocker }
Documents Created (2: 1 always + 1 conditional)
| File |
Condition |
Questions |
Auto-Discovery |
| docs/project/infrastructure.md |
Always |
Q52-Q55 |
Medium |
| docs/project/runbook.md |
hasDocker |
Q46-Q51 |
High |
Workflow
Phase 1: Check Conditions
- Parse flags from coordinator
- infrastructure.md: ALWAYS proceeds (no condition check)
- runbook.md: Create ONLY if
hasDocker=true
- If target file already exists: skip that file (idempotent)
Phase 2a: Create infrastructure.md (unconditional)
- Check if
docs/project/infrastructure.md exists
- If exists: skip with log
- If not exists:
- Copy
references/templates/infrastructure_template.md
- Replace placeholders with Context Store values
- Populate Server Inventory from SERVER_INVENTORY
- Populate Port Allocation from DOCKER_SERVICES port mappings
- Populate Deployed Services from DOCKER_SERVICES
- Populate CI/CD Pipeline from CI_CD_PIPELINE
- Mark
[TBD: X] for missing data
- Conditional Section Pruning:
- If no CI/CD detected: mark CI/CD Pipeline section as
[TBD: Configure CI/CD]
- If no ARTIFACT_REPOSITORY: mark Artifact Repository as
[TBD: Configure registry]
- If single server / no SERVER_INVENTORY: simplify to single-column table
- If !HAS_GPU: remove GPU column from Server Inventory and Deployed Services
- Populate Deployed Services ONLY from DOCKER_SERVICES (no generic examples)
Phase 2b: Create runbook.md (conditional)
- If
!hasDocker: skip entirely
- Check if
docs/project/runbook.md exists
- If exists: skip with log
- If not exists:
- Copy
references/templates/runbook_template.md
- Replace placeholders with Context Store values
- Populate setup steps from package.json scripts
- Extract env vars from .env.example
- Mark
[TBD: X] for missing data
- Conditional Section Pruning:
- If DEPLOYMENT_SCALE != "multi" or "auto-scaling": Remove scaling/load balancer sections
- If !HAS_GPU: Remove GPU-related sections (nvidia runtime, CUDA)
- If service not in DOCKER_SERVICES: Remove that service's examples
- If DEVOPS_CONTACTS empty: Mark as
[TBD: Provide DevOps team contacts via Q50]
- Populate service dependencies ONLY from DOCKER_SERVICES
- Populate port mapping ONLY from docker-compose.yml ports section
Phase 3: Self-Validate
For infrastructure.md:
- Check SCOPE tag
- Validate sections: Server Inventory, Port Allocation, Deployed Services
- Check no procedural content leaked (belongs in runbook.md)
- Check Maintenance section
For runbook.md (if created):
- Check SCOPE tag
- Validate sections: Local Development Setup, Deployment, Troubleshooting
- Check env vars documented
- Check Maintenance section
Phase 4: Return Status
{
"created": ["docs/project/infrastructure.md", "docs/project/runbook.md"],
"skipped": [],
"tbd_count": 3,
"validation": "OK"
}
Critical Notes
Core Rules
- infrastructure.md: Always created, no condition
- runbook.md: Conditional on hasDocker
- Heavy auto-discovery: Most data from docker-compose.yml, .env.example, package.json, SSH config
- Reproducible: Setup steps must be testable and repeatable
- Idempotent: Never overwrite existing files
NO_CODE_EXAMPLES Rule (MANDATORY)
Both documents describe inventory/procedures, NOT implementations:
- FORBIDDEN: Full Docker configs, CI/CD pipelines (>5 lines), full nginx configs
- ALLOWED: Command examples (1-3 lines), env var tables, step lists, verification commands
- INSTEAD OF CODE: "See docker-compose.yml"
Stack Adaptation Rule (MANDATORY)
- Commands must match project stack (npm vs pip vs go)
- Link to correct cloud provider docs (AWS/Azure/GCP)
- Never mix stack references (no npm commands in Python project)
Format Priority (MANDATORY)
Tables (env vars, ports, services, servers) > Lists (setup steps) > Text
Definition of Done
- infrastructure.md created (always)
- runbook.md created if hasDocker
- Infrastructure: server inventory, ports, services documented
- Runbook: setup steps, deployment, troubleshooting documented
- All env vars from .env.example included in runbook
- Actuality verified: all document facts match current code (paths, functions, APIs, configs exist and are accurate)
- Status returned to coordinator
Reference Files
- Templates:
references/templates/infrastructure_template.md, references/templates/runbook_template.md
- Questions:
references/questions_devops.md (Q46-Q51 runbook, Q52-Q55 infrastructure)
Version: 2.0.0
Last Updated: 2025-01-12
1---2name: ln-115-devops-docs-creator3description: "Creates infrastructure.md (always) and runbook.md (if hasDocker). DevOps documentation worker."4license: MIT5metadata:6 source: https://skillmd.com/skills/levalencia/ln-115-devops-docs-creator7---89> **Paths:** File paths (`shared/`, `references/`, `../ln-*`) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.1011# DevOps Documentation Creator1213L3 Worker that creates infrastructure.md and runbook.md. Infrastructure inventory is always created; runbook is conditional on Docker presence.1415## Purpose & Scope16- Creates infrastructure.md (always) — declarative inventory: WHAT is deployed WHERE17- Creates runbook.md (if hasDocker) — procedural guide: HOW to deploy/restart/troubleshoot18- Receives Context Store from ln-110-project-docs-coordinator19- Never gathers context itself; uses coordinator input2021## Invocation (who/when)22- **ln-110-project-docs-coordinator:** ALWAYS invoked (infrastructure.md is unconditional)23- Never called directly by users2425## Inputs26From coordinator:27- `contextStore`: Context Store with DevOps-specific data28 - DOCKER_COMPOSE_DEV (development setup)29 - DOCKER_COMPOSE_PROD (production setup)30 - ENV_VARIABLES (from .env.example)31 - STARTUP_SEQUENCE (services order)32 - DEPLOYMENT_TARGET (AWS, Vercel, Heroku)33 - CI_CD_PIPELINE (from .github/workflows)34 - DOCKER_SERVICES (parsed from docker-compose.yml services)35 - DEPLOYMENT_SCALE ("single" | "multi" | "auto-scaling" | "gpu-based")36 - DEVOPS_CONTACTS (from CODEOWNERS, package.json author, git log)37 - HAS_GPU (detected from docker-compose nvidia runtime)38 - SERVER_INVENTORY (from SSH config, deploy targets)39 - DOMAIN_DNS (from docker-compose VIRTUAL_HOST vars, nginx configs)40 - ARTIFACT_REPOSITORY (from .env registry URLs, .npmrc, pip.conf)41 - HOST_REQUIREMENTS (from docker-compose deploy.resources.limits)42- `targetDir`: Project root directory43- `flags`: { hasDocker }4445## Documents Created (2: 1 always + 1 conditional)4647| File | Condition | Questions | Auto-Discovery |48|------|-----------|-----------|----------------|49| docs/project/infrastructure.md | Always | Q52-Q55 | Medium |50| docs/project/runbook.md | hasDocker | Q46-Q51 | High |5152## Workflow5354### Phase 1: Check Conditions551. Parse flags from coordinator562. infrastructure.md: ALWAYS proceeds (no condition check)573. runbook.md: Create ONLY if `hasDocker=true`584. If target file already exists: skip that file (idempotent)5960### Phase 2a: Create infrastructure.md (unconditional)611. Check if `docs/project/infrastructure.md` exists622. If exists: skip with log633. If not exists:64 - Copy `references/templates/infrastructure_template.md`65 - Replace placeholders with Context Store values66 - Populate Server Inventory from SERVER_INVENTORY67 - Populate Port Allocation from DOCKER_SERVICES port mappings68 - Populate Deployed Services from DOCKER_SERVICES69 - Populate CI/CD Pipeline from CI_CD_PIPELINE70 - Mark `[TBD: X]` for missing data714. **Conditional Section Pruning:**72 - If no CI/CD detected: mark CI/CD Pipeline section as `[TBD: Configure CI/CD]`73 - If no ARTIFACT_REPOSITORY: mark Artifact Repository as `[TBD: Configure registry]`74 - If single server / no SERVER_INVENTORY: simplify to single-column table75 - If !HAS_GPU: remove GPU column from Server Inventory and Deployed Services76 - Populate Deployed Services ONLY from DOCKER_SERVICES (no generic examples)7778### Phase 2b: Create runbook.md (conditional)791. If `!hasDocker`: skip entirely802. Check if `docs/project/runbook.md` exists813. If exists: skip with log824. If not exists:83 - Copy `references/templates/runbook_template.md`84 - Replace placeholders with Context Store values85 - Populate setup steps from package.json scripts86 - Extract env vars from .env.example87 - Mark `[TBD: X]` for missing data885. **Conditional Section Pruning:**89 - If DEPLOYMENT_SCALE != "multi" or "auto-scaling": Remove scaling/load balancer sections90 - If !HAS_GPU: Remove GPU-related sections (nvidia runtime, CUDA)91 - If service not in DOCKER_SERVICES: Remove that service's examples92 - If DEVOPS_CONTACTS empty: Mark as `[TBD: Provide DevOps team contacts via Q50]`93 - Populate service dependencies ONLY from DOCKER_SERVICES94 - Populate port mapping ONLY from docker-compose.yml ports section9596### Phase 3: Self-Validate97**For infrastructure.md:**981. Check SCOPE tag992. Validate sections: Server Inventory, Port Allocation, Deployed Services1003. Check no procedural content leaked (belongs in runbook.md)1014. Check Maintenance section102103**For runbook.md (if created):**1041. Check SCOPE tag1052. Validate sections: Local Development Setup, Deployment, Troubleshooting1063. Check env vars documented1074. Check Maintenance section108109### Phase 4: Return Status110```json111{112 "created": ["docs/project/infrastructure.md", "docs/project/runbook.md"],113 "skipped": [],114 "tbd_count": 3,115 "validation": "OK"116}117```118119## Critical Notes120121### Core Rules122- **infrastructure.md:** Always created, no condition123- **runbook.md:** Conditional on hasDocker124- **Heavy auto-discovery:** Most data from docker-compose.yml, .env.example, package.json, SSH config125- **Reproducible:** Setup steps must be testable and repeatable126- **Idempotent:** Never overwrite existing files127128### NO_CODE_EXAMPLES Rule (MANDATORY)129Both documents describe **inventory/procedures**, NOT implementations:130- **FORBIDDEN:** Full Docker configs, CI/CD pipelines (>5 lines), full nginx configs131- **ALLOWED:** Command examples (1-3 lines), env var tables, step lists, verification commands132- **INSTEAD OF CODE:** "See [docker-compose.yml](../docker-compose.yml)"133134### Stack Adaptation Rule (MANDATORY)135- Commands must match project stack (npm vs pip vs go)136- Link to correct cloud provider docs (AWS/Azure/GCP)137- Never mix stack references (no npm commands in Python project)138139### Format Priority (MANDATORY)140Tables (env vars, ports, services, servers) > Lists (setup steps) > Text141142## Definition of Done143- infrastructure.md created (always)144- runbook.md created if hasDocker145- Infrastructure: server inventory, ports, services documented146- Runbook: setup steps, deployment, troubleshooting documented147- All env vars from .env.example included in runbook148- **Actuality verified:** all document facts match current code (paths, functions, APIs, configs exist and are accurate)149- Status returned to coordinator150151## Reference Files152- Templates: `references/templates/infrastructure_template.md`, `references/templates/runbook_template.md`153- Questions: `references/questions_devops.md` (Q46-Q51 runbook, Q52-Q55 infrastructure)154155---156**Version:** 2.0.0157**Last Updated:** 2025-01-12