agentleFS
ROCmROCm/rocprofiler-systems-skills/skills/review-architecture/SKILL.md

review-architecture

Skill5 starsChanged 18 days agoMITView on GitHub

Use when user wants architecture documentation covering component interactions, hierarchy, expansion points, or system weaknesses - for single components, integrations, or whole systems

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-testing, review-correctness and 1 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.
  • worldbankSkill

    review-testing

    Review test code for quality, design, and completeness after implementing a feature or fixing a bug. Use when the user asks to "review my tests", "check my test quality", "are these tests good enough", "review testing", or after completing a feature implementation that includes tests. Also use when tests feel brittle, flaky, or superficial. Cross-references production code to find coverage gaps.

    Also in 4 projects that use this

  • navjyotnishantSkill

    review-correctness

    Use this skill when the user asks to "review my changes for bugs", "check this diff for correctness", "did I introduce a regression", or wants a correctness-focused review of the current commit or uncommitted work before pushing. Reviews the changed lines and their blast radius for logic errors, regressions, unhandled edge cases, and missing validation. Works in any git repo; nothing here is project-specific.

    Also in 3 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 16

    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:

    All major components, modules, subsystems

    line 66
  2. Very specific:

    Use AskUserQuestion to ask:

    line 76
  3. Distinctive:

    Wait for answer before proceeding.

    line 83
  4. Distinctive:

    If changes requested: revise and present again (loop until approved)

    line 131
  5. Distinctive:

    If approved: ask "What should be done next?" before proceeding to next chapter

    line 132
  6. Distinctive:

    NEVER generate multiple chapters at once.

    line 135
  7. Distinctive:

    NO CODE SNIPPETS means NO CODE SNIPPETS.

    line 167
  8. Distinctive:

    No fenced code blocks (```)

    line 170
  9. Distinctive:

    No inline code (single backticks for code)

    line 171
  10. Distinctive:

    No directory trees with box-drawing characters

    line 173
  11. Distinctive:

    No ASCII architecture diagrams

    line 174
  12. Distinctive:

    Use prose paragraphs and markdown tables to describe everything.

    line 176
  13. Distinctive:

    After ALL chapters are approved individually, present the complete assembled document.

    line 181
  14. Distinctive:

    Ask: "Here is the full document with all chapters.

    line 183
  15. Distinctive:

    Writing multiple chapters at once: - Delete extra chapters, present one at a time

    line 197
  16. Distinctive:

    Including code snippets: - Remove all code, rewrite in prose

    line 198
  17. Distinctive:

    Proceeding without user approval: - Stop and ask for feedback

    line 199

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

Generate architecture documentation through iterative, user-guided chapter-by-chapter creation. The output describes component behavior, interactions, hierarchy, and expansion points -- never code.

Overview

This skill produces architecture documents by first analyzing the codebase silently, then collaborating with the user to scope, outline, and iteratively write each chapter with approval between every one.

Core principle: The user controls what gets documented and approves every chapter. The agent never generates the full document at once.

Process Flowchart

digraph architecture_doc {
    "User requests architecture doc" [shape=doublecircle];

    "Analyze codebase silently" [shape=box];
    "Ask scope question" [shape=box];
    "Present component list" [shape=box];
    "Ask what to cover" [shape=box];
    "Propose chapter outline" [shape=box];
    "Ask what to do next" [shape=box];
    "Generate ONE chapter" [shape=box];
    "Present chapter to user" [shape=box];
    "User approves chapter?" [shape=diamond];
    "Revise chapter" [shape=box];
    "More chapters?" [shape=diamond];
    "Present full document" [shape=box];
    "User approves document?" [shape=diamond];
    "Revise flagged sections" [shape=box];
    "Document complete" [shape=doublecircle];

    "User requests architecture doc" -> "Analyze codebase silently";
    "Analyze codebase silently" -> "Ask scope question";
    "Ask scope question" -> "Present component list";
    "Present component list" -> "Ask what to cover";
    "Ask what to cover" -> "Propose chapter outline";
    "Propose chapter outline" -> "Ask what to do next";
    "Ask what to do next" -> "Generate ONE chapter";
    "Generate ONE chapter" -> "Present chapter to user";
    "Present chapter to user" -> "User approves chapter?";
    "User approves chapter?" -> "More chapters?" [label="yes"];
    "User approves chapter?" -> "Revise chapter" [label="no / changes needed"];
    "Revise chapter" -> "Present chapter to user";
    "More chapters?" -> "Ask what to do next" [label="yes"];
    "More chapters?" -> "Present full document" [label="no"];
    "Present full document" -> "User approves document?";
    "User approves document?" -> "Document complete" [label="yes"];
    "User approves document?" -> "Revise flagged sections" [label="no / changes needed"];
    "Revise flagged sections" -> "Present full document";
}

Phase 1: Analyze (Silent)

Explore the codebase to build understanding BEFORE asking the user anything. Use Task with subagent_type=Explore or read files directly.

Goal: Understand enough to present an informed component list to the user.

Identify:

  • All major components, modules, subsystems
  • How they interact (calls, data flow, dependencies)
  • Component hierarchy (parent-child, inheritance, composition)
  • Expansion points (plugin interfaces, abstract classes, configuration)
  • Architectural weaknesses (coupling, missing abstractions, drift)

Do NOT output analysis results yet. This phase is preparation for the user conversation.

Phase 2: Ask Scope

Use AskUserQuestion to ask:

"What is the scope of this architecture document?"

  • Single component (one module, class, or subsystem)
  • Multiple components / integration (how 2+ components work together)
  • Whole system (end-to-end architecture)

Wait for answer before proceeding.

Phase 3: Present Components and Ask What to Cover

Present a list of ALL components you discovered during analysis. Format as a table:

## Components Found

| # | Component | Purpose | Key Interactions |
|---|-----------|---------|-----------------|
| 1 | ComponentA | Brief purpose | Interacts with B, C |
| 2 | ComponentB | Brief purpose | Depends on A |
| ...| ... | ... | ... |

Then ask: "Which components should the document cover? Select by number or describe what to include/exclude."

Wait for answer before proceeding.

Phase 4: Propose Chapter Outline

Based on scope and selected components, propose a chapter outline. Typical chapters:

  1. System Overview (purpose, high-level description)
  2. Component Hierarchy (structure, ownership, layering)
  3. Component Interactions (data flow, call patterns, protocols)
  4. Expansion Points (where and how to extend)
  5. Weaknesses and Risks (architectural problems, improvement opportunities)

Present the outline and ask: "What should be done next? Should I adjust the outline, add/remove chapters, or start generating?"

<IMPORTANT> You MUST wait for the user's response before generating ANY chapter content. Never start writing chapters without explicit user direction. </IMPORTANT>

Wait for answer before proceeding.

Phase 5: Chapter-by-Chapter Generation

Generate ONE chapter at a time. After writing each chapter, present it and ask for feedback.

For each chapter:

  1. Generate the chapter content
  2. Present it to the user
  3. Ask: "What do you think about this chapter? Is it okay, or what should I change?"
  4. Wait for user response
  5. If changes requested: revise and present again (loop until approved)
  6. If approved: ask "What should be done next?" before proceeding to next chapter
<IMPORTANT> NEVER generate multiple chapters at once. NEVER proceed to the next chapter without explicit user approval of the current one. This is the most critical rule of this skill.

No exceptions:

  • Not "the chapters are short, I'll batch them"
  • Not "the user seems to want the whole doc fast"
  • Not "these chapters are closely related, better together"
  • Not "I'll generate all and let them review at the end"

ONE chapter. Present. Wait. Get approval. Then next. </IMPORTANT>

Content Rules

What to include in chapters:

  • How components behave (responsibilities, lifecycle, state)
  • How components interact (which calls which, data flow direction, protocols)
  • Component hierarchy (parent-child, composition, layering)
  • Expansion points (where new components plug in, what interfaces to implement)
  • Weaknesses (tight coupling, missing abstractions, scalability concerns)

What to NEVER include:

ForbiddenWhyUse Instead
Code snippetsDocument describes architecture, not implementationDescribe behavior in prose
Inline code (backtick code)Same as code snippetsName functions/classes without backticks
ASCII art diagramsThese are a form of codeDescribe relationships in prose or tables
File paths as structure treesCode-like representationDescribe directory organization in prose
Configuration examplesImplementation detailDescribe what is configurable
Command examplesImplementation detailDescribe what operations are available
<IMPORTANT> NO CODE SNIPPETS means NO CODE SNIPPETS. Not "just a small one for clarity." Not "just showing the interface." Not "just the function signature." The document describes HOW components BEHAVE and INTERACT, using natural language and tables only.

This includes:

  • No fenced code blocks (```)
  • No inline code (single backticks for code)
  • No pseudo-code
  • No directory trees with box-drawing characters
  • No ASCII architecture diagrams

Use prose paragraphs and markdown tables to describe everything. </IMPORTANT>

Phase 6: Full Document Review

After ALL chapters are approved individually, present the complete assembled document.

Ask: "Here is the full document with all chapters. Please review it as a whole. Is anything missing, inconsistent, or needs adjustment?"

Loop until user confirms the full document is correct:

  1. User flags issues -> revise flagged sections -> present full document again
  2. User approves -> done

Output

Save the final approved document to: planning/architecture-<scope-name>.md

Red Flags - STOP and Fix

  • Generating without asking scope - Go back to Phase 2
  • Skipping component list - Go back to Phase 3
  • Writing multiple chapters at once - Delete extra chapters, present one at a time
  • Including code snippets - Remove all code, rewrite in prose
  • Proceeding without user approval - Stop and ask for feedback
  • "User is in a hurry" - The iterative process IS the value. Follow it.
  • "These chapters are related" - Still one at a time. No batching.
  • "I'll add just a small code example" - No. Describe behavior in words.

Common Mistakes

MistakeFix
Generating entire document at onceONE chapter at a time with approval between each
Including code snippets "for clarity"Describe behavior in prose and tables only
Skipping scope questionAlways ask scope FIRST (single/multi/whole)
Deciding components without asking userPresent full list, let user choose
Not asking "what next?" before generationAlways give user control of pacing
Using ASCII diagramsDescribe structure in prose or tables
Skipping final whole-document reviewAlways do a final review after all chapters

Rationalizations to Reject

ExcuseReality
"User is in a hurry, I'll generate it all"Iterating chapter-by-chapter prevents rework. Follow the process.
"The scope is obvious from context"Confirm anyway. "Architecture" could mean many things.
"These chapters are small, I'll batch them"Small chapters are fast to approve. One at a time.
"Just one small code example helps"Prose explains architecture better. No code means no code.
"I'll show the directory tree for context"Describe the directory organization in words.
"ASCII diagram is not really code"It is a code-like representation. Use prose or tables.
"User already told me the components"Present the full list anyway so they can discover components they missed.
"I'll generate all and they can cherry-pick"That inverts the process. One chapter, one approval.

Integration with Other Skills

Before This SkillUse
Exploring unfamiliar codeexploration-explore-code
After This SkillUse
Planning new features based on architectureplanning-feature
Refactoring based on weaknesses foundplanning-refactor

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.