agentleFS
alex-voloshin-devalex-voloshin-dev/ai-skills/.agents/skills/architecture/SKILL.md

architecture

Skill2 starsChanged 6 months agoMITView on GitHub

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.

144 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, bash-linux and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 6 projects that use this

  • xenitV1Skill

    bash-linux

    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

    Also in 9 projects that use this

  • xenitV1Skill

    red-team-tactics

    Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.

    Also in 9 projects that use this

  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • +6 more from xenitV1

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 124 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read every provided document thoroughly

    line 22
  2. Distinctive:

    If the input spans multiple scope types — execute the corresponding sections for each.

    line 36
  3. Distinctive:

    If the input is incomplete — ask before proceeding.

    line 48
  4. Distinctive:

    Before designing anything, map the existing state.

    line 52
  5. Distinctive:

    Read the following files (if they exist):

    line 56
  6. Distinctive:

    If documentation is incomplete or absent:

    line 66
  7. Distinctive:

    Only include categories relevant to the scope.

    line 116
  8. Distinctive:

    If any check fails — fix the deliverable before presenting.

    line 208
  9. Distinctive:

    Wait for user review. The user may request changes, additional analysis, or approve.

    line 229
  10. Distinctive:

    After approval, save deliverables to the project:

    line 233
  11. Very specific:

    Use consistent naming: ADR-NNN-[kebab-case-title].md, [feature]-design.md

    line 241
  12. Distinctive:

    Verify file was created successfully

    line 242
  13. Very specific:

    If the project has no established docs/ structure — propose one and confirm with user.

    line 244

“Common” is measured: kept by at least 6 in 10 of the 124 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture

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 plan skill and feature-dev skill for implementation.

1. Receive Input and Classify Scope

Gather the input from the user and classify the type of work:

  • Accepted inputs: Feature PRD, architecture analysis request, technical initiative brief, verbal description
  • Read every provided document thoroughly

Scope Classification

Determine scope type based on the input:

Scope TypeTriggerPrimary RoleDeliverables
Feature DesignPRD, feature request, new capabilitysolution-architect roleARD, API contracts, data models, sequence diagrams, NFR spec
Architecture Analysis"analyze service X", "document architecture of Y"system-architect roleARCHITECTURE.md, C4 diagrams, component map, tech debt register
Cloud ArchitectureCloud infra design, landing zones, migration, multi-cloud, networking, costcloud-architect roleCloud architecture doc, networking diagrams, cost model, DR plan
CI/CD ArchitecturePipeline design, deployment strategy, GitHub org, platform engineeringdevops-architect roleCI/CD architecture doc, pipeline diagrams, DORA targets, governance
Architecture Evolution"migrate to X", "redesign Y", tech debt initiativeMultipleARD + 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.

Extract Context

From the input, extract and organize:

  • Goal: What architectural problem we are solving (1–2 sentences)
  • Scope boundary: Which services, modules, or system areas are affected
  • Stakeholders: Who consumes the deliverables (engineering, product, ops)
  • Constraints: Timeline, compatibility, regulatory, team capacity
  • Non-goals: What is explicitly out of scope

If the input is incomplete — ask before proceeding. Do not assume missing requirements.

2. Understand Current Architecture

Before designing anything, map the existing state.

2a. Read Architecture Documentation

Read the following files (if they exist):

  1. ARCHITECTURE.md — system overview, component boundaries, data flow, deployment topology
  2. AGENTS.md (root) — tech stack, project structure, conventions
  3. Subdirectory AGENTS.md files — per-service/module context
  4. Existing ADRs — docs/adr/, docs/architecture/, or similar directories
  5. API specs — OpenAPI files, Protobuf definitions, GraphQL schemas

2b. Scan Affected Areas

If 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:

  • Service boundaries: What services/modules exist, their responsibilities
  • Communication patterns: REST, gRPC, events, shared DB, message queues
  • Data stores: Databases, caches, queues — types, ownership
  • External integrations: Third-party APIs, identity providers, payment systems
  • Deployment topology: How services are deployed, scaled, networked

2c. Build Context 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]

3. Define Non-Functional Requirements

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:

CategorySpecification
AvailabilitySLO target (e.g., 99.9%), redundancy, failover strategy
Latencyp50/p95/p99 budgets per endpoint or operation
ScalabilityExpected load, scaling strategy (horizontal/vertical), limits
CostPer-request/per-operation budgets, infrastructure cost bounds
SecurityAuth requirements, data classification, compliance (GDPR, SOC2)
ObservabilityTracing, logging, metrics requirements, alerting thresholds
DataRetention, 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.

4. Architecture Design

Route to the appropriate section(s) based on scope type from Step 1.

4a. Feature Design → solution-architect role

For 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:

  • C4 diagrams (Mermaid) — Context and/or Container level showing the feature's impact
  • Sequence diagrams — for multi-service interactions, async flows
  • API contracts — new or modified endpoints (OpenAPI fragments or structured tables)
  • Data models — new entities, schema changes, migration strategy
  • Error handling — failure modes, retry strategy, degradation behavior

4. Security Review:

  • Threat scenarios (3–5 concrete abuse cases)
  • Auth/authz design for new endpoints
  • Data protection requirements (PII, encryption, access control)

4b. Architecture Analysis → system-architect role

For analysis scope, produce:

1. Architecture Assessment:

  • C4 diagrams (Context + Container level) of current state
  • Component inventory with responsibilities, tech stack, dependencies
  • Data flow diagrams for critical paths
  • Integration point map (sync/async, contracts, SLAs)

2. Gap Analysis:

AreaCurrent StateDesired StateGapPriority
[area][what exists][what should exist][delta]High/Med/Low

3. Technical Debt Register:

ItemImpactEffortPriorityRecommendation
[debt item]High/Med/LowS/M/L/XL[rank][action]

4. ARCHITECTURE.md Update — create or update following templates/architecture.template.md.

4c. Architecture Evolution → Both Roles

For migration/evolution initiatives, produce both:

  • ADR (from 4a) documenting the migration decision
  • ARCHITECTURE.md update (from 4b) showing target state
  • Migration plan: phased approach (strangler fig, expand-contract, branch by abstraction)
  • Fitness functions: automated architectural checks to enforce during transition
  • Rollback strategy: how to revert if migration fails at each phase

5. Quality Gates

Review all deliverables against the checklist:

<quality_checklist>

  • NFRs are concrete (numbers, not "should be fast")
  • Every decision has documented rationale and alternatives
  • Diagrams match the described architecture (no stale diagrams)
  • API contracts are complete (request, response, errors, auth)
  • Data models include migration strategy for schema changes
  • Security review covers OWASP Top 10 (+ LLM Top 10 for AI systems)
  • Backward compatibility is preserved or migration path documented
  • Observability requirements defined (traces, logs, metrics, alerts)
  • No contradictions with existing ADRs or ARCHITECTURE.md
  • Cost impact estimated for infrastructure/service changes

</quality_checklist>

If any check fails — fix the deliverable before presenting.

6. Engineering Estimates

For feature design scope, produce estimates to feed plan skill:

ComponentTaskComplexityRole
[component][task description]S / M / L / XLrole-id
  • Critical path: Longest dependency chain (e.g., DB Migration → Backend API → Frontend → E2E Tests)
  • Parallelization: Which tasks can run concurrently by different roles
  • Constraints: Hard dependencies on external teams, services, or decisions
  • Risks: Dependency/integration risks with mitigations

Skip this step for pure analysis scope.

7. Present Deliverables

Compile and present: scope summary, deliverables table (document/type/status), key decisions with rationale, risk table (risk/impact/mitigation), and next steps (stakeholder review → plan skill → feature-dev skill).

Wait for user review. The user may request changes, additional analysis, or approve.

8. Persist Artifacts

After approval, save deliverables to the project:

  1. ADRs → docs/adr/ or docs/architecture/decisions/ (create dir if missing)
  2. Design docs → docs/architecture/ or docs/design/
  3. API contracts → alongside existing API specs or in docs/api/
  4. ARCHITECTURE.md → project root (update existing or create new)

For each file:

  • Use consistent naming: ADR-NNN-[kebab-case-title].md, [feature]-design.md
  • Verify file was created successfully

If the project has no established docs/ structure — propose one and confirm with user.

9. Handoff

Guide the next steps based on scope:

  • Feature Design → Run plan skill with the produced ARD and design docs as input
  • Architecture Analysis → Share findings with stakeholders. If action items identified — create tickets or run plan skill for each initiative
  • Architecture Evolution → Run plan skill for each migration phase

Integration

  • Input from: product skill (PRD output), plan skill (architecture questions during planning), direct analysis requests
  • Followed by: plan skill (work decomposition), feature-dev skill (implementation)
  • Roles: 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: templates/architecture.template.md (ARCHITECTURE.md structure)
  • Skills: context-engineering skill (for AI/agent system architecture)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.