prizmkit 1.1.189 → 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.
- package/bin/create-prizmkit.js +4 -4
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +150 -0
- package/bundled/adapters/antigravity/hooks-adapter.js +195 -0
- package/bundled/adapters/antigravity/paths.js +14 -0
- package/bundled/adapters/antigravity/rules-adapter.js +54 -0
- package/bundled/adapters/antigravity/skill-adapter.js +29 -0
- package/bundled/dev-pipeline/README.md +16 -5
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +13 -2
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +12 -12
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +13 -4
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +8 -2
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +186 -24
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +2 -0
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +305 -17
- package/bundled/dev-pipeline/scripts/utils.py +5 -3
- package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +1 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +135 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +363 -0
- package/bundled/rules/USAGE.md +1 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bug-planner/SKILL.md +29 -31
- package/bundled/skills/bug-planner/references/generated-plan-review.md +19 -23
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +11 -0
- package/bundled/skills/feature-planner/SKILL.md +22 -22
- package/bundled/skills/feature-planner/references/generated-plan-review.md +19 -23
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +7 -7
- package/bundled/skills/feature-planner/references/new-project-planning.md +7 -7
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +11 -0
- package/bundled/skills/prizmkit-init/SKILL.md +1 -1
- package/bundled/skills/prizmkit-init/references/config-schema.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +1 -1
- package/bundled/skills/refactor-planner/SKILL.md +23 -25
- package/bundled/skills/refactor-planner/references/fast-path.md +4 -4
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +19 -23
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +11 -0
- package/package.json +1 -1
- package/src/ai-cli-launch.js +1 -1
- package/src/clean.js +40 -4
- package/src/config.js +64 -4
- package/src/detect-platform.js +10 -6
- package/src/external-skills.js +2 -2
- package/src/index.js +1 -0
- package/src/manifest.js +1 -1
- package/src/platforms.js +6 -2
- package/src/prompts.js +11 -3
- package/src/scaffold.js +59 -4
- package/src/upgrade.js +9 -3
|
@@ -56,7 +56,7 @@ The user chose this skill intentionally. Respect that choice.
|
|
|
56
56
|
|
|
57
57
|
## Draft Lifecycle (Hard Rule)
|
|
58
58
|
|
|
59
|
-
In an ordinary successful flow, `.prizmkit/plans/refactor-list.draft.json` is
|
|
59
|
+
In an ordinary successful flow, `.prizmkit/plans/refactor-list.draft.json` is a private reasoning workspace: never presented as a deliverable, never given its own approval round, never retained after the batch lands. Build the batch there, validate it there, and run the entire Local Generated-Plan Review against it; the final list is written exactly once, after that review returns `PASS`, by a single `append` (existing list) or `generate` (new list). Then delete the draft immediately and report `Draft cleanup: removed`. A batch lost before it lands is regenerated from the confirmed decisions rather than recovered. Conditions that must keep a draft — explicit draft-save, interruption, a writer-rejected insert, cleanup failure — are defined in `${SKILL_DIR}/references/error-recovery.md`, and any retained path is named in the terminal report. For later adjustments, recreate only the minimum source draft from confirmed in-memory entries or exact-ID `show`; modifying entries this session did not create is the one case that still uses `append --replace-tail` for the exact current suffix.
|
|
60
60
|
|
|
61
61
|
## Fresh-Session Task Contract (Hard Rule)
|
|
62
62
|
|
|
@@ -172,12 +172,12 @@ For any flow that appends to an existing `.prizmkit/plans/refactor-list.json`, N
|
|
|
172
172
|
```bash
|
|
173
173
|
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py show --input .prizmkit/plans/refactor-list.json --id R-NNN
|
|
174
174
|
```
|
|
175
|
-
5. For append-only planning, write `.prizmkit/plans/refactor-list.draft.json` as an additions-only object with exactly one root field, `refactors`. The array must be non-empty; each item uses the unchanged final refactor-item schema, with required `id`, `title`, `description`, `scope`, `type`, `priority`, `complexity`, `behavior_preservation`, `dependencies`, and `acceptance_criteria`; `status` may be omitted and defaults to `pending`; all existing optional refactor fields remain allowed. Do not copy root metadata or historical refactors into this bounded
|
|
176
|
-
6. After consequential decisions and the pre-generation gate pass,
|
|
175
|
+
5. For append-only planning, write `.prizmkit/plans/refactor-list.draft.json` as an additions-only object with exactly one root field, `refactors`. The array must be non-empty; each item uses the unchanged final refactor-item schema, with required `id`, `title`, `description`, `scope`, `type`, `priority`, `complexity`, `behavior_preservation`, `dependencies`, and `acceptance_criteria`; `status` may be omitted and defaults to `pending`; all existing optional refactor fields remain allowed. Do not copy root metadata or historical refactors into this bounded private reasoning workspace, which is the review target rather than a deliverable.
|
|
176
|
+
6. After consequential decisions and the pre-generation gate pass, write the batch to the additions-only draft with the `context` IDs and check merge feasibility without writing:
|
|
177
177
|
```bash
|
|
178
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
178
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json --dry-run
|
|
179
179
|
```
|
|
180
|
-
Do not ask for separate user approval merely to promote the draft into the final list. The
|
|
180
|
+
Do not ask for separate user approval merely to promote the draft into the final list. The dry run applies the same base, exact-ID, dependency, and complete-DAG checks the real insert will, so a `PASS` review is a promise the insert keeps. Run the real `append` once, after §Local Generated-Plan Review Gate returns `PASS`, then follow §Draft Lifecycle. Existing `generate` remains the new-list/full-rewrite path.
|
|
181
181
|
|
|
182
182
|
## Operation Modes
|
|
183
183
|
|
|
@@ -319,25 +319,22 @@ See `${SKILL_DIR}/references/planning-phases.md` for the full 5-step review chec
|
|
|
319
319
|
**Goal**: Produce `.prizmkit/plans/refactor-list.json` and validate it.
|
|
320
320
|
|
|
321
321
|
**IMPORTANT: Do NOT hand-write the final JSON file.** Instead:
|
|
322
|
-
1. For a new list, write the complete `.prizmkit/plans/refactor-list.draft.json`. For an existing list, follow §Bounded Existing-List Context and write only the additions-only `refactors` object
|
|
323
|
-
2. Once required semantic gates pass,
|
|
324
|
-
- New list or explicit full-list rewrite:
|
|
325
|
-
```bash
|
|
326
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
327
|
-
```
|
|
322
|
+
1. For a new list, write the complete `.prizmkit/plans/refactor-list.draft.json`. For an existing list, follow §Bounded Existing-List Context and write only the additions-only `refactors` object. The draft is the review target, so nothing is written to the final list yet.
|
|
323
|
+
2. Once required semantic gates pass, check merge feasibility without a second draft-approval pause:
|
|
324
|
+
- New list or explicit full-list rewrite: the draft is complete and nothing exists to overwrite, so its post-review `generate` is the validator.
|
|
328
325
|
- Ordinary existing-list append:
|
|
329
326
|
```bash
|
|
330
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
327
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json --dry-run
|
|
331
328
|
```
|
|
332
|
-
|
|
329
|
+
The dry run applies the same base, exact-ID, dependency, and complete-DAG checks the real insert will, including `append`'s preservation of root metadata and historical refactors.
|
|
333
330
|
3. If validation fails -> fix the draft and retry (max 3 attempts)
|
|
334
|
-
4. If
|
|
335
|
-
5.
|
|
331
|
+
4. If the draft and dry run pass -> run the mandatory Local Generated-Plan Review Gate (see §Local Generated-Plan Review Gate below) on the draft; apply accepted fixes to the draft and revalidate until `PASS`
|
|
332
|
+
5. After `PASS` -> insert exactly once (`append`, or `generate` for a new list), confirm its `appended_ids`, and delete the draft under §Draft Lifecycle
|
|
336
333
|
6. Present the final written result, summary, and draft cleanup result. For later user adjustments, recreate the minimum source draft from confirmed in-memory entries or exact-ID `show`, then rerun `generate` for a new-list rewrite or `append --replace-tail` for ordinary appended entries
|
|
337
334
|
|
|
338
|
-
**CHECKPOINT CP-RP-6**:
|
|
335
|
+
**CHECKPOINT CP-RP-6**: The draft batch validates and its merge dry run returns zero errors; the final list is still untouched.
|
|
339
336
|
|
|
340
|
-
**CHECKPOINT CP-RP-7**: Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only
|
|
337
|
+
**CHECKPOINT CP-RP-7**: Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only the draft batch, applied accepted fixes through the draft, revalidated, returned `PASS`, then ran exactly one insert whose `appended_ids` match the batch and removed the draft.
|
|
341
338
|
|
|
342
339
|
## Checkpoints (Mandatory Gates)
|
|
343
340
|
|
|
@@ -349,14 +346,14 @@ See `${SKILL_DIR}/references/planning-phases.md` for the full 5-step review chec
|
|
|
349
346
|
| **CP-RP-3** | Items Decomposed | All items have deps, complexity, preservation strategy | 4 |
|
|
350
347
|
| **CP-RP-4** | Items Confirmed | User confirmed/modified/skipped each item | 5 |
|
|
351
348
|
| **CP-RP-5** | Completeness OK | DAG valid, preservation strategies declared, no gaps | 6 |
|
|
352
|
-
| **CP-RP-6** |
|
|
353
|
-
| **CP-RP-7** |
|
|
349
|
+
| **CP-RP-6** | Draft Batch Ready | Additions-only or complete draft holds the whole batch with `context` IDs; merge dry run clean; final list still untouched | 7 |
|
|
350
|
+
| **CP-RP-7** | Reviewed, Then Inserted Once | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only the draft batch, applied accepted fixes through the draft, revalidated, returned `PASS`, then ran exactly one insert whose `appended_ids` match the batch, and removed the draft | 7 |
|
|
354
351
|
|
|
355
352
|
## Local Generated-Plan Review Gate
|
|
356
353
|
|
|
357
|
-
Run this gate after `.prizmkit/plans/refactor-list.json
|
|
354
|
+
Run this gate after the batch is written to the draft and passes draft validation, and before anything is written to `.prizmkit/plans/refactor-list.json`. The review target is the batch that is about to be inserted, not a file that already contains it. It applies whenever this session produced or changed a batch. For validate-only, summary-only, or draft-save flows with no batch, report that the gate is not applicable.
|
|
358
355
|
|
|
359
|
-
Read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the single source of truth. Review the
|
|
356
|
+
Read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the single source of truth. Review the draft directly, reading `.prizmkit` artifacts from disk rather than from `git status` or `git diff`, because those files may be gitignored. Use bounded `context` and explicit-ID `show` only for already-committed entries whose contract or dependency semantics a reviewed item relies on; do not load unchanged historical entries. Repeat the Headless Context Completeness Gate for every reviewed new or changed refactor. Keep the review planning-only: apply accepted findings to the draft, re-run draft validation and the merge dry run, and repeat local review until it returns `PASS`. Only then insert once and complete §Draft Lifecycle cleanup before reporting the final written result. If the insert is rejected after `PASS`, nothing landed; fix the draft, re-run validation and the dry run, and re-review only the entries you changed.
|
|
360
357
|
|
|
361
358
|
## Output Rules
|
|
362
359
|
|
|
@@ -459,11 +456,12 @@ When validation fails, existing planning artifacts are detected, the session is
|
|
|
459
456
|
|
|
460
457
|
## Handoff Message Template
|
|
461
458
|
|
|
462
|
-
After
|
|
459
|
+
After the batch is inserted, report:
|
|
463
460
|
1. Output file path
|
|
464
461
|
2. Total refactor items
|
|
465
462
|
3. Dependency ordering highlights (which items must run first)
|
|
466
463
|
4. Behavior preservation strategy distribution (N items with test-gate, M with snapshot, etc.)
|
|
467
|
-
5. Local generated-plan review result: verdict, reviewed
|
|
468
|
-
6.
|
|
469
|
-
7.
|
|
464
|
+
5. Local generated-plan review result: verdict, reviewed batch IDs plus reviewed root prose when applicable, and accepted fixes (or "none")
|
|
465
|
+
6. Insert result: the single writer run and the `appended_ids` it reported
|
|
466
|
+
7. Draft cleanup result: `removed`
|
|
467
|
+
8. Recommended next action: `refactor-pipeline-launcher`
|
|
@@ -31,13 +31,13 @@ For simple refactoring with minimal scope.
|
|
|
31
31
|
**NEVER proceed without explicit user selection via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
|
|
32
32
|
3. Draft items (title + type + scope + description + acceptance_criteria + behavior_preservation + dependencies)
|
|
33
33
|
4. Run the mandatory Phase 6 Headless Context Completeness Gate on every drafted item; repair the draft until each returns `PASS` without conversation history or `user_context`.
|
|
34
|
-
5. Write `.prizmkit/plans/refactor-list.draft.json` as
|
|
34
|
+
5. Write `.prizmkit/plans/refactor-list.draft.json` as the private review workspace. For a new list, write the complete final-list draft; for an existing list, write only the additions-only `refactors` object and check merge feasibility without writing, with no second draft-approval pause:
|
|
35
35
|
```bash
|
|
36
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
36
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json --dry-run
|
|
37
37
|
```
|
|
38
|
-
6. If valid -> run the mandatory Local Generated-Plan Review Gate from the main `refactor-planner` skill. After review returns `PASS`
|
|
38
|
+
6. If valid -> run the mandatory Local Generated-Plan Review Gate from the main `refactor-planner` skill against the draft. After review returns `PASS`, insert once (`append`, or `generate` for a new list), delete the draft under the main Skill's Draft Lifecycle, then present the final written result before recommending `refactor-pipeline-launcher`.
|
|
39
39
|
7. For a later adjustment after cleanup, recreate only the minimum source draft from confirmed in-memory entries or exact-ID `show`, then rerun `generate` for a new-list rewrite or `append --replace-tail` for an ordinary append.
|
|
40
|
-
8. If invalid -> apply fixes to the draft and re-run the
|
|
40
|
+
8. If invalid -> apply fixes to the draft and re-run the dry run; a new list is validated by its post-`PASS` `generate`, which writes nothing when it rejects (max 2 attempts, then escalate to full workflow)
|
|
41
41
|
|
|
42
42
|
## When NOT to Use Fast Path
|
|
43
43
|
- More than 2 refactor items
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Generated Plan Review — Refactor Planner
|
|
2
2
|
|
|
3
|
-
Use this local review loop
|
|
3
|
+
Use this local review loop on the batch that is about to be inserted into `.prizmkit/plans/refactor-list.json`. This is a planner-output review, not an implementation/code-diff review, and it runs before the insert so the verdict decides whether the batch lands.
|
|
4
4
|
|
|
5
5
|
## Trigger
|
|
6
6
|
|
|
7
|
-
Run only when the current `refactor-planner` session
|
|
7
|
+
Run only when the current `refactor-planner` session produced a draft batch of new or changed refactors. For validate-only, summary-only, or draft-save flows with no new batch, report: `Local generated-plan review: not applicable — no new planning content written.`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The draft is the whole review surface. Nothing is written to the final list while this loop runs: the single insert happens only after a `PASS`, so the verdict decides whether the batch lands and no final list ever holds reviewed-looking entries that were never reviewed.
|
|
10
10
|
|
|
11
11
|
## Direct Artifact Reads
|
|
12
12
|
|
|
13
13
|
Planning artifacts may be gitignored, untracked, or absent from staged and unstaged diffs. Read the actual files through bounded, source-first access:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
15
|
+
- Review target: `.prizmkit/plans/refactor-list.draft.json` — the additions-only or complete batch, read in full; this is the only planning content under review
|
|
16
|
+
- Final list: `.prizmkit/plans/refactor-list.json` — run the `context` command for root prose and recent IDs; do not load the complete historical list into AI context, and do not expect this session's batch to appear in it yet
|
|
17
17
|
- Pre-session final list snapshot if captured in memory before edits — retain only bounded root context, prior task count/next ID, and the five recent `{id, description}` pairs, not full history
|
|
18
18
|
- In-memory draft object if the session has not written a draft file yet
|
|
19
|
-
-
|
|
19
|
+
- Already-committed entries a reviewed item relies on — load each referenced ID with `python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py show --input .prizmkit/plans/refactor-list.json --id R-NNN`
|
|
20
20
|
|
|
21
|
-
Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whether planner output exists or changed. Do not invoke `/prizmkit-code-review` for this planner-output gate; `/prizmkit-code-review` remains the implementation/code-diff review gate after `/prizmkit-implement`.
|
|
21
|
+
Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whether planner output exists or changed. If the final list already contains this session's batch, the insert ran before the verdict — report that instead of reviewing an already-landed batch. Do not invoke `/prizmkit-code-review` for this planner-output gate; `/prizmkit-code-review` remains the implementation/code-diff review gate after `/prizmkit-implement`.
|
|
22
22
|
|
|
23
23
|
## Review Scope
|
|
24
24
|
|
|
25
|
-
1.
|
|
25
|
+
1. Treat the draft batch as the change set. Its `R-*` IDs are the sequential `context` IDs the writer demands at insert time, so the IDs reviewed are the IDs that land; do not compare complete pre/post historical arrays in AI context.
|
|
26
26
|
2. Root project prose is reviewable content, not generator metadata. Read it through `context`; review new or changed `project_description` and `global_context` even when no refactor item changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
|
|
27
27
|
3. Treat refactors as changed only when item fields changed; load and review newly added refactor IDs and explicitly changed refactor IDs through `show`.
|
|
28
28
|
4. Preserve unchanged historical refactors. Do not load unchanged entries merely to establish review completeness. Use the full-list validator for dependency/DAG truth; use `show` for an old dependency or behavior-preservation interaction only when a specific reviewed refactor requires semantic inspection.
|
|
@@ -48,6 +48,7 @@ For every reviewed refactor entry, check:
|
|
|
48
48
|
- Priority/complexity calibration: every reviewed refactor has short priority and complexity rationales, medium/low assignments are allowed when criteria fit, and high/high is not used merely because the work is cleanup, framework-related, multi-file, or user-requested
|
|
49
49
|
- Domain cohesion: same contract-bounded capability stays one top-level item; independently shippable is not a split reason; same-domain over-split is `NEEDS_FIXES` unless one existing headless session cannot finish
|
|
50
50
|
- Injected-field fidelity: confirmed structure, scope, preservation, and completion evidence are in `description` and `acceptance_criteria`; AI rewrite is allowed; dropping a confirmed item is not
|
|
51
|
+
- Insert feasibility: every `dependencies` entry on a committed ID exists in the final list, the batch uses the consecutive IDs `context` reported, and the merge dry run returns `"valid": true`. Draft-only validation cannot see the merged graph, so a `PASS` without this check is a verdict the writer may reject.
|
|
51
52
|
- Size: there is no word-count upper limit and no acceptance-criteria count upper limit
|
|
52
53
|
|
|
53
54
|
## Headless Context Completeness Gate
|
|
@@ -80,32 +81,27 @@ Do not add new JSON fields, context objects, schema versions, or pipeline runtim
|
|
|
80
81
|
1. Present findings with IDs, severity, evidence, and suggested draft/source changes.
|
|
81
82
|
2. Accept only findings that improve planner correctness, completeness, or downstream behavior-preserving execution readiness.
|
|
82
83
|
3. Apply accepted fixes to `.prizmkit/plans/refactor-list.draft.json` or the in-memory draft object first.
|
|
83
|
-
4.
|
|
84
|
+
4. Re-check the fixed draft without writing:
|
|
84
85
|
|
|
85
86
|
```bash
|
|
86
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json --
|
|
87
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py append --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json --dry-run
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
The dry run enforces the same base, exact-ID, dependency, and complete-DAG checks as the real insert, so keep it green instead of discovering a merge conflict after `PASS`. A new list or explicit full-list rewrite has no merged graph to check and nothing to overwrite, so its single post-`PASS` `generate` is the validator; if it rejects the draft, fix and retry, because no file was written.
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
5. Re-run append/generation until valid. Do not hand-patch `.prizmkit/plans/refactor-list.json` as the source of truth and do not add a user approval round for the mechanical rewrite.
|
|
92
|
+
5. Never hand-patch `.prizmkit/plans/refactor-list.json` as the source of truth and do not add a user approval round for the mechanical rewrite.
|
|
98
93
|
6. Repeat the local review and Headless Context Completeness Gate only for entries changed by accepted fixes.
|
|
99
|
-
7. Do not report `PASS` until every required fresh-session answer is available and
|
|
100
|
-
8. After `PASS`,
|
|
94
|
+
7. Do not report `PASS` until every required fresh-session answer is available and the draft validation plus merge dry run pass.
|
|
95
|
+
8. After `PASS`, insert the batch exactly once (`append`, or `generate` for a new list), confirm the writer's `appended_ids`, then delete `.prizmkit/plans/refactor-list.draft.json`. Retain a draft only under the conditions in `${SKILL_DIR}/references/error-recovery.md`; report the retained path and reason.
|
|
101
96
|
|
|
102
97
|
## Report Format
|
|
103
98
|
|
|
104
99
|
Report in the final handoff summary:
|
|
105
100
|
|
|
106
101
|
- `Local generated-plan review: PASS` or `NEEDS_FIXES`
|
|
107
|
-
- Reviewed
|
|
102
|
+
- Reviewed batch IDs and reviewed root prose (`project_description` / `global_context`) when applicable
|
|
103
|
+
- Merge dry-run result
|
|
108
104
|
- Accepted fixes, or `none`
|
|
109
|
-
-
|
|
105
|
+
- Insert result: the single writer run and the `appended_ids` it reported
|
|
110
106
|
- Draft cleanup result: `removed`, or retained path and recovery reason
|
|
111
|
-
- Note when review was not applicable because no new
|
|
107
|
+
- Note when review was not applicable because no new planning content was written
|
|
@@ -18,6 +18,7 @@ Usage:
|
|
|
18
18
|
python3 validate-and-generate-refactor.py context --input .prizmkit/plans/refactor-list.json
|
|
19
19
|
python3 validate-and-generate-refactor.py show --input .prizmkit/plans/refactor-list.json --id R-001
|
|
20
20
|
python3 validate-and-generate-refactor.py append --input additions.json --output .prizmkit/plans/refactor-list.json
|
|
21
|
+
python3 validate-and-generate-refactor.py append --input additions.json --output .prizmkit/plans/refactor-list.json --dry-run
|
|
21
22
|
python3 validate-and-generate-refactor.py generate --input draft.json --output .prizmkit/plans/refactor-list.json
|
|
22
23
|
python3 validate-and-generate-refactor.py summary --input .prizmkit/plans/refactor-list.json [--format markdown|json]
|
|
23
24
|
|
|
@@ -888,6 +889,11 @@ def cmd_append(args):
|
|
|
888
889
|
_err(" " + error)
|
|
889
890
|
return 1
|
|
890
891
|
|
|
892
|
+
if getattr(args, "dry_run", False):
|
|
893
|
+
_info("Dry run: {} refactor(s) would be appended to {}".format(
|
|
894
|
+
len(prepared), args.output))
|
|
895
|
+
return 0
|
|
896
|
+
|
|
891
897
|
try:
|
|
892
898
|
_write_json_atomic(args.output, merged)
|
|
893
899
|
except Exception as exc:
|
|
@@ -1053,6 +1059,11 @@ def main():
|
|
|
1053
1059
|
action="store_true",
|
|
1054
1060
|
help="Replace the exact existing suffix with the same IDs after local review",
|
|
1055
1061
|
)
|
|
1062
|
+
p_append.add_argument(
|
|
1063
|
+
"--dry-run",
|
|
1064
|
+
action="store_true",
|
|
1065
|
+
help="Validate the would-be merged list without writing it",
|
|
1066
|
+
)
|
|
1056
1067
|
|
|
1057
1068
|
# -- generate --
|
|
1058
1069
|
p_generate = subparsers.add_parser(
|
package/package.json
CHANGED
package/src/ai-cli-launch.js
CHANGED
|
@@ -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
|
-
|
|
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 [
|
|
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
|
}
|
package/src/config.js
CHANGED
|
@@ -112,6 +112,42 @@ async function removeCursorManagedFiles(projectRoot, dryRun) {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
async function removeAntigravityManagedFiles(projectRoot, dryRun) {
|
|
116
|
+
const adapterPath = path.join(getAdaptersDir(), 'antigravity', 'hooks-adapter.js');
|
|
117
|
+
const { removeHooks } = await import(pathToFileURL(adapterPath).href);
|
|
118
|
+
for (const change of await removeHooks(projectRoot, dryRun)) {
|
|
119
|
+
const verb = change.action === 'updated' ? 'update' : 'remove';
|
|
120
|
+
console.log(dryRun
|
|
121
|
+
? chalk.gray(` [dry-run] ${verb} ${change.path}`)
|
|
122
|
+
: change.action === 'updated'
|
|
123
|
+
? chalk.green(` ✓ updated ${change.path} (removed PrizmKit hooks)`)
|
|
124
|
+
: chalk.red(` ✗ removed ${change.path}`));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const guidancePath = path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'rules', 'prizmkit-framework.md');
|
|
128
|
+
if (await fs.pathExists(guidancePath)) {
|
|
129
|
+
if (dryRun) console.log(chalk.gray(' [dry-run] remove .agents/plugins/prizmkit/rules/prizmkit-framework.md'));
|
|
130
|
+
else {
|
|
131
|
+
await fs.remove(guidancePath);
|
|
132
|
+
console.log(chalk.red(' ✗ removed .agents/plugins/prizmkit/rules/prizmkit-framework.md'));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (!dryRun) {
|
|
137
|
+
for (const relativeDir of [
|
|
138
|
+
'.agents/plugins/prizmkit/hooks',
|
|
139
|
+
'.agents/plugins/prizmkit/rules',
|
|
140
|
+
'.agents/plugins/prizmkit/skills',
|
|
141
|
+
'.agents/plugins/prizmkit',
|
|
142
|
+
'.agents/plugins',
|
|
143
|
+
'.agents',
|
|
144
|
+
]) {
|
|
145
|
+
const dir = path.join(projectRoot, relativeDir);
|
|
146
|
+
if (await fs.pathExists(dir) && (await fs.readdir(dir)).length === 0) await fs.remove(dir);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
115
151
|
/**
|
|
116
152
|
* Detect which platforms are actually installed on filesystem.
|
|
117
153
|
*/
|
|
@@ -130,7 +166,16 @@ async function detectInstalledPlatforms(projectRoot) {
|
|
|
130
166
|
const hasCodex = await hasPlatformFiles(path.join(projectRoot, '.agents', 'skills'));
|
|
131
167
|
const hasPi = await hasPlatformFiles(path.join(projectRoot, '.pi', 'skills'));
|
|
132
168
|
const hasCursor = await hasPlatformFiles(path.join(projectRoot, '.cursor', 'skills'));
|
|
133
|
-
const
|
|
169
|
+
const hasAntigravity = await fs.pathExists(path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'plugin.json'))
|
|
170
|
+
|| await hasPlatformFiles(path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills'));
|
|
171
|
+
const detected = [
|
|
172
|
+
hasCodeBuddy && 'codebuddy',
|
|
173
|
+
hasClaude && 'claude',
|
|
174
|
+
hasCodex && 'codex',
|
|
175
|
+
hasPi && 'pi',
|
|
176
|
+
hasCursor && 'cursor',
|
|
177
|
+
hasAntigravity && 'antigravity',
|
|
178
|
+
].filter(Boolean);
|
|
134
179
|
if (detected.length === 0) return null;
|
|
135
180
|
return uniquePlatforms(detected).join(',');
|
|
136
181
|
}
|
|
@@ -246,8 +291,9 @@ async function migrateProjectMemoryOnPlatformDrop(droppedPlatform, newPlatforms,
|
|
|
246
291
|
* Selective removal — only removes known PrizmKit files, leaves user-created files intact.
|
|
247
292
|
*/
|
|
248
293
|
async function removePlatformFiles(platform, projectRoot, manifest, dryRun) {
|
|
249
|
-
// Validate and remove merge-sensitive Cursor hooks before any other platform mutation.
|
|
294
|
+
// Validate and remove merge-sensitive Cursor/Antigravity hooks before any other platform mutation.
|
|
250
295
|
if (platform === 'cursor') await removeCursorManagedFiles(projectRoot, dryRun);
|
|
296
|
+
if (platform === 'antigravity') await removeAntigravityManagedFiles(projectRoot, dryRun);
|
|
251
297
|
|
|
252
298
|
const skillNames = manifest?.files?.skills || [];
|
|
253
299
|
const ruleFileNames = manifest?.files?.rules || [];
|
|
@@ -272,8 +318,8 @@ async function removePlatformFiles(platform, projectRoot, manifest, dryRun) {
|
|
|
272
318
|
}
|
|
273
319
|
|
|
274
320
|
// Settings
|
|
275
|
-
if (platform === 'cursor') {
|
|
276
|
-
// Merge-sensitive
|
|
321
|
+
if (platform === 'cursor' || platform === 'antigravity') {
|
|
322
|
+
// Merge-sensitive hooks and managed framework guidance were handled first.
|
|
277
323
|
} else if (platform === 'codex') {
|
|
278
324
|
await removeGeneratedCodexConfig(projectRoot, dryRun);
|
|
279
325
|
const legacySettingsFile = path.join(projectRoot, '.codex', 'prizmkit-settings.json');
|
|
@@ -414,6 +460,20 @@ async function removePlatformFiles(platform, projectRoot, manifest, dryRun) {
|
|
|
414
460
|
await fs.remove(dir);
|
|
415
461
|
}
|
|
416
462
|
}
|
|
463
|
+
} else if (platform === 'antigravity') {
|
|
464
|
+
for (const relativeDir of [
|
|
465
|
+
'.agents/plugins/prizmkit/skills',
|
|
466
|
+
'.agents/plugins/prizmkit/rules',
|
|
467
|
+
'.agents/plugins/prizmkit/hooks',
|
|
468
|
+
'.agents/plugins/prizmkit',
|
|
469
|
+
'.agents/plugins',
|
|
470
|
+
'.agents',
|
|
471
|
+
]) {
|
|
472
|
+
const dir = path.join(projectRoot, relativeDir);
|
|
473
|
+
if (await fs.pathExists(dir) && !dryRun && (await fs.readdir(dir)).length === 0) {
|
|
474
|
+
await fs.remove(dir);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
417
477
|
}
|
|
418
478
|
}
|
|
419
479
|
|
package/src/detect-platform.js
CHANGED
|
@@ -9,7 +9,7 @@ import os from 'os';
|
|
|
9
9
|
/**
|
|
10
10
|
* 允许检测的命令白名单(仅用于 which 检测)
|
|
11
11
|
*/
|
|
12
|
-
const ALLOWED_COMMANDS = ['cbc', 'claude', 'codex', 'pi', 'agent'];
|
|
12
|
+
const ALLOWED_COMMANDS = ['cbc', 'claude', 'codex', 'pi', 'agent', 'agy'];
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 检查命令是否存在于 PATH 中
|
|
@@ -51,7 +51,7 @@ function cursorAgentExists() {
|
|
|
51
51
|
* 注意:platform 控制目录结构,suggestedCli 是实际运行的可执行命令。
|
|
52
52
|
* Cursor 的 `agent` 名称通用,只有安全的 version/help 身份探测通过才自动选择。
|
|
53
53
|
*
|
|
54
|
-
* @returns {{ cbc: boolean, claude: boolean, codex: boolean, pi: boolean, cursor: boolean, suggested: string, suggestedCli: string }}
|
|
54
|
+
* @returns {{ cbc: boolean, claude: boolean, codex: boolean, pi: boolean, cursor: boolean, antigravity: boolean, suggested: string, suggestedCli: string }}
|
|
55
55
|
*/
|
|
56
56
|
export function detectPlatform() {
|
|
57
57
|
const cbc = commandExists('cbc');
|
|
@@ -59,10 +59,13 @@ export function detectPlatform() {
|
|
|
59
59
|
const codex = commandExists('codex');
|
|
60
60
|
const pi = commandExists('pi');
|
|
61
61
|
const cursor = cursorAgentExists();
|
|
62
|
+
const antigravity = commandExists('agy');
|
|
62
63
|
|
|
63
|
-
// Preserve historical recommendations when
|
|
64
|
+
// Preserve historical recommendations when newer platforms are absent.
|
|
64
65
|
let suggested = 'codebuddy';
|
|
65
|
-
if (
|
|
66
|
+
if (antigravity) {
|
|
67
|
+
suggested = (cbc || claude || codex || pi || cursor) ? 'all' : 'antigravity';
|
|
68
|
+
} else if (cursor) {
|
|
66
69
|
suggested = (cbc || claude || codex || pi) ? 'all' : 'cursor';
|
|
67
70
|
} else if (pi) {
|
|
68
71
|
suggested = (cbc || claude || codex) ? 'all' : 'pi';
|
|
@@ -76,13 +79,14 @@ export function detectPlatform() {
|
|
|
76
79
|
suggested = 'codebuddy';
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
// Preserve historical precedence and use
|
|
82
|
+
// Preserve historical precedence and use newer CLIs only when earlier ones are absent.
|
|
80
83
|
let suggestedCli = '';
|
|
81
84
|
if (cbc) suggestedCli = 'cbc';
|
|
82
85
|
else if (claude) suggestedCli = 'claude';
|
|
83
86
|
else if (codex) suggestedCli = 'codex';
|
|
84
87
|
else if (pi) suggestedCli = 'pi';
|
|
85
88
|
else if (cursor) suggestedCli = 'agent';
|
|
89
|
+
else if (antigravity) suggestedCli = 'agy';
|
|
86
90
|
|
|
87
|
-
return { cbc, claude, codex, pi, cursor, suggested, suggestedCli };
|
|
91
|
+
return { cbc, claude, codex, pi, cursor, antigravity, suggested, suggestedCli };
|
|
88
92
|
}
|
package/src/external-skills.js
CHANGED
|
@@ -22,7 +22,7 @@ import { payloadSkillRoots } from './platforms.js';
|
|
|
22
22
|
* skill.repo {string} - GitHub short ref (e.g. "pbakaus/impeccable") or full URL
|
|
23
23
|
* skill.name {string} - Skill name (used for display / single-skill mode)
|
|
24
24
|
* skill.installAll {boolean} - If true, install all skills from the repo
|
|
25
|
-
* @param {string} platform - 'claude' | 'codebuddy' | 'codex' | 'pi' | 'cursor' | 'all' ('both' supported only for legacy manifests)
|
|
25
|
+
* @param {string} platform - 'claude' | 'codebuddy' | 'codex' | 'pi' | 'cursor' | 'antigravity' | 'all' ('both' supported only for legacy manifests)
|
|
26
26
|
* @param {string} projectRoot - Target project root
|
|
27
27
|
* @param {string} [aiCli] - optional AI CLI command that may require an additional payload platform
|
|
28
28
|
*/
|
|
@@ -87,7 +87,7 @@ export async function installExternalSkill(skill, platform, projectRoot, dryRun,
|
|
|
87
87
|
* Remove all artifacts created by `npx skills` that are not needed by PrizmKit.
|
|
88
88
|
* Call this once after all external skills have been installed.
|
|
89
89
|
*
|
|
90
|
-
* @param {string} platform - 'claude' | 'codebuddy' | 'codex' | 'pi' | 'cursor' | 'all' ('both' supported only for legacy manifests)
|
|
90
|
+
* @param {string} platform - 'claude' | 'codebuddy' | 'codex' | 'pi' | 'cursor' | 'antigravity' | 'all' ('both' supported only for legacy manifests)
|
|
91
91
|
* @param {string} [aiCli] - optional AI CLI command that may require an additional payload platform
|
|
92
92
|
*/
|
|
93
93
|
export async function cleanExternalSkillArtifacts(projectRoot, platform, aiCli = '') {
|
package/src/index.js
CHANGED
|
@@ -54,6 +54,7 @@ export async function runScaffold(directory, options) {
|
|
|
54
54
|
detected.codex ? chalk.green('codex ✓') : chalk.gray('codex ✗'),
|
|
55
55
|
detected.pi ? chalk.green('pi ✓') : chalk.gray('pi ✗'),
|
|
56
56
|
detected.cursor ? chalk.green('agent(Cursor) ✓') : chalk.gray('agent(Cursor) ✗'),
|
|
57
|
+
detected.antigravity ? chalk.green('agy ✓') : chalk.gray('agy ✗'),
|
|
57
58
|
].join(' ');
|
|
58
59
|
console.log(` 检测到的 CLI 工具: ${cliStatus}`);
|
|
59
60
|
console.log(` 目标目录: ${projectRoot}`);
|
package/src/manifest.js
CHANGED
|
@@ -133,7 +133,7 @@ export async function writeManifest(projectRoot, data) {
|
|
|
133
133
|
* Build a manifest object from installation config.
|
|
134
134
|
* @param {Object} params
|
|
135
135
|
* @param {string} params.version - PrizmKit version
|
|
136
|
-
* @param {string} params.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'all' ('both' supported only for legacy manifests)
|
|
136
|
+
* @param {string} params.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'antigravity' | 'all' ('both' supported only for legacy manifests)
|
|
137
137
|
* @param {string} [params.runtime] - canonical Python runtime id or compatibility alias
|
|
138
138
|
* @param {string} params.suite - skill suite name
|
|
139
139
|
* @param {string[]} params.skills - resolved skill name list
|
package/src/platforms.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { isBuiltInAiCli } from './ai-cli-launch.js';
|
|
3
3
|
|
|
4
|
-
export const PLATFORM_IDS = ['codebuddy', 'claude', 'codex', 'pi', 'cursor'];
|
|
5
|
-
export const PLATFORM_INPUT_HELP = 'codebuddy, claude, codex, pi, cursor, a comma-separated list of those, or all';
|
|
4
|
+
export const PLATFORM_IDS = ['codebuddy', 'claude', 'codex', 'pi', 'cursor', 'antigravity'];
|
|
5
|
+
export const PLATFORM_INPUT_HELP = 'codebuddy, claude, codex, pi, cursor, antigravity, a comma-separated list of those, or all';
|
|
6
6
|
export const CANONICAL_ALL_PLATFORMS = PLATFORM_IDS.join(',');
|
|
7
7
|
|
|
8
8
|
const HOST_LABELS = {
|
|
@@ -11,6 +11,7 @@ const HOST_LABELS = {
|
|
|
11
11
|
codex: 'Codex',
|
|
12
12
|
pi: 'Pi',
|
|
13
13
|
cursor: 'Cursor',
|
|
14
|
+
antigravity: 'Antigravity',
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export function unknownPlatformMessage(platform) {
|
|
@@ -70,6 +71,7 @@ export function platformFromAiCli(aiCli) {
|
|
|
70
71
|
if (name === 'codex') return 'codex';
|
|
71
72
|
if (name === 'pi') return 'pi';
|
|
72
73
|
if (name === 'agent') return 'cursor';
|
|
74
|
+
if (name === 'agy' || name === 'antigravity') return 'antigravity';
|
|
73
75
|
if (name === 'cbc' || name === 'codebuddy') return 'codebuddy';
|
|
74
76
|
return null;
|
|
75
77
|
}
|
|
@@ -138,6 +140,7 @@ export function defaultCliForPlatform(platform) {
|
|
|
138
140
|
if (platform === 'codex') return 'codex';
|
|
139
141
|
if (platform === 'pi') return 'pi';
|
|
140
142
|
if (platform === 'cursor') return 'agent';
|
|
143
|
+
if (platform === 'antigravity') return 'agy';
|
|
141
144
|
return '';
|
|
142
145
|
}
|
|
143
146
|
|
|
@@ -146,6 +149,7 @@ export function nativeSkillRoot(platform, projectRoot) {
|
|
|
146
149
|
if (platform === 'codex') return path.join(projectRoot, '.agents', 'skills');
|
|
147
150
|
if (platform === 'pi') return path.join(projectRoot, '.pi', 'skills');
|
|
148
151
|
if (platform === 'cursor') return path.join(projectRoot, '.cursor', 'skills');
|
|
152
|
+
if (platform === 'antigravity') return path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills');
|
|
149
153
|
return path.join(projectRoot, '.claude', 'skills');
|
|
150
154
|
}
|
|
151
155
|
|