agentleFS
bushuhuibushuhui/skills/pd-architecture/SKILL.md

pd-architecture

Skill2 starsChanged 5 months agoMITView on GitHub

Interactive architecture design workflow — from requirements gathering to pattern recommendation, tech stack selection, and ADR generation. Use when designing system architecture, choosing between monolith vs microservices, planning scalability, selecting databases or caches, reviewing architecture documents, or generating architecture diagrams. Supports Python and JavaScript projects. Covers 9 architecture patterns, technology decision matrices, and structured design workflows.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the full workflow:

    line 13
  2. Distinctive:

    Ask these six forcing questions, one per turn:

    line 31
  3. Distinctive:

    If any answer is unknown, walk the question.

    line 40
  4. Distinctive:

    When the user provides an existing design for review:

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 Design

Interactive architecture design: clarify requirements → recommend patterns → select tech → generate docs.

Quick start

Run the full workflow:

python3 "${SKILL_DIR}/scripts/project_architect.py" ./project --verbose

Generate architecture diagrams:

python3 "${SKILL_DIR}/scripts/architecture_diagram_generator.py" ./project --format mermaid

Interactive workflow

Always follow these steps in order. Do not skip to recommendations without understanding requirements.

Step 1: Clarify requirements

Ask these six forcing questions, one per turn:

  1. Team size and timeline? (determines complexity budget)
  2. Expected QPS and read/write ratio? (drives DB, cache, queue choices)
  3. Data sensitivity tier? — public / internal / PII / PHI / PCI
  4. Tenancy model? — single-tenant / shared multi-tenant / isolated multi-tenant
  5. SLO + RPO/RTO? (e.g., 99.9% uptime, RPO=1h, RTO=15min)
  6. Language/framework preference? — Python / JavaScript / no preference

If any answer is unknown, walk the question. Don't guess.

Step 2: Recommend architecture pattern

Based on answers, read references/patterns/*.md and recommend 1-2 patterns with trade-off analysis.

Quick heuristic:

IfRecommend
Team < 10, low QPSModular Monolith
Team > 15, independent deploy neededMicroservices
Read/write > 10:1CQRS
Audit trail requiredEvent Sourcing
Multiple external systemsHexagonal
Complex domain logicDomain-Driven Design

Explain why other patterns were NOT chosen.

Step 3: Technology selection

Walk references/decision-matrices/*.md based on the project's language:

  • Python projects: Load languages/python/tech-stack.md for framework, ORM, and tooling recommendations
  • JavaScript projects: Apply the same decision matrices, adapt to Node.js ecosystem
  • No preference: Recommend defaults from references/decision-matrices/database-selection.md

Each selection must include: primary choice, alternative, and why.

Step 4: Generate output documents

Fill the appropriate template from templates/:

  1. ADR — templates/architecture-decision-record.md with context, options, decision, trade-offs
  2. Architecture diagram — call scripts/architecture_diagram_generator.py with the project path
  3. Capacity plan — if scale questions weren't trivial, fill templates/capacity-plan.md

Step 5: Architecture review (optional)

When the user provides an existing design for review:

  1. Walk languages/python/checklist.md (or equivalent for their language)
  2. For each review area: strengths → concerns (HIGH/MEDIUM/LOW) → recommendations
  3. Fill templates/architecture-review-report.md
  4. Output prioritized next steps

Reference files

FileUse when
references/patterns/*.md"which architecture?", "monolith vs microservices", "CQRS"
references/decision-matrices/*.md"which database?", "which cache?", "which auth?"
references/workflows/*.md"how to design API?", "capacity planning", "migration"
languages/python/*.mdPython-specific architecture, DDD, FastAPI, data modeling
scripts/Generate diagrams, analyze dependencies, assess project
templates/Output ADRs, review reports, capacity plans

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.