Commit db24637
authored
feat(chatmodes): add architecture diagram builder agent (#145)
# feat(chatmodes): add architecture diagram builder agent
Added a new Copilot chatmode that generates ASCII block diagrams from
Azure infrastructure-as-code files, enabling visual representation of
resource relationships and network flows directly within the development
workflow.
## Description
- **feat**(_chatmodes_): Added `arch-diagram-builder.chatmode.md` agent
that parses Terraform, Bicep, ARM, or shell scripts to identify Azure
resources and generate ASCII architecture diagrams
- Defines workflow for scope discovery, infrastructure parsing,
relationship identification, and diagram generation
- Establishes diagram conventions including arrow types (`---->` for
data flow, `<--->` for bidirectional, `- - >` for optional)
- Documents grouping patterns using pure ASCII characters for consistent
alignment
- Provides layout guidelines placing external services at top, compute
in middle, and data stores at bottom
- Includes complete example diagram demonstrating AKS platform
architecture with VNet, NAT Gateway, ACR, PostgreSQL, and monitoring
resources
## Related Issue(s)
<!-- No issue references found in commits or branch name -->
## Type of Change
Select all that apply:
**Code & Documentation:**
- [ ] Bug fix (non-breaking change fixing an issue)
- [x] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to
change)
- [ ] Documentation update
**Infrastructure & Configuration:**
- [ ] GitHub Actions workflow
- [ ] Linting configuration (markdown, PowerShell, etc.)
- [ ] Security configuration
- [ ] DevContainer configuration
- [ ] Dependency update
**AI Artifacts:**
- [ ] Reviewed contribution with `prompt-builder` chatmode and addressed
all feedback
- [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
- [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
- [x] Copilot chatmode (`.github/chatmodes/*.chatmode.md`)
> **Note for AI Artifact Contributors**:
>
> - **Chatmodes**: Research, indexing/referencing other project (using
standard VS Code GitHub Copilot/MCP tools), planning, and general
implementation chatmodes likely already exist. Review
`.github/chatmodes/` before creating new ones.
> - **Model Versions**: Only contributions targeting the **latest
Anthropic and OpenAI models** will be accepted. Older model versions
(e.g., GPT-3.5, Claude 3) will be rejected.
> - See [Chatmodes Not
Accepted](../docs/contributing/chatmodes.md#chatmodes-not-accepted) and
[Model Version
Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements).
**Other:**
- [ ] Script/automation (`.ps1`, `.sh`, `.py`)
- [ ] Other (please describe):
## Sample Prompts (for AI Artifact Contributions)
**User Request:**
> "Generate an architecture diagram for my Terraform files in the
`infra/` folder"
**Execution Flow:**
1. Agent asks for scope confirmation or uses provided context files
2. Reads Terraform/Bicep/ARM files to identify Azure resources
3. Maps dependencies, network flows, and service connections
4. Generates ASCII block diagram with resources and relationships
**Output Artifacts:**
```markdown
## Architecture Diagram: [Name]
+------------------+ +------------------+
| Service Name |----->| Service Name |
+------------------+ +------------------+
### Legend
[Arrow meanings used in this diagram]
### Key Relationships
[Notable connections and dependencies]
```
**Success Indicators:**
- Diagram accurately represents resources from IaC files
- Relationships reflect actual dependencies and network flows
- Layout follows documented guidelines (external at top, data at bottom)
## Testing
<!-- Describe how you tested these changes -->
## Checklist
### Required Checks
- [ ] Documentation is updated (if applicable)
- [x] Files follow existing naming conventions
- [x] Changes are backwards compatible (if applicable)
### AI Artifact Contributions
- [ ] Used `prompt-builder` chatmode to review contribution
- [ ] Addressed all feedback from `prompt-builder` review
- [ ] Verified contribution follows common standards and type-specific
requirements
### Required Automated Checks
The following validation commands must pass before merging:
- [x] Markdown linting: `npm run lint:md`
- [x] Spell checking: `npm run spell-check`
- [x] Frontmatter validation: `npm run lint:frontmatter`
- [x] Link validation: `npm run lint:md-links`
- [x] PowerShell analysis: `npm run lint:ps`
## Security Considerations
- [x] This PR does not contain any sensitive or NDA information
- [x] Any new dependencies have been reviewed for security issues
- [x] Security-related scripts follow the principle of least privilege
## Additional Notes
This chatmode focuses on pure ASCII diagrams for maximum compatibility
across terminals, editors, and documentation systems without requiring
external rendering tools.
🏗️ - Generated by Copilot1 parent b8a4c7a commit db24637
1 file changed
Lines changed: 129 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments