@christang/keel 5.232.0 → 5.232.1
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/assets/bootstrap/AGENTS.md +1 -1
- package/bin/keel.js +33 -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/plugin.json +1 -1
- package/plugins/keel/scripts/session-start.js +14 -3
- package/scripts/validation/agy.py +125 -0
- package/scripts/validation/common.py +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.232.
|
|
3
|
+
"version": "5.232.1",
|
|
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/bin/keel.js
CHANGED
|
@@ -1904,7 +1904,8 @@ function codexOpenSpecLayout(repo) {
|
|
|
1904
1904
|
: "agents";
|
|
1905
1905
|
}
|
|
1906
1906
|
|
|
1907
|
-
function openspecSkillRootForTarget(target, repo) {
|
|
1907
|
+
function openspecSkillRootForTarget(target, repo, host = target) {
|
|
1908
|
+
if (host === "agy") return path.join(".agents", "skills");
|
|
1908
1909
|
if (target === "claude") return path.join(".claude", "skills");
|
|
1909
1910
|
if (target === "codex") {
|
|
1910
1911
|
return codexOpenSpecLayout(repo) === "legacy"
|
|
@@ -1914,7 +1915,15 @@ function openspecSkillRootForTarget(target, repo) {
|
|
|
1914
1915
|
return path.join(".opencode", "skills");
|
|
1915
1916
|
}
|
|
1916
1917
|
|
|
1917
|
-
function commandSurfaceForTarget(target, repo) {
|
|
1918
|
+
function commandSurfaceForTarget(target, repo, host = target) {
|
|
1919
|
+
if (host === "agy") {
|
|
1920
|
+
return {
|
|
1921
|
+
location: path.join(".agents", "skills"),
|
|
1922
|
+
paths: [],
|
|
1923
|
+
remediation: "run keel --init --target agy or openspec update --force",
|
|
1924
|
+
skillsOnly: true,
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1918
1927
|
if (target === "claude") {
|
|
1919
1928
|
const location = path.join(".claude", "commands", "opsx");
|
|
1920
1929
|
return {
|
|
@@ -1958,7 +1967,8 @@ function commandSurfaceForTarget(target, repo) {
|
|
|
1958
1967
|
};
|
|
1959
1968
|
}
|
|
1960
1969
|
|
|
1961
|
-
function commandPathForAction(target, repo, action) {
|
|
1970
|
+
function commandPathForAction(target, repo, action, host = target) {
|
|
1971
|
+
if (host === "agy") return null;
|
|
1962
1972
|
if (target === "claude") {
|
|
1963
1973
|
return path.join(repo, ".claude", "commands", "opsx", `${action}.md`);
|
|
1964
1974
|
}
|
|
@@ -1970,8 +1980,8 @@ function commandPathForAction(target, repo, action) {
|
|
|
1970
1980
|
return path.join(repo, ".opencode", "commands", `opsx-${action}.md`);
|
|
1971
1981
|
}
|
|
1972
1982
|
|
|
1973
|
-
function openspecOverlaySurfacesForTarget(target, repo) {
|
|
1974
|
-
const skillRoot = openspecSkillRootForTarget(target, repo);
|
|
1983
|
+
function openspecOverlaySurfacesForTarget(target, repo, host = target) {
|
|
1984
|
+
const skillRoot = openspecSkillRootForTarget(target, repo, host);
|
|
1975
1985
|
return OPENSPEC_OVERLAY_ACTIONS.flatMap((action) => {
|
|
1976
1986
|
if (action === "propose" && target === "opencode") {
|
|
1977
1987
|
return [];
|
|
@@ -1985,7 +1995,7 @@ function openspecOverlaySurfacesForTarget(target, repo) {
|
|
|
1985
1995
|
// Claude and OpenCode command files are no longer generated (#406); one a
|
|
1986
1996
|
// repository still holds from a `both` delivery keeps its overlay until
|
|
1987
1997
|
// the next `keel --init` removes it.
|
|
1988
|
-
const command = commandPathForAction(target, repo, action);
|
|
1998
|
+
const command = commandPathForAction(target, repo, action, host);
|
|
1989
1999
|
const keepsCommand = command !== null
|
|
1990
2000
|
&& (target === "codex" || fs.existsSync(command));
|
|
1991
2001
|
return [
|
|
@@ -2374,6 +2384,7 @@ function printAgySurface(repo) {
|
|
|
2374
2384
|
|
|
2375
2385
|
function printTargetSurface(repo, target, host = target) {
|
|
2376
2386
|
process.stdout.write("\nTarget surface:\n");
|
|
2387
|
+
const remedyTarget = host === "agy" ? "agy" : target;
|
|
2377
2388
|
|
|
2378
2389
|
const agentsPath = path.join(repo, "AGENTS.md");
|
|
2379
2390
|
const hasBootstrap =
|
|
@@ -2386,7 +2397,7 @@ function printTargetSurface(repo, target, host = target) {
|
|
|
2386
2397
|
hasBootstrap ? "ok" : "missing",
|
|
2387
2398
|
hasBootstrap
|
|
2388
2399
|
? "AGENTS.md carries the Keel managed bootstrap block"
|
|
2389
|
-
: `AGENTS.md bootstrap missing; run keel --install --target ${
|
|
2400
|
+
: `AGENTS.md bootstrap missing; run keel --install --target ${remedyTarget}`
|
|
2390
2401
|
);
|
|
2391
2402
|
if (target === "claude") {
|
|
2392
2403
|
const claudePath = path.join(repo, "CLAUDE.md");
|
|
@@ -2466,15 +2477,21 @@ function printTargetSurface(repo, target, host = target) {
|
|
|
2466
2477
|
}
|
|
2467
2478
|
}
|
|
2468
2479
|
|
|
2469
|
-
const openspecSkillRoot = openspecSkillRootForTarget(target, repo);
|
|
2480
|
+
const openspecSkillRoot = openspecSkillRootForTarget(target, repo, host);
|
|
2470
2481
|
const openspecSkillPaths = OPENSPEC_SKILLS.map((skill) =>
|
|
2471
2482
|
path.join(repo, openspecSkillRoot, skill, "SKILL.md")
|
|
2472
2483
|
);
|
|
2473
2484
|
const openspecSkillCounts = countExisting(openspecSkillPaths);
|
|
2485
|
+
const agyLegacyNote =
|
|
2486
|
+
host === "agy"
|
|
2487
|
+
&& openspecSkillCounts.existing < openspecSkillCounts.total
|
|
2488
|
+
&& codexOpenSpecLayout(repo) === "legacy"
|
|
2489
|
+
? "; legacy .codex/skills found, which AGY does not read — run keel --init --target agy"
|
|
2490
|
+
: "";
|
|
2474
2491
|
printDoctorLine(
|
|
2475
2492
|
"OpenSpec action skills",
|
|
2476
2493
|
surfaceStatus(openspecSkillCounts),
|
|
2477
|
-
formatCount(openspecSkillCounts, openspecSkillRoot)
|
|
2494
|
+
`${formatCount(openspecSkillCounts, openspecSkillRoot)}${agyLegacyNote}`
|
|
2478
2495
|
);
|
|
2479
2496
|
|
|
2480
2497
|
printDoctorLine(
|
|
@@ -2488,7 +2505,7 @@ function printTargetSurface(repo, target, host = target) {
|
|
|
2488
2505
|
+ "installation from this repository"
|
|
2489
2506
|
);
|
|
2490
2507
|
|
|
2491
|
-
const commands = commandSurfaceForTarget(target, repo);
|
|
2508
|
+
const commands = commandSurfaceForTarget(target, repo, host);
|
|
2492
2509
|
if (commands.retired) {
|
|
2493
2510
|
const leftover = commands.paths.filter((file) => fs.existsSync(file));
|
|
2494
2511
|
printDoctorLine(
|
|
@@ -2503,7 +2520,7 @@ function printTargetSurface(repo, target, host = target) {
|
|
|
2503
2520
|
printDoctorLine(
|
|
2504
2521
|
"OpenSpec commands",
|
|
2505
2522
|
"ok",
|
|
2506
|
-
`none; OpenSpec 1.13 and later surface Codex's workflows as the skills under `
|
|
2523
|
+
`none; OpenSpec 1.13 and later surface ${host === "agy" ? "AGY" : "Codex"}'s workflows as the skills under `
|
|
2507
2524
|
+ `${commands.location}`
|
|
2508
2525
|
);
|
|
2509
2526
|
} else {
|
|
@@ -2519,7 +2536,7 @@ function printTargetSurface(repo, target, host = target) {
|
|
|
2519
2536
|
);
|
|
2520
2537
|
}
|
|
2521
2538
|
|
|
2522
|
-
const overlayPaths = openspecOverlaySurfacesForTarget(target, repo).map(
|
|
2539
|
+
const overlayPaths = openspecOverlaySurfacesForTarget(target, repo, host).map(
|
|
2523
2540
|
(surface) => surface.path
|
|
2524
2541
|
);
|
|
2525
2542
|
const overlayCounts = countOpenSpecOverlays(overlayPaths);
|
|
@@ -2529,7 +2546,7 @@ function printTargetSurface(repo, target, host = target) {
|
|
|
2529
2546
|
: `${overlayCountDetail(
|
|
2530
2547
|
overlayCounts,
|
|
2531
2548
|
`${overlayActionLabel()} skills and commands`
|
|
2532
|
-
)}; ${overlayRemediation(
|
|
2549
|
+
)}; ${overlayRemediation(remedyTarget)}`;
|
|
2533
2550
|
printDoctorLine(
|
|
2534
2551
|
`Keel ${overlayActionLabel()} overlay`,
|
|
2535
2552
|
overlayStatus(overlayCounts),
|
|
@@ -2621,6 +2638,7 @@ function runDoctor(options) {
|
|
|
2621
2638
|
|
|
2622
2639
|
const surfaces = surfaceGeneratorVersion(repo);
|
|
2623
2640
|
const running = openspec ? openspecReportedVersion(openspec) : null;
|
|
2641
|
+
const doctorRemedyTarget = options.host === "agy" ? "agy" : options.target;
|
|
2624
2642
|
if (surfaces && running) {
|
|
2625
2643
|
const newer = compareVersions(surfaces, running) > 0;
|
|
2626
2644
|
printDoctorLine(
|
|
@@ -2629,13 +2647,13 @@ function runDoctor(options) {
|
|
|
2629
2647
|
newer
|
|
2630
2648
|
? `written by OpenSpec ${surfaces}, newer than the OpenSpec Keel runs `
|
|
2631
2649
|
+ `(${running}); keel --init leaves them unrewritten rather than `
|
|
2632
|
-
+ `downgrading them, and keel --install --target ${
|
|
2650
|
+
+ `downgrading them, and keel --install --target ${doctorRemedyTarget} `
|
|
2633
2651
|
+ "refreshes the protocol without touching them"
|
|
2634
2652
|
: `written by OpenSpec ${surfaces}; Keel runs ${running}`
|
|
2635
2653
|
);
|
|
2636
2654
|
}
|
|
2637
2655
|
|
|
2638
|
-
printProtocolVersionDrift(repo,
|
|
2656
|
+
printProtocolVersionDrift(repo, doctorRemedyTarget);
|
|
2639
2657
|
|
|
2640
2658
|
process.stdout.write("\nProject status:\n");
|
|
2641
2659
|
const checkStatus = runPython(
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.232.
|
|
3
|
+
"version": "5.232.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.232.
|
|
9
|
+
"version": "5.232.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fission-ai/openspec": "1.14.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.232.
|
|
3
|
+
"version": "5.232.1",
|
|
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.232.
|
|
3
|
+
"version": "5.232.1",
|
|
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/plugins/keel/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.232.
|
|
3
|
+
"version": "5.232.1",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Antigravity (AGY), Codex, and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -350,9 +350,12 @@ function versionReport(cwd, cli, pathCli = null) {
|
|
|
350
350
|
+ "the command `keel context` names on its Protocol: line.");
|
|
351
351
|
}
|
|
352
352
|
const remedy = parts.join(" ");
|
|
353
|
+
const reloadAdvice = agyMode
|
|
354
|
+
? "at the next session start."
|
|
355
|
+
: "after `/reload-plugins` or at the next session start.";
|
|
353
356
|
return `runtime versions disagree: ${named}${missing}. A session's hooks are `
|
|
354
|
-
+
|
|
355
|
-
+
|
|
357
|
+
+ `fixed when it loads the plugin, so an updated plugin applies ${reloadAdvice} `
|
|
358
|
+
+ `${remedy}${shadow}`;
|
|
356
359
|
}
|
|
357
360
|
|
|
358
361
|
// A handed-off run (forward.js, #204) executes the installed version, so its
|
|
@@ -590,8 +593,16 @@ function main() {
|
|
|
590
593
|
event = {};
|
|
591
594
|
}
|
|
592
595
|
agyMode = isAgyEvent(event);
|
|
596
|
+
const workspacePath =
|
|
597
|
+
Array.isArray(event.workspacePaths)
|
|
598
|
+
&& typeof event.workspacePaths[0] === "string"
|
|
599
|
+
&& event.workspacePaths[0]
|
|
600
|
+
? event.workspacePaths[0]
|
|
601
|
+
: "";
|
|
593
602
|
const cwd =
|
|
594
|
-
typeof event.cwd === "string" && event.cwd
|
|
603
|
+
typeof event.cwd === "string" && event.cwd
|
|
604
|
+
? event.cwd
|
|
605
|
+
: (workspacePath || process.cwd());
|
|
595
606
|
|
|
596
607
|
if (!fs.existsSync(path.join(cwd, "openspec"))) {
|
|
597
608
|
return shiftOnly(cwd);
|
|
@@ -254,6 +254,38 @@ def validate_agy_session_start_scenario() -> int:
|
|
|
254
254
|
if "claude plugin update" in drift_body:
|
|
255
255
|
report(f"agy-session-start: AGY drift message must not recommend claude plugin update: {drift_body!r}")
|
|
256
256
|
return 1
|
|
257
|
+
if "/reload-plugins" in drift_body:
|
|
258
|
+
report(f"agy-session-start: AGY drift message must not mention Claude /reload-plugins: {drift_body!r}")
|
|
259
|
+
return 1
|
|
260
|
+
if "at the next session start" not in drift_body:
|
|
261
|
+
report(f"agy-session-start: AGY drift message missing next session start guidance: {drift_body!r}")
|
|
262
|
+
return 1
|
|
263
|
+
|
|
264
|
+
# 3b) AGY workspacePaths fallback when event.cwd is absent (hook runs in plugin dir)
|
|
265
|
+
ws_event = {
|
|
266
|
+
"conversationId": "conv-agy-ws",
|
|
267
|
+
"workspacePaths": [str(repo)],
|
|
268
|
+
"hookEventName": "SessionStart",
|
|
269
|
+
}
|
|
270
|
+
res_ws = subprocess.run(
|
|
271
|
+
["node", str(plugin_copy / "scripts" / "session-start.js"), "--host", "agy"],
|
|
272
|
+
input=json.dumps(ws_event),
|
|
273
|
+
capture_output=True,
|
|
274
|
+
text=True,
|
|
275
|
+
env=env,
|
|
276
|
+
cwd=str(plugin_copy),
|
|
277
|
+
check=False,
|
|
278
|
+
)
|
|
279
|
+
if res_ws.returncode != 0:
|
|
280
|
+
report(f"agy-session-start: workspacePaths fallback exited {res_ws.returncode}: {res_ws.stderr.strip()}")
|
|
281
|
+
return 1
|
|
282
|
+
if not res_ws.stdout.strip():
|
|
283
|
+
report("agy-session-start: workspacePaths fallback emitted empty stdout when event.cwd was absent")
|
|
284
|
+
return 1
|
|
285
|
+
ws_body = json.loads(res_ws.stdout)["injectSteps"][0]["systemMessage"]["systemMessage"]
|
|
286
|
+
if "Keel session projection" not in ws_body:
|
|
287
|
+
report(f"agy-session-start: workspacePaths fallback lacked projection header: {ws_body!r}")
|
|
288
|
+
return 1
|
|
257
289
|
|
|
258
290
|
# 4) Claude stdin still emits hookSpecificOutput and reads .claude-plugin remedy
|
|
259
291
|
claude_copy = base / "claude-copy"
|
|
@@ -282,6 +314,9 @@ def validate_agy_session_start_scenario() -> int:
|
|
|
282
314
|
if "`claude plugin update`" not in hso.get("additionalContext", ""):
|
|
283
315
|
report(f"agy-session-start: Claude lost its update remedy: {hso!r}")
|
|
284
316
|
return 1
|
|
317
|
+
if "/reload-plugins" not in hso.get("additionalContext", ""):
|
|
318
|
+
report(f"agy-session-start: Claude lost its /reload-plugins guidance: {hso!r}")
|
|
319
|
+
return 1
|
|
285
320
|
|
|
286
321
|
print("agy-session-start scenario passed.")
|
|
287
322
|
return 0
|
|
@@ -632,6 +667,54 @@ def validate_agy_init_doctor_update_scenario() -> int:
|
|
|
632
667
|
if "disabled" not in doc_present.stdout:
|
|
633
668
|
report(f"agy-init-doctor-update: doctor did not report disabled keel entry from config.json: {doc_present.stdout!r}")
|
|
634
669
|
return 1
|
|
670
|
+
if "OpenSpec action skills: ok - 5/5 under .agents/skills" not in doc_present.stdout:
|
|
671
|
+
report(f"agy-init-doctor-update: fresh AGY doctor did not report 5/5 under .agents/skills: {doc_present.stdout!r}")
|
|
672
|
+
return 1
|
|
673
|
+
if "Codex's workflows" in doc_present.stdout:
|
|
674
|
+
report(f"agy-init-doctor-update: fresh AGY doctor leaked Codex's workflows wording: {doc_present.stdout!r}")
|
|
675
|
+
return 1
|
|
676
|
+
if "--target codex" in doc_present.stdout:
|
|
677
|
+
report(f"agy-init-doctor-update: fresh AGY doctor leaked --target codex: {doc_present.stdout!r}")
|
|
678
|
+
return 1
|
|
679
|
+
|
|
680
|
+
# 3b) Legacy OpenSpec 1.6 repo (.codex/skills only, no .agents/skills): AGY must report missing honestly without Codex prompts leakage
|
|
681
|
+
legacy_repo = base / "legacy-repo"
|
|
682
|
+
legacy_repo.mkdir()
|
|
683
|
+
(legacy_repo / "AGENTS.md").write_text("<!-- keel:start version=5.0.0 -->\n# legacy\n<!-- keel:end -->\n", encoding="utf-8")
|
|
684
|
+
(legacy_repo / "keel").mkdir()
|
|
685
|
+
(legacy_repo / "openspec" / "schemas" / "keel-spec-driven").mkdir(parents=True)
|
|
686
|
+
for skill in ("openspec-propose", "openspec-explore", "openspec-apply-change", "openspec-archive-change", "openspec-sync-specs"):
|
|
687
|
+
sdir = legacy_repo / ".codex" / "skills" / skill
|
|
688
|
+
sdir.mkdir(parents=True)
|
|
689
|
+
(sdir / "SKILL.md").write_text(f"---\nname: {skill}\n---\n", encoding="utf-8")
|
|
690
|
+
doc_legacy = run_keel(legacy_repo, "--doctor", "--target", "agy", env=env_stub)
|
|
691
|
+
if doc_legacy.returncode != 0:
|
|
692
|
+
report(f"agy-init-doctor-update: legacy repo doctor exited {doc_legacy.returncode}: {(doc_legacy.stderr or doc_legacy.stdout).strip()}")
|
|
693
|
+
return 1
|
|
694
|
+
if "OpenSpec action skills: missing" not in doc_legacy.stdout:
|
|
695
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor must report OpenSpec action skills missing: {doc_legacy.stdout!r}")
|
|
696
|
+
return 1
|
|
697
|
+
if ".agents/skills" not in doc_legacy.stdout:
|
|
698
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor did not check .agents/skills: {doc_legacy.stdout!r}")
|
|
699
|
+
return 1
|
|
700
|
+
if "OpenSpec action skills: ok - 5/5 under .codex/skills" in doc_legacy.stdout:
|
|
701
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor falsely reported .codex/skills as ok: {doc_legacy.stdout!r}")
|
|
702
|
+
return 1
|
|
703
|
+
if ".codex/skills" not in doc_legacy.stdout:
|
|
704
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor did not mention legacy .codex/skills: {doc_legacy.stdout!r}")
|
|
705
|
+
return 1
|
|
706
|
+
if "AGY does not read" not in doc_legacy.stdout:
|
|
707
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor did not explain AGY does not read .codex/skills: {doc_legacy.stdout!r}")
|
|
708
|
+
return 1
|
|
709
|
+
if "prompts" in doc_legacy.stdout:
|
|
710
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor leaked Codex prompts check: {doc_legacy.stdout!r}")
|
|
711
|
+
return 1
|
|
712
|
+
if "--target codex" in doc_legacy.stdout:
|
|
713
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor leaked --target codex: {doc_legacy.stdout!r}")
|
|
714
|
+
return 1
|
|
715
|
+
if "--target agy" not in doc_legacy.stdout:
|
|
716
|
+
report(f"agy-init-doctor-update: legacy repo AGY doctor missing --target agy remedy: {doc_legacy.stdout!r}")
|
|
717
|
+
return 1
|
|
635
718
|
|
|
636
719
|
# 4) --uninstall --target agy --dry-run states shared surface and keeps .claude untouched
|
|
637
720
|
init_claude = run_keel(repo, "--init", "--target", "claude", env=env_stub)
|
|
@@ -766,5 +849,47 @@ def validate_agy_docs_scenario() -> int:
|
|
|
766
849
|
report(f"agy-docs: {name} targets badge does not name AGY")
|
|
767
850
|
return 1
|
|
768
851
|
|
|
852
|
+
updating = (ROOT / "docs" / "updating.md").read_text(encoding="utf-8")
|
|
853
|
+
if "AGY" not in updating:
|
|
854
|
+
report("agy-docs: docs/updating.md does not document AGY")
|
|
855
|
+
return 1
|
|
856
|
+
if "agy plugin" not in updating:
|
|
857
|
+
report("agy-docs: docs/updating.md does not name agy plugin")
|
|
858
|
+
return 1
|
|
859
|
+
|
|
860
|
+
for name in ("docs/commands.md", "docs/commands.zh-CN.md"):
|
|
861
|
+
doc_text = (ROOT / name).read_text(encoding="utf-8")
|
|
862
|
+
if "AGY" not in doc_text:
|
|
863
|
+
report(f"agy-docs: {name} does not document AGY")
|
|
864
|
+
return 1
|
|
865
|
+
|
|
866
|
+
overlay_marker = f"<!-- keel:openspec-surface-overlay version={PACKAGE_VERSION} -->"
|
|
867
|
+
for skill in ("openspec-propose", "openspec-explore", "openspec-apply-change", "openspec-archive-change", "openspec-sync-specs"):
|
|
868
|
+
skill_path = ROOT / ".agents" / "skills" / skill / "SKILL.md"
|
|
869
|
+
if not skill_path.is_file():
|
|
870
|
+
report(f"agy-docs: missing repo AGY OpenSpec skill {skill_path.relative_to(ROOT)}")
|
|
871
|
+
return 1
|
|
872
|
+
if skill != "openspec-explore" and overlay_marker not in skill_path.read_text(encoding="utf-8"):
|
|
873
|
+
report(f"agy-docs: {skill_path.relative_to(ROOT)} missing current overlay marker {overlay_marker}")
|
|
874
|
+
return 1
|
|
875
|
+
|
|
876
|
+
if not (ROOT / ".codex" / "skills" / "openspec-apply-change" / "SKILL.md").is_file():
|
|
877
|
+
report("agy-docs: legacy .codex/skills/openspec-apply-change/SKILL.md must stay intact")
|
|
878
|
+
return 1
|
|
879
|
+
|
|
880
|
+
with tempfile.TemporaryDirectory(prefix="keel-agy-rootdoc-") as raw_doc:
|
|
881
|
+
doc_base = Path(raw_doc).resolve()
|
|
882
|
+
doc_env = _agy_cli_env(doc_base, doc_base / "agy-cfg")
|
|
883
|
+
root_doc = run_keel(ROOT, "--doctor", "--target", "agy", env=doc_env)
|
|
884
|
+
if root_doc.returncode != 0:
|
|
885
|
+
report(f"agy-docs: --doctor --target agy on ROOT exited {root_doc.returncode}")
|
|
886
|
+
return 1
|
|
887
|
+
if "OpenSpec action skills: ok - 5/5 under .agents/skills" not in root_doc.stdout:
|
|
888
|
+
report(f"agy-docs: --doctor --target agy on ROOT missing 5/5 under .agents/skills: {root_doc.stdout!r}")
|
|
889
|
+
return 1
|
|
890
|
+
if "Keel apply/archive/sync overlay: ok" not in root_doc.stdout:
|
|
891
|
+
report(f"agy-docs: --doctor --target agy on ROOT overlay not ok: {root_doc.stdout!r}")
|
|
892
|
+
return 1
|
|
893
|
+
|
|
769
894
|
print("agy-docs scenario passed.")
|
|
770
895
|
return 0
|
|
@@ -35,10 +35,10 @@ os.environ["KEEL_UPDATE_CLAUDE"] = str(Path(tempfile.gettempdir()) / "keel-suite
|
|
|
35
35
|
os.environ["KEEL_UPDATE_CODEX"] = str(Path(tempfile.gettempdir()) / "keel-suite-has-no-codex")
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
PACKAGE_VERSION = "5.232.
|
|
38
|
+
PACKAGE_VERSION = "5.232.1"
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
PROTOCOL_VERSION = "5.232.
|
|
41
|
+
PROTOCOL_VERSION = "5.232.1"
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
|