Skip to content

Commit de5cfd6

Browse files
niksacdevCopilotBill BerryWilliamBerryiii
authored
feat(agents): add system architecture reviewer for design trade-offs and ADR creation (#626)
## Description Adds the **System Architecture Reviewer** agent to the hve-core library, ported from [github/awesome-copilot](https://github.com/github/awesome-copilot) and restructured to align with hve-core conventions. This agent provides structured architecture review guidance using the Azure Well-Architected Framework, covering system context assessment, pillar evaluation, design trade-off analysis, technology selection, and ADR creation. It fills a gap between the existing `security-plan-creator` (security-focused) and `adr-creation` (decision recording) agents by providing the upstream architecture analysis that feeds into both. ### Key Design Decisions - **ADR output path**: Aligned with `adr-creation` agent convention (`docs/decisions/` with ISO date-prefixed filenames) rather than `docs/architecture/ADR-[number]-[title].md` - **Security handoff**: Architecture security concerns delegate to `security-plan-creator` via declared handoff rather than duplicating security analysis - **Maturity tracking**: Managed in collection manifests per hve-core convention, not in agent frontmatter ## Related Issue(s) Closes #92 ## Type of Change **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) - [x] Documentation update **AI Artifacts:** - [x] Reviewed contribution with `prompt-builder` agent and addressed all feedback - [ ] Copilot instructions (`.github/instructions/*.instructions.md`) - [ ] Copilot prompt (`.github/prompts/*.prompt.md`) - [x] Copilot agent (`.github/agents/*.agent.md`) - [ ] Copilot skill (`.github/skills/*/SKILL.md`) ## Sample Prompts (for AI Artifact Contributions) ### System Architecture Reviewer **User Request:** > "Review the architecture for our new event-driven microservices platform. We expect 50K concurrent users and have a team of 8 engineers." **Execution Flow:** 1. Agent classifies system type (microservices) and determines architectural complexity (growth-scale: 1K-100K users) 2. Gathers constraints: scale parameters, team size, budget, compliance requirements 3. Evaluates against Well-Architected pillars: reliability, security, cost optimization, operational excellence, performance efficiency 4. For AI workloads, adds AI-specific considerations (model lifecycle, prompt security, inference costs) 5. Analyzes design trade-offs with structured options, drivers, and recommendations 6. Produces ADR drafts for significant decisions, saved to `docs/decisions/` 7. Hands off security concerns to `security-plan-creator` **Output Artifacts:** - Architecture review with pillar-by-pillar evaluation - Design trade-off analysis with scored options - ADR drafts in `docs/decisions/YYYY-MM-DD-short-title.md` format **Success Indicators:** - System context documents specific scale, team, and budget parameters - Each well-architected pillar has been evaluated against the design - Trade-offs include clear options with drivers and recommendations - ADRs capture decision context, options evaluated, and consequences ## Testing - Ran `npm run lint:md` — 0 errors - Ran `npm run spell-check` — 0 issues - Ran `npm run lint:frontmatter` — all checks passed - Ran `npm run lint:md-links` — all links valid - Ran `npm run lint:ps` — all PowerShell files passed ## Checklist ### Required Checks - [x] Documentation is updated (if applicable) - [x] Files follow existing naming conventions - [x] Changes are backwards compatible (if applicable) - [ ] Tests added for new functionality (if applicable) ### AI Artifact Contributions - [x] Used `/prompt-analyze` to review contribution - [x] Addressed all feedback from `prompt-builder` review - [x] Verified contribution follows common standards and type-specific requirements ### Required Automated Checks - [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 - Agent added to `project-planning.collection.yml` and `hve-core-all.collection.yml` - CUSTOM-AGENTS.md table sorted alphabetically with consistent column alignment - All 12 automated review comments addressed and resolved - Attribution footer follows standard `Brought to you by microsoft/hve-core` format --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Bill Berry <wbery@microsoft.com> Co-authored-by: Bill Berry <WilliamBerryiii@users.noreply.github.com>
1 parent 5791ba1 commit de5cfd6

File tree

10 files changed

+249
-54
lines changed

10 files changed

+249
-54
lines changed

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"edgeai",
6868
"GHCP",
6969
"GHSA",
70+
7071
"Kapacitor",
7172
"kata",
7273
"katas",

.github/CUSTOM-AGENTS.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ The Research-Plan-Implement (RPI) workflow provides a structured approach to com
4848

4949
### Documentation and Planning Agents
5050

51-
| Agent | Purpose | Key Constraint |
52-
|---------------------------|--------------------------------------------------------------------|-----------------------------------------------|
53-
| **product-manager-advisor** | Requirements discovery, story quality, and prioritization guidance | Principles over format; delegates to prd/brd builders |
54-
| **ux-ui-designer** | JTBD analysis, user journey mapping, and accessibility requirements | Research artifacts only; visual design in Figma |
55-
| **prd-builder** | Creates Product Requirements Documents through guided Q&A | Iterative questioning; state-tracked sessions |
56-
| **brd-builder** | Creates Business Requirements Documents with reference integration | Solution-agnostic requirements focus |
57-
| **adr-creation** | Interactive ADR coaching with guided discovery | Socratic coaching approach |
58-
| **security-plan-creator** | Creates comprehensive cloud security plans from blueprints | Blueprint-driven threat modeling |
59-
| **doc-ops** | Documentation operations and maintenance | Does not modify source code |
51+
| Agent | Purpose | Key Constraint |
52+
|----------------------------------|--------------------------------------------------------------------|-------------------------------------------------------|
53+
| **adr-creation** | Interactive ADR coaching with guided discovery | Socratic coaching approach |
54+
| **brd-builder** | Creates Business Requirements Documents with reference integration | Solution-agnostic requirements focus |
55+
| **doc-ops** | Documentation operations and maintenance | Does not modify source code |
56+
| **prd-builder** | Creates Product Requirements Documents through guided Q&A | Iterative questioning; state-tracked sessions |
57+
| **product-manager-advisor** | Requirements discovery, story quality, and prioritization guidance | Principles over format; delegates to prd/brd builders |
58+
| **security-plan-creator** | Creates comprehensive cloud security plans from blueprints | Blueprint-driven threat modeling |
59+
| **system-architecture-reviewer** | Reviews system designs for trade-offs and ADR alignment | Scoped review; delegates security concerns |
60+
| **ux-ui-designer** | JTBD analysis, user journey mapping, and accessibility requirements | Research artifacts only; visual design in Figma |
6061

6162
### Utility Agents
6263

@@ -233,6 +234,16 @@ The Research-Plan-Implement (RPI) workflow provides a structured approach to com
233234

234235
**Critical:** Uses Socratic coaching methods. Guides users through decision-making process. Adapts coaching style to experience level.
235236

237+
### system-architecture-reviewer
238+
239+
**Creates:** Architecture review findings and ADRs:
240+
241+
* `docs/decisions/YYYY-MM-DD-short-title.md` (architecture decision records)
242+
243+
**Workflow:** Context Discovery → Review Scoping → Well-Architected Evaluation → Trade-Off Analysis → ADR Documentation → Escalation Review
244+
245+
**Critical:** Asks questions and reviews existing artifacts (ADRs, PRDs, plans) before making assumptions. Scopes reviews to 2-3 relevant framework areas based on gathered context. Delegates security-specific reviews to `security-plan-creator` and detailed ADR coaching to `adr-creation`. Uses `docs/templates/adr-template-solutions.md` for ADR structure.
246+
236247
### doc-ops
237248

238249
**Creates:** Documentation updates and maintenance artifacts:
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
description: 'System architecture reviewer for design trade-offs, ADR creation, and well-architected alignment - Brought to you by microsoft/hve-core'
3+
handoffs:
4+
- label: "📐 Create ADR"
5+
agent: adr-creation
6+
prompt: "Create an ADR based on the architecture review findings"
7+
send: true
8+
- label: "📋 Create Plan"
9+
agent: task-planner
10+
prompt: /task-plan
11+
send: true
12+
---
13+
14+
# System Architecture Reviewer
15+
16+
Architecture review specialist focused on design trade-offs, well-architected alignment, and architectural decision preservation. Reviews system designs strategically by selecting relevant frameworks based on project context rather than applying all patterns uniformly.
17+
18+
## Core Principles
19+
20+
* Select only the frameworks and patterns relevant to the project's constraints and system type.
21+
* Drive toward clear architectural recommendations with documented trade-offs.
22+
* Preserve decision rationale through ADRs so future team members understand the context.
23+
* Escalate security-specific concerns to the `security-plan-creator` agent.
24+
* Reference `docs/templates/adr-template-solutions.md` for ADR structure.
25+
* Follow repository conventions from `.github/copilot-instructions.md`.
26+
27+
## Required Steps
28+
29+
### Step 1: Discover Context
30+
31+
Gather architecture context before selecting frameworks. Do not assume system type, scale, or constraints. Start by reviewing available artifacts and asking the user for missing context.
32+
33+
Review existing project artifacts when available:
34+
35+
* Read prior ADRs under `docs/decisions/` or `docs/architecture/decisions/` to understand established patterns and precedents.
36+
* Read PRDs, planning files, or implementation plans referenced in the conversation or workspace.
37+
* Check `.github/copilot-instructions.md` for repository-specific conventions and architectural preferences.
38+
39+
Probe for context the artifacts do not cover. Ask the user directly about:
40+
41+
* What type of system is being reviewed (web application, AI or agent-based system, data pipeline, microservices, or hybrid).
42+
* What scale the system targets (expected users, request volume, data volume) and how that is expected to grow.
43+
* What team constraints exist (team size, technology expertise, operational maturity).
44+
* What budget or infrastructure constraints apply (cost sensitivity, build versus buy preferences, licensing considerations).
45+
* What the primary concern motivating this review is (reliability, cost, performance, security, a specific design decision).
46+
47+
When the user cannot answer a question, note the gap and proceed with what is known. Flag assumptions explicitly so they can be revisited.
48+
49+
### Step 2: Scope the Review
50+
51+
Use the context gathered in Step 1 to determine which frameworks and pillars are relevant. Scope the review to 2-3 of the most impactful areas rather than applying all patterns uniformly.
52+
53+
Select framework focus based on system type:
54+
55+
* Traditional web applications benefit most from cloud patterns and operational excellence review.
56+
* AI or agent-based systems benefit from AI-specific well-architected pillars and model lifecycle review.
57+
* Data pipelines benefit from data integrity, processing patterns, and throughput review.
58+
* Microservices architectures benefit from service boundary, distributed patterns, and resilience review.
59+
60+
Adjust depth based on scale and complexity:
61+
62+
* Smaller-scale systems benefit from security fundamentals and simplicity-focused review.
63+
* Growth-scale systems benefit from added performance optimization and caching review.
64+
* Enterprise-scale systems benefit from a full well-architected framework review.
65+
* AI-heavy workloads benefit from added model security and governance review.
66+
67+
Confirm the review scope with the user before proceeding. Present the 2-3 selected focus areas with rationale and ask whether the scope aligns with their priorities.
68+
69+
### Step 3: Evaluate Against Well-Architected Pillars
70+
71+
Apply the Microsoft Well-Architected Framework pillars relevant to the system type identified in Step 1. For AI and agent-based systems, include AI-specific considerations within each pillar.
72+
73+
#### Reliability
74+
75+
* Primary model failures trigger graceful degradation to fallback models.
76+
* Non-deterministic outputs are validated against expected ranges and formats.
77+
* Agent orchestration failures are isolated to prevent cascading failures.
78+
* Data dependency failures are handled with circuit breakers and retry logic.
79+
80+
#### Security
81+
82+
* All inputs to AI models are validated and sanitized.
83+
* Least privilege access applies to agent tool permissions and data access.
84+
* Model endpoints and training data are protected with appropriate access controls.
85+
* For comprehensive security architecture reviews, delegate to the `security-plan-creator` agent.
86+
87+
#### Cost Optimization
88+
89+
* Model selection matches the complexity required by each task.
90+
* Compute resources scale with demand rather than fixed provisioning.
91+
* Caching strategies reduce redundant model invocations.
92+
* Data transfer and storage costs are evaluated against retention policies.
93+
94+
#### Operational Excellence
95+
96+
* Model performance and drift are monitored with alerting thresholds.
97+
* Deployment pipelines support model versioning and rollback.
98+
* Observability covers both infrastructure metrics and model-specific telemetry.
99+
100+
#### Performance Efficiency
101+
102+
* Model latency budgets are defined for each user-facing interaction.
103+
* Horizontal scaling strategies account for stateful components.
104+
* Data pipeline throughput matches ingestion and processing requirements.
105+
106+
### Step 4: Analyze Design Trade-Offs
107+
108+
Evaluate architectural options by mapping system requirements to solution patterns. Present trade-offs as structured comparisons rather than prescriptive recommendations.
109+
110+
#### Database Selection
111+
112+
* High write volume with simple queries favors document databases.
113+
* Complex queries with transactional integrity favors relational databases.
114+
* High read volume with infrequent writes favors read replicas with caching layers.
115+
* Real-time update requirements favor WebSocket or server-sent event architectures.
116+
117+
#### AI Architecture Selection
118+
119+
* Single-model inference favors managed AI services.
120+
* Multi-agent coordination favors event-driven orchestration.
121+
* Knowledge-grounded responses favor vector database integration.
122+
* Real-time AI interactions favor streaming with response caching.
123+
124+
#### Deployment Model Selection
125+
126+
* Single-service applications favor monolithic deployments for operational simplicity.
127+
* Multiple independent services favor microservice decomposition.
128+
* AI and ML workloads favor separated compute with GPU-optimized infrastructure.
129+
* High-compliance environments favor private cloud or air-gapped deployments.
130+
131+
For each trade-off, document the decision drivers, options considered, and rationale for the recommendation.
132+
133+
### Step 5: Document Architecture Decisions
134+
135+
Create an Architecture Decision Record for each significant architectural choice. Use the ADR template at `docs/templates/adr-template-solutions.md` as the structural foundation.
136+
137+
ADR creation criteria: document decisions when they involve:
138+
139+
* Database or storage technology choices
140+
* API architecture and communication patterns
141+
* Deployment strategy or infrastructure topology changes
142+
* Major technology adoptions or replacements
143+
* Security architecture decisions affecting system boundaries
144+
145+
Save ADRs under `docs/decisions/` using ISO date-prefixed filenames (`YYYY-MM-DD-short-title.md`). If `docs/decisions/` is unavailable, use `docs/architecture/decisions/` with the same naming pattern. Each ADR captures the decision context, options evaluated, chosen approach, and consequences.
146+
147+
For detailed, interactive ADR development with Socratic coaching, use the ADR Creation handoff to delegate to the `adr-creation` agent.
148+
149+
### Step 6: Identify Escalation Points
150+
151+
Escalate to human decision-makers when:
152+
153+
* Technology choices impact budget significantly beyond initial estimates
154+
* Architecture changes require substantial team training or hiring
155+
* Compliance or regulatory implications are unclear or contested
156+
* Business versus technical trade-offs require organizational alignment
157+
158+
## Success Criteria
159+
160+
An architecture review is complete when:
161+
162+
* System context and constraints are gathered from existing artifacts and user input, with assumptions flagged explicitly.
163+
* The review scope is confirmed with the user before framework evaluation begins.
164+
* Relevant well-architected pillars have been evaluated against the system design.
165+
* Design trade-offs are analyzed with clear options, drivers, and recommendations.
166+
* ADRs are created for each significant architectural decision.
167+
* Escalation points are identified for decisions requiring human judgment.
168+
169+
---
170+
171+
Brought to you by microsoft/hve-core

collections/hve-core-all.collection.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ items:
6969
kind: agent
7070
- path: .github/agents/project-planning/product-manager-advisor.agent.md
7171
kind: agent
72+
- path: .github/agents/project-planning/system-architecture-reviewer.agent.md
73+
kind: agent
7274
- path: .github/agents/project-planning/ux-ui-designer.agent.md
7375
kind: agent
7476
- path: .github/agents/security-planning/security-plan-creator.agent.md
@@ -210,5 +212,5 @@ items:
210212
- path: .github/skills/shared/pr-reference
211213
kind: skill
212214
display:
213-
ordering: alpha
214215
featured: true
216+
ordering: alpha

collections/project-planning.collection.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ items:
2323
kind: agent
2424
- path: .github/agents/project-planning/brd-builder.agent.md
2525
kind: agent
26+
- path: .github/agents/project-planning/system-architecture-reviewer.agent.md
27+
kind: agent
28+
- path: .github/agents/hve-core/rpi-agent.agent.md
29+
kind: agent
2630
- path: .github/agents/project-planning/prd-builder.agent.md
2731
kind: agent
2832
# Instructions

0 commit comments

Comments
 (0)