KG

kingbootoshi/goal-ledger

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

69 stars 质量 56 趋势 4MIT

Claude Code 和 Codex CLI 的单文件代理目标账本——与 /goal 模式配对

概览

一个单文件代理目标账本,与 和 中的 /goal 模式配对。 /goal 模式非常适合让代理专注于一个持久目标。但它不太擅长记住已经发生的事情。目标账本填补了这个空白:每个检查点、决策、阻碍和验证都被写入一个人类可读的 implementation-notes.html 文件,在任何浏览器中都能打开,并经受压缩、交接和链式目标的考验。 同一个技能在两个代理中都能使用。同样的 SKILL.md,相同的脚本,相同的磁盘布局。把它放进 ~/.claude/skills/goal/ 和 ~/.codex/skills/goal/ 里,两个代理都能原生学习。 当代理说$goal、/goal mode、start a goals,或任何等效的目标模式语言时,技能: 1. 在当前项目中以.agent/runs/ / 创建一个新的账本。2. 编写一个合同文件(GOAL.md):目标、完成标准、逃逸口、父目标。3. 编写一个单一的规范状态文件(实现注释。

概述(AI 翻译)

一个单文件代理目标账本,与 Claude Code 和 OpenAI Codex CLI 中的 /goal 模式配对。

[/goal 模式非常适合让代理专注于一个持久目标。但它不太擅长记住已经发生的事情。目标账本填补了这一空白:每个检查点、决策、阻断和验证都写入一个人类可读的 implementation-notes.html 文件,可在任何浏览器中打开,并经受压缩、交接和链式目标的考验。

同样的技能在两个代理中都有效。同样的SKILL.md,同样的脚本,相同的磁盘布局。把它放进~/.claude/skills/goal/和[~/.codex/skills/goal/],两个代理都能原生学习。

它的作用

当代理说出$goal、/goal mode、start a goal或任何等效的目标模式语言时,技能:

  1. 在当前项目中以.agent/runs/ /创建新的账本。
  2. 编写合同文件(GOAL.md):目标、终结标准、逃生口、父目标。
  3. 编写一个单一的规范状态文件([implementation-notes.html):一个自包含的HTML页面,顶部有Resume Here块,并嵌入进度时间线。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Goal Ledger

A single-file agent goal ledger that pairs with /goal mode in Claude Code and OpenAI Codex CLI.

/goal mode is great at keeping an agent pointed at one durable objective. It is not great at remembering what already happened. The Goal Ledger fills that gap: every checkpoint, decision, blocker, and validation gets written into one human-readable implementation-notes.html file that opens in any browser and survives compaction, hand-offs, and chained goals.

The same skill works in both agents. Same SKILL.md, same script, same on-disk layout. Drop it into ~/.claude/skills/goal/ and ~/.codex/skills/goal/ and both agents pick it up natively.

What it does

When the agent says $goal, /goal mode, start a goal, or any equivalent goal-mode language, the skill:

  1. Creates a fresh ledger under .agent/runs// in the current project.
  2. Writes a contract file (GOAL.md): objective, finishing criteria, escape hatch, parent goal.
  3. Writes a single canonical state file (implementation-notes.html): a self-contained HTML page with a Resume Here block at the top and an embedded progress timeline.
  4. Couples to the runtime goal: when the user is in Codex /goal mode, the absolute ledger path is dropped into the goal objective so the next agent on the thread knows exactly where to read and write.
  5. Updates the HTML at every meaningful checkpoint: validation runs, implementation milestones, blockers, spec-vs-reality conflicts, compaction prep, final hand-off.

The progress timeline is rendered directly from an inline progressEvents array inside the HTML file. There is no separate events.jsonl to keep in sync — the page is its own history. Open the file locally and you get the whole story at a glance.

Why one HTML file

Earlier versions of this skill used a sprawl of PROGRESS.md, HANDOFF.md, events.jsonl, and CODEBASE_STATUS.md. Agents got confused about which file was canonical. Humans got confused about which file to read. State drifted between them.

Goal Ledger collapses all of that into one self-contained HTML file:

  • Top is a Resume Here block: status, current phase, blockers, next exact action, last validation, protected paths. Built so the next agent (or human) can resume in under a minute.
  • Middle is Decisions Outside The Spec, Changes And Tradeoffs, Validation, Evidence. The execution record.
  • Bottom is Progress Timeline. Rendered from an inline events array, no external file dependencies, no fetches against sibling files. Opens cleanly even when you double-click the HTML straight out of the file browser.

The HTML is the contract with the next agent. GOAL.md is the contract with the current agent. That’s the whole system.

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add kingbootoshi/goal-ledger
新手?先看 mcpskill.org 教程 →