wpank

Decision Frameworks

知识管理v1.0.0
作者:wpank更新于 2026-05-17decision-frameworks@clawhub_wpank/decision-frameworks
知识库问答摘要总结文档问答

据 AlphaMoat 统计,截至 2026-09,Decision Frameworks 累计下载 3,008 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 3,725 位,在「知识管理」分类(442 个)中排名第 320 位。

累计安装
101
累计下载
3,008
星标
-
全站排名
#3,725
全站前 74% · 「知识管理」前 73%
平台累计安装累计下载星标评论
ClawHub ↗1013,003--
SkillHub ↗983,008-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

这些模板用于组织分析,不会自动验证输入数据或替代团队判断。评分标准、权重和结论应结合具体背景记录,并为重要选择保留退出方案。

资料发布于 2026-10-29

可以用来做什么

  • 比较多个库、框架或架构方案。
  • 分析自建与采用现有方案的成本和风险。
  • 记录重要技术决策及其后果。

什么时候用

  • 团队需要对技术选型或架构方案形成可追溯决定时。
  • 需要按影响、成本和可逆性排序工作时。
  • 需要撰写或复核 ADR 时。

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

用决策矩阵比较几个技术方案,并列出需要验证的假设。
为一项架构选择草拟 ADR 的背景、决策和风险部分。

月度数据趋势

累计下载3,008
1,5372,3273,1172026-03 · 累计下载 1,6462026-05 · 累计下载 2,3952026-06 · 累计下载 2,5352026-07 · 累计下载 2,7612026-08 · 累计下载 2,8922026-09 · 累计下载 3,00826-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,008—-
2026-082,892+4.7%-
2026-072,761+8.9%-
2026-062,535+5.8%-
2026-052,395—-
2026-031,646—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

11 KB · ClawHub v1.0.0
---
name: decision-frameworks
model: reasoning
description: 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.
---

# Decision Frameworks (Meta-Skill)

Structured approaches for making engineering decisions with confidence and traceability.
展开全部(共 262 行)

## Installation

### OpenClaw / Moltbot / Clawbot

```bash
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:**

1. List criteria relevant to the decision
2. Assign weights (1-5) based on project priorities
3. Score each option per criterion (1-5)
4. Multiply score x weight, sum per option
5. 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.

```markdown
# 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

1. **NEVER skip writing down the decision** — undocumented decisions get relitigated endlessly
2. **NEVER decide by committee without a single owner** — assign a DRI (Directly Responsible Individual)
3. **NEVER treat all decisions as equal weight** — classify by reversibility and impact first
4. **NEVER ignore second-order effects** — ask "and then what?" at least twice
5. **NEVER lock in without an exit plan** — define how you would migrate away before committing
6. **NEVER conflate familiarity with superiority** — evaluate on criteria, not comfort
7. **NEVER defer a one-way door decision indefinitely** — the cost of delay often exceeds the cost of a wrong choice

「知识管理」分类下的热门技能

wpank 的其他技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。