@christang/keel 5.176.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.176.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
@@ -226,6 +226,9 @@ A task that authors no `Autonomy boundary:` inherits the declaration, and the co
226
226
  names `keel/config.yaml` as that entry's source so an inherited authorization is never mistaken
227
227
  for one the task decided. A task that authors its own boundary keeps it.
228
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
+
229
232
  `continuation`, the fifth name, is accepted and changes nothing. Moving from a durably complete
230
233
  task to the next unchecked task of the same change, inside a change whose `tasks.md` you approved,
231
234
  needs no confirmation by default (#414). The next task still starts through `keel gate task-start`
@@ -238,7 +241,7 @@ nothing until corrected — fail-closed, never a silent grant.
238
241
 
239
242
  `issue:<owner>/<repo>`, the sixth name, names the resource it reaches, and it is refused without
240
243
  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:
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:
242
245
  `gh` is account-wide, so a bare `issue` would reach every repository your account can touch —
243
246
  silently the widest entry in the file, and wider than `push`. Naming the repository keeps the
244
247
  grant the size of what it says. Keel carries that scope to `keel --doctor` and to the compiled
@@ -282,7 +285,7 @@ enforced: the role decides only which session reads them.
282
285
 
283
286
  `shift-restore` (#319) covers the two things a session started by a shift change on the Claude
284
287
  desktop app must do right after `keel shift resume`: turn its own Remote Control back on if it came
285
- 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
286
289
  session reads that restore as another session's request and stops to ask you. It reaches only that
287
290
  session, so it takes no scope, and it covers no other session, no clear or archive, and no repository
288
291
  action.
@@ -832,7 +835,7 @@ the brief, so `egress_deny` guards what is handed over, not what it can open.
832
835
 
833
836
  ## Shared resource leases
834
837
 
835
- 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).
836
839
 
837
840
  ## Worktree overview
838
841
 
@@ -1008,6 +1011,8 @@ keel openspec <args>
1008
1011
  ```
1009
1012
 
1010
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`.
1011
1016
 
1012
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.
1013
1018
 
package/README.zh-CN.md CHANGED
@@ -194,6 +194,9 @@ authorize: # accepted names: commit, push, push:<branch glob>[@<role>],
194
194
  没有自己写 `Autonomy boundary:` 的 task 会继承这份声明,编译出的 capsule 会把 `keel/config.yaml`
195
195
  标为该条目的来源,这样继承来的授权永远不会被误当成 task 自己做的决定。自己写了边界的 task 保留自己的边界。
196
196
 
197
+ 下文的序数按名字计,不按上面注释里的写法计:`push` 和 `push:<branch glob>` 是同一个名字,所以词汇共 13 个名字,
198
+ `continuation` 是第五个。
199
+
197
200
  `continuation`(第五个名字)会被接受,但什么都不改变。在你批准过 `tasks.md` 的同一个 change 里,
198
201
  从一个已持久完成的 task 转到下一个未勾选的 task,默认就不需要确认(#414)。下一个 task 照样通过
199
202
  `keel gate task-start` 启动、记录自己的 fingerprint;每个门禁、证据要求、语义 Review 和写入守卫都照常运行;
@@ -234,7 +237,7 @@ chat 角色与之匹配的会话。会话在 capsule、`keel context`、`keel --
234
237
  携带、不被强制执行:角色只决定由哪个会话读到它们。
235
238
 
236
239
  `shift-restore`(#319)涵盖 Claude 桌面应用上因换班而启动的会话在 `keel shift resume` 之后必须马上做的两件事:
237
- 如果自己的 Remote Control 回来时是关着的,就把它重新打开;把自己的名字改回工作标题。那里的 clear 不保留标题。
240
+ 如果自己的 Remote Control 回来时是关着的,就把它重新打开;把自己的名字改回工作标题。桌面应用上被清空的会话不会保留原来的标题。
238
241
  没有这份声明时,被唤醒的会话会把这次恢复当成另一个会话的请求,停下来问你。它只作用于那个会话,所以不带范围;
239
242
  它不涵盖任何其他会话,不涵盖 clear 或 archive,也不涵盖任何仓库操作。
240
243
 
@@ -689,8 +692,8 @@ external_agents:
689
692
 
690
693
  ## 共享资源租约
691
694
 
692
- 会话通过有期限的租约在各 worktree 之间协调共享资源。其他持有者会被拒绝并记为等待者;释放和被察觉的过期会通过
693
- 私信通知他们。租约对 Git 或文件系统不做任何强制。换班检查会报告本 worktree 仍持有的租约。见
695
+ 会话通过有期限的租约在各 worktree 之间协调共享资源。其他持有者会被拒绝并记为等待者;持有者释放租约,或有人发现租约已过期时,
696
+ 等待者会收到私信通知。租约对 Git 或文件系统不做任何强制。换班检查会报告本 worktree 仍持有的租约。见
694
697
  [docs/resource-lock.md](docs/resource-lock.md)。
695
698
 
696
699
  ## worktree 总览
@@ -851,6 +854,8 @@ keel openspec <args>
851
854
  ```
852
855
 
853
856
  命令接受仓库路径,可以是位置参数,也可以是 `--repo <path>`;具体用哪种见 `keel --help`。
857
+ 每组命令都会打印自己的完整子命令列表:`keel chat help`、`keel mail help`、`keel shift --help`、
858
+ `keel lock --help`、`keel patrol --help` 和 `keel agents --help`。
854
859
 
855
860
  退出码:`0` 通过 · `1` 输入错误 · `2` 用法错误(未知 flag,或命令拒绝的 flag) · `3` 策略失败 · `4` 缺少语义 review。`keel patrol` 用 `2` 和 `3` 表示它发现了什么;见「协调者巡查」。
856
861
 
@@ -1,4 +1,4 @@
1
- <!-- keel:start version=5.176.0 -->
1
+ <!-- keel:start version=5.177.0 -->
2
2
  ## Keel Bootstrap
3
3
 
4
4
  - Start every session with `keel context`; OpenSpec artifacts and Git are the durable authority, and memory or transcripts may only inform.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@christang/keel",
3
- "version": "5.176.0",
3
+ "version": "5.177.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@christang/keel",
9
- "version": "5.176.0",
9
+ "version": "5.177.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@fission-ai/openspec": "^1.4.1"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@christang/keel",
3
3
  "displayName": "Keel",
4
4
  "description": "Keel OpenSpec execution discipline CLI for Claude Code, Codex, and OpenCode.",
5
- "version": "5.176.0",
5
+ "version": "5.177.0",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.176.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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.176.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",
@@ -51,8 +51,8 @@ REQUIRED_SCRIPTS = [
51
51
  "scripts/validate_plugin.py",
52
52
  ]
53
53
 
54
- PACKAGE_VERSION = "5.176.0"
55
- PROTOCOL_VERSION = "5.176.0"
54
+ PACKAGE_VERSION = "5.177.0"
55
+ PROTOCOL_VERSION = "5.177.0"
56
56
  LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
57
57
  OPENSPEC_SCHEMA_NAME = "keel-spec-driven"
58
58
  # Mirrors KEEL_PACKAGE_NAME in scripts/install_to_repo.py, one of the two
@@ -39550,6 +39550,93 @@ def validate_readme_zh_matches_english_scenario() -> int:
39550
39550
  return 0
39551
39551
 
39552
39552
 
39553
+ def validate_config_documents_in_declaration_order_scenario() -> int:
39554
+ """Issue #413: the configuration file documents what it says it documents.
39555
+
39556
+ `CONFIG_DECLARATIONS` is "in the order the file documents them", and the
39557
+ file had drifted: owner_language first, patrol twice, executor_tier never.
39558
+ The order is read from the code, so a declaration added there without its
39559
+ block, or a block written out of place, fails here.
39560
+ """
39561
+ label = "config-documents-in-declaration-order:"
39562
+ source = (ROOT / "src/core/config.js").read_text(encoding="utf-8")
39563
+ declared = re.search(r"const CONFIG_DECLARATIONS = \[(.*?)\];", source, re.S)
39564
+ names = re.findall(r'^\s*"([a-z_]+)",', declared.group(1), re.M) if declared else []
39565
+ if len(names) < 12:
39566
+ report(f"{label} read {len(names)} declarations from config.js; expected at least 12.")
39567
+ return 1
39568
+ config = (ROOT / "keel/config.yaml").read_text(encoding="utf-8")
39569
+ blocks = re.findall(r"^# ([a-z_]+) \(optional\):", config, re.M)
39570
+ if blocks != names:
39571
+ report(f"{label} keel/config.yaml documents {blocks}, not {names} in that order.")
39572
+ return 1
39573
+ if "`chat-reply`, and `push-protected` are the names" not in config:
39574
+ report(f"{label} keel/config.yaml's scoped-name sentence does not name `push-protected`.")
39575
+ return 1
39576
+ updating = (ROOT / "docs/updating.md").read_text(encoding="utf-8")
39577
+ if "skills and agents" in updating.lower():
39578
+ report(f"{label} docs/updating.md still says Claude reloads skills and agents.")
39579
+ return 1
39580
+ for needle in ("config.toml", "E404"):
39581
+ if needle not in updating:
39582
+ report(f"{label} docs/updating.md does not mention {needle!r}.")
39583
+ return 1
39584
+ for name in ("README.md", "README.zh-CN.md"):
39585
+ text = (ROOT / name).read_text(encoding="utf-8")
39586
+ for phrase in ("A clear there keeps no title", "noticed expiry"):
39587
+ if phrase in text:
39588
+ report(f"{label} {name} still says {phrase!r}.")
39589
+ return 1
39590
+ if "keel chat help" not in text:
39591
+ report(f"{label} {name} does not point to `keel chat help` for the full chat command list.")
39592
+ return 1
39593
+ if label.rstrip(":") not in {name for name, _ in SCENARIOS}:
39594
+ report(f"{label} the scenario registry does not include it.")
39595
+ return 1
39596
+ report(f"{label.rstrip(':')} scenario passed.")
39597
+ return 0
39598
+
39599
+
39600
+ def validate_docs_zh_match_english_scenario() -> int:
39601
+ """Issue #413: each Chinese doc follows its English page.
39602
+
39603
+ `docs/shift-change.zh-CN.md` had five sections against eight and never
39604
+ mentioned `keel patrol` or `keel tick`. Every Chinese page that exists is
39605
+ checked, so a new one is held from the day it is written.
39606
+ """
39607
+ label = "docs-zh-match-english:"
39608
+ pages = sorted((ROOT / "docs").glob("*.zh-CN.md"))
39609
+ if not pages:
39610
+ report(f"{label} found no docs/*.zh-CN.md to check.")
39611
+ return 1
39612
+ for zh_path in pages:
39613
+ en_path = zh_path.with_name(zh_path.name.replace(".zh-CN.md", ".md"))
39614
+ if not en_path.is_file():
39615
+ report(f"{label} {zh_path.name} has no English page {en_path.name}.")
39616
+ return 1
39617
+ en = en_path.read_text(encoding="utf-8").splitlines()
39618
+ zh = zh_path.read_text(encoding="utf-8").splitlines()
39619
+ for what, prefix in (("headings", "#"), ("code fences", "```")):
39620
+ counts = [sum(1 for line in lines if line.startswith(prefix)) for lines in (en, zh)]
39621
+ if counts[0] != counts[1]:
39622
+ report(f"{label} {en_path.name} has {counts[0]} {what} and {zh_path.name} has {counts[1]}.")
39623
+ return 1
39624
+ zh_text = "\n".join(zh)
39625
+ for command in sorted(set(re.findall(r"keel [a-z][a-z-]*", "\n".join(en)))):
39626
+ if command not in zh_text:
39627
+ report(f"{label} {zh_path.name} does not name `{command}`, which {en_path.name} names.")
39628
+ return 1
39629
+ slack = (ROOT / "docs/chat-slack-setup.zh-CN.md").read_text(encoding="utf-8")
39630
+ if "编辑和删除" not in slack:
39631
+ report(f"{label} chat-slack-setup.zh-CN.md does not say edits and deletions carry over.")
39632
+ return 1
39633
+ if label.rstrip(":") not in {name for name, _ in SCENARIOS}:
39634
+ report(f"{label} the scenario registry does not include it.")
39635
+ return 1
39636
+ report(f"{label.rstrip(':')} scenario passed.")
39637
+ return 0
39638
+
39639
+
39553
39640
  def validate_tdd_strategy_guide_scenario() -> int:
39554
39641
  """Issue #389: the skill an executor loads to plan its checks says how to choose.
39555
39642
 
@@ -41671,6 +41758,8 @@ SCENARIOS: tuple = (
41671
41758
  ("surfaces-agree-with-code", validate_surfaces_agree_with_code_scenario),
41672
41759
  ("readme-states-the-cli", validate_readme_states_the_cli_scenario),
41673
41760
  ("readme-zh-matches-english", validate_readme_zh_matches_english_scenario),
41761
+ ("config-documents-in-declaration-order", validate_config_documents_in_declaration_order_scenario),
41762
+ ("docs-zh-match-english", validate_docs_zh_match_english_scenario),
41674
41763
  (
41675
41764
  "a-tier-declares-what-is-skipped",
41676
41765
  validate_a_tier_declares_what_is_skipped_scenario,