@christang/keel 5.175.0 → 5.177.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.175.0",
3
+ "version": "5.177.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",
package/README.md CHANGED
@@ -37,9 +37,10 @@ What Keel adds:
37
37
 
38
38
  Keel leans on native capabilities rather than reinventing them. The spec workflow is plain
39
39
  OpenSpec. The execution skills, the SessionStart continuity hook, and the write-guard hook
40
- ship as an ordinary Claude Code / Codex plugin. `keel --init` writes only a small host
41
- surface into your repo: an `AGENTS.md` bootstrap block, the OpenSpec schema, and the
42
- `/opsx:*` command overlay.
40
+ ship as an ordinary Claude Code / Codex plugin. Besides running OpenSpec's own init,
41
+ `keel --init` writes a small host surface into your repo: an `AGENTS.md` bootstrap block, the
42
+ OpenSpec schema, the `/opsx:*` command overlay, and on Claude the plugin's auto-update entry in
43
+ `.claude/settings.json`.
43
44
 
44
45
  ## Requirements
45
46
 
@@ -85,7 +86,7 @@ Updates arrive by themselves once a project is set up: `keel --init --target cla
85
86
  `keel --install`) declares auto-update for `keel-marketplace` in the project's
86
87
  `.claude/settings.json`, which Claude reads before its own default of off. A new release is fetched
87
88
  in the background after a session's first message. From 5.89.0 a running session's hooks use it at
88
- their next call; its skills and agents follow after `/reload-plugins` or at the next start.
89
+ their next call; its skills follow after `/reload-plugins` or at the next start.
89
90
 
90
91
  To update everything on a machine at once — the global CLI and the Claude and Codex plugins — run
91
92
  `keel --update`. It prints one line per component saying what changed, when it takes effect, and
@@ -183,7 +184,7 @@ Do the spec work through OpenSpec's commands (`/opsx:propose`, `/opsx:apply`, `/
183
184
  `/opsx:archive`). Keel's gates run at the task boundaries. The whole loop:
184
185
 
185
186
  ```
186
- keel --init → keel context → /opsx:apply (pick one task)
187
+ keel --init → keel context → /opsx:apply (tasks in order)
187
188
  → task-start (+ write guard) → implement & verify
188
189
  → task-complete → /opsx:sync · /opsx:archive
189
190
  ```
@@ -199,6 +200,16 @@ Set `KEEL_SESSION_PANEL=1` to draw it as a framed panel with the Keel mark inste
199
200
  default, and turning it on changes nothing but the presentation — the same status and the same
200
201
  next command are in both forms.
201
202
 
203
+ After a compaction the host's hook did not report, `keel project --target <t> --event compaction --json`
204
+ reprojects the same state by hand.
205
+
206
+ The write guard is a disposable manifest, `keel/guard.json`. On Claude a passing `task-start` writes
207
+ it (`--no-guard` opts out); `keel guard start` writes it explicitly and `keel guard clear` removes it.
208
+ It records the change and task, the capsule fingerprint, the normalized `Touch`, and hashes of the
209
+ authority files, and it fails closed: a manifest Keel cannot read refuses edits rather than allowing
210
+ them. The guard checks the file-editing tools. A write made by a `Bash` command is not checked,
211
+ except `git push` where a `push:` scope is declared.
212
+
202
213
  ### Standing authorization
203
214
 
204
215
  Keel asks before a repository action it has no authority for, and it asks again next session,
@@ -215,6 +226,9 @@ A task that authors no `Autonomy boundary:` inherits the declaration, and the co
215
226
  names `keel/config.yaml` as that entry's source so an inherited authorization is never mistaken
216
227
  for one the task decided. A task that authors its own boundary keeps it.
217
228
 
229
+ The ordinals below count names, not the forms in that comment: `push` and `push:<branch glob>` are
230
+ one name, so the vocabulary is thirteen names long and `continuation` is the fifth.
231
+
218
232
  `continuation`, the fifth name, is accepted and changes nothing. Moving from a durably complete
219
233
  task to the next unchecked task of the same change, inside a change whose `tasks.md` you approved,
220
234
  needs no confirmation by default (#414). The next task still starts through `keel gate task-start`
@@ -226,8 +240,8 @@ whose vocabulary predates the word, the entry is unrecognized and the whole decl
226
240
  nothing until corrected — fail-closed, never a silent grant.
227
241
 
228
242
  `issue:<owner>/<repo>`, the sixth name, names the resource it reaches, and it is refused without
229
- one; `chat-reply:<group>`, the eighth, and `issue-close:<owner>/<repo>` and `cleanup:scratch`, the ninth
230
- and tenth, are the others that do. The other names act on the checkout the declaration sits in, so each is already bounded by the repository you declared it in. The credentials that open an issue are not:
243
+ one; `chat-reply:<group>`, the eighth, `issue-close:<owner>/<repo>` and `cleanup:scratch`, the ninth
244
+ and tenth, and `push-protected:<branch glob>`, the eleventh, are the others that do. The other names, `push` included, act on the checkout the declaration sits in, so each is already bounded by the repository you declared it in. The credentials that open an issue are not:
231
245
  `gh` is account-wide, so a bare `issue` would reach every repository your account can touch —
232
246
  silently the widest entry in the file, and wider than `push`. Naming the repository keeps the
233
247
  grant the size of what it says. Keel carries that scope to `keel --doctor` and to the compiled
@@ -271,7 +285,7 @@ enforced: the role decides only which session reads them.
271
285
 
272
286
  `shift-restore` (#319) covers the two things a session started by a shift change on the Claude
273
287
  desktop app must do right after `keel shift resume`: turn its own Remote Control back on if it came
274
- back off, and rename itself back to its working title. A clear there keeps no title. Without the declaration, the woken
288
+ back off, and rename itself back to its working title. On the desktop app a cleared session does not keep its title. Without the declaration, the woken
275
289
  session reads that restore as another session's request and stops to ask you. It reaches only that
276
290
  session, so it takes no scope, and it covers no other session, no clear or archive, and no repository
277
291
  action.
@@ -311,7 +325,7 @@ Three things the declaration is not:
311
325
  anything.
312
326
  - **Not a trigger.** It removes a confirmation, not the step that reaches the action. Nothing
313
327
  schedules itself, and no next task is selected for you.
314
- - **Not open-ended.** The eleven names above are the whole vocabulary. An unrecognized entry is
328
+ - **Not open-ended.** The thirteen names above are the whole vocabulary. An unrecognized entry is
315
329
  reported with the accepted names and the declaration authorizes nothing until you fix it — a
316
330
  typo never becomes a silent grant.
317
331
 
@@ -462,6 +476,10 @@ decision either — routing decides whether a change exists, so there is nothing
462
476
  to; what Keel does is make sure the rule and your exceptions are in front of the agent when it
463
477
  decides.
464
478
 
479
+ An accepted native plan mode plan is session state. A decision in it that affects scope, completion,
480
+ or execution boundaries goes into proposal/design/specs/tasks before implementation; the session
481
+ plan itself is never execution authority.
482
+
465
483
  ### How much guidance the agent loads
466
484
 
467
485
  Keel's skills carry two kinds of content, and their value moves in opposite directions. *How to do it*
@@ -504,12 +522,16 @@ command at the right moment. Three things make that happen.
504
522
  and stay inside the task's declared write scope. That is how the agent knows *when* to run
505
523
  what.
506
524
  - **The skills.** The `keel-*` execution skills and the `/opsx:*` command overlays walk the
507
- agent through align → apply → review → complete, invoking the gates at each step.
525
+ agent through align → apply → review → complete, invoking the gates at each step. A new or
526
+ materially expanded skill is researched from an authoritative source with its provenance and
527
+ license recorded, its description is tested with realistic should-trigger and should-not-trigger
528
+ cases, and it passes at least one real task. `src/skills/<name>/SKILL.md` is the portable
529
+ authority, target metadata is additive, and discovery and activation stay target-native.
508
530
  - **The hooks.** A SessionStart hook runs the continuity projection the moment a session
509
531
  opens; a PreToolUse hook enforces the write guard on every edit. Neither needs prompting.
510
532
 
511
533
  So in day-to-day use you run two commands: `keel --doctor` when you want to check the
512
- wiring, and `keel --init` whenever it tells you the repository is behind its install — the
534
+ wiring, and `keel --install` whenever it tells you the repository is behind its install — the
513
535
  protocol version lives in your `AGENTS.md`, and updating the package does not move it.
514
536
  Everything below is the vocabulary the agent uses on your behalf.
515
537
 
@@ -654,8 +676,9 @@ which lives in
654
676
  **lenses** you author under `keel/lenses/*.md` in your repo. Each lens is self-describing: it
655
677
  opens with an `Applies when:` line stating the signals that trigger it (file extensions, artifact
656
678
  shapes) and carries an `Execution and review checks` section. When a change's artifacts or Touch
657
- match a lens, the alignment, test, debug, and review skills load only that one lens — and nothing
658
- when none match. Keel stays domain-agnostic; the knowledge is yours to own and edit.
679
+ match a lens, the alignment, test, debug, and review skills read it before concluding — and
680
+ nothing loads when none match. No rule keeps a skill from reading another lens it judges relevant.
681
+ Keel stays domain-agnostic; the knowledge is yours to own and edit.
659
682
 
660
683
  Three lenses ship as opt-in templates (`web`, `hardware`, `hardware-dsl`) under `assets/lenses/`.
661
684
  They are never installed automatically:
@@ -812,7 +835,7 @@ the brief, so `egress_deny` guards what is handed over, not what it can open.
812
835
 
813
836
  ## Shared resource leases
814
837
 
815
- Sessions coordinate shared resources across worktrees through bounded leases. Other holders are refused and recorded as waiters; release and noticed expiry tell them through direct chat messages. A lease enforces nothing on Git or the filesystem. The shift check reports those its worktree still holds. See [docs/resource-lock.md](docs/resource-lock.md).
838
+ Sessions coordinate shared resources across worktrees through bounded leases. Other holders are refused and recorded as waiters; when a holder releases a lease, or a lease is found to have expired, the waiters are told through direct chat messages. A lease enforces nothing on Git or the filesystem. The shift check reports those its worktree still holds. See [docs/resource-lock.md](docs/resource-lock.md).
816
839
 
817
840
  ## Worktree overview
818
841
 
@@ -928,14 +951,17 @@ owner_language: zh
928
951
  ```bash
929
952
  # Continuity — recompute what to do (stateless)
930
953
  keel context [--json] [--change <c> --task <t>]
954
+ keel context --clear-handoff # remove keel/HANDOFF.md
955
+ keel project --target <t> --event startup|resume|compaction|worktree [--expected-owner <owner>] --json
956
+ keel capabilities [--target <t>] [--json] # what each target's automation is verified to do
931
957
 
932
958
  # Deterministic gates → pass | fail | needs-review
933
- keel gate task-start --change <c> --task <t> --json
959
+ keel gate task-start --change <c> --task <t> [--record] [--keep-evidence M1,M3] [--no-guard] --json
934
960
  keel gate task-complete --change <c> --task <t> [--base <git-ref>] --json
935
- keel gate change-close --change <c> --action sync|archive --json
961
+ keel gate change-close --change <c> --action sync|archive [--base <git-ref>] --json
936
962
 
937
963
  # Write guard (Claude target)
938
- keel guard start --change <c> --task <t> --json
964
+ keel guard start --change <c> --task <t> [--force] --json
939
965
  keel guard status --json
940
966
  keel guard clear --json
941
967
 
@@ -953,13 +979,19 @@ keel chat unread | read | notice | search <text>
953
979
  keel chat bridge add | install | status | pause <2h> | stop | start | uninstall
954
980
  keel chat wake now <role> # resume a role's ended CLI session
955
981
  keel chat archive sync | pull
982
+ keel mail role | send | list | read # the 5.83 mailbox; works on direct groups
983
+
984
+ # Shift change, shared resource leases, worktree overview
985
+ keel shift request | check | ready [--wake] | start | resume | status
986
+ keel lock acquire | release | list # see docs/resource-lock.md
987
+ keel worktrees [--repo <path>] [--issues <file>] [--json]
956
988
 
957
989
  # Unattended triage — may this issue start work without asking?
958
990
  # Keel never fetches the issue; pass what gh returned. At least one of the two.
959
991
  keel triage [--labels <l1,l2>] [--issue <n>] [--json]
960
992
 
961
993
  # Coordinator patrol, and the model-free step a host scheduler calls (docs/cli-team.md)
962
- keel patrol [--since-last] [--notify] [--nudge] [--json]
994
+ keel patrol [--issues <file>] [--idle <dur>] [--since-last] [--notify] [--nudge] [--json]
963
995
  keel tick [--json] | keel tick task # one step; print the launchd job
964
996
 
965
997
  # External model CLIs — catalog, and the brief Keel compiles (it launches nothing)
@@ -967,12 +999,22 @@ keel agents [name] [--json]
967
999
  keel agents brief <name> --mode helper|implementation --dir <path> --out <file>
968
1000
 
969
1001
  # Install / maintenance
970
- keel --init | --install | --check | --doctor | --uninstall [--target <t>] [--dry-run]
971
- keel --update [--dry-run]
1002
+ keel --init [--target <t>] [--dry-run] [--force-template-update]
1003
+ keel --install [--target <t>] [--dry-run] [--force-template-update] [--with-git-hooks]
1004
+ keel --check | --doctor [--target <t>]
1005
+ keel --uninstall | --clear [--target <t>] [--dry-run] # --clear is the same removal
1006
+ keel --update [--dry-run] [--source <npm package or git spec>]
972
1007
  keel --version | --help
1008
+
1009
+ # OpenSpec, through the CLI Keel bundles
1010
+ keel openspec <args>
973
1011
  ```
974
1012
 
975
- Exit codes: `0` pass · `3` policy failure · `4` missing semantic review · `1` input error.
1013
+ Commands take the repository as a positional path or as `--repo <path>`; `keel --help` shows which.
1014
+ Each group prints its full subcommand list: `keel chat help`, `keel mail help`, `keel shift --help`,
1015
+ `keel lock --help`, `keel patrol --help`, and `keel agents --help`.
1016
+
1017
+ Exit codes: `0` pass · `1` input error · `2` usage error (an unknown flag or a flag the command refuses) · `3` policy failure · `4` missing semantic review. `keel patrol` uses `2` and `3` for what it found; see Coordinator patrol.
976
1018
 
977
1019
  Targets are probed, not assumed by name: unverified runtime behavior is reported as `manual`,
978
1020
  not `enforced`. Pick one target per repo and use it for every `--install` / `--check` /
@@ -985,7 +1027,7 @@ distribution copies under `plugins/keel/skills/` must stay byte-identical (enfor
985
1027
  validation).
986
1028
 
987
1029
  ```bash
988
- npm test # baseline + all scenarios in parallel
1030
+ npm test # one validate_plugin.py --all run: baseline + all scenarios in parallel (--jobs N sets concurrency)
989
1031
  node scripts/bump_version.js <patch|minor|major> # bump every version pin at once
990
1032
  ```
991
1033
 
@@ -996,5 +1038,4 @@ machine and what can leave it, including the bundled OpenSpec CLI's telemetry an
996
1038
 
997
1039
  ## License
998
1040
 
999
- [MIT](LICENSE) © 2026 TanglmChris. See the **[中文完整手册](README.zh-CN.md)** for the full
1000
- command and workflow reference.
1041
+ [MIT](LICENSE) © 2026 TanglmChris. The **[中文版](README.zh-CN.md)** carries the same sections.