Thinking Tool
思考工具用于结构化推理和决策。
功能
- 链式思考
- 决策树
- 影响因素分析
- 风险评估
使用方法
typescript
import { thinking } from 'openclaw/tools'
// 结构化思考
const analysis = await thinking.analyze({
question: 'Should we launch the new feature?',
factors: [
{ name: 'User demand', weight: 0.4, score: 8 },
{ name: 'Technical readiness', weight: 0.3, score: 7 },
{ name: 'Market timing', weight: 0.3, score: 6 }
]
})
// 决策建议
const recommendation = await thinking.decide({
options: ['launch', 'delay', 'pivot'],
criteria: ['speed', 'risk', 'impact']
})输出格式
json
{
"reasoning": "Step-by-step analysis...",
"factors": [...],
"recommendation": "launch",
"confidence": 0.85
}使用场景
- 产品决策
- 技术选型
- 风险评估
- 战略规划