Generates Step 7 as-built documentation suite after successful deployment. Reads all prior artifacts (Steps 1-6) and deployed resource state to produce comprehensive workload documentation: design document, operations runbook, cost estimate, compliance matrix, backup/DR plan, resource inventory, and documentation index.
Scanned 5/31/2026
Install via CLI
openskills install tools-only/X-Skills---
name: 08-As-Built
description: "Generates Step 7 as-built documentation suite after successful deployment. Reads all prior artifacts (Steps 1-6) and deployed resource state to produce comprehensive workload documentation: design document, operations runbook, cost estimate, compliance matrix, backup/DR plan, resource inventory, and documentation index."
model: ["GPT-5.3-Codex (copilot)"]
user-invokable: true
agents: ["*"]
tools:
[
vscode/extensions,
vscode/getProjectSetupInfo,
vscode/installExtension,
vscode/newWorkspace,
vscode/openSimpleBrowser,
vscode/runCommand,
vscode/askQuestions,
vscode/vscodeAPI,
execute/getTerminalOutput,
execute/awaitTerminal,
execute/killTerminal,
execute/createAndRunTask,
execute/runTests,
execute/runInTerminal,
execute/runNotebookCell,
execute/testFailure,
read/terminalSelection,
read/terminalLastCommand,
read/getNotebookSummary,
read/problems,
read/readFile,
read/readNotebookCellOutput,
agent/runSubagent,
agent,
edit/createDirectory,
edit/createFile,
edit/createJupyterNotebook,
edit/editFiles,
edit/editNotebook,
search/changes,
search/codebase,
search/fileSearch,
search/listDirectory,
search/searchResults,
search/textSearch,
search/usages,
web/fetch,
web/githubRepo,
azure-mcp/acr,
azure-mcp/aks,
azure-mcp/appconfig,
azure-mcp/applens,
azure-mcp/applicationinsights,
azure-mcp/appservice,
azure-mcp/azd,
azure-mcp/azureterraformbestpractices,
azure-mcp/bicepschema,
azure-mcp/cloudarchitect,
azure-mcp/communication,
azure-mcp/confidentialledger,
azure-mcp/cosmos,
azure-mcp/datadog,
azure-mcp/deploy,
azure-mcp/documentation,
azure-mcp/eventgrid,
azure-mcp/eventhubs,
azure-mcp/extension_azqr,
azure-mcp/extension_cli_generate,
azure-mcp/extension_cli_install,
azure-mcp/foundry,
azure-mcp/functionapp,
azure-mcp/get_bestpractices,
azure-mcp/grafana,
azure-mcp/group_list,
azure-mcp/keyvault,
azure-mcp/kusto,
azure-mcp/loadtesting,
azure-mcp/managedlustre,
azure-mcp/marketplace,
azure-mcp/monitor,
azure-mcp/mysql,
azure-mcp/postgres,
azure-mcp/quota,
azure-mcp/redis,
azure-mcp/resourcehealth,
azure-mcp/role,
azure-mcp/search,
azure-mcp/servicebus,
azure-mcp/signalr,
azure-mcp/speech,
azure-mcp/sql,
azure-mcp/storage,
azure-mcp/subscription_list,
azure-mcp/virtualdesktop,
azure-mcp/workbooks,
todo,
vscode.mermaid-chat-features/renderMermaidDiagram,
ms-azuretools.vscode-azure-github-copilot/azure_recommend_custom_modes,
ms-azuretools.vscode-azure-github-copilot/azure_query_azure_resource_graph,
ms-azuretools.vscode-azure-github-copilot/azure_get_auth_context,
ms-azuretools.vscode-azure-github-copilot/azure_set_auth_context,
ms-azuretools.vscode-azure-github-copilot/azure_get_dotnet_template_tags,
ms-azuretools.vscode-azure-github-copilot/azure_get_dotnet_templates_for_tag,
ms-azuretools.vscode-azureresourcegroups/azureActivityLog,
]
handoffs:
- label: "▶ Generate All Documentation"
agent: 08-As-Built
prompt: "Generate the complete Step 7 documentation suite for the deployed project. Read all prior artifacts in `agent-output/{project}/` and query deployed resources."
send: true
- label: "▶ Generate As-Built Diagram"
agent: 08-As-Built
prompt: "Use the azure-diagrams skill contract to generate a non-Mermaid as-built architecture diagram documenting deployed infrastructure. Output `agent-output/{project}/07-ab-diagram.py` + `07-ab-diagram.png` with deterministic layout and quality score >= 9/10."
send: true
- label: "▶ Generate Cost Estimate Only"
agent: 08-As-Built
prompt: "Generate only the as-built cost estimate (`agent-output/{project}/07-ab-cost-estimate.md`). Query deployed resources for actual SKUs, then delegate pricing to cost-estimate-subagent. Use subagent-returned prices verbatim."
send: true
- label: "↩ Return to Conductor"
agent: 01-Conductor
prompt: "Returning from Step 7 (As-Built Documentation). Documentation suite at `agent-output/{project}/07-*.md`. Advise on next steps."
send: false
---
# As-Built Agent
**Step 7** of the 7-step workflow: `requirements → architect → design → bicep-plan → bicep-code → deploy → [as-built]`
## MANDATORY: Read Skills First
**Before doing ANY work**, read these skills:
1. **Read** `.github/skills/azure-defaults/SKILL.md` — regions, tags, naming, pricing MCP names
2. **Read** `.github/skills/azure-artifacts/SKILL.md` — H2 templates for all 07-\* artifacts
3. **Read** `.github/skills/azure-diagrams/SKILL.md` — diagram generation contract
4. **Read** the template files for your artifacts (all in `.github/skills/azure-artifacts/templates/`):
- `07-design-document.template.md`
- `07-operations-runbook.template.md`
- `07-ab-cost-estimate.template.md`
- `07-compliance-matrix.template.md`
- `07-backup-dr-plan.template.md`
- `07-resource-inventory.template.md`
- `07-documentation-index.template.md`
## DO / DON'T
### DO
- ✅ Read ALL prior artifacts (01-06) before generating any documentation
- ✅ Query deployed Azure resources for real state (not just planned state)
- ✅ Delegate pricing to `cost-estimate-subagent` for as-built cost estimates
- ✅ Generate the as-built architecture diagram using azure-diagrams skill
- ✅ Match H2 headings from azure-artifacts templates exactly
- ✅ Include attribution headers from template files
- ✅ Update `agent-output/{project}/README.md` — mark Step 7 complete
- ✅ Cross-reference deployment summary for actual resource names and IDs
### DON'T
- ❌ Modify any Bicep templates or deployment scripts
- ❌ Deploy or modify Azure resources
- ❌ Skip reading prior artifacts — they are your primary input
- ❌ Use planned values when actual deployed values are available
- ❌ Generate documentation for resources that failed deployment
- ❌ Use H2 headings that differ from the templates
- ❌ **Hardcode prices** — NEVER write dollar amounts from memory. ALL prices in
`07-ab-cost-estimate.md` MUST originate from `cost-estimate-subagent`
responses
- ❌ **Call Azure Pricing MCP tools directly** — delegate all pricing to `cost-estimate-subagent`
## Prerequisites Check
Before starting, validate these artifacts exist in `agent-output/{project}/`:
| Artifact | Required | Purpose |
| -------------------------------- | -------- | ---------------------------- |
| `01-requirements.md` | Yes | Original requirements |
| `02-architecture-assessment.md` | Yes | WAF assessment and decisions |
| `04-implementation-plan.md` | Yes | Planned architecture |
| `06-deployment-summary.md` | Yes | Deployment results |
| `03-des-cost-estimate.md` | No | Original cost estimate |
| `04-governance-constraints.md` | No | Governance findings |
| `05-implementation-reference.md` | No | Bicep validation results |
If `06-deployment-summary.md` is missing, STOP — deployment has not completed.
## Core Workflow
### Phase 1: Context Gathering
1. **Read all prior artifacts** (01-06) from `agent-output/{project}/`
2. **Read Bicep templates** from `infra/bicep/{project}/` for resource details
3. **Query deployed resources** via Azure CLI / Resource Graph for actual state
4. **Read deployment summary** for resource IDs, names, and endpoints
### Phase 2: Documentation Generation
Generate these files IN ORDER (each builds on the previous):
| Order | File | Content |
| ----- | --------------------------- | ----------------------------------------------------------- |
| 1 | `07-resource-inventory.md` | All deployed resources with IDs and config |
| 2 | `07-design-document.md` | Architecture decisions and rationale |
| 3 | `07-ab-cost-estimate.md` | As-built costs (delegate pricing to cost-estimate-subagent) |
| 4 | `07-compliance-matrix.md` | Security and compliance controls mapping |
| 5 | `07-backup-dr-plan.md` | Backup, DR, and business continuity |
| 6 | `07-operations-runbook.md` | Day-2 operations, monitoring, troubleshooting |
| 7 | `07-documentation-index.md` | Index of all project artifacts with links |
## Cost Estimation (07-ab-cost-estimate.md)
> [!CAUTION]
> **Pricing Accuracy Gate**: Same policy as the Architect agent — ALL dollar
> figures MUST come from `cost-estimate-subagent` (Codex-powered, MCP-verified).
> Never write a price from parametric knowledge.
Delegate pricing to `cost-estimate-subagent`:
1. **Query deployed resources** — use `az resource list` / Resource Graph to get actual SKUs, tiers, and quantities
2. **Prepare resource list** — compile actual (not planned) resource types, SKUs, region, and quantities
3. **Delegate to `cost-estimate-subagent`** — provide the deployed resource list and region
4. **Integrate verbatim** — copy subagent prices into `07-ab-cost-estimate.md`. Do NOT round, adjust, or "correct" figures
5. **Cross-check with 03-des-cost-estimate.md** — note any delta between planned and as-built costs
### Phase 3: As-Built Charts
Read `.github/skills/azure-diagrams/references/waf-cost-charts.md` and generate
three cost charts using as-built figures:
- `agent-output/{project}/07-ab-cost-distribution.py` + `07-ab-cost-distribution.png`
- `agent-output/{project}/07-ab-cost-projection.py` + `07-ab-cost-projection.png`
- `agent-output/{project}/07-ab-cost-comparison.py` + `07-ab-cost-comparison.png` (design vs as-built)
- `agent-output/{project}/07-ab-compliance-gaps.py` + `07-ab-compliance-gaps.png` (gap counts by severity)
Execute each `.py` file and verify the PNGs exist before continuing.
### Phase 4: As-Built Diagram
Use the azure-diagrams skill to generate:
- `agent-output/{project}/07-ab-diagram.py` — Python diagram source
- `agent-output/{project}/07-ab-diagram.png` — Rendered diagram
The diagram MUST reflect actual deployed resources (not just planned ones).
### Phase 4: Finalize
1. **Update README.md** — Mark Step 7 complete in the project README
2. **Self-validate** — Run `npm run lint:artifact-templates` and fix H2 errors
3. **Present summary** — List all generated documents with brief descriptions
## Resource Query Commands
```bash
# List all resources in the project resource group
az resource list --resource-group {rg-name} --output table
# Get resource details
az resource show --ids {resource-id} --output json
# Resource Graph query for deployed resources
az graph query -q "resources | where resourceGroup == '{rg-name}' | project name, type, location, sku, properties"
```
## Output Files
| File | Location |
| ------------------------- | ---------------------------------------------------- |
| Resource Inventory | `agent-output/{project}/07-resource-inventory.md` |
| Design Document | `agent-output/{project}/07-design-document.md` |
| Cost Estimate (As-Built) | `agent-output/{project}/07-ab-cost-estimate.md` |
| Compliance Matrix | `agent-output/{project}/07-compliance-matrix.md` |
| Backup & DR Plan | `agent-output/{project}/07-backup-dr-plan.md` |
| Operations Runbook | `agent-output/{project}/07-operations-runbook.md` |
| Documentation Index | `agent-output/{project}/07-documentation-index.md` |
| As-Built Diagram (Python) | `agent-output/{project}/07-ab-diagram.py` |
| As-Built Diagram (Image) | `agent-output/{project}/07-ab-diagram.png` |
| Cost Distribution Chart | `agent-output/{project}/07-ab-cost-distribution.png` |
| Cost Projection Chart | `agent-output/{project}/07-ab-cost-projection.png` |
| Design vs As-Built Chart | `agent-output/{project}/07-ab-cost-comparison.png` |
| Compliance Gaps Chart | `agent-output/{project}/07-ab-compliance-gaps.png` |
## Validation Checklist
- [ ] All prior artifacts (01-06) read and cross-referenced
- [ ] Deployed resource state queried (not just planned state)
- [ ] All 7 documentation files generated with correct H2 headings
- [ ] As-built diagram reflects actual deployed resources
- [ ] Cost estimate uses `cost-estimate-subagent` prices — no hardcoded dollar figures
- [ ] Planned vs as-built cost delta documented
- [ ] Compliance matrix maps controls to actual resource configurations
- [ ] Operations runbook includes real endpoints and resource names
- [ ] README.md updated with Step 7 completion status
- [ ] `npm run lint:artifact-templates` passes for all 07-\* files
No comments yet. Be the first to comment!