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

architecture

Skill9 starsChanged 19 days agoMITView on GitHub

Create or update docs/ARCHITECTURE.md — the system (components, data flow, stack, deployment, key decisions) and how it is engineered (testing strategy, dev environment, CI/CD, coding standards). Use when the user wants to design or document the system, map how the pieces fit, define a testing strategy or repo conventions, or says 'how should this be structured', 'let's architect this', 'how should we test this', 'write the tech design doc'. Documents CI/CD but does not create pipeline files.

149 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, red-team-tactics 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.
  • 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

    red-team-tactics

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

    Also in 9 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

  • 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

  • +7 more from xenitV1

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 128 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create or update the architecture document.

    line 6
  2. Distinctive:

    Read what already exists before asking anything:

    line 16
  3. Distinctive:

    Test directories and 1–2 existing test files, to see the patterns (fixtures, helpers, naming).

    line 23
  4. Very specific:

    No threat model and the system has trust boundaries?

    line 59

“Common” is measured: kept by at least 6 in 10 of the 128 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 or update the architecture document. Argument: $ARGUMENTS

In hosts that do not substitute $ARGUMENTS (e.g. Codex), it is the text the user wrote after the skill name.

docs/ARCHITECTURE.md has two parts. System says what is being built and how the pieces fit. Engineering says how it is built, tested and shipped. They live in one file because they share the stack and deployment decisions, and because /wf:spec, /wf:feature, /wf:fix and /wf:autopilot read both before touching code.

With a focus area (e.g. testing), update only that part and leave the rest.

Context Gathering

Read what already exists before asking anything:

  1. Existing docs — docs/ARCHITECTURE.md (if revising, don't start from scratch), docs/PRD.md or docs/prd/, docs/THREAT_MODEL.md, README.md, the project's agent instructions (CLAUDE.md or AGENTS.md), any whitepaper or design doc.
  2. Legacy split — if docs/TECHNICAL_DESIGN_DOCUMENT.md exists, the project predates the merged document. Read it, carry its content into the Engineering part, and ask whether to delete it once the merged file is written.
  3. The codebase:
    • Directory structure and key entry points (main files, route definitions, config).
    • package.json, Cargo.toml, pyproject.toml, go.mod, Makefile, docker-compose.yml — dependencies, tooling, test commands.
    • Test directories and 1–2 existing test files, to see the patterns (fixtures, helpers, naming).
    • CI config (.github/workflows/, .gitlab-ci.yml) and linter/formatter config.
    • git log --oneline -20 for recent direction.

With no codebase yet, derive the document from the PRD and mark unconfirmed choices (proposed). In a monorepo, describe the repo-level toolchain once and note per-package differences.

Interview

Summarize what you learned first ("Here's what I understand about this project so far: ..."), then ask only what the code and docs do not answer, using AskUserQuestion in 3–4 rounds of at most 3–4 questions. Where AskUserQuestion is unavailable but the user can answer in chat (e.g. Codex), ask the same question in chat as a short numbered list and wait for the answer; a headless run or a dispatched agent has no such user, and the headless rule applies instead. For an inherited project, ask "is my understanding correct?" and "what would you change?" rather than "what do you want?". For a greenfield project with a PRD, propose a stack and ask for corrections instead of asking open questions. If the user cannot be asked (a headless run), write from what exists and list each assumption under Constraints and Limitations.

System

  1. Components — What are the main components/services/modules? How do they communicate? Where are the trust boundaries?
  2. Data flow — How does data enter, get processed, and get stored? What are the critical paths?
  3. Technology choices — What stack and why? Hard constraints versus preferences?
  4. Deployment — How does this run (single binary, services, serverless) and where?
  5. Scale and performance — Expected load? Where are the bottlenecks? What must be fast?
  6. Integration points — What external systems does it talk to? What does it expose?
  7. Key decisions — What has already been decided, and what tradeoffs were accepted?

Engineering

  1. Testing strategy — Which frameworks? Where do tests live? Which layers exist (unit / integration / e2e), and what belongs in each? Which flows need e2e coverage?
  2. Dev environment — How does someone set up locally? Which external services are needed?
  3. CI/CD — What runs on every PR? What blocks a merge? How are deployments triggered and rolled back?
  4. Coding standards — Linter, formatter, type checker; conventions the tooling does not capture.
  5. Observability and dependencies — Logging, error tracking, metrics; how dependencies are pinned, scanned and updated.

Write

Write to docs/ARCHITECTURE.md using the structure in references/template.md (read it now). Adapt it to the project: a small project may not need Deployment, Scale and Performance, or Observability, and a monorepo may need a package layout section. Keep the ## Testing Strategy heading whatever else changes, because other skills look for it.

After Writing

  1. Present the document for review. Iterate until the user is satisfied.
  2. Suggest next steps based on what exists:
    • No threat model and the system has trust boundaries? → "Consider /wf:threat-model"
    • A decision here deserves its own record? → "Capture it with /wf:adr <title>"
    • Ready to plan the build? → "Run /wf:roadmap, then /wf:spec <task> per task (or /wf:spec <name> directly for one feature outside a 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.