@deltafleet/codex-goalkeeper 0.1.0 → 0.1.1
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/CHANGELOG.md +6 -0
- package/README.ja.md +116 -109
- package/README.ko.md +115 -108
- package/README.md +104 -123
- package/README.zh-CN.md +130 -123
- package/docs/RELEASE.md +6 -4
- package/docs/ROADMAP.md +2 -2
- package/package.json +9 -11
- package/{SKILL.md → src/codex-goalkeeper/SKILL.md} +13 -13
- package/src/{references → codex-goalkeeper/references}/event-schema.md +1 -1
- package/src/{references → codex-goalkeeper/references}/guardrail.md +7 -7
- package/src/{references → codex-goalkeeper/references}/workflow.md +7 -7
- package/src/{scripts → codex-goalkeeper/scripts}/goalkeeper-append-event.mjs +1 -1
- package/src/{scripts → codex-goalkeeper/scripts}/goalkeeper-doctor.mjs +1 -1
- package/src/{scripts → codex-goalkeeper/scripts}/goalkeeper-init.mjs +1 -1
- package/src/{scripts → codex-goalkeeper/scripts}/goalkeeper-turn-start.mjs +1 -1
- package/src/{scripts → codex-goalkeeper/scripts}/goalkeeper-update-checkpoint.mjs +1 -1
- package/src/{templates → codex-goalkeeper/templates}/AGENTS.goalkeeper.md +7 -7
- package/src/scripts/test-goalkeeper-update-checkpoint.mjs +0 -236
- /package/{agents → src/codex-goalkeeper/agents}/openai.yaml +0 -0
- /package/src/{templates → codex-goalkeeper/templates}/active-session +0 -0
- /package/src/{templates → codex-goalkeeper/templates}/checkpoint.md +0 -0
- /package/src/{templates → codex-goalkeeper/templates}/context-pack.md +0 -0
- /package/src/{templates → codex-goalkeeper/templates}/event.jsonl +0 -0
package/README.md
CHANGED
|
@@ -1,148 +1,126 @@
|
|
|
1
1
|
# Codex Goalkeeper
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Long Codex runs do not usually fail all at once.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
They drift.
|
|
6
6
|
|
|
7
|
-
|
|
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
8
|
|
|
9
|
-
|
|
10
|
-
2. Preserve the reasoning that should survive compaction.
|
|
11
|
-
3. Record decisions, failures, and verification as evidence.
|
|
12
|
-
4. Read the checkpoint first before continuing.
|
|
9
|
+
> Why were we doing it this way?
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Codex Goalkeeper is a small skill that helps Codex keep long-running `/goal` work oriented across compaction, resumes, and handoffs.
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## The Problem
|
|
19
|
-
|
|
20
|
-
Long agent sessions do not usually fail because the model forgets a random detail. They fail because the "why" gets blurred:
|
|
13
|
+
It does not add a hidden memory engine. It gives the agent a durable working ritual:
|
|
21
14
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- what the next action was supposed to be
|
|
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
|
|
27
19
|
|
|
28
|
-
|
|
20
|
+
Boring files. Better continuity.
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## What It Creates
|
|
22
|
+
[한국어](README.ko.md) | [日本語](README.ja.md) | [中文](README.zh-CN.md)
|
|
33
23
|
|
|
34
|
-
|
|
24
|
+
## Install
|
|
35
25
|
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
active-session
|
|
39
|
-
sessions/
|
|
40
|
-
<goal-session-id>/
|
|
41
|
-
checkpoint.md
|
|
42
|
-
context-pack.md
|
|
43
|
-
events.jsonl
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add deltafleet/codex-goalkeeper
|
|
44
28
|
```
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
Requirements: Node.js 18+ and `npx`. Codex uses the skill's bundled Node helper scripts during long-goal workflows.
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
- `context-pack.md`: medium-density reasoning that should survive compaction
|
|
50
|
-
- `events.jsonl`: append-only evidence for decisions, failures, commands, risks, and handoffs
|
|
32
|
+
Then ask Codex to use it on long-running work:
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
> Use codex-goalkeeper for this `/goal`. Keep the goal, constraints, decisions, verification state, failed attempts, and next action recoverable across compaction.
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
That is the intended user workflow. You should not have to manually run Goalkeeper's helper scripts during normal use. Codex runs them as part of the skill workflow.
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
## The Problem
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
npx skills add deltafleet/codex-goalkeeper
|
|
60
|
-
```
|
|
40
|
+
If you use Codex for small tasks, compaction is just a detail. The agent can usually recover.
|
|
61
41
|
|
|
62
|
-
|
|
42
|
+
But long goals are different.
|
|
63
43
|
|
|
64
|
-
|
|
65
|
-
git clone https://github.com/deltafleet/codex-goalkeeper
|
|
66
|
-
cd codex-goalkeeper
|
|
67
|
-
npx skills add .
|
|
68
|
-
```
|
|
44
|
+
Imagine a real session:
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
1. You ask Codex to harden a release.
|
|
47
|
+
2. It finds a brittle edge case and chooses a conservative path.
|
|
48
|
+
3. You explicitly reject a tempting shortcut.
|
|
49
|
+
4. Two implementation attempts fail for subtle reasons.
|
|
50
|
+
5. A test finally proves the right route.
|
|
51
|
+
6. The context compacts.
|
|
52
|
+
7. Later, the agent resumes with a neat summary, but not the decision pressure that made the route correct.
|
|
71
53
|
|
|
72
|
-
|
|
54
|
+
That is where drift starts.
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
node <skill-path>/src/scripts/goalkeeper-init.mjs \
|
|
76
|
-
--workspace <workspace> \
|
|
77
|
-
--session 2026-05-18-release-hardening \
|
|
78
|
-
--goal "Ship the release without losing constraints after compaction"
|
|
79
|
-
```
|
|
56
|
+
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.
|
|
80
57
|
|
|
81
|
-
|
|
58
|
+
You see it when an agent:
|
|
82
59
|
|
|
83
|
-
|
|
60
|
+
- reopens an approach the user already rejected
|
|
61
|
+
- repeats a failed attempt because the failure was summarized away
|
|
62
|
+
- treats an unverified assumption as settled fact
|
|
63
|
+
- loses the exact next action after a long handoff
|
|
64
|
+
- preserves the goal but loses the operating constraints
|
|
65
|
+
- gives a polished explanation that no longer matches the workstream
|
|
84
66
|
|
|
85
|
-
|
|
67
|
+
Goalkeeper exists for that gap between "the goal is still known" and "the session still has its bearings."
|
|
86
68
|
|
|
87
|
-
|
|
88
|
-
node <skill-path>/src/scripts/goalkeeper-turn-start.mjs \
|
|
89
|
-
--workspace <workspace>
|
|
90
|
-
```
|
|
69
|
+
## What Codex Does
|
|
91
70
|
|
|
92
|
-
|
|
71
|
+
When the skill is active, Codex maintains a project-local continuity folder:
|
|
93
72
|
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
73
|
+
```text
|
|
74
|
+
.goalkeeper/
|
|
75
|
+
active-session
|
|
76
|
+
sessions/
|
|
77
|
+
<goal-session-id>/
|
|
78
|
+
checkpoint.md
|
|
79
|
+
context-pack.md
|
|
80
|
+
events.jsonl
|
|
98
81
|
```
|
|
99
82
|
|
|
100
|
-
|
|
83
|
+
Each file has a different job:
|
|
101
84
|
|
|
102
|
-
|
|
85
|
+
- `checkpoint.md` is the short "read this first" recovery state.
|
|
86
|
+
- `context-pack.md` preserves the reasoning chain that is too detailed for the checkpoint.
|
|
87
|
+
- `events.jsonl` records decisions, failed attempts, command evidence, verification, risks, and handoffs.
|
|
103
88
|
|
|
104
|
-
|
|
89
|
+
The active Codex goal says where the work is going. Goalkeeper preserves why this is still the right route.
|
|
105
90
|
|
|
106
|
-
|
|
107
|
-
node <skill-path>/src/scripts/goalkeeper-append-event.mjs \
|
|
108
|
-
--workspace <workspace> \
|
|
109
|
-
--type decision \
|
|
110
|
-
--text "Keep the MVP skill-only; no MCP server or background daemon."
|
|
111
|
-
```
|
|
91
|
+
## How It Works
|
|
112
92
|
|
|
113
|
-
|
|
93
|
+
Goalkeeper turns long agent work into a simple loop:
|
|
114
94
|
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
95
|
+
```text
|
|
96
|
+
Long /goal begins
|
|
97
|
+
-> Codex creates or resumes a Goalkeeper session
|
|
98
|
+
-> important constraints and decisions are recorded
|
|
99
|
+
-> failed attempts are kept so they are not repeated
|
|
100
|
+
-> verification evidence is logged when confidence changes
|
|
101
|
+
-> checkpoint.md is refreshed at meaningful boundaries
|
|
102
|
+
-> context-pack.md keeps the deeper reasoning chain
|
|
103
|
+
-> after resume, handoff, or suspected compaction, Codex reads checkpoint.md first
|
|
104
|
+
-> if the checkpoint is too thin, Codex reads context-pack.md
|
|
105
|
+
-> if exact proof is needed, Codex checks events.jsonl or source files
|
|
121
106
|
```
|
|
122
107
|
|
|
123
|
-
|
|
108
|
+
This is not transcript storage. It is working-state preservation.
|
|
124
109
|
|
|
125
|
-
|
|
126
|
-
node <skill-path>/src/scripts/goalkeeper-doctor.mjs \
|
|
127
|
-
--workspace <workspace> \
|
|
128
|
-
--session 2026-05-18-release-hardening \
|
|
129
|
-
--strict
|
|
130
|
-
```
|
|
110
|
+
## Why It Is Small On Purpose
|
|
131
111
|
|
|
132
|
-
|
|
112
|
+
The obvious version of this project is too big:
|
|
133
113
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-> context-pack.md preserves the reasoning chain
|
|
141
|
-
-> after resume or compaction, Codex reads checkpoint.md first
|
|
142
|
-
-> if needed, Codex reads context-pack.md and exact event evidence
|
|
143
|
-
```
|
|
114
|
+
- a daemon
|
|
115
|
+
- a database
|
|
116
|
+
- a session rewriter
|
|
117
|
+
- a private runtime hook
|
|
118
|
+
- a vector memory layer
|
|
119
|
+
- a full transcript engine
|
|
144
120
|
|
|
145
|
-
Goalkeeper
|
|
121
|
+
Goalkeeper intentionally avoids that.
|
|
122
|
+
|
|
123
|
+
It uses files because files are visible, reviewable, portable, and easy for agents to read after compaction. The point is not to make Codex omniscient. The point is to make the next turn start from the right state.
|
|
146
124
|
|
|
147
125
|
## What This Is Not
|
|
148
126
|
|
|
@@ -150,39 +128,42 @@ Goalkeeper does not remove compaction. It makes recovery from compaction less de
|
|
|
150
128
|
- Not an MCP server.
|
|
151
129
|
- Not a database.
|
|
152
130
|
- Not a transcript archive.
|
|
153
|
-
- Not a private runtime hook.
|
|
154
|
-
- Not a
|
|
131
|
+
- Not a private Codex runtime hook.
|
|
132
|
+
- Not a guarantee of perfect memory.
|
|
155
133
|
- Not a way to reduce compaction frequency.
|
|
156
134
|
|
|
157
|
-
Goalkeeper
|
|
158
|
-
|
|
159
|
-
## Why It Works
|
|
135
|
+
Goalkeeper improves continuity. It does not pretend to eliminate context limits.
|
|
160
136
|
|
|
161
|
-
|
|
137
|
+
## What Gets Better
|
|
162
138
|
|
|
163
|
-
Goalkeeper
|
|
139
|
+
With Goalkeeper, a resumed session has a better chance to recover:
|
|
164
140
|
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
- the next action
|
|
141
|
+
- the user's non-negotiable constraints
|
|
142
|
+
- the current implementation direction
|
|
143
|
+
- the reason rejected alternatives stayed rejected
|
|
144
|
+
- the tests or commands that changed confidence
|
|
145
|
+
- the real next action
|
|
146
|
+
- unresolved risks that should not be hand-waved away
|
|
170
147
|
|
|
171
|
-
|
|
148
|
+
That is enough to prevent many of the boring, expensive failures in long agent runs.
|
|
172
149
|
|
|
173
150
|
## Repository Layout
|
|
174
151
|
|
|
175
152
|
```text
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
153
|
+
src/codex-goalkeeper/ # installable skill payload
|
|
154
|
+
SKILL.md
|
|
155
|
+
agents/openai.yaml
|
|
156
|
+
scripts/
|
|
157
|
+
templates/
|
|
158
|
+
references/
|
|
159
|
+
tests/ # maintainer tests
|
|
181
160
|
examples/goalkeeper-session # static example state
|
|
182
161
|
docs/ # roadmap and release policy
|
|
183
162
|
```
|
|
184
163
|
|
|
185
|
-
## Validation
|
|
164
|
+
## Maintainer Validation
|
|
165
|
+
|
|
166
|
+
For repository maintainers:
|
|
186
167
|
|
|
187
168
|
```bash
|
|
188
169
|
npm run validate
|
|
@@ -191,8 +172,8 @@ npm run validate
|
|
|
191
172
|
Equivalent manual checks:
|
|
192
173
|
|
|
193
174
|
```bash
|
|
194
|
-
find src/scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check
|
|
195
|
-
node
|
|
175
|
+
find src/codex-goalkeeper/scripts tests -name '*.mjs' -print0 | xargs -0 -n1 node --check
|
|
176
|
+
node tests/test-goalkeeper-update-checkpoint.mjs
|
|
196
177
|
npx skills add . --list
|
|
197
178
|
```
|
|
198
179
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,196 +1,203 @@
|
|
|
1
1
|
# Codex Goalkeeper
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
长时间 Codex 任务通常不是突然失败的。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
它们会慢慢偏离方向。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Agent 仍然会显得很自信。测试仍然会运行。计划看起来也仍然合理。但经过多次 compaction、handoff 和 resume 之后,最重要的东西可能会悄悄变模糊:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
2. 保存 compaction 后仍然需要保留的推理链。
|
|
11
|
-
3. 把决策、失败和验证结果记录为事件。
|
|
12
|
-
4. 继续工作前先读取 checkpoint。
|
|
9
|
+
> 我们为什么要按这个方向做?
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Codex Goalkeeper 是一个很小的 skill,用来帮助 Codex 在长时间 `/goal` 工作中跨越 compaction、resume 和 handoff 仍然保持方向。
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 问题
|
|
19
|
-
|
|
20
|
-
长时间 agent 会话通常不是因为忘了某个小细节而失败,而是因为 `为什么要这样做` 变得模糊。
|
|
13
|
+
它不添加隐藏的记忆引擎。它给 agent 一个可持续的工作习惯:
|
|
21
14
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- 下一步原本应该做什么
|
|
15
|
+
- 保持一个简短 checkpoint
|
|
16
|
+
- 保持一个更丰富的 context pack
|
|
17
|
+
- 把决策和验证写入 event log
|
|
18
|
+
- 在容易发生 drift 的边界之后,继续前先读 checkpoint
|
|
27
19
|
|
|
28
|
-
|
|
20
|
+
无聊的文件。更好的连续性。
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## 它会创建什么
|
|
22
|
+
[English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md)
|
|
33
23
|
|
|
34
|
-
|
|
24
|
+
## 安装
|
|
35
25
|
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
active-session
|
|
39
|
-
sessions/
|
|
40
|
-
<goal-session-id>/
|
|
41
|
-
checkpoint.md
|
|
42
|
-
context-pack.md
|
|
43
|
-
events.jsonl
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add deltafleet/codex-goalkeeper
|
|
44
28
|
```
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
要求: Node.js 18+ 和 `npx`。在长 goal workflow 中,Codex 会使用 skill 内置的 Node helper scripts。
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
- `context-pack.md`: compaction 后仍需保留的中等密度推理上下文
|
|
50
|
-
- `events.jsonl`: 决策、失败、命令、验证、风险和 handoff 的 append-only 记录
|
|
32
|
+
然后在长任务里告诉 Codex:
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
> Use codex-goalkeeper for this `/goal`. Keep the goal, constraints, decisions, verification state, failed attempts, and next action recoverable across compaction.
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
正常使用到这里就够了。用户不需要手动执行 Goalkeeper 的 helper scripts。Codex 会把它们作为 skill workflow 的一部分来运行。
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
## 问题
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
npx skills add deltafleet/codex-goalkeeper
|
|
60
|
-
```
|
|
40
|
+
对于短任务,compaction 通常只是细节。Agent 大多能恢复。
|
|
61
41
|
|
|
62
|
-
|
|
42
|
+
但长 goal 不一样。
|
|
63
43
|
|
|
64
|
-
|
|
65
|
-
git clone https://github.com/deltafleet/codex-goalkeeper
|
|
66
|
-
cd codex-goalkeeper
|
|
67
|
-
npx skills add .
|
|
68
|
-
```
|
|
44
|
+
想象一个真实会话:
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
1. 你让 Codex 做 release hardening。
|
|
47
|
+
2. Codex 找到一个脆弱的 edge case,并选择保守路线。
|
|
48
|
+
3. 你明确拒绝了一个看起来诱人但危险的 shortcut。
|
|
49
|
+
4. 两次实现尝试因为微妙原因失败。
|
|
50
|
+
5. 一个测试终于证明了正确路线。
|
|
51
|
+
6. 上下文被 compact。
|
|
52
|
+
7. 后来 agent 带着整洁摘要回来,但当初为什么这个路线正确的压力已经变淡了。
|
|
71
53
|
|
|
72
|
-
|
|
54
|
+
drift 就从这里开始。
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
node <skill-path>/src/scripts/goalkeeper-init.mjs \
|
|
76
|
-
--workspace <workspace> \
|
|
77
|
-
--session 2026-05-18-release-hardening \
|
|
78
|
-
--goal "Ship the release without losing constraints after compaction"
|
|
79
|
-
```
|
|
56
|
+
失败原因不是“模型忘掉了一切”。这更难处理:它记得足够继续工作,但不记得足够沿着同一个方向继续。
|
|
80
57
|
|
|
81
|
-
|
|
58
|
+
你会在这些情况里看到它:
|
|
82
59
|
|
|
83
|
-
|
|
60
|
+
- 重新打开用户已经拒绝的方案
|
|
61
|
+
- 因为失败原因在摘要里消失,重复同样的尝试
|
|
62
|
+
- 把未验证的假设当作确定事实
|
|
63
|
+
- 在长 handoff 后丢失准确的 next action
|
|
64
|
+
- 还记得 goal,但丢掉了操作约束
|
|
65
|
+
- 解释很流畅,但已经不匹配实际工作流
|
|
84
66
|
|
|
85
|
-
|
|
67
|
+
Goalkeeper 解决的是这个空隙:goal 还在,但会话的方向感已经变弱。
|
|
86
68
|
|
|
87
|
-
|
|
88
|
-
node <skill-path>/src/scripts/goalkeeper-turn-start.mjs \
|
|
89
|
-
--workspace <workspace>
|
|
90
|
-
```
|
|
69
|
+
## Codex 会做什么
|
|
91
70
|
|
|
92
|
-
|
|
71
|
+
skill 激活后,Codex 会在项目内维护一个连续性文件夹:
|
|
93
72
|
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
73
|
+
```text
|
|
74
|
+
.goalkeeper/
|
|
75
|
+
active-session
|
|
76
|
+
sessions/
|
|
77
|
+
<goal-session-id>/
|
|
78
|
+
checkpoint.md
|
|
79
|
+
context-pack.md
|
|
80
|
+
events.jsonl
|
|
98
81
|
```
|
|
99
82
|
|
|
100
|
-
|
|
83
|
+
每个文件的职责不同:
|
|
101
84
|
|
|
102
|
-
|
|
85
|
+
- `checkpoint.md`: 恢复时首先读取的简短状态
|
|
86
|
+
- `context-pack.md`: 对 checkpoint 来说太长、但 compaction 后仍应保留的推理链
|
|
87
|
+
- `events.jsonl`: 决策、失败尝试、命令证据、验证、风险和 handoff 记录
|
|
103
88
|
|
|
104
|
-
|
|
89
|
+
Codex 的 active goal 说明目的地。Goalkeeper 保存为什么这条路线仍然正确。
|
|
105
90
|
|
|
106
|
-
|
|
107
|
-
node <skill-path>/src/scripts/goalkeeper-append-event.mjs \
|
|
108
|
-
--workspace <workspace> \
|
|
109
|
-
--type decision \
|
|
110
|
-
--text "Keep the MVP skill-only; no MCP server or background daemon."
|
|
111
|
-
```
|
|
91
|
+
## 工作原理
|
|
112
92
|
|
|
113
|
-
|
|
93
|
+
Goalkeeper 把长时间 agent 工作变成一个简单循环:
|
|
114
94
|
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
95
|
+
```text
|
|
96
|
+
长 /goal 开始
|
|
97
|
+
-> Codex 创建或恢复 Goalkeeper session
|
|
98
|
+
-> 记录重要约束和决策
|
|
99
|
+
-> 保留失败尝试,避免重复犯错
|
|
100
|
+
-> 在信心变化时记录验证证据
|
|
101
|
+
-> 在有意义的边界刷新 checkpoint.md
|
|
102
|
+
-> context-pack.md 保存更深的推理链
|
|
103
|
+
-> resume、handoff 或怀疑 compaction 后,Codex 先读 checkpoint.md
|
|
104
|
+
-> 如果 checkpoint 太薄,Codex 再读 context-pack.md
|
|
105
|
+
-> 如果需要精确证据,Codex 检查 events.jsonl 或 source files
|
|
121
106
|
```
|
|
122
107
|
|
|
123
|
-
|
|
108
|
+
这不是保存对话 transcript。它保存的是工作状态。
|
|
124
109
|
|
|
125
|
-
|
|
126
|
-
node <skill-path>/src/scripts/goalkeeper-doctor.mjs \
|
|
127
|
-
--workspace <workspace> \
|
|
128
|
-
--session 2026-05-18-release-hardening \
|
|
129
|
-
--strict
|
|
130
|
-
```
|
|
110
|
+
## 为什么故意做得很小
|
|
131
111
|
|
|
132
|
-
|
|
112
|
+
把这个项目做大很容易:
|
|
133
113
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-> context-pack.md 保存推理链
|
|
141
|
-
-> resume 或 compaction 后,Codex 先读取 checkpoint.md
|
|
142
|
-
-> 如有需要,再读取 context-pack.md 和事件证据
|
|
143
|
-
```
|
|
114
|
+
- daemon
|
|
115
|
+
- database
|
|
116
|
+
- session rewriter
|
|
117
|
+
- private runtime hook
|
|
118
|
+
- vector memory layer
|
|
119
|
+
- full transcript engine
|
|
144
120
|
|
|
145
|
-
Goalkeeper
|
|
121
|
+
Goalkeeper 故意避开这些。
|
|
122
|
+
|
|
123
|
+
它使用文件,因为文件可见、可审查、可移动,并且 compaction 后 agent 容易重新读取。目标不是让 Codex 全知全能。目标是让下一轮从正确状态开始。
|
|
146
124
|
|
|
147
125
|
## 它不是什么
|
|
148
126
|
|
|
149
127
|
- 不是 Codex plugin。
|
|
150
128
|
- 不是 MCP server。
|
|
151
|
-
-
|
|
129
|
+
- 不是 database。
|
|
152
130
|
- 不是完整对话 transcript 仓库。
|
|
153
|
-
- 不是 private runtime hook。
|
|
131
|
+
- 不是 private Codex runtime hook。
|
|
154
132
|
- 不保证完美记忆。
|
|
155
133
|
- 不会降低 compaction 频率。
|
|
156
134
|
|
|
157
|
-
|
|
135
|
+
Goalkeeper 改善连续性。它不假装消除上下文限制。
|
|
136
|
+
|
|
137
|
+
## 改善什么
|
|
138
|
+
|
|
139
|
+
使用 Goalkeeper 后,恢复的会话更有机会找回:
|
|
140
|
+
|
|
141
|
+
- 用户的 non-negotiable constraints
|
|
142
|
+
- 当前实现方向
|
|
143
|
+
- 被拒绝的替代方案为什么仍然应被拒绝
|
|
144
|
+
- 改变信心的测试或命令
|
|
145
|
+
- 真实的 next action
|
|
146
|
+
- 不应该被轻描淡写带过的 unresolved risks
|
|
147
|
+
|
|
148
|
+
长时间 agent 工作里很多无聊但昂贵的失败,只靠这些就能减少。
|
|
149
|
+
|
|
150
|
+
## Repository Layout
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
src/codex-goalkeeper/ # installable skill payload
|
|
154
|
+
SKILL.md
|
|
155
|
+
agents/openai.yaml
|
|
156
|
+
scripts/
|
|
157
|
+
templates/
|
|
158
|
+
references/
|
|
159
|
+
tests/ # maintainer tests
|
|
160
|
+
examples/goalkeeper-session # static example state
|
|
161
|
+
docs/ # roadmap and release policy
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Maintainer Validation
|
|
158
165
|
|
|
159
|
-
|
|
166
|
+
For repository maintainers:
|
|
160
167
|
|
|
161
168
|
```bash
|
|
162
169
|
npm run validate
|
|
163
170
|
```
|
|
164
171
|
|
|
165
|
-
|
|
172
|
+
Equivalent manual checks:
|
|
166
173
|
|
|
167
174
|
```bash
|
|
168
|
-
find src/scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check
|
|
169
|
-
node
|
|
175
|
+
find src/codex-goalkeeper/scripts tests -name '*.mjs' -print0 | xargs -0 -n1 node --check
|
|
176
|
+
node tests/test-goalkeeper-update-checkpoint.mjs
|
|
170
177
|
npx skills add . --list
|
|
171
178
|
```
|
|
172
179
|
|
|
173
|
-
##
|
|
180
|
+
## Versioning
|
|
174
181
|
|
|
175
|
-
Goalkeeper
|
|
182
|
+
Goalkeeper uses SemVer.
|
|
176
183
|
|
|
177
|
-
- Patch:
|
|
178
|
-
- Minor:
|
|
179
|
-
- Major: checkpoint
|
|
184
|
+
- Patch: docs, examples, tests, and compatible bug fixes
|
|
185
|
+
- Minor: new compatible helpers or workflow fields
|
|
186
|
+
- Major: breaking changes to checkpoint, event, or script contracts
|
|
180
187
|
|
|
181
|
-
|
|
188
|
+
See [docs/RELEASE.md](docs/RELEASE.md) for release steps.
|
|
182
189
|
|
|
183
|
-
##
|
|
190
|
+
## Contributing
|
|
184
191
|
|
|
185
|
-
|
|
192
|
+
Issues and PRs are welcome. The project bias is strict:
|
|
186
193
|
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
194
|
+
- keep the core workflow small
|
|
195
|
+
- do not add hidden runtime dependencies
|
|
196
|
+
- do not promise perfect recovery
|
|
197
|
+
- prefer project-local files over global state
|
|
198
|
+
- prove changes with the validation commands above
|
|
192
199
|
|
|
193
|
-
|
|
200
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
194
201
|
|
|
195
202
|
## License
|
|
196
203
|
|
package/docs/RELEASE.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Codex Goalkeeper is released as a GitHub repository and optional npm package.
|
|
4
4
|
|
|
5
|
-
The skill source of truth is
|
|
5
|
+
The installable skill source of truth is:
|
|
6
6
|
|
|
7
|
-
- `SKILL.md`
|
|
8
|
-
- `agents/openai.yaml`
|
|
9
|
-
- `src/`
|
|
7
|
+
- `src/codex-goalkeeper/SKILL.md`
|
|
8
|
+
- `src/codex-goalkeeper/agents/openai.yaml`
|
|
9
|
+
- `src/codex-goalkeeper/scripts/`
|
|
10
|
+
- `src/codex-goalkeeper/references/`
|
|
11
|
+
- `src/codex-goalkeeper/templates/`
|
|
10
12
|
- `examples/`
|
|
11
13
|
- `docs/`
|
|
12
14
|
|