agentleFS
rafagomesrafagomes/ai-workflow/skills/architecture/SKILL.md

architecture

Skill9 starsChanged 8 months agoMITView on GitHub

Create or update docs/ARCHITECTURE.md — services, components, data flow, trust boundaries. Use when the user asks to design the system, map out how pieces fit together, sketch data flow, define boundaries, or says 'how should this be structured', 'write up the system design', 'let's architect this', 'draw the component diagram'.

82 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deployment-procedures, behavioral-modes and 10 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.
  • xfstudioSkill

    deployment-procedures

    Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.

    Also in 5 projects that use this

  • xfstudioSkill

    behavioral-modes

    AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.

    Also in 4 projects that use this

  • tiendatworkSkill

    2d-games

    2D game development principles. Sprites, tilemaps, physics, camera.

    Also in 3 projects that use this

  • tiendatworkSkill

    3d-games

    3D game development principles. Rendering, shaders, physics, cameras.

    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

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • +1 more from xfstudio
  • +5 more from tiendatwork

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 74 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create the system architecture document.

    line 5
  2. Distinctive:

    Before interviewing, read what already exists:

    line 9
  3. Very specific:

    Read docs/PRD.md or docs/prd/ if they exist

    line 12
  4. Very specific:

    Read docs/ARCHITECTURE.md — if revising, don't start from scratch

    line 13
  5. Distinctive:

    Read any whitepaper, design doc, or existing architecture doc

    line 15
  6. Distinctive:

    Read README.md for project overview

    line 18
  7. Distinctive:

    Read key entry points (main files, route definitions, config files)

    line 20
  8. Distinctive:

    Check git log --oneline -20 for recent direction

    line 21
  9. Very specific:

    Read package.json, Cargo.toml, pyproject.toml, or equivalent for dependencies and project metadata

    line 22
  10. Distinctive:

    Use AskUserQuestion to dig into the system design.

    line 27
  11. Very specific:

    No TDD yet? → "Define testing and dev workflow with /tdd"

    line 95
  12. Very specific:

    No threat model? → "Consider /security for the threat model"

    line 96

“Common” is measured: kept by at least 6 in 10 of the 74 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

Create the system architecture document. Argument: $ARGUMENTS

Context Gathering

Before interviewing, read what already exists:

  1. Check for existing docs:
    • Read docs/PRD.md or docs/prd/ if they exist
    • Read docs/ARCHITECTURE.md — if revising, don't start from scratch
    • Read README.md, CLAUDE.md
    • Read any whitepaper, design doc, or existing architecture doc
  2. If no docs exist (inherited project):
    • Read README.md for project overview
    • Explore the directory structure to understand the codebase layout
    • Read key entry points (main files, route definitions, config files)
    • Check git log --oneline -20 for recent direction
    • Read package.json, Cargo.toml, pyproject.toml, or equivalent for dependencies and project metadata
    • Summarize what you learned to the user before starting the interview — "Here's what I understand about this project so far: ..."

Interview

Use AskUserQuestion to dig into the system design. Adapt questions based on what you already learned from the codebase.

  1. Components — What are the main components/services/modules? How do they communicate? What are the trust boundaries?
  2. Data flow — How does data enter the system, get processed, and get stored? What are the critical paths?
  3. Technology choices — What stack and why? What are the hard constraints vs preferences?
  4. Deployment — How does this run? Single binary, microservices, serverless? Where (cloud, on-prem, edge)?
  5. Scaling and performance — What are the expected loads? Where are the bottlenecks? What needs to be fast?
  6. Integration points — What external systems does this talk to? What APIs does it expose? What does it depend on?
  7. Key decisions — What architectural decisions have already been made? What tradeoffs were accepted and why?

For inherited projects, focus more on: "Is my understanding correct?" and "What would you change?" rather than "What do you want?"

Write

Write to docs/ARCHITECTURE.md:

# Architecture

**Version:** [version]
**Date:** [date]

## System Overview

[High-level description. Include a Mermaid diagram showing major components and their relationships.]

## Components

### [Component 1]
- **Responsibility:** [what it does]
- **Technology:** [stack/language]
- **Interfaces:** [what it exposes, what it consumes]
- **Key design decisions:** [why it's built this way]

### [Component 2]
...

## Data Flow

[How data moves through the system. Use Mermaid sequence or flow diagrams for critical paths.]

## Technology Stack

| Layer | Technology | Rationale |
|-------|-----------|-----------|
| [layer] | [tech] | [why] |

## Deployment Model

[How the system is deployed. Infrastructure, environments, CI/CD.]

## Key Decisions

| Decision | Choice | Alternatives Considered | Rationale |
|----------|--------|------------------------|-----------|
| [decision] | [what was chosen] | [what else was considered] | [why] |

## Constraints and Limitations

[Known limitations, technical debt, things that need revisiting.]

Adapt the structure to the project. Small projects may not need Deployment or Scaling sections. Monorepos may need a crate/package layout section. Use judgment.

After Writing

  1. Present the document to the user for review. Iterate until they're satisfied.
  2. Suggest next steps based on what exists:
    • No TDD yet? → "Define testing and dev workflow with /tdd"
    • No threat model? → "Consider /security for the threat model"
    • Ready to build? → "Create feature specs with /spec <name>, then /roadmap"

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.