@christang/keel 5.201.0 → 5.202.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/.claude-plugin/plugin.json +1 -1
- package/README.md +6 -10
- package/README.zh-CN.md +6 -10
- package/assets/bootstrap/AGENTS.md +1 -1
- package/assets/openspec/schemas/keel-spec-driven/schema.yaml +2 -2
- package/bin/keel.js +14 -15
- 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/plugins/keel/commands/chat.md +17 -0
- package/plugins/keel/commands/context.md +18 -0
- package/plugins/keel/commands/done.md +25 -0
- package/plugins/keel/commands/start.md +23 -0
- package/plugins/keel/skills/{keel-align-expectations → align-expectations}/SKILL.md +4 -3
- package/plugins/keel/skills/{keel-debug-failure → debug-failure}/SKILL.md +3 -2
- package/plugins/keel/skills/{keel-handoff → handoff}/SKILL.md +3 -2
- package/plugins/keel/skills/{keel-review-checklist → review-checklist}/SKILL.md +3 -2
- package/plugins/keel/skills/{keel-review-checklist → review-checklist}/conditional-checks.md +1 -1
- package/plugins/keel/skills/{keel-tdd-or-test-first → tdd-or-test-first}/SKILL.md +3 -2
- package/plugins/keel/skills/{keel-tdd-or-test-first → tdd-or-test-first}/guidance.md +1 -1
- package/scripts/install_to_repo.py +1 -1
- package/scripts/validation/baseline.py +5 -7
- package/scripts/validation/chat.py +1 -1
- package/scripts/validation/common.py +31 -10
- package/scripts/validation/contract.py +22 -21
- package/scripts/validation/docs.py +17 -16
- package/scripts/validation/export.py +37 -430
- package/scripts/validation/guard.py +13 -12
- package/scripts/validation/hosts.py +110 -9
- package/scripts/validation/install.py +14 -13
- package/scripts/validation/registry.py +2 -4
- package/scripts/validation/selfcheck.py +4 -4
- package/src/core/gates.js +1 -1
- package/plugins/keel/skills/keel-md-docx/SKILL.md +0 -51
- package/plugins/keel/skills/keel-md-docx/scripts/fonts-macos.conf +0 -10
- package/plugins/keel/skills/keel-md-docx/scripts/md2word.py +0 -359
- package/plugins/keel/skills/keel-md-docx/scripts/package.json +0 -8
- package/plugins/keel/skills/keel-md-docx/scripts/requirements.txt +0 -3
- package/plugins/keel/skills/keel-md-docx/scripts/runtime.mjs +0 -31
- package/src/core/docx.js +0 -211
|
@@ -22,6 +22,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
|
22
22
|
from pathlib import Path
|
|
23
23
|
|
|
24
24
|
from validation.common import (
|
|
25
|
+
portable_projection_bytes,
|
|
25
26
|
OPENSPEC_SCHEMA_NAME,
|
|
26
27
|
OPENSPEC_SEARCH_ORDER,
|
|
27
28
|
OPENSPEC_SURFACE_OVERLAY_START,
|
|
@@ -1046,14 +1047,14 @@ def validate_review_checklist_defers_to_gate_scenario() -> int:
|
|
|
1046
1047
|
"""
|
|
1047
1048
|
label = "review-checklist-defers-to-gate:"
|
|
1048
1049
|
for root in ("src/skills", f"{PLUGIN_ROOT}/skills"):
|
|
1049
|
-
text = (ROOT / root / "
|
|
1050
|
+
text = (ROOT / root / "review-checklist" / "SKILL.md").read_text(encoding="utf-8")
|
|
1050
1051
|
flat = " ".join(text.split())
|
|
1051
1052
|
for restated in (
|
|
1052
1053
|
"Evidence `Contract` line records the task-start capsule fingerprint",
|
|
1053
1054
|
"confirm concrete per-label `.red` and `.green` Evidence exists",
|
|
1054
1055
|
):
|
|
1055
1056
|
if restated in flat:
|
|
1056
|
-
report(f"{label} {root}
|
|
1057
|
+
report(f"{label} {root} review-checklist still restates a gate refusal: {restated!r}")
|
|
1057
1058
|
return 1
|
|
1058
1059
|
for kept in (
|
|
1059
1060
|
"evidence-first tasks",
|
|
@@ -1062,7 +1063,7 @@ def validate_review_checklist_defers_to_gate_scenario() -> int:
|
|
|
1062
1063
|
"not build-only or shape-only",
|
|
1063
1064
|
):
|
|
1064
1065
|
if kept not in flat:
|
|
1065
|
-
report(f"{label} {root}
|
|
1066
|
+
report(f"{label} {root} review-checklist lost the judgment {kept!r}.")
|
|
1066
1067
|
return 1
|
|
1067
1068
|
if "review-checklist-defers-to-gate" not in {name for name, _ in registry.SCENARIOS}:
|
|
1068
1069
|
report(f"{label} scenario is not registered.")
|
|
@@ -1250,7 +1251,7 @@ def validate_expectation_completion_gates_scenario() -> int:
|
|
|
1250
1251
|
|
|
1251
1252
|
checks: list[tuple[str, Path, list[str]]] = [
|
|
1252
1253
|
("root AGENTS.md", ROOT / "AGENTS.md", protocol_snippets),
|
|
1253
|
-
("source review-checklist skill", ROOT / "src/skills/
|
|
1254
|
+
("source review-checklist skill", ROOT / "src/skills/review-checklist/SKILL.md", review_snippets),
|
|
1254
1255
|
(
|
|
1255
1256
|
"source tasks Review template",
|
|
1256
1257
|
ROOT / "assets/openspec/schemas/keel-spec-driven/templates/tasks.md",
|
|
@@ -1266,7 +1267,7 @@ def validate_expectation_completion_gates_scenario() -> int:
|
|
|
1266
1267
|
ROOT / "assets/openspec/schemas/keel-spec-driven/templates/tasks.md",
|
|
1267
1268
|
task_template_review_snippets,
|
|
1268
1269
|
),
|
|
1269
|
-
("source handoff skill", ROOT / "src/skills/
|
|
1270
|
+
("source handoff skill", ROOT / "src/skills/handoff/SKILL.md", handoff_skill_snippets),
|
|
1270
1271
|
("OpenSpec archive overlay generator", ROOT / "bin/keel.js", archive_overlay_snippets),
|
|
1271
1272
|
]
|
|
1272
1273
|
|
|
@@ -1289,7 +1290,7 @@ def validate_expectation_completion_gates_scenario() -> int:
|
|
|
1289
1290
|
|
|
1290
1291
|
def validate_authoring_continuity_scenario() -> int:
|
|
1291
1292
|
protocol_snippets = [
|
|
1292
|
-
"
|
|
1293
|
+
"align-expectations",
|
|
1293
1294
|
"risk-triggered deep path",
|
|
1294
1295
|
"hidden-knowledge risk",
|
|
1295
1296
|
"domain lenses",
|
|
@@ -4591,9 +4592,9 @@ def validate_task_shape_warning_scenario() -> int:
|
|
|
4591
4592
|
return 1
|
|
4592
4593
|
|
|
4593
4594
|
# M4 — the same question at completion, in both copies.
|
|
4594
|
-
canonical = ROOT / "src/skills/
|
|
4595
|
-
projected = ROOT / "plugins/keel/skills/
|
|
4596
|
-
if canonical.read_bytes() != projected
|
|
4595
|
+
canonical = ROOT / "src/skills/review-checklist/SKILL.md"
|
|
4596
|
+
projected = ROOT / "plugins/keel/skills/review-checklist/SKILL.md"
|
|
4597
|
+
if canonical.read_bytes() != portable_projection_bytes(projected):
|
|
4597
4598
|
report(
|
|
4598
4599
|
f"{label} M4 the portable checklist and its plugin projection are "
|
|
4599
4600
|
"not byte-identical."
|
|
@@ -4602,7 +4603,7 @@ def validate_task_shape_warning_scenario() -> int:
|
|
|
4602
4603
|
checklist = canonical.read_text(encoding="utf-8")
|
|
4603
4604
|
if "one behavior" not in checklist:
|
|
4604
4605
|
report(
|
|
4605
|
-
f"{label} M4
|
|
4606
|
+
f"{label} M4 review-checklist does not ask whether two tasks "
|
|
4606
4607
|
"turned out to be one behavior."
|
|
4607
4608
|
)
|
|
4608
4609
|
return 1
|
|
@@ -6184,7 +6185,7 @@ def validate_findings_resolved_here_scenario() -> int:
|
|
|
6184
6185
|
"""A finding fixed in its own task is recorded as fixed, not as discarded.
|
|
6185
6186
|
|
|
6186
6187
|
The gate required a durable owner for every non-`none` Findings value, while
|
|
6187
|
-
the spec and `
|
|
6188
|
+
the spec and `review-checklist` both scope that requirement to
|
|
6188
6189
|
*unresolved* findings. A finding found and repaired inside one task had no
|
|
6189
6190
|
accepted form, so the only text that passed was `Discard reason:` — which
|
|
6190
6191
|
files a repair as a dismissal. `## Invalidates` has carried the same third
|
|
@@ -6385,9 +6386,9 @@ def validate_findings_resolved_here_scenario() -> int:
|
|
|
6385
6386
|
|
|
6386
6387
|
# M4 — the criterion is stated where the author reads it, and the portable
|
|
6387
6388
|
# skill and its projection do not disagree about it.
|
|
6388
|
-
canonical = ROOT / "src/skills/
|
|
6389
|
-
projected = ROOT / "plugins/keel/skills/
|
|
6390
|
-
if canonical.read_bytes() != projected
|
|
6389
|
+
canonical = ROOT / "src/skills/review-checklist/SKILL.md"
|
|
6390
|
+
projected = ROOT / "plugins/keel/skills/review-checklist/SKILL.md"
|
|
6391
|
+
if canonical.read_bytes() != portable_projection_bytes(projected):
|
|
6391
6392
|
report(
|
|
6392
6393
|
"findings-resolved-here: M4 the portable checklist and its plugin "
|
|
6393
6394
|
"projection are not byte-identical."
|
|
@@ -6397,7 +6398,7 @@ def validate_findings_resolved_here_scenario() -> int:
|
|
|
6397
6398
|
for phrase in ("Resolved here:", "Durable owner:", "Discard reason:"):
|
|
6398
6399
|
if phrase not in checklist:
|
|
6399
6400
|
report(
|
|
6400
|
-
"findings-resolved-here: M4
|
|
6401
|
+
"findings-resolved-here: M4 review-checklist does not name "
|
|
6401
6402
|
f"the {phrase!r} disposition."
|
|
6402
6403
|
)
|
|
6403
6404
|
return 1
|
|
@@ -8712,7 +8713,7 @@ def validate_expectation_alignment_skill_scenario() -> int:
|
|
|
8712
8713
|
named sibling) requirement or scenario that names it; editorial wording
|
|
8713
8714
|
no durable authority names must stay rewritable without validator edits.
|
|
8714
8715
|
"""
|
|
8715
|
-
skill_path = ROOT / "src/skills/
|
|
8716
|
+
skill_path = ROOT / "src/skills/align-expectations/SKILL.md"
|
|
8716
8717
|
if not skill_path.is_file():
|
|
8717
8718
|
report("expectation-alignment-skill canonical SKILL.md is missing.")
|
|
8718
8719
|
return 1
|
|
@@ -8722,7 +8723,7 @@ def validate_expectation_alignment_skill_scenario() -> int:
|
|
|
8722
8723
|
frontmatter = re.match(r"---\n([\s\S]*?)\n---\n", skill)
|
|
8723
8724
|
if (
|
|
8724
8725
|
frontmatter is None
|
|
8725
|
-
or "name:
|
|
8726
|
+
or "name: align-expectations" not in frontmatter.group(1)
|
|
8726
8727
|
or "description:" not in frontmatter.group(1)
|
|
8727
8728
|
):
|
|
8728
8729
|
report("expectation-alignment-skill lacks portable trigger metadata.")
|
|
@@ -8830,7 +8831,7 @@ def validate_authoring_alignment_overlay_scenario() -> int:
|
|
|
8830
8831
|
if (
|
|
8831
8832
|
content.count(OPENSPEC_SURFACE_OVERLAY_START) != 1
|
|
8832
8833
|
or "Keel Authoring Overlay" not in content
|
|
8833
|
-
or "
|
|
8834
|
+
or "align-expectations" not in content
|
|
8834
8835
|
):
|
|
8835
8836
|
report(
|
|
8836
8837
|
"authoring-alignment-overlay Claude propose surface lacks "
|
|
@@ -8856,7 +8857,7 @@ def validate_authoring_alignment_overlay_scenario() -> int:
|
|
|
8856
8857
|
if (
|
|
8857
8858
|
content.count(OPENSPEC_SURFACE_OVERLAY_START) != 1
|
|
8858
8859
|
or "Keel Authoring Overlay" not in content
|
|
8859
|
-
or "
|
|
8860
|
+
or "align-expectations" not in content
|
|
8860
8861
|
):
|
|
8861
8862
|
report(
|
|
8862
8863
|
"authoring-alignment-overlay Codex propose surface lacks "
|
|
@@ -8882,7 +8883,7 @@ def validate_authoring_alignment_overlay_scenario() -> int:
|
|
|
8882
8883
|
codex_repo / ".agents/skills/openspec-apply-change/SKILL.md"
|
|
8883
8884
|
).read_text(encoding="utf-8")
|
|
8884
8885
|
if (
|
|
8885
|
-
"rerun `
|
|
8886
|
+
"rerun `align-expectations`" not in apply_skill
|
|
8886
8887
|
or "repository fact" not in apply_skill
|
|
8887
8888
|
):
|
|
8888
8889
|
report(
|
|
@@ -10240,7 +10241,7 @@ def validate_a_task_field_cites_its_provenance_scenario() -> int:
|
|
|
10240
10241
|
The contextual-hash rule matched a context word and a hash-shaped token
|
|
10241
10242
|
anywhere on one line, and the dirty rule matched the bare word. Inside a
|
|
10242
10243
|
task field that reads cited provenance as recorded state: the base a Scope
|
|
10243
|
-
check compared against (which
|
|
10244
|
+
check compared against (which review-checklist asks it to name), the
|
|
10244
10245
|
commit a result ran on, a cache buffer's `dirty groups`, and a negation
|
|
10245
10246
|
about another checkout. Each accepted line below is one rtl_ppa_prj wrote,
|
|
10246
10247
|
shortened; line 262's shape is an Acceptance criterion of a checked task,
|
|
@@ -22,6 +22,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
|
22
22
|
from pathlib import Path
|
|
23
23
|
|
|
24
24
|
from validation.common import (
|
|
25
|
+
portable_projection_bytes,
|
|
25
26
|
OPENSPEC_SEARCH_ORDER,
|
|
26
27
|
OPENSPEC_SURFACE_OVERLAY_END,
|
|
27
28
|
OPENSPEC_SURFACE_OVERLAY_START,
|
|
@@ -77,16 +78,16 @@ def validate_decisions_are_selectable_scenario() -> int:
|
|
|
77
78
|
)
|
|
78
79
|
return 1
|
|
79
80
|
for root in ("src/skills", f"{PLUGIN_ROOT}/skills"):
|
|
80
|
-
path = ROOT / root / "
|
|
81
|
+
path = ROOT / root / "align-expectations" / "SKILL.md"
|
|
81
82
|
text = path.read_text(encoding="utf-8")
|
|
82
83
|
if not offers_choices(section(text, "## Deep path")):
|
|
83
84
|
report(
|
|
84
|
-
f"{label} {root}
|
|
85
|
+
f"{label} {root} align-expectations Deep path does not "
|
|
85
86
|
"offer decisions as selectable options."
|
|
86
87
|
)
|
|
87
88
|
return 1
|
|
88
89
|
if "AskUserQuestion" in text:
|
|
89
|
-
report(f"{label} {root}
|
|
90
|
+
report(f"{label} {root} align-expectations names a host tool.")
|
|
90
91
|
return 1
|
|
91
92
|
if "decisions-are-selectable" not in {name for name, _ in registry.SCENARIOS}:
|
|
92
93
|
report(f"{label} scenario is not registered.")
|
|
@@ -695,8 +696,8 @@ def validate_continuation_docs_scenario() -> int:
|
|
|
695
696
|
def validate_plan_funnel_guidance_scenario() -> int:
|
|
696
697
|
# The funnel is a conditional check, read on demand since #411.
|
|
697
698
|
skill_copies = (
|
|
698
|
-
ROOT / "src/skills/
|
|
699
|
-
ROOT / PLUGIN_ROOT / "skills/
|
|
699
|
+
ROOT / "src/skills/review-checklist/conditional-checks.md",
|
|
700
|
+
ROOT / PLUGIN_ROOT / "skills/review-checklist/conditional-checks.md",
|
|
700
701
|
)
|
|
701
702
|
for copy in skill_copies:
|
|
702
703
|
text = copy.read_text(encoding="utf-8")
|
|
@@ -713,7 +714,7 @@ def validate_plan_funnel_guidance_scenario() -> int:
|
|
|
713
714
|
return 1
|
|
714
715
|
if skill_copies[0].read_bytes() != skill_copies[1].read_bytes():
|
|
715
716
|
report(
|
|
716
|
-
"plan-funnel-guidance: shipped
|
|
717
|
+
"plan-funnel-guidance: shipped review-checklist copy diverges "
|
|
717
718
|
"from the canonical source."
|
|
718
719
|
)
|
|
719
720
|
return 1
|
|
@@ -1432,8 +1433,8 @@ def validate_surfaces_agree_with_code_scenario() -> int:
|
|
|
1432
1433
|
ROOT / "assets/bootstrap/AGENTS.md": [
|
|
1433
1434
|
"No commit, push, sync, or archive unless the task, the owner, or `keel/config.yaml` authorizes it.",
|
|
1434
1435
|
],
|
|
1435
|
-
ROOT / "src/skills/
|
|
1436
|
-
ROOT / PLUGIN_ROOT / "skills/
|
|
1436
|
+
ROOT / "src/skills/debug-failure/SKILL.md": ["expected rather than a stop"],
|
|
1437
|
+
ROOT / PLUGIN_ROOT / "skills/debug-failure/SKILL.md": ["expected rather than a stop"],
|
|
1437
1438
|
ROOT / "bin/keel.js": [],
|
|
1438
1439
|
ROOT / "src/core/config.js": [],
|
|
1439
1440
|
}
|
|
@@ -1709,11 +1710,11 @@ def validate_tdd_strategy_guide_scenario() -> int:
|
|
|
1709
1710
|
enforces; before #389 the skill named two of them and `AGENTS.md` the rest.
|
|
1710
1711
|
"""
|
|
1711
1712
|
label = "tdd-strategy-guide"
|
|
1712
|
-
skill_dir = ROOT / "src/skills/
|
|
1713
|
-
plugin_dir = ROOT / PLUGIN_ROOT / "skills/
|
|
1713
|
+
skill_dir = ROOT / "src/skills/tdd-or-test-first"
|
|
1714
|
+
plugin_dir = ROOT / PLUGIN_ROOT / "skills/tdd-or-test-first"
|
|
1714
1715
|
guidance = skill_dir / "guidance.md"
|
|
1715
1716
|
if not guidance.is_file():
|
|
1716
|
-
report(f"{label}:
|
|
1717
|
+
report(f"{label}: tdd-or-test-first has no guidance.md beside its SKILL.md.")
|
|
1717
1718
|
return 1
|
|
1718
1719
|
contract = (ROOT / "src/core/task-contract.js").read_text(encoding="utf-8")
|
|
1719
1720
|
declared = re.search(
|
|
@@ -1752,10 +1753,10 @@ def validate_tdd_strategy_guide_scenario() -> int:
|
|
|
1752
1753
|
for name in ("SKILL.md", "guidance.md"):
|
|
1753
1754
|
shipped = plugin_dir / name
|
|
1754
1755
|
if not shipped.is_file():
|
|
1755
|
-
report(f"{label}: the plugin has no
|
|
1756
|
+
report(f"{label}: the plugin has no tdd-or-test-first/{name}.")
|
|
1756
1757
|
return 1
|
|
1757
|
-
if shipped
|
|
1758
|
-
report(f"{label}: the plugin's
|
|
1758
|
+
if portable_projection_bytes(shipped) != (skill_dir / name).read_bytes():
|
|
1759
|
+
report(f"{label}: the plugin's tdd-or-test-first/{name} diverges from the canonical source.")
|
|
1759
1760
|
return 1
|
|
1760
1761
|
if label not in {name for name, _ in registry.SCENARIOS}:
|
|
1761
1762
|
report(f"{label}: the scenario registry does not include it.")
|
|
@@ -1826,7 +1827,7 @@ def validate_review_checklist_conditional_checks_scenario() -> int:
|
|
|
1826
1827
|
the shift note, which selects no task.
|
|
1827
1828
|
"""
|
|
1828
1829
|
label = "review-checklist-conditional-checks:"
|
|
1829
|
-
skill_dir = ROOT / "src/skills/
|
|
1830
|
+
skill_dir = ROOT / "src/skills/review-checklist"
|
|
1830
1831
|
base = (skill_dir / "SKILL.md").read_text(encoding="utf-8")
|
|
1831
1832
|
conditional_path = skill_dir / "conditional-checks.md"
|
|
1832
1833
|
if "conditional-checks.md" not in base:
|
|
@@ -1852,7 +1853,7 @@ def validate_review_checklist_conditional_checks_scenario() -> int:
|
|
|
1852
1853
|
if needle not in conditional:
|
|
1853
1854
|
report(f"{label} conditional-checks.md does not hold {needle!r}.")
|
|
1854
1855
|
return 1
|
|
1855
|
-
handoff = (ROOT / "src/skills/
|
|
1856
|
+
handoff = (ROOT / "src/skills/handoff/SKILL.md").read_text(encoding="utf-8")
|
|
1856
1857
|
if "keel shift ready" not in handoff:
|
|
1857
1858
|
report(f"{label} the handoff skill does not name the shift note's `keel shift ready`.")
|
|
1858
1859
|
return 1
|