@christang/keel 5.175.0 → 5.176.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.176.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,
@@ -226,8 +237,8 @@ whose vocabulary predates the word, the entry is unrecognized and the whole decl
226
237
  nothing until corrected — fail-closed, never a silent grant.
227
238
 
228
239
  `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:
240
+ one; `chat-reply:<group>`, the eighth, `issue-close:<owner>/<repo>` and `cleanup:scratch`, the ninth
241
+ and tenth, and `push-protected:<branch glob>`, the eleventh, 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:
231
242
  `gh` is account-wide, so a bare `issue` would reach every repository your account can touch —
232
243
  silently the widest entry in the file, and wider than `push`. Naming the repository keeps the
233
244
  grant the size of what it says. Keel carries that scope to `keel --doctor` and to the compiled
@@ -311,7 +322,7 @@ Three things the declaration is not:
311
322
  anything.
312
323
  - **Not a trigger.** It removes a confirmation, not the step that reaches the action. Nothing
313
324
  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
325
+ - **Not open-ended.** The thirteen names above are the whole vocabulary. An unrecognized entry is
315
326
  reported with the accepted names and the declaration authorizes nothing until you fix it — a
316
327
  typo never becomes a silent grant.
317
328
 
@@ -462,6 +473,10 @@ decision either — routing decides whether a change exists, so there is nothing
462
473
  to; what Keel does is make sure the rule and your exceptions are in front of the agent when it
463
474
  decides.
464
475
 
476
+ An accepted native plan mode plan is session state. A decision in it that affects scope, completion,
477
+ or execution boundaries goes into proposal/design/specs/tasks before implementation; the session
478
+ plan itself is never execution authority.
479
+
465
480
  ### How much guidance the agent loads
466
481
 
467
482
  Keel's skills carry two kinds of content, and their value moves in opposite directions. *How to do it*
@@ -504,12 +519,16 @@ command at the right moment. Three things make that happen.
504
519
  and stay inside the task's declared write scope. That is how the agent knows *when* to run
505
520
  what.
506
521
  - **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.
522
+ agent through align → apply → review → complete, invoking the gates at each step. A new or
523
+ materially expanded skill is researched from an authoritative source with its provenance and
524
+ license recorded, its description is tested with realistic should-trigger and should-not-trigger
525
+ cases, and it passes at least one real task. `src/skills/<name>/SKILL.md` is the portable
526
+ authority, target metadata is additive, and discovery and activation stay target-native.
508
527
  - **The hooks.** A SessionStart hook runs the continuity projection the moment a session
509
528
  opens; a PreToolUse hook enforces the write guard on every edit. Neither needs prompting.
510
529
 
511
530
  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
531
+ wiring, and `keel --install` whenever it tells you the repository is behind its install — the
513
532
  protocol version lives in your `AGENTS.md`, and updating the package does not move it.
514
533
  Everything below is the vocabulary the agent uses on your behalf.
515
534
 
@@ -654,8 +673,9 @@ which lives in
654
673
  **lenses** you author under `keel/lenses/*.md` in your repo. Each lens is self-describing: it
655
674
  opens with an `Applies when:` line stating the signals that trigger it (file extensions, artifact
656
675
  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.
676
+ match a lens, the alignment, test, debug, and review skills read it before concluding — and
677
+ nothing loads when none match. No rule keeps a skill from reading another lens it judges relevant.
678
+ Keel stays domain-agnostic; the knowledge is yours to own and edit.
659
679
 
660
680
  Three lenses ship as opt-in templates (`web`, `hardware`, `hardware-dsl`) under `assets/lenses/`.
661
681
  They are never installed automatically:
@@ -928,14 +948,17 @@ owner_language: zh
928
948
  ```bash
929
949
  # Continuity — recompute what to do (stateless)
930
950
  keel context [--json] [--change <c> --task <t>]
951
+ keel context --clear-handoff # remove keel/HANDOFF.md
952
+ keel project --target <t> --event startup|resume|compaction|worktree [--expected-owner <owner>] --json
953
+ keel capabilities [--target <t>] [--json] # what each target's automation is verified to do
931
954
 
932
955
  # Deterministic gates → pass | fail | needs-review
933
- keel gate task-start --change <c> --task <t> --json
956
+ keel gate task-start --change <c> --task <t> [--record] [--keep-evidence M1,M3] [--no-guard] --json
934
957
  keel gate task-complete --change <c> --task <t> [--base <git-ref>] --json
935
- keel gate change-close --change <c> --action sync|archive --json
958
+ keel gate change-close --change <c> --action sync|archive [--base <git-ref>] --json
936
959
 
937
960
  # Write guard (Claude target)
938
- keel guard start --change <c> --task <t> --json
961
+ keel guard start --change <c> --task <t> [--force] --json
939
962
  keel guard status --json
940
963
  keel guard clear --json
941
964
 
@@ -953,13 +976,19 @@ keel chat unread | read | notice | search <text>
953
976
  keel chat bridge add | install | status | pause <2h> | stop | start | uninstall
954
977
  keel chat wake now <role> # resume a role's ended CLI session
955
978
  keel chat archive sync | pull
979
+ keel mail role | send | list | read # the 5.83 mailbox; works on direct groups
980
+
981
+ # Shift change, shared resource leases, worktree overview
982
+ keel shift request | check | ready [--wake] | start | resume | status
983
+ keel lock acquire | release | list # see docs/resource-lock.md
984
+ keel worktrees [--repo <path>] [--issues <file>] [--json]
956
985
 
957
986
  # Unattended triage — may this issue start work without asking?
958
987
  # Keel never fetches the issue; pass what gh returned. At least one of the two.
959
988
  keel triage [--labels <l1,l2>] [--issue <n>] [--json]
960
989
 
961
990
  # Coordinator patrol, and the model-free step a host scheduler calls (docs/cli-team.md)
962
- keel patrol [--since-last] [--notify] [--nudge] [--json]
991
+ keel patrol [--issues <file>] [--idle <dur>] [--since-last] [--notify] [--nudge] [--json]
963
992
  keel tick [--json] | keel tick task # one step; print the launchd job
964
993
 
965
994
  # External model CLIs — catalog, and the brief Keel compiles (it launches nothing)
@@ -967,12 +996,20 @@ keel agents [name] [--json]
967
996
  keel agents brief <name> --mode helper|implementation --dir <path> --out <file>
968
997
 
969
998
  # Install / maintenance
970
- keel --init | --install | --check | --doctor | --uninstall [--target <t>] [--dry-run]
971
- keel --update [--dry-run]
999
+ keel --init [--target <t>] [--dry-run] [--force-template-update]
1000
+ keel --install [--target <t>] [--dry-run] [--force-template-update] [--with-git-hooks]
1001
+ keel --check | --doctor [--target <t>]
1002
+ keel --uninstall | --clear [--target <t>] [--dry-run] # --clear is the same removal
1003
+ keel --update [--dry-run] [--source <npm package or git spec>]
972
1004
  keel --version | --help
1005
+
1006
+ # OpenSpec, through the CLI Keel bundles
1007
+ keel openspec <args>
973
1008
  ```
974
1009
 
975
- Exit codes: `0` pass · `3` policy failure · `4` missing semantic review · `1` input error.
1010
+ Commands take the repository as a positional path or as `--repo <path>`; `keel --help` shows which.
1011
+
1012
+ 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
1013
 
977
1014
  Targets are probed, not assumed by name: unverified runtime behavior is reported as `manual`,
978
1015
  not `enforced`. Pick one target per repo and use it for every `--install` / `--check` /
@@ -985,7 +1022,7 @@ distribution copies under `plugins/keel/skills/` must stay byte-identical (enfor
985
1022
  validation).
986
1023
 
987
1024
  ```bash
988
- npm test # baseline + all scenarios in parallel
1025
+ npm test # one validate_plugin.py --all run: baseline + all scenarios in parallel (--jobs N sets concurrency)
989
1026
  node scripts/bump_version.js <patch|minor|major> # bump every version pin at once
990
1027
  ```
991
1028
 
@@ -996,5 +1033,4 @@ machine and what can leave it, including the bundled OpenSpec CLI's telemetry an
996
1033
 
997
1034
  ## License
998
1035
 
999
- [MIT](LICENSE) © 2026 TanglmChris. See the **[中文完整手册](README.zh-CN.md)** for the full
1000
- command and workflow reference.
1036
+ [MIT](LICENSE) © 2026 TanglmChris. The **[中文版](README.zh-CN.md)** carries the same sections.