AGENT SKILL

子智能体上下文路由控制

agent-context-modes

改编自 LangChain Deep Agents 的故障关闭式子智能体上下文隔离与分叉路由。工作单元/内存采用分叉;验证器/研究器采用隔离。拒绝 LangSmith 席位。

适用职业AI 工程师
使用场景智能体开发
License 许可
MIT
最近更新
2026-11-09
Stars
★ 1
Forks
0

01 前言 Front Matter

name
agent-context-modes
description
Fail-closed isolated-vs-fork subagent context routing adapted from LangChain Deep Agents. Workers/memory fork; verifiers/researchers isolate. Deny LangSmith seats.

02 资源文件 16

03 SKILL.md 正文

Agent Context Modes

Use when spawning subagents from a supervisor (Task tool, worktrees, parallel research) so context is reused or isolated on purpose.

Instructions

  1. Worker/fixer after diagnosis → fork (reuse supervisor context).
  2. Verifier/reviewer → isolated (independent judgment, no anchoring).
  3. Researcher (esp. parallel) → isolated.
  4. Memory/memorizer → fork + restricted write paths.
  5. Do not isolate workers that would redo file reads already done.
  6. Return final outcome only to the supervisor.
  7. Never force all-fork or all-isolated.
  8. Deny LangSmith / hosted Deep Agents spend under the monthly cap.
python3 scripts/agent_context_modes.py \
  --platform supervisor_subagent_harness \
  --harnesses scripts/tests/fixtures/agent_context_modes.json \
  --cite acm:iap-fixer-fork \
  --role fixer --mode fork \
  --supervisor-already-gathered-context 1 \
  --supervisor-receives-final-only 1 \
  --write-paths-restricted 1

Examples

  • Allow: fixer forks after IAP diagnosis; reviewer isolates on the diff.
  • Deny: forked parallel researchers; isolated memorizer; LangSmith seat.

Performance Notes

  • Zero external spend path.
  • Ranker zeros span/subagent-count vanity.

Troubleshooting

  • Exit 2: inspect pairing, waste, parallel, return_shape keys.
  • See docs/AGENT_CONTEXT_MODES.md.

04 同仓库更多 Skills

IgorGanapolsky
IgorGanapolsky/Random-Timer

任务实施计划编写

writing-plans

当你有某个多步骤任务的规格说明或需求时,在动手编写代码之前使用。

软件开发工程师任务规划与分解
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

AI 工作流经济性评估

workflow-economics-lite

逃离 AI 试点炼狱:要求构建闭环(completion-loop)工作流,包含单一负责人、基线、经济指标、记录系统(system-of-record)集成和审计轨迹。阻断孤立的聊天机器人以及将“兴趣”当作 ROI 的说法。

产品经理业务流程设计与优化
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

完成前验证确认

verification-before-completion

当准备声称工作已完成、已修复或已通过时,在提交或创建 PR 之前使用——要求在做出任何成功声明之前先运行验证命令并确认输出;始终遵循“证据先于断言”。

软件开发工程师测试与质量保障
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

价值中心五问评估

value-center-lite

应用 InfoQ Rohrer 的价值中心 / VSM 五问法(自主性 + 一致性)。在规划工作、发布版本或审计智能体自主性声明时使用。对于没有 WQTU/付费墙价值的纯产品口号,采取 fail closed(默认拒绝)的严格判定。

产品经理成果验证与价值评估
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

技能发现与调用规范

using-superpowers

在每次对话开始时使用——建立如何查找和使用技能的方法,要求在任何回应(包括澄清性问题)之前都必须先调用技能。

AI 工程师插件与技能管理
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

Git 工作树隔离开发

using-git-worktrees

在开始需要与当前工作区隔离的功能开发时,或在实施计划执行前使用——通过原生工具或 git worktree 回退机制确保存在隔离的工作区。

软件开发工程师代码仓库协作管理
★ 1