Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计未展示

hierarchical-reasoning层次推理

Agent Skill

hierarchical-reasoning 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

333

周安装

14

GitHub Stars

公开资料未说明

下载量

116
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hierarchical-reasoning(层次推理)
来源仓库:https://github.com/zpankz/mcp-skillset
仓库路径:skills/hierarchical-reasoning
安装命令:
npx skills add zpankz/mcp-skillset --skill "hierarchical-reasoning"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add zpankz/mcp-skillset --skill "hierarchical-reasoning"

简介

用于层次化推理与任务分解,支持子目标规划与优先级排序。

  • 适用于复杂问题解决或多阶段工作流管理场景。
  • 可生成决策树或识别关键路径节点。
  • 安装命令:npx skills add zpankz/mcp-skillset --skill "hierarchical-reasoning"。
  • 建议结合实际用例验证推理逻辑与边界条件。

SKILL.md

name
hierarchical-reasoning
description
Implements sophisticated multi-level reasoning for complex problems requiring strategic planning, tactical approach design, and operational execution. Use for problems needing deep analysis, multi-step reasoning, systematic decomposition from first principles to implementation, convergence-aware iterative refinement, or uncertainty quantification across abstraction levels.

Hierarchical Reasoning

Execute sophisticated reasoning through a three-level cognitive architecture that mirrors human multi-timescale processing: strategic (abstract planning), tactical (approach design), and operational (detailed execution).

Core Principle

Separate concerns by abstraction level while maintaining bidirectional information flow:

  • Strategic level formulates problems and sets goals (slow, abstract)
  • Tactical level designs approaches and selects methods (medium, structured)
  • Operational level performs detailed computations (fast, concrete)

Each level informs the others through iterative refinement until convergence.

When to Use

Apply hierarchical reasoning for:

  1. Complex multi-step problems requiring systematic decomposition
  2. Strategic questions needing both big-picture framing and detailed analysis
  3. Design challenges bridging abstract requirements to concrete implementation
  4. Reasoning under uncertainty where confidence tracking matters
  5. Deep analysis requiring multiple passes of refinement
  6. First principles thinking building from fundamentals to emergent systems

Do NOT use for:

  • Simple factual lookups
  • Single-step calculations
  • Purely creative tasks without logical structure
  • Real-time processing requirements

Usage Pattern

1. Problem Structuring

Frame the problem with clarity:

Problem: [Clear statement of what needs to be reasoned about]
Context: [Relevant background, constraints, domain knowledge]
Success Criteria: [How to evaluate reasoning quality]

2. Execute Hierarchical Reasoning

Use the reasoning script:

python scripts/hierarchical_reasoner.py "<problem>" --context '<json_context>'

Or invoke programmatically:

from hierarchical_reasoner import HierarchicalReasoner

reasoner = HierarchicalReasoner(
    max_strategic_cycles=3,
    max_tactical_cycles=5, 
    max_operational_cycles=7,
    convergence_threshold=0.95,
    uncertainty_threshold=0.1
)

result = reasoner.reason(problem, context)

3. Interpret Results

Examine multi-level outputs:

  • Strategic state: Problem formulation, goals, high-level insights
  • Tactical state: Approaches, methods, reasoning strategies
  • Operational state: Detailed analysis, computations, evidence
  • Convergence metrics: State stability and confidence at each level
  • Final synthesis: Integrated conclusion across all levels

4. Iterate Based on Convergence

If not converged (convergence_score < threshold):

  • Review which level has low convergence
  • Add relevant context or constraints
  • Increase cycle count for that level
  • Re-run with refined inputs

Reasoning Flow

┌─────────────────────────────────────────────┐
│ STRATEGIC LEVEL (Abstract Planning)         │
│ • Problem formulation                       │
│ • Goal identification                       │
│ • Success criteria                          │
└────────────┬────────────────────────────────┘
             │ guides ↓    ↑ informs
┌────────────▼────────────────────────────────┐
│ TACTICAL LEVEL (Approach Design)            │
│ • Method selection                          │
│ • Decomposition strategy                    │
│ • Reasoning structure                       │
└────────────┬────────────────────────────────┘
             │ guides ↓    ↑ informs
┌────────────▼────────────────────────────────┐
│ OPERATIONAL LEVEL (Detailed Execution)      │
│ • Concrete computations                     │
│ • Evidence gathering                        │
│ • Detailed analysis                         │
└─────────────────────────────────────────────┘

Convergence Detection

Reasoning converges when:

  1. State content stabilizes across iterations (high similarity)
  2. Confidence increases above threshold (typically 0.90-0.95)
  3. Uncertainty decreases below threshold (typically 0.10-0.15)

Convergence Score Formula:

score = 0.7 × similarity(current, previous) + 0.3 × confidence

Multi-level convergence:

converged = all levels > threshold OR weighted_average > threshold
weighted_avg = 0.5×strategic + 0.3×tactical + 0.2×operational

Configuration Parameters

Cycle Counts (iterations per level):

  • max_strategic_cycles: 2-5 (typically 3)
  • max_tactical_cycles: 3-7 (typically 5)
  • max_operational_cycles: 5-10 (typically 7)

Higher values allow more refinement but increase computation.

Thresholds:

  • convergence_threshold: 0.90-0.98 (default 0.95)
  • uncertainty_threshold: 0.05-0.20 (default 0.10)

Higher convergence thresholds require more stable reasoning.

Example: Complex Problem Analysis

Problem: "Design a sustainable urban transportation system"

Strategic Output:

- Goal: Minimize environmental impact while maximizing accessibility
- Constraints: Budget, existing infrastructure, citizen adoption
- Success metrics: Emissions reduction, ridership, cost-effectiveness

Tactical Output:

- Approach: Multi-modal integration (public transit + micro-mobility)
- Method: Network optimization with accessibility mapping
- Validation: Simulation before implementation

Operational Output:

- Route optimization calculations
- Demand forecasting analysis
- Cost-benefit quantification
- Environmental impact assessment

Synthesis: Integrated design bridging strategic goals through tactical approaches to operational specifications, with confidence metrics for each component.

Advanced Features

Uncertainty Quantification

Each state tracks:

  • Confidence: Self-assessed certainty (0.0 to 1.0)
  • Uncertainty: Recognized unknowns and ambiguities
  • Convergence: State stability over iterations

Use these for:

  • Identifying areas needing more analysis
  • Selective trust in conclusions
  • Metacognitive awareness of reasoning quality

Reasoning Trace

Enable full diagnostic trace:

python scripts/hierarchical_reasoner.py "<problem>" --trace

Outputs:

  • State evolution at each cycle
  • Convergence progression
  • Confidence/uncertainty dynamics
  • Dependency tracking

Useful for:

  • Debugging reasoning failures
  • Understanding convergence patterns
  • Analyzing computational efficiency

Architecture Details

For deep technical understanding of:

  • Theoretical foundations
  • Cognitive architecture alignment
  • Implementation patterns
  • Scaling properties
  • Future enhancements

See: references/architecture.md

Integration with Other Tools

Hierarchical reasoning complements:

  • Web search: Operational level can gather facts
  • Code execution: Operational level performs calculations
  • Knowledge graphs: Strategic level structures problem space
  • Document analysis: Tactical level designs analysis approach

Combine reasoning levels with appropriate tools at each abstraction.

Troubleshooting

Low convergence scores:

  • Increase cycle count for non-converging level
  • Refine problem statement clarity
  • Add relevant context to reduce uncertainty
  • Check if problem requires more/fewer abstraction levels

High computational cost:

  • Decrease cycle counts
  • Increase convergence threshold (accept earlier stopping)
  • Use adaptive early stopping
  • Parallelize level updates (future enhancement)

Inconsistent multi-level outputs:

  • Review information flow (are levels properly informing each other?)
  • Check if strategic goals are well-defined
  • Verify tactical approaches align with strategy
  • Ensure operational details serve tactical plan

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

29.08%
按下载量换算34

Claude Code

22.02%
按下载量换算26

windsurf

18.73%
按下载量换算22

Codex

11.75%
按下载量换算14

kiro-cli

7.05%
按下载量换算8

mcpjam

3.27%
按下载量换算4

安全审计

暂无安全审计结果可展示。

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills