Turning academic decision theory into a practical tool for developers
Doc2AHP is a Claude Code Skill that brings structured multi-criteria decision analysis to software engineering, based on the principles from the paper "Doc2AHP: Inferring Structured Multi-Criteria Decision Models via Semantic Trees with LLMs".
Tech stack selection, architecture decisions, library comparisons — these decisions often:
- Involve multiple conflicting evaluation dimensions
- Rely on gut feeling rather than systematic analysis
- Lack traceable decision records
Doc2AHP uses the AHP (Analytic Hierarchy Process) framework to transform vague "feelings" into quantifiable, traceable, structured decisions.
Doc2AHP supports two ways to begin a decision analysis:
- Mode A: Document-Grounded — Extract criteria from actual documents (requirements docs, tech specs, web search results) with full source traceability. Faithful to the paper's "Doc → AHP" pipeline. See example
- Mode B: Quick Analysis — Generate criteria from LLM domain knowledge for rapid exploration. Faster, but less traceable.
Copy the skill/doc2ahp-decision/ directory into your project's .claude/skills/:
# In your project root
mkdir -p .claude/skills
cp -r path/to/doc2ahp/skill/doc2ahp-decision .claude/skills/Describe your decision scenario in Claude Code. The skill will guide you through the decision process:
- Input Mode Selection — Choose Document-Grounded or Quick Analysis mode
- Framework Construction — Define goal, extract criteria, build hierarchy
- Multi-Perspective Evaluation — Evaluate from technical, business, ops perspectives
- Consensus Aggregation — Merge perspectives into consensus weights
- Consistency Check — Ensure logical consistency of judgments
- Alternative Scoring — Weighted scoring to produce rankings
- Decision Report — Structured, archivable report output
| Scenario | Key AHP Concept | File |
|---|---|---|
| AI Foundation Model API Selection | Multi-perspective disagreement & consensus | examples/ai-model-selection.md |
| Programming Language for Trading System | Leader Agent constraint & sensitivity analysis | examples/language-holy-war.md |
| Senior Developer Career Path | AHP beyond technology (inner-voice perspectives) | examples/career-path-decision.md |
| Microservices vs Monolith Architecture | Leader Agent priority constraint | examples/architecture-decision.md |
| Cloud Provider Selection (Document-Grounded) | Doc-grounded criteria extraction (Mode A) | examples/doc-grounded-cloud-selection.md |
| JS Runtime Selection (Real Data) | Full calculation with real benchmark data | examples/js-runtime-selection/ |
| Scenario | File |
|---|---|
| Frontend Framework Selection | examples/more/tech-stack-selection.md |
| State Management Library Comparison | examples/more/library-comparison.md |
| Database for Social App at Scale | examples/more/database-selection.md |
| AI Coding Assistant Showdown | examples/more/coding-assistant-showdown.md |
- Zero Dependencies: Pure Skill approach — the LLM itself is the AHP computation engine
- Cognitive Constraints: Max 7 criteria per level, max 3 depth levels (Miller's Law)
- Multi-Perspective Evaluation: Simulates the paper's multi-agent mechanism to reduce single-viewpoint bias
- Consistency Verification: Transitivity checks ensure logical coherence
doc2ahp/
├── skill/doc2ahp-decision/ # Claude Code Skill (core)
├── docs/methodology.md # Detailed methodology
├── paper/PAPER_SUMMARY.md # Paper summary
└── examples/ # Usage examples
Good fit: 3+ alternatives, multi-dimensional trade-offs, architecture-level decisions, need to explain rationale to team
Not ideal: Simple A/B choices, single-dimension decisions, urgent decisions
- Methodology — Full mapping from paper to practice
- Paper Summary — Core concepts from the Doc2AHP paper
If the skill / methodology / examples in this project help your work, please cite the original paper:
@article{Wu2026Doc2AHP,
author = {Hongjia Wu and Shuai Zhou and Hongxin Zhang and Wei Chen},
title = {Doc2AHP: Inferring Structured Multi-Criteria Decision Models via Semantic Trees with LLMs},
journal = {arXiv preprint arXiv:2601.16479},
year = {2026},
doi = {10.48550/arXiv.2601.16479}
}