@christang/keel 5.145.0 → 5.146.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.145.0",
3
+ "version": "5.146.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,4 +1,4 @@
1
- <!-- keel:start version=5.145.0 -->
1
+ <!-- keel:start version=5.146.0 -->
2
2
  ## Keel Bootstrap
3
3
 
4
4
  - Start every session with `keel context`; OpenSpec artifacts and Git are the only durable authority — never native memory, goals, or transcripts.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@christang/keel",
3
- "version": "5.145.0",
3
+ "version": "5.146.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@christang/keel",
9
- "version": "5.145.0",
9
+ "version": "5.146.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.145.0",
5
+ "version": "5.146.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.145.0",
3
+ "version": "5.146.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.145.0",
3
+ "version": "5.146.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",
@@ -49,8 +49,8 @@ REQUIRED_SCRIPTS = [
49
49
  "scripts/validate_plugin.py",
50
50
  ]
51
51
 
52
- PACKAGE_VERSION = "5.145.0"
53
- PROTOCOL_VERSION = "5.145.0"
52
+ PACKAGE_VERSION = "5.146.0"
53
+ PROTOCOL_VERSION = "5.146.0"
54
54
  LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
55
55
  OPENSPEC_SCHEMA_NAME = "keel-spec-driven"
56
56
  # Mirrors KEEL_PACKAGE_NAME in scripts/install_to_repo.py, one of the two
@@ -39152,6 +39152,96 @@ def validate_a_claim_names_what_would_falsify_it_scenario() -> int:
39152
39152
  return 0
39153
39153
 
39154
39154
 
39155
+ def validate_a_listed_marker_opens_its_clause_scenario() -> int:
39156
+ """Issue #362: a disposition written as a sub-list item was read as prose.
39157
+
39158
+ A `Findings` value whose marker sits on its own `- ` line under the label
39159
+ reached the marker scan as a line break, indentation and `- `; the opening
39160
+ rule allowed only indentation after a break, so `Resolved here: M1` read as
39161
+ a mid-sentence mention and the entry was refused `finding-owner`, while the
39162
+ same text on the label's own line passed.
39163
+ """
39164
+ label = "a-listed-marker-opens-its-clause"
39165
+
39166
+ def findings_task(findings: list[str]) -> str:
39167
+ return "\n".join(
39168
+ [
39169
+ "- [x] 1.1 Findings probe",
39170
+ " - Owner: claude",
39171
+ " - Mode: implementation",
39172
+ " - Covers:",
39173
+ " - E1: the task proves its own behavior",
39174
+ " - Read:",
39175
+ " - README.md",
39176
+ " - Touch:",
39177
+ " - src/example.js",
39178
+ " - Verify:",
39179
+ " - Strategy: vertical-tdd",
39180
+ " - M1: node test.js asserts the public behavior",
39181
+ " - Evidence:",
39182
+ " - Contract: pending",
39183
+ " - M1: pass. node test.js reported the behavior.",
39184
+ " - M1.red: fail. the behavior did not exist.",
39185
+ " - M1.green: pass.",
39186
+ " - Review:",
39187
+ " - Status: pass",
39188
+ " - Acceptance check: the behavior is proven.",
39189
+ " - Scope check: only Touch changed.",
39190
+ " - Findings:",
39191
+ *[f" - {item}" for item in findings],
39192
+ " - Blocker: none",
39193
+ " - Reauthorizations: none",
39194
+ ]
39195
+ )
39196
+
39197
+ with tempfile.TemporaryDirectory(prefix="keel-listed-marker-") as raw:
39198
+ root = Path(raw)
39199
+
39200
+ def complete(name: str, *findings: str) -> dict:
39201
+ repo = root / name
39202
+ write_gate_fixture(repo, tasks=findings_task(list(findings)))
39203
+ write_text(repo / "flow/Makefile", "all:\n")
39204
+ run_keel(repo, "gate", "task-start", "--change", "demo", "--task", "1.1", "--record", "--json")
39205
+ done = run_keel(repo, "gate", "task-complete", "--change", "demo", "--task", "1.1", "--json")
39206
+ try:
39207
+ return json.loads(done.stdout)
39208
+ except json.JSONDecodeError:
39209
+ return {"status": "unparsed", "problems": [{"message": done.stdout[:400]}]}
39210
+
39211
+ # The forms #362 reported refused, each as a sub-list item.
39212
+ for name, items in (
39213
+ ("check", ["Resolved here: M1"]),
39214
+ ("path", ["Resolved here: flow/Makefile"]),
39215
+ ("path-then-cjk-sentence", ["Resolved here: flow/Makefile。规则已改为按点名运行。"]),
39216
+ ("two-items", ["Resolved here: M1", "Discard reason: out of scope."]),
39217
+ ):
39218
+ payload = complete(name, *items)
39219
+ if payload.get("status") != "pass":
39220
+ report(f"{label}: a sub-list {items!r} is not read as a disposition ({name}); "
39221
+ f"{problem_codes(payload)!r} {problem_text(payload)!r}.")
39222
+ return 1
39223
+
39224
+ # The control: a listed claim is held to the evidence rule, not waved through.
39225
+ payload = complete("unknown-check", "Resolved here: M9")
39226
+ if "M9" not in problem_text(payload):
39227
+ report(f"{label}: a sub-list `Resolved here: M9` naming an undeclared check was not refused "
39228
+ f"for that check; {problem_codes(payload)!r} {problem_text(payload)!r}.")
39229
+ return 1
39230
+
39231
+ # A negation on a listed line is still a negation (#144).
39232
+ payload = complete("negated", "Not resolved here: a different module. Durable owner: https://example.com/issues/1")
39233
+ if payload.get("status") != "pass":
39234
+ report(f"{label}: a listed negation was refused; "
39235
+ f"{problem_codes(payload)!r} {problem_text(payload)!r}.")
39236
+ return 1
39237
+
39238
+ if "a-listed-marker-opens-its-clause" not in {name for name, _ in SCENARIOS}:
39239
+ report(f"{label}: scenario is not registered.")
39240
+ return 1
39241
+ report(f"{label} scenario passed.")
39242
+ return 0
39243
+
39244
+
39155
39245
  def validate_a_negation_is_not_a_marker_scenario() -> int:
39156
39246
  """Issue #144: `Not resolved here:` was read as `Resolved here:`.
39157
39247
 
@@ -41696,6 +41786,10 @@ SCENARIOS: tuple = (
41696
41786
  "a-negation-is-not-a-marker",
41697
41787
  validate_a_negation_is_not_a_marker_scenario,
41698
41788
  ),
41789
+ (
41790
+ "a-listed-marker-opens-its-clause",
41791
+ validate_a_listed_marker_opens_its_clause_scenario,
41792
+ ),
41699
41793
  (
41700
41794
  "an-equivalence-claim-names-its-base",
41701
41795
  validate_an_equivalence_claim_names_its_base_scenario,
package/src/core/gates.js CHANGED
@@ -1039,8 +1039,8 @@ function transientOwnerMessage(candidate) {
1039
1039
  // global because each resolved claim owes its own evidence; checking only the
1040
1040
  // first would let a second one assert itself for free.
1041
1041
  // A marker is a disposition only where it OPENS its clause: the start of the
1042
- // value, a line break, or sentence-ending punctuation may precede it, and a word
1043
- // may not. `Not resolved here:` contains the marker and means its opposite, and a
1042
+ // value, a line break, or sentence-ending punctuation may precede it, each
1043
+ // optionally followed by a list item's bullet, and a word may not. `Not resolved here:` contains the marker and means its opposite, and a
1044
1044
  // `\b` boundary sat happily at the space inside it — the negation was read as a
1045
1045
  // resolution claim and the next word, `it`, as its evidence, so a dismissal was
1046
1046
  // read as a repair and then refused for lacking repair evidence (issue #144).
@@ -1050,7 +1050,12 @@ function transientOwnerMessage(candidate) {
1050
1050
  // Written as a lookbehind so the captures keep reading from the same offsets —
1051
1051
  // every rule here is positional, and a rule that shortened the text would move
1052
1052
  // what they read.
1053
- const CLAUSE_OPENING = "(?<=^|[\\n.;:!?\u2014\u2013])[ \\t]*";
1053
+ //
1054
+ // A Findings written as a sub-list reaches this scan as a line break, the
1055
+ // item's indentation and its bullet, so the bullet is an opening too: without
1056
+ // it `- Resolved here: M1` read as a mid-sentence mention and was refused for
1057
+ // carrying no disposition, while the same text on the label's line passed (#362).
1058
+ const CLAUSE_OPENING = "(?<=^|[\\n.;:!?\u2014\u2013])[ \\t]*(?:[-*+][ \\t]+)?";
1054
1059
 
1055
1060
  const RESOLVED_HERE = new RegExp(
1056
1061
  `${CLAUSE_OPENING}resolved here\\s*:[ \\t]*(\\S*)`,
@@ -1684,7 +1689,7 @@ function completionChecks(repo, task, contract = null, changeVerify = null, chan
1684
1689
  + (mentionsUnopenedMarker(scannable)
1685
1690
  ? " A marker counts only where it opens its clause — after the "
1686
1691
  + "start of the value, a line break, or sentence-ending "
1687
- + "punctuation. This text mentions one mid-sentence, so it was "
1692
+ + "punctuation, or the bullet of a list item. This text mentions one mid-sentence, so it was "
1688
1693
  + "read as prose; move it to the start of its own clause, or "
1689
1694
  + "keep it as prose and add the disposition separately."
1690
1695
  : "")