ワンクリックで
generate-adrs
Read all planning data, propose relevant ADR topics, and generate Architecture Decision Records following the project template
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Read all planning data, propose relevant ADR topics, and generate Architecture Decision Records following the project template
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generate Azure infrastructure as Bicep code from planning data
Generate Azure infrastructure as Terraform code from planning data
Generate a Mermaid architecture diagram derived from application components and infrastructure context data
Configure an individual application component by mapping it to an Azure service with SKU, region, and service-specific settings
Document source control, CI/CD platform, environments, deployment process, and quality gates for the application
Gather network topology, landing zones, existing resources, and connectivity requirements for Azure infrastructure planning
| name | generate-adrs |
| description | Read all planning data, propose relevant ADR topics, and generate Architecture Decision Records following the project template |
This skill reads all available planning data and generates Architecture Decision Records (ADRs) for the most significant architectural decisions. It creates one or more files at infra/architecture-decisions/adrs/adr-{NNN}-{slug}.md following the template in infra/architecture-decisions/adr-template.md.
The generated ADRs will be displayed in the UI when the user runs npx @zureltd/az-infra-harness and navigates to the Architecture Decisions section.
Run this skill when:
/generate-adrsRecommended prerequisites (not strictly required):
/application-components)/configure-component)/infrastructure-context)Read all available planning data files:
infra/application-definition/application-overview.mdinfra/application-definition/application-components.mdinfra/application-definition/non-functional-requirements.mdinfra/context/infrastructure-context.mdinfra/context/platform-context.mdinfra/context/development-context.mdinfra/application-architecture/components/*.jsoninfra/application-architecture/deployment-strategy.mdinfra/architecture-decisions/adr-template.mdAlso check infra/architecture-decisions/adrs/ for any existing ADRs to:
Based on the planning data, identify the most significant architectural decisions that warrant an ADR. These are decisions where:
Common ADR topics to consider (based on what's in the planning data):
| Topic | Trigger |
|---|---|
| Compute platform | Compute components are defined and configured |
| Database platform | Data components include a database |
| Caching strategy | Data components include Redis or similar |
| API design | Compute components include APIs |
| Networking model | Hub-spoke vs. flat topology in infrastructure context |
| Authentication & authorization | Identity & access info in platform context |
| Secret management | Key Vault strategy mentioned in platform context |
| CI/CD platform | CI/CD platform captured in development context |
| Deployment strategy | Blue-green/canary choices in deployment strategy |
| Observability stack | Monitoring tools mentioned in development context |
| IaC toolchain | Bicep vs. Terraform decision if apparent |
Present the proposed topics to the user:
Based on your planning data, here are the architectural decisions I recommend documenting as ADRs:
1. **Compute platform** — [brief rationale for why this is worth documenting, e.g., "You've chosen Container Apps over AKS or App Service — document the trade-offs"]
2. **Database platform** — [brief rationale]
3. **Networking model** — [brief rationale]
4. **Authentication approach** — [brief rationale]
5. **CI/CD platform** — [brief rationale]
Which of these would you like to generate? You can:
- Say "all" to generate all of them
- List the numbers (e.g., "1, 3, 5")
- Add a topic I haven't listed (describe it and I'll generate it)
- Say "skip" to skip any topic
Existing ADRs (already documented, won't regenerate): [list if any]
Wait for the user's selection before proceeding.
This skill MUST comply with the shared Interaction & Validation Standard:
.opencode/skills/_shared/interaction-validation-standard.md
Use the TodoWrite tool to track each ADR to be generated as a high-priority task.
For each selected ADR topic, check whether the planning data provides enough information to write a complete ADR. If key information is missing, ask:
For the **[Topic]** ADR, I need a bit more information:
- What alternatives did you consider? (I found [X] from your planning data — are there others you evaluated?)
- What were the key factors in your decision?
- Are there any known risks or trade-offs from this choice?
Only ask if the information isn't already in the planning data. If the planning data is sufficient, proceed directly to generation.
For each selected topic, generate an ADR following the template in infra/architecture-decisions/adr-template.md.
File naming convention:
adr-001-{slug}.md where NNN is zero-padded (3 digits)adr-001-container-platform.md, adr-002-database-selection.md, adr-003-networking-model.mdContent guidelines:
draft for newly generated ADRscompute, data, networking, security, deployment (these are the only values the UI parser recognizes)Do not use generic placeholder text. The ADRs must be specific to this application's context.
After drafting all ADRs, show a summary to the user:
I've drafted [N] ADR(s):
1. **adr-001-container-platform.md** — Use Azure Container Apps for API Backend and Background Worker
Status: draft | Category: compute
2. **adr-002-database-selection.md** — Use Azure SQL Database for Customer Database
Status: draft | Category: data
[etc.]
Would you like to review any of these before saving? Or shall I save all of them?
If the user wants to review a specific ADR, show its full content and allow edits before saving.
Target location: infra/architecture-decisions/adrs/
Pre-save checks:
infra/architecture-decisions/adrs/ existsConflict resolution: If adr-001-*.md already exists, increment to adr-002-*.md for the new ADR (don't overwrite).
Error handling:
✅ Generated [N] ADR(s) successfully!
📄 Files created:
- infra/architecture-decisions/adrs/adr-001-container-platform.md
- infra/architecture-decisions/adrs/adr-002-database-selection.md
[etc.]
🌐 To view in the UI:
1. Ensure the Az Infra Harness is running: `npx @zureltd/az-infra-harness`
2. Refresh your browser
3. Navigate to the Architecture Decisions section
4. Each ADR card should now appear with a blue border
You can use /refine-adr to update the status of any ADR (e.g., from draft to accepted), or add more context to any section.
The next step is to run /generate-code-bicep or /generate-code-terraform to generate your infrastructure as code.
Agent: "I've read your planning data. Based on your choices, I recommend documenting these decisions as ADRs:
Which would you like to generate? Say 'all' or list numbers."
User: "All of them."
Agent: "I have enough information from your planning data to draft all four. Let me generate them now..."
[Generates 4 ADRs]
Agent: "Here's a summary of the 4 ADRs I've drafted: [shows summary]. Would you like to review any before I save?"
User: "Looks good, save them all."
Agent: "✅ Generated 4 ADR(s) successfully!"
infra/architecture-decisions/adr-template.mdinfra/architecture-decisions/adrs/adr-001-container-platform.md.opencode/skills/_shared/interaction-validation-standard.mdDATA-STRUCTURE.mdinfra/architecture-decisions/adrs/adr-{NNN}-{slug}.md convention