@christang/keel 5.231.13 → 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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.231.13",
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/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  **English** | [中文](README.zh-CN.md)
4
4
 
5
- > Execution and coordination for AI coding agents — Claude Code, Codex, OpenCode, and DSH.
5
+ > Execution and coordination for AI coding agents — Claude Code, Codex, OpenCode, DSH, and AGY.
6
6
 
7
7
  ![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)
8
8
  ![Node](https://img.shields.io/badge/node-%3E%3D20.19.0-brightgreen.svg)
9
- ![Targets](https://img.shields.io/badge/targets-Claude%20Code%20%C2%B7%20Codex%20%C2%B7%20OpenCode%20%C2%B7%20DSH-blue.svg)
9
+ ![Targets](https://img.shields.io/badge/targets-Claude%20Code%20%C2%B7%20Codex%20%C2%B7%20OpenCode%20%C2%B7%20DSH%20%C2%B7%20AGY-blue.svg)
10
10
 
11
11
  ## What Keel is for
12
12
 
@@ -202,9 +202,11 @@ In your project's root, set it up once:
202
202
 
203
203
  ```bash
204
204
  keel --init # default target: claude
205
- keel --init --target codex # or: opencode, dsh
205
+ keel --init --target codex # or: opencode, dsh, agy
206
206
  ```
207
207
 
208
+ `--target agy` (Google Antigravity) shares the `AGENTS.md` and `.agents/skills` repository surface with Codex and DSH, and ships a native AGY plugin manifest (`plugins/keel/plugin.json` and `plugins/keel/hooks.json`) providing `SessionStart` context projection and `PreToolUse` Touch/push guards (`edit_file`, `write_file`, `run_command`). Mount `plugins/` via `~/.gemini/config/plugins.json` or `.agents/plugins/` and run `keel --doctor --target agy` to inspect local AGY plugin configuration.
209
+
208
210
  `--target dsh` (DSH, DeepSeek Harness) writes, checks and removes exactly the files `--target codex` does: DSH reads the repository `AGENTS.md` and `.agents/skills`, so there is no separate DSH copy, and uninstalling one removes them for the other. DSH's factory profiles carry no session-start hook, so every capability is `manual` and the `AGENTS.md` bootstrap ("run `keel context` first") is the entry; `keel --doctor --target dsh` reports whether a `dsh` is on PATH and says so.
209
211
 
210
212
  `keel --init` runs OpenSpec init/update and writes Keel's host surface. Then, every time you
package/README.zh-CN.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  [English](README.md) | **中文**
4
4
 
5
- > 面向 AI 编码 agent 的执行与协作,支持 Claude Code、Codex、OpenCode 和 DSH。
5
+ > 面向 AI 编码 agent 的执行与协作,支持 Claude Code、Codex、OpenCode、DSH 和 AGY。
6
6
 
7
7
  ![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)
8
8
  ![Node](https://img.shields.io/badge/node-%3E%3D20.19.0-brightgreen.svg)
9
- ![Targets](https://img.shields.io/badge/targets-Claude%20Code%20%C2%B7%20Codex%20%C2%B7%20OpenCode%20%C2%B7%20DSH-blue.svg)
9
+ ![Targets](https://img.shields.io/badge/targets-Claude%20Code%20%C2%B7%20Codex%20%C2%B7%20OpenCode%20%C2%B7%20DSH%20%C2%B7%20AGY-blue.svg)
10
10
 
11
11
  ## Keel 是做什么的
12
12
 
@@ -173,9 +173,11 @@ Keel 托管的 Codex 团队通过 `keel codex start --role <role> --repo <worktr
173
173
 
174
174
  ```bash
175
175
  keel --init # 默认 target:claude
176
- keel --init --target codex # 或 opencode、dsh
176
+ keel --init --target codex # 或 opencode、dsh、agy
177
177
  ```
178
178
 
179
+ `--target agy`(Google Antigravity)与 Codex、DSH 共用仓库里的 `AGENTS.md` 和 `.agents/skills`,并在插件根目录自带 AGY 原生 manifest(`plugins/keel/plugin.json` 与 `plugins/keel/hooks.json`),提供 `SessionStart` 上下文投影与 `PreToolUse` 写守卫/推分支守卫(覆盖 `edit_file`、`write_file`、`run_command`)。通过 `~/.gemini/config/plugins.json` 或 `.agents/plugins/` 挂载后,可用 `keel --doctor --target agy` 检查本机 AGY 插件配置。
180
+
179
181
  `--target dsh`(DSH,DeepSeek Harness)写入、检查、移除的文件与 `--target codex` 完全相同:DSH 读仓库的 `AGENTS.md` 和 `.agents/skills`,所以没有单独的 DSH 副本,卸载其中一个会让另一个也失去这些文件。DSH 的出厂 profile 没有 session-start hook,所以六项能力都是 `manual`,入口是 `AGENTS.md` 的 bootstrap(「先运行 `keel context`」);`keel --doctor --target dsh` 会报告 PATH 上有没有 `dsh`。
180
182
 
181
183
  `keel --init` 会跑 OpenSpec 初始化/更新,并写入 Keel 的宿主面。之后每次开始或恢复工作:
@@ -1,9 +1,9 @@
1
- <!-- keel:start version=5.231.13 -->
1
+ <!-- keel:start version=5.232.1 -->
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.
5
5
  - Memory: write only what the next session would get wrong without it and the repository cannot answer, never a one-off slip; one fact per entry. Recheck it after a fix, at a release, and at a shift change.
6
- - Obey the selected task capsule: `keel gate task-start` before implementing, `--record` its fingerprint to Evidence `Contract`, which `task-complete` requires, before checking complete. Touch bounds product writes; the change's own dir is exempt. On Claude a passing `task-start` guards it by default (`--no-guard` opts out).
6
+ - Obey the selected task capsule: `keel gate task-start` before implementing, `--record` its fingerprint to Evidence `Contract`, which `task-complete` requires, before checking complete. Touch bounds product writes; the change's own dir is exempt. On Claude and AGY a passing `task-start` guards it by default (`--no-guard` opts out).
7
7
  - Work through an approved `tasks.md` in order, each task through its own gates. A subagent is the model's choice and is treated as the main agent is. No commit, push, sync, or archive unless the task, the owner, or `keel/config.yaml` authorizes it.
8
8
  - Route Full (the OpenSpec flow) for new features, interface or protocol changes, cross-module work, or over ~3 files / 100 lines; Lite for local fixes with no interface change. No gate checks routing; a project corrects the size bar with `full_mode_paths:` in `keel/config.yaml`, which `keel context` reports.
9
9
  - SessionStart projections are disposable views, never authority; without the plugin, run the commands by hand.
package/bin/keel.js CHANGED
@@ -50,7 +50,7 @@ const INSTALL_SCRIPT = path.join(PACKAGE_ROOT, "scripts", "install_to_repo.py");
50
50
  const DEFAULT_UPDATE_SOURCE = "@christang/keel";
51
51
  // `dsh` is a host, not a surface of its own: DSH reads the files the Codex target
52
52
  // writes, so parseArgs turns it into target `codex` and remembers the host (#504).
53
- const VALID_TARGETS = new Set(["claude", "codex", "opencode", "dsh", "both"]);
53
+ const VALID_TARGETS = new Set(["claude", "codex", "opencode", "dsh", "agy", "both"]);
54
54
  const KEEL_SKILLS = [
55
55
  "align-expectations",
56
56
  "debug-failure",
@@ -88,8 +88,8 @@ const HELP = `keel ${PACKAGE_JSON.version}
88
88
 
89
89
  Usage:
90
90
  keel context [repo] [--change name] [--task id] [--json] [--clear-handoff]
91
- keel capabilities [repo] [--target claude|codex|opencode|dsh] [--json]
92
- keel project --target claude|codex|opencode|dsh --event startup|resume|compaction|worktree [--expected-owner owner] [--change name] [--task id] [--json]
91
+ keel capabilities [repo] [--target claude|codex|opencode|dsh|agy] [--json]
92
+ keel project --target claude|codex|opencode|dsh|agy --event startup|resume|compaction|worktree [--expected-owner owner] [--change name] [--task id] [--json]
93
93
  keel gate task-start|task-complete [repo] [--change name] [--task id] [--base git-ref] [--no-guard] [--record] [--keep-evidence M1,M3] [--json]
94
94
  keel gate change-close [repo] [--change name] --action sync|archive [--base git-ref] [--json]
95
95
  keel guard start|status|clear [repo] [--change name] [--task id] [--force] [--json]
@@ -118,19 +118,19 @@ Usage:
118
118
  keel codex migration-status --plan <json-file> [--json]
119
119
  keel tick [--repo <path>] [--json] (one model-free step for a host scheduler; keel tick task prints the job)
120
120
  keel openspec [args...]
121
- keel --init [repo] [--target claude|codex|opencode|dsh] [--dry-run] [--force-template-update]
122
- keel --install [repo] [--target claude|codex|opencode|dsh] [--dry-run] [--force-template-update] [--with-git-hooks]
123
- keel --clear [repo] [--target claude|codex|opencode|dsh] [--dry-run]
124
- keel --uninstall [repo] [--target claude|codex|opencode|dsh] [--dry-run]
121
+ keel --init [repo] [--target claude|codex|opencode|dsh|agy] [--dry-run] [--force-template-update]
122
+ keel --install [repo] [--target claude|codex|opencode|dsh|agy] [--dry-run] [--force-template-update] [--with-git-hooks]
123
+ keel --clear [repo] [--target claude|codex|opencode|dsh|agy] [--dry-run]
124
+ keel --uninstall [repo] [--target claude|codex|opencode|dsh|agy] [--dry-run]
125
125
  keel --update [--dry-run] [--source npm-package-or-git-spec] [--adopt]
126
- keel --check [repo] [--target claude|codex|opencode|dsh]
127
- keel --doctor [repo] [--target claude|codex|opencode|dsh]
126
+ keel --check [repo] [--target claude|codex|opencode|dsh|agy]
127
+ keel --doctor [repo] [--target claude|codex|opencode|dsh|agy]
128
128
  keel --version
129
129
  keel --help
130
130
 
131
131
  Defaults:
132
132
  repo defaults to the current working directory.
133
- target defaults to claude. dsh is DSH (DeepSeek Harness), which reads the files the codex target writes.
133
+ target defaults to claude. dsh is DSH (DeepSeek Harness) and agy is Google Antigravity (AGY); both share Codex's repository surface (AGENTS.md and .agents/skills).
134
134
  --update refreshes the global keel CLI and the Claude and Codex plugins it
135
135
  finds installed, not project protocol files.
136
136
  update source defaults to ${DEFAULT_UPDATE_SOURCE}.
@@ -382,7 +382,7 @@ function parseArgs(argv) {
382
382
  if (arg === "--target") {
383
383
  index += 1;
384
384
  if (index >= argv.length) {
385
- fail("--target requires claude, codex, opencode, or dsh");
385
+ fail("--target requires claude, codex, opencode, dsh, or agy");
386
386
  }
387
387
  parsed.target = argv[index];
388
388
  continue;
@@ -475,7 +475,7 @@ function parseArgs(argv) {
475
475
  fail(`invalid target: ${parsed.target}`);
476
476
  }
477
477
  parsed.host = parsed.target;
478
- if (parsed.target === "dsh") {
478
+ if (parsed.target === "dsh" || parsed.target === "agy") {
479
479
  parsed.target = "codex";
480
480
  }
481
481
  if (
@@ -1421,11 +1421,94 @@ function updateGlobalCli(options, npm, source) {
1421
1421
  }
1422
1422
  }
1423
1423
 
1424
+ function agyConfigDir() {
1425
+ const configured = (process.env.KEEL_AGY_CONFIG_DIR || "").trim();
1426
+ return path.resolve(configured || path.join(os.homedir(), ".gemini", "config"));
1427
+ }
1428
+
1429
+ function expandHome(value) {
1430
+ if (typeof value !== "string") return "";
1431
+ if (value === "~") return os.homedir();
1432
+ if (value.startsWith("~/")) return path.join(os.homedir(), value.slice(2));
1433
+ return value;
1434
+ }
1435
+
1436
+ function inspectAgyPlugins(repo) {
1437
+ const configDir = agyConfigDir();
1438
+ const globalPluginsJson = path.join(configDir, "plugins.json");
1439
+ const globalPluginsDir = path.join(configDir, "plugins", "keel", "plugin.json");
1440
+ const globalConfigJson = path.join(configDir, "config.json");
1441
+ const sources = [];
1442
+ let disabled = false;
1443
+
1444
+ if (fs.existsSync(globalPluginsJson)) {
1445
+ try {
1446
+ const parsed = JSON.parse(fs.readFileSync(globalPluginsJson, "utf8"));
1447
+ const entries = Array.isArray(parsed.entries) ? parsed.entries : [];
1448
+ for (const entry of entries) {
1449
+ const rawPath = entry && typeof entry.path === "string" ? entry.path : "";
1450
+ if (!rawPath) continue;
1451
+ const resolved = path.resolve(expandHome(rawPath));
1452
+ const hasKeel =
1453
+ fs.existsSync(path.join(resolved, "keel", "plugin.json"))
1454
+ || (path.basename(resolved) === "keel" && fs.existsSync(path.join(resolved, "plugin.json")));
1455
+ if (hasKeel) {
1456
+ sources.push(`${globalPluginsJson} -> ${rawPath}`);
1457
+ }
1458
+ }
1459
+ } catch {
1460
+ sources.push(`${globalPluginsJson} (unreadable)`);
1461
+ }
1462
+ }
1463
+ if (fs.existsSync(globalPluginsDir)) {
1464
+ sources.push(globalPluginsDir);
1465
+ }
1466
+ if (repo) {
1467
+ const wsPluginsDir = path.join(repo, ".agents", "plugins", "keel", "plugin.json");
1468
+ const wsPluginsJson = path.join(repo, ".agents", "plugins.json");
1469
+ if (fs.existsSync(wsPluginsDir)) {
1470
+ sources.push(".agents/plugins/keel/plugin.json");
1471
+ }
1472
+ if (fs.existsSync(wsPluginsJson)) {
1473
+ sources.push(".agents/plugins.json");
1474
+ }
1475
+ }
1476
+ if (fs.existsSync(globalConfigJson)) {
1477
+ try {
1478
+ const cfg = JSON.parse(fs.readFileSync(globalConfigJson, "utf8"));
1479
+ if (cfg && cfg.plugins && cfg.plugins.keel && cfg.plugins.keel.enabled === false) {
1480
+ disabled = true;
1481
+ }
1482
+ } catch {
1483
+ // Ignore unreadable config.json for disabled probe.
1484
+ }
1485
+ }
1486
+ return { configDir, globalPluginsJson, sources, disabled };
1487
+ }
1488
+
1489
+ function noticeAgyPlugin(options) {
1490
+ const info = inspectAgyPlugins(null);
1491
+ if (info.sources.length === 0) return true;
1492
+ if (options.dryRun) {
1493
+ process.stdout.write(
1494
+ `keel: would report read-only AGY plugin notice for ${info.sources.join(", ")} (leaves ${info.configDir} untouched)\n`
1495
+ );
1496
+ return true;
1497
+ }
1498
+ updateLine(
1499
+ "agy plugin",
1500
+ "manual",
1501
+ `configured via ${info.sources.join(", ")}${info.disabled ? " (disabled in config.json)" : ""}; `
1502
+ + "keel --update does not modify AGY config — update your Keel plugin checkout or reinstall via `agy plugin` and start a new AGY session"
1503
+ );
1504
+ return true;
1505
+ }
1506
+
1424
1507
  function runGlobalUpdate(options) {
1425
1508
  if (options.repo !== null) {
1426
1509
  fail("--update refreshes the global keel CLI and does not accept a repo path");
1427
1510
  }
1428
- if (options.target !== "claude") {
1511
+ if (options.target !== "claude" || (options.host && options.host !== "claude")) {
1429
1512
  fail("--update refreshes the global keel CLI and does not accept --target");
1430
1513
  }
1431
1514
  if (options.forceTemplateUpdate) {
@@ -1443,6 +1526,7 @@ function runGlobalUpdate(options) {
1443
1526
  updateClaudePlugin(options, npm),
1444
1527
  adoptClaudeSessions(options),
1445
1528
  updateCodexPlugin(options),
1529
+ noticeAgyPlugin(options),
1446
1530
  ];
1447
1531
  return results.every(Boolean) ? 0 : 1;
1448
1532
  }
@@ -1568,7 +1652,8 @@ function runPython(script, args) {
1568
1652
 
1569
1653
  function installerArgs(options, extra = []) {
1570
1654
  const repo = path.resolve(options.repo || process.cwd());
1571
- const args = [repo, "--target", options.target, ...extra];
1655
+ const installTarget = options.host === "agy" ? "agy" : options.target;
1656
+ const args = [repo, "--target", installTarget, ...extra];
1572
1657
  if (options.dryRun) {
1573
1658
  args.push("--dry-run");
1574
1659
  }
@@ -1819,7 +1904,8 @@ function codexOpenSpecLayout(repo) {
1819
1904
  : "agents";
1820
1905
  }
1821
1906
 
1822
- function openspecSkillRootForTarget(target, repo) {
1907
+ function openspecSkillRootForTarget(target, repo, host = target) {
1908
+ if (host === "agy") return path.join(".agents", "skills");
1823
1909
  if (target === "claude") return path.join(".claude", "skills");
1824
1910
  if (target === "codex") {
1825
1911
  return codexOpenSpecLayout(repo) === "legacy"
@@ -1829,7 +1915,15 @@ function openspecSkillRootForTarget(target, repo) {
1829
1915
  return path.join(".opencode", "skills");
1830
1916
  }
1831
1917
 
1832
- 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
+ }
1833
1927
  if (target === "claude") {
1834
1928
  const location = path.join(".claude", "commands", "opsx");
1835
1929
  return {
@@ -1873,7 +1967,8 @@ function commandSurfaceForTarget(target, repo) {
1873
1967
  };
1874
1968
  }
1875
1969
 
1876
- function commandPathForAction(target, repo, action) {
1970
+ function commandPathForAction(target, repo, action, host = target) {
1971
+ if (host === "agy") return null;
1877
1972
  if (target === "claude") {
1878
1973
  return path.join(repo, ".claude", "commands", "opsx", `${action}.md`);
1879
1974
  }
@@ -1885,8 +1980,8 @@ function commandPathForAction(target, repo, action) {
1885
1980
  return path.join(repo, ".opencode", "commands", `opsx-${action}.md`);
1886
1981
  }
1887
1982
 
1888
- function openspecOverlaySurfacesForTarget(target, repo) {
1889
- const skillRoot = openspecSkillRootForTarget(target, repo);
1983
+ function openspecOverlaySurfacesForTarget(target, repo, host = target) {
1984
+ const skillRoot = openspecSkillRootForTarget(target, repo, host);
1890
1985
  return OPENSPEC_OVERLAY_ACTIONS.flatMap((action) => {
1891
1986
  if (action === "propose" && target === "opencode") {
1892
1987
  return [];
@@ -1900,7 +1995,7 @@ function openspecOverlaySurfacesForTarget(target, repo) {
1900
1995
  // Claude and OpenCode command files are no longer generated (#406); one a
1901
1996
  // repository still holds from a `both` delivery keeps its overlay until
1902
1997
  // the next `keel --init` removes it.
1903
- const command = commandPathForAction(target, repo, action);
1998
+ const command = commandPathForAction(target, repo, action, host);
1904
1999
  const keepsCommand = command !== null
1905
2000
  && (target === "codex" || fs.existsSync(command));
1906
2001
  return [
@@ -2248,8 +2343,48 @@ function printDshSurface() {
2248
2343
  );
2249
2344
  }
2250
2345
 
2346
+ function printAgySurface(repo) {
2347
+ const probe = spawnSync("agy", ["--version"], { encoding: "utf8", timeout: 5000 });
2348
+ const version = probe.error || probe.status !== 0
2349
+ ? null
2350
+ : String(probe.stdout || "").trim().split("\n")[0];
2351
+ if (version) {
2352
+ printDoctorLine("AGY CLI", "ok", version);
2353
+ } else if (probe.error && probe.error.code !== "ENOENT") {
2354
+ printDoctorLine("AGY CLI", "unreadable", `agy --version did not answer (${probe.error.code || "error"})`);
2355
+ } else {
2356
+ printDoctorLine("AGY CLI", "not found", "no agy on PATH; the repository surface does not need it");
2357
+ }
2358
+ const info = inspectAgyPlugins(repo);
2359
+ if (info.sources.length === 0) {
2360
+ printDoctorLine(
2361
+ "AGY plugin config",
2362
+ "not found",
2363
+ `no Keel plugin entry found in ${info.globalPluginsJson}, ${path.join(info.configDir, "plugins")}, or .agents/plugins`
2364
+ );
2365
+ } else if (info.disabled) {
2366
+ printDoctorLine(
2367
+ "AGY plugin config",
2368
+ "warning",
2369
+ `found at ${info.sources.join(", ")}, but disabled in ${path.join(info.configDir, "config.json")} (plugins.keel.enabled=false)`
2370
+ );
2371
+ } else {
2372
+ printDoctorLine(
2373
+ "AGY plugin config",
2374
+ "ok",
2375
+ `found at ${info.sources.join(", ")}; runtime activation, trust, and hook blocking stay manual/advisory until verified in an AGY session`
2376
+ );
2377
+ }
2378
+ printDoctorLine(
2379
+ "AGY surface",
2380
+ "ok",
2381
+ "shared with Codex and DSH: AGENTS.md and .agents/skills, which AGY reads"
2382
+ );
2383
+ }
2384
+
2251
2385
  function printTargetSurface(repo, target, host = target) {
2252
2386
  process.stdout.write("\nTarget surface:\n");
2387
+ const remedyTarget = host === "agy" ? "agy" : target;
2253
2388
 
2254
2389
  const agentsPath = path.join(repo, "AGENTS.md");
2255
2390
  const hasBootstrap =
@@ -2262,7 +2397,7 @@ function printTargetSurface(repo, target, host = target) {
2262
2397
  hasBootstrap ? "ok" : "missing",
2263
2398
  hasBootstrap
2264
2399
  ? "AGENTS.md carries the Keel managed bootstrap block"
2265
- : `AGENTS.md bootstrap missing; run keel --install --target ${target}`
2400
+ : `AGENTS.md bootstrap missing; run keel --install --target ${remedyTarget}`
2266
2401
  );
2267
2402
  if (target === "claude") {
2268
2403
  const claudePath = path.join(repo, "CLAUDE.md");
@@ -2286,12 +2421,14 @@ function printTargetSurface(repo, target, host = target) {
2286
2421
  + "compatibility-only outside v4 support"
2287
2422
  );
2288
2423
  } else {
2289
- const manifestRelative = path.join(
2290
- "plugins",
2291
- "keel",
2292
- target === "codex" ? ".codex-plugin" : ".claude-plugin",
2293
- "plugin.json"
2294
- );
2424
+ const manifestRelative = host === "agy"
2425
+ ? path.join("plugins", "keel", "plugin.json")
2426
+ : path.join(
2427
+ "plugins",
2428
+ "keel",
2429
+ target === "codex" ? ".codex-plugin" : ".claude-plugin",
2430
+ "plugin.json"
2431
+ );
2295
2432
  const manifestPath = path.join(repo, manifestRelative);
2296
2433
  let sourceStatus = "missing";
2297
2434
  let sourceDetail = `plugin source absent at ${manifestRelative}`;
@@ -2327,9 +2464,11 @@ function printTargetSurface(repo, target, host = target) {
2327
2464
  "manual",
2328
2465
  "marketplace install, enablement, hook trust/activation, and behavior "
2329
2466
  + `need runtime evidence; install via ${
2330
- target === "codex"
2331
- ? "codex plugin add keel@<marketplace>"
2332
- : "claude plugin install keel@<marketplace>"
2467
+ host === "agy"
2468
+ ? "~/.gemini/config/plugins.json, .agents/plugins/, or `agy plugin install`"
2469
+ : target === "codex"
2470
+ ? "codex plugin add keel@<marketplace>"
2471
+ : "claude plugin install keel@<marketplace>"
2333
2472
  } and verify in a fresh session`
2334
2473
  );
2335
2474
  if (target === "claude") {
@@ -2338,15 +2477,21 @@ function printTargetSurface(repo, target, host = target) {
2338
2477
  }
2339
2478
  }
2340
2479
 
2341
- const openspecSkillRoot = openspecSkillRootForTarget(target, repo);
2480
+ const openspecSkillRoot = openspecSkillRootForTarget(target, repo, host);
2342
2481
  const openspecSkillPaths = OPENSPEC_SKILLS.map((skill) =>
2343
2482
  path.join(repo, openspecSkillRoot, skill, "SKILL.md")
2344
2483
  );
2345
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
+ : "";
2346
2491
  printDoctorLine(
2347
2492
  "OpenSpec action skills",
2348
2493
  surfaceStatus(openspecSkillCounts),
2349
- formatCount(openspecSkillCounts, openspecSkillRoot)
2494
+ `${formatCount(openspecSkillCounts, openspecSkillRoot)}${agyLegacyNote}`
2350
2495
  );
2351
2496
 
2352
2497
  printDoctorLine(
@@ -2360,7 +2505,7 @@ function printTargetSurface(repo, target, host = target) {
2360
2505
  + "installation from this repository"
2361
2506
  );
2362
2507
 
2363
- const commands = commandSurfaceForTarget(target, repo);
2508
+ const commands = commandSurfaceForTarget(target, repo, host);
2364
2509
  if (commands.retired) {
2365
2510
  const leftover = commands.paths.filter((file) => fs.existsSync(file));
2366
2511
  printDoctorLine(
@@ -2375,7 +2520,7 @@ function printTargetSurface(repo, target, host = target) {
2375
2520
  printDoctorLine(
2376
2521
  "OpenSpec commands",
2377
2522
  "ok",
2378
- `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 `
2379
2524
  + `${commands.location}`
2380
2525
  );
2381
2526
  } else {
@@ -2391,7 +2536,7 @@ function printTargetSurface(repo, target, host = target) {
2391
2536
  );
2392
2537
  }
2393
2538
 
2394
- const overlayPaths = openspecOverlaySurfacesForTarget(target, repo).map(
2539
+ const overlayPaths = openspecOverlaySurfacesForTarget(target, repo, host).map(
2395
2540
  (surface) => surface.path
2396
2541
  );
2397
2542
  const overlayCounts = countOpenSpecOverlays(overlayPaths);
@@ -2401,7 +2546,7 @@ function printTargetSurface(repo, target, host = target) {
2401
2546
  : `${overlayCountDetail(
2402
2547
  overlayCounts,
2403
2548
  `${overlayActionLabel()} skills and commands`
2404
- )}; ${overlayRemediation(target)}`;
2549
+ )}; ${overlayRemediation(remedyTarget)}`;
2405
2550
  printDoctorLine(
2406
2551
  `Keel ${overlayActionLabel()} overlay`,
2407
2552
  overlayStatus(overlayCounts),
@@ -2493,6 +2638,7 @@ function runDoctor(options) {
2493
2638
 
2494
2639
  const surfaces = surfaceGeneratorVersion(repo);
2495
2640
  const running = openspec ? openspecReportedVersion(openspec) : null;
2641
+ const doctorRemedyTarget = options.host === "agy" ? "agy" : options.target;
2496
2642
  if (surfaces && running) {
2497
2643
  const newer = compareVersions(surfaces, running) > 0;
2498
2644
  printDoctorLine(
@@ -2501,13 +2647,13 @@ function runDoctor(options) {
2501
2647
  newer
2502
2648
  ? `written by OpenSpec ${surfaces}, newer than the OpenSpec Keel runs `
2503
2649
  + `(${running}); keel --init leaves them unrewritten rather than `
2504
- + `downgrading them, and keel --install --target ${options.target} `
2650
+ + `downgrading them, and keel --install --target ${doctorRemedyTarget} `
2505
2651
  + "refreshes the protocol without touching them"
2506
2652
  : `written by OpenSpec ${surfaces}; Keel runs ${running}`
2507
2653
  );
2508
2654
  }
2509
2655
 
2510
- printProtocolVersionDrift(repo, options.target);
2656
+ printProtocolVersionDrift(repo, doctorRemedyTarget);
2511
2657
 
2512
2658
  process.stdout.write("\nProject status:\n");
2513
2659
  const checkStatus = runPython(
@@ -2535,6 +2681,7 @@ function runDoctor(options) {
2535
2681
 
2536
2682
  printTargetSurface(repo, options.target, options.host || options.target);
2537
2683
  if (options.host === "dsh") printDshSurface();
2684
+ if (options.host === "agy") printAgySurface(repo);
2538
2685
  printAdditionalOverlayHealth(repo, options.target);
2539
2686
  printLensSurface(repo, options.target);
2540
2687
  const authorizationOk = printStandingAuthorizationSurface(repo);
@@ -3189,7 +3336,10 @@ function runAction(options) {
3189
3336
  const repo = path.resolve(options.repo || process.cwd());
3190
3337
  let result;
3191
3338
  try {
3192
- result = runGate(repo, options.gateStage, options);
3339
+ result = runGate(repo, options.gateStage, {
3340
+ ...options,
3341
+ target: options.host || options.target,
3342
+ });
3193
3343
  } catch (error) {
3194
3344
  if (error instanceof GateInputError) {
3195
3345
  process.stderr.write(`keel: gate input error: ${error.message}\n`);
@@ -3338,6 +3488,13 @@ function runAction(options) {
3338
3488
  + "the files which host the repository was set up for\n"
3339
3489
  );
3340
3490
  }
3491
+ if (options.host === "agy") {
3492
+ process.stdout.write(
3493
+ "keel: AGY's repository files are shared with Codex and DSH (AGENTS.md and .agents/skills); "
3494
+ + "removing them removes them for those hosts too, and Keel cannot tell from "
3495
+ + "the files which host the repository was set up for\n"
3496
+ );
3497
+ }
3341
3498
  const uninstallStatus = runPython(
3342
3499
  INSTALL_SCRIPT,
3343
3500
  installerArgs(options, ["--uninstall"])
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@christang/keel",
3
- "version": "5.231.13",
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.231.13",
9
+ "version": "5.232.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@fission-ai/openspec": "1.14.0"
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.231.13",
5
+ "version": "5.232.1",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.231.13",
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.231.13",
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",
@@ -0,0 +1,23 @@
1
+ {
2
+ "keel": {
3
+ "SessionStart": [
4
+ {
5
+ "type": "command",
6
+ "command": "node ./scripts/session-start.js --host agy",
7
+ "timeout": 15
8
+ }
9
+ ],
10
+ "PreToolUse": [
11
+ {
12
+ "matcher": "edit_file|write_file|run_command",
13
+ "hooks": [
14
+ {
15
+ "type": "command",
16
+ "command": "node ./scripts/pretooluse-guard.js --host agy",
17
+ "timeout": 10
18
+ }
19
+ ]
20
+ }
21
+ ]
22
+ }
23
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "keel",
3
+ "version": "5.232.1",
4
+ "description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Antigravity (AGY), Codex, and Claude Code.",
5
+ "author": {
6
+ "name": "TanglmChris",
7
+ "url": "https://github.com/TanglmChris"
8
+ },
9
+ "repository": "https://github.com/TanglmChris/keel"
10
+ }