prizmkit 1.1.191 → 1.1.193
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/bundled/VERSION.json +3 -3
- package/bundled/adapters/antigravity/skill-adapter.js +13 -4
- package/bundled/adapters/codex/skill-adapter.js +28 -8
- package/bundled/adapters/cursor/skill-adapter.js +13 -4
- package/bundled/adapters/pi/skill-adapter.js +28 -7
- package/bundled/dev-pipeline/.env.example +4 -12
- package/bundled/dev-pipeline/README.md +28 -44
- package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +6 -6
- package/bundled/dev-pipeline/prizmkit_runtime/atomic_io.py +48 -0
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +66 -23
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +10 -7
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +2 -21
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +48 -78
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +127 -67
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +158 -462
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +102 -50
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -25
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +47 -21
- package/bundled/dev-pipeline/prizmkit_runtime/processes.py +217 -156
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +39 -27
- package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +34 -174
- package/bundled/dev-pipeline/prizmkit_runtime/results.py +25 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +133 -110
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +15 -5
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -95
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +7 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +540 -262
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +175 -135
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +90 -9
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +214 -133
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +1 -3
- package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +2783 -0
- package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +27 -102
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +58 -4
- package/bundled/dev-pipeline/scripts/check-session-status.py +56 -20
- package/bundled/dev-pipeline/scripts/continuation.py +8 -7
- package/bundled/dev-pipeline/scripts/detect-stuck.py +47 -33
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +13 -16
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +20 -10
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +10 -7
- package/bundled/dev-pipeline/scripts/init-change-artifact.py +25 -4
- package/bundled/dev-pipeline/scripts/init-pipeline.py +14 -69
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +31 -2616
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +4 -24
- package/bundled/dev-pipeline/scripts/prompt_framework.py +85 -20
- package/bundled/dev-pipeline/scripts/status_common.py +591 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +85 -463
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +254 -65
- package/bundled/dev-pipeline/scripts/update-feature-status.py +76 -509
- package/bundled/dev-pipeline/scripts/utils.py +5 -12
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -5
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +7 -0
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +7 -7
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -6
- package/bundled/dev-pipeline/templates/session-status-schema.json +2 -5
- package/bundled/skills/_metadata.json +9 -63
- package/bundled/skills/app-planner/SKILL.md +32 -303
- package/bundled/skills/app-planner/references/app-design-guide.md +0 -4
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +14 -0
- package/bundled/skills/app-planner/references/project-conventions-discovery.md +4 -6
- package/bundled/skills/app-planner/references/project-state-detection.md +2 -3
- package/bundled/skills/bug-fix-workflow/SKILL.md +1 -2
- package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +4 -7
- package/bundled/skills/bug-planner/SKILL.md +54 -435
- package/bundled/skills/bug-planner/references/generated-plan-review.md +3 -2
- package/bundled/skills/bug-planner/references/input-formats.md +32 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +4 -28
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +4 -28
- package/bundled/skills/feature-planner/SKILL.md +60 -439
- package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
- package/bundled/skills/feature-planner/references/completeness-review.md +34 -0
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +2 -2
- package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills/feature-planner/references/generated-plan-review.md +3 -2
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +3 -1
- package/bundled/skills/feature-workflow/SKILL.md +1 -2
- package/bundled/skills/prizmkit/SKILL.md +7 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +14 -6
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +7 -4
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +16 -0
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +58 -20
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
- package/bundled/skills/prizmkit-init/SKILL.md +24 -127
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +3 -3
- package/bundled/skills/prizmkit-plan/SKILL.md +6 -8
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +1 -1
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +5 -2
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +6 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -13
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
- package/bundled/skills/prizmkit-test/SKILL.md +25 -133
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +5 -2
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +6 -0
- package/bundled/skills/prizmkit-workflow/SKILL.md +2 -3
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +4 -3
- package/bundled/skills/recovery-workflow/SKILL.md +7 -7
- package/bundled/skills/recovery-workflow/evals/evals.json +1 -1
- package/bundled/skills/recovery-workflow/references/detection.md +1 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -6
- package/bundled/templates/project-memory-template.md +1 -2
- package/package.json +1 -1
- package/src/scaffold.js +28 -7
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +0 -53
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +0 -649
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +0 -463
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +0 -1512
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -240
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +0 -266
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +0 -15
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +0 -9
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +0 -24
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +0 -16
- package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +0 -9
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +0 -22
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +0 -19
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +0 -24
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +0 -12
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -6
- package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +0 -52
- package/bundled/dev-pipeline/tests/conftest.py +0 -29
- package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +0 -208
- package/bundled/dev-pipeline/tests/test_auto_skip.py +0 -1871
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +0 -1314
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +0 -1712
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +0 -627
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +0 -478
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +0 -5641
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +0 -322
- package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -252
- package/bundled/dev-pipeline/tests/test_reset_modes.py +0 -1208
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -957
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +0 -1113
- package/bundled/dev-pipeline/tests/test_runtime_helper.py +0 -303
- package/bundled/dev-pipeline/tests/test_unified_cli.py +0 -5504
- package/bundled/dev-pipeline/tests/test_utils.py +0 -170
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +0 -44
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +0 -219
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +0 -78
- package/bundled/skills/refactor-planner/SKILL.md +0 -467
- package/bundled/skills/refactor-planner/assets/planning-guide.md +0 -291
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +0 -187
- package/bundled/skills/refactor-planner/references/error-recovery.md +0 -45
- package/bundled/skills/refactor-planner/references/fast-path.md +0 -59
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +0 -107
- package/bundled/skills/refactor-planner/references/planning-phases.md +0 -172
- package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +0 -230
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +0 -1120
- package/bundled/skills/refactor-workflow/SKILL.md +0 -205
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "recovery-workflow"
|
|
3
|
-
description: "Return the exact PrizmKit CLI command that continues an interrupted feature
|
|
3
|
+
description: "Return the exact PrizmKit CLI command that continues an interrupted feature or bugfix task on its recorded task branch. Use when a pipeline process or AI session stopped unexpectedly and the user asks to recover, resume, continue, pick up, or salvage that task. This skill detects active task checkout records and reports commands; it does not reconstruct lifecycle phases or run recovery prompts."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Recovery Workflow
|
|
@@ -12,7 +12,7 @@ This skill invokes its own bundled detector. The canonical runtime exposes no se
|
|
|
12
12
|
## Boundary
|
|
13
13
|
|
|
14
14
|
This workflow:
|
|
15
|
-
- Detects active feature
|
|
15
|
+
- Detects active feature and bugfix task checkout records.
|
|
16
16
|
- Confirms that each recorded task branch still exists.
|
|
17
17
|
- Returns the exact item-specific `cli.py run <family> <TASK_ID>` command.
|
|
18
18
|
- Shows the branch, task family, task ID, and checkout record that justify the command.
|
|
@@ -37,16 +37,17 @@ The detector reads only active checkout records:
|
|
|
37
37
|
```text
|
|
38
38
|
.prizmkit/state/features/<F-NNN>/checkout.json
|
|
39
39
|
.prizmkit/state/bugfix/<B-NNN>/checkout.json
|
|
40
|
-
.prizmkit/state/refactor/<R-NNN>/checkout.json
|
|
41
40
|
```
|
|
42
41
|
|
|
43
42
|
A candidate is resumable only when:
|
|
44
43
|
- `state` is `active`;
|
|
45
44
|
- `task_type` equals the checkout directory family;
|
|
46
|
-
- `task_id` is explicitly recorded, matches the exact `F-NNN
|
|
45
|
+
- `task_id` is explicitly recorded, matches the exact `F-NNN` or `B-NNN` family form, and equals its parent state-directory name;
|
|
47
46
|
- `active_dev_branch` is present; and
|
|
48
47
|
- the recorded local branch still exists.
|
|
49
48
|
|
|
49
|
+
Read `${SKILL_DIR}/references/detection.md` only when the user asks for detector diagnostics or validation rules for ignored or missing-branch checkout records.
|
|
50
|
+
|
|
50
51
|
The runtime uses the same checkout record when the returned command starts, so it continues on the recorded branch rather than creating a new branch.
|
|
51
52
|
|
|
52
53
|
## Selection
|
|
@@ -76,7 +77,6 @@ Return the detector-provided command verbatim. The canonical forms are:
|
|
|
76
77
|
```bash
|
|
77
78
|
python3 ./.prizmkit/dev-pipeline/cli.py run feature F-001
|
|
78
79
|
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix B-001
|
|
79
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor R-001
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
Do not prepend `git checkout`. The runtime resolves the durable checkout identity and continues the task on its recorded branch or linked worktree.
|
|
@@ -89,8 +89,8 @@ Use this exact structure:
|
|
|
89
89
|
|
|
90
90
|
```text
|
|
91
91
|
INTERRUPTED_TASK_FOUND
|
|
92
|
-
family: <feature | bugfix
|
|
93
|
-
task_id: <F-NNN | B-NNN
|
|
92
|
+
family: <feature | bugfix>
|
|
93
|
+
task_id: <F-NNN | B-NNN>
|
|
94
94
|
branch: <recorded active_dev_branch>
|
|
95
95
|
checkout: <project-relative checkout.json path>
|
|
96
96
|
command:
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"name": "multiple-interrupted-tasks",
|
|
24
24
|
"prompt": "Continue whichever pipeline task was interrupted.",
|
|
25
25
|
"expected_output": "Detect multiple active checkout records and ask the user to select by task ID, family, and branch before returning one command.",
|
|
26
|
-
"setup_description": "Create active feature and
|
|
26
|
+
"setup_description": "Create active feature and bugfix checkout records whose local branches both exist.",
|
|
27
27
|
"files": []
|
|
28
28
|
},
|
|
29
29
|
{
|
|
@@ -7,14 +7,13 @@ Recovery uses the runtime's durable task checkout identity rather than reconstru
|
|
|
7
7
|
```text
|
|
8
8
|
.prizmkit/state/features/<F-NNN>/checkout.json
|
|
9
9
|
.prizmkit/state/bugfix/<B-NNN>/checkout.json
|
|
10
|
-
.prizmkit/state/refactor/<R-NNN>/checkout.json
|
|
11
10
|
```
|
|
12
11
|
|
|
13
12
|
A record is resumable only when:
|
|
14
13
|
|
|
15
14
|
1. `state` equals `active`.
|
|
16
15
|
2. `task_type` equals the checkout directory family.
|
|
17
|
-
3. `task_id` is explicitly present, matches the exact `F-NNN
|
|
16
|
+
3. `task_id` is explicitly present, matches the exact `F-NNN` or `B-NNN` family form, and equals its parent state-directory name.
|
|
18
17
|
4. `active_dev_branch` is non-empty.
|
|
19
18
|
5. `refs/heads/<active_dev_branch>` exists locally.
|
|
20
19
|
|
|
@@ -27,7 +26,6 @@ The item-specific foreground command reloads the active checkout record and reus
|
|
|
27
26
|
```bash
|
|
28
27
|
python3 ./.prizmkit/dev-pipeline/cli.py run feature <F-NNN>
|
|
29
28
|
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix <B-NNN>
|
|
30
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor <R-NNN>
|
|
31
29
|
```
|
|
32
30
|
|
|
33
31
|
The command does not need an explicit branch argument. Do not prepend `git checkout`, because the runtime owns checkout identity and branch/worktree reuse.
|
|
@@ -23,12 +23,6 @@ FAMILIES = (
|
|
|
23
23
|
"plan_path": ".prizmkit/plans/bug-fix-list.json",
|
|
24
24
|
"id_pattern": r"^B-\d{3}$",
|
|
25
25
|
},
|
|
26
|
-
{
|
|
27
|
-
"name": "refactor",
|
|
28
|
-
"state_dir": "refactor",
|
|
29
|
-
"plan_path": ".prizmkit/plans/refactor-list.json",
|
|
30
|
-
"id_pattern": r"^R-\d{3}$",
|
|
31
|
-
},
|
|
32
26
|
)
|
|
33
27
|
|
|
34
28
|
|
|
@@ -35,13 +35,12 @@ Run `/prizmkit` to see all available PrizmKit commands.
|
|
|
35
35
|
|
|
36
36
|
### Python Runtime CLI Quick Reference
|
|
37
37
|
|
|
38
|
-
Placeholders: `<family> = feature | bugfix
|
|
38
|
+
Placeholders: `<family> = feature | bugfix`; `<task-id> = F-NNN | B-NNN`; `<list>` is optional and defaults by family:
|
|
39
39
|
|
|
40
40
|
| `<family>` | Default `<list>` |
|
|
41
41
|
|---|---|
|
|
42
42
|
| `feature` | `.prizmkit/plans/feature-list.json` |
|
|
43
43
|
| `bugfix` | `.prizmkit/plans/bug-fix-list.json` |
|
|
44
|
-
| `refactor` | `.prizmkit/plans/refactor-list.json` |
|
|
45
44
|
|
|
46
45
|
```bash
|
|
47
46
|
# Run/resume the whole list or one task
|
package/package.json
CHANGED
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',
|
|
@@ -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
|
|
|
@@ -234,24 +244,32 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
234
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;
|
|
239
252
|
let convertSkillToAntigravity;
|
|
253
|
+
let convertRefForAntigravity;
|
|
240
254
|
if (platform === 'claude') {
|
|
241
255
|
const commandAdapter = await loadAdapter('claude', 'command-adapter.js');
|
|
242
256
|
convertSkillToCommand = commandAdapter.convertSkillToCommand;
|
|
243
257
|
} else if (platform === 'codex') {
|
|
244
258
|
const codexSkillAdapter = await loadAdapter('codex', 'skill-adapter.js');
|
|
245
259
|
convertSkillToCodex = codexSkillAdapter.convertSkill;
|
|
260
|
+
convertRefForCodex = codexSkillAdapter.convertSkillReference;
|
|
246
261
|
} else if (platform === 'pi') {
|
|
247
262
|
const piSkillAdapter = await loadAdapter('pi', 'skill-adapter.js');
|
|
248
263
|
convertSkillToPi = piSkillAdapter.convertSkill;
|
|
264
|
+
convertRefForPi = piSkillAdapter.convertSkillReference;
|
|
249
265
|
} else if (platform === 'cursor') {
|
|
250
266
|
const cursorSkillAdapter = await loadAdapter('cursor', 'skill-adapter.js');
|
|
251
267
|
convertSkillToCursor = cursorSkillAdapter.convertSkill;
|
|
268
|
+
convertRefForCursor = cursorSkillAdapter.convertSkillReference;
|
|
252
269
|
} else if (platform === 'antigravity') {
|
|
253
270
|
const antigravitySkillAdapter = await loadAdapter('antigravity', 'skill-adapter.js');
|
|
254
271
|
convertSkillToAntigravity = antigravitySkillAdapter.convertSkill;
|
|
272
|
+
convertRefForAntigravity = antigravitySkillAdapter.convertSkillReference;
|
|
255
273
|
}
|
|
256
274
|
|
|
257
275
|
for (const skillName of skills) {
|
|
@@ -361,6 +379,7 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
361
379
|
await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
|
|
362
380
|
}
|
|
363
381
|
}
|
|
382
|
+
await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForCodex, skillName);
|
|
364
383
|
console.log(chalk.green(` ✓ .agents/skills/${skillName}/`));
|
|
365
384
|
} else if (platform === 'pi') {
|
|
366
385
|
const content = await fs.readFile(skillMdPath, 'utf8');
|
|
@@ -380,6 +399,7 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
380
399
|
await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
|
|
381
400
|
}
|
|
382
401
|
}
|
|
402
|
+
await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForPi, skillName);
|
|
383
403
|
console.log(chalk.green(` ✓ .pi/skills/${skillName}/`));
|
|
384
404
|
} else if (platform === 'cursor') {
|
|
385
405
|
const content = await fs.readFile(skillMdPath, 'utf8');
|
|
@@ -399,6 +419,7 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
399
419
|
await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
|
|
400
420
|
}
|
|
401
421
|
}
|
|
422
|
+
await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForCursor, skillName);
|
|
402
423
|
console.log(chalk.green(` ✓ .cursor/skills/${skillName}/`));
|
|
403
424
|
} else if (platform === 'antigravity') {
|
|
404
425
|
const content = await fs.readFile(skillMdPath, 'utf8');
|
|
@@ -418,6 +439,7 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
418
439
|
await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
|
|
419
440
|
}
|
|
420
441
|
}
|
|
442
|
+
await convertMarkdownFilesInDir(path.join(targetDir, 'references'), convertRefForAntigravity, skillName);
|
|
421
443
|
console.log(chalk.green(` ✓ .agents/plugins/prizmkit/skills/${skillName}/`));
|
|
422
444
|
}
|
|
423
445
|
}
|
|
@@ -1377,7 +1399,6 @@ export async function installPipeline(projectRoot, dryRun, options = {}) {
|
|
|
1377
1399
|
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'plans'));
|
|
1378
1400
|
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'features'));
|
|
1379
1401
|
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'bugfix'));
|
|
1380
|
-
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'refactor'));
|
|
1381
1402
|
|
|
1382
1403
|
const runtimeSwitched = previousRuntime !== runtime;
|
|
1383
1404
|
const staleManagedFiles = await findStaleManagedPipelineFiles(projectRoot, runtime);
|
|
@@ -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.
|