prizmkit 1.1.190 → 1.1.192

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 (189) 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 +38 -0
  8. package/bundled/adapters/codex/skill-adapter.js +28 -8
  9. package/bundled/adapters/cursor/skill-adapter.js +13 -4
  10. package/bundled/adapters/pi/skill-adapter.js +28 -7
  11. package/bundled/dev-pipeline/.env.example +4 -12
  12. package/bundled/dev-pipeline/README.md +21 -15
  13. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +3 -6
  14. package/bundled/dev-pipeline/prizmkit_runtime/atomic_io.py +48 -0
  15. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +66 -23
  16. package/bundled/dev-pipeline/prizmkit_runtime/cli.py +10 -7
  17. package/bundled/dev-pipeline/prizmkit_runtime/commands.py +2 -21
  18. package/bundled/dev-pipeline/prizmkit_runtime/config.py +29 -70
  19. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +125 -67
  20. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +89 -442
  21. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +93 -49
  22. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -3
  23. package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -6
  24. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +49 -18
  25. package/bundled/dev-pipeline/prizmkit_runtime/processes.py +206 -151
  26. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +2 -23
  27. package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +15 -134
  28. package/bundled/dev-pipeline/prizmkit_runtime/results.py +25 -0
  29. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +68 -83
  30. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +15 -5
  31. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -29
  32. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -2
  33. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +7 -2
  34. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +282 -217
  35. package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +124 -122
  36. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +90 -9
  37. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +369 -154
  38. package/bundled/dev-pipeline/prizmkit_runtime/status.py +3 -3
  39. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +2780 -0
  40. package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +27 -101
  41. package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +58 -4
  42. package/bundled/dev-pipeline/scripts/check-session-status.py +43 -19
  43. package/bundled/dev-pipeline/scripts/continuation.py +6 -4
  44. package/bundled/dev-pipeline/scripts/detect-stuck.py +28 -28
  45. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +7 -2
  46. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -2
  47. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +10 -7
  48. package/bundled/dev-pipeline/scripts/init-change-artifact.py +8 -2
  49. package/bundled/dev-pipeline/scripts/init-pipeline.py +14 -69
  50. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +31 -2328
  51. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +4 -24
  52. package/bundled/dev-pipeline/scripts/prompt_framework.py +56 -9
  53. package/bundled/dev-pipeline/scripts/status_common.py +591 -0
  54. package/bundled/dev-pipeline/scripts/update-bug-status.py +85 -463
  55. package/bundled/dev-pipeline/scripts/update-checkpoint.py +227 -65
  56. package/bundled/dev-pipeline/scripts/update-feature-status.py +76 -509
  57. package/bundled/dev-pipeline/scripts/utils.py +10 -15
  58. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +4 -4
  59. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +7 -0
  60. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
  61. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +1 -1
  62. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
  63. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  64. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -1
  65. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
  66. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
  67. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +2 -2
  68. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -2
  69. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
  70. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
  71. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -6
  72. package/bundled/dev-pipeline/templates/session-status-schema.json +2 -5
  73. package/bundled/dev-pipeline/tests/_helpers.py +418 -0
  74. package/bundled/dev-pipeline/tests/conftest.py +45 -1
  75. package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +1 -0
  76. package/bundled/dev-pipeline/tests/test_auto_skip.py +4 -69
  77. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +126 -1
  78. package/bundled/dev-pipeline/tests/test_daemon_and_scripts.py +257 -0
  79. package/bundled/dev-pipeline/tests/test_e2e_pipeline_run.py +500 -0
  80. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +59 -117
  81. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +12 -10
  82. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +561 -3094
  83. package/bundled/dev-pipeline/tests/test_recovery_workflow.py +7 -8
  84. package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -1
  85. package/bundled/dev-pipeline/tests/test_reset_modes.py +15 -27
  86. package/bundled/dev-pipeline/tests/test_reset_preserve.py +54 -139
  87. package/bundled/dev-pipeline/tests/test_runner_bookkeeping.py +766 -0
  88. package/bundled/dev-pipeline/tests/test_runner_lifecycle.py +1257 -0
  89. package/bundled/dev-pipeline/tests/test_runtime_helper.py +97 -20
  90. package/bundled/dev-pipeline/tests/test_session_launch.py +1101 -0
  91. package/bundled/dev-pipeline/tests/test_stream_progress.py +585 -0
  92. package/bundled/dev-pipeline/tests/test_unified_cli.py +490 -2006
  93. package/bundled/dev-pipeline/tests/test_utils.py +3 -3
  94. package/bundled/rules/USAGE.md +1 -0
  95. package/bundled/skills/_metadata.json +9 -63
  96. package/bundled/skills/app-planner/SKILL.md +32 -303
  97. package/bundled/skills/app-planner/references/app-design-guide.md +0 -4
  98. package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
  99. package/bundled/skills/app-planner/references/project-brief-guide.md +14 -0
  100. package/bundled/skills/app-planner/references/project-conventions-discovery.md +4 -6
  101. package/bundled/skills/app-planner/references/project-state-detection.md +2 -3
  102. package/bundled/skills/bug-fix-workflow/SKILL.md +1 -2
  103. package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +4 -7
  104. package/bundled/skills/bug-planner/SKILL.md +54 -435
  105. package/bundled/skills/bug-planner/references/generated-plan-review.md +3 -2
  106. package/bundled/skills/bug-planner/references/input-formats.md +32 -0
  107. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -6
  108. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +4 -28
  109. package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -6
  110. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +4 -28
  111. package/bundled/skills/feature-planner/SKILL.md +60 -439
  112. package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
  113. package/bundled/skills/feature-planner/references/completeness-review.md +34 -0
  114. package/bundled/skills/feature-planner/references/decomposition-patterns.md +2 -2
  115. package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
  116. package/bundled/skills/feature-planner/references/generated-plan-review.md +3 -2
  117. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +3 -1
  118. package/bundled/skills/feature-workflow/SKILL.md +1 -2
  119. package/bundled/skills/prizmkit/SKILL.md +7 -1
  120. package/bundled/skills/prizmkit-code-review/SKILL.md +14 -6
  121. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +7 -4
  122. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +16 -0
  123. package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +58 -20
  124. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  125. package/bundled/skills/prizmkit-init/SKILL.md +25 -128
  126. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +3 -3
  127. package/bundled/skills/prizmkit-init/references/config-schema.md +2 -2
  128. package/bundled/skills/prizmkit-plan/SKILL.md +6 -8
  129. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +1 -1
  130. package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +5 -2
  131. package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +6 -5
  132. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -13
  133. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
  134. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +1 -1
  135. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +1 -1
  136. package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
  137. package/bundled/skills/prizmkit-test/SKILL.md +25 -133
  138. package/bundled/skills/prizmkit-test/references/independent-test-review.md +5 -2
  139. package/bundled/skills/prizmkit-test/references/test-coverage-model.md +6 -0
  140. package/bundled/skills/prizmkit-workflow/SKILL.md +2 -3
  141. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +4 -3
  142. package/bundled/skills/recovery-workflow/SKILL.md +7 -7
  143. package/bundled/skills/recovery-workflow/evals/evals.json +1 -1
  144. package/bundled/skills/recovery-workflow/references/detection.md +1 -3
  145. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -6
  146. package/bundled/templates/project-memory-template.md +1 -2
  147. package/package.json +1 -1
  148. package/src/ai-cli-launch.js +1 -1
  149. package/src/clean.js +40 -4
  150. package/src/config.js +64 -4
  151. package/src/detect-platform.js +10 -6
  152. package/src/external-skills.js +2 -2
  153. package/src/index.js +1 -0
  154. package/src/manifest.js +1 -1
  155. package/src/platforms.js +6 -2
  156. package/src/prompts.js +11 -3
  157. package/src/scaffold.js +87 -11
  158. package/src/upgrade.js +9 -3
  159. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +0 -53
  160. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +0 -649
  161. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +0 -463
  162. package/bundled/dev-pipeline/scripts/update-refactor-status.py +0 -1512
  163. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -240
  164. package/bundled/dev-pipeline/templates/refactor-list-schema.json +0 -266
  165. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +0 -15
  166. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +0 -9
  167. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +0 -24
  168. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +0 -16
  169. package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +0 -9
  170. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +0 -22
  171. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +0 -19
  172. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +0 -24
  173. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +0 -12
  174. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -6
  175. package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +0 -52
  176. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +0 -478
  177. package/bundled/skills/feature-planner/assets/evaluation-guide.md +0 -44
  178. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +0 -219
  179. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +0 -78
  180. package/bundled/skills/refactor-planner/SKILL.md +0 -467
  181. package/bundled/skills/refactor-planner/assets/planning-guide.md +0 -291
  182. package/bundled/skills/refactor-planner/references/behavior-preservation.md +0 -187
  183. package/bundled/skills/refactor-planner/references/error-recovery.md +0 -45
  184. package/bundled/skills/refactor-planner/references/fast-path.md +0 -59
  185. package/bundled/skills/refactor-planner/references/generated-plan-review.md +0 -107
  186. package/bundled/skills/refactor-planner/references/planning-phases.md +0 -172
  187. package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +0 -230
  188. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +0 -1120
  189. package/bundled/skills/refactor-workflow/SKILL.md +0 -205
@@ -11,23 +11,18 @@
11
11
  #
12
12
  # If .prizmkit/.env does not exist, all defaults apply — no error is raised.
13
13
 
14
- # ─── Runtime Environment ──────────────────────────────────────────────
15
- # PRIZMKIT_ENV=test # "test" = output bootstrap prompts to console for debugging
16
- # Unset or any other value = normal production mode
17
-
18
14
  # ─── AI CLI ───────────────────────────────────────────────────────────
19
15
  # AI_CLI=claude # AI CLI command. If unset, PrizmKit prefers the installed
20
- # project platform, then PATH fallback: claude > cbc > codex
16
+ # project platform, then PATH fallback: claude > cbc > codex > pi > agent > agy
21
17
  # MODEL= # AI model override (e.g. claude-sonnet-4-20250514)
22
18
  # Per-task model in *-list.json overrides this
19
+ # PRIZMKIT_EFFORT= # Reasoning effort override (platform-specific)
23
20
 
24
21
  # ─── Pipeline Execution ──────────────────────────────────────────────
25
22
  # MAX_RETRIES=3 # Max retry attempts per task before marking failed
23
+ # STOP_ON_FAILURE=0 # Stop pipeline immediately on first failed task (1=on, 0=continue)
26
24
  # VERBOSE=1 # Verbose logging (1=on, 0=off)
27
25
 
28
- # ─── Refactor Pipeline Only ──────────────────────────────────────────
29
- # STRICT_BEHAVIOR_CHECK=1 # Enable strict behavior-preservation gates for refactor tasks (1=on, 0=off)
30
-
31
26
  # ─── Branch Management ────────────────────────────────────────────────
32
27
  # AUTO_PUSH=0 # Auto-push to remote after successful task (0=off, 1=on)
33
28
  # DEV_BRANCH= # Custom dev branch name (default: auto-generated per task)
@@ -35,7 +30,4 @@
35
30
  # ─── Logging & Heartbeat ─────────────────────────────────────────────
36
31
  # HEARTBEAT_INTERVAL=30 # Heartbeat log interval in seconds
37
32
  # HEARTBEAT_STALE_THRESHOLD=600 # Max seconds without heartbeat before marking stale
38
- # STALE_KILL_THRESHOLD=900 # Auto-kill after N seconds without parent log progress (0 = disabled)
39
- # CODEX_WAIT_STALE_KILL_THRESHOLD=3600 # Longer no-log window while Codex waits on subagents
40
- # CODEX_SUBAGENT_TIMEOUT_SECONDS=3300 # Codex subagent max runtime; defaults to wait threshold - 300
41
- # CB_SUBAGENT_STALE_KILL_THRESHOLD=3600 # Longer no-log window while CodeBuddy sub-agents are running
33
+ # STALE_KILL_THRESHOLD=600 # Auto-kill after N seconds without parent log progress (0 = disabled)
@@ -1,6 +1,6 @@
1
1
  # dev-pipeline
2
2
 
3
- Autonomous development pipeline that drives iterative AI CLI sessions through PrizmKit skills, implementing feature, bugfix, and refactor work from `.prizmkit/plans/*.json` specifications.
3
+ Autonomous development pipeline that drives iterative AI CLI sessions through PrizmKit skills, implementing feature and bugfix work from `.prizmkit/plans/*.json` specifications.
4
4
 
5
5
  ## Prerequisites
6
6
 
@@ -8,7 +8,7 @@ Autonomous development pipeline that drives iterative AI CLI sessions through Pr
8
8
 
9
9
  - Python 3.8+
10
10
  - [jq](https://jqlang.github.io/jq/) (`brew install jq`)
11
- - AI CLI in PATH: CodeBuddy (`cbc`), Claude Code (`claude`), Codex (`codex`), Pi (`pi`), or verified Cursor Agent (`agent`)
11
+ - AI CLI in PATH: CodeBuddy (`cbc`), Claude Code (`claude`), Codex (`codex`), Pi (`pi`), verified Cursor Agent (`agent`), or Antigravity (`agy`)
12
12
  - `.prizmkit/plans/feature-list.json` generated by the `feature-planner` skill (for feature pipeline)
13
13
  - `.prizmkit/plans/bug-fix-list.json` generated by the `bug-planner` skill (for bug pipeline)
14
14
 
@@ -16,7 +16,7 @@ Autonomous development pipeline that drives iterative AI CLI sessions through Pr
16
16
 
17
17
  - Python 3.10+ for the canonical Python CLI under `dev-pipeline/cli.py`
18
18
  - No third-party Python runtime packages are required
19
- - The Python runtime is the sole behavior source; retired shell and PowerShell wrappers are not compatibility entrypoints
19
+ - The Python runtime under `dev-pipeline/` is the sole runtime implementation
20
20
 
21
21
  Inspect the operation-first command surface without dispatching runtime behavior:
22
22
 
@@ -111,10 +111,10 @@ python3 ./cli.py reset <family> --failed --preserve-runtime [list-path]
111
111
 
112
112
  | Mode | Selector and effect |
113
113
  |------|---------------------|
114
- | `--state-only` | Requires one ID or explicit `--all`. Resets supported blocking roots and only causal `auto_skipped` descendants whose full blocker set is recovered; preserves checkout identity, branches/worktrees, source changes, checkpoints, and artifact/session files. Feature/Refactor roots are `failed` or `skipped`; Bugfix additionally supports `needs_info`. |
114
+ | `--state-only` | Requires one ID or explicit `--all`. Resets supported blocking roots and only causal `auto_skipped` descendants whose full blocker set is recovered; preserves checkout identity, branches, source changes, checkpoints, and artifact/session files. Feature roots are `failed` or `skipped`; Bugfix additionally supports `needs_info`. |
115
115
  | `--fresh-checkout` | Requires one ID, range, or supported status filter. Performs the former standard reset, may discard active-checkout WIP, and publishes a new checkout boundary without deleting the task branch. |
116
116
  | `--clean` | Accepts the fresh-checkout selectors and additionally deletes task branches, session history, continuation summaries, and task artifacts. |
117
- | `--failed --preserve-runtime` | Whole-list failed-only recovery. Retains runtime history, valid checkout identity, branches/worktrees, checkpoints, artifacts, and WIP; a missing recorded branch is replaced from its local base and implementation-and-later checkpoints are rewound. |
117
+ | `--failed --preserve-runtime` | Whole-list failed-only recovery. Retains runtime history, valid checkout identity, branches, checkpoints, artifacts, and WIP; a missing recorded branch is replaced from its local base and implementation-and-later checkpoints are rewound. |
118
118
 
119
119
  State-only rejects ranges and status filters. Preserve-runtime rejects IDs, ranges, `--all`, clean, other modes, and other filters. Missing modes, conflicting modes, unsupported selectors, and malformed causal dependency state fail before mutation.
120
120
 
@@ -129,10 +129,6 @@ python3 ./.prizmkit/dev-pipeline/cli.py run feature F-007
129
129
  python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix --state-only --all
130
130
  python3 ./.prizmkit/dev-pipeline/cli.py run bugfix .prizmkit/plans/bug-fix-list.json
131
131
 
132
- # Preserve all failed runtime chains
133
- python3 ./.prizmkit/dev-pipeline/cli.py reset refactor --failed --preserve-runtime
134
- python3 ./.prizmkit/dev-pipeline/cli.py run refactor .prizmkit/plans/refactor-list.json
135
-
136
132
  # Publish a fresh checkout boundary
137
133
  python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-007 --fresh-checkout
138
134
  python3 ./.prizmkit/dev-pipeline/cli.py run feature F-007
@@ -461,7 +457,7 @@ python3 scripts/detect-stuck.py \
461
457
 
462
458
  ### `scripts/parse-stream-progress.py` — Real-Time Progress Parser
463
459
 
464
- Reads provider JSONL output and extracts progress metrics. Cursor support recognizes `system`, `user`, `assistant`, `tool_call`, and terminal `result` events, including read/write/function tool variants and additive unknown fields.
460
+ Reads provider JSONL output and extracts progress metrics. Cursor support recognizes `system`, `user`, `assistant`, `tool_call`, and terminal `result` events, including read/write/function tool variants and additive unknown fields. Antigravity support normalizes `init`, `step_update` (`plannerResponse`, `tool_call`, `toolCall`, `userInput`, `error`), `result`, and `error` events.
465
461
 
466
462
  ```bash
467
463
  python3 scripts/parse-stream-progress.py \
@@ -550,8 +546,8 @@ Also exports: `log_info`, `log_warn`, `log_error`, `log_success` (with timestamp
550
546
 
551
547
  | Variable | Default | Used By | Description |
552
548
  |----------|---------|---------|-------------|
553
- | `AI_CLI` | auto-detect | Python runtime | AI CLI command name. Auto-detects `cbc`, `claude`, `codex`, `pi`, or verified Cursor `agent` |
554
- | `PRIZMKIT_PLATFORM` | auto-detect | Python runtime | Platform hint for custom/wrapped AI CLI commands: `codebuddy`, `claude`, `codex`, `pi`, or `cursor` |
549
+ | `AI_CLI` | auto-detect | Python runtime | AI CLI command name. Auto-detects `cbc`, `claude`, `codex`, `pi`, verified Cursor `agent`, or Antigravity `agy` |
550
+ | `PRIZMKIT_PLATFORM` | auto-detect | Python runtime | Platform hint for custom/wrapped AI CLI commands: `codebuddy`, `claude`, `codex`, `pi`, `cursor`, or `antigravity` |
555
551
  | `MODEL` | (none) | cli.py run feature, cli.py run bugfix | AI model fallback. Overridden by per-feature `model` field. See [Model Selection](#model-selection) |
556
552
  | `CODEBUDDY_CLI` | (deprecated) | Python runtime | Legacy alias for `AI_CLI`. Prefer `AI_CLI` |
557
553
  | `VERBOSE` | `0` | cli.py run feature | Set to `1` to enable `--verbose` on AI CLI |
@@ -647,7 +643,7 @@ The pipeline auto-detects which AI CLI to use. Detection priority:
647
643
  3. `.prizmkit/manifest.json` or `.prizmkit/config.json` → `platform` field
648
644
  4. `CODEBUDDY_CLI` environment variable (legacy)
649
645
  5. Installed PrizmKit platform artifacts
650
- 6. PATH fallback: `claude` → `cbc` → `codex` → `pi` → verified Cursor `agent`
646
+ 6. PATH fallback: `claude` → `cbc` → `codex` → `pi` → verified Cursor `agent` → Antigravity `agy`
651
647
 
652
648
  To permanently configure, create `.prizmkit/config.json`:
653
649
 
@@ -671,6 +667,7 @@ python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
671
667
  MODEL=claude-sonnet-4.6 python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
672
668
  AI_CLI=cbc python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
673
669
  AI_CLI=agent python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
670
+ AI_CLI=agy python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
674
671
  ```
675
672
 
676
673
  ### Cursor Agent native headless contract
@@ -685,6 +682,16 @@ agent --print --force --trust --output-format stream-json [--model <model>]
685
682
 
686
683
  The complete coordinator Prompt is sent through stdin and the active task checkout is the process `cwd`. PrizmKit does not pass Cursor `--worktree`, does not disable Cursor sandbox policy, and does not create or modify `.cursor/cli.json`; user and enterprise deny policy continues to apply. Authentication is inherited from `agent login` or `CURSOR_API_KEY`, never serialized into PrizmKit config, argv, or logs. Cursor exposes no documented effort parameter, so `PRIZMKIT_EFFORT` must remain unset for `AI_CLI=agent`; a non-empty value fails with an actionable diagnostic.
687
684
 
685
+ ### Antigravity CLI native headless contract
686
+
687
+ Install and authenticate the Antigravity CLI (`agy`). For a Pipeline session, PrizmKit runs inside the active task checkout (`cwd`):
688
+
689
+ ```bash
690
+ agy --dangerously-skip-permissions --input-format stream-json --output-format stream-json [--model <model>] [--effort <low|medium|high|xhigh|max>]
691
+ ```
692
+
693
+ The coordinator Prompt is written to stdin as a single-turn NDJSON user event (`{"event":"user","message":{"content":"..."}}`). Valid `PRIZMKIT_EFFORT` values are `low`, `medium`, `high`, `xhigh`, and `max` (non-matching values fail preflight validation). Runner preflight requires `--print`, `--dangerously-skip-permissions`, `--input-format`, `--output-format`, and `stream-json` in `agy --help`, failing fast with an actionable diagnostic if unavailable.
694
+
688
695
  ---
689
696
 
690
697
  ## How It Works
@@ -873,7 +880,7 @@ cli.py run bugfix command
873
880
 
874
881
  ```
875
882
  .prizmkit/dev-pipeline/
876
- +-- cli.py run <family> # Foreground feature/bugfix/refactor runners
883
+ +-- cli.py run <family> # Foreground feature/bugfix runners
877
884
  +-- cli.py status <family|all> # Read-only family or aggregate status
878
885
  +-- cli.py reset <family> # Explicit state-only/fresh/clean/preserve reset modes
879
886
  +-- cli.py daemon <family> # Background daemon lifecycle
@@ -905,7 +912,6 @@ cli.py run bugfix command
905
912
  | +-- bootstrap-tier3.md # Explicit custom-template compatibility fixture
906
913
  | +-- bootstrap-prompt.md # Minimal explicit compatibility template
907
914
  | +-- bugfix-bootstrap-prompt.md # Bugfix explicit compatibility template
908
- | +-- refactor-bootstrap-prompt.md # Refactor explicit compatibility template
909
915
  | +-- feature-list-schema.json # JSON schema for .prizmkit/plans/feature-list.json
910
916
  | +-- bug-fix-list-schema.json # JSON schema for .prizmkit/plans/bug-fix-list.json
911
917
  | +-- session-status-schema.json # JSON schema for session-status.json
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- `dev-pipeline` drives feature, bugfix, and refactor sessions through the unified Python outer loop. Each iteration starts an AI CLI session with a bootstrap prompt that makes the main session orchestrator responsible for planning, implementation, review, testing, retrospective, and commit.
5
+ `dev-pipeline` drives feature and bugfix sessions through the unified Python outer loop. Each iteration starts an AI CLI session with a bootstrap prompt that makes the main session orchestrator responsible for planning, implementation, review, testing, retrospective, and commit.
6
6
 
7
7
  Skill behavior is owned by canonical skills:
8
8
 
@@ -48,7 +48,7 @@ The Main Agent captures bounded immutable review input from the active checkout
48
48
 
49
49
  Independent review runs only when the host can structurally provide read-only access, no mutation, no arbitrary command execution, no downstream execution, and native resume of the same execution unit. If any capability is unavailable or unproven, the stage records strict downgrade and creates no weak substitute. A fresh Reviewer plus a summary is never continuation.
50
50
 
51
- Pipeline runner-owned linked worktrees are an outer runtime option. They do not authorize a skill-level execution unit to create or enter another worktree.
51
+ Pipeline execution runs strictly serially in the active project checkout. Skill-level execution units must not create or enter linked worktrees.
52
52
 
53
53
  ## Pipeline Scripts
54
54
 
@@ -58,14 +58,11 @@ Located at `.prizmkit/dev-pipeline/scripts/`:
58
58
  |---|---|
59
59
  | `init-pipeline.py` | Initialize feature pipeline state |
60
60
  | `init-bugfix-pipeline.py` | Initialize bugfix pipeline state |
61
- | `init-refactor-pipeline.py` | Initialize refactor pipeline state |
62
61
  | `init-change-artifact.py` | Initialize feature change-artifact directories |
63
62
  | `generate-bootstrap-prompt.py` | Render feature bootstrap prompt with feature context |
64
63
  | `generate-bugfix-prompt.py` | Render bugfix bootstrap prompt with bug context |
65
- | `generate-refactor-prompt.py` | Render refactor bootstrap prompt with refactor context |
66
64
  | `update-feature-status.py` | Update feature status after session |
67
65
  | `update-bug-status.py` | Update bug status after session |
68
- | `update-refactor-status.py` | Update refactor status after session |
69
66
  | `check-session-status.py` | Read and validate session-status output |
70
67
  | `detect-stuck.py` | Detect stuck or stale pipeline sessions |
71
68
  | `parse-stream-progress.py` | Parse AI CLI output stream for progress tracking |
@@ -75,7 +72,7 @@ Located at `.prizmkit/dev-pipeline/scripts/`:
75
72
 
76
73
  1. Runtime selects the next eligible item from the plan list.
77
74
  2. Prompt generator renders a session prompt and checkpoint file.
78
- 3. AI CLI session executes the generated prompt in the active project checkout or runner-owned worktree.
75
+ 3. AI CLI session executes the generated prompt in the active project checkout.
79
76
  4. Session writes status and completion artifacts.
80
77
  5. Runtime updates plan-list status and propagates completion notes.
81
78
 
@@ -0,0 +1,48 @@
1
+ """Atomic file write helpers shared across runtime modules and CLI scripts."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import os
7
+ import tempfile
8
+ from pathlib import Path
9
+
10
+
11
+ def write_text_atomic(
12
+ path: Path | str,
13
+ text: str,
14
+ *,
15
+ encoding: str = "utf-8",
16
+ fsync: bool = True,
17
+ ) -> None:
18
+ """Atomically write text via a same-directory temporary file and os.replace."""
19
+ target = Path(path)
20
+ target.parent.mkdir(parents=True, exist_ok=True)
21
+ fd, tmp_name = tempfile.mkstemp(dir=target.parent, prefix=f".{target.name}.", suffix=".tmp")
22
+ try:
23
+ with os.fdopen(fd, "w", encoding=encoding) as handle:
24
+ handle.write(text)
25
+ handle.flush()
26
+ if fsync:
27
+ os.fsync(handle.fileno())
28
+ os.replace(tmp_name, target)
29
+ except Exception:
30
+ try:
31
+ os.unlink(tmp_name)
32
+ except OSError:
33
+ pass
34
+ raise
35
+
36
+
37
+ def write_json_atomic(
38
+ path: Path | str,
39
+ data: object,
40
+ *,
41
+ indent: int | None = 2,
42
+ sort_keys: bool = False,
43
+ ensure_ascii: bool = False,
44
+ fsync: bool = True,
45
+ ) -> None:
46
+ """Atomically serialize JSON to a file with optional fsync durability."""
47
+ payload = json.dumps(data, indent=indent, sort_keys=sort_keys, ensure_ascii=ensure_ascii) + "\n"
48
+ write_text_atomic(path, payload, fsync=fsync)
@@ -59,7 +59,6 @@ SKILL_WORKFLOW_STAGES.update({
59
59
  FAMILY_PLAN_SKILLS = {
60
60
  "feature-pipeline": "context-snapshot-and-plan",
61
61
  "bugfix-pipeline": "bug-diagnosis-and-plan",
62
- "refactor-pipeline": "prizmkit-plan",
63
62
  }
64
63
  VALID_TERMINAL_STATUSES = {"WORKFLOW_COMPLETED", "WORKFLOW_BLOCKED"}
65
64
  VALID_REPAIR_SCOPES = {
@@ -73,7 +72,6 @@ VALID_REPAIR_SCOPES = {
73
72
  SEMANTIC_STATE_KEYS = {
74
73
  "feature-pipeline": "feature_state",
75
74
  "bugfix-pipeline": "bugfix_state",
76
- "refactor-pipeline": "refactor_state",
77
75
  }
78
76
  LEGACY_FAMILY_REQUIRED_STAGES = {
79
77
  "feature-pipeline": (
@@ -92,15 +90,6 @@ LEGACY_FAMILY_REQUIRED_STAGES = {
92
90
  "prizmkit-committer",
93
91
  "bug-report",
94
92
  ),
95
- "refactor-pipeline": (
96
- "prizmkit-implement",
97
- "prizmkit-code-review",
98
- "prizmkit-test",
99
- "prizmkit-retrospective",
100
- "prizmkit-committer",
101
- "refactor-report",
102
- "completion-summary",
103
- ),
104
93
  }
105
94
 
106
95
  FAMILY_REQUIRED_STAGES = {
@@ -120,15 +109,6 @@ FAMILY_REQUIRED_STAGES = {
120
109
  "prizmkit-retrospective",
121
110
  "prizmkit-committer",
122
111
  ),
123
- "refactor-pipeline": (
124
- "prizmkit-implement",
125
- "prizmkit-code-review",
126
- "prizmkit-test",
127
- "refactor-report",
128
- "completion-summary",
129
- "prizmkit-retrospective",
130
- "prizmkit-committer",
131
- ),
132
112
  }
133
113
 
134
114
 
@@ -549,6 +529,8 @@ def rewind_checkpoint_for_implementation(
549
529
  }
550
530
  )
551
531
  raw_semantic.pop("stage_result", None)
532
+ raw_semantic.pop("runtime_base_head", None)
533
+ raw_semantic.pop("runtime_commit_hash", None)
552
534
  if isinstance(raw_semantic.get("completed_stages"), list):
553
535
  raw_semantic["completed_stages"] = [
554
536
  value
@@ -712,6 +694,13 @@ def _derive_semantic_state(
712
694
  return _semantic_error(workflow_type, current_step, "invalid_blocked_reason", "blocked_reason must be a non-empty string")
713
695
  if terminal_status == "WORKFLOW_BLOCKED" and not blocked_reason:
714
696
  return _semantic_error(workflow_type, current_step, "missing_blocked_reason", "WORKFLOW_BLOCKED requires blocked_reason")
697
+ if terminal_status == "WORKFLOW_BLOCKED" and semantic_status in {"in_progress", "completed"}:
698
+ return _semantic_error(
699
+ workflow_type,
700
+ current_step,
701
+ "blocked_workflow_has_non_failed_status",
702
+ f"WORKFLOW_BLOCKED cannot have status={semantic_status}",
703
+ )
715
704
  if blocked_reason and terminal_status == "WORKFLOW_COMPLETED":
716
705
  return _semantic_error(
717
706
  workflow_type,
@@ -816,8 +805,8 @@ def _derive_semantic_state(
816
805
  if (
817
806
  current_step is not None
818
807
  and current_step.status == "failed"
819
- and current_step.stage_result == "REVIEW_NEEDS_FIXES"
820
- and raw_state.get("stage_result") == "REVIEW_NEEDS_FIXES"
808
+ and current_step.stage_result in {"REVIEW_NEEDS_FIXES", "TEST_NEEDS_FIXES"}
809
+ and raw_state.get("stage_result") in {"REVIEW_NEEDS_FIXES", "TEST_NEEDS_FIXES"}
821
810
  and raw_state.get("next_stage") == "prizmkit-implement"
822
811
  ):
823
812
  next_stage = "prizmkit-implement"
@@ -904,6 +893,56 @@ def _single_step(steps: tuple[CheckpointStep, ...], skill: str) -> CheckpointSte
904
893
  return matches[0] if len(matches) == 1 else None
905
894
 
906
895
 
896
+ def required_step_artifacts_valid(
897
+ raw_step: Mapping[str, Any],
898
+ *,
899
+ index: int = 0,
900
+ checkpoint_path: Path | str | None = None,
901
+ project_root: Path | str | None = None,
902
+ ) -> bool:
903
+ """Validate declared required artifacts for one raw checkpoint step dict."""
904
+ step_id = raw_step.get("id")
905
+ skill = raw_step.get("skill")
906
+ name = raw_step.get("name")
907
+ status = raw_step.get("status")
908
+ if (
909
+ not isinstance(step_id, str)
910
+ or not STEP_ID_PATTERN.match(step_id)
911
+ or not isinstance(skill, str)
912
+ or not skill.strip()
913
+ or not isinstance(name, str)
914
+ or not name.strip()
915
+ or status not in VALID_CHECKPOINT_STATUSES
916
+ ):
917
+ return False
918
+ raw_artifacts = raw_step.get("required_artifacts")
919
+ if raw_artifacts is None:
920
+ artifacts: tuple[str, ...] = ()
921
+ elif isinstance(raw_artifacts, (list, tuple)) and all(isinstance(item, str) for item in raw_artifacts):
922
+ artifacts = tuple(raw_artifacts)
923
+ else:
924
+ return False
925
+ stage_result = raw_step.get("stage_result")
926
+ if stage_result is not None and not isinstance(stage_result, str):
927
+ return False
928
+ depends_on = raw_step.get("depends_on")
929
+ if depends_on is not None and not isinstance(depends_on, str):
930
+ return False
931
+ step = CheckpointStep(
932
+ id=step_id,
933
+ skill=skill.strip(),
934
+ name=name.strip(),
935
+ status=str(status),
936
+ depends_on=depends_on,
937
+ required_artifacts=artifacts,
938
+ stage_result=stage_result,
939
+ index=index,
940
+ )
941
+ resolved_cp = Path(checkpoint_path) if checkpoint_path is not None else None
942
+ resolved_root = Path(project_root) if project_root is not None else None
943
+ return _required_step_artifacts_valid(step, resolved_cp, resolved_root)
944
+
945
+
907
946
  def _required_step_artifacts_valid(
908
947
  step: CheckpointStep,
909
948
  checkpoint_path: Path | None,
@@ -1111,7 +1150,8 @@ def _is_within_root(path: Path, root: Path) -> bool:
1111
1150
  return True
1112
1151
 
1113
1152
 
1114
- def _infer_project_root(checkpoint_path: Path | None) -> Path:
1153
+ def infer_project_root(checkpoint_path: Path | None) -> Path:
1154
+ """Resolve the project root from a conventional ``.prizmkit`` checkpoint path."""
1115
1155
  if checkpoint_path is None:
1116
1156
  return Path.cwd()
1117
1157
  resolved = checkpoint_path.resolve()
@@ -1121,6 +1161,9 @@ def _infer_project_root(checkpoint_path: Path | None) -> Path:
1121
1161
  return resolved.parent
1122
1162
 
1123
1163
 
1164
+ _infer_project_root = infer_project_root
1165
+
1166
+
1124
1167
  def _semantic_error(
1125
1168
  workflow_type: str,
1126
1169
  current_step: CheckpointStep | None,
@@ -6,16 +6,17 @@ import argparse
6
6
  import sys
7
7
  from collections.abc import Sequence
8
8
 
9
- from .commands import CommandResult, handle_diagnostics, handle_runtime_command
9
+ from .commands import handle_diagnostics, handle_runtime_command
10
10
  from .compat import UnsupportedPythonVersion, ensure_supported_python
11
11
  from .paths import resolve_runtime_paths
12
+ from .results import CommandResult as CommandResult
12
13
 
13
14
  DESCRIPTION = (
14
15
  "PrizmKit canonical Python runtime CLI.\n"
15
16
  "Runs operation-first pipeline, status, reset, daemon, diagnostics, and helper commands."
16
17
  )
17
18
 
18
- _FAMILIES = ("feature", "bugfix", "refactor")
19
+ _FAMILIES = ("feature", "bugfix")
19
20
  _GLOBAL_OPTIONS_WITH_VALUES = {"--project-root", "--pipeline-root"}
20
21
  _LEAF_OPTIONS_WITH_VALUES = {
21
22
  "--env",
@@ -47,17 +48,19 @@ def _non_negative_int(value: str) -> int:
47
48
  return parsed
48
49
 
49
50
 
50
- def _add_runner_arguments(parser: argparse.ArgumentParser, family: str) -> None:
51
+ def _add_status_arguments(parser: argparse.ArgumentParser, family: str) -> None:
51
52
  parser.add_argument("operand", nargs="?", help="Optional task ID or family plan path.")
52
53
  parser.add_argument("second_operand", nargs="?", help="Optional family plan path or task ID.")
53
54
  if family == "feature":
54
55
  parser.add_argument("--features", help="Feature ID, range, or comma-separated selection.")
56
+
57
+
58
+ def _add_run_arguments(parser: argparse.ArgumentParser, family: str) -> None:
59
+ _add_status_arguments(parser, family)
55
60
  parser.add_argument("--max-retries", type=_non_negative_int)
56
61
  parser.add_argument("--max-infra-retries", type=_non_negative_int)
57
62
  parser.add_argument("--resume-phase")
58
63
  parser.add_argument("--dry-run", action="store_true")
59
- parser.add_argument("--clean", action="store_true")
60
- parser.add_argument("--no-reset", action="store_true")
61
64
 
62
65
 
63
66
  def _add_run_subparsers(
@@ -67,7 +70,7 @@ def _add_run_subparsers(
67
70
  family_subparsers = run_parser.add_subparsers(dest="run_family", required=True)
68
71
  for family in _FAMILIES:
69
72
  family_parser = family_subparsers.add_parser(family, help=f"Run the {family} pipeline")
70
- _add_runner_arguments(family_parser, family)
73
+ _add_run_arguments(family_parser, family)
71
74
  _set_handler(family_parser, "run", "run", family)
72
75
 
73
76
 
@@ -78,7 +81,7 @@ def _add_status_subparsers(
78
81
  target_subparsers = status_parser.add_subparsers(dest="status_target", required=True)
79
82
  for family in _FAMILIES:
80
83
  family_parser = target_subparsers.add_parser(family, help=f"Show {family} status")
81
- _add_runner_arguments(family_parser, family)
84
+ _add_status_arguments(family_parser, family)
82
85
  _set_handler(family_parser, "status", "status", family)
83
86
  all_parser = target_subparsers.add_parser(
84
87
  "all",
@@ -7,11 +7,12 @@ from dataclasses import dataclass
7
7
  from .compat import MIN_PYTHON
8
8
  from .interoperability import UTILITY_ENTRYPOINTS, describe_existing_entrypoint
9
9
  from .paths import RuntimePaths, resolve_runtime_paths
10
+ from .results import CommandResult as CommandResult
10
11
 
11
12
  RUNTIME_STATUS = "python-runtime-canonical"
12
13
  CANONICAL_RUNTIME_NOTE = "The Python CLI and prizmkit_runtime modules are the canonical runtime."
13
14
  PYTHON_CLI = "dev-pipeline/cli.py"
14
- _FAMILIES = ("feature", "bugfix", "refactor")
15
+ _FAMILIES = ("feature", "bugfix")
15
16
 
16
17
 
17
18
  @dataclass(frozen=True)
@@ -33,26 +34,6 @@ class RuntimeCommand:
33
34
  return (self.group, self.target, self.action)
34
35
 
35
36
 
36
- @dataclass(frozen=True)
37
- class CommandResult:
38
- """Result returned by runtime command handlers."""
39
-
40
- exit_code: int
41
- title: str
42
- message: str
43
- details: tuple[str, ...] = ()
44
- stdout: str | None = None
45
- stderr: str | None = None
46
-
47
- def render(self) -> str:
48
- """Render a deterministic human-readable result."""
49
- if self.stdout is not None:
50
- return self.stdout
51
- lines = [self.title, self.message]
52
- lines.extend(self.details)
53
- return "\n".join(line for line in lines if line)
54
-
55
-
56
37
  def _runtime_invocation(group: str, action: str, target: str | None = None) -> str:
57
38
  if group == "daemon" and target is not None:
58
39
  command = f"daemon {target} {action}"