Decision Frameworks (Meta-Skill)
Structured approaches for making engineering decisions with confidence and traceability.
Installation
OpenClaw / Moltbot / Clawbot
npx clawhub@latest install decision-frameworks
When to Use
- Choosing between libraries, frameworks, or tools
- Facing a build-vs-buy decision
- Selecting an architecture pattern (monolith vs microservices, SQL vs NoSQL, etc.)
- Multiple valid options exist and the team needs alignment
- Prioritizing a backlog or technical roadmap
- Documenting a significant technical decision for future reference
Decision Matrix Template
Use a weighted scoring matrix when comparing 3+ options across measurable criteria.
| Criteria |
Weight |
Option A |
Option B |
Option C |
| Performance |
5 |
4 (20) |
3 (15) |
5 (25) |
| Developer Experience |
4 |
5 (20) |
4 (16) |
3 (12) |
| Community Support |
3 |
5 (15) |
3 (9) |
2 (6) |
| Learning Curve |
3 |
3 (9) |
4 (12) |
2 (6) |
| Cost |
2 |
5 (10) |
3 (6) |
4 (8) |
| Total |
|
74 |
58 |
57 |
How to use:
- List criteria relevant to the decision
- Assign weights (1-5) based on project priorities
- Score each option per criterion (1-5)
- Multiply score x weight, sum per option
- Highest total wins — but sanity-check the result against gut feel
Build vs Buy Framework
Follow this decision tree:
Is it a core differentiator for your product?
├── YES → Build it (own the competitive advantage)
└── NO
├── Does a mature, well-maintained solution exist?
│ ├── YES → Buy / adopt it
│ └── NO → Build, but keep it minimal
└── Is the integration cost higher than building?
├── YES → Build
└── NO → Buy / adopt
Factor comparison:
| Factor |
Build |
Buy / Adopt |
| Maintenance cost |
Ongoing — your team owns it |
Vendor/community maintains it |
| Customization |
Unlimited flexibility |
Limited to extension points |
| Time to market |
Slower — development required |
Faster — ready-made |
| Team expertise |
Must have or acquire skills |
Abstracted away |
| Long-term cost |
Scales with internal capacity |
License/subscription fees |
| Vendor lock-in risk |
None |
Medium to high |
| Security control |
Full audit capability |
Dependent on vendor transparency |
Library / Framework Selection
Evaluate candidate libraries against these criteria before adopting:
| Criterion |
What to Check |
Red Flag |
| Maintenance activity |
Commits in last 90 days, open issues trend |
No commits in 6+ months |
| Community size |
GitHub stars, npm weekly downloads, Discord/forum |
< 1k weekly downloads for critical lib |
| Bundle size |
Bundlephobia, tree-shaking support |
> 50 KB gzipped for a utility lib |
| TypeScript support |
Built-in types vs DefinitelyTyped, type quality |
No types or outdated @types |
| Breaking change history |
Changelog, semver adherence, migration guides |
Frequent majors without guides |
| License |
OSI-approved, compatible with your project |
AGPL in a SaaS product, no license |
| Security audit |
Snyk/Socket score, CVE history, dependency depth |
Known unpatched CVEs |
| Documentation quality |
Getting started guide, API reference, examples |
README-only, no examples |
Quick heuristic: If you cannot replace the library within one sprint, treat the decision as a one-way door (see Reversibility Check below).
Architecture Decision Framework
Use these tradeoff tables when choosing between architectural approaches.
Monolith vs Microservices
| Factor |
Monolith |
Microservices |
| Complexity |
Low at start, grows over time |
High from day one |
| Deployment |
Single artifact |
Independent per service |
| Team scaling |
Harder beyond 10-15 engineers |
Enables autonomous teams |
| Data consistency |
ACID transactions |
Eventual consistency, sagas |
| Debugging |
Single process, easy tracing |
Distributed tracing required |
| Best when |
Early-stage, small team, MVP |
Proven domain boundaries, scale needs |
SQL vs NoSQL
| Factor |
SQL (Relational) |
NoSQL (Document/Key-Value) |
| Schema |
Strict, enforced |
Flexible, schema-on-read |
| Relationships |
Native joins, foreign keys |
Denormalized, application-level joins |
| Scaling |
Vertical (read replicas help) |
Horizontal by design |
| Consistency |
Strong (ACID) |
Tunable (eventual to strong) |
| Query flexibility |
Ad-hoc queries, aggregations |
Limited to access patterns |
| Best when |
Complex relations, reporting |
High write volume, flexible schema |
REST vs GraphQL
| Factor |
REST |
GraphQL |
| Simplicity |
Simple, well-understood |
Schema definition required |
| Over/under-fetching |
Common — multiple endpoints |
Clients request exact fields |
| Caching |
HTTP caching built-in |
Requires custom caching layer |
| Tooling |
Mature ecosystem |
Growing — Apollo, Relay, urql |
| Versioning |
URL or header versioning |
Schema evolution, deprecation |
| Best when |
CRUD APIs, public APIs |
Complex UIs, mobile + web clients |
SSR vs CSR vs SSG
| Factor |
SSR |
CSR |
SSG |
| Initial load |
Fast (HTML from server) |
Slow (JS bundle parse) |
Fastest (pre-built HTML) |
| SEO |
Excellent |
Poor without hydration |
Excellent |
| Best when |
Personalized pages |
Dashboards, SPAs |
Blogs, docs, marketing |
Monorepo vs Polyrepo
| Factor |
Monorepo |
Polyrepo |
| Code sharing |
Trivial — same repo |
Requires published packages |
| CI/CD complexity |
Needs smart filtering (Turborepo) |
Simple per-repo pipelines |
| Best when |
Shared libs, aligned releases |
Independent teams, different stacks |
Priority Matrices — RICE Scoring
Score and rank features/tasks:
RICE Score = (Reach x Impact x Confidence) / Effort
| Factor |
Scale |
| Reach |
Number of users/events affected per quarter |
| Impact |
3 = massive, 2 = high, 1 = medium, 0.5 = low, 0.25 = minimal |
| Confidence |
100% = high, 80% = medium, 50% = low |
| Effort |
Person-weeks (or person-sprints) |
MoSCoW Method
| Category |
Meaning |
Budget Target |
| Must |
Non-negotiable for this release |
~60% of effort |
| Should |
Important but not critical |
~20% of effort |
| Could |
Desirable if time permits |
~15% of effort |
| Won't |
Explicitly out of scope (this time) |
~5% (planning) |
Reversibility Check
Classify every significant decision as a one-way or two-way door.
| Aspect |
One-Way Door (Type 1) |
Two-Way Door (Type 2) |
| Definition |
Irreversible or very costly to undo |
Easily reversed with low cost |
| Examples |
Database engine migration, public API contract, language rewrite |
UI framework for internal tool, feature flag experiment, library swap behind interface |
| How to identify |
Would reverting require > 1 sprint of rework? Data migration? Customer communication? |
Can you revert with a config change, flag toggle, or single PR? |
| Approach |
Invest in analysis, prototype, get stakeholder sign-off |
Decide fast, ship, measure, iterate |
| Time to decide |
Days to weeks — thorough evaluation |
Hours — bias toward action |
Rule of thumb: Wrap risky choices behind interfaces/abstractions. This converts many one-way doors into two-way doors by isolating the implementation from consumers.
ADR Template
Document significant decisions using a lightweight Architecture Decision Record.
# ADR-NNNN: [Short Title]
## Status
[Proposed | Accepted | Deprecated | Superseded by ADR-XXXX]
## Context
What is the problem or situation that motivates this decision?
Include constraints, requirements, and forces at play.
## Decision
What is the change being proposed or adopted?
State the decision clearly and concisely.
## Consequences
### Positive
- [Benefit 1]
- [Benefit 2]
### Negative
- [Tradeoff 1]
- [Tradeoff 2]
### Risks
- [Risk and mitigation]
Store in docs/adr/ or decisions/. Number sequentially. Never delete — mark superseded. Review during onboarding and quarterly audits.
Anti-Patterns
| Anti-Pattern |
Description |
Counter |
| Analysis Paralysis |
Endless evaluation, no decision made |
Set a decision deadline; use the matrix |
| HiPPO |
Highest Paid Person's Opinion overrides data |
Require data or a scored matrix for all options |
| Sunk Cost Fallacy |
Continuing because of past investment, not future value |
Evaluate options as if starting fresh today |
| Bandwagon Effect |
Choosing because "everyone uses it" |
Score against your actual criteria |
| Premature Optimization |
Optimizing before measuring or validating need |
Profile first; optimize only proven bottlenecks |
| Resume-Driven Development |
Picking tech to pad a resume, not to solve the problem |
Align choices with team skills and project goals |
| Not Invented Here |
Rejecting external solutions out of pride |
Run the Build vs Buy framework honestly |
NEVER Do
- NEVER skip writing down the decision — undocumented decisions get relitigated endlessly
- NEVER decide by committee without a single owner — assign a DRI (Directly Responsible Individual)
- NEVER treat all decisions as equal weight — classify by reversibility and impact first
- NEVER ignore second-order effects — ask "and then what?" at least twice
- NEVER lock in without an exit plan — define how you would migrate away before committing
- NEVER conflate familiarity with superiority — evaluate on criteria, not comfort
- NEVER defer a one-way door decision indefinitely — the cost of delay often exceeds the cost of a wrong choice
1---
2name: decision-frameworks
3model: reasoning
4description: Structured decision-making patterns for common engineering choices — library selection, architecture, build vs buy, prioritization, reversibility analysis, and ADRs. Use when choosing between tools, architectures, or approaches, or when documenting technical decisions.
5metadata:
6 source: https://skillmd.com/skills/modbender/decision-frameworks
7---
8
9# Decision Frameworks (Meta-Skill)
10
11Structured approaches for making engineering decisions with confidence and traceability.
12
13
14## Installation
15
16### OpenClaw / Moltbot / Clawbot
17
18```bash
19npx clawhub@latest install decision-frameworks
20```
21
22
23---
24
25## When to Use
26
27- Choosing between libraries, frameworks, or tools
28- Facing a build-vs-buy decision
29- Selecting an architecture pattern (monolith vs microservices, SQL vs NoSQL, etc.)
30- Multiple valid options exist and the team needs alignment
31- Prioritizing a backlog or technical roadmap
32- Documenting a significant technical decision for future reference
33
34---
35
36## Decision Matrix Template
37
38Use a weighted scoring matrix when comparing 3+ options across measurable criteria.
39
40| Criteria | Weight | Option A | Option B | Option C |
41|----------------------|--------|----------|----------|----------|
42| Performance | 5 | 4 (20) | 3 (15) | 5 (25) |
43| Developer Experience | 4 | 5 (20) | 4 (16) | 3 (12) |
44| Community Support | 3 | 5 (15) | 3 (9) | 2 (6) |
45| Learning Curve | 3 | 3 (9) | 4 (12) | 2 (6) |
46| Cost | 2 | 5 (10) | 3 (6) | 4 (8) |
47| **Total** | | **74** | **58** | **57** |
48
49**How to use:**
50
511. List criteria relevant to the decision
522. Assign weights (1-5) based on project priorities
533. Score each option per criterion (1-5)
544. Multiply score x weight, sum per option
555. Highest total wins — but sanity-check the result against gut feel
56
57---
58
59## Build vs Buy Framework
60
61Follow this decision tree:
62
63```
64Is it a core differentiator for your product?
65├── YES → Build it (own the competitive advantage)
66└── NO
67 ├── Does a mature, well-maintained solution exist?
68 │ ├── YES → Buy / adopt it
69 │ └── NO → Build, but keep it minimal
70 └── Is the integration cost higher than building?
71 ├── YES → Build
72 └── NO → Buy / adopt
73```
74
75**Factor comparison:**
76
77| Factor | Build | Buy / Adopt |
78|----------------------|--------------------------------|---------------------------------|
79| Maintenance cost | Ongoing — your team owns it | Vendor/community maintains it |
80| Customization | Unlimited flexibility | Limited to extension points |
81| Time to market | Slower — development required | Faster — ready-made |
82| Team expertise | Must have or acquire skills | Abstracted away |
83| Long-term cost | Scales with internal capacity | License/subscription fees |
84| Vendor lock-in risk | None | Medium to high |
85| Security control | Full audit capability | Dependent on vendor transparency |
86
87---
88
89## Library / Framework Selection
90
91Evaluate candidate libraries against these criteria before adopting:
92
93| Criterion | What to Check | Red Flag |
94|--------------------------|----------------------------------------------------|------------------------------------|
95| Maintenance activity | Commits in last 90 days, open issues trend | No commits in 6+ months |
96| Community size | GitHub stars, npm weekly downloads, Discord/forum | < 1k weekly downloads for critical lib |
97| Bundle size | Bundlephobia, tree-shaking support | > 50 KB gzipped for a utility lib |
98| TypeScript support | Built-in types vs DefinitelyTyped, type quality | No types or outdated @types |
99| Breaking change history | Changelog, semver adherence, migration guides | Frequent majors without guides |
100| License | OSI-approved, compatible with your project | AGPL in a SaaS product, no license |
101| Security audit | Snyk/Socket score, CVE history, dependency depth | Known unpatched CVEs |
102| Documentation quality | Getting started guide, API reference, examples | README-only, no examples |
103
104**Quick heuristic:** If you cannot replace the library within one sprint, treat the decision as a one-way door (see Reversibility Check below).
105
106---
107
108## Architecture Decision Framework
109
110Use these tradeoff tables when choosing between architectural approaches.
111
112### Monolith vs Microservices
113
114| Factor | Monolith | Microservices |
115|---------------------|----------------------------------|--------------------------------------|
116| Complexity | Low at start, grows over time | High from day one |
117| Deployment | Single artifact | Independent per service |
118| Team scaling | Harder beyond 10-15 engineers | Enables autonomous teams |
119| Data consistency | ACID transactions | Eventual consistency, sagas |
120| Debugging | Single process, easy tracing | Distributed tracing required |
121| Best when | Early-stage, small team, MVP | Proven domain boundaries, scale needs |
122
123### SQL vs NoSQL
124
125| Factor | SQL (Relational) | NoSQL (Document/Key-Value) |
126|---------------------|----------------------------------|--------------------------------------|
127| Schema | Strict, enforced | Flexible, schema-on-read |
128| Relationships | Native joins, foreign keys | Denormalized, application-level joins |
129| Scaling | Vertical (read replicas help) | Horizontal by design |
130| Consistency | Strong (ACID) | Tunable (eventual to strong) |
131| Query flexibility | Ad-hoc queries, aggregations | Limited to access patterns |
132| Best when | Complex relations, reporting | High write volume, flexible schema |
133
134### REST vs GraphQL
135
136| Factor | REST | GraphQL |
137|---------------------|----------------------------------|--------------------------------------|
138| Simplicity | Simple, well-understood | Schema definition required |
139| Over/under-fetching | Common — multiple endpoints | Clients request exact fields |
140| Caching | HTTP caching built-in | Requires custom caching layer |
141| Tooling | Mature ecosystem | Growing — Apollo, Relay, urql |
142| Versioning | URL or header versioning | Schema evolution, deprecation |
143| Best when | CRUD APIs, public APIs | Complex UIs, mobile + web clients |
144
145### SSR vs CSR vs SSG
146
147| Factor | SSR | CSR | SSG |
148|---------------------|------------------------|------------------------|-----------------------------|
149| Initial load | Fast (HTML from server) | Slow (JS bundle parse) | Fastest (pre-built HTML) |
150| SEO | Excellent | Poor without hydration | Excellent |
151| Best when | Personalized pages | Dashboards, SPAs | Blogs, docs, marketing |
152
153### Monorepo vs Polyrepo
154
155| Factor | Monorepo | Polyrepo |
156|---------------------|----------------------------------|--------------------------------------|
157| Code sharing | Trivial — same repo | Requires published packages |
158| CI/CD complexity | Needs smart filtering (Turborepo) | Simple per-repo pipelines |
159| Best when | Shared libs, aligned releases | Independent teams, different stacks |
160
161---
162
163## Priority Matrices — RICE Scoring
164
165Score and rank features/tasks:
166
167```
168RICE Score = (Reach x Impact x Confidence) / Effort
169```
170
171| Factor | Scale |
172|------------|--------------------------------------------------------|
173| Reach | Number of users/events affected per quarter |
174| Impact | 3 = massive, 2 = high, 1 = medium, 0.5 = low, 0.25 = minimal |
175| Confidence | 100% = high, 80% = medium, 50% = low |
176| Effort | Person-weeks (or person-sprints) |
177
178### MoSCoW Method
179
180| Category | Meaning | Budget Target |
181|--------------|------------------------------------------------|----------------|
182| **Must** | Non-negotiable for this release | ~60% of effort |
183| **Should** | Important but not critical | ~20% of effort |
184| **Could** | Desirable if time permits | ~15% of effort |
185| **Won't** | Explicitly out of scope (this time) | ~5% (planning) |
186
187---
188
189## Reversibility Check
190
191Classify every significant decision as a one-way or two-way door.
192
193| Aspect | One-Way Door (Type 1) | Two-Way Door (Type 2) |
194|------------------|-------------------------------------|-------------------------------------|
195| Definition | Irreversible or very costly to undo | Easily reversed with low cost |
196| Examples | Database engine migration, public API contract, language rewrite | UI framework for internal tool, feature flag experiment, library swap behind interface |
197| How to identify | Would reverting require > 1 sprint of rework? Data migration? Customer communication? | Can you revert with a config change, flag toggle, or single PR? |
198| Approach | Invest in analysis, prototype, get stakeholder sign-off | Decide fast, ship, measure, iterate |
199| Time to decide | Days to weeks — thorough evaluation | Hours — bias toward action |
200
201**Rule of thumb:** Wrap risky choices behind interfaces/abstractions. This converts many one-way doors into two-way doors by isolating the implementation from consumers.
202
203---
204
205## ADR Template
206
207Document significant decisions using a lightweight Architecture Decision Record.
208
209```markdown
210# ADR-NNNN: [Short Title]
211
212## Status
213[Proposed | Accepted | Deprecated | Superseded by ADR-XXXX]
214
215## Context
216What is the problem or situation that motivates this decision?
217Include constraints, requirements, and forces at play.
218
219## Decision
220What is the change being proposed or adopted?
221State the decision clearly and concisely.
222
223## Consequences
224
225### Positive
226- [Benefit 1]
227- [Benefit 2]
228
229### Negative
230- [Tradeoff 1]
231- [Tradeoff 2]
232
233### Risks
234- [Risk and mitigation]
235```
236
237Store in `docs/adr/` or `decisions/`. Number sequentially. Never delete — mark superseded. Review during onboarding and quarterly audits.
238
239---
240
241## Anti-Patterns
242
243| Anti-Pattern | Description | Counter |
244|--------------------------|------------------------------------------------------|---------------------------------------------|
245| Analysis Paralysis | Endless evaluation, no decision made | Set a decision deadline; use the matrix |
246| HiPPO | Highest Paid Person's Opinion overrides data | Require data or a scored matrix for all options |
247| Sunk Cost Fallacy | Continuing because of past investment, not future value | Evaluate options as if starting fresh today |
248| Bandwagon Effect | Choosing because "everyone uses it" | Score against your actual criteria |
249| Premature Optimization | Optimizing before measuring or validating need | Profile first; optimize only proven bottlenecks |
250| Resume-Driven Development | Picking tech to pad a resume, not to solve the problem | Align choices with team skills and project goals |
251| Not Invented Here | Rejecting external solutions out of pride | Run the Build vs Buy framework honestly |
252
253---
254
255## NEVER Do
256
2571. **NEVER skip writing down the decision** — undocumented decisions get relitigated endlessly
2582. **NEVER decide by committee without a single owner** — assign a DRI (Directly Responsible Individual)
2593. **NEVER treat all decisions as equal weight** — classify by reversibility and impact first
2604. **NEVER ignore second-order effects** — ask "and then what?" at least twice
2615. **NEVER lock in without an exit plan** — define how you would migrate away before committing
2626. **NEVER conflate familiarity with superiority** — evaluate on criteria, not comfort
2637. **NEVER defer a one-way door decision indefinitely** — the cost of delay often exceeds the cost of a wrong choice