当前位置: 首页 > Skill >

planning-with-files

planning-with-files

planning-with-files

此技能应在用户请求启动复杂任务、研究项目、多步骤实现或任何预计需要超过...的任务时使用。

1.0.0 2026.11.26 368
获取Skill文件查看使用说明
作 者:沈知 许可证: 更新时间:2026.11.26
本文目录展开

Planning with Files

Manus-style persistent markdown planning. Filesystem = long-term memory. Context window = working RAM.

Core Principle

Context Window = RAM (volatile, limited)
Filesystem     = Disk (persistent, unlimited)
→ Anything important MUST be written to disk.

When to Use

  • Multi-step tasks (3+ phases or 5+ tool calls)
  • Research + implementation tasks
  • Tasks that span multiple sessions
  • Any task where goal-drift is a risk

Skip for: single-file edits, quick lookups, simple questions.

Session Start Protocol

ALWAYS do this first — no exceptions:

  1. Run the init script to create the three planning files:
    exec: bash {baseDir}/scripts/init-session.sh "<task description>"
    
  2. Fill in the ## Goal section in task_plan.md with the full task description.
  3. Break the task into 3–7 phases and add them under ## Phases.
  4. Confirm files exist before proceeding.

If exec is not available, create the three files manually using the templates in {baseDir}/templates/.

The Three Files

task_plan.md — Goal tracker (MOST IMPORTANT)

  • Created at session start, never deleted
  • Re-read before every major decision
  • Update when: phase completes, decision made, error encountered

findings.md — Knowledge store

  • Research results, discoveries, technical decisions
  • 2-Action Rule: after every 2 view/search/fetch operations → update findings.md immediately

progress.md — Session log

  • Actions taken, test results, errors encountered
  • Append-only; never rewrite history

Work Loop

BEFORE every major action:
  → Re-read task_plan.md (keeps goal in attention)

EVERY 2 view/search/fetch operations:
  → Save key findings to findings.md NOW

AFTER completing a phase:
  → Update phase status in task_plan.md to "complete"
  → Append phase summary to progress.md

WHEN an error occurs:
  → Log it in task_plan.md under ## Errors table
  → Never repeat the same failing action

BEFORE stopping:
  → Run: exec bash {baseDir}/scripts/check-complete.sh
  → Only stop if all phases show "complete"

File Update Rules

Trigger File to update Section
Start task task_plan.md Goal + Phases
2nd research op findings.md Key Findings
Make decision findings.md Technical Decisions
Phase done task_plan.md Phase status → complete
Phase done progress.md Phase summary
Error task_plan.md Errors table
Test result progress.md Test Results

Error Recovery Protocol

ATTEMPT 1: Diagnose & Fix
  → Read error carefully → identify root cause → targeted fix

ATTEMPT 2: Alternative Approach
  → Same error? Try different tool/library/method
  → NEVER repeat the exact same failing action

ATTEMPT 3: Broader Rethink
  → Question assumptions → search for solutions → update plan

AFTER 3 FAILURES:
  → Escalate to user: explain what was tried, share the error, ask for guidance

Completion Verification

Before telling the user the task is done:

  1. Run exec bash {baseDir}/scripts/check-complete.sh
  2. If any phase is NOT "complete" → continue working
  3. Only deliver result when all phases are checked off

Session Recovery

If context was cleared (e.g., /clear), resume by:

  1. Reading task_plan.md to restore goal and phase status
  2. Reading progress.md to see what was done
  3. Reading findings.md to restore research context
  4. Continuing from the first incomplete phase

Key Principles

  • Plan is Required: Never start a complex task without task_plan.md
  • Files are Memory: Context is volatile. Filesystem is permanent. Write important things down.
  • Never Repeat Failures: Track what was tried. Mutate the approach.
  • Error Recovery = Agentic Behavior: How you handle failures defines task quality.
  • Re-read Before Deciding: Attention manipulation — keep the goal visible.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Skill 文件
  • SKILL.md
    • Planning with Files
    • Core Principle
    • When to Use
    • Session Start Protocol
    • The Three Files
      • task_plan.md — Goal tracker (MOST IMPORTANT)
      • findings.md — Knowledge store
      • progress.md — Session log
    • Work Loop
    • File Update Rules
    • Error Recovery Protocol
    • Completion Verification
    • Session Recovery
    • Key Principles
  • 项目或源文件

相关 Skill

更多
refine-implementation-plan refine-implementation-plan Refine an existing planning-with-files plan into an implementation-ready engineering handoff through repository-grounded gap analysis, decision-focused user discussion, contract freezing, phase decomposition, and readiness checks. Use only after planning-with-files has created the active task_plan.md, findings.md, and progress.md, and invoke alongside planning-with-files during refinement. Do not use to initialize planning files, perform generic planning, or implement the plan.
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...