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
package/src/scaffold.js CHANGED
@@ -54,14 +54,11 @@ const PIPELINE_MANAGED_TOP_LEVEL_PATTERNS = [
54
54
  const RETIRED_SHELL_RUNTIME_FILES = new Set([
55
55
  'run-feature.sh',
56
56
  'run-bugfix.sh',
57
- 'run-refactor.sh',
58
57
  'run-recovery.sh',
59
58
  'launch-feature-daemon.sh',
60
59
  'launch-bugfix-daemon.sh',
61
- 'launch-refactor-daemon.sh',
62
60
  'reset-feature.sh',
63
61
  'reset-bug.sh',
64
- 'reset-refactor.sh',
65
62
  'lib/branch.sh',
66
63
  'lib/common.sh',
67
64
  'lib/heartbeat.sh',
@@ -69,14 +66,11 @@ const RETIRED_SHELL_RUNTIME_FILES = new Set([
69
66
  const RETIRED_POWERSHELL_RUNTIME_FILES = new Set([
70
67
  'run-feature.ps1',
71
68
  'run-bugfix.ps1',
72
- 'run-refactor.ps1',
73
69
  'run-recovery.ps1',
74
70
  'launch-feature-daemon.ps1',
75
71
  'launch-bugfix-daemon.ps1',
76
- 'launch-refactor-daemon.ps1',
77
72
  'reset-feature.ps1',
78
73
  'reset-bug.ps1',
79
- 'reset-refactor.ps1',
80
74
  'lib/common.ps1',
81
75
  'lib/pipeline.ps1',
82
76
  'lib/branch.ps1',
@@ -98,7 +92,7 @@ async function removeEmptyDirectory(dirPath) {
98
92
  }
99
93
 
100
94
  export async function removeRetiredAgentTeamArtifacts(platform, projectRoot, dryRun) {
101
- if (platform === 'pi' || platform === 'cursor') return;
95
+ if (platform === 'pi' || platform === 'cursor' || platform === 'antigravity') return;
102
96
  const agentDir = platform === 'claude'
103
97
  ? path.join(projectRoot, '.claude', 'agents')
104
98
  : platform === 'codex'
@@ -219,6 +213,22 @@ export function resolveRuleNamesForRuntime(rulesMeta, rulesPreset = 'recommended
219
213
  /**
220
214
  * 安装 Skills(纯 Copy 模式)
221
215
  */
216
+ async function convertMarkdownFilesInDir(dirPath, converter, skillName) {
217
+ if (!converter || !await fs.pathExists(dirPath)) return;
218
+ for (const entry of await fs.readdir(dirPath, { withFileTypes: true })) {
219
+ const entryPath = path.join(dirPath, entry.name);
220
+ if (entry.isDirectory()) {
221
+ await convertMarkdownFilesInDir(entryPath, converter, skillName);
222
+ } else if (entry.isFile() && entry.name.endsWith('.md')) {
223
+ const content = await fs.readFile(entryPath, 'utf8');
224
+ await fs.writeFile(entryPath, converter(content, skillName), 'utf8');
225
+ }
226
+ }
227
+ }
228
+
229
+ /**
230
+ * 安装 skills 到目标项目
231
+ */
222
232
  export async function installSkills(platform, skills, projectRoot, dryRun, runtime = 'python') {
223
233
  const { parseFrontmatter, buildMarkdown } = await loadSharedFrontmatter();
224
234
 
@@ -231,23 +241,35 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
231
241
  skillSubcategories[skillName] = skillDef.subcategory;
232
242
  }
233
243
 
234
- // Load Claude command adapter for skill conversion
244
+ // Load platform adapters for skill conversion
235
245
  let convertSkillToCommand;
236
246
  let convertSkillToCodex;
247
+ let convertRefForCodex;
237
248
  let convertSkillToPi;
249
+ let convertRefForPi;
238
250
  let convertSkillToCursor;
251
+ let convertRefForCursor;
252
+ let convertSkillToAntigravity;
253
+ let convertRefForAntigravity;
239
254
  if (platform === 'claude') {
240
255
  const commandAdapter = await loadAdapter('claude', 'command-adapter.js');
241
256
  convertSkillToCommand = commandAdapter.convertSkillToCommand;
242
257
  } else if (platform === 'codex') {
243
258
  const codexSkillAdapter = await loadAdapter('codex', 'skill-adapter.js');
244
259
  convertSkillToCodex = codexSkillAdapter.convertSkill;
260
+ convertRefForCodex = codexSkillAdapter.convertSkillReference;
245
261
  } else if (platform === 'pi') {
246
262
  const piSkillAdapter = await loadAdapter('pi', 'skill-adapter.js');
247
263
  convertSkillToPi = piSkillAdapter.convertSkill;
264
+ convertRefForPi = piSkillAdapter.convertSkillReference;
248
265
  } else if (platform === 'cursor') {
249
266
  const cursorSkillAdapter = await loadAdapter('cursor', 'skill-adapter.js');
250
267
  convertSkillToCursor = cursorSkillAdapter.convertSkill;
268
+ convertRefForCursor = cursorSkillAdapter.convertSkillReference;
269
+ } else if (platform === 'antigravity') {
270
+ const antigravitySkillAdapter = await loadAdapter('antigravity', 'skill-adapter.js');
271
+ convertSkillToAntigravity = antigravitySkillAdapter.convertSkill;
272
+ convertRefForAntigravity = antigravitySkillAdapter.convertSkillReference;
251
273
  }
252
274
 
253
275
  for (const skillName of skills) {
@@ -357,6 +379,7 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
357
379
  await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
358
380
  }
359
381
  }
382
+ await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForCodex, skillName);
360
383
  console.log(chalk.green(` ✓ .agents/skills/${skillName}/`));
361
384
  } else if (platform === 'pi') {
362
385
  const content = await fs.readFile(skillMdPath, 'utf8');
@@ -376,6 +399,7 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
376
399
  await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
377
400
  }
378
401
  }
402
+ await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForPi, skillName);
379
403
  console.log(chalk.green(` ✓ .pi/skills/${skillName}/`));
380
404
  } else if (platform === 'cursor') {
381
405
  const content = await fs.readFile(skillMdPath, 'utf8');
@@ -395,7 +419,28 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
395
419
  await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
396
420
  }
397
421
  }
422
+ await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForCursor, skillName);
398
423
  console.log(chalk.green(` ✓ .cursor/skills/${skillName}/`));
424
+ } else if (platform === 'antigravity') {
425
+ const content = await fs.readFile(skillMdPath, 'utf8');
426
+ const converted = convertSkillToAntigravity(content, skillName);
427
+ const targetDir = path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills', skillName);
428
+
429
+ if (dryRun) {
430
+ console.log(chalk.gray(` [dry-run] .agents/plugins/prizmkit/skills/${skillName}/`));
431
+ continue;
432
+ }
433
+
434
+ await fs.remove(targetDir);
435
+ await fs.ensureDir(targetDir);
436
+ await fs.writeFile(path.join(targetDir, 'SKILL.md'), converted);
437
+ for (const entry of await fs.readdir(corePath, { withFileTypes: true })) {
438
+ if (entry.isDirectory()) {
439
+ await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
440
+ }
441
+ }
442
+ await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForAntigravity, skillName);
443
+ console.log(chalk.green(` ✓ .agents/plugins/prizmkit/skills/${skillName}/`));
399
444
  }
400
445
  }
401
446
  }
@@ -645,6 +690,22 @@ job_max_runtime_seconds = 3300
645
690
  console.log(chalk.green(' ✓ .cursor/hooks.json'));
646
691
  console.log(chalk.green(' ✓ .cursor/hooks/prizmkit-hook.cjs'));
647
692
  console.log(chalk.green(` ✓ .cursor/rules/ (${ruleFiles.length} 条规则)`));
693
+ } else if (platform === 'antigravity') {
694
+ if (dryRun) {
695
+ console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/plugin.json'));
696
+ console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/hooks.json'));
697
+ console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/hooks/prizmkit-hook.cjs'));
698
+ console.log(chalk.gray(` [dry-run] .agents/plugins/prizmkit/rules/ (${ruleFiles.length} 条规则)`));
699
+ return;
700
+ }
701
+ const { installHooks } = await loadAdapter('antigravity', 'hooks-adapter.js');
702
+ const { installRules } = await loadAdapter('antigravity', 'rules-adapter.js');
703
+ await installHooks(projectRoot, { version: scaffoldPkg.version });
704
+ await installRules(projectRoot, ruleFiles);
705
+ console.log(chalk.green(' ✓ .agents/plugins/prizmkit/plugin.json'));
706
+ console.log(chalk.green(' ✓ .agents/plugins/prizmkit/hooks.json'));
707
+ console.log(chalk.green(' ✓ .agents/plugins/prizmkit/hooks/prizmkit-hook.cjs'));
708
+ console.log(chalk.green(` ✓ .agents/plugins/prizmkit/rules/ (${ruleFiles.length} 条规则)`));
648
709
  }
649
710
  }
650
711
 
@@ -1067,6 +1128,22 @@ export async function installProjectMemory(platform, projectRoot, dryRun) {
1067
1128
  return;
1068
1129
  }
1069
1130
 
1131
+ if (platform === 'antigravity') {
1132
+ const templatePath = path.join(templatesDir, templateName);
1133
+ if (!await fs.pathExists(templatePath)) {
1134
+ console.log(chalk.yellow(` ⚠ 模板文件不存在: ${templateName},跳过`));
1135
+ return;
1136
+ }
1137
+ if (dryRun) {
1138
+ console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/rules/prizmkit-framework.md'));
1139
+ return;
1140
+ }
1141
+ const { installFrameworkGuidance } = await loadAdapter('antigravity', 'rules-adapter.js');
1142
+ await installFrameworkGuidance(projectRoot, (await fs.readFile(templatePath, 'utf8')).trimEnd());
1143
+ console.log(chalk.green(' ✓ .agents/plugins/prizmkit/rules/prizmkit-framework.md'));
1144
+ return;
1145
+ }
1146
+
1070
1147
  if (!privateName) return;
1071
1148
 
1072
1149
  const mainPath = mainName ? path.join(projectRoot, mainName) : null;
@@ -1322,7 +1399,6 @@ export async function installPipeline(projectRoot, dryRun, options = {}) {
1322
1399
  await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'plans'));
1323
1400
  await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'features'));
1324
1401
  await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'bugfix'));
1325
- await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'refactor'));
1326
1402
 
1327
1403
  const runtimeSwitched = previousRuntime !== runtime;
1328
1404
  const staleManagedFiles = await findStaleManagedPipelineFiles(projectRoot, runtime);
@@ -1876,7 +1952,7 @@ const SCAFFOLD_CONFIG_FIELDS = new Set([
1876
1952
  /**
1877
1953
  * 执行纯净安装
1878
1954
  * @param {Object} config
1879
- * @param {string} config.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'all' | comma-separated subset
1955
+ * @param {string} config.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'antigravity' | 'all' | comma-separated subset
1880
1956
  * @param {string} [config.runtime] - 'python' (legacy aliases accepted: 'unix' | 'windows')
1881
1957
  * @param {string} config.skills - 'core' | 'minimal' | 'recommended:<type>'
1882
1958
  * @param {boolean} config.pipeline - 是否安装 dev-pipeline
@@ -2104,7 +2180,7 @@ export async function scaffold(config) {
2104
2180
  ? '说 "运行 prizmkit-init"'
2105
2181
  : mainPlatform === 'pi'
2106
2182
  ? '输入 "/skill:prizmkit-init"'
2107
- : mainPlatform === 'cursor'
2183
+ : (mainPlatform === 'cursor' || mainPlatform === 'antigravity')
2108
2184
  ? '输入 "/prizmkit-init"'
2109
2185
  : '说 "/prizmkit-init"';
2110
2186
  console.log(` 3. ${chalk.cyan(initInstruction)} ${chalk.gray('# 初始化项目上下文')}`);
package/src/upgrade.js CHANGED
@@ -88,12 +88,14 @@ export async function removeSkillFiles(platform, projectRoot, skillNames, dryRun
88
88
  console.log(chalk.red(` ✗ removed .codebuddy/skills/${skillName}/`));
89
89
  }
90
90
  }
91
- } else if (platform === 'codex' || platform === 'pi' || platform === 'cursor') {
91
+ } else if (platform === 'codex' || platform === 'pi' || platform === 'cursor' || platform === 'antigravity') {
92
92
  const skillDir = platform === 'pi'
93
93
  ? path.join(projectRoot, '.pi', 'skills', skillName)
94
94
  : platform === 'cursor'
95
95
  ? path.join(projectRoot, '.cursor', 'skills', skillName)
96
- : path.join(projectRoot, '.agents', 'skills', skillName);
96
+ : platform === 'antigravity'
97
+ ? path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills', skillName)
98
+ : path.join(projectRoot, '.agents', 'skills', skillName);
97
99
  if (await fs.pathExists(skillDir)) {
98
100
  if (dryRun) {
99
101
  console.log(chalk.gray(` [dry-run] remove ${path.relative(projectRoot, skillDir)}/`));
@@ -110,7 +112,7 @@ export async function removeSkillFiles(platform, projectRoot, skillNames, dryRun
110
112
  * Remove agent files for a specific platform.
111
113
  */
112
114
  export async function removeAgentFiles(platform, projectRoot, agentFileNames, dryRun) {
113
- if (platform === 'pi' || platform === 'cursor') return;
115
+ if (platform === 'pi' || platform === 'cursor' || platform === 'antigravity') return;
114
116
  for (const fileName of agentFileNames) {
115
117
  const dir = platform === 'claude'
116
118
  ? path.join(projectRoot, '.claude', 'agents')
@@ -153,6 +155,7 @@ function platformRuleSearchRoots(platform, projectRoot) {
153
155
  }
154
156
  if (platform === 'pi') return [path.join(projectRoot, '.pi', 'rules')];
155
157
  if (platform === 'cursor') return [path.join(projectRoot, '.cursor', 'rules')];
158
+ if (platform === 'antigravity') return [path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'rules')];
156
159
  return [path.join(projectRoot, '.codebuddy', 'rules')];
157
160
  }
158
161
 
@@ -363,6 +366,8 @@ export async function runUpgrade(directory, options = {}) {
363
366
  const hasCodex = await hasPlatformFiles(path.join(projectRoot, '.agents', 'skills'));
364
367
  const hasPi = await hasPlatformFiles(path.join(projectRoot, '.pi', 'skills'));
365
368
  const hasCursor = await hasPlatformFiles(path.join(projectRoot, '.cursor', 'skills'));
369
+ const hasAntigravity = await fs.pathExists(path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'plugin.json'))
370
+ || await hasPlatformFiles(path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills'));
366
371
 
367
372
  const detectedPlatforms = [
368
373
  hasCodeBuddy && 'codebuddy',
@@ -370,6 +375,7 @@ export async function runUpgrade(directory, options = {}) {
370
375
  hasCodex && 'codex',
371
376
  hasPi && 'pi',
372
377
  hasCursor && 'cursor',
378
+ hasAntigravity && 'antigravity',
373
379
  ].filter(Boolean);
374
380
 
375
381
  platform = detectedPlatforms.length
@@ -1,53 +0,0 @@
1
- # Dev-Pipeline Schema Analysis
2
-
3
- ## Current Plan-List Schemas
4
-
5
- PrizmKit uses three JSON plan-list schemas under `dev-pipeline/templates/`:
6
-
7
- | Schema | Item key | Purpose |
8
- |---|---|---|
9
- | `feature-list-schema.json` | `features` | Feature pipeline input |
10
- | `bug-fix-list-schema.json` | `bugs` | Bugfix pipeline input |
11
- | `refactor-list-schema.json` | `refactors` | Refactor pipeline input |
12
-
13
- ## Shared Item Fields
14
-
15
- - `id`: pipeline-family ID (`F-NNN`, `B-NNN`, or `R-NNN`).
16
- - `title`: concise task title.
17
- - `description`: implementation context for the AI session.
18
- - `priority` or `severity`: scheduling/risk signal.
19
- - `dependencies`: same-family dependency IDs.
20
- - `acceptance_criteria`: verifiable completion conditions.
21
- - `status`: external pipeline status.
22
- - `model`: optional per-item AI model override.
23
- - `user_context`: optional user-provided materials preserved verbatim.
24
- - `browser_interaction`: optional browser verification policy.
25
-
26
- ## Feature-Specific Fields
27
-
28
- - `estimated_complexity`: maps feature work to `lite`, `standard`, or `full` prompt modes.
29
- - `completion_notes`: downstream dependency context after completion.
30
- - `testing`: optional testing expectations for the scoped test gate.
31
-
32
- ## Bugfix-Specific Fields
33
-
34
- - `severity`: incident impact signal.
35
- - `error_source`: structured source evidence.
36
- - `verification_type`: automated, manual, or hybrid verification policy.
37
- - `affected_modules`, `environment`: optional triage context.
38
-
39
- ## Refactor-Specific Fields
40
-
41
- - `scope`: files and modules affected.
42
- - `type`: extract, rename, restructure, simplify, decouple, or migrate.
43
- - `complexity`: low, medium, or high refactor complexity.
44
- - `behavior_preservation`: strategy and supporting tests for no-behavior-change work.
45
- - `estimated_lines`, `completion_notes`: optional planning and downstream context.
46
-
47
- ## Strictness Notes
48
-
49
- Item objects are strict. Removed or unknown item fields should be rejected by schema and planner validators so stale configuration cannot silently alter runtime behavior.
50
-
51
- ## Prompt Integration
52
-
53
- Prompt generators consume only supported schema fields. The feature pipeline selects prompt mode from `estimated_complexity`; bugfix and refactor prompts select mode from severity/complexity and runtime overrides. Browser verification is driven by `browser_interaction` and remains a mandatory attempt when enabled.