.agents/skills/architecture/SKILL.md
Architecture workflow — produce architectural documentation (ARD, design docs, API contracts, C4 diagrams, ARCHITECTURE.md updates) from a feature PRD, analysis request, or architectural initiative. Routes to solution-architect and system-architect roles based on scope. Input from product managers or direct analysis requests.
npx skillsauth add avav25/ai-assets architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce architecture deliverables from a feature PRD, module/service analysis request, or architectural initiative. This workflow creates documentation — no code is written here. Output feeds into feature-plan skill and feature-dev skill for implementation.
Gather the input from the user and classify the type of work:
Determine scope type based on the input:
| Scope Type | Trigger | Primary Role | Deliverables |
|---|---|---|---|
| Feature Design | PRD, feature request, new capability | solution-architect role | ARD, API contracts, data models, sequence diagrams, NFR spec |
| Architecture Analysis | "analyze service X", "document architecture of Y" | system-architect role | ARCHITECTURE.md, C4 diagrams, component map, tech debt register |
| Cloud Architecture | Cloud infra design, landing zones, migration, multi-cloud, networking, cost | cloud-architect role | Cloud architecture doc, networking diagrams, cost model, DR plan |
| CI/CD Architecture | Pipeline design, deployment strategy, GitHub org, platform engineering | devops-architect role | CI/CD architecture doc, pipeline diagrams, DORA targets, governance |
| Architecture Evolution | "migrate to X", "redesign Y", tech debt initiative | Multiple | ARD + ARCHITECTURE.md updates, migration plan, fitness functions |
If the input spans multiple scope types — execute the corresponding sections for each. If ambiguous — ask the user to clarify.
From the input, extract and organize:
If the input is incomplete — ask before proceeding. Do not assume missing requirements.
Before designing anything, map the existing state.
Read the following files (if they exist):
ARCHITECTURE.md — system overview, component boundaries, data flow, deployment topologyAGENTS.md (root) — tech stack, project structure, conventionsAGENTS.md files — per-service/module contextdocs/adr/, docs/architecture/, or similar directoriesIf documentation is incomplete or absent:
// turbo
find . -name "ARCHITECTURE.md" -o -name "*.openapi.*" -o -name "*.proto" -o -name "docker-compose*" -o -name "*.tf" | head -30
Map:
## Current Architecture Context
| Component | Tech Stack | Owner | Relevant to Scope |
|---|---|---|---|
| [service/module] | [lang + framework] | [team/role] | [yes/no — how] |
## Existing Decisions
- ADR-NNN: [title] — [status] — [relevance to current work]
## Gaps Identified
- [missing documentation, undocumented decisions, stale diagrams]
Apply solution-architect role.
NFRs must be defined before any design work begins. Skip this step only for pure analysis scope.
<nfr_specification>
For each relevant category, define concrete targets:
| Category | Specification | |---|---| | Availability | SLO target (e.g., 99.9%), redundancy, failover strategy | | Latency | p50/p95/p99 budgets per endpoint or operation | | Scalability | Expected load, scaling strategy (horizontal/vertical), limits | | Cost | Per-request/per-operation budgets, infrastructure cost bounds | | Security | Auth requirements, data classification, compliance (GDPR, SOC2) | | Observability | Tracing, logging, metrics requirements, alerting thresholds | | Data | Retention, consistency model (strong/eventual), backup/recovery RPO/RTO |
Only include categories relevant to the scope. Omit categories that add no signal.
</nfr_specification>
Present NFRs to the user for validation before proceeding.
Route to the appropriate section(s) based on scope type from Step 1.
solution-architect roleFor feature-level design (PRD input), produce deliverables in this order:
1. Options Analysis — Propose 2–3 design options with trade-offs:
## Option [N]: [Name]
- **Approach**: [Description]
- **Pros**: [List]
- **Cons**: [List]
- **Risk**: [High/Med/Low] — [why]
- **Effort**: [S/M/L/XL]
- **NFR impact**: [How it affects availability, latency, cost, etc.]
2. Architecture Decision Record (ARD/ADR) — Status, Context (problem + constraints), Decision (selected option + rationale), Consequences (positive/negative/neutral), Alternatives Considered.
3. Detailed Design:
4. Security Review:
system-architect roleFor analysis scope, produce:
1. Architecture Assessment:
2. Gap Analysis:
| Area | Current State | Desired State | Gap | Priority | |---|---|---|---|---| | [area] | [what exists] | [what should exist] | [delta] | High/Med/Low |
3. Technical Debt Register:
| Item | Impact | Effort | Priority | Recommendation | |---|---|---|---|---| | [debt item] | High/Med/Low | S/M/L/XL | [rank] | [action] |
4. ARCHITECTURE.md Update — create or update following templates/architecture.template.md.
For migration/evolution initiatives, produce both:
Review all deliverables against the checklist:
<quality_checklist>
</quality_checklist>
If any check fails — fix the deliverable before presenting.
For feature design scope, produce estimates to feed feature-plan skill:
| Component | Task | Complexity | Role |
|---|---|---|---|
| [component] | [task description] | S / M / L / XL | role-id |
Skip this step for pure analysis scope.
Compile and present: scope summary, deliverables table (document/type/status), key decisions with rationale, risk table (risk/impact/mitigation), and next steps (stakeholder review → feature-plan skill → feature-dev skill).
Wait for user review. The user may request changes, additional analysis, or approve.
After approval, save deliverables to the project:
docs/adr/ or docs/architecture/decisions/ (create dir if missing)docs/architecture/ or docs/design/docs/api/For each file:
ADR-NNN-[kebab-case-title].md, [feature]-design.mdIf the project has no established docs/ structure — propose one and confirm with user.
Guide the next steps based on scope:
feature-plan skill with the produced ARD and design docs as inputfeature-plan skill for each initiativefeature-plan skill for each migration phaseproduct-mgmt skill (PRD output), feature-plan skill (architecture questions during planning), direct analysis requestsfeature-plan skill (work decomposition), feature-dev skill (implementation)solution-architect role (feature design, ADRs, API contracts), system-architect role (system analysis, ARCHITECTURE.md, component boundaries), cloud-architect role (cloud platform design, landing zones, networking, cost), devops-architect role (CI/CD architecture, deployment strategies, platform engineering)templates/architecture.template.md (ARCHITECTURE.md structure)context-engineering skill (for AI/agent system architecture)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.