@christang/keel 5.90.1 → 5.91.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/README.md +5 -0
- package/README.zh-CN.md +5 -0
- package/assets/bootstrap/AGENTS.md +1 -1
- 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 -1
- package/scripts/directory_tree.js +3 -1
- package/scripts/install_to_repo.py +52 -2
- package/scripts/validate_plugin.py +101 -5
package/README.md
CHANGED
|
@@ -707,6 +707,11 @@ npm test # baseline + all scenarios in parallel
|
|
|
707
707
|
node scripts/bump_version.js <patch|minor|major> # bump every version pin at once
|
|
708
708
|
```
|
|
709
709
|
|
|
710
|
+
## Privacy
|
|
711
|
+
|
|
712
|
+
Keel runs no server and collects nothing itself. [PRIVACY.md](PRIVACY.md) lists what it stores on your
|
|
713
|
+
machine and what can leave it, including the bundled OpenSpec CLI's telemetry and how to turn it off.
|
|
714
|
+
|
|
710
715
|
## License
|
|
711
716
|
|
|
712
717
|
[MIT](LICENSE) © 2026 TanglmChris. See the **[中文完整手册](README.zh-CN.md)** for the full
|
package/README.zh-CN.md
CHANGED
|
@@ -286,6 +286,11 @@ node scripts/run_python.js scripts/validate_plugin.py --scenario core-gates #
|
|
|
286
286
|
node scripts/bump_version.js <patch|minor|major> # 一次改齐所有版本 pin
|
|
287
287
|
```
|
|
288
288
|
|
|
289
|
+
## 隐私
|
|
290
|
+
|
|
291
|
+
Keel 不运行服务器,自身不收集任何数据。[PRIVACY.md](PRIVACY.md) 列出它在本机存什么、什么会离开本机,
|
|
292
|
+
包括内置 OpenSpec CLI 的遥测及关闭方法。
|
|
293
|
+
|
|
289
294
|
## License
|
|
290
295
|
|
|
291
296
|
[MIT](LICENSE) © 2026 TanglmChris · 版本历史见 [keel/CHANGELOG.md](keel/CHANGELOG.md)。
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.91.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.91.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.91.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.91.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",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// The plugin tree Anthropic's plugin directory lists (#175).
|
|
5
5
|
//
|
|
6
6
|
// It is the npm package less the scripts only development uses, with the
|
|
7
|
-
// manifest renamed and given a homepage, plus an icon.
|
|
7
|
+
// manifest renamed and given a homepage and a privacy policy, plus an icon.
|
|
8
8
|
//
|
|
9
9
|
// The directory reads `.claude-plugin/plugin.json` from a branch of a GitHub
|
|
10
10
|
// repository and scans every file it finds there. The name `keel` belongs to
|
|
@@ -27,6 +27,7 @@ const { spawnSync } = require("child_process");
|
|
|
27
27
|
const ROOT = path.resolve(__dirname, "..");
|
|
28
28
|
const DIRECTORY_NAME = "keel-openspec";
|
|
29
29
|
const HOMEPAGE = "https://github.com/TanglmChris/keel";
|
|
30
|
+
const PRIVACY_POLICY = `${HOMEPAGE}/blob/main/PRIVACY.md`;
|
|
30
31
|
// The scripts the shipped code runs. The rest of `scripts/` is for developing
|
|
31
32
|
// Keel — the test suite, the release helpers, this builder — and only adds
|
|
32
33
|
// files a reviewer must read for a plugin that never runs them.
|
|
@@ -76,6 +77,7 @@ function build(out) {
|
|
|
76
77
|
);
|
|
77
78
|
manifest.name = DIRECTORY_NAME;
|
|
78
79
|
manifest.homepage = HOMEPAGE;
|
|
80
|
+
manifest.privacyPolicyUrl = PRIVACY_POLICY;
|
|
79
81
|
fs.mkdirSync(path.join(target, ".claude-plugin"), { recursive: true });
|
|
80
82
|
fs.writeFileSync(
|
|
81
83
|
path.join(target, ".claude-plugin", "plugin.json"),
|
|
@@ -102,13 +102,16 @@ TASKS_LEGACY_HEADING_PATTERNS = (
|
|
|
102
102
|
"remove legacy ## Current Completion; derive progress from checklist [x]/[ ] state",
|
|
103
103
|
),
|
|
104
104
|
)
|
|
105
|
+
TASKS_DIRTY_STATE_PATTERN = re.compile(
|
|
106
|
+
r"(?i)\b(?:dirty|uncommitted|not\s+committed|pending\s+commit)\b"
|
|
107
|
+
)
|
|
105
108
|
TASKS_COMMIT_STATUS_PATTERNS = (
|
|
106
109
|
(
|
|
107
110
|
re.compile(r"(?i)\bcommit[-\s]?hash\b"),
|
|
108
111
|
"remove commit hash wording from tasks.md; git log is the source of truth",
|
|
109
112
|
),
|
|
110
113
|
(
|
|
111
|
-
|
|
114
|
+
TASKS_DIRTY_STATE_PATTERN,
|
|
112
115
|
"remove dirty/uncommitted state from tasks.md; keep durable work state in OpenSpec and use HANDOFF only as an explicit pointer override",
|
|
113
116
|
),
|
|
114
117
|
(
|
|
@@ -171,6 +174,29 @@ TASKS_CONTEXTUAL_HASH_RE = re.compile(
|
|
|
171
174
|
rf"(?i){_HASH_CONTEXT_WORD}.*{_HASH_SHAPED_TOKEN}|"
|
|
172
175
|
rf"{_HASH_SHAPED_TOKEN}.*{_HASH_CONTEXT_WORD}"
|
|
173
176
|
)
|
|
177
|
+
# Inside a task field the two rules above read a claim, not a line (#213). A
|
|
178
|
+
# field cites its provenance — the base a Scope check compared against, which
|
|
179
|
+
# keel-review-checklist asks it to name, the commit a result ran on, the inputs
|
|
180
|
+
# a hash identifies — and a context word elsewhere on that line does not make
|
|
181
|
+
# the token a record. So a field refuses a token only where a state claim binds
|
|
182
|
+
# it: a context word naming it directly, or the token followed by the act.
|
|
183
|
+
TASKS_FIELD_BOUND_HASH_RE = re.compile(
|
|
184
|
+
r"(?i)\b(?:commits?|committed|committing|master|main|HEAD|hash(?:es)?)\b"
|
|
185
|
+
r"[\s:=@(\uff08-]*(?:(?:is|was|now)\s+)?(?:(?:at|as|to|into|onto|in|on)\s+)?"
|
|
186
|
+
rf"{_HASH_SHAPED_TOKEN}"
|
|
187
|
+
rf"|{_HASH_SHAPED_TOKEN}\s*(?:(?:is|was)\s+)?\b(?:committed|merged|pushed)\b"
|
|
188
|
+
rf"|(?:提交|合入|哈希)\S{{0,4}}?\s*{_HASH_SHAPED_TOKEN}"
|
|
189
|
+
)
|
|
190
|
+
# Likewise `dirty` names the design under test as often as this worktree — a
|
|
191
|
+
# cache buffer's dirty groups — and a negation says the opposite of what the
|
|
192
|
+
# bare word matched. Inside a field the word is refused only as a claim about
|
|
193
|
+
# the work: predicative after a copula, or the value of a Status/State label.
|
|
194
|
+
TASKS_FIELD_DIRTY_STATE_RE = re.compile(
|
|
195
|
+
r"(?i)\b(?:is|are|was|were|remains?|remained|stays?|stayed|left)\s+"
|
|
196
|
+
r"(?:(?:still|now|yet)\s+)?(?:dirty|uncommitted)\b"
|
|
197
|
+
r"|\b(?:status|state)\s*[:\uff1a=]\s*(?:dirty|uncommitted)\b"
|
|
198
|
+
r"|\bnot\s+(?:yet\s+)?committed\b|\bpending\s+commit\b"
|
|
199
|
+
)
|
|
174
200
|
|
|
175
201
|
|
|
176
202
|
@dataclass(frozen=True)
|
|
@@ -735,6 +761,25 @@ def covers_field_lines(content: str) -> set[int]:
|
|
|
735
761
|
return lines
|
|
736
762
|
|
|
737
763
|
|
|
764
|
+
def task_field_lines(content: str) -> set[int]:
|
|
765
|
+
"""1-based line numbers inside any task field.
|
|
766
|
+
|
|
767
|
+
A field starts at a two-space `- Name:` label, the compiler's bound, and
|
|
768
|
+
runs until a non-blank line indented less than two spaces — the next task
|
|
769
|
+
title, a heading, or a notes section, which keep the line-wide rules.
|
|
770
|
+
"""
|
|
771
|
+
inside = False
|
|
772
|
+
lines: set[int] = set()
|
|
773
|
+
for number, line in enumerate(content.splitlines(), start=1):
|
|
774
|
+
if TASKS_FIELD_LABEL_RE.match(line):
|
|
775
|
+
inside = True
|
|
776
|
+
elif line.strip() and not line.startswith(" "):
|
|
777
|
+
inside = False
|
|
778
|
+
if inside:
|
|
779
|
+
lines.add(number)
|
|
780
|
+
return lines
|
|
781
|
+
|
|
782
|
+
|
|
738
783
|
# What an author quotes is content they cite, not a claim they make. Evidence
|
|
739
784
|
# prose quotes the command that ran, the output it printed, the branch base it
|
|
740
785
|
# ran against, and the name of the requirement under change — and every one of
|
|
@@ -787,6 +832,7 @@ def check_tasks_semantics(repo: Path) -> list[str]:
|
|
|
787
832
|
errors.append(f"{relative}:{line}: {message}")
|
|
788
833
|
|
|
789
834
|
cited = covers_field_lines(content)
|
|
835
|
+
fields = task_field_lines(content)
|
|
790
836
|
fenced = False
|
|
791
837
|
for line_number, line in enumerate(content.splitlines(), start=1):
|
|
792
838
|
# A fenced block is one long quoted span, and its own delimiter
|
|
@@ -799,7 +845,10 @@ def check_tasks_semantics(repo: Path) -> list[str]:
|
|
|
799
845
|
if fenced or is_tasks_rule_line(line) or line_number in cited:
|
|
800
846
|
continue
|
|
801
847
|
line = without_quoted_spans(line)
|
|
848
|
+
in_field = line_number in fields
|
|
802
849
|
for pattern, message in TASKS_COMMIT_STATUS_PATTERNS:
|
|
850
|
+
if in_field and pattern is TASKS_DIRTY_STATE_PATTERN:
|
|
851
|
+
pattern = TASKS_FIELD_DIRTY_STATE_RE
|
|
803
852
|
if pattern.search(line):
|
|
804
853
|
errors.append(f"{relative}:{line_number}: {message}")
|
|
805
854
|
if TASKS_SUBMISSION_STATE_RE.search(line) and TASKS_GIT_CONTEXT_RE.search(
|
|
@@ -808,7 +857,8 @@ def check_tasks_semantics(repo: Path) -> list[str]:
|
|
|
808
857
|
errors.append(
|
|
809
858
|
f"{relative}:{line_number}: {TASKS_SUBMISSION_MESSAGE}"
|
|
810
859
|
)
|
|
811
|
-
if TASKS_CONTEXTUAL_HASH_RE
|
|
860
|
+
hash_rule = TASKS_FIELD_BOUND_HASH_RE if in_field else TASKS_CONTEXTUAL_HASH_RE
|
|
861
|
+
if hash_rule.search(line):
|
|
812
862
|
errors.append(
|
|
813
863
|
f"{relative}:{line_number}: remove contextual commit hash from tasks.md; git log is the source of truth"
|
|
814
864
|
)
|
|
@@ -47,8 +47,8 @@ REQUIRED_SCRIPTS = [
|
|
|
47
47
|
"scripts/validate_plugin.py",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
|
-
PACKAGE_VERSION = "5.
|
|
51
|
-
PROTOCOL_VERSION = "5.
|
|
50
|
+
PACKAGE_VERSION = "5.91.0"
|
|
51
|
+
PROTOCOL_VERSION = "5.91.0"
|
|
52
52
|
LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
|
|
53
53
|
OPENSPEC_SCHEMA_NAME = "keel-spec-driven"
|
|
54
54
|
# Mirrors KEEL_PACKAGE_NAME in scripts/install_to_repo.py, one of the two
|
|
@@ -19526,9 +19526,17 @@ def validate_directory_tree_is_the_package_renamed_scenario() -> int:
|
|
|
19526
19526
|
if manifest.get("homepage") != "https://github.com/TanglmChris/keel":
|
|
19527
19527
|
report(f"{label} the tree manifest's homepage is {manifest.get('homepage')!r}.")
|
|
19528
19528
|
return 1
|
|
19529
|
-
|
|
19530
|
-
if
|
|
19531
|
-
report(f"{label} the tree manifest
|
|
19529
|
+
policy = "https://github.com/TanglmChris/keel/blob/main/PRIVACY.md"
|
|
19530
|
+
if manifest.get("privacyPolicyUrl") != policy:
|
|
19531
|
+
report(f"{label} the tree manifest's privacyPolicyUrl is {manifest.get('privacyPolicyUrl')!r}, not {policy}.")
|
|
19532
|
+
return 1
|
|
19533
|
+
if not (ROOT / "PRIVACY.md").is_file():
|
|
19534
|
+
report(f"{label} the privacyPolicyUrl names PRIVACY.md, which the repository does not have.")
|
|
19535
|
+
return 1
|
|
19536
|
+
added = ("name", "homepage", "privacyPolicyUrl")
|
|
19537
|
+
renamed = {k: v for k, v in manifest.items() if k not in added}
|
|
19538
|
+
if renamed != {k: v for k, v in root_manifest.items() if k not in added}:
|
|
19539
|
+
report(f"{label} the tree manifest differs from the root manifest beyond name, homepage, and privacyPolicyUrl.")
|
|
19532
19540
|
return 1
|
|
19533
19541
|
version = json.loads((ROOT / "package.json").read_text(encoding="utf-8"))["version"]
|
|
19534
19542
|
cli = subprocess.run(["node", str(tree / "bin/keel.js"), "--version"], text=True,
|
|
@@ -29725,6 +29733,90 @@ def validate_a_quoted_span_is_not_a_claim_scenario() -> int:
|
|
|
29725
29733
|
return 0
|
|
29726
29734
|
|
|
29727
29735
|
|
|
29736
|
+
def validate_a_task_field_cites_its_provenance_scenario() -> int:
|
|
29737
|
+
"""Issue #213: a Review field naming its base failed `keel state`.
|
|
29738
|
+
|
|
29739
|
+
The contextual-hash rule matched a context word and a hash-shaped token
|
|
29740
|
+
anywhere on one line, and the dirty rule matched the bare word. Inside a
|
|
29741
|
+
task field that reads cited provenance as recorded state: the base a Scope
|
|
29742
|
+
check compared against (which keel-review-checklist asks it to name), the
|
|
29743
|
+
commit a result ran on, a cache buffer's `dirty groups`, and a negation
|
|
29744
|
+
about another checkout. Each accepted line below is one rtl_ppa_prj wrote,
|
|
29745
|
+
shortened; line 262's shape is an Acceptance criterion of a checked task,
|
|
29746
|
+
so rewording it would move a recorded fingerprint.
|
|
29747
|
+
"""
|
|
29748
|
+
label = "a-task-field-cites-its-provenance"
|
|
29749
|
+
task = "- [x] A1 implementation\n"
|
|
29750
|
+
accepted = (
|
|
29751
|
+
("a Scope check naming its base",
|
|
29752
|
+
" - Evidence:\n - Review:\n - Scope check: git diff against task-start "
|
|
29753
|
+
"base 1f3a6b0 changes only the declared TB. Frozen input hashes identify "
|
|
29754
|
+
"actual 211dfb5 RTL.\n"),
|
|
29755
|
+
("an Acceptance check naming the commit it ran on",
|
|
29756
|
+
" - Evidence:\n - Review:\n - Acceptance check: P2 55/55 on dec4d6e. "
|
|
29757
|
+
"All 15 manifests match current source hashes.\n"),
|
|
29758
|
+
("an Acceptance criterion bounding scope by a base",
|
|
29759
|
+
" - Acceptance:\n - Only declared files change after synchronized base "
|
|
29760
|
+
"dec4d6e. Capture shared HEAD and reject unexpected staged scope before commit.\n"),
|
|
29761
|
+
("a domain term",
|
|
29762
|
+
" - Evidence:\n - M2: pass. All 24 resource traces end with no dirty groups.\n"),
|
|
29763
|
+
("a negation about another checkout",
|
|
29764
|
+
" - Evidence:\n - Review:\n - Scope check: no design edits were authored "
|
|
29765
|
+
"or copied from uncommitted Claude changes.\n"),
|
|
29766
|
+
)
|
|
29767
|
+
refused = (
|
|
29768
|
+
("a commit recorded in a field",
|
|
29769
|
+
" - Evidence:\n - M1: pass, committed to main as a1b2c3d.\n"),
|
|
29770
|
+
("HEAD recorded in a field", " - Evidence:\n - M1: HEAD is at a1b2c3d.\n"),
|
|
29771
|
+
("a merge recorded in Chinese", " - Evidence:\n - M1: 已合入 a1b2c3d。\n"),
|
|
29772
|
+
("work state stated in a field",
|
|
29773
|
+
" - Evidence:\n - M1: pass, but the work is still uncommitted.\n"),
|
|
29774
|
+
("a Status value", " - Evidence:\n - Status: dirty\n"),
|
|
29775
|
+
)
|
|
29776
|
+
|
|
29777
|
+
with tempfile.TemporaryDirectory(prefix="keel-task-field-") as raw:
|
|
29778
|
+
check, failure = _tasks_semantics_probe(raw)
|
|
29779
|
+
if failure is not None:
|
|
29780
|
+
report(f"{label}: keel --install failed while building the fixture.")
|
|
29781
|
+
report(failure)
|
|
29782
|
+
return 1
|
|
29783
|
+
for description, body in accepted:
|
|
29784
|
+
state, errors = check(task + body)
|
|
29785
|
+
if state == "unreported":
|
|
29786
|
+
report(f"{label}: keel --check reported no state at all on {description}.")
|
|
29787
|
+
return 1
|
|
29788
|
+
if state != "ok":
|
|
29789
|
+
report(f"{label}: {description} was refused as recorded state. A task "
|
|
29790
|
+
"field cites its provenance, and the only repair open to the "
|
|
29791
|
+
"author is to leave the evidence out.")
|
|
29792
|
+
for error in errors:
|
|
29793
|
+
report(f" {error}")
|
|
29794
|
+
return 1
|
|
29795
|
+
# The boundary: a bound claim inside a field, and any claim outside one.
|
|
29796
|
+
for description, body in (*refused, (
|
|
29797
|
+
"a title line carrying a context word and a hash apart",
|
|
29798
|
+
"- [x] A1 done on main, see a1b2c3d\n - Touch:\n - src/a.js\n",
|
|
29799
|
+
)):
|
|
29800
|
+
text = body if body.startswith("- [") else task + body
|
|
29801
|
+
state, errors = check(text)
|
|
29802
|
+
if state == "unreported":
|
|
29803
|
+
report(f"{label}: keel --check reported no state at all on {description}.")
|
|
29804
|
+
return 1
|
|
29805
|
+
if state != "failed":
|
|
29806
|
+
report(f"{label}: {description} was accepted. Binding the rule to a "
|
|
29807
|
+
"claim must not stop it refusing the claim.")
|
|
29808
|
+
return 1
|
|
29809
|
+
if not [error for error in errors if "tasks.md:" in error]:
|
|
29810
|
+
report(f"{label}: the refusal of {description} named no line.")
|
|
29811
|
+
return 1
|
|
29812
|
+
|
|
29813
|
+
if label not in {name for name, _ in SCENARIOS}:
|
|
29814
|
+
report(f"{label}: the scenario registry does not include it.")
|
|
29815
|
+
return 1
|
|
29816
|
+
report(f"{label} scenario passed.")
|
|
29817
|
+
return 0
|
|
29818
|
+
|
|
29819
|
+
|
|
29728
29820
|
def validate_a_covers_citation_is_not_a_record_scenario() -> int:
|
|
29729
29821
|
"""Issue #65 §4: the rule refused a tasks.md that cited it.
|
|
29730
29822
|
|
|
@@ -35598,6 +35690,10 @@ SCENARIOS: tuple = (
|
|
|
35598
35690
|
"a-covers-citation-is-not-a-record",
|
|
35599
35691
|
validate_a_covers_citation_is_not_a_record_scenario,
|
|
35600
35692
|
),
|
|
35693
|
+
(
|
|
35694
|
+
"a-task-field-cites-its-provenance",
|
|
35695
|
+
validate_a_task_field_cites_its_provenance_scenario,
|
|
35696
|
+
),
|
|
35601
35697
|
("validation-runner", validate_validation_runner_scenario),
|
|
35602
35698
|
("section-boundary", validate_section_boundary_scenario),
|
|
35603
35699
|
("review-entry-extent", validate_review_entry_extent_scenario),
|