Skip to content

OthmanAdi/planning-with-files / skills/i18n/planning-with-files-zh

planning-with-files-zh

Verified

用于多步骤 AI 代理工作的持久化文件规划系统。将 task_plan.md、findings.md 和 progress.md 保存在磁盘上,生命周期钩子会注入选定的项目规划上下文。自动恢复只读取项目规划文件。只有显式运行 session-catchup.py --metadata 才会检查本机同项目的会话元数据;--replay 可输出有长度限制且由 nonce 框定的同项目摘录。可选门禁仅在宿主支持时请求继续,绝不执行 Markdown 中声明的命令。本技能没有网络上传路径。适用于研究或需要 5 次以上工具调用的工作。触发词:任务规划、项目计划、制定计划、分解任务、多步骤规划、进度跟踪、文件规划、帮我规划、拆解项目

scripts/init-session.sh

View on GitHub
#!/usr/bin/env bash
# 初始化新会话的规划文件
# 用法:./init-session.sh [项目名称]

set -e

PROJECT_NAME="${1:-project}"
DATE=$(date +%Y-%m-%d)

echo "正在初始化规划文件:$PROJECT_NAME"

# 如果 task_plan.md 不存在则创建
if [ ! -f "task_plan.md" ]; then
    cat > task_plan.md << 'EOF'
# 任务计划:[简要描述]

将此文件作为任务的持久化路线图。在开始复杂工作前创建,并在阶段变化时及时更新。

## 目标

用一句话说明预期的最终结果。

[用一句话描述最终状态]

## 下一步

记录接下来要执行的单个动作。当前阶段或近期动作发生变化时,立即更新此项。

[下一步要执行的单个动作]

## 当前阶段

写明当前正在处理的阶段。

阶段 1

## 各阶段

将任务拆分为三到七个可验证的阶段。状态只能使用 `pending`、`in_progress` 或 `complete`,并在工作推进时更新。

### 阶段 1:需求与发现
- [ ] 理解用户意图
- [ ] 确定约束条件和需求
- [ ] 将发现记录到 findings.md
- **状态:** in_progress

### 阶段 2:规划与结构
- [ ] 确定技术方案
- [ ] 如有需要创建项目结构
- [ ] 记录决策及理由
- **状态:** pending

### 阶段 3:实现
- [ ] 按计划逐步执行
- [ ] 先将代码写入文件再执行
- [ ] 增量测试
- **状态:** pending

### 阶段 4:测试与验证
- [ ] 验证所有需求已满足
- [ ] 将测试结果记录到 progress.md
- [ ] 修复发现的问题
- **状态:** pending

### 阶段 5:交付
- [ ] 检查所有输出文件
- [ ] 确保交付物完整
- [ ] 交付给用户
- **状态:** pending

## 关键问题

记录需要解决的重要问题,并在获得答案后更新。

1. [待回答的问题]
2. [待回答的问题]

## 已做决策

记录重要决策及其理由。

| 决策 | 理由 |
|------|------|

## 遇到的错误

记录每个不同的错误、尝试次数和解决方案。操作失败后,先改变方法再重试。

| 错误 | 尝试次数 | 解决方案 |
|------|---------|---------|
|      | 1       |         |

## 备注
- 随着工作推进,将阶段状态从 `pending` 更新为 `in_progress`,再更新为 `complete`。
- 做重大决策前,重新读取目标和下一步。
- 及时记录错误,避免重复失败的方法。
EOF
    echo "已创建 task_plan.md"
else
    echo "task_plan.md 已存在,跳过"
fi

# 如果 findings.md 不存在则创建
if [ ! -f "findings.md" ]; then
    cat > findings.md << 'EOF'
# 发现与决策

## 需求
-

## 研究发现
-

## 技术决策
| 决策 | 理由 |
|------|------|

## 遇到的问题
| 问题 | 解决方案 |
|------|---------|

## 资源
-
EOF
    echo "已创建 findings.md"
else
    echo "findings.md 已存在,跳过"
fi

# 如果 progress.md 不存在则创建
if [ ! -f "progress.md" ]; then
    cat > progress.md << EOF
# 进度日志

## 会话:$DATE

### 当前状态
- **阶段:** 1 - 需求与发现
- **开始时间:** $DATE

### 已执行操作
-

### 测试结果
| 测试 | 预期 | 实际 | 状态 |
|------|------|------|------|

### 错误
| 错误 | 解决方案 |
|------|---------|
EOF
    echo "已创建 progress.md"
else
    echo "progress.md 已存在,跳过"
fi

echo ""
echo "规划文件已初始化!"
echo "文件:task_plan.md, findings.md, progress.md"
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall