prizmkit 1.1.119 → 1.1.121
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 +1 -5
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/README.md +41 -38
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +76 -0
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +2 -8
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +23 -25
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +8 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +10 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +88 -32
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +28 -6
- package/bundled/dev-pipeline/scripts/continuation.py +51 -6
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +60 -102
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +1 -19
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +1 -19
- package/bundled/dev-pipeline/scripts/{init-dev-team.py → init-change-artifact.py} +6 -16
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +364 -76
- package/bundled/dev-pipeline/scripts/update-bug-status.py +57 -14
- package/bundled/dev-pipeline/scripts/update-feature-status.py +54 -5
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +57 -14
- package/bundled/dev-pipeline/scripts/utils.py +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -11
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +2 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +6 -7
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +6 -7
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +4 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +5 -3
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +20 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
- package/bundled/dev-pipeline/tests/test_auto_skip.py +5 -5
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +214 -144
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +25 -12
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +11 -14
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +235 -32
- package/bundled/dev-pipeline/tests/test_unified_cli.py +219 -16
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +2 -2
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -3
- package/bundled/skills/prizmkit-code-review/SKILL.md +50 -47
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +13 -8
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +47 -33
- package/bundled/skills/prizmkit-code-review/references/reviewer-workspace-protocol.md +90 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +21 -1
- package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +67 -0
- package/bundled/skills/prizmkit-test/SKILL.md +159 -155
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +420 -0
- package/bundled/skills/prizmkit-test/assets/behavior-risk-matrix.schema.json +116 -0
- package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +112 -0
- package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +97 -0
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +76 -192
- package/bundled/skills/prizmkit-test/references/contract-mock-protocol.md +65 -0
- package/bundled/skills/prizmkit-test/references/evidence-protocol.md +194 -0
- package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +78 -0
- package/bundled/skills/prizmkit-test/references/examples.md +65 -108
- package/bundled/skills/prizmkit-test/references/service-boundary-test-catalog.md +10 -7
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +90 -82
- package/bundled/skills/prizmkit-test/references/test-report-template.md +77 -98
- package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +97 -0
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +723 -0
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +1426 -0
- package/package.json +1 -1
- package/src/clean.js +12 -8
- package/src/config.js +24 -42
- package/src/index.js +1 -10
- package/src/manifest.js +3 -9
- package/src/metadata.js +0 -26
- package/src/prompts.js +0 -13
- package/src/scaffold.js +76 -201
- package/src/upgrade.js +16 -33
- package/bundled/adapters/claude/agent-adapter.js +0 -96
- package/bundled/adapters/claude/team-adapter.js +0 -183
- package/bundled/adapters/codebuddy/agent-adapter.js +0 -42
- package/bundled/adapters/codebuddy/team-adapter.js +0 -46
- package/bundled/adapters/codex/agent-adapter.js +0 -38
- package/bundled/adapters/codex/team-adapter.js +0 -37
- package/bundled/agents/prizm-dev-team-dev.md +0 -123
- package/bundled/agents/prizm-dev-team-reviewer.md +0 -113
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +0 -65
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +0 -436
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +0 -510
- package/bundled/skills/prizmkit-test/scripts/validate_boundary_report.py +0 -347
- package/bundled/team/prizm-dev-team.json +0 -27
package/package.json
CHANGED
package/src/clean.js
CHANGED
|
@@ -17,6 +17,10 @@ const PRIZMKIT_GITIGNORE_ENTRIES = new Set([
|
|
|
17
17
|
'CODEBUDDY.private.md',
|
|
18
18
|
]);
|
|
19
19
|
|
|
20
|
+
const LEGACY_TEAM_NAME = ['prizm', 'dev', 'team'].join('-');
|
|
21
|
+
const LEGACY_DEV_AGENT_FILE = `${LEGACY_TEAM_NAME}-dev.md`;
|
|
22
|
+
const LEGACY_REVIEWER_AGENT_FILE = `${LEGACY_TEAM_NAME}-reviewer.md`;
|
|
23
|
+
|
|
20
24
|
async function removePath(targetPath, dryRun) {
|
|
21
25
|
if (!await fs.pathExists(targetPath)) {
|
|
22
26
|
return { path: targetPath, removed: false, reason: 'not_found' };
|
|
@@ -175,7 +179,7 @@ export async function runClean(directory, options = {}) {
|
|
|
175
179
|
console.log('');
|
|
176
180
|
console.log(chalk.bold(' PrizmKit 清理模式'));
|
|
177
181
|
console.log(` 目标目录: ${projectRoot}`);
|
|
178
|
-
console.log(`
|
|
182
|
+
console.log(` 全局旧团队配置: ${cleanGlobalTeam ? chalk.yellow('将清理') : chalk.gray('跳过')}`);
|
|
179
183
|
console.log(` 预览模式: ${dryRun ? chalk.yellow('是') : chalk.green('否')}`);
|
|
180
184
|
console.log('');
|
|
181
185
|
|
|
@@ -193,10 +197,10 @@ export async function runClean(directory, options = {}) {
|
|
|
193
197
|
const manifestSkillNames = manifest?.files?.skills || [];
|
|
194
198
|
const allSkillNames = [...new Set([...metadataSkillNames, ...externalSkillNames, ...manifestSkillNames])];
|
|
195
199
|
|
|
196
|
-
//
|
|
200
|
+
// Retired PrizmKit named-agent files (legacy installs + manifest)
|
|
197
201
|
const knownAgentFiles = [
|
|
198
|
-
|
|
199
|
-
|
|
202
|
+
LEGACY_DEV_AGENT_FILE,
|
|
203
|
+
LEGACY_REVIEWER_AGENT_FILE,
|
|
200
204
|
];
|
|
201
205
|
const manifestAgentFiles = manifest?.files?.agents || [];
|
|
202
206
|
const agentFiles = [...new Set([...knownAgentFiles, ...manifestAgentFiles])];
|
|
@@ -248,15 +252,15 @@ export async function runClean(directory, options = {}) {
|
|
|
248
252
|
const codexSkillsDir = path.join(projectRoot, '.agents', 'skills');
|
|
249
253
|
results.push(...await removeKnownEntries(codexSkillsDir, allSkillNames, dryRun));
|
|
250
254
|
|
|
251
|
-
// .claude/agents/ — PrizmKit agent files
|
|
255
|
+
// .claude/agents/ — retired PrizmKit named-agent files
|
|
252
256
|
const claudeAgentsDir = path.join(projectRoot, '.claude', 'agents');
|
|
253
257
|
results.push(...await removeKnownEntries(claudeAgentsDir, agentFiles, dryRun));
|
|
254
258
|
|
|
255
|
-
// .codebuddy/agents/ —
|
|
259
|
+
// .codebuddy/agents/ — retired PrizmKit named-agent files
|
|
256
260
|
const cbAgentsDir = path.join(projectRoot, '.codebuddy', 'agents');
|
|
257
261
|
results.push(...await removeKnownEntries(cbAgentsDir, agentFiles, dryRun));
|
|
258
262
|
|
|
259
|
-
// .codex/agents/ —
|
|
263
|
+
// .codex/agents/ — retired PrizmKit named-agent files
|
|
260
264
|
const codexAgentsDir = path.join(projectRoot, '.codex', 'agents');
|
|
261
265
|
results.push(...await removeKnownEntries(codexAgentsDir, codexAgentFiles, dryRun));
|
|
262
266
|
|
|
@@ -292,7 +296,7 @@ export async function runClean(directory, options = {}) {
|
|
|
292
296
|
if (cleanGlobalTeam) {
|
|
293
297
|
const homeDir = process.env.HOME || process.env.USERPROFILE;
|
|
294
298
|
if (homeDir) {
|
|
295
|
-
const globalTeamPath = path.join(homeDir, '.codebuddy', 'teams',
|
|
299
|
+
const globalTeamPath = path.join(homeDir, '.codebuddy', 'teams', LEGACY_TEAM_NAME);
|
|
296
300
|
results.push(await removePath(globalTeamPath, dryRun));
|
|
297
301
|
}
|
|
298
302
|
}
|
package/src/config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* PrizmKit Config Command
|
|
3
3
|
*
|
|
4
4
|
* Reconfigure an existing PrizmKit installation without a full reinstall.
|
|
5
|
-
* Supports changing platform, AI CLI, skills suite, rules,
|
|
5
|
+
* Supports changing platform, AI CLI, skills suite, rules, and pipeline.
|
|
6
6
|
*
|
|
7
7
|
* Flow: READ manifest → PROMPT user → COMPUTE DIFF → DISPLAY SUMMARY → EXECUTE
|
|
8
8
|
*
|
|
@@ -21,13 +21,10 @@ import { readManifest, writeManifest, buildManifest, diffManifest } from './mani
|
|
|
21
21
|
import {
|
|
22
22
|
loadMetadata,
|
|
23
23
|
loadRulesMetadata,
|
|
24
|
-
getAgentsDir,
|
|
25
24
|
} from './metadata.js';
|
|
26
25
|
import {
|
|
27
26
|
installSkills,
|
|
28
|
-
installAgents,
|
|
29
27
|
installSettings,
|
|
30
|
-
installTeamConfig,
|
|
31
28
|
installProjectMemory,
|
|
32
29
|
installPipeline,
|
|
33
30
|
installGitignore,
|
|
@@ -39,6 +36,7 @@ import {
|
|
|
39
36
|
findStaleManagedPipelineFiles,
|
|
40
37
|
removeStaleManagedPipelineFiles,
|
|
41
38
|
normalizeMainProjectMemoryContent,
|
|
39
|
+
removeRetiredAgentTeamArtifacts,
|
|
42
40
|
} from './scaffold.js';
|
|
43
41
|
import {
|
|
44
42
|
removeSkillFiles,
|
|
@@ -52,7 +50,6 @@ import {
|
|
|
52
50
|
selectAiCliLaunch,
|
|
53
51
|
selectSkillSuite,
|
|
54
52
|
selectRulesPreset,
|
|
55
|
-
confirmTeamMode,
|
|
56
53
|
confirmPipeline,
|
|
57
54
|
} from './prompts.js';
|
|
58
55
|
import { isKnownPlatform, platformLabel, privateProjectMemoryFile, privateProjectMemoryFiles, projectMemoryFile, resolvePayloadPlatforms } from './platforms.js';
|
|
@@ -61,6 +58,9 @@ import { applyAiCliLaunchToConfig, resolveAiCliLaunchSelection, storedAiCliLaunc
|
|
|
61
58
|
|
|
62
59
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
63
60
|
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
61
|
+
const LEGACY_TEAM_NAME = ['prizm', 'dev', 'team'].join('-');
|
|
62
|
+
const LEGACY_DEV_AGENT_FILE = `${LEGACY_TEAM_NAME}-dev.md`;
|
|
63
|
+
const LEGACY_REVIEWER_AGENT_FILE = `${LEGACY_TEAM_NAME}-reviewer.md`;
|
|
64
64
|
|
|
65
65
|
// ============================================================
|
|
66
66
|
// Helpers
|
|
@@ -96,12 +96,9 @@ async function detectInstalledPlatforms(projectRoot) {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
const hasClaude = await hasPlatformFiles(path.join(projectRoot, '.claude', 'commands'))
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|| await hasPlatformFiles(path.join(projectRoot, '.codebuddy', 'agents'));
|
|
103
|
-
const hasCodex = await hasPlatformFiles(path.join(projectRoot, '.agents', 'skills'))
|
|
104
|
-
|| await hasPlatformFiles(path.join(projectRoot, '.codex', 'agents'));
|
|
99
|
+
const hasClaude = await hasPlatformFiles(path.join(projectRoot, '.claude', 'commands'));
|
|
100
|
+
const hasCodeBuddy = await hasPlatformFiles(path.join(projectRoot, '.codebuddy', 'skills'));
|
|
101
|
+
const hasCodex = await hasPlatformFiles(path.join(projectRoot, '.agents', 'skills'));
|
|
105
102
|
|
|
106
103
|
if (hasClaude && hasCodeBuddy && hasCodex) return 'all';
|
|
107
104
|
if (hasClaude && hasCodeBuddy) return 'both';
|
|
@@ -216,8 +213,14 @@ async function migrateProjectMemoryOnPlatformDrop(droppedPlatform, newPlatforms,
|
|
|
216
213
|
*/
|
|
217
214
|
async function removePlatformFiles(platform, projectRoot, manifest, dryRun) {
|
|
218
215
|
const skillNames = manifest?.files?.skills || [];
|
|
219
|
-
const agentFileNames = manifest?.files?.agents || [];
|
|
220
216
|
const ruleFileNames = manifest?.files?.rules || [];
|
|
217
|
+
const agentFileNames = [
|
|
218
|
+
...new Set([
|
|
219
|
+
...(manifest?.files?.agents || []),
|
|
220
|
+
LEGACY_DEV_AGENT_FILE,
|
|
221
|
+
LEGACY_REVIEWER_AGENT_FILE,
|
|
222
|
+
]),
|
|
223
|
+
];
|
|
221
224
|
|
|
222
225
|
if (skillNames.length) {
|
|
223
226
|
console.log(chalk.blue(`\n 删除 ${platformLabel(platform)} skills:`));
|
|
@@ -273,13 +276,13 @@ async function removePlatformFiles(platform, projectRoot, manifest, dryRun) {
|
|
|
273
276
|
}
|
|
274
277
|
} else if (platform === 'codebuddy') {
|
|
275
278
|
const homeDir = process.env.HOME || process.env.USERPROFILE;
|
|
276
|
-
const teamDir = path.join(homeDir, '.codebuddy', 'teams',
|
|
279
|
+
const teamDir = path.join(homeDir, '.codebuddy', 'teams', LEGACY_TEAM_NAME);
|
|
277
280
|
if (await fs.pathExists(teamDir)) {
|
|
278
281
|
if (dryRun) {
|
|
279
|
-
console.log(chalk.gray(' [dry-run] remove
|
|
282
|
+
console.log(chalk.gray(' [dry-run] remove legacy CodeBuddy team config'));
|
|
280
283
|
} else {
|
|
281
284
|
await fs.remove(teamDir);
|
|
282
|
-
console.log(chalk.red(' ✗ removed
|
|
285
|
+
console.log(chalk.red(' ✗ removed legacy CodeBuddy team config'));
|
|
283
286
|
}
|
|
284
287
|
}
|
|
285
288
|
} else if (platform === 'codex') {
|
|
@@ -405,7 +408,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
405
408
|
runtime: normalizedManifestRuntime,
|
|
406
409
|
suite: oldManifest.suite || 'core',
|
|
407
410
|
rules: oldManifest.options?.rules || 'recommended',
|
|
408
|
-
team: oldManifest.options?.team ?? true,
|
|
409
411
|
pipeline: oldManifest.options?.pipeline ?? true,
|
|
410
412
|
aiCli: userConfig.ai_cli || oldManifest.options?.aiCli || '',
|
|
411
413
|
aiCliLaunch: storedAiCliLaunch(userConfig),
|
|
@@ -422,7 +424,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
422
424
|
console.log(` AI CLI: ${currentConfig.aiCli ? chalk.cyan(currentConfig.aiCli) : chalk.gray('(未设置)')}`);
|
|
423
425
|
console.log(` 技能套件: ${chalk.cyan(currentConfig.suite)}`);
|
|
424
426
|
console.log(` 规则: ${chalk.cyan(currentConfig.rules)}`);
|
|
425
|
-
console.log(` 团队模式: ${currentConfig.team ? chalk.green('启用') : chalk.gray('禁用')}`);
|
|
426
427
|
console.log(` 流水线: ${currentConfig.pipeline ? chalk.green('启用') : chalk.gray('禁用')}`);
|
|
427
428
|
console.log('');
|
|
428
429
|
|
|
@@ -435,9 +436,9 @@ export async function runConfig(directory, options = {}) {
|
|
|
435
436
|
if (nonInteractive) {
|
|
436
437
|
// Non-interactive: only change what's explicitly specified via CLI options
|
|
437
438
|
if (!platformManifestNeedsNormalization && !runtimeManifestNeedsNormalization && !runtimeOptionNeedsNormalization && !options.platform && !options.skills && !options.rules && options.runtime === undefined
|
|
438
|
-
&& options.aiCli === undefined && options.headlessPromptArg === undefined && options.headlessExtraArgs === undefined && options.
|
|
439
|
+
&& options.aiCli === undefined && options.headlessPromptArg === undefined && options.headlessExtraArgs === undefined && options.pipeline === undefined) {
|
|
439
440
|
console.log(chalk.yellow(' ⚠ 非交互式模式下未指定任何变更。'));
|
|
440
|
-
console.log(chalk.gray(' 使用 --platform, --runtime, --skills, --rules, --ai-cli, --headless-prompt-arg, --headless-extra-args, --
|
|
441
|
+
console.log(chalk.gray(' 使用 --platform, --runtime, --skills, --rules, --ai-cli, --headless-prompt-arg, --headless-extra-args, --pipeline/--no-pipeline'));
|
|
441
442
|
return;
|
|
442
443
|
}
|
|
443
444
|
|
|
@@ -452,7 +453,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
452
453
|
runtime: optionRuntime || currentConfig.runtime,
|
|
453
454
|
suite: options.skills || currentConfig.suite,
|
|
454
455
|
rules: options.rules || currentConfig.rules,
|
|
455
|
-
team: options.team !== undefined ? options.team : currentConfig.team,
|
|
456
456
|
pipeline: options.pipeline !== undefined ? options.pipeline : currentConfig.pipeline,
|
|
457
457
|
aiCli: aiCliLaunchValue.aiCli,
|
|
458
458
|
aiCliLaunch: aiCliLaunchValue.aiCliLaunch,
|
|
@@ -471,7 +471,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
471
471
|
const metadata = await loadMetadata();
|
|
472
472
|
const newSuite = await selectSkillSuite(currentConfig.suite, metadata);
|
|
473
473
|
const newRules = await selectRulesPreset(currentConfig.rules);
|
|
474
|
-
const newTeam = await confirmTeamMode(currentConfig.team);
|
|
475
474
|
const newPipeline = await confirmPipeline(currentConfig.pipeline);
|
|
476
475
|
|
|
477
476
|
newConfig = {
|
|
@@ -479,7 +478,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
479
478
|
runtime: newRuntime,
|
|
480
479
|
suite: newSuite,
|
|
481
480
|
rules: newRules,
|
|
482
|
-
team: newTeam,
|
|
483
481
|
pipeline: newPipeline,
|
|
484
482
|
aiCli: aiCliSelection.aiCli,
|
|
485
483
|
aiCliLaunch: aiCliSelection.aiCliLaunch,
|
|
@@ -522,9 +520,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
522
520
|
if (newConfig.rules !== currentConfig.rules) {
|
|
523
521
|
changes.push(`规则: ${currentConfig.rules} → ${newConfig.rules}`);
|
|
524
522
|
}
|
|
525
|
-
if (newConfig.team !== currentConfig.team) {
|
|
526
|
-
changes.push(`团队模式: ${currentConfig.team ? '启用' : '禁用'} → ${newConfig.team ? '启用' : '禁用'}`);
|
|
527
|
-
}
|
|
528
523
|
if (newConfig.pipeline !== currentConfig.pipeline) {
|
|
529
524
|
changes.push(`流水线: ${currentConfig.pipeline ? '启用' : '禁用'} → ${newConfig.pipeline ? '启用' : '禁用'}`);
|
|
530
525
|
}
|
|
@@ -582,8 +577,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
582
577
|
|
|
583
578
|
// Resolve new file lists
|
|
584
579
|
const newSkillList = await resolveSkillList(newConfig.suite);
|
|
585
|
-
const agentsDir = getAgentsDir();
|
|
586
|
-
const newAgentFiles = (await fs.readdir(agentsDir)).filter(f => f.endsWith('.md'));
|
|
587
580
|
const rulesMeta = await loadRulesMetadata();
|
|
588
581
|
const newRuleFiles = resolveRuleNamesForRuntime(rulesMeta, newConfig.rules, newConfig.runtime).map(name => `${name}.md`);
|
|
589
582
|
const newPipelineFiles = newConfig.pipeline ? resolvePipelineFileList(newConfig.runtime) : [];
|
|
@@ -605,8 +598,8 @@ export async function runConfig(directory, options = {}) {
|
|
|
605
598
|
|| newConfig.runtime !== currentConfig.runtime) {
|
|
606
599
|
const newTempManifest = buildManifest({
|
|
607
600
|
version: pkg.version, platform: newConfig.platform, suite: newConfig.suite,
|
|
608
|
-
skills: newSkillList,
|
|
609
|
-
pipeline: newPipelineFiles,
|
|
601
|
+
skills: newSkillList, rules: newRuleFiles,
|
|
602
|
+
pipeline: newPipelineFiles, aiCli: newConfig.aiCli,
|
|
610
603
|
runtime: newConfig.runtime, rulesPreset: newConfig.rules, extras: oldManifest?.files?.extras || [], payloadPlatforms: newPlatforms,
|
|
611
604
|
});
|
|
612
605
|
const diff = diffManifest(oldManifest, newTempManifest);
|
|
@@ -633,11 +626,11 @@ export async function runConfig(directory, options = {}) {
|
|
|
633
626
|
|| newConfig.runtime !== currentConfig.runtime
|
|
634
627
|
|| newConfig.suite !== currentConfig.suite
|
|
635
628
|
|| newConfig.rules !== currentConfig.rules
|
|
636
|
-
|| newConfig.aiCli !== currentConfig.aiCli
|
|
637
|
-
|| newConfig.team !== currentConfig.team;
|
|
629
|
+
|| newConfig.aiCli !== currentConfig.aiCli;
|
|
638
630
|
|
|
639
631
|
for (const p of allTargetPlatforms) {
|
|
640
632
|
const isNew = platformsToAdd.includes(p);
|
|
633
|
+
await removeRetiredAgentTeamArtifacts(p, projectRoot, false);
|
|
641
634
|
|
|
642
635
|
if (isNew || needsReinstall) {
|
|
643
636
|
console.log(chalk.bold(`\n ${isNew ? '安装' : '更新'} ${platformLabel(p)} 环境...\n`));
|
|
@@ -645,19 +638,11 @@ export async function runConfig(directory, options = {}) {
|
|
|
645
638
|
console.log(chalk.blue(' Skills:'));
|
|
646
639
|
await installSkills(p, newSkillList, projectRoot, false, newConfig.runtime);
|
|
647
640
|
|
|
648
|
-
console.log(chalk.blue('\n Agents:'));
|
|
649
|
-
await installAgents(p, projectRoot, false);
|
|
650
|
-
|
|
651
641
|
console.log(chalk.blue('\n Settings & Rules:'));
|
|
652
642
|
await installSettings(p, projectRoot, { pipeline: newConfig.pipeline, rules: newConfig.rules }, false, newConfig.runtime);
|
|
653
643
|
|
|
654
644
|
console.log(chalk.blue('\n Project Memory:'));
|
|
655
645
|
await installProjectMemory(p, projectRoot, false);
|
|
656
|
-
|
|
657
|
-
if (newConfig.team) {
|
|
658
|
-
console.log(chalk.blue('\n Team Config:'));
|
|
659
|
-
await installTeamConfig(p, projectRoot, false);
|
|
660
|
-
}
|
|
661
646
|
}
|
|
662
647
|
}
|
|
663
648
|
|
|
@@ -723,10 +708,8 @@ export async function runConfig(directory, options = {}) {
|
|
|
723
708
|
runtime: newConfig.runtime,
|
|
724
709
|
suite: newConfig.suite,
|
|
725
710
|
skills: newSkillList,
|
|
726
|
-
agents: newAgentFiles,
|
|
727
711
|
rules: newRuleFiles,
|
|
728
712
|
pipeline: newPipelineFiles,
|
|
729
|
-
team: newConfig.team,
|
|
730
713
|
aiCli: newConfig.aiCli,
|
|
731
714
|
rulesPreset: newConfig.rules,
|
|
732
715
|
payloadPlatforms: newPlatforms,
|
|
@@ -755,7 +738,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
755
738
|
console.log(chalk.gray(` AI CLI: ${newConfig.aiCli || '(未设置)'}`));
|
|
756
739
|
console.log(chalk.gray(` 技能套件: ${newConfig.suite}`));
|
|
757
740
|
console.log(chalk.gray(` 规则: ${newConfig.rules}`));
|
|
758
|
-
console.log(chalk.gray(` 团队模式: ${newConfig.team ? '启用' : '禁用'}`));
|
|
759
741
|
console.log(chalk.gray(` 流水线: ${newConfig.pipeline ? '启用' : '禁用'}`));
|
|
760
742
|
console.log('');
|
|
761
743
|
}
|
package/src/index.js
CHANGED
|
@@ -70,7 +70,6 @@ export async function runScaffold(directory, options) {
|
|
|
70
70
|
platform: options.platform,
|
|
71
71
|
runtime: normalizeRuntime(options.runtime),
|
|
72
72
|
skills: options.skills || 'core',
|
|
73
|
-
team: options.team !== false,
|
|
74
73
|
pipeline: options.pipeline !== false,
|
|
75
74
|
playwrightCli: options.playwrightCli !== false,
|
|
76
75
|
openCli: options.openCli !== false,
|
|
@@ -155,13 +154,7 @@ export async function runScaffold(directory, options) {
|
|
|
155
154
|
});
|
|
156
155
|
}
|
|
157
156
|
|
|
158
|
-
// 3.
|
|
159
|
-
const team = await confirm({
|
|
160
|
-
message: '启用多 Agent 团队模式 (prizm-dev-team)?',
|
|
161
|
-
default: true,
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
// 4. Pipeline
|
|
157
|
+
// 3. Pipeline
|
|
165
158
|
const pipeline = await confirm({
|
|
166
159
|
message: '安装自动化流水线 (dev-pipeline)?',
|
|
167
160
|
default: true,
|
|
@@ -209,7 +202,6 @@ export async function runScaffold(directory, options) {
|
|
|
209
202
|
console.log(` 运行时: ${chalk.cyan(runtimeLabel(runtime))}`);
|
|
210
203
|
console.log(` 平台: ${chalk.cyan(selectedPlatformLabel)}`);
|
|
211
204
|
console.log(` 技能: ${chalk.cyan(suiteLabel)}`);
|
|
212
|
-
console.log(` 团队模式: ${team ? chalk.green('启用') : chalk.gray('禁用')}`);
|
|
213
205
|
console.log(` 流水线: ${pipeline ? chalk.green('启用') : chalk.gray('禁用')}`);
|
|
214
206
|
const browserToolsLabel = [playwrightCli && 'playwright-cli', openCli && 'opencli'].filter(Boolean);
|
|
215
207
|
console.log(` 浏览器工具: ${browserToolsLabel.length ? chalk.green(browserToolsLabel.join(' + ')) : chalk.gray('禁用')}`);
|
|
@@ -234,7 +226,6 @@ export async function runScaffold(directory, options) {
|
|
|
234
226
|
platform,
|
|
235
227
|
runtime,
|
|
236
228
|
skills: skillSuite,
|
|
237
|
-
team,
|
|
238
229
|
pipeline,
|
|
239
230
|
playwrightCli,
|
|
240
231
|
openCli,
|
package/src/manifest.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Manifest management for PrizmKit installations.
|
|
3
3
|
*
|
|
4
|
-
* Tracks what was installed (skills,
|
|
4
|
+
* Tracks what was installed (skills, rules, pipeline, extras) so that
|
|
5
5
|
* `upgrade` can diff old vs new and `uninstall` can clean orphaned files.
|
|
6
6
|
*
|
|
7
7
|
* Manifest is written to <projectRoot>/.prizmkit/manifest.json
|
|
@@ -52,10 +52,8 @@ export async function writeManifest(projectRoot, data) {
|
|
|
52
52
|
* @param {string} [params.runtime] - canonical Python runtime id or compatibility alias
|
|
53
53
|
* @param {string} params.suite - skill suite name
|
|
54
54
|
* @param {string[]} params.skills - resolved skill name list
|
|
55
|
-
* @param {string[]} params.agents - agent file names (e.g. ['prizm-dev-team-dev.md'])
|
|
56
55
|
* @param {string[]} params.rules - rule file names (e.g. ['prizm-documentation.md'])
|
|
57
56
|
* @param {string[]} params.pipeline - pipeline file relative paths (or falsy if not installed)
|
|
58
|
-
* @param {boolean} params.team - whether team config was installed
|
|
59
57
|
* @param {string} [params.aiCli] - AI CLI command
|
|
60
58
|
* @param {string} [params.rulesPreset] - rules preset name
|
|
61
59
|
* @param {string[]} [params.payloadPlatforms] - concrete platform payloads installed for platform + aiCli
|
|
@@ -67,10 +65,8 @@ export function buildManifest({
|
|
|
67
65
|
runtime,
|
|
68
66
|
suite,
|
|
69
67
|
skills,
|
|
70
|
-
agents,
|
|
71
68
|
rules,
|
|
72
69
|
pipeline,
|
|
73
|
-
team,
|
|
74
70
|
aiCli,
|
|
75
71
|
rulesPreset,
|
|
76
72
|
extras,
|
|
@@ -88,14 +84,12 @@ export function buildManifest({
|
|
|
88
84
|
runtime: normalizeRuntime(runtime),
|
|
89
85
|
suite,
|
|
90
86
|
options: {
|
|
91
|
-
team: Boolean(team),
|
|
92
87
|
pipeline: Array.isArray(pipeline) ? pipeline.length > 0 : Boolean(pipeline),
|
|
93
88
|
rules: rulesPreset || 'recommended',
|
|
94
89
|
aiCli: aiCli || '',
|
|
95
90
|
},
|
|
96
91
|
files: {
|
|
97
92
|
skills: [...skills],
|
|
98
|
-
agents: [...agents],
|
|
99
93
|
rules: [...rules],
|
|
100
94
|
pipeline: pipeline ? [...pipeline] : [],
|
|
101
95
|
extras: extras ? [...extras] : [],
|
|
@@ -113,7 +107,7 @@ export function buildManifest({
|
|
|
113
107
|
* Diff two manifests and return added/removed items.
|
|
114
108
|
* @param {Object} oldManifest - previous manifest
|
|
115
109
|
* @param {Object} newManifest - new manifest to compare against
|
|
116
|
-
* @returns {Object} { skills: {added, removed},
|
|
110
|
+
* @returns {Object} { skills: {added, removed}, rules: {added, removed}, pipeline: {added, removed}, extras: {added, removed}, legacyAgents: {added, removed} }
|
|
117
111
|
*/
|
|
118
112
|
export function diffManifest(oldManifest, newManifest) {
|
|
119
113
|
function diffArrays(oldArr, newArr) {
|
|
@@ -127,12 +121,12 @@ export function diffManifest(oldManifest, newManifest) {
|
|
|
127
121
|
|
|
128
122
|
return {
|
|
129
123
|
skills: diffArrays(oldManifest?.files?.skills, newManifest?.files?.skills),
|
|
130
|
-
agents: diffArrays(oldManifest?.files?.agents, newManifest?.files?.agents),
|
|
131
124
|
rules: diffArrays(oldManifest?.files?.rules, newManifest?.files?.rules),
|
|
132
125
|
pipeline: diffArrays(
|
|
133
126
|
Array.isArray(oldManifest?.files?.pipeline) ? oldManifest.files.pipeline : [],
|
|
134
127
|
Array.isArray(newManifest?.files?.pipeline) ? newManifest.files.pipeline : [],
|
|
135
128
|
),
|
|
136
129
|
extras: diffArrays(oldManifest?.files?.extras, newManifest?.files?.extras),
|
|
130
|
+
legacyAgents: diffArrays(oldManifest?.files?.agents, []),
|
|
137
131
|
};
|
|
138
132
|
}
|
package/src/metadata.js
CHANGED
|
@@ -94,32 +94,6 @@ export function getSkillCandidatePaths(skillName, skillDef = {}, runtime = 'pyth
|
|
|
94
94
|
return candidates;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/**
|
|
98
|
-
* 获取 core agents 目录路径
|
|
99
|
-
*/
|
|
100
|
-
export function getAgentsDir() {
|
|
101
|
-
const bundledDir = path.join(getBundledRoot(), 'agents');
|
|
102
|
-
const coreDir = path.join(getFrameworkRoot(), 'core', 'agents');
|
|
103
|
-
|
|
104
|
-
if (fs.pathExistsSync(bundledDir)) return bundledDir;
|
|
105
|
-
if (fs.pathExistsSync(coreDir)) return coreDir;
|
|
106
|
-
|
|
107
|
-
throw new Error('无法找到 Agents 目录。');
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* 获取 core team 目录路径
|
|
112
|
-
*/
|
|
113
|
-
export function getTeamDir() {
|
|
114
|
-
const bundledDir = path.join(getBundledRoot(), 'team');
|
|
115
|
-
const coreDir = path.join(getFrameworkRoot(), 'core', 'team');
|
|
116
|
-
|
|
117
|
-
if (fs.pathExistsSync(bundledDir)) return bundledDir;
|
|
118
|
-
if (fs.pathExistsSync(coreDir)) return coreDir;
|
|
119
|
-
|
|
120
|
-
throw new Error('无法找到 Team 目录。');
|
|
121
|
-
}
|
|
122
|
-
|
|
123
97
|
/**
|
|
124
98
|
* 获取 templates 目录路径
|
|
125
99
|
*/
|
package/src/prompts.js
CHANGED
|
@@ -234,19 +234,6 @@ export async function selectExternalSkills(currentSkills, metadata) {
|
|
|
234
234
|
return selectedSkills;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
/**
|
|
238
|
-
* Confirm team mode setting.
|
|
239
|
-
* @param {boolean} currentValue - current team mode value
|
|
240
|
-
* @returns {Promise<boolean>}
|
|
241
|
-
*/
|
|
242
|
-
export async function confirmTeamMode(currentValue = true) {
|
|
243
|
-
const team = await confirm({
|
|
244
|
-
message: '启用多 Agent 团队模式 (prizm-dev-team)?',
|
|
245
|
-
default: currentValue,
|
|
246
|
-
});
|
|
247
|
-
return team;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
237
|
/**
|
|
251
238
|
* Confirm pipeline setting.
|
|
252
239
|
* @param {boolean} currentValue - current pipeline value
|