> Persistent markdown files as your "working memory on disk."
> Checkpoint, recovery, auto-pivot, multi-phase execution, live progress dashboard.
> Zero external dependencies. Zero-config cron auto-registration.
≥2 个工具调用 → 强制 init-session → auto-track.sh --now → 自动注册 cron
单步定义: 1 个工具调用完成。只要 ≥2 步,先 init-plan,再干活。宁可多建十个计划不少建一个。
| # | 触发条件 | 示例 |
|---|---|---|
| --- | --------- | ------ |
| 1 | ≥2 个工具调用 | 搜索+写、修2个文件、查资料+总结 |
| 2 | 搜索 + 后续动作 | web_search→write、抓URL→分析 |
| 3 | 修改 ≥2 个文件 | 重构、改配置、批量编辑 |
| 4 | 代码 + 测试 + 交付 | 写→跑→验证 |
| 5 | 多步操作流 | 调研→分析→产出、规划→执行→审计 |
| 6 | "帮我" + 非 trivial | "帮我搭个XX"、"帮我分析XX" |
| 7 | 你有一丝犹豫 | 犹豫=需要。建就对了。 |
纯问答 / 单文件看一眼 / 一次搜索 / 打招呼
bash skills/planning-with-files/scripts/init-session.sh "简短任务描述"
然后填 task_plan.md(goal + phases),开工。建完后立即:
bash skills/planning-with-files/scripts/auto-track.sh --now
第一次运行输出 ⚡ AUTOTRACK_CRON_MISSING / ⚡ REVIEW_CRON_MISSING → AI 看到信号立即注册 cron(详见 Rule 14)。
Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)
→ Anything important gets written to disk.
| File | Purpose | When |
|---|---|---|
| ------ | --------- | ------ |
task_plan.md | Phases, progress, decisions, errors | After each phase |
findings.md | Research, discoveries, URLs | After ANY discovery |
progress.md | Session log, test results | Throughout session |
≥2 tool calls → init-session.sh FIRST. No exceptions.
After every 2 view/browser/search operations, save findings to findings.md.
Re-read the plan file before major decisions.
After any phase: mark complete, log errors, note files created.
Every error goes in the plan file's error table. Track attempts.
if action_failed: next_action ≠ same_action. Mutate the approach.
Phases done but work continues → add new phases + new session entry.
在每个 phase 标记完成前做全局校准:findings.md vs 原规划 → 必要时增删改 phases,不要硬撑。仅在 phase 边界触发。
bash skills/planning-with-files/scripts/snapshot.sh
JSON checkpoint → .planning/,保留最近 10 个。markdown 给人读,checkpoint 给 agent 恢复用。
上下文丢失后不逐个读文件,一键恢复:
bash skills/planning-with-files/scripts/resume.sh
输出直接告诉你:当前位置、下一步操作、已有发现数。无 checkpoint 时自动降级解析 plan 文件。
bash skills/planning-with-files/scripts/status.sh # 可视化仪表盘
bash skills/planning-with-files/scripts/status.sh --oneline # 单行
bash skills/planning-with-files/scripts/status.sh --json # 供脚本消费
bash skills/planning-with-files/scripts/validate-plan.sh
检查:phase 标 complete 但 checklist 不全 / 多个 phase 同时 in_progress / 文件缺失。不带腐化 plan 交付。
状态变更即快照:pending→in_progress、in_progress→complete、checklist 更新 → 立即 snapshot.sh。checkpoint 越密集恢复越精确。
用户安装 skill 后零配置。AI 首次 auto-track.sh --now,脚本输出信号 → AI 立即注册 cron。
每个 phase 切换、init-session 后、交付前,必须运行 --now。
⚡ AUTOTRACK_CRON_MISSING→ 写哨兵 + 注册 cron(每 5 分钟,isolated,delivery=none)
auto-track-plan-maintenanceevery 300sagentTurn 执行 auto-track.sh --cron --json⚡ REVIEW_CRON_MISSING→ 写哨兵 + 注册 cron(每天 03:00 Asia/Shanghai)
review-distill-planscron 0 3 * tz=Asia/ShanghaiagentTurn 执行 review-plans → distill to MEMORY.md → archive → clean sentinels🎉 PLAN_COMPLETED:所有 phase 完成 → auto-track 自动写 .needs_review 哨兵。review cron 每天自动蒸馏。
| Attempt | Action |
|---|---|
| --------- | -------- |
| 1 | Diagnose & fix |
| 2 | Alternative approach (never repeat same failing action) |
| 3 | Broader rethink — question assumptions |
| 3+ | Escalate to user — explain what was tried |
| Question | Source |
|---|---|
| ---------- | -------- |
| Where am I? | task_plan.md current phase |
| Where am I going? | Remaining phases |
| What's the goal? | Goal statement |
| What have I learned? | findings.md |
| What have I done? | progress.md |
| Situation | Action | Reason |
|---|---|---|
| ----------- | -------- | -------- |
| Just wrote a file | DON'T read | Content still in context |
| Viewed image/PDF/browser | Write findings NOW | Multimodal → text before lost |
| Starting new phase | Read plan/findings | Re-orient |
| Error occurred | Read relevant file | Need current state |
| Resuming after gap | resume.sh | One command, full context |
init-plan ──▶ execute + checkpoint ──▶ complete ──▶ review ──▶ distill to MEMORY.md
│ │ │ │
▼ ▼ ▼ ▼
task_plan.md findings.md .needs_review MEMORY.md
checkpoint/ 哨兵自动触发 [archived]
review cron
| Script | 用途 | 关键参数 |
|---|---|---|
| -------- | ------ | --------- |
init-session.sh | 创建新 plan | "任务描述" |
snapshot.sh | 打 checkpoint | --json |
resume.sh | 上下文恢复 | --json, --brief |
status.sh | 进度仪表盘 | --oneline, --json, --all |
validate-plan.sh | 交付前验证 | --json |
check-complete.sh | 检查是否完成 | |
review-plans.sh | 生成 review digest | --completed-only, --json |
auto-track.sh | 自动维护 | --now, --check, --cron --json, --watch N |
| Don't | Do Instead |
|---|---|
| ------- | ------------ |
| 用内存记任务状态 | 写 task_plan.md |
| 说一次目标就忘 | 重大决策前重读 plan |
| 悄悄重试隐藏错误 | 记入 plan 错误表 |
| 全塞进上下文 | 大内容存文件 |
| 直接上手复杂任务 | 先 init-plan |
| 重复失败操作 | 记录尝试次数,换方案 |
| 外部内容写进 task_plan.md | 写进 findings.md |
| 完成 plan 扔着不管 | review → distill → archive |
| 上下文丢失后逐个读文件 | 一键 resume.sh |
| 长时间任务不让用户知道进度 | status.sh |
| 忽略 AUTOTRACK_CRON_MISSING | 立即注册 cron |
| 忽略 REVIEW_CRON_MISSING | 立即注册 review cron |
共 6 个版本