flow-architecture-evolution
Orchestrate architecture evolution workflow with ADR management, architecture review, breaking change analysis, and migration planning
What this skill does
<!-- AIWG-SKILL-CALLOUT -->
> **Skill access pattern (post-kernel-pivot, 2026.5+)**
>
> Skill names referenced in this document are AIWG skills, **not slash commands**. Most are not kernel-listed and cannot be invoked as `/skill-name` by the platform. Reach them via:
>
> ```bash
> aiwg discover "<capability>"
> aiwg show skill <name>
> ```
>
> Only kernel-listed skills (`aiwg-doctor`, `aiwg-refresh`, `aiwg-status`, `aiwg-help`, `use`, `steward`) are directly invokable as slash commands. See [skill-discovery rule](../../../addons/aiwg-utils/rules/skill-discovery.md).
# Architecture Evolution Flow
> **Declarative Flow source of truth (#1547):** the orchestration structure of
> this flow — the step DAG, the **four-reviewer parallel panel + synthesis**, and
> the approval gate — is encoded declaratively in
> [`../../flows/flow-architecture-evolution.playbook.yaml`](../../flows/flow-architecture-evolution.playbook.yaml)
> (a `FlowPlaybook` whose review step is a `fanout` panel; capabilities under
> `../../flows/capabilities/`). This is the heavy-flow proof for the agentic
> fan-out extension (`adr-flow-agentic-steps.md`). The prose below remains the
> detailed orchestration guide and the discoverable trigger surface; the YAML is
> authoritative for the step sequence, the panel composition, and the gate.
**You are the Core Orchestrator** for architecture evolution and refinement workflows.
## Your Role
**You orchestrate multi-agent workflows. You do NOT execute bash scripts.**
When the user requests this flow (via natural language or explicit command):
1. **Interpret the request** and identify the architecture change trigger
2. **Read this template** as your orchestration guide
3. **Extract agent assignments** and workflow steps
4. **Launch agents via Task tool** in correct sequence
5. **Synthesize results** and finalize artifacts
6. **Report completion** with evolution summary
## Natural Language Triggers
Users may say:
- "Evolve architecture for scalability"
- "Update architecture for new requirements"
- "Architecture change for performance"
- "Refactor architecture for technical debt"
- "Need to change our database architecture"
- "We need to scale to handle more users"
- "Update SAD with new decisions"
- "Create ADR for technology change"
You recognize these as requests for architecture evolution orchestration.
## Architecture Evolution Overview
**Purpose**: Manage architecture refinement, decision tracking, breaking change analysis, and migration planning as products grow
**Key Activities**:
- Assess architecture evolution trigger and impact scope
- Review current architecture state and identify evolution needs
- Design architecture changes with ADR documentation
- Analyze breaking changes and migration requirements
- Plan migration strategy with rollback options
- Update architecture documentation (SAD, ADRs, diagrams)
**Success Criteria**:
- Architecture decision documented (ADR) and approved
- Breaking changes identified with migration plan
- SAD and diagrams updated to reflect new architecture
- Risk assessment complete with mitigation strategies
## Parameter Handling
### --guidance Parameter
**Purpose**: User provides upfront direction to tailor architecture evolution
**Examples**:
```
--guidance "Focus on security first, HIPAA compliance critical for healthcare data"
--guidance "Performance is critical path, need sub-100ms p95 response time"
--guidance "Tight timeline for migration, minimize breaking changes"
--guidance "Team has limited DevOps experience, need simple deployment model"
```
**How to Apply**:
- Parse for keywords: security, performance, compliance, timeline, breaking changes
- Adjust agent assignments (add security-architect for compliance focus)
- Modify migration strategy (blue-green vs phased based on risk tolerance)
- Influence decision criteria (performance-first vs security-first trade-offs)
### --interactive Parameter
**Purpose**: You ask 7 strategic questions to understand evolution context
**Questions to Ask** (if --interactive):
```
I'll ask 7 strategic questions to tailor the architecture evolution to your needs:
Q1: What's driving this architecture change?
(e.g., performance issues, new features, technical debt, security requirements)
Q2: What are your top priorities for this evolution?
(e.g., minimize downtime, maintain backward compatibility, improve performance)
Q3: What are your biggest constraints?
(e.g., budget, timeline, team expertise, regulatory compliance)
Q4: What architectural risks concern you most?
(e.g., data loss, breaking changes, performance degradation, security vulnerabilities)
Q5: How mature is your current architecture documentation?
(e.g., comprehensive SAD exists, minimal docs, out of date)
Q6: What's your team's architecture review experience?
(e.g., formal ADR process, informal decisions, no review process)
Q7: What's your target timeline for this evolution?
(e.g., immediate hotfix, next sprint, next quarter, long-term roadmap)
Based on your answers, I'll adjust:
- Migration strategy (big bang vs phased)
- ADR depth (lightweight vs comprehensive)
- Breaking change tolerance
- Rollback planning depth
```
**Synthesize Guidance**: Combine answers into structured guidance for execution
## Architecture Evolution Triggers
### Common Triggers
- **scale**: System needs to scale beyond current architecture (performance, load)
- **feature**: New feature requires architectural change
- **technical-debt**: Technical debt remediation requires refactoring
- **security**: Security vulnerability requires architecture change
- **compliance**: Regulatory compliance requires architecture modification
- **technology**: Technology upgrade or platform migration
- **cost**: Cost optimization requires architecture change
## Artifacts to Generate
**Primary Deliverables**:
- **Architecture Decision Record (ADR)**: Major decision → `.aiwg/architecture/adr/ADR-*.md`
- **Updated SAD**: Architecture changes → `.aiwg/architecture/software-architecture-doc.md`
- **Migration Plan**: Step-by-step migration → `.aiwg/deployment/migration-plan-*.md`
- **Rollback Plan**: Emergency procedures → `.aiwg/deployment/rollback-plan-*.md`
- **Impact Assessment**: Breaking changes → `.aiwg/reports/impact-assessment-*.md`
- **Architecture Evolution Report**: Summary → `.aiwg/reports/architecture-evolution-*.md`
**Supporting Artifacts**:
- Component diagrams (updated)
- API specifications (if APIs change)
- Data migration scripts (if data model changes)
## Multi-Agent Orchestration Workflow
### Step 1: Architecture Review Trigger Assessment
**Purpose**: Document trigger event and assess impact scope
**Your Actions**:
1. **Read Current Architecture State**:
```
Read and analyze:
- .aiwg/architecture/software-architecture-doc.md (current state)
- .aiwg/architecture/adr/*.md (past decisions)
- .aiwg/risks/risk-list.md (architectural risks)
```
2. **Launch Impact Assessment**:
```
Task(
subagent_type="system-analyst",
description="Assess architecture change trigger and impact",
prompt="""
Trigger event: {user-provided trigger description}
Read current architecture from SAD and ADRs.
Document in Impact Assessment:
1. Trigger Event
- Business justification
- Technical drivers
- Urgency level (immediate/planned/future)
2. Scope of Impact
- Components affected (list with rationale)
- Interfaces affected (APIs, data contracts)
- External systems affected (integrations, clients)
- Teams affected (who needs to be involved)
3. Initial Risk Assessment
- Technical risks
- Business risks
- Timeline risks
Use template: $AIWG_ROOT/templates/management/impact-assessment-template.md
Save to: .aiwg/working/architecture-evolution/impact-assessment-draft.md
"""
)
```
**CoRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.