首页龙虾技能列表 › Decision Topology — Decision工具

🌳 Decision Topology — Decision工具

v1.0.6

[AI辅助] Records the structure of conversations where ideas evolve, branch, get rejected, pivot, or combine. Saves each structural shift as a node in a local JSON tre...

0· 359·0 当前·0 累计
by @joncik91 (Jounes De Schrijver)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/2
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code, instructions, and requirements are coherent with its stated purpose (local-only conversation topology logging); nothing required or installed is disproportionate, but note the always-on metadata and the fact that the skill writes local JSON/.md files which you should control and review.
评估建议
This skill appears to do what it says: it logs conversation structure to local JSON files and companion .md files and enforces truncation and path containment. Before installing: (1) Be aware it is active by default (always: true) — set always: false in SKILL.md if you prefer explicit invocation. (2) Inspect or sandbox the storage location: the default {baseDir}/trees/ will contain JSON and .md files plus concepts.json; do not point TOPOLOGY_TREES_DIR at a directory scanned or uploaded by other ...
详细分析 ▾
用途与能力
Name/description (record conversation structure) matches the actual footprint: a Node.js script that reads stdin, updates local JSON trees, writes companions, and maintains a local concept index. Required binary 'node' is appropriate and no unrelated credentials or services are requested.
指令范围
SKILL.md explicitly restricts operations to stdin input, file writes inside the trees directory, and no network calls; the included script enforces truncation, path containment, and uses only fs/path. The one point to watch: the skill generates companion .md files and a global concepts.json index (for semantic/search use) — these files contain truncated summaries/reasoning and could be visible to other local services if you point the trees dir at a shared/indexed location.
安装机制
No install spec; this is an instruction-and-code skill bundled with its script files. There are no remote downloads, package installs, or unusual installers — only a Node.js script included in the skill bundle.
凭证需求
No secrets or extraneous environment variables are required. Optional override TOPOLOGY_TREES_DIR is reasonable for storage configuration; the metadata requires only the 'node' binary. The suggested use of a memory directory for indexing is user-controlled and not mandatory.
持久化与权限
The skill sets always: true in its metadata (active by default). That is consistent with the described 'low-noise, always-on' behavior, but it's a meaningful privilege — the skill will autonomously create and update local files during conversations unless you change metadata to always: false or disable it. The script does not modify other skills or global agent configs.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.62026/3/2

Enforce content length limits on all persisted text fields (summary 200, reasoning 300, topic 120, concept 50 chars). Code-level guardrail replaces documentation-only policy.

● 无害

安装命令 点击复制

官方npx clawhub@latest install decision-topology
镜像加速npx clawhub@latest install decision-topology --registry https://cn.clawhub-mirror.com

技能文档

Records how ideas branch and evolve during conversations, producing a browsable tree the user can review at any time. Like git log for thinking — the structure is always there when you want to inspect it.

Privacy note: skill installed 和 已启用 由 用户. 所有 data stays 在...上 disk 在...中 configured trees directory — nothing sent externally. 用户 可以 视图, 删除, 或 relocate trees 在 任何 时间.

Security Properties

  • Zero network access — 否 HTTP calls, 否 sockets, 否 DNS lookups. Works fully 离线.
  • Zero external dependencies — uses 仅 节点.js built-在...中 fspath modules.
  • 否 conversation content stored — script enforces length limits 在...上 所有 persisted text fields (summary: 200 chars, reasoning: 300 chars, topic: 120 chars, concept: 50 chars). Text exceeding limits truncated. code-level guardrail, 不 只是 policy.
  • 否 process spawning — 否 child_process, 否 exec, 否 eval, 否 函数().
  • Stdin-仅 输入框 — 所有 用户-derived content piped 通过 stdin 作为 JSON 到 prevent shell injection. See SECURITY.md 对于 details.
  • Path containment enforced — 所有 file arguments stripped 到 basename 和 resolved inside canonical trees directory. Absolute paths 和 .. traversal rejected 在 runtime.
  • 用户-controlled storage — trees local JSON files 用户 可以 inspect, 移动, 或 删除 在 任何 时间.
  • ID generation — uses Math.random() 对于 6-char hex 节点 IDs. Cryptographic randomness 不 needed — IDs 仅 require tree-local uniqueness 穿过 5-30 nodes.

Activation

Active by default (user can set always: false in metadata to require explicit invocation). When a conversation involves brainstorming, problem-solving, or exploring options, record the structure as a tree.

Skip pure Q&A ("what time is it"), greetings, and small talk.

输出 样式

Do not insert status messages about tree operations into the conversation. The goal is a clean conversational experience — like how git commits happen without the developer seeing each one.

  • 做 不 say "logging 节点," "branch created," "adding 到 tree" — adds noise 没有 值.
  • 做 不 更改 conversational behavior 因为 的 skill. 用户 gets 相同 conversation 它们'd 获取 没有 .
  • 用户 可以 ask 到 see topology 在 任何 时间 ("show me 什么 我们 explored", "什么 做过 我们 kill?").
  • Think: git commits 在...中 background. Low-noise, 不 hidden — 用户 knows 's installed 和 可以 inspect whenever 它们 want.

当...时 到 记录 节点

创建 节点 当...时:

  • 您 propose distinct idea, direction, solution, 或 选项
  • 用户 introduces 新的 angle 或 topic
  • 用户 rejects, pushes back, 或 corrects — branch kill, always 记录 reason
  • conversation pivots direction 因为 的 something said
  • insight combines elements 从 earlier dead branches (merge 节点)
  • analogy, metaphor, 或 reframe changes 如何 problem understood
  • question redirects exploration (pivot 节点)

Skip 当...时:

  • 相同 idea continues 没有 meaningful evolution
  • Minor refinement 在...内 相同 direction
  • Trivial "否" 到 something small doesn't 更改 direction
  • Factual answers 到 factual questions

Depth calibration: good tree 有 5-30 nodes recording shape 的 exploration. 不 200 nodes transcribing every sentence. 仅 创建 nodes 当...时 direction 的 thinking meaningfully shifts. Heuristic: would rejection 或 pivot 更改 什么 comes 下一个? 如果 是, 记录 . 如果 否, skip .

Auto-Initialization

Do NOT create a tree when a conversation starts. Wait until the conversation actually branches — until there is a rejection, a pivot, or a second distinct direction. Only then initialize.

Most conversations won't need a tree. That's fine.

When initializing, auto-generate the filename from the date and a 2-4 word topic slug:

  • 2026-02-24-business-模型-exploration.json
  • 2026-02-24-vacation-planning.json

Auto-Association

When a conversation starts and ideas begin branching, check if this connects to an existing tree before creating a new one.

如何 到 check: Run associate command 带有 core topic:

echo '{"query": "short description of current topic"}' | node {baseDir}/scripts/topology.js associate

This scans existing trees and returns the best match with a relevance score.

  • Score >= 0.4 — continue tree (加载 , 添加 nodes 到 )
  • Score 0.25-0.4 — ambiguous. Ask 用户 naturally: " feels related 到 [topic] 我们 explored 在...上 [日期]. Continuing thread, 或 fresh 开始?"
  • Score < 0.25 — 新的 tree

Never ask the user to pick a tree by ID. If you need to disambiguate, ask naturally in conversation.

Setup

Script: {baseDir}/scripts/topology.js

Storage: Trees stored 在...中 {baseDir}/trees/ 由 默认. Override 带有 TOPOLOGY_TREES_DIR environment 变量 如果 您 want trees stored elsewhere (e.g. 在...中 memory directory 对于 semantic 搜索 indexing).

Path containment: 所有 file arguments resolved 到 basenames inside trees directory. Absolute paths 和 .. traversal rejected — script cannot 读取 或 写入 files outside configured trees directory.

Invocation: Always pipe JSON args 通过 stdin 到 prevent shell injection 从 用户-derived content:

echo '' | node {baseDir}/scripts/topology.js 

Core Operations

Initialize tree

echo '{"topic": "short topic description"}' | node {baseDir}/scripts/topology.js init
Returns the file path and root node ID. Remember both for the session.

添加 节点

echo '{"file": "", "parent_id": "", "type": "proposal", "summary": "one-line description", "reasoning": "why", "concepts": ["keyword1", "keyword2"]}' | node {baseDir}/scripts/topology.js add-node
Types: proposal, pivot, merge. The concepts array is optional — short keyword tags extracted from the node content, used for cross-tree linking.

Kill branch

echo '{"file": "", "node_id": "", "reason": "why it was rejected"}' | node {baseDir}/scripts/topology.js kill-branch
Then add the new direction as a child (pivot node linked to what was killed).

Merge branches

echo '{"file": "", "source_ids": ["", ""], "summary": "merged insight", "reasoning": "combines X from A with Y from B"}' | node {baseDir}/scripts/topology.js merge

Fork 从 任何 节点

echo '{"file": "", "node_id": "", "summary": "re-exploring from this point", "reasoning": "reason for revisiting"}' | node {baseDir}/scripts/topology.js fork

节点 Types

TypeWhen
rootCore topic (created by init)
proposalYou suggest a direction, idea, or option
pivotNew direction that emerged from a rejection or redirection
mergeInsight combining elements from multiple branches
Status values: active (still exploring), dead (rejected, has killed_by), merged (combined into a merge node).

Viewing Topology

The user does NOT need to learn slash commands. They ask naturally:

  • "Show me 什么 我们 explored"
  • "什么 做过 我们 kill?"
  • "什么 shape conversation?"
  • "什么 paths 做过 我们 reject 和 为什么?"
  • "Go back 到 idea 关于 X"

You understand the intent and run the appropriate commands. Present results conversationally, not as raw script output.

/tree 可选 shortcut — works 如果 用户 types , 但是 don't teach 或 require .

Rendering

echo '{"file": ""}' | node {baseDir}/scripts/topology.js render
After the tree, append a one-line summary: {N} branches explored, {M} killed, {K} active, depth {D}

列表 所有 trees

node {baseDir}/scripts/topology.js list

Statistics

echo '{"file": ""}' | node {baseDir}/scripts/topology.js stats

导出 作为 Mermaid

echo '{"file": ""}' | node {baseDir}/scripts/topology.js export

Revisiting dead branch

When the user asks about a killed path, find the node, present:
  • 什么 是 proposed
  • 为什么 是 proposed
  • 为什么 是 killed
  • 什么 came 之后

Cross-tree analysis

node {baseDir}/scripts/topology.js analyze
Rebuilds the concept index, scans all trees, finds concepts appearing across multiple trees, reports which ideas keep surviving vs keep getting killed, identifies cross-root connections, and regenerates all companion .md files with updated cross-tree links and weights. Shows index health stats (total concepts, cross-tree count, orphans).

查询 concept 索引

echo '{"name": "trust"}' | node {baseDir}/scripts/topology.js concept
echo '{"list": true}' | node {baseDir}/scripts/topology.js concept
echo '{"orphans": true}' | node {baseDir}/scripts/topology.js concept
  • name — reverse-lookup: shows every 节点 穿过 every tree references concept
  • 列表 — 所有 concepts sorted 由 cross-tree spread, * marks concepts spanning multiple trees
  • orphans — concepts exist 在...中 仅 one tree (candidates 对于 future linking)

Rebuild concept 索引

node {baseDir}/scripts/topology.js rebuild-index
Full rebuild of concepts.json from all tree files. Also regenerates all companion .md files with cross-tree links and updated weights. Use as a recovery tool or after manual edits to tree JSON files.

Concept 索引

A reverse-index at {trees_dir}/concepts.json that maps every concept keyword to all nodes and trees that reference it.

  • Automatic: Updated incrementally 在...上 every tree 保存 (添加-节点, kill-branch, merge, fork, init). 否 manual intervention needed.
  • Cross-tree links: Companion .md files include ## Related trees section 带有 [[wikilinks]] 到 其他 trees 分享 concepts. Useful 对于 semantic 搜索 indexing.
  • Weight 字段: 节点 weight auto-设置 到 数字 的 distinct trees sharing 节点's concepts. weight: 1 = single-tree concept. weight: 2+ = concept spans multiple trees.
  • Lazy discovery: Links 表单 organically 作为 nodes added 到 任何 tree. 新的 节点 带有 concepts: ["trust"] 将 immediately 链接 tree 到 every 其他 tree 也 references "trust" — 否 需要 到 wait 对于 analyze.

Rules

  • Clean 输出. 做 不 insert tree-operation status messages 进入 conversation. 用户 可以 inspect trees whenever 它们 want.
  • Judgment 在...上 completeness. 记录 shape, 不 transcript. 5-30 nodes per tree. Summaries 仅 — never store verbatim conversation content.
  • Causal links. Show 为什么 conversation evolved, 不 只是 什么 是 said. 链接 rejections 到 pivots.
  • Persist. Trees JSON files survive sessions. 它们 可以 searched 如果 stored 在...中 indexed directory.
  • Continue, don't duplicate. 如果 conversation continues 上一个 topic, 加载 和 extend tree.
  • Graceful failures. Missing 或 corrupted tree — re-initialize. Missing 节点 ID — say 所以 clearly. Never crash.
  • Natural 接口. 用户 asks 在...中 plain language. 您 translate 到 right operation. Slash commands 可选 shortcuts, 不 primary 接口.
  • Local 仅. 所有 data stays 在...上 disk. 否 network calls, 否 external APIs, 否 telemetry. 用户 owns data.
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务