← 返回 Skills 市场
joncik91

Decision Topology

作者 Jounes De Schrijver · GitHub ↗ · v1.0.6
cross-platform ✓ 安全检测通过
410
总下载
0
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install decision-topology
功能描述
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...
使用说明 (SKILL.md)

Decision Topology

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: This skill is installed and enabled by the user. All data stays on disk in the configured trees directory — nothing is sent externally. The user can view, delete, or relocate their trees at any time.

Security Properties

  • Zero network access — no HTTP calls, no sockets, no DNS lookups. Works fully offline.
  • Zero external dependencies — uses only Node.js built-in fs and path modules.
  • No conversation content stored — the script enforces length limits on all persisted text fields (summary: 200 chars, reasoning: 300 chars, topic: 120 chars, concept: 50 chars). Text exceeding limits is truncated. This is a code-level guardrail, not just a policy.
  • No process spawning — no child_process, no exec, no eval, no Function().
  • Stdin-only input — all user-derived content is piped via stdin as JSON to prevent shell injection. See SECURITY.md for details.
  • Path containment enforced — all file arguments are stripped to basename and resolved inside the canonical trees directory. Absolute paths and .. traversal are rejected at runtime.
  • User-controlled storage — trees are local JSON files the user can inspect, move, or delete at any time.
  • ID generation — uses Math.random() for 6-char hex node IDs. Cryptographic randomness is not needed — IDs only require tree-local uniqueness across 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.

Output Style

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.

  • Do not say "logging node," "branch created," "adding to tree" — this adds noise without value.
  • Do not change your conversational behavior because of the skill. The user gets the same conversation they'd get without it.
  • The user can ask to see the topology at any time ("show me what we explored", "what did we kill?").
  • Think: git commits in the background. Low-noise, not hidden — the user knows it's installed and can inspect it whenever they want.

When to Record a Node

Create a node when:

  • You propose a distinct idea, direction, solution, or option
  • The user introduces a new angle or topic
  • The user rejects, pushes back, or corrects — this is a branch kill, always record the reason
  • The conversation pivots direction because of something said
  • An insight combines elements from earlier dead branches (merge node)
  • An analogy, metaphor, or reframe changes how the problem is understood
  • A question redirects the exploration (pivot node)

Skip when:

  • Same idea continues without meaningful evolution
  • Minor refinement within the same direction
  • Trivial "no" to something small that doesn't change direction
  • Factual answers to factual questions

Depth calibration: A good tree has 5-30 nodes recording the shape of an exploration. Not 200 nodes transcribing every sentence. Only create nodes when the direction of thinking meaningfully shifts. Heuristic: would this rejection or pivot change what comes next? If yes, record it. If no, skip it.

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-model-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.

How to check: Run the associate command with the 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 that tree (load it, add nodes to it)
  • Score 0.25-0.4 — ambiguous. Ask the user naturally: "This feels related to [topic] we explored on [date]. Continuing that thread, or fresh start?"
  • Score \x3C 0.25 — new 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 are stored in {baseDir}/trees/ by default. Override with the TOPOLOGY_TREES_DIR environment variable if you want trees stored elsewhere (e.g. in a memory directory for semantic search indexing).

Path containment: All file arguments are resolved to basenames inside the trees directory. Absolute paths and .. traversal are rejected — the script cannot read or write files outside the configured trees directory.

Invocation: Always pipe JSON args via stdin to prevent shell injection from user-derived content:

echo '\x3CJSON args>' | node {baseDir}/scripts/topology.js \x3Ccommand>

Core Operations

Initialize a 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.

Add a node

echo '{"file": "\x3Cpath>", "parent_id": "\x3Cid>", "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 a branch

echo '{"file": "\x3Cpath>", "node_id": "\x3Cid>", "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": "\x3Cpath>", "source_ids": ["\x3Cid1>", "\x3Cid2>"], "summary": "merged insight", "reasoning": "combines X from A with Y from B"}' | node {baseDir}/scripts/topology.js merge

Fork from any node

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

Node Types

Type When
root Core topic (created by init)
proposal You suggest a direction, idea, or option
pivot New direction that emerged from a rejection or redirection
merge Insight combining elements from multiple branches

Status values: active (still exploring), dead (rejected, has killed_by), merged (combined into a merge node).

Viewing the Topology

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

  • "Show me what we explored"
  • "What did we kill?"
  • "What shape is this conversation?"
  • "What paths did we reject and why?"
  • "Go back to that idea about X"

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

/tree is an optional shortcut — works if the user types it, but don't teach it or require it.

Rendering

echo '{"file": "\x3Cpath>"}' | node {baseDir}/scripts/topology.js render

After the tree, append a one-line summary: {N} branches explored, {M} killed, {K} active, depth {D}

List all trees

node {baseDir}/scripts/topology.js list

Statistics

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

Export as Mermaid

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

Revisiting a dead branch

When the user asks about a killed path, find the node, present:

  • What was proposed
  • Why it was proposed
  • Why it was killed
  • What came after

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).

Query the concept index

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 node across every tree that references a concept
  • list — all concepts sorted by cross-tree spread, * marks concepts spanning multiple trees
  • orphans — concepts that exist in only one tree (candidates for future linking)

Rebuild concept index

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 Index

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

  • Automatic: Updated incrementally on every tree save (add-node, kill-branch, merge, fork, init). No manual intervention needed.
  • Cross-tree links: Companion .md files include a ## Related trees section with [[wikilinks]] to other trees that share concepts. Useful for semantic search indexing.
  • Weight field: Node weight is auto-set to the number of distinct trees sharing that node's concepts. weight: 1 = single-tree concept. weight: 2+ = concept spans multiple trees.
  • Lazy discovery: Links form organically as nodes are added to any tree. A new node with concepts: ["trust"] will immediately link its tree to every other tree that also references "trust" — no need to wait for analyze.

Rules

  1. Clean output. Do not insert tree-operation status messages into the conversation. The user can inspect trees whenever they want.
  2. Judgment over completeness. Record the shape, not the transcript. 5-30 nodes per tree. Summaries only — never store verbatim conversation content.
  3. Causal links. Show WHY the conversation evolved, not just WHAT was said. Link rejections to pivots.
  4. Persist. Trees are JSON files that survive sessions. They can be searched if stored in an indexed directory.
  5. Continue, don't duplicate. If a conversation continues a previous topic, load and extend that tree.
  6. Graceful failures. Missing or corrupted tree — re-initialize. Missing node ID — say so clearly. Never crash.
  7. Natural interface. The user asks in plain language. You translate to the right operation. Slash commands are optional shortcuts, not the primary interface.
  8. Local only. All data stays on disk. No network calls, no external APIs, no telemetry. The user owns their data.
安全使用建议
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 services unless you want that data indexed. (3) If you handle sensitive conversations, test the skill with a temporary directory (TOPOLOGY_TREES_DIR=/tmp/test-trees) to confirm behavior and review the files it creates. (4) You can review scripts/topology.js yourself — it uses only fs/path, truncates fields, enforces safe paths, and has no network/child_process calls. (5) If you need stricter guarantees, change always to false and enable the skill only when you want structured logging.
功能分析
Type: OpenClaw Skill Name: decision-topology Version: 1.0.6 The OpenClaw skill 'decision-topology' is benign. It demonstrates a strong security posture, explicitly addressing common vulnerabilities like shell injection and path traversal, which were fixed in previous versions (1.0.2 and 1.0.5 respectively). The `scripts/topology.js` code strictly confines file operations to a designated directory using `resolveSafePath` and `fs.realpathSync`, and all user-derived input is processed as JSON via stdin, preventing injection. Furthermore, content guards (`truncate` function) enforce length limits on all persisted text fields, preventing the storage of sensitive conversation content. There is no evidence of network access, external dependencies, dynamic code execution, or any malicious intent in the code or the agent's instructions in `SKILL.md`.
能力评估
Purpose & Capability
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.
Instruction Scope
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.
Install Mechanism
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.
Credentials
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.
Persistence & Privilege
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install decision-topology
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /decision-topology 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
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.
v1.0.5
Enforce path containment: reject absolute paths and .. traversal, canonicalize TREES_DIR at startup
v1.0.4
Remove crypto import, reframe language for scanner compliance, add SECURITY.md
v1.0.3
Document how to disable always-on mode (set always:false in metadata)
v1.0.2
Fix shell injection: args now read from stdin instead of shell strings. All SKILL.md examples updated to pipe pattern.
v1.0.1
Reframe language for security scan: replace covert/silent with unobtrusive, add privacy note, clarify local-only data, set always:true metadata flag
v1.0.0
Initial release: silent conversation topology tracker with tree structures, concept indexing, cross-tree linking, ASCII/Mermaid rendering
元数据
Slug decision-topology
版本 1.0.6
许可证
累计安装 0
当前安装数 0
历史版本数 7
常见问题

Decision Topology 是什么?

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 410 次。

如何安装 Decision Topology?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install decision-topology」即可一键安装,无需额外配置。

Decision Topology 是免费的吗?

是的,Decision Topology 完全免费(开源免费),可自由下载、安装和使用。

Decision Topology 支持哪些平台?

Decision Topology 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Decision Topology?

由 Jounes De Schrijver(@joncik91)开发并维护,当前版本 v1.0.6。

💬 留言讨论