jiying2007

adk-context-compress-handoff

上下文压缩与会话接力,区分 stable/dynamic/evidence/excluded context,生成可恢复摘要、下一步和风险边界

jiying2007 0 Updated 3mo ago

Resources

3
GitHub

Install

npx skillscat add jiying2007/agent-dev-kit/adk-context-compress-handoff

Install via the SkillsCat registry.

SKILL.md

adk-context-compress-handoff

Goal

  • 在长会话、上下文压力或目标切换前生成可恢复、可审计、低噪音的 handoff。
  • 防止过期目标、失败假设和敏感材料混入下一轮 active context。

Prerequisites

  • 当前任务已有可陈述的最新目标、验证状态和下一步。
  • 已知道哪些原始证据路径可回读。
  • 已识别需要排除的旧计划、错误事实或敏感内容。

Workflow

  1. 确认最新目标:记录 latest goal,列出 invalidated goals。
  2. 分层压缩:stable、dynamic、evidence、excluded 分开写。
  3. 连续性证明:记录 active plan、findings、progress、attestation 和 excluded context,可用 templates/context/continuity-attestation.md。
  4. 证据索引:命令、路径、结果摘要和回退条件必须可追溯。
  5. 风险与阻塞:列出 unresolved blockers、residual risks、manual approval points。
  6. 下一步:给出最多 3 个优先动作和第一条建议命令。
  7. 记忆边界:长期规则只输出 candidate,不直接写 memory 或 AGENTS。
  8. 恢复提示:生成新会话可直接粘贴的 resume prompt。

Evidence Template

- Latest Goal:
- Invalidated Goals:
- Stable Context:
- Dynamic Context:
- Evidence:
- Continuity Attestation:
- Excluded Context:
- Open Blockers:
- Next Actions:
- Resume Prompt:
- Memory Candidates:
- Archive Candidates:
- Gate Result: pass / needs-fix

Quality Gate

  • 必须包含 latest goal、next actions、raw evidence 和 fallback condition。
  • excluded context 不得重新进入 active instructions。
  • 不能把压缩摘要当成完成证据;必须保留原始路径或命令。
  • 涉及长期提升时必须转交 memory/archive 治理。