← Back to Skills Marketplace
qiushang555

Cognitive Topology

by qiushang555 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
117
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cognitive-topology
Description
Agent认知拓扑引擎。自动将复杂任务分裂为多个独立分支,并行执行后汇总整合。触发场景:(1)复杂问题需要多角度分析 (2)多独立子任务需要并行执行 (3)需要清晰追踪思维分支 (4)用户说"分叉"、"分支分析"、"多线程"时。使用 sessions_spawn 创建分支,分支结果写入 L2 文件,Main Se...
README (SKILL.md)

Cognitive Topology

把复杂任务的「一条直线」变成「多分支并行」。

何时触发

当任务符合以下任一条件时,自动启用本技能:

  • 需要同时分析 N 个不同方向/角度
  • 任务可拆分为相互独立的子任务
  • 问题复杂,需要递归分解
  • 用户明确说「分叉」「分支」「多角度」

核心工作流

Step 1: Fork - 创建分支

使用 sessions_spawn 创建独立分支:

sessions_spawn(
  mode="session",
  runtime="subagent",
  task="\x3C具体分支任务>",
  label="ct-\x3C序号>-\x3C简短描述>"
)

每个分支有独立 Session ID,互不干扰。

Step 2: Branch - 分支执行

  • 分支 Agent 独立执行自己的任务
  • 完成后将结论写入标准 L2 文件:~/.openclaw/workspace/cognitive-topology/branches/\x3Cbranch_id>_L2.md
  • L2 格式:## 结论

    \x3C具体结论>
    \

依据\


\x3C分析依据>

Step 3: Integrate - 整合

Main Session 等待所有分支完成,读取所有 L2 文件,生成 synthesis:

cat ~/.openclaw/workspace/cognitive-topology/branches/*_L2.md

目录结构

~/.openclaw/workspace/cognitive-topology/
├── branches/              # 分支工作目录
│   ├── ct-1_anal_ai_L2.md  # 分支1的L2
│   ├── ct-2_anal_chip_L2.md # 分支2的L2
│   └── ...
├── topology_latest.json    # 当前拓扑状态
└── synthesis.md            # 整合结果

关键约束

  • 分支只写 L2,不读自己的 L2
  • Main Session 读所有 L2,不直接读分支的 Session 历史
  • 分支间不直接通信
  • 跨分支信息通过 Main Session 的 synthesis 传播

简化实现说明

无 UI,星空图用文本树替代:

🌐 认知拓扑
├── branch-1 [分析AI板块]
│   └── ✅ 已完成
├── branch-2 [分析半导体]
│   └── ⏳ 进行中
└── branch-3 [分析新能源]
    └── ⏳ 待启动

典型场景示例

场景:分析 A 股三个方向的机会

Main Session 收到任务后:

  1. 判断需要分裂为3个独立分支
  2. 同时 spawn 3 个分支 Agent
  3. 分支1分析AI板块 → 写 L2
  4. 分支2分析半导体 → 写 L2
  5. 分支3分析新能源 → 写 L2
  6. Main 汇总 L2 → 生成 synthesis → 回复用户
Usage Guidance
This skill appears to do what it says, but review and possibly modify file paths and permissions before enabling: 1) Confirm the runtime user and adjust hard-coded '/root/.openclaw/...' paths to the correct non-root workspace (or accept that root is required). 2) Be aware that branch outputs and syntheses are appended to MEMORY.md and daily snapshot files — do not allow sensitive secrets in branch outputs. 3) Test in an isolated environment first to verify behavior (especially ct_archive which reads/appends to MEMORY.md and may assume the file exists). 4) If you don't want permanent storage, change the scripts to use a temporary workspace or add retention/cleanup logic. 5) If you rely on sessions_spawn, ensure your agent's spawning policy/privileges are appropriate.
Capability Analysis
Type: OpenClaw Skill Name: cognitive-topology Version: 1.0.0 The 'cognitive-topology' skill is a task orchestration framework designed to decompose complex tasks into parallel sub-tasks (branches) using the OpenClaw 'sessions_spawn' capability. The included Python scripts (ct_fork.py, ct_integrate.py, ct_archive.py, etc.) manage the lifecycle of these branches by creating, tracking, and aggregating results into a synthesis file and a long-term memory log within the local workspace directory (/root/.openclaw/workspace/). The logic is transparent, lacks network activity or obfuscation, and operates strictly within the expected agent environment boundaries.
Capability Assessment
Purpose & Capability
The name/description (split tasks into branches, write L2 files, integrate results) matches the included scripts (ct_fork, ct_complete, ct_integrate, ct_archive, ct_status). There are no unrelated credentials or external services requested. One implementation detail: scripts use hard-coded /root/.openclaw paths while SKILL.md sometimes uses ~/.openclaw — this is functionally consistent but brittle and privileges/path-sensitive.
Instruction Scope
SKILL.md instructs the agent to spawn sessions and read/write L2 files under the workspace, which aligns with the scripts. Concerns: (1) path inconsistency between '~/.openclaw' in the documentation and '/root/.openclaw' in scripts may cause incorrect file locations or require root privileges; (2) the skill instructs agents to run local scripts and to cat workspace files — it does not request unrelated system files or network exfiltration, but it does direct writing and reading of persistent files in the agent workspace.
Install Mechanism
Instruction-only install with included Python scripts — no external downloads, package managers, or archives. Low install risk because nothing is fetched from arbitrary URLs.
Credentials
No environment variables or credentials are requested. Scripts operate on local filesystem only. Note: writing to /root/.openclaw/workspace and /root/.openclaw/workspace/MEMORY.md persists outputs — consider whether those files may include sensitive user data.
Persistence & Privilege
always:false and no cross-skill config writes. The skill creates/updates persistent files (topology_latest.json, branch L2 files, synthesis.md, MEMORY.md and daily snapshots) under the workspace; this is expected for a memory/aggregation tool but does mean outputs are stored permanently on disk and may accumulate sensitive content.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cognitive-topology
  3. After installation, invoke the skill by name or use /cognitive-topology
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Agent认知拓扑引擎,支持多分支并行执行和长期记忆整合
Metadata
Slug cognitive-topology
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Cognitive Topology?

Agent认知拓扑引擎。自动将复杂任务分裂为多个独立分支,并行执行后汇总整合。触发场景:(1)复杂问题需要多角度分析 (2)多独立子任务需要并行执行 (3)需要清晰追踪思维分支 (4)用户说"分叉"、"分支分析"、"多线程"时。使用 sessions_spawn 创建分支,分支结果写入 L2 文件,Main Se... It is an AI Agent Skill for Claude Code / OpenClaw, with 117 downloads so far.

How do I install Cognitive Topology?

Run "/install cognitive-topology" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cognitive Topology free?

Yes, Cognitive Topology is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cognitive Topology support?

Cognitive Topology is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cognitive Topology?

It is built and maintained by qiushang555 (@qiushang555); the current version is v1.0.0.

💬 Comments