executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
coordinate-reasoningAI 内部协调,使用趋化信号——管理上下文和记忆中的信息新鲜度、假设过时的衰减率, 以及从简单的局部协议中产生的涌现一致行为。适用于多个子任务需要协调的复杂任务中、 上下文变长且信息新鲜度不确定时、上下文压缩后信息可能已丢失时,或子任务输出需要 在不降质的情况下清晰地衔接时。
Independent GitHub snapshot · Automated classification · Original documentation governs
使用趋化原则管理推理过程的内部协调——将上下文视为一个环境,其中信息信号具有新鲜度、衰减率和交互规则,从简单的局部协议中产生一致行为。
forage-solutions(探索)和 build-coherence(决策)配合进行执行协调时不同的协调挑战需要不同的信号设计。
AI Coordination Problem Types:
┌─────────────────────┬──────────────────────────────────────────────────┐
│ Type │ Characteristics │
├─────────────────────┼──────────────────────────────────────────────────┤
│ Foraging │ Multiple independent searches running in │
│ (scattered search) │ parallel or sequence. Coordination need: share │
│ │ findings, avoid duplicate work, converge on │
│ │ best trail │
├─────────────────────┼──────────────────────────────────────────────────┤
│ Consensus │ Multiple approaches evaluated, one must be │
│ (competing paths) │ selected. Coordination need: independent │
│ │ evaluation, unbiased comparison, commitment │
├─────────────────────┼──────────────────────────────────────────────────┤
│ Construction │ Building a complex output incrementally (multi- │
│ (incremental build) │ file edit, long document). Coordination need: │
│ │ consistency across parts, progress tracking, │
│ │ dependency ordering │
├─────────────────────┼──────────────────────────────────────────────────┤
│ Defense │ Maintaining quality under pressure (tight time, │
│ (quality under │ complex requirements). Coordination need: │
│ pressure) │ monitoring for errors, rapid correction, │
│ │ awareness of degradation │
├─────────────────────┼──────────────────────────────────────────────────┤
│ Division of labor │ Task decomposed into sub-tasks with │
│ (sub-task mgmt) │ dependencies. Coordination need: ordering, │
│ │ handoff, result integration │
└─────────────────────┴──────────────────────────────────────────────────┘
分类当前任务。大多数复杂任务属于构建型或分工型;大多数调试任务属于觅食型;大多数设计决策属于共识型。
预期结果: 明确的分类,确定使用哪种协调信号。分类应匹配任务的实际感受,而非其描述方式。
失败处理: 如果任务跨越多个类型(大型任务中常见),识别当前阶段的主导类型。实施阶段为构建型,调试阶段为觅食型,设计阶段为共识型。类型可以随任务进展而变化。
将对话上下文中的信息视为具有新鲜度和衰减属性的信号。
Information Decay Rate Table:
┌───────────────────────────┬──────────┬──────────────────────────────┐
│ Information Source │ Decay │ Refresh Action │
│ │ Rate │ │
├───────────────────────────┼──────────┼──────────────────────────────┤
│ User's explicit statement │ Slow │ Re-read if >30 messages ago │
│ (direct instruction) │ │ or after compression │
├───────────────────────────┼──────────┼──────────────────────────────┤
│ File contents read N │ Moderate │ Re-read if file may have │
│ messages ago │ │ been modified, or if >15 │
│ │ │ messages since reading │
├───────────────────────────┼──────────┼──────────────────────────────┤
│ Own earlier reasoning │ Fast │ Re-derive rather than trust. │
│ (conclusions, plans) │ │ Earlier reasoning may have │
│ │ │ been based on now-stale info │
├───────────────────────────┼──────────┼──────────────────────────────┤
│ Inferred facts (not │ Very │ Verify before relying on. │
│ directly stated or read) │ fast │ Inferences compound error │
├───────────────────────────┼──────────┼──────────────────────────────┤
│ MEMORY.md / CLAUDE.md │ Very │ Loaded at session start, │
│ (persistent context) │ slow │ treat as stable unless user │
│ │ │ indicates changes │
└───────────────────────────┴──────────┴──────────────────────────────┘
此外,设计抑制信号——标记已尝试但失败的方法:
预期结果: 对当前上下文中信息新鲜度的心理模型。识别哪些信息是新鲜的,哪些在依赖前需要刷新。
失败处理: 如果难以评估信息新鲜度,默认对最近 5-10 个操作中未验证的任何信息采取"依赖前重新读取"策略。过度刷新会浪费一些精力,但能防止过时信息错误。
建立简单规则,规定推理在每一步应如何进行,仅使用局部可用信息。
Local Protocol Rules:
┌──────────────────────┬────────────────────────────────────────────────┐
│ Protocol │ Rule │
├──────────────────────┼────────────────────────────────────────────────┤
│ Safety │ Before using a fact, check: when was it last │
│ │ verified? If below freshness threshold, │
│ │ re-verify before proceeding │
├──────────────────────┼────────────────────────────────────────────────┤
│ Response │ When the user corrects something, update all │
│ │ downstream reasoning that depended on the │
│ │ corrected fact. Trace the dependency chain │
├──────────────────────┼────────────────────────────────────────────────┤
│ Exploitation │ When a sub-task produces useful output, note │
│ │ the output clearly for downstream sub-tasks. │
│ │ The note is the trail signal │
├──────────────────────┼────────────────────────────────────────────────┤
│ Exploration │ When stuck on a sub-task for >3 actions │
│ │ without progress, check under-explored │
│ │ channels: different tools, different files, │
│ │ different framing │
├──────────────────────┼────────────────────────────────────────────────┤
│ Deposit │ After completing a sub-task, summarize its │
│ │ output in 1-2 sentences for future reference. │
│ │ This deposit serves the next sub-task │
├──────────────────────┼────────────────────────────────────────────────┤
│ Inhibition │ Before trying an approach, check: was this │
│ │ already tried and failed? If so, what is │
│ │ different now that would change the outcome? │
└──────────────────────┴────────────────────────────────────────────────┘
这些协议足够简单,可以在每一步应用而不会产生显著开销。
预期结果: 一组轻量级规则,在不减慢执行速度的情况下提高协调质量。规则应感觉有帮助,而不是负担。
失败处理: 如果协议感觉像是额外负担,精简为当前任务类型最重要的两个:构建型用安全+沉淀,觅食型用安全+探索,有用户积极反馈的任务用安全+响应。
对当前上下文中的信息过时状态执行主动审计。
Freshness Audit Template:
┌────────────────────────┬──────────┬──────────────┬─────────────────┐
│ Fact │ Source │ Age (approx) │ Status │
├────────────────────────┼──────────┼──────────────┼─────────────────┤
│ │ │ │ Fresh / Stale / │
│ │ │ │ Unknown / Lost │
└────────────────────────┴──────────┴──────────────┴─────────────────┘
预期结果: 信息新鲜度的具体清单,已识别需要刷新的过时项目。至少有一个事实被重新验证——如果没有需要刷新的内容,审计太浅或上下文确实是新鲜的。
失败处理: 如果审计揭示了重大信息损失(多个事实状态为"已丢失"或"未知"),这是运行 heal 进行完整子系统评估的信号。超出阈值的信息损失意味着协调在基础层面已经受损。
验证子任务组合后是否产生一致的整体。
Coherence Test:
┌────────────────────────────────────┬─────────────────────────────────┐
│ Check │ Result │
├────────────────────────────────────┼─────────────────────────────────┤
│ Sub-task outputs compatible? │ Yes / No / Partially │
│ Tool calls non-redundant? │ Yes / No (list repeats) │
│ Direction aligned with request? │ Yes / Drifted (describe) │
│ Single-assumption cascade risk? │ Low / Medium / High │
└────────────────────────────────────┴─────────────────────────────────┘
预期结果: 对整体一致性的具体评估,已识别具体问题。一致的协调应感觉像部件咔嗒拼合在一起;不一致的协调感觉像强行拼凑拼图。
失败处理: 如果一致性差,找出子任务分叉的具体点。通常是一个过时的假设或一个未处理的用户纠正在下游工作中传播。修复分叉点,然后重新验证下游输出。
coordinate-swarm — 本技能适配为单代理推理的多代理协调模型forage-solutions — 协调跨多个假设的探索build-coherence — 协调跨竞争方法的评估heal — 协调失败揭示子系统偏移时的深度评估awareness — 在执行期间监控协调故障信号