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
package/src/prompts.js
CHANGED
|
@@ -37,7 +37,7 @@ export function __resetAiCliPromptsForTests() {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Select target platforms (codebuddy, claude, codex, pi, cursor).
|
|
40
|
+
* Select target platforms (codebuddy, claude, codex, pi, cursor, antigravity).
|
|
41
41
|
* @param {string} currentPlatform - current platform value
|
|
42
42
|
* @param {Object} detected - detected environment info (e.g., { cbc: true, claude: false })
|
|
43
43
|
* @returns {Promise<string>} canonical comma-separated platform ids
|
|
@@ -67,6 +67,10 @@ export async function selectPlatform(currentPlatform, detected = {}) {
|
|
|
67
67
|
id: 'cursor',
|
|
68
68
|
name: `Cursor (.cursor/skills + .cursor/rules + .cursor/hooks.json)${detected.cursor ? chalk.green(' ← 已检测到 agent') : ''}`,
|
|
69
69
|
},
|
|
70
|
+
{
|
|
71
|
+
id: 'antigravity',
|
|
72
|
+
name: `Antigravity (.agents/plugins/prizmkit/)${detected.antigravity ? chalk.green(' ← 已检测到 agy') : ''}`,
|
|
73
|
+
},
|
|
70
74
|
];
|
|
71
75
|
const selected = await selectPlatformPrompt({
|
|
72
76
|
message: '选择目标平台 (决定安装的目录结构,可多选):',
|
|
@@ -89,7 +93,7 @@ export async function selectPlatform(currentPlatform, detected = {}) {
|
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
/**
|
|
92
|
-
* Select AI CLI command (cbc, claude, codex, pi, agent, custom, or skip).
|
|
96
|
+
* Select AI CLI command (cbc, claude, codex, pi, agent, agy, custom, or skip).
|
|
93
97
|
* @param {string} currentCommand - current AI CLI command
|
|
94
98
|
* @param {Object} detected - detected environment info
|
|
95
99
|
* @returns {Promise<string>} - known command, custom string, or ''
|
|
@@ -116,6 +120,10 @@ export async function selectAiCli(currentCommand, detected = {}) {
|
|
|
116
120
|
name: `agent — Cursor Agent CLI${detected.cursor ? chalk.green(' ✓ 已验证') : chalk.gray(' (未检测到或身份未验证)')}`,
|
|
117
121
|
value: 'agent',
|
|
118
122
|
},
|
|
123
|
+
{
|
|
124
|
+
name: `agy — Antigravity CLI${detected.antigravity ? chalk.green(' ✓ 已安装') : chalk.gray(' (未检测到)')}`,
|
|
125
|
+
value: 'agy',
|
|
126
|
+
},
|
|
119
127
|
{
|
|
120
128
|
name: '自定义 — 输入其他命令',
|
|
121
129
|
value: '__custom__',
|
|
@@ -126,7 +134,7 @@ export async function selectAiCli(currentCommand, detected = {}) {
|
|
|
126
134
|
},
|
|
127
135
|
];
|
|
128
136
|
|
|
129
|
-
const knownCliValues = ['cbc', 'claude', 'codex', 'pi', 'agent'];
|
|
137
|
+
const knownCliValues = ['cbc', 'claude', 'codex', 'pi', 'agent', 'agy'];
|
|
130
138
|
const cliDefault = knownCliValues.includes(currentCommand)
|
|
131
139
|
? currentCommand
|
|
132
140
|
: (currentCommand ? '__custom__' : (detected.suggestedCli || ''));
|
package/src/scaffold.js
CHANGED
|
@@ -98,7 +98,7 @@ async function removeEmptyDirectory(dirPath) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
export async function removeRetiredAgentTeamArtifacts(platform, projectRoot, dryRun) {
|
|
101
|
-
if (platform === 'pi' || platform === 'cursor') return;
|
|
101
|
+
if (platform === 'pi' || platform === 'cursor' || platform === 'antigravity') return;
|
|
102
102
|
const agentDir = platform === 'claude'
|
|
103
103
|
? path.join(projectRoot, '.claude', 'agents')
|
|
104
104
|
: platform === 'codex'
|
|
@@ -231,11 +231,12 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
231
231
|
skillSubcategories[skillName] = skillDef.subcategory;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
// Load
|
|
234
|
+
// Load platform adapters for skill conversion
|
|
235
235
|
let convertSkillToCommand;
|
|
236
236
|
let convertSkillToCodex;
|
|
237
237
|
let convertSkillToPi;
|
|
238
238
|
let convertSkillToCursor;
|
|
239
|
+
let convertSkillToAntigravity;
|
|
239
240
|
if (platform === 'claude') {
|
|
240
241
|
const commandAdapter = await loadAdapter('claude', 'command-adapter.js');
|
|
241
242
|
convertSkillToCommand = commandAdapter.convertSkillToCommand;
|
|
@@ -248,6 +249,9 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
248
249
|
} else if (platform === 'cursor') {
|
|
249
250
|
const cursorSkillAdapter = await loadAdapter('cursor', 'skill-adapter.js');
|
|
250
251
|
convertSkillToCursor = cursorSkillAdapter.convertSkill;
|
|
252
|
+
} else if (platform === 'antigravity') {
|
|
253
|
+
const antigravitySkillAdapter = await loadAdapter('antigravity', 'skill-adapter.js');
|
|
254
|
+
convertSkillToAntigravity = antigravitySkillAdapter.convertSkill;
|
|
251
255
|
}
|
|
252
256
|
|
|
253
257
|
for (const skillName of skills) {
|
|
@@ -396,6 +400,25 @@ export async function installSkills(platform, skills, projectRoot, dryRun, runti
|
|
|
396
400
|
}
|
|
397
401
|
}
|
|
398
402
|
console.log(chalk.green(` ✓ .cursor/skills/${skillName}/`));
|
|
403
|
+
} else if (platform === 'antigravity') {
|
|
404
|
+
const content = await fs.readFile(skillMdPath, 'utf8');
|
|
405
|
+
const converted = convertSkillToAntigravity(content, skillName);
|
|
406
|
+
const targetDir = path.join(projectRoot, '.agents', 'plugins', 'prizmkit', 'skills', skillName);
|
|
407
|
+
|
|
408
|
+
if (dryRun) {
|
|
409
|
+
console.log(chalk.gray(` [dry-run] .agents/plugins/prizmkit/skills/${skillName}/`));
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
await fs.remove(targetDir);
|
|
414
|
+
await fs.ensureDir(targetDir);
|
|
415
|
+
await fs.writeFile(path.join(targetDir, 'SKILL.md'), converted);
|
|
416
|
+
for (const entry of await fs.readdir(corePath, { withFileTypes: true })) {
|
|
417
|
+
if (entry.isDirectory()) {
|
|
418
|
+
await fs.copy(path.join(corePath, entry.name), path.join(targetDir, entry.name));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
console.log(chalk.green(` ✓ .agents/plugins/prizmkit/skills/${skillName}/`));
|
|
399
422
|
}
|
|
400
423
|
}
|
|
401
424
|
}
|
|
@@ -645,6 +668,22 @@ job_max_runtime_seconds = 3300
|
|
|
645
668
|
console.log(chalk.green(' ✓ .cursor/hooks.json'));
|
|
646
669
|
console.log(chalk.green(' ✓ .cursor/hooks/prizmkit-hook.cjs'));
|
|
647
670
|
console.log(chalk.green(` ✓ .cursor/rules/ (${ruleFiles.length} 条规则)`));
|
|
671
|
+
} else if (platform === 'antigravity') {
|
|
672
|
+
if (dryRun) {
|
|
673
|
+
console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/plugin.json'));
|
|
674
|
+
console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/hooks.json'));
|
|
675
|
+
console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/hooks/prizmkit-hook.cjs'));
|
|
676
|
+
console.log(chalk.gray(` [dry-run] .agents/plugins/prizmkit/rules/ (${ruleFiles.length} 条规则)`));
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
const { installHooks } = await loadAdapter('antigravity', 'hooks-adapter.js');
|
|
680
|
+
const { installRules } = await loadAdapter('antigravity', 'rules-adapter.js');
|
|
681
|
+
await installHooks(projectRoot, { version: scaffoldPkg.version });
|
|
682
|
+
await installRules(projectRoot, ruleFiles);
|
|
683
|
+
console.log(chalk.green(' ✓ .agents/plugins/prizmkit/plugin.json'));
|
|
684
|
+
console.log(chalk.green(' ✓ .agents/plugins/prizmkit/hooks.json'));
|
|
685
|
+
console.log(chalk.green(' ✓ .agents/plugins/prizmkit/hooks/prizmkit-hook.cjs'));
|
|
686
|
+
console.log(chalk.green(` ✓ .agents/plugins/prizmkit/rules/ (${ruleFiles.length} 条规则)`));
|
|
648
687
|
}
|
|
649
688
|
}
|
|
650
689
|
|
|
@@ -1067,6 +1106,22 @@ export async function installProjectMemory(platform, projectRoot, dryRun) {
|
|
|
1067
1106
|
return;
|
|
1068
1107
|
}
|
|
1069
1108
|
|
|
1109
|
+
if (platform === 'antigravity') {
|
|
1110
|
+
const templatePath = path.join(templatesDir, templateName);
|
|
1111
|
+
if (!await fs.pathExists(templatePath)) {
|
|
1112
|
+
console.log(chalk.yellow(` ⚠ 模板文件不存在: ${templateName},跳过`));
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
if (dryRun) {
|
|
1116
|
+
console.log(chalk.gray(' [dry-run] .agents/plugins/prizmkit/rules/prizmkit-framework.md'));
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
const { installFrameworkGuidance } = await loadAdapter('antigravity', 'rules-adapter.js');
|
|
1120
|
+
await installFrameworkGuidance(projectRoot, (await fs.readFile(templatePath, 'utf8')).trimEnd());
|
|
1121
|
+
console.log(chalk.green(' ✓ .agents/plugins/prizmkit/rules/prizmkit-framework.md'));
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1070
1125
|
if (!privateName) return;
|
|
1071
1126
|
|
|
1072
1127
|
const mainPath = mainName ? path.join(projectRoot, mainName) : null;
|
|
@@ -1876,7 +1931,7 @@ const SCAFFOLD_CONFIG_FIELDS = new Set([
|
|
|
1876
1931
|
/**
|
|
1877
1932
|
* 执行纯净安装
|
|
1878
1933
|
* @param {Object} config
|
|
1879
|
-
* @param {string} config.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'all' | comma-separated subset
|
|
1934
|
+
* @param {string} config.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'antigravity' | 'all' | comma-separated subset
|
|
1880
1935
|
* @param {string} [config.runtime] - 'python' (legacy aliases accepted: 'unix' | 'windows')
|
|
1881
1936
|
* @param {string} config.skills - 'core' | 'minimal' | 'recommended:<type>'
|
|
1882
1937
|
* @param {boolean} config.pipeline - 是否安装 dev-pipeline
|
|
@@ -2104,7 +2159,7 @@ export async function scaffold(config) {
|
|
|
2104
2159
|
? '说 "运行 prizmkit-init"'
|
|
2105
2160
|
: mainPlatform === 'pi'
|
|
2106
2161
|
? '输入 "/skill:prizmkit-init"'
|
|
2107
|
-
: mainPlatform === 'cursor'
|
|
2162
|
+
: (mainPlatform === 'cursor' || mainPlatform === 'antigravity')
|
|
2108
2163
|
? '输入 "/prizmkit-init"'
|
|
2109
2164
|
: '说 "/prizmkit-init"';
|
|
2110
2165
|
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
|
-
:
|
|
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
|