agentleFS
zzgiabaozzbuizzgiabaozzbui/athena-starter/skills/architecture/SKILL.md

architecture

Skill1 starsChanged 30 days agoMITView on GitHub

Draw the architecture picture before planning - Discovery when the request is still vague, C4 Context / Container when adding, changing or connecting systems or modeling a legacy system, with a contract table and sequence diagrams. Use when brainstorming calls it, or the user says "C4", "overall architecture", "big picture", "draw the system".

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

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

  • 0

    Common

    Most of the 129 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No artifact folder yet -> create it per R-092 (with intent.md) before writing.

    line 23
  2. Very specific:

    Read docs/architecture/c4.md if it exists (if the project's own instructions name another place, follow them).

    line 34
  3. Very specific:

    Add the artifact path and the list of gaps (arrows without contract, open questions), then ask the user to approve with the ask tool.

    line 56

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

The output is a picture the user (in the analyst role) can approve before the spec / plan is written. The risk level and flow are decided by routing and R-117; this skill only picks the level of drawing.

1 · Pick the level

  1. Does the work add, change or connect a container (app, service, database, external system), or does the user need a legacy system modeled? No -> Level 0: draw nothing, go back to the calling skill.
  2. Yes, and after reading the repo and clarifying the request you still cannot name the related systems, actors, and in / out of scope -> Level 1 · Discovery (§2), then level 2 when done.
  3. Yes, and you can name them -> Level 2 · C4 (§3).

State the chosen level and why in one line.

2 · Level 1 · Discovery

No artifact folder yet -> create it per R-092 (with intent.md) before writing. Write into the task's research.md per references/discovery.md: overview diagram, main business flow, rough scope, assumptions, open questions (marked blocking / non-blocking), at least 2 options with trade-offs.

Exit when both hold: no blocking open question remains · the user approves the picture. Not yet -> batch the blocking questions (R-138), update, present again. Until then, do not go down to C4 and do not write the spec.

3 · Level 2 · C4

Per references/c4.md:

  1. Read docs/architecture/c4.md if it exists (if the project's own instructions name another place, follow them). A legacy system with no model yet -> build it from the code, and write the date it was checked against the code.
  2. Draw Context + Container as a Mermaid flowchart (not C4Context). Component only for the container being changed, written in the task's spec.md. Never draw the Code level.
  3. Contract table: one row per arrow between two containers. An arrow with no contract yet -> the Contract cell reads **[TODO]** contract, and the presentation says so.
  4. A sequence diagram for each main flow; every message between containers carries a contract code that is in the table. A message with no code -> add a table row, or state the gap.
  5. The change against the living model -> spec.md. docs/architecture/c4.md is updated in the same commit as the code that changes a container, not at design time. Modeling a legacy system without changing containers -> write straight into docs/architecture/c4.md after the user approves; outside the confirmed scope -> ask per R-003; the file is not a task artifact, commit per R-015 (list it, wait for the user's OK).
  6. The project has no docs/du-an/lo-trinh.json and the whole system was just modeled (new or old) -> in the presentation, propose once to build a roadmap per the containers / modules just drawn (flow #35 of routing), unless it was already proposed in the session (e.g. in brainstorming); if the user does not choose it, drop it and do not ask again in the session.

An architecture decision made while drawing -> an ADR per domain-modeling › adr.md.

4 · Present and stop

Show the diagram in chat with the harness's drawing tool (none -> a Mermaid block), without asking "Draw a diagram?". Add the artifact path and the list of gaps (arrows without contract, open questions), then ask the user to approve with the ask tool. After approval -> go back to the next step of the calling skill; called from routing #33 -> stop. Never write the plan on your own.

Rationalizations

ThoughtReality
"Even a small feature gets a C4, to be safe"Level 0 draws nothing; a needless diagram costs tokens and nobody reads it
"There is a diagram, the dev can handle contracts"An arrow with no contract is a gap; state it now, not at the contract gate while running the plan
"Draw the Code level too, for completeness"Code is the source of truth at that level; a Code diagram is stale by the next commit
"Edit docs/architecture/c4.md right away at design time"The living model reflects the running system; update it in the same commit as the code that changes a container, except when modeling a legacy system (§3.5)
"A blocking question is open, but draw the C4 first"Discovery not finished means the C4 is drawn on a wrong assumption

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.