@christang/keel 5.172.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 +5 -6
- package/README.zh-CN.md +3 -5
- package/assets/bootstrap/AGENTS.md +1 -1
- package/assets/openspec/schemas/keel-spec-driven/templates/tasks.md +5 -5
- package/bin/keel.js +9 -176
- 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/scripts/validate_plugin.py +90 -2446
- 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
|
@@ -487,11 +487,10 @@ the words Keel states criteria in, so a tier can only ever skip a file that deci
|
|
|
487
487
|
what to skip is a declaration rather than the agent's own call on purpose — "do I need this help?" is
|
|
488
488
|
the judgement a weak executor gets most wrong, and it would be answering it about itself.
|
|
489
489
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
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.
|
|
495
494
|
|
|
496
495
|
## How the agent uses these
|
|
497
496
|
|
|
@@ -785,7 +784,7 @@ keel agents codex # its template, sandboxes, where it sends data,
|
|
|
785
784
|
keel agents brief codex --mode helper --dir . --out /tmp/brief.md --change <c> --task <t>
|
|
786
785
|
```
|
|
787
786
|
|
|
788
|
-
`keel agents brief` compiles
|
|
787
|
+
`keel agents brief` compiles a brief from the selected task's capsule, writes
|
|
789
788
|
it to a file, and prints the command to run, which writes the agent's exit status to a `.exit` file
|
|
790
789
|
beside its result. **Keel launches nothing**; the session runs it, and re-runs every check before
|
|
791
790
|
anything counts as evidence. It refuses:
|
package/README.zh-CN.md
CHANGED
|
@@ -220,7 +220,7 @@ keel agents codex # 命令模板、沙箱、数据发往哪里、
|
|
|
220
220
|
keel agents brief codex --mode helper --dir . --out /tmp/brief.md --change <c> --task <t>
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
`keel agents brief`
|
|
223
|
+
`keel agents brief` 从选中任务的 capsule 编译任务说明,写成文件,
|
|
224
224
|
再打印要跑的命令;这条命令会把 agent 的退出码写进结果旁边的 `.exit` 文件。**Keel 不启动任何进程**:命令由会话自己跑,对方交回的结果要由会话复跑每个检查后才算证据。
|
|
225
225
|
以下情况会被拒绝:
|
|
226
226
|
|
|
@@ -273,7 +273,6 @@ keel guard status --json
|
|
|
273
273
|
keel guard clear --json
|
|
274
274
|
|
|
275
275
|
# 一次性原生投影(只读视图,永不是权威)
|
|
276
|
-
keel project tasks --target claude [--change <c>] [--json]
|
|
277
276
|
keel project --target codex --event compaction --json
|
|
278
277
|
|
|
279
278
|
# 会话之间的群聊(接 Slack 见 docs/chat-slack-setup.zh-CN.md)
|
|
@@ -312,9 +311,8 @@ Touch 是唯一写权限来源。通过的 `keel gate task-start` 默认写入
|
|
|
312
311
|
|
|
313
312
|
### 一次性投影
|
|
314
313
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
`keel project --target codex --event compaction --json`。
|
|
314
|
+
compaction 后可手动重注入:`keel project --target codex --event compaction --json`。
|
|
315
|
+
宿主自带的任务列表、/goal 和 subagent 由模型自己决定用不用,Keel 不再为它们生成投影(#414)。
|
|
318
316
|
|
|
319
317
|
## 对齐与技能纪律
|
|
320
318
|
|
|
@@ -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,
|
|
@@ -101,8 +87,7 @@ const HELP = `keel ${PACKAGE_JSON.version}
|
|
|
101
87
|
Usage:
|
|
102
88
|
keel context [repo] [--change name] [--task id] [--json] [--clear-handoff]
|
|
103
89
|
keel capabilities [repo] [--target claude|codex|opencode] [--json]
|
|
104
|
-
keel project
|
|
105
|
-
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]
|
|
106
91
|
keel gate task-start|task-complete [repo] [--change name] [--task id] [--base git-ref] [--no-guard] [--record] [--keep-evidence M1,M3] [--json]
|
|
107
92
|
keel gate change-close [repo] [--change name] --action sync|archive [--base git-ref] [--json]
|
|
108
93
|
keel guard start|status|clear [repo] [--change name] [--task id] [--force] [--json]
|
|
@@ -212,19 +197,8 @@ function parseArgs(argv) {
|
|
|
212
197
|
openspecArgs: [],
|
|
213
198
|
force: false,
|
|
214
199
|
projectionEvent: null,
|
|
215
|
-
subagentMode: null,
|
|
216
|
-
authorizations: [],
|
|
217
200
|
expectedOwner: null,
|
|
218
|
-
nativeComplete: false,
|
|
219
201
|
projectSubcommand: null,
|
|
220
|
-
expectedFingerprint: null,
|
|
221
|
-
helperQuestion: null,
|
|
222
|
-
helperCommand: null,
|
|
223
|
-
helperReads: [],
|
|
224
|
-
helperExternal: [],
|
|
225
|
-
helperVerify: false,
|
|
226
|
-
helperCaptureBaseline: false,
|
|
227
|
-
helperBaseline: null,
|
|
228
202
|
};
|
|
229
203
|
|
|
230
204
|
for (let index = 0; index < argv.length; index += 1) {
|
|
@@ -353,72 +327,16 @@ function parseArgs(argv) {
|
|
|
353
327
|
parsed[key] = argv[index];
|
|
354
328
|
continue;
|
|
355
329
|
}
|
|
356
|
-
if (arg === "--event" || arg === "--
|
|
330
|
+
if (arg === "--event" || arg === "--expected-owner") {
|
|
357
331
|
index += 1;
|
|
358
332
|
if (index >= argv.length) {
|
|
359
333
|
fail(`${arg} requires a value`);
|
|
360
334
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
parsed.authorizations.push(argv[index]);
|
|
364
|
-
}
|
|
365
|
-
} else {
|
|
366
|
-
const key = arg === "--event" ? "projectionEvent"
|
|
367
|
-
: arg === "--subagent-mode" ? "subagentMode" : "expectedOwner";
|
|
368
|
-
if (parsed[key] !== null) fail(`${arg} was provided more than once`);
|
|
369
|
-
parsed[key] = argv[index];
|
|
370
|
-
}
|
|
371
|
-
continue;
|
|
372
|
-
}
|
|
373
|
-
if (arg === "--native-complete") {
|
|
374
|
-
parsed.nativeComplete = true;
|
|
375
|
-
continue;
|
|
376
|
-
}
|
|
377
|
-
if (arg === "--expected-fingerprint") {
|
|
378
|
-
index += 1;
|
|
379
|
-
if (index >= argv.length) {
|
|
380
|
-
fail("--expected-fingerprint requires a value");
|
|
381
|
-
}
|
|
382
|
-
if (parsed.expectedFingerprint !== null) {
|
|
383
|
-
fail("--expected-fingerprint was provided more than once");
|
|
384
|
-
}
|
|
385
|
-
parsed.expectedFingerprint = argv[index];
|
|
386
|
-
continue;
|
|
387
|
-
}
|
|
388
|
-
if (arg === "--brief" || arg === "--command" || arg === "--baseline") {
|
|
389
|
-
index += 1;
|
|
390
|
-
if (index >= argv.length) {
|
|
391
|
-
fail(`${arg} requires a value`);
|
|
392
|
-
}
|
|
393
|
-
const key =
|
|
394
|
-
arg === "--brief"
|
|
395
|
-
? "helperQuestion"
|
|
396
|
-
: arg === "--command"
|
|
397
|
-
? "helperCommand"
|
|
398
|
-
: "helperBaseline";
|
|
399
|
-
if (parsed[key] !== null) {
|
|
400
|
-
fail(`${arg} was provided more than once`);
|
|
401
|
-
}
|
|
335
|
+
const key = arg === "--event" ? "projectionEvent" : "expectedOwner";
|
|
336
|
+
if (parsed[key] !== null) fail(`${arg} was provided more than once`);
|
|
402
337
|
parsed[key] = argv[index];
|
|
403
338
|
continue;
|
|
404
339
|
}
|
|
405
|
-
if (arg === "--read" || arg === "--external") {
|
|
406
|
-
index += 1;
|
|
407
|
-
if (index >= argv.length) {
|
|
408
|
-
fail(`${arg} requires a value`);
|
|
409
|
-
}
|
|
410
|
-
const key = arg === "--read" ? "helperReads" : "helperExternal";
|
|
411
|
-
parsed[key].push(argv[index]);
|
|
412
|
-
continue;
|
|
413
|
-
}
|
|
414
|
-
if (arg === "--verify") {
|
|
415
|
-
parsed.helperVerify = true;
|
|
416
|
-
continue;
|
|
417
|
-
}
|
|
418
|
-
if (arg === "--capture-baseline") {
|
|
419
|
-
parsed.helperCaptureBaseline = true;
|
|
420
|
-
continue;
|
|
421
|
-
}
|
|
422
340
|
if (arg.startsWith("--change=") || arg.startsWith("--task=")) {
|
|
423
341
|
const key = arg.startsWith("--change=") ? "change" : "task";
|
|
424
342
|
if (parsed[key] !== null) {
|
|
@@ -542,9 +460,7 @@ function parseArgs(argv) {
|
|
|
542
460
|
|| parsed.closeAction !== null
|
|
543
461
|
|| parsed.base !== null
|
|
544
462
|
|| parsed.projectionEvent !== null
|
|
545
|
-
|| parsed.authorizations.length > 0
|
|
546
463
|
|| parsed.expectedOwner !== null
|
|
547
|
-
|| parsed.nativeComplete
|
|
548
464
|
)
|
|
549
465
|
) {
|
|
550
466
|
fail("selection and JSON options apply only to keel context or keel gate");
|
|
@@ -552,13 +468,6 @@ function parseArgs(argv) {
|
|
|
552
468
|
if (parsed.action !== "context" && parsed.clearHandoff) {
|
|
553
469
|
fail("--clear-handoff applies only to keel context");
|
|
554
470
|
}
|
|
555
|
-
if (parsed.subagentMode !== null && (
|
|
556
|
-
parsed.action !== "project" || parsed.projectSubcommand !== null
|
|
557
|
-
|| !["subagent-start", "subagent-stop"].includes(parsed.projectionEvent)
|
|
558
|
-
|| !["helper", "implementation"].includes(parsed.subagentMode)
|
|
559
|
-
)) {
|
|
560
|
-
fail("--subagent-mode helper|implementation applies only to subagent lifecycle projection");
|
|
561
|
-
}
|
|
562
471
|
if (
|
|
563
472
|
parsed.action === "capabilities"
|
|
564
473
|
&& (
|
|
@@ -574,9 +483,7 @@ function parseArgs(argv) {
|
|
|
574
483
|
parsed.action !== "project"
|
|
575
484
|
&& (
|
|
576
485
|
parsed.projectionEvent !== null
|
|
577
|
-
|| parsed.authorizations.length > 0
|
|
578
486
|
|| parsed.expectedOwner !== null
|
|
579
|
-
|| parsed.nativeComplete
|
|
580
487
|
)
|
|
581
488
|
) {
|
|
582
489
|
fail("projection options apply only to keel project");
|
|
@@ -634,47 +541,13 @@ function parseArgs(argv) {
|
|
|
634
541
|
if (parsed.record && parsed.action !== "gate") {
|
|
635
542
|
fail("--record applies only to keel gate task-start");
|
|
636
543
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
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.
|
|
640
547
|
if (parsed.action === "project" && parsed.projectSubcommand !== null) {
|
|
641
|
-
if (!["goal", "helper", "tasks"].includes(parsed.projectSubcommand)) {
|
|
642
|
-
fail(
|
|
643
|
-
`unknown project subcommand: ${parsed.projectSubcommand}; `
|
|
644
|
-
+ "only keel project goal, keel project helper, and keel project "
|
|
645
|
-
+ "tasks are supported"
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
if (
|
|
649
|
-
parsed.projectionEvent !== null
|
|
650
|
-
|| parsed.authorizations.length > 0
|
|
651
|
-
|| parsed.nativeComplete
|
|
652
|
-
) {
|
|
653
|
-
fail(
|
|
654
|
-
"keel project goal/helper/tasks do not take --event, --authorize, or "
|
|
655
|
-
+ "--native-complete; those apply only to keel project without a "
|
|
656
|
-
+ "subcommand"
|
|
657
|
-
);
|
|
658
|
-
}
|
|
659
|
-
if (parsed.projectSubcommand === "tasks" && parsed.task !== null) {
|
|
660
|
-
fail(
|
|
661
|
-
"keel project tasks projects a whole change checklist; "
|
|
662
|
-
+ "--task is not supported"
|
|
663
|
-
);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
const helperFlagsUsed =
|
|
667
|
-
parsed.helperQuestion !== null
|
|
668
|
-
|| parsed.helperCommand !== null
|
|
669
|
-
|| parsed.helperReads.length > 0
|
|
670
|
-
|| parsed.helperExternal.length > 0
|
|
671
|
-
|| parsed.helperVerify
|
|
672
|
-
|| parsed.helperCaptureBaseline
|
|
673
|
-
|| parsed.helperBaseline !== null;
|
|
674
|
-
if (helperFlagsUsed && parsed.projectSubcommand !== "helper") {
|
|
675
548
|
fail(
|
|
676
|
-
|
|
677
|
-
+ "
|
|
549
|
+
`unknown project subcommand: ${parsed.projectSubcommand}; keel project `
|
|
550
|
+
+ "takes only --event startup|resume|compaction|worktree"
|
|
678
551
|
);
|
|
679
552
|
}
|
|
680
553
|
|
|
@@ -2921,46 +2794,6 @@ function runAction(options) {
|
|
|
2921
2794
|
fail("project requires --change when --task is provided");
|
|
2922
2795
|
}
|
|
2923
2796
|
const repo = path.resolve(options.repo || process.cwd());
|
|
2924
|
-
if (options.projectSubcommand === "goal") {
|
|
2925
|
-
const result = compileGoalProjection(repo, options);
|
|
2926
|
-
process.stdout.write(
|
|
2927
|
-
options.json
|
|
2928
|
-
? `${JSON.stringify(result, null, 2)}\n`
|
|
2929
|
-
: renderGoalProjection(result)
|
|
2930
|
-
);
|
|
2931
|
-
return result.status === "ready" ? 0 : 3;
|
|
2932
|
-
}
|
|
2933
|
-
if (options.projectSubcommand === "tasks") {
|
|
2934
|
-
const result = compileTasksView(repo, options);
|
|
2935
|
-
process.stdout.write(
|
|
2936
|
-
options.json
|
|
2937
|
-
? `${JSON.stringify(result, null, 2)}\n`
|
|
2938
|
-
: renderTasksView(result)
|
|
2939
|
-
);
|
|
2940
|
-
return result.status === "ready" ? 0 : 3;
|
|
2941
|
-
}
|
|
2942
|
-
if (options.projectSubcommand === "helper") {
|
|
2943
|
-
let result;
|
|
2944
|
-
try {
|
|
2945
|
-
if (options.helperCaptureBaseline) {
|
|
2946
|
-
result = captureHelperBaseline(repo, options);
|
|
2947
|
-
} else if (options.helperVerify) {
|
|
2948
|
-
result = verifyHelperEvidence(repo, options);
|
|
2949
|
-
} else {
|
|
2950
|
-
result = compileHelperBrief(repo, options);
|
|
2951
|
-
}
|
|
2952
|
-
} catch (error) {
|
|
2953
|
-
process.stderr.write(`keel: helper input error: ${error.message}\n`);
|
|
2954
|
-
return 1;
|
|
2955
|
-
}
|
|
2956
|
-
process.stdout.write(
|
|
2957
|
-
options.json
|
|
2958
|
-
? `${JSON.stringify(result, null, 2)}\n`
|
|
2959
|
-
: renderHelper(result)
|
|
2960
|
-
);
|
|
2961
|
-
const okStates = ["ready", "verified", "captured"];
|
|
2962
|
-
return okStates.includes(result.status) ? 0 : 3;
|
|
2963
|
-
}
|
|
2964
2797
|
let result;
|
|
2965
2798
|
try {
|
|
2966
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 = [];
|