@deltafleet/goalkeeper 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,220 @@
1
+ # Goalkeeper
2
+
3
+ Long agent runs do not usually fail all at once.
4
+
5
+ They drift.
6
+
7
+ The agent still sounds confident. The tests still run. The plan still looks plausible. But after enough compaction, handoffs, and resumed turns, the session can quietly forget the thing that mattered most:
8
+
9
+ > Why were we doing it this way?
10
+
11
+ Goalkeeper is a small Agent Skill that helps Claude Code, Codex, and other skill-compatible coding agents keep long-running `/goal` work oriented across compaction, resumes, and handoffs.
12
+
13
+ It does not add a hidden memory engine. It gives the agent a durable working ritual:
14
+
15
+ - keep a short checkpoint
16
+ - keep a richer context pack
17
+ - append decisions and verification to an event log
18
+ - read the checkpoint before continuing after drift-prone boundaries
19
+
20
+ Boring files. Better continuity.
21
+
22
+ [한국어](README.ko.md) | [日本語](README.ja.md) | [中文](README.zh-CN.md)
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npx skills add deltafleet/goalkeeper
28
+ ```
29
+
30
+ To target specific agents explicitly:
31
+
32
+ ```bash
33
+ npx skills add deltafleet/goalkeeper --agent claude-code codex
34
+ ```
35
+
36
+ Requirements: Node.js 18+ and `npx`. The agent uses the skill's bundled Node helper scripts during long-goal workflows.
37
+
38
+ Skill-compatible agents can automatically load installed skills when a request strongly matches their metadata. Goalkeeper is written to match `/goal`, long-running work, compaction, resume, handoff, and continuity-preservation language.
39
+
40
+ So this can be enough:
41
+
42
+ > `/goal` Harden this release over a long-running session. Keep the goal, constraints, rejected paths, failed attempts, verification state, and next action recoverable after compact/resume.
43
+
44
+ But skill activation is still a routing decision, not a private runtime hook. Goalkeeper cannot force itself onto every goal.
45
+
46
+ For important long-running work, the safest path is to be explicit when you create the goal, or immediately after creating it:
47
+
48
+ > Use goalkeeper for this `/goal`. Keep the goal, constraints, decisions, verification state, failed attempts, and next action recoverable across compaction.
49
+
50
+ After that, you should not have to run Goalkeeper's helper scripts yourself. The agent runs them as part of the skill workflow.
51
+
52
+ ## The Problem
53
+
54
+ If you use an agent for small tasks, compaction is just a detail. The agent can usually recover.
55
+
56
+ But long goals are different.
57
+
58
+ Imagine a real session:
59
+
60
+ 1. You ask an agent to harden a release.
61
+ 2. The obvious patch fixes the visible bug, but would break rollback compatibility.
62
+ 3. You set a hard constraint: no database schema change, keep backward compatibility.
63
+ 4. A second attempt passes unit tests, but fails an integration edge case.
64
+ 5. The agent settles on a compatibility shim plus a targeted regression test.
65
+ 6. The regression test passes. That path is now the safe one.
66
+ 7. The context compacts.
67
+ 8. Later, the agent resumes from a clean summary: "release hardening mostly done."
68
+ 9. It still knows the goal, but may no longer feel why the schema shortcut stayed forbidden, why the first patches failed, or why that regression test mattered.
69
+
70
+ That is where drift starts.
71
+
72
+ The failure mode is not "the model forgot everything." It is worse: it remembers enough to continue, but not enough to continue in the same direction.
73
+
74
+ You see it when an agent:
75
+
76
+ - reopens an approach the user already rejected
77
+ - repeats a failed attempt because the failure was summarized away
78
+ - treats an unverified assumption as settled fact
79
+ - loses the exact next action after a long handoff
80
+ - preserves the goal but loses the operating constraints
81
+ - gives a polished explanation that no longer matches the workstream
82
+
83
+ Goalkeeper exists for that gap between "the goal is still known" and "the session still has its bearings."
84
+
85
+ ## What The Agent Does
86
+
87
+ When the skill is active, the agent maintains a project-local continuity folder:
88
+
89
+ ```text
90
+ .goalkeeper/
91
+ active-session
92
+ sessions/
93
+ <goal-session-id>/
94
+ checkpoint.md
95
+ context-pack.md
96
+ events.jsonl
97
+ ```
98
+
99
+ Each file has a different job:
100
+
101
+ - `checkpoint.md` is the short "read this first" recovery state.
102
+ - `context-pack.md` preserves the reasoning chain that is too detailed for the checkpoint.
103
+ - `events.jsonl` records decisions, failed attempts, command evidence, verification, risks, and handoffs.
104
+
105
+ The active goal says where the work is going. Goalkeeper preserves why this is still the right route.
106
+
107
+ ## How It Works
108
+
109
+ Goalkeeper turns long agent work into a simple loop:
110
+
111
+ ```text
112
+ Long /goal begins
113
+ -> the agent creates or resumes a Goalkeeper session
114
+ -> important constraints and decisions are recorded
115
+ -> failed attempts are kept so they are not repeated
116
+ -> verification evidence is logged when confidence changes
117
+ -> checkpoint.md is refreshed at meaningful boundaries
118
+ -> context-pack.md keeps the deeper reasoning chain
119
+ -> after resume, handoff, or suspected compaction, the agent reads checkpoint.md first
120
+ -> if the checkpoint is too thin, the agent reads context-pack.md
121
+ -> if exact proof is needed, the agent checks events.jsonl or source files
122
+ ```
123
+
124
+ This is not transcript storage. It is working-state preservation.
125
+
126
+ ## Why It Is Small On Purpose
127
+
128
+ The obvious version of this project is too big:
129
+
130
+ - a daemon
131
+ - a database
132
+ - a session rewriter
133
+ - a private runtime hook
134
+ - a vector memory layer
135
+ - a full transcript engine
136
+
137
+ Goalkeeper intentionally avoids that.
138
+
139
+ It uses files because files are visible, reviewable, portable, and easy for agents to read after compaction. The point is not to make the agent omniscient. The point is to make the next turn start from the right state.
140
+
141
+ ## What This Is Not
142
+
143
+ - Not a Codex or Claude Code plugin.
144
+ - Not an MCP server.
145
+ - Not a database.
146
+ - Not a transcript archive.
147
+ - Not a private agent runtime hook.
148
+ - Not a guarantee of perfect memory.
149
+ - Not a way to reduce compaction frequency.
150
+
151
+ Goalkeeper improves continuity. It does not pretend to eliminate context limits.
152
+
153
+ ## What Gets Better
154
+
155
+ With Goalkeeper, a resumed session has a better chance to recover:
156
+
157
+ - the user's non-negotiable constraints
158
+ - the current implementation direction
159
+ - the reason rejected alternatives stayed rejected
160
+ - the tests or commands that changed confidence
161
+ - the real next action
162
+ - unresolved risks that should not be hand-waved away
163
+
164
+ That is enough to prevent many of the boring, expensive failures in long agent runs.
165
+
166
+ ## Repository Layout
167
+
168
+ ```text
169
+ src/goalkeeper/ # installable skill payload
170
+ SKILL.md
171
+ agents/openai.yaml
172
+ scripts/
173
+ templates/
174
+ references/
175
+ tests/ # maintainer tests
176
+ examples/goalkeeper-session # static example state
177
+ docs/ # roadmap and release policy
178
+ ```
179
+
180
+ ## Maintainer Validation
181
+
182
+ For repository maintainers:
183
+
184
+ ```bash
185
+ npm run validate
186
+ ```
187
+
188
+ Equivalent manual checks:
189
+
190
+ ```bash
191
+ find src/goalkeeper/scripts tests -name '*.mjs' -print0 | xargs -0 -n1 node --check
192
+ node tests/test-goalkeeper-update-checkpoint.mjs
193
+ npx skills add . --list
194
+ ```
195
+
196
+ ## Versioning
197
+
198
+ Goalkeeper uses SemVer.
199
+
200
+ - Patch: docs, examples, tests, and compatible bug fixes
201
+ - Minor: new compatible helpers or workflow fields
202
+ - Major: breaking changes to checkpoint, event, or script contracts
203
+
204
+ See [docs/RELEASE.md](docs/RELEASE.md) for release steps.
205
+
206
+ ## Contributing
207
+
208
+ Issues and PRs are welcome. The project bias is strict:
209
+
210
+ - keep the core workflow small
211
+ - do not add hidden runtime dependencies
212
+ - do not promise perfect recovery
213
+ - prefer project-local files over global state
214
+ - prove changes with the validation commands above
215
+
216
+ See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
217
+
218
+ ## License
219
+
220
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,220 @@
1
+ # Goalkeeper
2
+
3
+ 长时间 agent 任务通常不是突然失败的。
4
+
5
+ 它们会慢慢偏离方向。
6
+
7
+ Agent 仍然会显得很自信。测试仍然会运行。计划看起来也仍然合理。但经过多次 compaction、handoff 和 resume 之后,最重要的东西可能会悄悄变模糊:
8
+
9
+ > 我们为什么要按这个方向做?
10
+
11
+ Goalkeeper 是一个很小的 skill,用来帮助 Claude Code、Codex 以及其他 skill-compatible coding agents 在长时间 `/goal` 工作中跨越 compaction、resume 和 handoff 仍然保持方向。
12
+
13
+ 它不添加隐藏的记忆引擎。它给 agent 一个可持续的工作习惯:
14
+
15
+ - 保持一个简短 checkpoint
16
+ - 保持一个更丰富的 context pack
17
+ - 把决策和验证写入 event log
18
+ - 在容易发生 drift 的边界之后,继续前先读 checkpoint
19
+
20
+ 无聊的文件。更好的连续性。
21
+
22
+ [English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md)
23
+
24
+ ## 安装
25
+
26
+ ```bash
27
+ npx skills add deltafleet/goalkeeper
28
+ ```
29
+
30
+ 如果要明确指定 agent:
31
+
32
+ ```bash
33
+ npx skills add deltafleet/goalkeeper --agent claude-code codex
34
+ ```
35
+
36
+ 要求: Node.js 18+ 和 `npx`。在长 goal workflow 中,agent 会使用 skill 内置的 Node helper scripts。
37
+
38
+ 当请求和 metadata 高度匹配时,Skill-compatible agent 可以自动加载已安装的 skill。Goalkeeper 的 metadata 面向 `/goal`、长时间任务、compaction、resume、handoff 和 continuity preservation。
39
+
40
+ 所以像下面这样的 goal 可能已经足够触发它:
41
+
42
+ > `/goal` Harden this release over a long-running session. Keep the goal, constraints, rejected paths, failed attempts, verification state, and next action recoverable after compact/resume.
43
+
44
+ 但 skill activation 仍然是 routing decision,不是私有的 agent runtime hook。Goalkeeper 不能强制自己附着到每一个 goal。
45
+
46
+ 对于重要的长期任务,最稳妥的做法是在创建 goal 时,或创建 goal 后正式开始工作前,明确调用它:
47
+
48
+ > Use goalkeeper for this `/goal`. Keep the goal, constraints, decisions, verification state, failed attempts, and next action recoverable across compaction.
49
+
50
+ 之后用户不需要手动执行 Goalkeeper 的 helper scripts。agent 会把它们作为 skill workflow 的一部分来运行。
51
+
52
+ ## 问题
53
+
54
+ 对于短任务,compaction 通常只是细节。Agent 大多能恢复。
55
+
56
+ 但长 goal 不一样。
57
+
58
+ 想象一个真实会话:
59
+
60
+ 1. 你让 agent 做 release hardening。
61
+ 2. 最显眼的 patch 能修掉眼前的 bug,但会破坏 rollback compatibility。
62
+ 3. 你设下硬约束:不能改 database schema,必须保持 backward compatibility。
63
+ 4. 第二次尝试通过了 unit tests,但在 integration edge case 上失败。
64
+ 5. agent 选择 compatibility shim 加 targeted regression test。
65
+ 6. regression test 通过了。这条路线现在是安全路线。
66
+ 7. 上下文被 compact。
67
+ 8. 后来 agent 带着整洁摘要回来:“release hardening 基本完成。”
68
+ 9. 它还记得 goal,但可能不再清楚为什么 schema shortcut 必须继续禁止,为什么前几个 patch 失败,以及为什么那个 regression test 很关键。
69
+
70
+ drift 就从这里开始。
71
+
72
+ 失败原因不是“模型忘掉了一切”。这更难处理:它记得足够继续工作,但不记得足够沿着同一个方向继续。
73
+
74
+ 你会在这些情况里看到它:
75
+
76
+ - 重新打开用户已经拒绝的方案
77
+ - 因为失败原因在摘要里消失,重复同样的尝试
78
+ - 把未验证的假设当作确定事实
79
+ - 在长 handoff 后丢失准确的 next action
80
+ - 还记得 goal,但丢掉了操作约束
81
+ - 解释很流畅,但已经不匹配实际工作流
82
+
83
+ Goalkeeper 解决的是这个空隙:goal 还在,但会话的方向感已经变弱。
84
+
85
+ ## Agent 会做什么
86
+
87
+ skill 激活后,agent 会在项目内维护一个连续性文件夹:
88
+
89
+ ```text
90
+ .goalkeeper/
91
+ active-session
92
+ sessions/
93
+ <goal-session-id>/
94
+ checkpoint.md
95
+ context-pack.md
96
+ events.jsonl
97
+ ```
98
+
99
+ 每个文件的职责不同:
100
+
101
+ - `checkpoint.md`: 恢复时首先读取的简短状态
102
+ - `context-pack.md`: 对 checkpoint 来说太长、但 compaction 后仍应保留的推理链
103
+ - `events.jsonl`: 决策、失败尝试、命令证据、验证、风险和 handoff 记录
104
+
105
+ active goal 说明目的地。Goalkeeper 保存为什么这条路线仍然正确。
106
+
107
+ ## 工作原理
108
+
109
+ Goalkeeper 把长时间 agent 工作变成一个简单循环:
110
+
111
+ ```text
112
+ 长 /goal 开始
113
+ -> agent 创建或恢复 Goalkeeper session
114
+ -> 记录重要约束和决策
115
+ -> 保留失败尝试,避免重复犯错
116
+ -> 在信心变化时记录验证证据
117
+ -> 在有意义的边界刷新 checkpoint.md
118
+ -> context-pack.md 保存更深的推理链
119
+ -> resume、handoff 或怀疑 compaction 后,agent 先读 checkpoint.md
120
+ -> 如果 checkpoint 太薄,agent 再读 context-pack.md
121
+ -> 如果需要精确证据,agent 检查 events.jsonl 或 source files
122
+ ```
123
+
124
+ 这不是保存对话 transcript。它保存的是工作状态。
125
+
126
+ ## 为什么故意做得很小
127
+
128
+ 把这个项目做大很容易:
129
+
130
+ - daemon
131
+ - database
132
+ - session rewriter
133
+ - private runtime hook
134
+ - vector memory layer
135
+ - full transcript engine
136
+
137
+ Goalkeeper 故意避开这些。
138
+
139
+ 它使用文件,因为文件可见、可审查、可移动,并且 compaction 后 agent 容易重新读取。目标不是让 agent 全知全能。目标是让下一轮从正确状态开始。
140
+
141
+ ## 它不是什么
142
+
143
+ - 不是 Codex 或 Claude Code plugin。
144
+ - 不是 MCP server。
145
+ - 不是 database。
146
+ - 不是完整对话 transcript 仓库。
147
+ - 不是 private agent runtime hook。
148
+ - 不保证完美记忆。
149
+ - 不会降低 compaction 频率。
150
+
151
+ Goalkeeper 改善连续性。它不假装消除上下文限制。
152
+
153
+ ## 改善什么
154
+
155
+ 使用 Goalkeeper 后,恢复的会话更有机会找回:
156
+
157
+ - 用户的 non-negotiable constraints
158
+ - 当前实现方向
159
+ - 被拒绝的替代方案为什么仍然应被拒绝
160
+ - 改变信心的测试或命令
161
+ - 真实的 next action
162
+ - 不应该被轻描淡写带过的 unresolved risks
163
+
164
+ 长时间 agent 工作里很多无聊但昂贵的失败,只靠这些就能减少。
165
+
166
+ ## Repository Layout
167
+
168
+ ```text
169
+ src/goalkeeper/ # installable skill payload
170
+ SKILL.md
171
+ agents/openai.yaml
172
+ scripts/
173
+ templates/
174
+ references/
175
+ tests/ # maintainer tests
176
+ examples/goalkeeper-session # static example state
177
+ docs/ # roadmap and release policy
178
+ ```
179
+
180
+ ## Maintainer Validation
181
+
182
+ For repository maintainers:
183
+
184
+ ```bash
185
+ npm run validate
186
+ ```
187
+
188
+ Equivalent manual checks:
189
+
190
+ ```bash
191
+ find src/goalkeeper/scripts tests -name '*.mjs' -print0 | xargs -0 -n1 node --check
192
+ node tests/test-goalkeeper-update-checkpoint.mjs
193
+ npx skills add . --list
194
+ ```
195
+
196
+ ## Versioning
197
+
198
+ Goalkeeper uses SemVer.
199
+
200
+ - Patch: docs, examples, tests, and compatible bug fixes
201
+ - Minor: new compatible helpers or workflow fields
202
+ - Major: breaking changes to checkpoint, event, or script contracts
203
+
204
+ See [docs/RELEASE.md](docs/RELEASE.md) for release steps.
205
+
206
+ ## Contributing
207
+
208
+ Issues and PRs are welcome. The project bias is strict:
209
+
210
+ - keep the core workflow small
211
+ - do not add hidden runtime dependencies
212
+ - do not promise perfect recovery
213
+ - prefer project-local files over global state
214
+ - prove changes with the validation commands above
215
+
216
+ See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
217
+
218
+ ## License
219
+
220
+ MIT. See [LICENSE](LICENSE).
package/SECURITY.md ADDED
@@ -0,0 +1,32 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ The latest minor release receives security fixes.
6
+
7
+ During the `0.x` series, APIs may still evolve, but security fixes will be released as patch versions whenever possible.
8
+
9
+ ## Reporting A Vulnerability
10
+
11
+ Do not open a public issue for a vulnerability.
12
+
13
+ Report security concerns through GitHub private vulnerability reporting when available, or contact the maintainers through the repository owner profile.
14
+
15
+ Include:
16
+
17
+ - affected version or commit
18
+ - reproduction steps
19
+ - expected impact
20
+ - whether the issue exposes local files, credentials, or private project state
21
+
22
+ ## Project Boundaries
23
+
24
+ Goalkeeper stores state in project-local `.goalkeeper/` directories. It should not require:
25
+
26
+ - secret tokens
27
+ - background daemons
28
+ - network access for normal helper scripts
29
+ - private host-agent runtime hooks
30
+ - global databases
31
+
32
+ If a change introduces any of those, treat it as security-sensitive and document the reason clearly.
@@ -0,0 +1,79 @@
1
+ # Release Policy
2
+
3
+ Goalkeeper is released as a GitHub repository and optional npm package.
4
+
5
+ The installable skill source of truth is:
6
+
7
+ - `src/goalkeeper/SKILL.md`
8
+ - `src/goalkeeper/agents/openai.yaml`
9
+ - `src/goalkeeper/scripts/`
10
+ - `src/goalkeeper/references/`
11
+ - `src/goalkeeper/templates/`
12
+ - `examples/`
13
+ - `docs/`
14
+
15
+ ## Versioning
16
+
17
+ Use SemVer.
18
+
19
+ - `PATCH`: documentation, examples, tests, and compatible bug fixes
20
+ - `MINOR`: compatible helper scripts, metadata, templates, or workflow fields
21
+ - `MAJOR`: breaking changes to checkpoint, context-pack, event, or script contracts
22
+
23
+ During `0.x`, minor releases may still adjust public contracts. Document those changes clearly in `CHANGELOG.md`.
24
+
25
+ ## Release Checklist
26
+
27
+ 1. Update `package.json` version.
28
+ 2. Update `CHANGELOG.md`.
29
+ 3. Run validation:
30
+
31
+ ```bash
32
+ npm run validate
33
+ ```
34
+
35
+ 4. Confirm the public package does not include local Goalkeeper state:
36
+
37
+ ```bash
38
+ git status --short --ignored
39
+ npm pack --dry-run
40
+ ```
41
+
42
+ 5. Commit:
43
+
44
+ ```bash
45
+ git commit -m "Release vX.Y.Z"
46
+ ```
47
+
48
+ 6. Tag:
49
+
50
+ ```bash
51
+ git tag vX.Y.Z
52
+ ```
53
+
54
+ 7. Push:
55
+
56
+ ```bash
57
+ git push origin main --tags
58
+ ```
59
+
60
+ 8. Create a GitHub release:
61
+
62
+ ```bash
63
+ GH_CONFIG_DIR=$HOME/.config/gh-deltafleet gh release create vX.Y.Z --generate-notes
64
+ ```
65
+
66
+ 9. Optional npm publish:
67
+
68
+ ```bash
69
+ npm --userconfig ~/.config/npm-deltafleet/npmrc publish --access public
70
+ ```
71
+
72
+ ## Deltafleet Credentials
73
+
74
+ This repository can be published with the local deltafleet profiles:
75
+
76
+ - GitHub CLI: `GH_CONFIG_DIR=$HOME/.config/gh-deltafleet`
77
+ - npm: `npm --userconfig ~/.config/npm-deltafleet/npmrc`
78
+
79
+ Never commit these config files or token values.
@@ -0,0 +1,77 @@
1
+ # Roadmap
2
+
3
+ ## Product Thesis
4
+
5
+ Long-running agent goals need a small continuity layer outside the model context.
6
+
7
+ Goalkeeper should stay boring: a short checkpoint, a medium-density context pack, an append-only event log, a turn-start helper, and a doctor check. It should not become a substitute context engine or a promise of perfect post-compact recovery.
8
+
9
+ ## MVP
10
+
11
+ Ship an agent skill under `src/goalkeeper/` that manages project-local state:
12
+
13
+ ```text
14
+ .goalkeeper/
15
+ active-session
16
+ sessions/
17
+ <goal-session-id>/
18
+ checkpoint.md
19
+ context-pack.md
20
+ events.jsonl
21
+ ```
22
+
23
+ Core behavior:
24
+
25
+ - initialize a Goalkeeper session for a long-running goal
26
+ - read the active checkpoint first after resume or suspected compaction
27
+ - read the context pack when the checkpoint is too thin to recover pre-compaction reasoning
28
+ - append meaningful decisions, failures, verification, and handoff events
29
+ - refresh the checkpoint when recoverable working state changes
30
+ - run a read-only doctor before trusting a workspace for long work
31
+
32
+ ## User-Facing Scope
33
+
34
+ Keep these scripts central:
35
+
36
+ - `goalkeeper-init.mjs`
37
+ - `goalkeeper-turn-start.mjs`
38
+ - `goalkeeper-append-event.mjs`
39
+ - `goalkeeper-update-checkpoint.mjs`
40
+ - `goalkeeper-doctor.mjs`
41
+
42
+ Keep this optional and maintainer-oriented:
43
+
44
+ - `tests/test-goalkeeper-update-checkpoint.mjs`
45
+
46
+ ## Non-Goals
47
+
48
+ - no MCP server in the MVP
49
+ - no host-agent plugin packaging in the MVP
50
+ - no SQLite or global database
51
+ - no background daemon
52
+ - no prompt-assembly hook
53
+ - no host-agent session rewriting
54
+ - no claim of 100 percent compact recovery
55
+
56
+ ## Good Enough Release Bar
57
+
58
+ - `npx skills add . --list` discovers exactly one skill named `goalkeeper`
59
+ - the skill body is concise enough to load routinely
60
+ - README explains the simple workflow clearly
61
+ - multilingual READMEs keep the same public workflow in Korean, Japanese, and Chinese
62
+ - examples parse as valid JSONL
63
+ - script syntax checks pass
64
+ - checkpoint update helper test passes
65
+ - doctor passes against this repo's live Goalkeeper state
66
+
67
+ ## Later, Only If Needed
68
+
69
+ Possible future additions should be justified by real usage:
70
+
71
+ - a tiny CLI wrapper around the existing scripts
72
+ - event search helper
73
+ - checkpoint compaction helper
74
+ - optional MCP ergonomics
75
+ - cross-workspace indexing
76
+
77
+ These should not change the source of truth: project-local `.goalkeeper/` files.
@@ -0,0 +1,58 @@
1
+ # Goalkeeper Checkpoint
2
+
3
+ ## Active Goal
4
+
5
+ - Objective: Ship a long-running agent feature without losing direction after repeated compaction.
6
+ - Done criteria: The implementation, tests, documentation, and handoff are complete; no known blocker remains untracked.
7
+ - Current status: Example state for Goalkeeper.
8
+
9
+ ## Throughline
10
+
11
+ - Current direction: Preserve the user's intent, constraints, major decisions, verification state, and next action in a short project-local checkpoint.
12
+ - Why this direction: The host agent's active goal describes the destination, but repeated compaction can blur the decision chain that explains how to keep moving.
13
+
14
+ ## Constraints
15
+
16
+ - Non-negotiable: Read this checkpoint before resuming after compaction or handoff.
17
+ - Non-negotiable: Append important evidence to `events.jsonl` before updating this checkpoint.
18
+ - Forbidden approaches: Treating memory as exact proof when the event log or source files are needed.
19
+
20
+ ## Decisions
21
+
22
+ - Runtime state lives under `.goalkeeper/sessions/<goal-session-id>/`.
23
+ - The checkpoint stays concise and current.
24
+ - The event log keeps append-only evidence.
25
+
26
+ ## Attempts And Failures
27
+
28
+ - Avoid writing full transcripts into the checkpoint; it becomes too long to read routinely.
29
+ - Avoid relying only on the active goal; it does not preserve enough decision context.
30
+
31
+ ## Important Files
32
+
33
+ - `SKILL.md`
34
+ - `.goalkeeper/sessions/<goal-session-id>/checkpoint.md`
35
+ - `.goalkeeper/sessions/<goal-session-id>/context-pack.md`
36
+ - `.goalkeeper/sessions/<goal-session-id>/events.jsonl`
37
+
38
+ ## Context Pack
39
+
40
+ - `examples/goalkeeper-session/context-pack.md`
41
+
42
+ ## Verification
43
+
44
+ - Verified: This is a static example, not a live project verification result.
45
+ - Not yet verified: Replace this section with real command/test evidence during actual work.
46
+
47
+ ## Open Risks
48
+
49
+ - Agents may skip reading the checkpoint unless the skill makes the recovery ritual explicit.
50
+ - Checkpoints can become stale if not updated at meaningful transitions.
51
+
52
+ ## Next Action
53
+
54
+ - Read recent events when this checkpoint is insufficient, then continue from the stated next action.
55
+
56
+ ## Last Updated
57
+
58
+ - 2026-05-17