Architecture Tradeoff Analyzer
by @quochungto
Systematically analyze trade-offs across quality attribute dimensions for architecture decisions. Use this skill whenever the user is comparing architecture...
clawhub install bookforge-architecture-tradeoff-analyzerπ About This Skill
name: architecture-tradeoff-analyzer description: Systematically analyze trade-offs across quality attribute dimensions for architecture decisions. Use this skill whenever the user is comparing architecture options, weighing competing quality attributes (performance vs scalability, simplicity vs flexibility), making any structural technology decision, evaluating monolith vs distributed, choosing communication patterns, or asking "what are the trade-offs?" β even if they don't explicitly say "trade-off analysis." version: 1.0.0 homepage: https://github.com/bookforge-ai/bookforge-skills/tree/main/books/fundamentals-of-software-architecture/skills/architecture-tradeoff-analyzer metadata: {"openclaw":{"emoji":"π","homepage":"https://github.com/bookforge-ai/bookforge-skills"}} status: draft source-books: - id: fundamentals-of-software-architecture title: "Fundamentals of Software Architecture" authors: ["Mark Richards", "Neal Ford"] chapters: [1, 2, 4, 5, 18, 19] tags: [software-architecture, architecture, trade-offs, decision-making, quality-attributes] depends-on: [] # Foundation skill β no dependencies execution: tier: 1 mode: full inputs: - type: none description: "Architecture decision context from the user β what options they're considering and why" tools-required: [Read, Write] tools-optional: [Grep, Glob] mcps-required: [] environment: "Any agent environment. If a codebase exists, can read it for context."
Architecture Trade-off Analyzer
When to Use
You're in a situation where an architecture decision needs to be made and there are competing concerns. Typical triggers:
Before starting, verify:
Context
Required Context (must have before proceeding)
Observable Context (gather from environment if available)
docs/, architecture/, adr/, *.adr.md, README architecture sections
β If unavailable: start from the user's verbal description
Default Assumptions
Process
Step 1: Frame the Decision
ACTION: Clearly state the architectural decision that needs to be made. Name the competing options.
WHY: Fuzzy decisions produce fuzzy analysis. "Should we use microservices?" is too vague. "Should our order processing system use microservices or a modular monolith, given that we need independent scaling of the payment module?" is a decision you can actually analyze. Framing also prevents scope creep β the analysis stays focused on THIS decision.
IF the user hasn't specified options β help them enumerate at least 2-3 viable alternatives before proceeding.
Step 2: Identify Relevant Quality Attributes
ACTION: Determine which architecture characteristics (quality attributes) are affected by this decision. Focus on the user's top 3 driving characteristics.
WHY: Not all quality attributes matter for every decision. Analyzing 15 attributes produces noise. The "Top-3 Rule" from architecture practice says: keep driving characteristics to three maximum. This forces prioritization and makes trade-offs visible. Each additional characteristic you design support for complicates the overall system β like flying a helicopter where every control affects every other control.
Common quality attribute categories:
For the full taxonomy, see references/quality-attributes.md.
IF the user says "all of them are important" β push back. Ask: "If you could only optimize for 3, which would they be?" This reveals the real priorities.
Step 3: Analyze Each Option's Advantages
ACTION: For each architectural option, list what it does WELL across the identified quality attributes.
WHY: Start with advantages to build a fair picture. Most teams already lean toward one option β this step validates their intuition and builds confidence that you understand the options before challenging them.
Step 4: Hunt for the Negatives
ACTION: For each option, actively search for disadvantages, risks, and hidden costs. This is the critical step.
WHY: "Programmers know the benefits of everything and the trade-offs of nothing. Architects need to understand both." The natural human bias is to see advantages of the preferred option and disadvantages of alternatives. An architect's core job is to overcome this bias. If you can't articulate the downsides of your chosen approach, you haven't analyzed it deeply enough. If you think there are no trade-offs, you haven't found them yet (First Law, Corollary 1).
Probe for:
Step 5: Build the Trade-off Matrix
ACTION: Create a comparison table with options as columns and quality attributes as rows. For each cell, mark whether the option supports (+), hurts (-), or is neutral (=) for that attribute, with a brief justification.
WHY: A visual matrix makes trade-offs undeniable. When you see that Option A is (+) on scalability but (-) on simplicity and (-) on cost, while Option B is the reverse, the decision becomes a conscious prioritization rather than a gut feeling. This is also the primary artifact stakeholders can review.
Format:
| Quality Attribute | Option A | Option B |
|-------------------|---------------|---------------|
| Scalability | + (why) | - (why) |
| Simplicity | - (why) | + (why) |
| Cost | - (why) | + (why) |
| Deployability | + (why) | = (neutral) |
Step 6: Identify Synergies and Conflicts
ACTION: Note where quality attributes reinforce each other (synergies) or conflict (tensions) within each option.
WHY: Trade-offs aren't just between options β they exist WITHIN options too. Security almost always hurts performance. Scalability often conflicts with simplicity. Recognizing these internal tensions prevents surprise later. It also reveals "least worst" opportunities β options where the internal conflicts are most manageable for your specific context.
Step 7: Apply the "Least Worst" Principle
ACTION: Recommend an option based on which has the most acceptable set of trade-offs for THIS specific context. Frame as "least worst" not "best."
WHY: There is no "best" architecture β only trade-offs. The goal is the option whose downsides are most tolerable given the team's constraints, business goals, and risk appetite. Framing as "least worst" sets honest expectations: you're choosing which problems you'd rather have, not eliminating problems. This prevents "Covering Your Assets" β the anti-pattern where architects avoid decisions out of fear of being wrong.
The decision depends on: deployment environment, business drivers, company culture, budgets, timeframes, developer skill set, and operational maturity.
After stating the recommendation, always include a "Context Sensitivity" analysis: explicitly state what would change the recommendation. For example: "If the team had 2+ years of microservices experience, we'd recommend Option A instead." This prevents the recommendation from being treated as universal truth β it's context-dependent, and the conditions under which it would flip should be transparent.
Reference named anti-patterns when relevant: When the analysis reveals a decision-making dysfunction (fear of deciding, repeated debates, lost rationale), name the anti-pattern explicitly:
Naming the anti-pattern helps teams recognize and break the pattern.
Step 8: Document the Decision
ACTION: Produce a Trade-off Analysis Report (see Output format below). If the decision is architecturally significant, also produce an ADR summary.
WHY: "Why is more important than how" (Second Law). Future developers can look at a system and figure out HOW it's structured. What they can't figure out is WHY those choices were made. Without documentation, teams fall into the "Groundhog Day" anti-pattern β the same decisions get debated repeatedly because nobody recorded the rationale.
A decision is architecturally significant if it affects: structure, nonfunctional characteristics, dependencies, interfaces, or construction techniques.
Inputs
Outputs
Trade-off Analysis Report
# Trade-off Analysis: {Decision Title}Decision
{Clear statement of the decision being analyzed}Options Considered
1. {Option A} β {one-line description}
2. {Option B} β {one-line description}
3. {Option C} β {if applicable}Driving Quality Attributes
1. {Top priority attribute}
2. {Second priority}
3. {Third priority}Trade-off Matrix
| Quality Attribute | Option A | Option B | Option C |
|-------------------|----------|----------|----------|
| {Attribute 1} | + reason | - reason | = reason |
| {Attribute 2} | - reason | + reason | + reason |
| {Attribute 3} | + reason | = reason | - reason |
Synergies and Conflicts
{Option A}: {attribute X} reinforces {attribute Y} because...
{Option B}: {attribute X} conflicts with {attribute Z} because... Recommendation
{Recommended option} β the least worst choice for this context because:
{Primary justification tied to top driving attribute}
{Secondary justification}
{Acknowledged downsides and why they're acceptable} Risks of This Choice
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| {Risk 1} | Low/Med/High | Low/Med/High | {Concrete mitigation} |
| {Risk 2} | Low/Med/High | Low/Med/High | {Concrete mitigation} |
Context Sensitivity
This recommendation assumes: {key assumptions}.
If {constraint X changed} β we'd recommend {Option Y} instead because {reason}
If {constraint Z changed} β the trade-off balance shifts toward {Option W} because {reason} Architecture Decision Record (if architecturally significant)
Status: Proposed
Context: {forces at play}
Decision: {active voice, with full WHY justification}
Consequences: {positive AND negative trade-offs}
Key Principles
Examples
Scenario: Messaging pattern for auction system Trigger: "Should we use pub/sub topics or point-to-point queues for our bidding system?" Process: Framed decision as topics vs queues for bid distribution. Identified driving attributes: extensibility, security, monitoring. Built matrix showing topics excel at extensibility and decoupling, but queues excel at security (isolated access), heterogeneous contracts (per-consumer formats), and monitoring (per-queue metrics). Identified conflict: extensibility vs security within topics. Output: Recommended queues for the payment and analytics services (security-critical), topics for the bid streaming service (extensibility-critical). Trade-off: accept tighter coupling in exchange for security and monitoring control.
Scenario: Monolith vs microservices for sandwich ordering app Trigger: "We're building a simple ordering system but customization per franchise is key. Microservices?" Process: Framed as modular monolith vs microkernel. Top 3 attributes: customization, simplicity, cost. Matrix showed both options are acceptable β modular monolith is simpler and cheaper but customization requires explicit override design; microkernel maps naturally to customization (plug-in per franchise) but adds infrastructure complexity. Applied least-worst: for a small team with budget constraints, modular monolith with a customization override endpoint is the least worst β it's simpler, cheaper, and customization can be explicitly designed with fitness functions. Output: Trade-off analysis report + ADR recommending modular monolith with override endpoint. Explicitly documented the trade-off: accepting manual customization management in exchange for simplicity and low cost.
Scenario: Synchronous vs asynchronous for high-scale system Trigger: "We're redesigning our auction platform. REST everywhere or should we mix in message queues?" Process: Framed as synchronous-default vs async-where-needed. Top 3: reliability, scalability, simplicity. Matrix: sync is simpler and easier to debug but creates cascading failures under load; async scales better and buffers spikes but introduces data synchronization complexity, potential deadlocks, and harder debugging. Applied context: the payment service needs reliability buffering (many auctions ending simultaneously), but the session management service is simple request/response. Output: Recommended mixed approach: synchronous by default (simpler), asynchronous for payment processing and bid capture (reliability-critical, spike-prone). Documented the "use synchronous by default, asynchronous when necessary" principle.
References
License
This skill is licensed under CC-BY-SA-4.0. Source: BookForge β Fundamentals of Software Architecture by Mark Richards, Neal Ford.
Related BookForge Skills
This skill is standalone. Browse more BookForge skills: bookforge-skills
β‘ When to Use
π‘ Examples
Scenario: Messaging pattern for auction system Trigger: "Should we use pub/sub topics or point-to-point queues for our bidding system?" Process: Framed decision as topics vs queues for bid distribution. Identified driving attributes: extensibility, security, monitoring. Built matrix showing topics excel at extensibility and decoupling, but queues excel at security (isolated access), heterogeneous contracts (per-consumer formats), and monitoring (per-queue metrics). Identified conflict: extensibility vs security within topics. Output: Recommended queues for the payment and analytics services (security-critical), topics for the bid streaming service (extensibility-critical). Trade-off: accept tighter coupling in exchange for security and monitoring control.
Scenario: Monolith vs microservices for sandwich ordering app Trigger: "We're building a simple ordering system but customization per franchise is key. Microservices?" Process: Framed as modular monolith vs microkernel. Top 3 attributes: customization, simplicity, cost. Matrix showed both options are acceptable β modular monolith is simpler and cheaper but customization requires explicit override design; microkernel maps naturally to customization (plug-in per franchise) but adds infrastructure complexity. Applied least-worst: for a small team with budget constraints, modular monolith with a customization override endpoint is the least worst β it's simpler, cheaper, and customization can be explicitly designed with fitness functions. Output: Trade-off analysis report + ADR recommending modular monolith with override endpoint. Explicitly documented the trade-off: accepting manual customization management in exchange for simplicity and low cost.
Scenario: Synchronous vs asynchronous for high-scale system Trigger: "We're redesigning our auction platform. REST everywhere or should we mix in message queues?" Process: Framed as synchronous-default vs async-where-needed. Top 3: reliability, scalability, simplicity. Matrix: sync is simpler and easier to debug but creates cascading failures under load; async scales better and buffers spikes but introduces data synchronization complexity, potential deadlocks, and harder debugging. Applied context: the payment service needs reliability buffering (many auctions ending simultaneously), but the session management service is simple request/response. Output: Recommended mixed approach: synchronous by default (simpler), asynchronous for payment processing and bid capture (reliability-critical, spike-prone). Documented the "use synchronous by default, asynchronous when necessary" principle.