ARTICLE DETAIL

资讯详情

深耕编程入门与网站建设的一线实战洞察。

Current Task Plan

Current Task Plan Current Task Plan【免费下载链接】planning-with-filesPersistent file-based planning for AI coding agents and long-running tasks. Crash-proof markdown plans, session recovery after /clear and compaction, per-turn re-injection against context rot, deterministic completion gate. Manus-style. Install from npm, the Claude Code plugin marketplace, or npx skills. Codex, Cursor, OpenCode, 60 agents.项目地址: https://gitcode.com/GitHub_Trending/pl/planning-with-files#[[file:.kiro/plan/task_plan.md]]Recent Progress#[[file:.kiro/plan/progress.md]]inclusion: auto 表示当用户要求继续任务 / 恢复工作 / 查看当前阶段 / 显示进度等场景时自动包含该 steering 文档#[[file:…]] 是 Kiro 的实时文件引用语法指向磁盘文件而非复制内容。 --- ## 五、三个核心脚本用途、命令与实现细节 以下所有路径都是**把 .kiro/skills/planning-with-files/ 复制进项目之后、相对项目根目录**的路径。 | 脚本 | 用途 | |------|------| | assets/scripts/bootstrap.sh / bootstrap.ps1 | 创建 .kiro/plan/* 与 planning-context.md幂等 | | assets/scripts/session-catchup.py | 打印 Kiro 规划文件的 mtime 与简短摘要**不读取 agent 会话记录库** | | assets/scripts/check-complete.sh / check-complete.ps1 | 对照 .kiro/plan/task_plan.md 报告阶段完成情况 | ### 5.1 bootstrap已在上文详述 幂等复制四个模板文件支持 PLANNING_PROJECT_ROOT 覆盖目标项目目录。Shell 与 PowerShell 两个版本行为对齐。 ### 5.2 session-catchup.py跨会话恢复的轻量快照 bash bash $(command -v python3 || command -v python) \ .kiro/skills/planning-with-files/assets/scripts/session-catchup.py $(pwd)PowerShellpython .kiro/skills/planning-with-files/assets/scripts/session-catchup.py (Get-Location)从 session-catchup.py 的源码可以确认其实现逻辑将传入的project_dir缺省为当前目录解析为绝对路径然后扫描.kiro/plan/下的三个文件对每个存在的文件打印mtime%Y-%m-%d %H:%M:%S格式摘要提取规则按文件类型区分task_plan.md提取## Goal/## Current Phase小节内容各截断至 200/100 字符以及所有含Status:的行findings.md提取## Requirements小节前 5 行progress.md取最近 8 条非空、非 HTML 注释的行三个文件都不存在时打印提示并建议先运行 bootstrap退出码仍为 0输出末尾提示下一步Read the full files under.kiro/plan/, thengit diff --statif repo drift is suspected.——即需要结合git diff --stat判断仓库是否发生了漂移。关键安全属性该脚本只扫描项目规划文件不读取 Kiro 或其他 agent 的会话/transcript 存储与文档声明一致。5.3 check-complete.sh阶段完成度检查bashsh .kiro/skills/planning-with-files/assets/scripts/check-complete.shPowerShellpwsh -File .kiro/skills/planning-with-files/assets/scripts/check-complete.ps1从 check-complete.sh 源码可以看到几个重要的实现细节默认读取.kiro/plan/task_plan.md也接受第一个命令行参数作为自定义路径用grep -c ### Phase统计阶段总数用grep -cF **Status:** complete等统计各状态阶段数若**Status:**行一个都没有旧格式计划则回退匹配[complete]/[in_progress]/[pending]复选框风格无阶段结构TOTAL0时保持静默退出避免误报0/0 完成全部完成输出ALL PHASES COMPLETE (n/n).否则输出In progress (n/n phases complete).以及 in_progress / pending 的数量支持PLANNING_DISABLED1逐调用退出开关issue #195 引入一次性/CI 会话与某个计划共享 cwd 但从未选择加入时直接exit 0跳过所有检查无论结果如何脚本始终以退出码 0 结束stdout-only 报告模式因此不会干扰宿主工具的执行流。六、Kiro 中的日常工作流每轮读计划 提醒块SKILL.md 把使用流程组织为明确的 STEPSTEP 0 — Bootstrap每个工作区一次运行上文的 bootstrap 命令。STEP 1 — 持久提醒技能激活后在每次回复末尾追加以下块并在规划会话存续期间持续重复[Planning Active]Before each turn, read.kiro/plan/task_plan.mdand.kiro/plan/progress.mdto restore context.STEP 2 — 每轮读取计划会话激活期间读取.kiro/plan/task_plan.md目标、阶段、状态读取.kiro/plan/progress.md近期动作将.kiro/plan/findings.md用于研究结论与技术决策。 若.kiro/plan/缺失回到 STEP 0。STEP 3 — 项目文件 catchup长间隔或疑似漂移后运行session-catchup.py获取摘要与 mtime必要时与git diff --stat对照然后让规划文件与实际代码库对齐。可选阶段清单检查运行check-complete.sh默认针对.kiro/plan/task_plan.md。七、模板参考手动 Steering 与粘贴式骨架references/planning-templates.md仓库内路径提供 task_plan / findings / progress 三份紧凑的、可直接粘贴的 Markdown 骨架。若要在 Kiro 中作为手动 steering 使用把该文件复制到.kiro/steering/planning-templates.md并在文件顶部加上 YAML front matter--- inclusion: manual name: planning-templates description: Markdown templates for task_plan, findings, and progress. ---inclusion: manual表示不会自动注入只有明确要求时才读取。对比 bootstrap 生成的planning-context.mdinclusion: auto 实时引用手动 steering 适合把模板作为参考资料而不是每轮上下文。bootstrap 实际写入.kiro/plan/的模板task_plan.md结构完整包含## Goal一句话描述期望终态## Next Step记录唯一的下一个动作随阶段状态变化更新## Current Phase当前正在进行的阶段## Phases37 个可验证阶段每个阶段含复选框列表与**Status:** pending | in_progress | complete状态标记## Key Questions、## Decisions MadeDecision / Rationale 表、## Errors EncounteredError / Attempt / Resolution 表、## Notes。这些小节与session-catchup.py的摘要提取规则Goal、Current Phase、Status 行、Requirements、最近进度一一对应说明模板设计是有意服务于脚本的机器可读提取的。八、Manus 式上下文工程文件系统即记忆该适配层的深层依据是 Manus 式 agent 上下文工程中的filesystem-as-memory模式详见 references/manus-principles.md。核心模型在 SKILL.md 中表述为Context Window RAM易失、有限 Filesystem Disk持久、近乎无限 → 任何重要内容都写入磁盘。【免费下载链接】planning-with-filesPersistent file-based planning for AI coding agents and long-running tasks. Crash-proof markdown plans, session recovery after /clear and compaction, per-turn re-injection against context rot, deterministic completion gate. Manus-style. Install from npm, the Claude Code plugin marketplace, or npx skills. Codex, Cursor, OpenCode, 60 agents.项目地址: https://gitcode.com/GitHub_Trending/pl/planning-with-files创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表