Focus Tracker
Maintain a FOCUS.md file in the workspace root as persistent working state.
When to Read FOCUS.md
- - Every session start (before responding to first message)
- After every compaction (if context feels thin, read it)
- When the user asks about current work ("what are we doing?", "where were we?")
When to Write/Update FOCUS.md
- - When starting a new focused project — create or replace the active focus
- When a sub-task completes — check off items, update status
- When priorities shift — user redirects, update immediately
- When work is DONE — archive to
FOCUS-LOG.md and clear FOCUS.md - Before compaction memory flushes — ensure FOCUS.md reflects current state
FOCUS.md Format
CODEBLOCK0
Rules
- 1. One focus at a time. If the user pivots, archive the old focus first.
- Keep it short. FOCUS.md should be <50 lines. It's a resume point, not a journal.
- Active State is sacred. Always update it before stopping work. Future-you reads this first.
- Don't duplicate memory files. FOCUS.md tracks what we're doing now. Daily memory files track what happened. Different jobs.
- Archive when done. Append completed focuses to
FOCUS-LOG.md with completion date and outcome, then clear FOCUS.md. - Read it, don't ask. If FOCUS.md exists, read it and resume. Don't ask "what were we working on?" when the answer is in the file.
FOCUS-LOG.md Format
Append-only log of completed focuses:
CODEBLOCK1
Integration with AGENTS.md
Add to your session-start routine, after reading SOUL.md and USER.md:
- - Read
FOCUS.md if it exists → resume work or acknowledge status - If no FOCUS.md exists → no active project, proceed normally
焦点追踪器
在工作区根目录维护一个 FOCUS.md 文件,作为持久化工作状态。
何时读取 FOCUS.md
- - 每次会话开始时(在回复第一条消息之前)
- 每次压缩后(如果感觉上下文不足,请读取它)
- 当用户询问当前工作内容时(我们在做什么?、我们做到哪了?)
何时写入/更新 FOCUS.md
- - 开始新的重点项目时 — 创建或替换当前焦点
- 子任务完成时 — 勾选项目,更新状态
- 优先级发生变化时 — 用户重新定向,立即更新
- 工作完成时 — 归档到 FOCUS-LOG.md 并清空 FOCUS.md
- 压缩内存刷新前 — 确保 FOCUS.md 反映当前状态
FOCUS.md 格式
markdown
焦点 — [项目名称]
开始时间: YYYY-MM-DD HH:MM UTC
状态: 活跃 | 暂停 | 受阻
背景: 一行说明我们为什么要做这个
目标
我们试图完成什么(最多1-3句话)
计划
编号步骤。完成后勾选。
- - [x] 步骤 1 — 已完成
- [ ] 步骤 2 — 进行中(注明当前状态)
- [ ] 步骤 3 — 下一步
当前状态
现在正在发生什么。最后做了什么,下一步行动是什么。
这是最重要的部分 — 它是压缩后的恢复点。
阻碍因素
任何等待用户、外部系统或决策的事项。
子代理
任何生成的子代理及其状态。
- - 标签 — 任务描述 — 状态(运行中/已完成/失败)
规则
- 1. 一次只关注一个焦点。 如果用户转向,先归档旧焦点。
- 保持简短。 FOCUS.md 应少于50行。它是恢复点,不是日志。
- 当前状态至关重要。 在停止工作前始终更新它。未来的你会首先读取这个。
- 不要重复记忆文件。 FOCUS.md 追踪我们现在在做什么。日常记忆文件追踪发生了什么。不同职责。
- 完成后归档。 将完成的焦点追加到 FOCUS-LOG.md,包含完成日期和结果,然后清空 FOCUS.md。
- 读取它,不要询问。 如果 FOCUS.md 存在,读取它并恢复工作。不要问我们在做什么?当答案就在文件中时。
FOCUS-LOG.md 格式
仅追加的已完成焦点日志:
markdown
[项目名称] — 完成于 YYYY-MM-DD
持续时间: X小时/天
结果: 一行结果
与 AGENTS.md 的集成
添加到您的会话开始例程中,在读取 SOUL.md 和 USER.md 之后:
- - 如果存在 FOCUS.md 则读取它 → 恢复工作或确认状态
- 如果不存在 FOCUS.md → 没有活跃项目,正常进行