agentleFS
PalanxPalanx/Claude-Configs/skills/architecture-evaluation/SKILL.md

architecture-evaluation

Skill0 starsChanged 13 days agoMITView on GitHub

Evaluate and optimize software architecture through structured scope analysis and a multi-dimensional tradeoff table. ALWAYS use this skill when the user asks to design, review, propose, validate, or discuss a system architecture, even at a high level. Trigger also when the user mentions: "how should I structure this", "what pattern fits here", "monolith vs microservices", "should I split this", "is this scalable", "architecture for X", or any phrase implying a structural or system-level decision. Covers a stack-free statement of the solution, scope assessment, candidate architecture selection, and tradeoff scoring across maintainability, portability, complexity, reusability, performance, scalability, and coupling.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    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:

    If the solution cannot be described without naming a technology, the problem is not understood yet.

    line 40
  2. Distinctive:

    Ask or infer the following.

    line 48
  3. Distinctive:

    Do not ask for what can be reasonably inferred.

    line 49
  4. Distinctive:

    After gathering dimensions, classify the project:

    line 67
  5. Distinctive:

    Default recommendation: When scope is Small or Medium, default to Modular Monolith.

    line 99
  6. Distinctive:

    After scoring, annotate each score with a one-line rationale.

    line 153
  7. Distinctive:

    Do not present raw scores without explanation.

    line 154
  8. Distinctive:

    If the project has clearly prioritized dimensions, apply weights:

    line 158
  9. Distinctive:

    Ask the user if they want to apply weights before computing.

    line 173
  10. Distinctive:

    After completing the tradeoff table, produce a structured recommendation:

    line 179
  11. Distinctive:

    Always offer an ADR after a final recommendation is accepted.

    line 230
  12. Distinctive:

    Never score without rationale: Every cell needs a one-liner justification.

    line 240

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 Evaluation Skill

Before proposing any architecture, run this evaluation. Never recommend a structural approach without completing the scope assessment and tradeoff analysis. Architecture decisions are permanent in practice — get them right upfront.


Phase 0 — Solution Before Stack

State the solution in domain terms before any architecture style, language, framework, or library is named. Reaching for a technology first shapes the requirement to fit the tool, and the tool's constraints get mistaken for the domain's.

Express, with no technology nouns:

  • Inputs and outputs — what enters, in what shape, and what leaves.
  • Data and its shape — entities, relationships, cardinality, what is authoritative.
  • Invariants — what must always hold and what must never happen, whatever the stack.
  • The transformation — the process, in plain steps.
  • State and lifetime — what is remembered, for how long, what happens when it is lost.
  • Failure behavior — each failure mode, and which ones must not lose data.
  • Boundaries — trust boundaries and transaction boundaries.
  • Scale and latency — the numbers it must hold, stated rather than assumed.

If the solution cannot be described without naming a technology, the problem is not understood yet. Scale this to the decision: a paragraph for a bounded change, a section for a new system. The invariants found here are what eliminate candidates in Phase 2.


Phase 1 — Scope Assessment

Ask or infer the following. If the conversation already contains answers, extract them. Do not ask for what can be reasonably inferred.

1.1 Project Dimensions

DimensionQuestions to resolve
DomainWhat is the core business problem? What are the bounded contexts?
TeamHow many developers? Seniority distribution? Single team or multiple?
TimelineMVP deadline? Long-term runway? Is this exploratory or production?
ScaleExpected users/requests at launch? In 12 months? In 3 years?
DataRead-heavy or write-heavy? Relational, document, time-series? Volume?
IntegrationsExternal APIs, third-party services, legacy systems?
ComplianceRegulatory constraints (GDPR, HIPAA, SOC2)? Audit requirements?
DeploymentCloud provider? On-prem? Serverless? Containerized?
BudgetInfrastructure cost sensitivity? Operational overhead tolerance?

1.2 Scope Classification

After gathering dimensions, classify the project:

Scope: [Small | Medium | Large | Enterprise]

Small    → 1–3 devs, single domain, < 10k users, low integration surface
Medium   → 3–10 devs, 2–4 bounded contexts, 10k–500k users, moderate integrations
Large    → 10+ devs, multiple teams, 500k+ users, significant integrations
Enterprise → Multiple org units, compliance-critical, global scale, legacy constraints

This classification gates which candidate architectures are viable (see Phase 2).


Phase 2 — Candidate Architecture Selection

Based on scope classification, surface only viable candidates. Do not propose architectures outside the viable range without explicit justification.

Architecture StyleViable ScopeCore Assumption
Monolith (Layered)SmallSingle team, fast iteration, low ops overhead
Modular MonolithSmall–MediumGrowth anticipated; want boundaries without ops cost
Vertical SliceMediumFeature teams, independent deployment not yet needed
MicroservicesLarge–EnterpriseIndependent scaling, independent deployment, polyglot teams
Event-DrivenMedium–EnterpriseLoose coupling, async workflows, high throughput
ServerlessSmall–LargeSpiky load, low ops, stateless operations
Hexagonal / Ports & AdaptersAnyTestability, infrastructure independence, DDD alignment
CQRS + Event SourcingLarge–EnterpriseAudit trail, read/write asymmetry, complex domain
Cell-BasedEnterpriseBlast radius isolation, multi-region, massive scale

Default recommendation: When scope is Small or Medium, default to Modular Monolith. It provides clean internal boundaries without the operational overhead of distributed systems. Justify any deviation from this default explicitly.


Phase 3 — Tradeoff Table

For each candidate architecture, score every dimension on a scale of 1–5. Score from the perspective of this specific project's constraints, not in the abstract.

Scoring Key

5 = Excellent fit / no friction
4 = Good fit / minor friction
3 = Neutral / manageable friction
2 = Poor fit / significant friction
1 = Severe misalignment / high risk

Tradeoff Dimensions

DimensionDefinitionWhat drives the score
MaintainabilityHow easy is it to change, fix, and extend over time?Module boundaries, cognitive load, documentation needs, onboarding time
PortabilityHow easily can the system move across environments, clouds, or runtimes?Infrastructure coupling, vendor lock-in, containerization, abstraction layers
ComplexityHow much cognitive and operational overhead does this introduce?Distributed systems tax, deployment pipelines, debugging surface, learning curve
ReusabilityHow much of the code/logic can be shared across contexts or products?Service boundaries, shared libraries, API design, domain model generality
PerformanceHow well does it meet latency, throughput, and resource efficiency needs?Network hops, serialization cost, caching opportunities, data locality
ScalabilityHow well does it handle growth in users, data, or load?Horizontal scaling, statelessness, partitioning strategy, bottleneck surface
CouplingHow isolated are components from each other's internals?Direct dependencies, shared databases, synchronous call chains, data contracts

Tradeoff Table Template

┌─────────────────────┬──────────────────┬──────────────────┬──────────────────┐
│ Dimension           │ [Architecture A] │ [Architecture B] │ [Architecture C] │
├─────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ Maintainability     │       X/5        │       X/5        │       X/5        │
│ Portability         │       X/5        │       X/5        │       X/5        │
│ Complexity          │       X/5        │       X/5        │       X/5        │
│ Reusability         │       X/5        │       X/5        │       X/5        │
│ Performance         │       X/5        │       X/5        │       X/5        │
│ Scalability         │       X/5        │       X/5        │       X/5        │
│ Coupling            │       X/5        │       X/5        │       X/5        │
├─────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ TOTAL               │      XX/35       │      XX/35       │      XX/35       │
├─────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ Key Risk            │ [main risk]      │ [main risk]      │ [main risk]      │
│ Key Strength        │ [main strength]  │ [main strength]  │ [main strength]  │
└─────────────────────┴──────────────────┴──────────────────┴──────────────────┘

After scoring, annotate each score with a one-line rationale. Do not present raw scores without explanation.

Weighted Scoring (Optional — for high-stakes decisions)

If the project has clearly prioritized dimensions, apply weights:

Example: E-commerce platform (performance and scalability are critical)
  Maintainability  × 1.0
  Portability      × 0.8
  Complexity       × 1.0
  Reusability      × 0.8
  Performance      × 1.5   ← critical
  Scalability      × 1.5   ← critical
  Coupling         × 1.0

Weighted Total = Σ(score × weight)

Ask the user if they want to apply weights before computing.


Phase 4 — Recommendation

After completing the tradeoff table, produce a structured recommendation:

## Architecture Recommendation

**Recommended:** [Architecture Name]
**Runner-up:** [Architecture Name] (viable if [condition])
**Eliminated:** [Architecture Name] — reason: [one line]

**Decision rationale:**
[2–4 sentences connecting scope constraints to the winning architecture's strengths
and explaining why the tradeoffs are acceptable given this project's context.]

**Key risks to monitor:**
- [Risk 1] → Mitigation: [approach]
- [Risk 2] → Mitigation: [approach]

**Evolution path:**
[What would trigger a migration to a more complex architecture, and what would that look like?]

Phase 5 — Architecture Decision Record (ADR)

For every architecture decision, offer to produce a minimal ADR:

# ADR-[NNN]: [Decision Title]

**Date:** YYYY-MM-DD
**Status:** Proposed | Accepted | Deprecated

## Context
[What situation forced this decision?]

## Decision
[What was decided and why?]

## Tradeoff Summary
[Reference the tradeoff table scores and key rationale.]

## Consequences
**Positive:** [what gets better]
**Negative:** [what gets harder]
**Risks:** [what to watch]

## Review Trigger
[Under what conditions should this decision be revisited?]

Always offer an ADR after a final recommendation is accepted. Architecture decisions that aren't recorded are decisions that will be relitigated in every future discussion.


Execution Rules

  1. Never skip Phase 0 or Phase 1. A recommendation without a stack-free solution or without scope is noise.
  2. Never recommend a single option without a tradeoff table. One option isn't a decision.
  3. Never score without rationale. Every cell needs a one-liner justification.
  4. Surface assumptions explicitly. "I'm assuming X — correct me if wrong."
  5. Flag irreversible decisions. Some choices (DB engine, event bus, API contract) are extremely expensive to change. Mark them as high-stakes before the user commits.
  6. Integrate with engineering-guidelines. The pattern protocol and Clean Architecture layers in its references/architecture.md are inputs here, not alternatives.

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.