prizmkit 1.1.190 → 1.1.191

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.
Files changed (38) hide show
  1. package/bin/create-prizmkit.js +4 -4
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +150 -0
  4. package/bundled/adapters/antigravity/hooks-adapter.js +195 -0
  5. package/bundled/adapters/antigravity/paths.js +14 -0
  6. package/bundled/adapters/antigravity/rules-adapter.js +54 -0
  7. package/bundled/adapters/antigravity/skill-adapter.js +29 -0
  8. package/bundled/dev-pipeline/README.md +16 -5
  9. package/bundled/dev-pipeline/prizmkit_runtime/config.py +13 -2
  10. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +12 -12
  11. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +13 -4
  12. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +8 -2
  13. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +186 -24
  14. package/bundled/dev-pipeline/prizmkit_runtime/status.py +2 -0
  15. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +305 -17
  16. package/bundled/dev-pipeline/scripts/utils.py +5 -3
  17. package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +1 -0
  18. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +135 -0
  19. package/bundled/dev-pipeline/tests/test_unified_cli.py +363 -0
  20. package/bundled/rules/USAGE.md +1 -0
  21. package/bundled/skills/_metadata.json +1 -1
  22. package/bundled/skills/feature-planner/SKILL.md +2 -2
  23. package/bundled/skills/prizmkit-init/SKILL.md +1 -1
  24. package/bundled/skills/prizmkit-init/references/config-schema.md +2 -2
  25. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
  26. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +1 -1
  27. package/package.json +1 -1
  28. package/src/ai-cli-launch.js +1 -1
  29. package/src/clean.js +40 -4
  30. package/src/config.js +64 -4
  31. package/src/detect-platform.js +10 -6
  32. package/src/external-skills.js +2 -2
  33. package/src/index.js +1 -0
  34. package/src/manifest.js +1 -1
  35. package/src/platforms.js +6 -2
  36. package/src/prompts.js +11 -3
  37. package/src/scaffold.js +59 -4
  38. package/src/upgrade.js +9 -3
@@ -1109,6 +1109,62 @@ def test_runtime_config_resolves_and_validates_cursor_agent(tmp_path, monkeypatc
1109
1109
  assert preserved.source == "installed-platform:claude"
1110
1110
 
1111
1111
 
1112
+ def test_runtime_config_resolves_and_validates_antigravity_agy(tmp_path, monkeypatch):
1113
+ import prizmkit_runtime.config as runtime_config
1114
+ from prizmkit_runtime.config import resolve_ai_client, validate_effort
1115
+ from prizmkit_runtime.paths import resolve_runtime_paths
1116
+ from prizmkit_runtime.platform_detection import platform_from_command
1117
+
1118
+ assert platform_from_command("agy") == "antigravity"
1119
+ assert platform_from_command("antigravity") == "antigravity"
1120
+ assert platform_from_command(r"C:\Tools\agy.exe") == "antigravity"
1121
+
1122
+ project = tmp_path / "agy-project"
1123
+ pipeline = project / ".prizmkit" / "dev-pipeline"
1124
+ pipeline.mkdir(parents=True)
1125
+ paths = resolve_runtime_paths(pipeline_root=pipeline)
1126
+
1127
+ (project / ".prizmkit" / "config.json").write_text('{"ai_cli":"agy"}', encoding="utf-8")
1128
+ configured = resolve_ai_client(paths, env={"PATH": ""})
1129
+ assert configured.command == "agy"
1130
+ assert configured.platform == "antigravity"
1131
+ assert configured.launch_profile is None
1132
+
1133
+ for valid_level in ("low", "medium", "high", "xhigh", "max"):
1134
+ assert validate_effort(valid_level, "antigravity").valid is True
1135
+ invalid_effort = validate_effort("off", "antigravity")
1136
+ assert invalid_effort.valid is False
1137
+ assert invalid_effort.supported_values == ("low", "medium", "high", "xhigh", "max")
1138
+ assert "Antigravity" in invalid_effort.message
1139
+
1140
+ (project / ".prizmkit" / "config.json").unlink()
1141
+ (project / ".prizmkit" / "manifest.json").write_text('{"platform":"antigravity"}', encoding="utf-8")
1142
+ monkeypatch.setattr(
1143
+ runtime_config.shutil,
1144
+ "which",
1145
+ lambda name, path=None: "/tools/agy" if name == "agy" else None,
1146
+ )
1147
+ from_manifest = resolve_ai_client(paths, env={"PATH": "/tools"})
1148
+ assert from_manifest.command == "agy"
1149
+ assert from_manifest.platform == "antigravity"
1150
+ assert from_manifest.source == "prizmkit-manifest:platform"
1151
+
1152
+ (project / ".prizmkit" / "manifest.json").unlink()
1153
+ plugin_skill = project / ".agents" / "plugins" / "prizmkit" / "skills" / "prizmkit" / "SKILL.md"
1154
+ plugin_skill.parent.mkdir(parents=True)
1155
+ plugin_skill.write_text("fixture\n", encoding="utf-8")
1156
+ from_marker = resolve_ai_client(paths, env={"PATH": "/tools"})
1157
+ assert from_marker.command == "agy"
1158
+ assert from_marker.platform == "antigravity"
1159
+ assert from_marker.source == "installed-platform:antigravity"
1160
+
1161
+ plugin_skill.unlink()
1162
+ from_path = resolve_ai_client(paths, env={"PATH": "/tools"})
1163
+ assert from_path.command == "agy"
1164
+ assert from_path.platform == "antigravity"
1165
+ assert from_path.source == "PATH:agy"
1166
+
1167
+
1112
1168
  def test_stream_json_support_detection_matches_provider_rules(monkeypatch):
1113
1169
  import prizmkit_runtime.sessions as sessions
1114
1170
  from prizmkit_runtime.sessions import detect_stream_json_support
@@ -1124,6 +1180,8 @@ def test_stream_json_support_detection_matches_provider_rules(monkeypatch):
1124
1180
  return "Cursor Agent 2026.1"
1125
1181
  if tuple(command) == ("agent", "--help"):
1126
1182
  return "Cursor Agent --print --force --trust --output-format stream-json"
1183
+ if tuple(command) == ("agy", "--help"):
1184
+ return "agy --print --dangerously-skip-permissions --input-format --output-format stream-json"
1127
1185
  return ""
1128
1186
 
1129
1187
  codebuddy = detect_stream_json_support("cbc", "codebuddy", help_runner)
@@ -1131,6 +1189,7 @@ def test_stream_json_support_detection_matches_provider_rules(monkeypatch):
1131
1189
  claude = detect_stream_json_support("claude", "claude", help_runner)
1132
1190
  pi = detect_stream_json_support("pi", "pi", help_runner)
1133
1191
  cursor = detect_stream_json_support("agent", "cursor", help_runner)
1192
+ antigravity = detect_stream_json_support("agy", "antigravity", help_runner)
1134
1193
  unsupported = detect_stream_json_support("other", "claude", lambda _cmd: "plain help")
1135
1194
 
1136
1195
  assert codebuddy.enabled and codebuddy.format == "stream-json"
@@ -1138,6 +1197,8 @@ def test_stream_json_support_detection_matches_provider_rules(monkeypatch):
1138
1197
  assert claude.enabled and claude.format == "stream-json"
1139
1198
  assert pi.enabled and pi.format == "pi-json"
1140
1199
  assert cursor.enabled and cursor.format == "cursor-stream-json"
1200
+ assert antigravity.enabled and antigravity.format == "antigravity-stream-json"
1201
+ assert detect_stream_json_support("agy", "antigravity", lambda _cmd: "--print").enabled is False
1141
1202
  assert detect_stream_json_support("agent", "cursor", lambda _cmd: "unrelated --output-format").enabled is False
1142
1203
  monkeypatch.setattr(
1143
1204
  sessions.subprocess,
@@ -1249,6 +1310,39 @@ def test_ai_session_command_builders_match_unix_runtime_snapshot(tmp_path):
1249
1310
  assert "hello" not in cursor.argv
1250
1311
  assert not ({"--effort", "--sandbox", "--worktree", "--disallowedTools", "-y", "--yolo"} & set(cursor.argv))
1251
1312
 
1313
+ agy = build_ai_session_command(
1314
+ AISessionConfig(
1315
+ cli_command="agy",
1316
+ platform="antigravity",
1317
+ model="gemini-3-pro",
1318
+ effort="xhigh",
1319
+ prompt_path=prompt,
1320
+ cwd=project,
1321
+ use_stream_json=True,
1322
+ )
1323
+ )
1324
+ assert agy.argv == (
1325
+ "agy", "--dangerously-skip-permissions", "--input-format", "stream-json",
1326
+ "--output-format", "stream-json", "--model", "gemini-3-pro", "--effort", "xhigh",
1327
+ )
1328
+ assert json.loads(agy.stdin_text) == {"event": "user", "message": {"content": "hello"}}
1329
+ assert agy.prompt_mode == "stdin"
1330
+ assert "hello" not in agy.argv
1331
+
1332
+ agy_text = build_ai_session_command(
1333
+ AISessionConfig(
1334
+ cli_command="agy",
1335
+ platform="antigravity",
1336
+ model=None,
1337
+ prompt_path=prompt,
1338
+ cwd=project,
1339
+ use_stream_json=False,
1340
+ )
1341
+ )
1342
+ assert agy_text.argv == ("agy", "-p", "hello", "--dangerously-skip-permissions")
1343
+ assert agy_text.stdin_text is None
1344
+ assert agy_text.prompt_mode == "argument"
1345
+
1252
1346
 
1253
1347
  def test_custom_ai_session_command_builder_injects_prompt_and_tokenizes_extra_args(tmp_path):
1254
1348
  from prizmkit_runtime.launch_profiles import HeadlessLaunchProfile
@@ -5139,3 +5233,272 @@ def test_cursor_support_is_hidden_but_tracked_project_configuration_is_committab
5139
5233
  assert ".cursor/rules/user-owned.mdc" in safe_status
5140
5234
  assert ".cursor/skills/prizmkit/SKILL.md" not in safe_status
5141
5235
 
5236
+
5237
+ def test_antigravity_stream_json_progress_and_semantic_log_contract(tmp_path):
5238
+ parser = _load_progress_parser_module()
5239
+ tracker = parser.ProgressTracker(tmp_path / "session.log", provider_hint="antigravity")
5240
+ normalizer = parser.SemanticLogNormalizer()
5241
+ events = [
5242
+ {"event": "init", "conversation_id": "agy-conv-1", "model": "gemini-pro"},
5243
+ {
5244
+ "event": "step_update",
5245
+ "conversation_id": "agy-conv-1",
5246
+ "step_update": {
5247
+ "step_index": 1,
5248
+ "step_type": "thinking",
5249
+ "state": "RUNNING",
5250
+ "thinking_delta": "Inspecting module...",
5251
+ },
5252
+ },
5253
+ {
5254
+ "event": "step_update",
5255
+ "conversation_id": "agy-conv-1",
5256
+ "step_update": {"step_index": 1, "step_type": "thinking", "state": "DONE"},
5257
+ },
5258
+ {
5259
+ "event": "step_update",
5260
+ "conversation_id": "agy-conv-1",
5261
+ "step_update": {
5262
+ "step_index": 2,
5263
+ "step_type": "tool",
5264
+ "state": "RUNNING",
5265
+ "tool_info": {
5266
+ "name": "write_to_file",
5267
+ "parameters": {"TargetFile": "app.py", "CodeContent": "print('secret body')\n"},
5268
+ },
5269
+ },
5270
+ },
5271
+ {
5272
+ "event": "step_update",
5273
+ "conversation_id": "agy-conv-1",
5274
+ "step_update": {
5275
+ "step_index": 2,
5276
+ "step_type": "tool",
5277
+ "state": "DONE",
5278
+ "tool_info": {
5279
+ "name": "write_to_file",
5280
+ "parameters": {"TargetFile": "app.py"},
5281
+ "output": {"content": "wrote file successfully"},
5282
+ },
5283
+ },
5284
+ },
5285
+ {
5286
+ "event": "step_update",
5287
+ "conversation_id": "agy-conv-1",
5288
+ "step_update": {
5289
+ "step_index": 3,
5290
+ "step_type": "tool",
5291
+ "state": "DONE",
5292
+ "tool_info": {
5293
+ "name": "invoke_subagent",
5294
+ "parameters": {"prompt": "audit"},
5295
+ "output": "verified",
5296
+ },
5297
+ },
5298
+ },
5299
+ {
5300
+ "event": "step_update",
5301
+ "conversation_id": "agy-conv-1",
5302
+ "step_update": {
5303
+ "step_index": 4,
5304
+ "step_type": "agent_response",
5305
+ "state": "RUNNING",
5306
+ "text_delta": "Implementation ",
5307
+ },
5308
+ },
5309
+ {
5310
+ "event": "step_update",
5311
+ "conversation_id": "agy-conv-1",
5312
+ "step_update": {
5313
+ "step_index": 4,
5314
+ "step_type": "agent_response",
5315
+ "state": "DONE",
5316
+ "text_delta": "complete.",
5317
+ },
5318
+ },
5319
+ {
5320
+ "event": "result",
5321
+ "conversation_id": "agy-conv-1",
5322
+ "result": {"status": "success", "response": "Done", "usage": {"total_tokens": 120}},
5323
+ },
5324
+ ]
5325
+
5326
+ rendered = ""
5327
+ for event in events:
5328
+ tracker.process_event(event)
5329
+ rendered += normalizer.process_event(event)
5330
+ rendered += normalizer.finish()
5331
+ data = tracker.to_dict()
5332
+
5333
+ assert data["event_format"] == "antigravity-stream-json"
5334
+ assert data["antigravity_session_id"] == "agy-conv-1"
5335
+ assert data["claude_session_id"] == ""
5336
+ assert data["cursor_session_id"] == ""
5337
+ assert data["result_subtype"] == "success"
5338
+ assert data["has_usage"] is True
5339
+ assert data["total_tool_calls"] == 2
5340
+ tool_counts = {item["name"]: item["count"] for item in data["tool_calls"]}
5341
+ assert tool_counts["write_to_file"] == 1
5342
+ assert tool_counts["invoke_subagent"] == 1
5343
+ assert data["subagent_statistics"]["spawned"] == 1
5344
+ assert data["terminal_result_text"] == "Done"
5345
+ assert "[THINK] Inspecting module..." in rendered
5346
+ assert "[ACTION] write_to_file" in rendered
5347
+ assert "[OBSERVATION] write_to_file" in rendered
5348
+ assert "<21 chars>" in rendered
5349
+ assert "[FINAL] Implementation complete." in rendered
5350
+ assert "[SESSION_END] status=success" in rendered
5351
+
5352
+
5353
+ def test_antigravity_stream_errors_and_malformed_lines_fail_safely(tmp_path):
5354
+ from prizmkit_runtime.sessions import parse_stream_progress_lines
5355
+
5356
+ parser = _load_progress_parser_module()
5357
+ tracker = parser.ProgressTracker(tmp_path / "session.log", provider_hint="antigravity")
5358
+ tracker.process_event({"event": "init", "conversation_id": "agy-err-1"})
5359
+ tracker.process_event({
5360
+ "event": "step_update",
5361
+ "step_update": {
5362
+ "step_index": 1,
5363
+ "step_type": "tool",
5364
+ "state": "ERROR",
5365
+ "tool_info": {
5366
+ "name": "run_command",
5367
+ "parameters": {"CommandLine": "rm -rf /"},
5368
+ "error": "permission denied by user policy",
5369
+ },
5370
+ },
5371
+ })
5372
+ tracker.process_event({
5373
+ "event": "error",
5374
+ "error": {"code": "rate_limit_exceeded", "message": "API rate limit exceeded"},
5375
+ })
5376
+ data = tracker.to_dict()
5377
+ assert data["event_format"] == "antigravity-stream-json"
5378
+ assert data["antigravity_session_id"] == "agy-err-1"
5379
+ assert data["current_tool"] is None
5380
+ assert data["permission_denial_count"] >= 1
5381
+ assert any("rate limit exceeded" in str(item).lower() for item in data["errors"])
5382
+ assert data["result_subtype"] == ""
5383
+
5384
+ tracker.process_event({
5385
+ "event": "error",
5386
+ "error": {
5387
+ "code": "context_length_exceeded",
5388
+ "message": "Prompt is too long: maximum context length exceeded",
5389
+ },
5390
+ })
5391
+ overflow_data = tracker.to_dict()
5392
+ assert overflow_data["fatal_error_code"] != ""
5393
+ assert overflow_data["last_result_is_error"] is True
5394
+
5395
+ summary = parse_stream_progress_lines((
5396
+ "not-json",
5397
+ json.dumps({"event": "init", "conversation_id": "agy-err-summary"}),
5398
+ json.dumps({
5399
+ "event": "result",
5400
+ "result": {"status": "error", "error": {"message": "permission denied", "code": "denied"}},
5401
+ }),
5402
+ ), provider_hint="antigravity")
5403
+ assert summary.antigravity_session_id == "agy-err-summary"
5404
+ assert summary.claude_session_id == ""
5405
+ assert summary.result_subtype == "error"
5406
+ assert summary.permission_denial_count >= 1
5407
+
5408
+
5409
+ def test_antigravity_session_launcher_uses_ndjson_stdin_and_task_checkout(tmp_path):
5410
+ from prizmkit_runtime.sessions import AISessionConfig, AISessionLauncher
5411
+
5412
+ checkout = tmp_path / "checkout"
5413
+ checkout.mkdir()
5414
+ prompt = tmp_path / "prompt.md"
5415
+ prompt_text = "antigravity coordinator prompt " * 500
5416
+ prompt.write_text(prompt_text, encoding="utf-8")
5417
+ fake_agy = tmp_path / "agy"
5418
+ fake_agy.write_text(
5419
+ "#!/usr/bin/env python3\n"
5420
+ "import json, pathlib, sys\n"
5421
+ "pathlib.Path('agy-argv.json').write_text(json.dumps(sys.argv[1:]))\n"
5422
+ "line = sys.stdin.readline()\n"
5423
+ "pathlib.Path('agy-stdin.txt').write_text(line)\n"
5424
+ "print(json.dumps({'event':'init','conversation_id':'agy-live','model':'fake-model'}), flush=True)\n"
5425
+ "print(json.dumps({'event':'result','conversation_id':'agy-live','result':{'status':'success','response':'ok'}}), flush=True)\n",
5426
+ encoding="utf-8",
5427
+ )
5428
+ fake_agy.chmod(0o755)
5429
+ session_log = tmp_path / "session.log"
5430
+ progress = tmp_path / "progress.json"
5431
+
5432
+ result = AISessionLauncher(
5433
+ AISessionConfig(
5434
+ cli_command=str(fake_agy),
5435
+ platform="antigravity",
5436
+ model="fake-model",
5437
+ effort="xhigh",
5438
+ prompt_path=prompt,
5439
+ cwd=checkout,
5440
+ log_path=session_log,
5441
+ progress_path=progress,
5442
+ use_stream_json=True,
5443
+ )
5444
+ ).run()
5445
+
5446
+ argv = json.loads((checkout / "agy-argv.json").read_text(encoding="utf-8"))
5447
+ assert argv == [
5448
+ "--dangerously-skip-permissions",
5449
+ "--input-format",
5450
+ "stream-json",
5451
+ "--output-format",
5452
+ "stream-json",
5453
+ "--model",
5454
+ "fake-model",
5455
+ "--effort",
5456
+ "xhigh",
5457
+ ]
5458
+ assert prompt_text not in json.dumps(argv)
5459
+ stdin_msg = json.loads((checkout / "agy-stdin.txt").read_text(encoding="utf-8"))
5460
+ assert stdin_msg == {"event": "user", "message": {"content": prompt_text}}
5461
+ assert result.exit_code == 0
5462
+ assert result.progress_summary.result_subtype == "success"
5463
+ assert result.progress_summary.antigravity_session_id == "agy-live"
5464
+ assert result.progress_summary.claude_session_id == ""
5465
+ assert "antigravity coordinator prompt" not in session_log.read_text(encoding="utf-8")
5466
+
5467
+
5468
+ def test_antigravity_support_is_hidden_but_tracked_agents_config_is_committable(tmp_path):
5469
+ from prizmkit_runtime.gitops import (
5470
+ HIDDEN_TOOL_WORKTREE_EXCLUDES,
5471
+ WORKTREE_PLATFORM_SUPPORT_DIRS,
5472
+ git_status_safe,
5473
+ visible_task_paths,
5474
+ )
5475
+
5476
+ assert ".agents" in WORKTREE_PLATFORM_SUPPORT_DIRS
5477
+ assert ":(top,exclude).agents" in HIDDEN_TOOL_WORKTREE_EXCLUDES
5478
+ assert ":(top,exclude,glob).agents/**" in HIDDEN_TOOL_WORKTREE_EXCLUDES
5479
+
5480
+ project = tmp_path / "project"
5481
+ project.mkdir()
5482
+ subprocess.run(["git", "init", "-q"], cwd=project, check=True)
5483
+ subprocess.run(["git", "config", "user.name", "Test User"], cwd=project, check=True)
5484
+ subprocess.run(["git", "config", "user.email", "test@example.invalid"], cwd=project, check=True)
5485
+ tracked_plugin = project / ".agents" / "plugins" / "custom-user" / "plugin.json"
5486
+ tracked_plugin.parent.mkdir(parents=True)
5487
+ tracked_plugin.write_text('{"name":"custom"}\n', encoding="utf-8")
5488
+ subprocess.run(["git", "add", ".agents/plugins/custom-user/plugin.json"], cwd=project, check=True)
5489
+ subprocess.run(["git", "commit", "-qm", "fixture"], cwd=project, check=True)
5490
+
5491
+ tracked_plugin.write_text('{"name":"custom","version":"2"}\n', encoding="utf-8")
5492
+ materialized = project / ".agents" / "plugins" / "prizmkit" / "skills" / "prizmkit" / "SKILL.md"
5493
+ materialized.parent.mkdir(parents=True)
5494
+ materialized.write_text("support\n", encoding="utf-8")
5495
+
5496
+ paths, result = visible_task_paths(project)
5497
+ assert result.return_code == 0
5498
+ assert ".agents/plugins/custom-user/plugin.json" in paths
5499
+ assert ".agents/plugins/prizmkit/skills/prizmkit/SKILL.md" not in paths
5500
+ safe_status = git_status_safe(project)
5501
+ assert ".agents/plugins/custom-user/plugin.json" in safe_status
5502
+ assert ".agents/plugins/prizmkit/skills/prizmkit/SKILL.md" not in safe_status
5503
+
5504
+
@@ -59,6 +59,7 @@ npx prizmkit install . --rules none
59
59
  | Codex | `.agents/rules/<name>.md` | Behavioral Markdown guidance |
60
60
  | Pi | `.pi/rules/<name>.md` | Behavioral Markdown guidance |
61
61
  | Cursor | `.cursor/rules/<name>.mdc` | Always-applied `.mdc` without temporal metadata |
62
+ | Antigravity | `.agents/plugins/prizmkit/rules/<name>.md` | Always-applied Markdown + YAML frontmatter (`trigger: always_on`) |
62
63
 
63
64
  Rule names use `category/filename` path format (e.g., `prizm/prizm-documentation`). During installation, the last segment is used as the filename (`prizm-documentation.md`).
64
65
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.190",
2
+ "version": "1.1.191",
3
3
  "skills": {
4
4
  "prizmkit": {
5
5
  "description": "Framework introduction and navigation for the formal single-requirement lifecycle, project initialization, Prizm docs, and independent deployment.",
@@ -154,14 +154,14 @@ Before questions, check optional context files (never block if absent):
154
154
  - `.prizmkit/config.json` (existing stack preferences and detected tech stack)
155
155
  - `.prizmkit/plans/project-brief.md` (project context from app-planner, if available)
156
156
  - existing `.prizmkit/plans/feature-list.json` (required for incremental mode; inspect it only through the bounded commands below)
157
- - Platform instruction file: use the `platform` field in `.prizmkit/manifest.json` as source of truth when present (`codex` → `AGENTS.md`, `cursor` → existing user-owned `AGENTS.md` when present, `claude` → `CLAUDE.md`, `codebuddy` → `CODEBUDDY.md`). A comma-separated list selects those hosts; the five-name form or an older stored `all` means read every matching file. `both` is not a supported alias.
157
+ - Platform instruction file: use the `platform` field in `.prizmkit/manifest.json` as source of truth when present (`codex` → `AGENTS.md`, `cursor` → existing user-owned `AGENTS.md` when present, `antigravity` → existing user-owned `GEMINI.md` or `AGENTS.md` when present, `claude` → `CLAUDE.md`, `codebuddy` → `CODEBUDDY.md`). A comma-separated list selects those hosts; the six-name form or an older stored `all` means read every matching file. `both` is not a supported alias.
158
158
  - If `.prizmkit/prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure to understand the codebase layout:
159
159
  ```bash
160
160
  find . -maxdepth 2 -type d \
161
161
  -not -path '*/node_modules/*' -not -path '*/.git/*' \
162
162
  -not -path '*/dist/*' -not -path '*/build/*' \
163
163
  -not -path '*/__pycache__/*' -not -path '*/vendor/*' \
164
- -not -path '*/.agents/*' -not -path '*/.codex/*' \
164
+ -not -path '*/.agent/*' -not -path '*/.agents/*' -not -path '*/.codex/*' \
165
165
  -not -path '*/.claude/*' -not -path '*/.codebuddy/*' \
166
166
  -not -path '*/.cursor/*' -not -path '*/.prizmkit/*' \
167
167
  | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
@@ -82,7 +82,7 @@ BROWNFIELD WORKFLOW (existing project):
82
82
  - TOP-LEVEL modules: directories directly under project root that contain source files or sub-directories with source files (e.g. `src/`, `internal/`, `lib/`)
83
83
  - SUB-MODULES: directories INSIDE a top-level module (e.g. `src/routes/`, `src/models/`)
84
84
  - Exact `root.prizm` is L0; top-level module M maps to direct-child `.prizmkit/prizm-docs/<M>.prizm` (L1); sub-module S maps to nested `.prizmkit/prizm-docs/<M>/<S>.prizm` (L2). Deeper source ownership remains L2 and never creates L3.
85
- - Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.agents/`, `.codex/`, `.claude/`, `.codebuddy/`, `.pi/`, `.cursor/`, and the complete `.prizmkit/` framework directory. This excludes installed `.prizmkit/dev-pipeline/` artifacts but not canonical top-level `dev-pipeline/` source.
85
+ - Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.agent/`, `.agents/`, `.codex/`, `.claude/`, `.codebuddy/`, `.pi/`, `.cursor/`, and the complete `.prizmkit/` framework directory. This excludes installed `.prizmkit/dev-pipeline/` artifacts but not canonical top-level `dev-pipeline/` source.
86
86
  - **Bounded discovery contract** — use the current Host's available directory-listing or file-search capability to enumerate at most two directory levels, apply the exclusions above before analysis, preserve parent/child relationships, and report the resulting project-relative structure. Do not require a POSIX shell pipeline or any other operating-system-specific command.
87
87
  3. Identify entry points by language convention
88
88
  4. Catalog dependencies (external packages)
@@ -20,13 +20,13 @@ Handles re-init without losing user edits:
20
20
  | Field | Type | Description |
21
21
  |-------|------|-------------|
22
22
  | `adoption_mode` | string | `"passive"` \| `"advisory"` \| `"active"` |
23
- | `platform` | string | Installed host metadata: a single id (`codebuddy`, `claude`, `codex`, `pi`, `cursor`), a canonical comma-separated subset such as `claude,cursor`, or the five-name form `codebuddy,claude,codex,pi,cursor`. It records installation, not a canonical behavior allowlist. Input alias `all` expands to the five names on write. |
23
+ | `platform` | string | Installed host metadata: a single id (`codebuddy`, `claude`, `codex`, `pi`, `cursor`, `antigravity`), a canonical comma-separated subset such as `claude,antigravity`, or the six-name form `codebuddy,claude,codex,pi,cursor,antigravity`. It records installation, not a canonical behavior allowlist. Input alias `all` expands to the six names on write. |
24
24
  | `tech_stack` | object | Detected or user-provided tech stack |
25
25
  | `tech_stack._auto_detected` | boolean | `true` if auto-detected, `false` if user-provided |
26
26
  | `detected_layers` | string[] | Development layers observed in the project. Written by prizmkit-init Phase 4.5. Values: `frontend` / `backend` / `database` / `mobile`. Empty only when no layers are observed. Always refreshed from code and never cleared by rule-adoption choices. |
27
27
  | `enabled_rule_profiles` | string[] | Rule profiles the user explicitly enabled. This is independent from `detected_layers`; an empty array means no custom profile is enabled, not that the project has no detected layers. |
28
28
 
29
- New writes must use a single host id, a canonical comma-separated subset, or the five concrete names. `all` is an installer input alias only. `both` is not a supported value.
29
+ New writes must use a single host id, a canonical comma-separated subset, or the six concrete names. `all` is an installer input alias only. `both` is not a supported value.
30
30
 
31
31
  ## Examples
32
32
 
@@ -603,7 +603,7 @@ HIERARCHY RULE: if directory X lives inside top-level module M, X is a sub-modul
603
603
 
604
604
  CAPACITY RULE: use MODULE_GROUPS whenever MODULE_INDEX cannot fit L0 within 4096B. Do not change hard limits for project size. Init does not create semantic or mirrored L2 placeholders; later Update/Rebuild/Migrate may create complete L2 documents when durable knowledge and unambiguous identity exist.
605
605
 
606
- EXCLUDE: .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .codex/, .agents/, .pi/, .cursor/, .prizmkit/
606
+ EXCLUDE: .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .codex/, .agent/, .agents/, .pi/, .cursor/, .prizmkit/
607
607
  SOURCE_BOUNDARY: Excluding `.prizmkit/` excludes the installed Runtime at `.prizmkit/dev-pipeline/`; never exclude a repository's canonical top-level `dev-pipeline/` source module by basename.
608
608
 
609
609
  ## 9.2 Post-Init Behavior
@@ -11,7 +11,7 @@ STEPS:
11
11
  - TOP-LEVEL modules: directories directly under project root (or under src/ for src-based layouts) that qualify.
12
12
  - SUB-MODULES: directories INSIDE a top-level module that qualify. Record them as source structure in the direct-child parent L1; if durable L2 is created later, its nested path mirrors the sub-module.
13
13
  - HIERARCHY RULE: exact `root.prizm` is L0; top-level module M maps to direct-child `.prizmkit/prizm-docs/<M>.prizm` (L1); directory X inside M maps to nested `.prizmkit/prizm-docs/<M>/<X>.prizm` (L2). Deeper source ownership remains L2 and never creates L3.
14
- - Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .codex/, .agents/, .pi/, .cursor/, and the complete `.prizmkit/` framework directory. This excludes installed `.prizmkit/dev-pipeline/` artifacts but never excludes a repository's canonical top-level `dev-pipeline/` source module by basename. If total module count > 30, ask user for include/exclude patterns.
14
+ - Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .codex/, .agent/, .agents/, .pi/, .cursor/, and the complete `.prizmkit/` framework directory. This excludes installed `.prizmkit/dev-pipeline/` artifacts but never excludes a repository's canonical top-level `dev-pipeline/` source module by basename. If total module count > 30, ask user for include/exclude patterns.
15
15
  3. Apply the Value Gate from SKILL.md and the format specification to every metadata, rule, pattern, dependency, file, and summary candidate. Keep navigational structure only when needed to locate ownership. Reject source-derivable signatures, history, test inventories, temporary conclusions, stale/duplicate meanings, procedures, and low-value file lists.
16
16
  4. Create `.prizmkit/prizm-docs/` and only the mirrored directories needed by documents that will exist. Do not create placeholder detail files.
17
17
  5. Generate `root.prizm` (L0) with concise PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, navigation pointers, and only Value-Gate-qualified global RULES/PATTERNS/CROSS_CUTTING facts. Set `PRIZM_VERSION: 4`. Keep L0 a summary/pointer map; never copy child interfaces, data flow, traps, decisions, or full rules. No CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.190",
3
+ "version": "1.1.191",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,4 +1,4 @@
1
- const BUILT_IN_AI_CLI_NAMES = new Set(['claude', 'cbc', 'codebuddy', 'codex', 'pi', 'agent']);
1
+ const BUILT_IN_AI_CLI_NAMES = new Set(['claude', 'cbc', 'codebuddy', 'codex', 'pi', 'agent', 'agy', 'antigravity']);
2
2
 
3
3
  function asText(value) {
4
4
  return typeof value === 'string' ? value : '';
package/src/clean.js CHANGED
@@ -4,7 +4,7 @@ import fs from 'fs-extra';
4
4
  import { pathToFileURL } from 'node:url';
5
5
  import { getAdaptersDir, loadMetadata, loadRulesMetadata } from './metadata.js';
6
6
  import { readManifestForLifecycle } from './manifest.js';
7
- import { privateProjectMemoryFile, projectMemoryFile } from './platforms.js';
7
+ import { PLATFORM_IDS, privateProjectMemoryFile, projectMemoryFile } from './platforms.js';
8
8
 
9
9
  // Cleanup owns only deterministic private host-memory entries. Existing
10
10
  // `.prizmkit/**` ignore policy is project-owned and must remain untouched.
@@ -183,6 +183,18 @@ async function removeCursorHooks(projectRoot, dryRun) {
183
183
  }));
184
184
  }
185
185
 
186
+ async function removeAntigravityHooks(projectRoot, dryRun) {
187
+ const adapterPath = path.join(getAdaptersDir(), 'antigravity', 'hooks-adapter.js');
188
+ const { removeHooks } = await import(pathToFileURL(adapterPath).href);
189
+ return (await removeHooks(projectRoot, dryRun)).map(change => ({
190
+ path: path.join(projectRoot, change.path),
191
+ removed: !dryRun && change.action === 'removed',
192
+ updated: !dryRun && change.action === 'updated',
193
+ reason: dryRun ? 'dry_run' : undefined,
194
+ note: change.action === 'updated' ? '(PrizmKit hook entries)' : undefined,
195
+ }));
196
+ }
197
+
186
198
  export async function runClean(directory, options = {}) {
187
199
  const projectRoot = path.resolve(directory || '.');
188
200
  const dryRun = Boolean(options.dryRun);
@@ -204,8 +216,9 @@ export async function runClean(directory, options = {}) {
204
216
  // Read manifest for accurate cleanup (covers skills from older versions)
205
217
  const manifest = await readManifestForLifecycle(projectRoot);
206
218
 
207
- // Validate and merge-remove Cursor hooks before any destructive cleanup.
219
+ // Validate and merge-remove Cursor and Antigravity hooks before any destructive cleanup.
208
220
  const cursorHookResults = await removeCursorHooks(projectRoot, dryRun);
221
+ const antigravityHookResults = await removeAntigravityHooks(projectRoot, dryRun);
209
222
 
210
223
  const metadataSkillNames = Object.keys(metadata.skills);
211
224
  const externalSkillNames = (metadata.external_skills?.known || []).map(s => s.name);
@@ -273,6 +286,10 @@ export async function runClean(directory, options = {}) {
273
286
  const cursorSkillsDir = path.join(projectRoot, '.cursor', 'skills');
274
287
  results.push(...await removeKnownEntries(cursorSkillsDir, allSkillNames, dryRun));
275
288
 
289
+ // .agents/plugins/prizmkit/skills/ — Antigravity project plugin Skills
290
+ const antigravitySkillsDir = path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills');
291
+ results.push(...await removeKnownEntries(antigravitySkillsDir, allSkillNames, dryRun));
292
+
276
293
  // .claude/agents/ — retired PrizmKit named-agent files
277
294
  const claudeAgentsDir = path.join(projectRoot, '.claude', 'agents');
278
295
  results.push(...await removeKnownEntries(claudeAgentsDir, agentFiles, dryRun));
@@ -312,7 +329,15 @@ export async function runClean(directory, options = {}) {
312
329
  ));
313
330
  results.push(...cursorHookResults);
314
331
 
315
- for (const platform of ['codebuddy', 'claude', 'codex', 'pi', 'cursor']) {
332
+ const antigravityRulesDir = path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'rules');
333
+ results.push(...await removeKnownEntries(
334
+ antigravityRulesDir,
335
+ [...ruleFileNames.map(n => `${n}.md`), 'prizmkit-framework.md'],
336
+ dryRun,
337
+ ));
338
+ results.push(...antigravityHookResults);
339
+
340
+ for (const platform of PLATFORM_IDS) {
316
341
  const memoryFile = projectMemoryFile(platform);
317
342
  const privateMemoryFile = privateProjectMemoryFile(platform);
318
343
  if (!privateMemoryFile) continue;
@@ -324,7 +349,18 @@ export async function runClean(directory, options = {}) {
324
349
  }
325
350
 
326
351
  if (!dryRun) {
327
- for (const relativeDir of ['.cursor/hooks', '.cursor/rules', '.cursor/skills', '.cursor']) {
352
+ for (const relativeDir of [
353
+ '.cursor/hooks',
354
+ '.cursor/rules',
355
+ '.cursor/skills',
356
+ '.cursor',
357
+ '.agents/plugins/prizmkit/hooks',
358
+ '.agents/plugins/prizmkit/rules',
359
+ '.agents/plugins/prizmkit/skills',
360
+ '.agents/plugins/prizmkit',
361
+ '.agents/plugins',
362
+ '.agents',
363
+ ]) {
328
364
  const dir = path.join(projectRoot, relativeDir);
329
365
  if (await fs.pathExists(dir) && (await fs.readdir(dir)).length === 0) await fs.remove(dir);
330
366
  }