@christang/keel 5.171.0 → 5.173.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/.claude-plugin/plugin.json +1 -4
- package/README.md +16 -21
- package/README.zh-CN.md +7 -11
- package/assets/bootstrap/AGENTS.md +3 -3
- package/assets/openspec/schemas/keel-spec-driven/schema.yaml +5 -6
- package/assets/openspec/schemas/keel-spec-driven/templates/tasks.md +5 -5
- package/bin/keel.js +24 -201
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/plugins/keel/.claude-plugin/plugin.json +1 -1
- package/plugins/keel/.codex-plugin/plugin.json +1 -2
- package/plugins/keel/scripts/pretooluse-guard.js +3 -4
- package/plugins/keel/skills/keel-align-expectations/SKILL.md +1 -1
- package/plugins/keel/skills/keel-debug-failure/SKILL.md +8 -8
- package/plugins/keel/skills/keel-handoff/SKILL.md +1 -1
- package/plugins/keel/skills/keel-review-checklist/SKILL.md +1 -1
- package/plugins/keel/skills/keel-tdd-or-test-first/SKILL.md +1 -1
- package/scripts/validate_plugin.py +222 -2496
- package/src/core/agents.js +57 -12
- package/src/core/capabilities.js +0 -53
- package/src/core/config.js +4 -37
- package/src/core/projection.js +42 -149
- package/src/core/task-contract.js +3 -30
- package/plugins/keel/agents/keel-single-task-goal-claude.md +0 -17
- package/plugins/keel/agents/keel-single-task-goal-codex.md +0 -16
- package/plugins/keel/skills/keel-run-single-task-goal/SKILL.md +0 -64
- package/plugins/keel/skills/keel-run-single-task-goal/guidance.md +0 -30
- package/src/core/goal.js +0 -242
- package/src/core/helper.js +0 -345
- package/src/core/tasksview.js +0 -123
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.173.0",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
"skills": [
|
|
18
18
|
"./plugins/keel/skills/"
|
|
19
19
|
],
|
|
20
|
-
"agents": [
|
|
21
|
-
"./plugins/keel/agents/keel-single-task-goal-claude.md"
|
|
22
|
-
],
|
|
23
20
|
"commands": [
|
|
24
21
|
"./plugins/keel/commands/shift.md"
|
|
25
22
|
],
|
package/README.md
CHANGED
|
@@ -174,14 +174,10 @@ successful update, Keel restores its overlays for every target installed in the
|
|
|
174
174
|
repository. `keel --doctor` also reports overlay health for the other installed
|
|
175
175
|
targets, so healthy Claude coverage cannot hide missing Codex overlays.
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
`
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
task and a matching active guard, while `delegation.tier` is optional metadata.
|
|
182
|
-
The current agent reviews returns, re-runs verification, and owns completion.
|
|
183
|
-
This CLI projects a brief; it does not spawn an agent or prove hook enforcement.
|
|
184
|
-
Native goal activation still requires explicit authorization.
|
|
177
|
+
A subagent is the model's choice and is treated as the main agent is: the gates, the
|
|
178
|
+
`Touch` write guard, and the evidence rules apply to whoever runs a step. Keel asks for
|
|
179
|
+
no brief, activation, or second agent's rerun before one acts, and does not nudge the
|
|
180
|
+
model toward or away from using one (#414).
|
|
185
181
|
|
|
186
182
|
Do the spec work through OpenSpec's commands (`/opsx:propose`, `/opsx:apply`, `/opsx:sync`,
|
|
187
183
|
`/opsx:archive`). Keel's gates run at the task boundaries. The whole loop:
|
|
@@ -219,13 +215,13 @@ A task that authors no `Autonomy boundary:` inherits the declaration, and the co
|
|
|
219
215
|
names `keel/config.yaml` as that entry's source so an inherited authorization is never mistaken
|
|
220
216
|
for one the task decided. A task that authors its own boundary keeps it.
|
|
221
217
|
|
|
222
|
-
`continuation`, the fifth name, is
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
218
|
+
`continuation`, the fifth name, is accepted and changes nothing. Moving from a durably complete
|
|
219
|
+
task to the next unchecked task of the same change, inside a change whose `tasks.md` you approved,
|
|
220
|
+
needs no confirmation by default (#414). The next task still starts through `keel gate task-start`
|
|
221
|
+
with its own recorded fingerprint, every gate, evidence requirement, semantic Review, and the write
|
|
222
|
+
guard run unchanged, and a stop with its own trigger — a blocker, fingerprint drift, an out-of-scope
|
|
223
|
+
need, an unresolved question — still stops. Continuing authorizes no repository action and
|
|
224
|
+
schedules nothing. On an older Keel
|
|
229
225
|
whose vocabulary predates the word, the entry is unrecognized and the whole declaration authorizes
|
|
230
226
|
nothing until corrected — fail-closed, never a silent grant.
|
|
231
227
|
|
|
@@ -491,11 +487,10 @@ the words Keel states criteria in, so a tier can only ever skip a file that deci
|
|
|
491
487
|
what to skip is a declaration rather than the agent's own call on purpose — "do I need this help?" is
|
|
492
488
|
the judgement a weak executor gets most wrong, and it would be answering it about itself.
|
|
493
489
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
the half that has to stay.
|
|
490
|
+
One skill carries a guidance file today: `keel-tdd-or-test-first`, a table that picks a Verify
|
|
491
|
+
strategy by what would make the Acceptance false, with right and wrong choices and when each evidence
|
|
492
|
+
form pays (#389). The other four are almost entirely criteria, so splitting them would move the half
|
|
493
|
+
that has to stay.
|
|
499
494
|
|
|
500
495
|
## How the agent uses these
|
|
501
496
|
|
|
@@ -789,7 +784,7 @@ keel agents codex # its template, sandboxes, where it sends data,
|
|
|
789
784
|
keel agents brief codex --mode helper --dir . --out /tmp/brief.md --change <c> --task <t>
|
|
790
785
|
```
|
|
791
786
|
|
|
792
|
-
`keel agents brief` compiles
|
|
787
|
+
`keel agents brief` compiles a brief from the selected task's capsule, writes
|
|
793
788
|
it to a file, and prints the command to run, which writes the agent's exit status to a `.exit` file
|
|
794
789
|
beside its result. **Keel launches nothing**; the session runs it, and re-runs every check before
|
|
795
790
|
anything counts as evidence. It refuses:
|
package/README.zh-CN.md
CHANGED
|
@@ -144,12 +144,10 @@ keel --doctor # 检查各部分是否就位
|
|
|
144
144
|
中所有已安装的 target 恢复 overlay。`keel --doctor` 也会逐项报告其他已安装 target 的
|
|
145
145
|
overlay 状态,避免 Claude 检查正常时漏掉 Codex 的缺失。
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
只是可选能力元数据。主 agent 审查返回结果、独立重跑验证并负责完成判定。CLI 只生成
|
|
152
|
-
brief,不启动 agent,也不证明 hook 实际执行;native goal 仍须明确授权激活。
|
|
147
|
+
用不用 subagent 由模型自己决定,subagent 与主 agent 同等对待:门禁、`Touch` 写入
|
|
148
|
+
guard 和证据规则对谁执行都一样。Keel 不要求 brief、额外激活或另一个 agent 复跑,
|
|
149
|
+
也不鼓励或劝阻使用(#414)。在已批准的 `tasks.md` 里,默认按顺序一个接一个做下去,
|
|
150
|
+
每个任务照样过 `keel gate task-start` 与 `keel gate task-complete`,遇到停止条件照样停。
|
|
153
151
|
|
|
154
152
|
spec 相关的活走 OpenSpec 的命令(`/opsx:propose`、`/opsx:apply`、`/opsx:sync`、`/opsx:archive`),
|
|
155
153
|
Keel 的门禁在任务边界处运行。整个回路:
|
|
@@ -222,7 +220,7 @@ keel agents codex # 命令模板、沙箱、数据发往哪里、
|
|
|
222
220
|
keel agents brief codex --mode helper --dir . --out /tmp/brief.md --change <c> --task <t>
|
|
223
221
|
```
|
|
224
222
|
|
|
225
|
-
`keel agents brief`
|
|
223
|
+
`keel agents brief` 从选中任务的 capsule 编译任务说明,写成文件,
|
|
226
224
|
再打印要跑的命令;这条命令会把 agent 的退出码写进结果旁边的 `.exit` 文件。**Keel 不启动任何进程**:命令由会话自己跑,对方交回的结果要由会话复跑每个检查后才算证据。
|
|
227
225
|
以下情况会被拒绝:
|
|
228
226
|
|
|
@@ -275,7 +273,6 @@ keel guard status --json
|
|
|
275
273
|
keel guard clear --json
|
|
276
274
|
|
|
277
275
|
# 一次性原生投影(只读视图,永不是权威)
|
|
278
|
-
keel project tasks --target claude [--change <c>] [--json]
|
|
279
276
|
keel project --target codex --event compaction --json
|
|
280
277
|
|
|
281
278
|
# 会话之间的群聊(接 Slack 见 docs/chat-slack-setup.zh-CN.md)
|
|
@@ -314,9 +311,8 @@ Touch 是唯一写权限来源。通过的 `keel gate task-start` 默认写入
|
|
|
314
311
|
|
|
315
312
|
### 一次性投影
|
|
316
313
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
`keel project --target codex --event compaction --json`。
|
|
314
|
+
compaction 后可手动重注入:`keel project --target codex --event compaction --json`。
|
|
315
|
+
宿主自带的任务列表、/goal 和 subagent 由模型自己决定用不用,Keel 不再为它们生成投影(#414)。
|
|
320
316
|
|
|
321
317
|
## 对齐与技能纪律
|
|
322
318
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<!-- keel:start version=5.
|
|
1
|
+
<!-- keel:start version=5.173.0 -->
|
|
2
2
|
## Keel Bootstrap
|
|
3
3
|
|
|
4
|
-
- Start every session with `keel context`; OpenSpec artifacts and Git are the
|
|
4
|
+
- Start every session with `keel context`; OpenSpec artifacts and Git are the durable authority, and memory or transcripts may only inform.
|
|
5
5
|
- Obey the selected task capsule: `keel gate task-start` before implementing, `--record` its fingerprint to Evidence `Contract`, which `task-complete` requires, before checking complete. Touch bounds product writes; the change's own dir is exempt. On Claude a passing `task-start` guards it by default (`--no-guard` opts out).
|
|
6
|
-
-
|
|
6
|
+
- Work through an approved `tasks.md` in order, each task through its own gates. A subagent is the model's choice and is treated as the main agent is. No commit, sync, or archive without explicit authorization.
|
|
7
7
|
- Route Full (the OpenSpec flow) for new features, interface or protocol changes, cross-module work, or over ~3 files / 100 lines; Lite for local fixes with no interface change. No gate checks routing; a project corrects the size bar with `full_mode_paths:` in `keel/config.yaml`, which `keel context` reports.
|
|
8
8
|
- Native plugin projections (SessionStart context) are disposable views, never authority; without the plugin or hook, run the commands manually.
|
|
9
9
|
- Keel skills and hooks come from the `keel` native plugin (`codex plugin add` / `claude plugin install`); `keel --init` owns only the OpenSpec schema, overlays, and this bootstrap.
|
|
@@ -122,10 +122,9 @@ artifacts:
|
|
|
122
122
|
required real-task evidence. Portable source authority and declared target
|
|
123
123
|
projections must also be named when they affect Touch or Commands.
|
|
124
124
|
|
|
125
|
-
Execution recommendation and Rationale are advisory notes for
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
implementation delegates are model choices, subject to host policy.
|
|
125
|
+
Execution recommendation and Rationale are advisory notes for whoever
|
|
126
|
+
executes the task. A subagent is the model's choice and is treated as the
|
|
127
|
+
main agent is; the gates and the `Touch` write guard bind every step.
|
|
129
128
|
Autonomy boundary defaults to hard-stop for every action the repository
|
|
130
129
|
has not standing-authorized in `keel/config.yaml`; a declared action is
|
|
131
130
|
inherited only by a task that authored no boundary of its own, and the
|
|
@@ -192,8 +191,8 @@ apply:
|
|
|
192
191
|
4. Run the Slice Start Gate: every selected current slice must name source expectations and compile to a complete keel-task-capsule/v1 contract from its compact Covers, Touch, Verify, and Evidence fields plus any declared exceptional Mode, Read, Acceptance delta, Autonomy boundary, Coupling/Candidate Boundary, or Stop if clauses.
|
|
193
192
|
5. If a selected task lacks an execution contract, source expectations, or accepted hidden-knowledge assumptions raised by risk-triggered deep alignment or a domain lens, update OpenSpec first instead of dispatching implementation.
|
|
194
193
|
6. Rough future slices may remain non-executable drafts, but they cannot be selected for implementation or marked complete.
|
|
195
|
-
7.
|
|
196
|
-
8.
|
|
194
|
+
7. Treat any Execution recommendation as an advisory implementation note, not as a completion gate.
|
|
195
|
+
8. Work through the unchecked tasks of an approved `tasks.md` in order, each through its own `keel gate task-start` and `keel gate task-complete`; every stop trigger still halts. A subagent is the model's choice and is treated as the main agent is.
|
|
197
196
|
9. Use the current checkout and selected task contract. Verification failure or context pressure preserves the checkout; continue from evidence, record a blocker, or explicitly roll back to last-green only when authorized.
|
|
198
197
|
10. When `Coupling: required`, verify design.md contains a Coupled Iteration Contract and that the task defines a complete candidate, completion gate, and evidence. If not, update OpenSpec instead of execution.
|
|
199
198
|
11. The current agent may read any repository file needed for the selected task, but repository-wide read authority is read-only and does not expand write authority.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Record only task-specific authority. Omitted fields inherit versioned
|
|
3
3
|
defaults: Owner is the current Keel agent, Mode is implementation, Read
|
|
4
4
|
is the change proposal/design/specs/tasks plus discovered repository
|
|
5
|
-
context, Acceptance derives from Covers, Coupling defaults to none,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
commit, push, sync,
|
|
5
|
+
context, Acceptance derives from Covers, Coupling defaults to none, and a
|
|
6
|
+
subagent is the model's choice, treated as the main agent is. The next
|
|
7
|
+
task of an approved list follows without a confirmation, each through its
|
|
8
|
+
own gates. Autonomy defaults to hard-stop, and
|
|
9
|
+
commit, push, sync, and archive stay unauthorized,
|
|
10
10
|
EXCEPT where `keel/config.yaml` standing-authorizes an action: a task that
|
|
11
11
|
authors no `Autonomy boundary:` inherits that declaration, and the capsule
|
|
12
12
|
names the declaration as the entry's source. A standing authorization
|
package/bin/keel.js
CHANGED
|
@@ -23,20 +23,6 @@ const {
|
|
|
23
23
|
projectRuntime,
|
|
24
24
|
renderProjection,
|
|
25
25
|
} = require("../src/core/projection");
|
|
26
|
-
const {
|
|
27
|
-
compileGoalProjection,
|
|
28
|
-
renderGoalProjection,
|
|
29
|
-
} = require("../src/core/goal");
|
|
30
|
-
const {
|
|
31
|
-
compileHelperBrief,
|
|
32
|
-
captureHelperBaseline,
|
|
33
|
-
verifyHelperEvidence,
|
|
34
|
-
renderHelper,
|
|
35
|
-
} = require("../src/core/helper");
|
|
36
|
-
const {
|
|
37
|
-
compileTasksView,
|
|
38
|
-
renderTasksView,
|
|
39
|
-
} = require("../src/core/tasksview");
|
|
40
26
|
const {
|
|
41
27
|
GuardInputError,
|
|
42
28
|
clearGuard,
|
|
@@ -89,6 +75,10 @@ const OPENSPEC_SURFACE_OVERLAY_START =
|
|
|
89
75
|
`<!-- keel:openspec-surface-overlay version=${PACKAGE_JSON.version} -->`;
|
|
90
76
|
const OPENSPEC_SURFACE_OVERLAY_END =
|
|
91
77
|
"<!-- keel:openspec-surface-overlay:end -->";
|
|
78
|
+
// The one thing a gated surface says about subagents (#414): neither a rule
|
|
79
|
+
// nor a nudge, because the gates and the Touch guard already bind whoever runs.
|
|
80
|
+
const SUBAGENT_SENTENCE =
|
|
81
|
+
"- A subagent is the model's choice and is treated as the main agent is: the gates, the `Touch` write guard, and the evidence rules apply to whoever runs a step.";
|
|
92
82
|
const OPENSPEC_SURFACE_OVERLAY_RE =
|
|
93
83
|
/<!--\s*keel:openspec-surface-overlay(?:\s+[^>]*)?\s*-->[\s\S]*?<!--\s*keel:openspec-surface-overlay:end\s*-->/;
|
|
94
84
|
|
|
@@ -97,8 +87,7 @@ const HELP = `keel ${PACKAGE_JSON.version}
|
|
|
97
87
|
Usage:
|
|
98
88
|
keel context [repo] [--change name] [--task id] [--json] [--clear-handoff]
|
|
99
89
|
keel capabilities [repo] [--target claude|codex|opencode] [--json]
|
|
100
|
-
keel project
|
|
101
|
-
keel project tasks [repo] --target claude [--change name] [--json]
|
|
90
|
+
keel project --target claude|codex|opencode --event startup|resume|compaction|worktree [--expected-owner owner] [--change name] [--task id] [--json]
|
|
102
91
|
keel gate task-start|task-complete [repo] [--change name] [--task id] [--base git-ref] [--no-guard] [--record] [--keep-evidence M1,M3] [--json]
|
|
103
92
|
keel gate change-close [repo] [--change name] --action sync|archive [--base git-ref] [--json]
|
|
104
93
|
keel guard start|status|clear [repo] [--change name] [--task id] [--force] [--json]
|
|
@@ -208,19 +197,8 @@ function parseArgs(argv) {
|
|
|
208
197
|
openspecArgs: [],
|
|
209
198
|
force: false,
|
|
210
199
|
projectionEvent: null,
|
|
211
|
-
subagentMode: null,
|
|
212
|
-
authorizations: [],
|
|
213
200
|
expectedOwner: null,
|
|
214
|
-
nativeComplete: false,
|
|
215
201
|
projectSubcommand: null,
|
|
216
|
-
expectedFingerprint: null,
|
|
217
|
-
helperQuestion: null,
|
|
218
|
-
helperCommand: null,
|
|
219
|
-
helperReads: [],
|
|
220
|
-
helperExternal: [],
|
|
221
|
-
helperVerify: false,
|
|
222
|
-
helperCaptureBaseline: false,
|
|
223
|
-
helperBaseline: null,
|
|
224
202
|
};
|
|
225
203
|
|
|
226
204
|
for (let index = 0; index < argv.length; index += 1) {
|
|
@@ -349,72 +327,16 @@ function parseArgs(argv) {
|
|
|
349
327
|
parsed[key] = argv[index];
|
|
350
328
|
continue;
|
|
351
329
|
}
|
|
352
|
-
if (arg === "--event" || arg === "--
|
|
353
|
-
index += 1;
|
|
354
|
-
if (index >= argv.length) {
|
|
355
|
-
fail(`${arg} requires a value`);
|
|
356
|
-
}
|
|
357
|
-
if (arg === "--authorize") {
|
|
358
|
-
if (!parsed.authorizations.includes(argv[index])) {
|
|
359
|
-
parsed.authorizations.push(argv[index]);
|
|
360
|
-
}
|
|
361
|
-
} else {
|
|
362
|
-
const key = arg === "--event" ? "projectionEvent"
|
|
363
|
-
: arg === "--subagent-mode" ? "subagentMode" : "expectedOwner";
|
|
364
|
-
if (parsed[key] !== null) fail(`${arg} was provided more than once`);
|
|
365
|
-
parsed[key] = argv[index];
|
|
366
|
-
}
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
if (arg === "--native-complete") {
|
|
370
|
-
parsed.nativeComplete = true;
|
|
371
|
-
continue;
|
|
372
|
-
}
|
|
373
|
-
if (arg === "--expected-fingerprint") {
|
|
374
|
-
index += 1;
|
|
375
|
-
if (index >= argv.length) {
|
|
376
|
-
fail("--expected-fingerprint requires a value");
|
|
377
|
-
}
|
|
378
|
-
if (parsed.expectedFingerprint !== null) {
|
|
379
|
-
fail("--expected-fingerprint was provided more than once");
|
|
380
|
-
}
|
|
381
|
-
parsed.expectedFingerprint = argv[index];
|
|
382
|
-
continue;
|
|
383
|
-
}
|
|
384
|
-
if (arg === "--brief" || arg === "--command" || arg === "--baseline") {
|
|
330
|
+
if (arg === "--event" || arg === "--expected-owner") {
|
|
385
331
|
index += 1;
|
|
386
332
|
if (index >= argv.length) {
|
|
387
333
|
fail(`${arg} requires a value`);
|
|
388
334
|
}
|
|
389
|
-
const key =
|
|
390
|
-
|
|
391
|
-
? "helperQuestion"
|
|
392
|
-
: arg === "--command"
|
|
393
|
-
? "helperCommand"
|
|
394
|
-
: "helperBaseline";
|
|
395
|
-
if (parsed[key] !== null) {
|
|
396
|
-
fail(`${arg} was provided more than once`);
|
|
397
|
-
}
|
|
335
|
+
const key = arg === "--event" ? "projectionEvent" : "expectedOwner";
|
|
336
|
+
if (parsed[key] !== null) fail(`${arg} was provided more than once`);
|
|
398
337
|
parsed[key] = argv[index];
|
|
399
338
|
continue;
|
|
400
339
|
}
|
|
401
|
-
if (arg === "--read" || arg === "--external") {
|
|
402
|
-
index += 1;
|
|
403
|
-
if (index >= argv.length) {
|
|
404
|
-
fail(`${arg} requires a value`);
|
|
405
|
-
}
|
|
406
|
-
const key = arg === "--read" ? "helperReads" : "helperExternal";
|
|
407
|
-
parsed[key].push(argv[index]);
|
|
408
|
-
continue;
|
|
409
|
-
}
|
|
410
|
-
if (arg === "--verify") {
|
|
411
|
-
parsed.helperVerify = true;
|
|
412
|
-
continue;
|
|
413
|
-
}
|
|
414
|
-
if (arg === "--capture-baseline") {
|
|
415
|
-
parsed.helperCaptureBaseline = true;
|
|
416
|
-
continue;
|
|
417
|
-
}
|
|
418
340
|
if (arg.startsWith("--change=") || arg.startsWith("--task=")) {
|
|
419
341
|
const key = arg.startsWith("--change=") ? "change" : "task";
|
|
420
342
|
if (parsed[key] !== null) {
|
|
@@ -538,9 +460,7 @@ function parseArgs(argv) {
|
|
|
538
460
|
|| parsed.closeAction !== null
|
|
539
461
|
|| parsed.base !== null
|
|
540
462
|
|| parsed.projectionEvent !== null
|
|
541
|
-
|| parsed.authorizations.length > 0
|
|
542
463
|
|| parsed.expectedOwner !== null
|
|
543
|
-
|| parsed.nativeComplete
|
|
544
464
|
)
|
|
545
465
|
) {
|
|
546
466
|
fail("selection and JSON options apply only to keel context or keel gate");
|
|
@@ -548,13 +468,6 @@ function parseArgs(argv) {
|
|
|
548
468
|
if (parsed.action !== "context" && parsed.clearHandoff) {
|
|
549
469
|
fail("--clear-handoff applies only to keel context");
|
|
550
470
|
}
|
|
551
|
-
if (parsed.subagentMode !== null && (
|
|
552
|
-
parsed.action !== "project" || parsed.projectSubcommand !== null
|
|
553
|
-
|| !["subagent-start", "subagent-stop"].includes(parsed.projectionEvent)
|
|
554
|
-
|| !["helper", "implementation"].includes(parsed.subagentMode)
|
|
555
|
-
)) {
|
|
556
|
-
fail("--subagent-mode helper|implementation applies only to subagent lifecycle projection");
|
|
557
|
-
}
|
|
558
471
|
if (
|
|
559
472
|
parsed.action === "capabilities"
|
|
560
473
|
&& (
|
|
@@ -570,9 +483,7 @@ function parseArgs(argv) {
|
|
|
570
483
|
parsed.action !== "project"
|
|
571
484
|
&& (
|
|
572
485
|
parsed.projectionEvent !== null
|
|
573
|
-
|| parsed.authorizations.length > 0
|
|
574
486
|
|| parsed.expectedOwner !== null
|
|
575
|
-
|| parsed.nativeComplete
|
|
576
487
|
)
|
|
577
488
|
) {
|
|
578
489
|
fail("projection options apply only to keel project");
|
|
@@ -630,47 +541,13 @@ function parseArgs(argv) {
|
|
|
630
541
|
if (parsed.record && parsed.action !== "gate") {
|
|
631
542
|
fail("--record applies only to keel gate task-start");
|
|
632
543
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
544
|
+
// `keel project goal`, `helper`, and `tasks` were removed in 5.173.0 (#414):
|
|
545
|
+
// native goals, subagents, and task lists need no Keel projection. A word
|
|
546
|
+
// after `keel project` is refused by name rather than read as a repository.
|
|
636
547
|
if (parsed.action === "project" && parsed.projectSubcommand !== null) {
|
|
637
|
-
if (!["goal", "helper", "tasks"].includes(parsed.projectSubcommand)) {
|
|
638
|
-
fail(
|
|
639
|
-
`unknown project subcommand: ${parsed.projectSubcommand}; `
|
|
640
|
-
+ "only keel project goal, keel project helper, and keel project "
|
|
641
|
-
+ "tasks are supported"
|
|
642
|
-
);
|
|
643
|
-
}
|
|
644
|
-
if (
|
|
645
|
-
parsed.projectionEvent !== null
|
|
646
|
-
|| parsed.authorizations.length > 0
|
|
647
|
-
|| parsed.nativeComplete
|
|
648
|
-
) {
|
|
649
|
-
fail(
|
|
650
|
-
"keel project goal/helper/tasks do not take --event, --authorize, or "
|
|
651
|
-
+ "--native-complete; those apply only to keel project without a "
|
|
652
|
-
+ "subcommand"
|
|
653
|
-
);
|
|
654
|
-
}
|
|
655
|
-
if (parsed.projectSubcommand === "tasks" && parsed.task !== null) {
|
|
656
|
-
fail(
|
|
657
|
-
"keel project tasks projects a whole change checklist; "
|
|
658
|
-
+ "--task is not supported"
|
|
659
|
-
);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
const helperFlagsUsed =
|
|
663
|
-
parsed.helperQuestion !== null
|
|
664
|
-
|| parsed.helperCommand !== null
|
|
665
|
-
|| parsed.helperReads.length > 0
|
|
666
|
-
|| parsed.helperExternal.length > 0
|
|
667
|
-
|| parsed.helperVerify
|
|
668
|
-
|| parsed.helperCaptureBaseline
|
|
669
|
-
|| parsed.helperBaseline !== null;
|
|
670
|
-
if (helperFlagsUsed && parsed.projectSubcommand !== "helper") {
|
|
671
548
|
fail(
|
|
672
|
-
|
|
673
|
-
+ "
|
|
549
|
+
`unknown project subcommand: ${parsed.projectSubcommand}; keel project `
|
|
550
|
+
+ "takes only --event startup|resume|compaction|worktree"
|
|
674
551
|
);
|
|
675
552
|
}
|
|
676
553
|
|
|
@@ -1745,18 +1622,17 @@ function keelOpenSpecOverlay(action) {
|
|
|
1745
1622
|
];
|
|
1746
1623
|
return lines.join("\n");
|
|
1747
1624
|
}
|
|
1748
|
-
// Sync mirrors archive's structure and not its content: the two are gated
|
|
1749
|
-
//
|
|
1750
|
-
//
|
|
1751
|
-
//
|
|
1752
|
-
//
|
|
1753
|
-
//
|
|
1625
|
+
// Sync mirrors archive's structure and not its content: the two are gated
|
|
1626
|
+
// identically, so the gate and the subagent sentence are the same statements
|
|
1627
|
+
// with `sync` in them. What differs is the artifact consequence — archive
|
|
1628
|
+
// warns about re-applying a promoted delta, and sync is the thing that
|
|
1629
|
+
// promotes it, so it says so from its own side. A reader who only ever sees
|
|
1630
|
+
// one of the two surfaces still learns the pairing.
|
|
1754
1631
|
const syncBody = [
|
|
1755
|
-
"-
|
|
1632
|
+
"- Verify task evidence, follow-up ownership, and completion gates before syncing.",
|
|
1756
1633
|
"- Sync completion is gated by `keel gate change-close --action sync` plus `keel-review-checklist`; there is no runtime hook for it, so running the gate is the agent's own step.",
|
|
1757
1634
|
"- Before syncing, each related critical expectation must have behavior evidence, a durable follow-up owner, or an explicit discard reason.",
|
|
1758
|
-
|
|
1759
|
-
"- Do not treat generic OpenSpec sync delegation language as authority to transfer Keel ownership.",
|
|
1635
|
+
SUBAGENT_SENTENCE,
|
|
1760
1636
|
"- Invoke OpenSpec through `keel openspec` (for example `keel openspec validate`); a bare `openspec` command may not be on PATH.",
|
|
1761
1637
|
"- Syncing promotes the change's spec delta into `openspec/specs/`. A later archive of the same change must use `--skip-specs`, because archive is not idempotent over an already-promoted delta.",
|
|
1762
1638
|
];
|
|
@@ -1777,13 +1653,11 @@ function keelOpenSpecOverlay(action) {
|
|
|
1777
1653
|
const actionBody =
|
|
1778
1654
|
action === "apply"
|
|
1779
1655
|
? [
|
|
1780
|
-
"-
|
|
1656
|
+
"- Work through the unchecked tasks of an approved `tasks.md` in order, each started by `keel gate task-start` and completed by `keel gate task-complete`; every stop trigger still halts.",
|
|
1781
1657
|
"- Run the Task Authoring Gate: each relevant critical expectation must be covered by a slice, deferred to a durable owner, or explicitly discarded.",
|
|
1782
1658
|
"- Run the Slice Start Gate: selected current slices must name source expectations and include Read, Touch, Acceptance, Commands, and Stop/Autonomy boundaries before implementation.",
|
|
1783
1659
|
"- Rough future slices may remain drafts, but cannot be selected for implementation or marked complete.",
|
|
1784
1660
|
"- Obey the selected task contract: Read is required starting context, Touch is the write boundary, Commands prove Acceptance, and the Autonomy boundary controls fallback decisions.",
|
|
1785
|
-
"- A target-native helper returns report/evidence only, and a model-chosen guarded delegate may write inside `Touch`; both cannot mark tasks complete, update OpenSpec state, commit, sync, archive, or change Acceptance.",
|
|
1786
|
-
"- The current agent reviews all subagent output, command evidence, and diffs before marking any task complete.",
|
|
1787
1661
|
"- When implementation exposes a material expectation, acceptance boundary, or user-owned decision absent from durable authority, stop before implementing that choice, rerun `keel-align-expectations`, and reauthor the affected proposal/design/spec/task authority first.",
|
|
1788
1662
|
"- A discovered repository fact that does not change accepted behavior or scope may be recorded and execution continues inside the existing task boundary without a product interview.",
|
|
1789
1663
|
"- Invoke OpenSpec through `keel openspec` (for example `keel openspec validate`); a bare `openspec` command may not be on PATH.",
|
|
@@ -1791,11 +1665,8 @@ function keelOpenSpecOverlay(action) {
|
|
|
1791
1665
|
"- A standing authorization covers the action and never substitutes for a gate, evidence, or Review; it removes the confirmation, not the record, and it is not a trigger to perform the action.",
|
|
1792
1666
|
]
|
|
1793
1667
|
: [
|
|
1794
|
-
"-
|
|
1668
|
+
"- Archive completion is gated by `keel gate change-close --action archive` plus `keel-review-checklist`; verify task evidence, follow-up ownership, and completion gates before proceeding.",
|
|
1795
1669
|
"- Before final sync/archive, each related critical expectation must have behavior evidence, a durable follow-up owner, or an explicit discard reason.",
|
|
1796
|
-
"- Target-native subagents may help with bounded assessment or evidence production only; they cannot archive, sync, change acceptance, or bypass completion gates.",
|
|
1797
|
-
"- The current agent reviews any subagent report before running `openspec-sync-specs`, `/opsx:sync`, or `/opsx:archive`.",
|
|
1798
|
-
"- Do not treat generic OpenSpec archive delegation language as authority to transfer Keel ownership.",
|
|
1799
1670
|
"- Invoke OpenSpec through `keel openspec` (for example `keel openspec validate`); a bare `openspec` command may not be on PATH.",
|
|
1800
1671
|
"- When `/opsx:sync` has already promoted the change's spec delta, run the archive with `--skip-specs` so the promoted delta is not re-applied; archive is not idempotent over an already-synced delta.",
|
|
1801
1672
|
"- After archiving, run `keel guard clear` to drop the change's guard manifest; the read-only gate never clears it for you.",
|
|
@@ -1811,15 +1682,7 @@ function keelOpenSpecOverlay(action) {
|
|
|
1811
1682
|
"",
|
|
1812
1683
|
"- Invoke the OpenSpec CLI as `keel openspec …` throughout this file. The commands below are written as a bare `openspec`, which resolves only where OpenSpec is separately installed on PATH; `keel openspec` resolves either way, and `keel --doctor` reports which case this repository is.",
|
|
1813
1684
|
"",
|
|
1814
|
-
|
|
1815
|
-
"",
|
|
1816
|
-
"- The current agent remains responsible for Keel ownership, task/archive decisions, scope control, and final reporting.",
|
|
1817
|
-
"- Use a target-native subagent when the current agent decides it is useful for a bounded helper step, or as a delegate implementing the selected task using existing task write authority when a guard manifest is active and matches the task, fingerprint and Touch; optional `delegation:` tiers are metadata.",
|
|
1818
|
-
"- Target-native subagents acting as helpers return report/evidence only. A delegate may write, and only inside `Touch`; its reported command results are a claim, and the current agent re-runs each `M<n>` check itself before recording Evidence.",
|
|
1819
|
-
"- Delegation is refused with no active guard manifest, because an absent manifest passes every write through silently and looks identical to a checked one.",
|
|
1820
|
-
"- Neither may mark tasks complete, update OpenSpec state, commit, sync, archive, or change Acceptance; the current agent reviews all output before acting.",
|
|
1821
|
-
"- The subagent brief must name the selected change/task, required read context, allowed write boundary or read-only diagnostic scope, expected commands/evidence, and prohibited actions. Compile it with `keel project --event subagent-start` for a read-only helper or add `--subagent-mode implementation` for a guarded delegate; no extra user activation is required. Host policy remains authoritative; Keel adds no separate carrier because the host already has one.",
|
|
1822
|
-
"- Prohibited actions include scope expansion, Acceptance changes, completion marking, sync/archive decisions, commits, handoff changes, and cross-runtime delegation unless the selected task or user explicitly authorizes them.",
|
|
1685
|
+
SUBAGENT_SENTENCE,
|
|
1823
1686
|
...actionBody,
|
|
1824
1687
|
OPENSPEC_SURFACE_OVERLAY_END,
|
|
1825
1688
|
"",
|
|
@@ -2931,46 +2794,6 @@ function runAction(options) {
|
|
|
2931
2794
|
fail("project requires --change when --task is provided");
|
|
2932
2795
|
}
|
|
2933
2796
|
const repo = path.resolve(options.repo || process.cwd());
|
|
2934
|
-
if (options.projectSubcommand === "goal") {
|
|
2935
|
-
const result = compileGoalProjection(repo, options);
|
|
2936
|
-
process.stdout.write(
|
|
2937
|
-
options.json
|
|
2938
|
-
? `${JSON.stringify(result, null, 2)}\n`
|
|
2939
|
-
: renderGoalProjection(result)
|
|
2940
|
-
);
|
|
2941
|
-
return result.status === "ready" ? 0 : 3;
|
|
2942
|
-
}
|
|
2943
|
-
if (options.projectSubcommand === "tasks") {
|
|
2944
|
-
const result = compileTasksView(repo, options);
|
|
2945
|
-
process.stdout.write(
|
|
2946
|
-
options.json
|
|
2947
|
-
? `${JSON.stringify(result, null, 2)}\n`
|
|
2948
|
-
: renderTasksView(result)
|
|
2949
|
-
);
|
|
2950
|
-
return result.status === "ready" ? 0 : 3;
|
|
2951
|
-
}
|
|
2952
|
-
if (options.projectSubcommand === "helper") {
|
|
2953
|
-
let result;
|
|
2954
|
-
try {
|
|
2955
|
-
if (options.helperCaptureBaseline) {
|
|
2956
|
-
result = captureHelperBaseline(repo, options);
|
|
2957
|
-
} else if (options.helperVerify) {
|
|
2958
|
-
result = verifyHelperEvidence(repo, options);
|
|
2959
|
-
} else {
|
|
2960
|
-
result = compileHelperBrief(repo, options);
|
|
2961
|
-
}
|
|
2962
|
-
} catch (error) {
|
|
2963
|
-
process.stderr.write(`keel: helper input error: ${error.message}\n`);
|
|
2964
|
-
return 1;
|
|
2965
|
-
}
|
|
2966
|
-
process.stdout.write(
|
|
2967
|
-
options.json
|
|
2968
|
-
? `${JSON.stringify(result, null, 2)}\n`
|
|
2969
|
-
: renderHelper(result)
|
|
2970
|
-
);
|
|
2971
|
-
const okStates = ["ready", "verified", "captured"];
|
|
2972
|
-
return okStates.includes(result.status) ? 0 : 3;
|
|
2973
|
-
}
|
|
2974
2797
|
let result;
|
|
2975
2798
|
try {
|
|
2976
2799
|
result = projectRuntime(repo, options);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.173.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.
|
|
9
|
+
"version": "5.173.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fission-ai/openspec": "^1.4.1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.173.0",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.173.0",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
],
|
|
17
17
|
"skills": "./skills/",
|
|
18
18
|
"hooks": "./hooks/codex.json",
|
|
19
|
-
"agents": "./agents/",
|
|
20
19
|
"interface": {
|
|
21
20
|
"displayName": "Keel",
|
|
22
21
|
"shortDescription": "OpenSpec execution discipline for coding agents",
|
|
@@ -146,10 +146,9 @@ function taskIsChecked(repo, manifest) {
|
|
|
146
146
|
// nearest existing ancestor; when nothing resolves, the unresolved path is
|
|
147
147
|
// what remains, which is exactly the comparison that shipped.
|
|
148
148
|
//
|
|
149
|
-
//
|
|
150
|
-
// the
|
|
151
|
-
//
|
|
152
|
-
// the guard fail wherever the package layout differs from this repository's.
|
|
149
|
+
// It is deliberately not shared as an import: this hook is a standalone script
|
|
150
|
+
// the host executes, and depending on `src/core` would make the guard fail
|
|
151
|
+
// wherever the package layout differs from this repository's.
|
|
153
152
|
function realPathOrNearest(target) {
|
|
154
153
|
let current = path.resolve(target);
|
|
155
154
|
const trailing = [];
|
|
@@ -80,7 +80,7 @@ so the two surfaces cannot drift against each other.
|
|
|
80
80
|
|
|
81
81
|
## Domain lenses
|
|
82
82
|
|
|
83
|
-
When the change signals a specific domain, look in `keel/lenses/` for a lens whose `Applies when:` header matches, and read
|
|
83
|
+
When the change signals a specific domain, look in `keel/lenses/` for a lens whose `Applies when:` header matches, and read it before asking domain questions. When no lens matches, or the repo defines none, proceed on the domain-agnostic path. Lenses are user-authored; scaffold the bundled starting points with `keel lenses add` (web, hardware, hardware-dsl).
|
|
84
84
|
|
|
85
85
|
## Boundaries
|
|
86
86
|
|