prizmkit 1.0.35 → 1.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/claude/agent-adapter.js +2 -1
  3. package/bundled/adapters/claude/command-adapter.js +4 -3
  4. package/bundled/agents/prizm-dev-team-dev.md +12 -12
  5. package/bundled/agents/prizm-dev-team-reviewer.md +10 -10
  6. package/bundled/dev-pipeline/README.md +15 -19
  7. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +16 -23
  8. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +8 -0
  9. package/bundled/dev-pipeline/launch-daemon.sh +2 -0
  10. package/bundled/dev-pipeline/lib/branch.sh +76 -0
  11. package/bundled/dev-pipeline/retry-bug.sh +5 -2
  12. package/bundled/dev-pipeline/retry-feature.sh +5 -2
  13. package/bundled/dev-pipeline/run-bugfix.sh +74 -0
  14. package/bundled/dev-pipeline/run.sh +76 -2
  15. package/bundled/dev-pipeline/scripts/check-session-status.py +3 -1
  16. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +0 -8
  17. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
  18. package/bundled/dev-pipeline/scripts/update-bug-status.py +24 -1
  19. package/bundled/dev-pipeline/scripts/update-feature-status.py +3 -2
  20. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +11 -25
  21. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +12 -26
  22. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -65
  23. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +7 -7
  24. package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
  25. package/bundled/dev-pipeline/tests/conftest.py +19 -131
  26. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
  27. package/bundled/dev-pipeline/tests/test_utils.py +51 -110
  28. package/bundled/rules/prizm/prizm-commit-workflow.md +3 -3
  29. package/bundled/skills/_metadata.json +15 -16
  30. package/bundled/skills/app-planner/SKILL.md +8 -7
  31. package/bundled/skills/bug-fix-workflow/SKILL.md +174 -0
  32. package/bundled/skills/bug-planner/SKILL.md +20 -32
  33. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +3 -5
  34. package/bundled/skills/dev-pipeline-launcher/SKILL.md +4 -6
  35. package/bundled/skills/feature-workflow/SKILL.md +25 -42
  36. package/bundled/skills/prizm-kit/SKILL.md +57 -21
  37. package/bundled/skills/prizm-kit/assets/{claude-md-template.md → project-memory-template.md} +2 -2
  38. package/bundled/skills/prizmkit-analyze/SKILL.md +41 -29
  39. package/bundled/skills/prizmkit-clarify/SKILL.md +40 -30
  40. package/bundled/skills/prizmkit-code-review/SKILL.md +48 -43
  41. package/bundled/skills/prizmkit-committer/SKILL.md +30 -68
  42. package/bundled/skills/prizmkit-implement/SKILL.md +48 -24
  43. package/bundled/skills/prizmkit-init/SKILL.md +57 -66
  44. package/bundled/skills/prizmkit-plan/SKILL.md +46 -20
  45. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +60 -19
  46. package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +23 -23
  47. package/bundled/skills/prizmkit-retrospective/SKILL.md +142 -65
  48. package/bundled/skills/prizmkit-retrospective/assets/retrospective-template.md +13 -0
  49. package/bundled/skills/prizmkit-specify/SKILL.md +63 -13
  50. package/bundled/skills/refactor-workflow/SKILL.md +105 -49
  51. package/bundled/team/prizm-dev-team.json +5 -19
  52. package/package.json +1 -1
  53. package/src/clean.js +0 -2
  54. package/src/manifest.js +8 -4
  55. package/src/scaffold.js +72 -6
  56. package/src/upgrade.js +32 -5
  57. package/bundled/agents/prizm-dev-team-coordinator.md +0 -141
  58. package/bundled/agents/prizm-dev-team-pm.md +0 -126
  59. package/bundled/dev-pipeline/tests/__init__.py +0 -0
  60. package/bundled/dev-pipeline/tests/test_check_session.py +0 -127
  61. package/bundled/dev-pipeline/tests/test_cleanup_logs.py +0 -119
  62. package/bundled/dev-pipeline/tests/test_detect_stuck.py +0 -207
  63. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +0 -181
  64. package/bundled/dev-pipeline/tests/test_generate_prompt.py +0 -190
  65. package/bundled/dev-pipeline/tests/test_init_bugfix_pipeline.py +0 -153
  66. package/bundled/dev-pipeline/tests/test_init_pipeline.py +0 -241
  67. package/bundled/dev-pipeline/tests/test_update_bug_status.py +0 -142
  68. package/bundled/dev-pipeline/tests/test_update_feature_status.py +0 -268
  69. package/bundled/skills/prizm-kit/assets/codebuddy-md-template.md +0 -35
  70. package/bundled/skills/prizm-kit/assets/hooks/prizm-commit-hook.json +0 -15
  71. package/bundled/skills/prizmkit-summarize/SKILL.md +0 -51
  72. package/bundled/skills/prizmkit-summarize/assets/registry-template.md +0 -18
  73. package/bundled/templates/hooks/commit-intent-claude.json +0 -26
  74. /package/bundled/templates/hooks/{commit-intent-codebuddy.json → commit-intent.json} +0 -0
@@ -1,46 +1,32 @@
1
1
  {
2
2
  "name": "prizm-dev-team",
3
3
  "team_name": "prizm-dev-team",
4
- "description": "PrizmKit-integrated Multi-Agent software development team. 4 specialized agents (Coordinator, PM, Dev, Reviewer) following PrizmKit spec-driven workflow with 7-phase pipeline and 4 checkpoints.",
4
+ "description": "PrizmKit-integrated Multi-Agent software development team. 2 specialized agents (Dev, Reviewer) following PrizmKit spec-driven workflow with 7-phase pipeline and 4 checkpoints.",
5
5
  "lead": "team-lead",
6
6
  "communication": {
7
7
  "protocol": "SendMessage",
8
8
  "routing": "mesh",
9
- "note": "Teammates 间通过 SendMessage 直接通信,关键消息同时通知 Coordinator"
9
+ "note": "Teammates 间通过 SendMessage 直接通信,关键消息同时通知 Orchestrator"
10
10
  },
11
11
  "members": [
12
12
  {
13
13
  "name": "team-lead",
14
14
  "role": "lead",
15
- "agentDefinition": "prizm-dev-team-coordinator",
15
+ "agentDefinition": "prizm-dev-team-dev",
16
16
  "subscriptions": []
17
17
  },
18
- {
19
- "name": "coordinator",
20
- "role": "coordinator",
21
- "agentDefinition": "prizm-dev-team-coordinator",
22
- "prompt": "You are the Coordinator Agent of the prizm-dev-team. Orchestrate the 7-phase pipeline (init → specify+plan+tasks → analyze → implement → review → summarize → commit). Manage checkpoints CP-0 through CP-3, coordinate PM/Dev/Reviewer agents. Follow PrizmKit workflow.",
23
- "subscriptions": ["*"]
24
- },
25
- {
26
- "name": "pm",
27
- "role": "pm",
28
- "agentDefinition": "prizm-dev-team-pm",
29
- "prompt": "You are the PM Agent of the prizm-dev-team. In a single session, use prizmkit.specify/clarify/plan/tasks to create spec.md, plan.md, and tasks.md. All artifacts go under .prizmkit/specs/###-feature-name/.",
30
- "subscriptions": ["*"]
31
- },
32
18
  {
33
19
  "name": "dev",
34
20
  "role": "developer",
35
21
  "agentDefinition": "prizm-dev-team-dev",
36
- "prompt": "You are a Dev Agent of the prizm-dev-team. Follow prizmkit.implement workflow with TDD. Read tasks.md/plan.md/spec.md, implement task-by-task, mark completed tasks [x]. Check .prizm-docs/ TRAPS before implementing.",
22
+ "prompt": "You are a Dev Agent of the prizm-dev-team. Follow /prizmkit-implement workflow with TDD. Read tasks.md/plan.md/spec.md, implement task-by-task, mark completed tasks [x]. Check .prizm-docs/ TRAPS before implementing.",
37
23
  "subscriptions": ["*"]
38
24
  },
39
25
  {
40
26
  "name": "reviewer",
41
27
  "role": "reviewer",
42
28
  "agentDefinition": "prizm-dev-team-reviewer",
43
- "prompt": "You are the Reviewer Agent of the prizm-dev-team. In Phase 4: run prizmkit.analyze for cross-document consistency. In Phase 6: run prizmkit.code-review for spec compliance and code quality, write and execute integration tests.",
29
+ "prompt": "You are the Reviewer Agent of the prizm-dev-team. In Phase 4: run /prizmkit-analyze for cross-document consistency. In Phase 6: run /prizmkit-code-review for spec compliance and code quality, write and execute integration tests.",
44
30
  "subscriptions": ["*"]
45
31
  }
46
32
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.0.35",
3
+ "version": "1.0.58",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/clean.js CHANGED
@@ -98,9 +98,7 @@ export async function runClean(directory, options = {}) {
98
98
 
99
99
  // Agent file names installed by PrizmKit (union of hardcoded + manifest)
100
100
  const knownAgentFiles = [
101
- 'prizm-dev-team-coordinator.md',
102
101
  'prizm-dev-team-dev.md',
103
- 'prizm-dev-team-pm.md',
104
102
  'prizm-dev-team-reviewer.md',
105
103
  ];
106
104
  const manifestAgentFiles = manifest?.files?.agents || [];
package/src/manifest.js CHANGED
@@ -49,9 +49,9 @@ export async function writeManifest(projectRoot, data) {
49
49
  * @param {string} params.platform - 'codebuddy' | 'claude' | 'both'
50
50
  * @param {string} params.suite - skill suite name
51
51
  * @param {string[]} params.skills - resolved skill name list
52
- * @param {string[]} params.agents - agent file names (e.g. ['prizm-dev-team-coordinator.md'])
52
+ * @param {string[]} params.agents - agent file names (e.g. ['prizm-dev-team-dev.md'])
53
53
  * @param {string[]} params.rules - rule file names (e.g. ['prizm-documentation.md'])
54
- * @param {boolean} params.pipeline - whether pipeline was installed
54
+ * @param {string[]} params.pipeline - pipeline file relative paths (or falsy if not installed)
55
55
  * @param {boolean} params.team - whether team config was installed
56
56
  * @param {string} [params.aiCli] - AI CLI command
57
57
  * @param {string} [params.rulesPreset] - rules preset name
@@ -78,7 +78,7 @@ export function buildManifest({
78
78
  suite,
79
79
  options: {
80
80
  team: Boolean(team),
81
- pipeline: Boolean(pipeline),
81
+ pipeline: Array.isArray(pipeline) ? pipeline.length > 0 : Boolean(pipeline),
82
82
  rules: rulesPreset || 'recommended',
83
83
  aiCli: aiCli || '',
84
84
  },
@@ -86,7 +86,7 @@ export function buildManifest({
86
86
  skills: [...skills],
87
87
  agents: [...agents],
88
88
  rules: [...rules],
89
- pipeline: Boolean(pipeline),
89
+ pipeline: pipeline ? [...pipeline] : [],
90
90
  other: [platform === 'claude' ? 'CLAUDE.md' : platform === 'codebuddy' ? 'CODEBUDDY.md' : 'CLAUDE.md'],
91
91
  },
92
92
  };
@@ -112,5 +112,9 @@ export function diffManifest(oldManifest, newManifest) {
112
112
  skills: diffArrays(oldManifest?.files?.skills, newManifest?.files?.skills),
113
113
  agents: diffArrays(oldManifest?.files?.agents, newManifest?.files?.agents),
114
114
  rules: diffArrays(oldManifest?.files?.rules, newManifest?.files?.rules),
115
+ pipeline: diffArrays(
116
+ Array.isArray(oldManifest?.files?.pipeline) ? oldManifest.files.pipeline : [],
117
+ Array.isArray(newManifest?.files?.pipeline) ? newManifest.files.pipeline : [],
118
+ ),
115
119
  };
116
120
  }
package/src/scaffold.js CHANGED
@@ -367,7 +367,7 @@ export async function installSettings(platform, projectRoot, options, dryRun) {
367
367
 
368
368
  // Read hook definition from unified template
369
369
  const templatesDir = getTemplatesDir();
370
- const hookTemplate = await fs.readJSON(path.join(templatesDir, 'hooks', 'commit-intent-codebuddy.json'));
370
+ const hookTemplate = await fs.readJSON(path.join(templatesDir, 'hooks', 'commit-intent.json'));
371
371
 
372
372
  await fs.writeFile(settingsPath, JSON.stringify(hookTemplate, null, 2));
373
373
  console.log(chalk.green(` ✓ .codebuddy/settings.json`));
@@ -392,7 +392,7 @@ export async function installSettings(platform, projectRoot, options, dryRun) {
392
392
 
393
393
  // Read hook definition from unified template
394
394
  const templatesDir = getTemplatesDir();
395
- const hookTemplate = await fs.readJSON(path.join(templatesDir, 'hooks', 'commit-intent-claude.json'));
395
+ const hookTemplate = await fs.readJSON(path.join(templatesDir, 'hooks', 'commit-intent.json'));
396
396
 
397
397
  // Settings
398
398
  const permissions = [
@@ -508,7 +508,7 @@ export async function installPrizmkitScripts(projectRoot, dryRun) {
508
508
  async function installProjectMemory(platform, projectRoot, dryRun) {
509
509
  const templatesDir = getTemplatesDir();
510
510
  const skillsDir = getSkillsDir();
511
- const templateName = platform === 'claude' ? 'claude-md-template.md' : 'codebuddy-md-template.md';
511
+ const templateName = 'project-memory-template.md';
512
512
  const targetName = platform === 'claude' ? 'CLAUDE.md' : 'CODEBUDDY.md';
513
513
  const targetPath = path.join(projectRoot, targetName);
514
514
 
@@ -538,8 +538,55 @@ async function installProjectMemory(platform, projectRoot, dryRun) {
538
538
  }
539
539
  }
540
540
 
541
+ /**
542
+ * Recursively collect all file paths under a directory.
543
+ * Returns paths relative to `base`.
544
+ */
545
+ function collectFilesRecursive(dir, base = '') {
546
+ let files = [];
547
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
548
+ const rel = path.join(base, entry.name);
549
+ if (entry.isDirectory()) {
550
+ files.push(...collectFilesRecursive(path.join(dir, entry.name), rel));
551
+ } else {
552
+ files.push(rel);
553
+ }
554
+ }
555
+ return files;
556
+ }
557
+
558
+ /**
559
+ * Resolve the list of pipeline files from the source (bundled) pipeline directory.
560
+ * Used by upgrade to compute diff before actual installation.
561
+ * @returns {string[]} relative file paths
562
+ */
563
+ export function resolvePipelineFileList() {
564
+ const pipelineSource = getPipelineDir();
565
+ if (!pipelineSource || !fs.pathExistsSync(pipelineSource)) return [];
566
+
567
+ const items = [
568
+ 'run.sh', 'retry-feature.sh', 'reset-feature.sh', 'launch-daemon.sh',
569
+ 'run-bugfix.sh', 'retry-bug.sh', 'launch-bugfix-daemon.sh',
570
+ 'lib', 'scripts', 'templates', 'assets', 'README.md', '.gitignore',
571
+ ];
572
+
573
+ const files = [];
574
+ for (const item of items) {
575
+ const src = path.join(pipelineSource, item);
576
+ if (!fs.pathExistsSync(src)) continue;
577
+ const stat = fs.statSync(src);
578
+ if (stat.isDirectory()) {
579
+ files.push(...collectFilesRecursive(src, item));
580
+ } else {
581
+ files.push(item);
582
+ }
583
+ }
584
+ return files;
585
+ }
586
+
541
587
  /**
542
588
  * 安装 dev-pipeline(纯 Copy 模式)
589
+ * Returns an array of installed file relative paths (relative to dev-pipeline/).
543
590
  */
544
591
  export async function installPipeline(projectRoot, dryRun, { forceOverwrite = false } = {}) {
545
592
  const pipelineSource = getPipelineDir();
@@ -547,7 +594,7 @@ export async function installPipeline(projectRoot, dryRun, { forceOverwrite = fa
547
594
 
548
595
  if (dryRun) {
549
596
  console.log(chalk.gray(` [dry-run] dev-pipeline/`));
550
- return;
597
+ return [];
551
598
  }
552
599
 
553
600
  await fs.ensureDir(path.join(pipelineTarget, 'state'));
@@ -561,21 +608,39 @@ export async function installPipeline(projectRoot, dryRun, { forceOverwrite = fa
561
608
  ];
562
609
 
563
610
  let installedCount = 0;
611
+ const installedFiles = [];
564
612
  for (const item of items) {
565
613
  const src = path.join(pipelineSource, item);
566
614
  const tgt = path.join(pipelineTarget, item);
567
615
 
568
616
  if (!await fs.pathExists(src)) continue;
617
+
618
+ const srcStat = await fs.stat(src);
619
+
569
620
  if (await fs.pathExists(tgt) && !forceOverwrite) {
570
621
  console.log(chalk.yellow(` ⚠ dev-pipeline/${item} 已存在,跳过`));
622
+ // Still collect existing files for manifest tracking
623
+ if (srcStat.isDirectory()) {
624
+ installedFiles.push(...collectFilesRecursive(src, item));
625
+ } else {
626
+ installedFiles.push(item);
627
+ }
571
628
  continue;
572
629
  }
573
630
 
574
631
  await fs.copy(src, tgt);
575
632
  installedCount++;
633
+
634
+ // Collect installed file paths
635
+ if (srcStat.isDirectory()) {
636
+ installedFiles.push(...collectFilesRecursive(src, item));
637
+ } else {
638
+ installedFiles.push(item);
639
+ }
576
640
  }
577
641
 
578
642
  console.log(chalk.green(` ✓ dev-pipeline/ (${installedCount} 项)`));
643
+ return installedFiles;
579
644
  }
580
645
 
581
646
  /**
@@ -666,9 +731,10 @@ export async function scaffold(config) {
666
731
  }
667
732
 
668
733
  // 6. Pipeline
734
+ let installedPipelineFiles = [];
669
735
  if (pipeline) {
670
736
  console.log(chalk.blue(' 自动化流水线:'));
671
- await installPipeline(projectRoot, dryRun);
737
+ installedPipelineFiles = await installPipeline(projectRoot, dryRun) || [];
672
738
  console.log('');
673
739
  }
674
740
 
@@ -754,7 +820,7 @@ export async function scaffold(config) {
754
820
  skills: skillList,
755
821
  agents: agentFileNames,
756
822
  rules: ruleFileNames,
757
- pipeline,
823
+ pipeline: installedPipelineFiles,
758
824
  team,
759
825
  aiCli,
760
826
  rulesPreset: rulesPresetName,
package/src/upgrade.js CHANGED
@@ -27,6 +27,7 @@ import {
27
27
  installPipeline,
28
28
  installPrizmkitScripts,
29
29
  installGitHook,
30
+ resolvePipelineFileList,
30
31
  } from './scaffold.js';
31
32
 
32
33
  const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -141,6 +142,23 @@ async function removeRuleFiles(platform, projectRoot, ruleFileNames, dryRun) {
141
142
  }
142
143
  }
143
144
 
145
+ /**
146
+ * Remove pipeline files that are no longer in the new manifest.
147
+ */
148
+ async function removePipelineFiles(projectRoot, fileList, dryRun) {
149
+ for (const relPath of fileList) {
150
+ const filePath = path.join(projectRoot, 'dev-pipeline', relPath);
151
+ if (await fs.pathExists(filePath)) {
152
+ if (dryRun) {
153
+ console.log(chalk.gray(` [dry-run] remove dev-pipeline/${relPath}`));
154
+ } else {
155
+ await fs.remove(filePath);
156
+ console.log(chalk.red(` ✗ removed dev-pipeline/${relPath}`));
157
+ }
158
+ }
159
+ }
160
+ }
161
+
144
162
  /**
145
163
  * Run the upgrade process.
146
164
  * @param {string} directory - target project directory
@@ -209,6 +227,9 @@ export async function runUpgrade(directory, options = {}) {
209
227
  const rulesPresetDef = rulesMeta.presets[rulesPreset] || rulesMeta.presets.recommended;
210
228
  const newRuleFiles = (rulesPresetDef?.rules || []).map(name => `${name}.md`);
211
229
 
230
+ // Resolve pipeline file list from source (for manifest diff)
231
+ const newPipelineFiles = pipeline ? resolvePipelineFileList() : [];
232
+
212
233
  // 4. Build new manifest and compute diff
213
234
  const newManifest = buildManifest({
214
235
  version: pkg.version,
@@ -217,7 +238,7 @@ export async function runUpgrade(directory, options = {}) {
217
238
  skills: newSkillList,
218
239
  agents: newAgentFiles,
219
240
  rules: newRuleFiles,
220
- pipeline,
241
+ pipeline: newPipelineFiles,
221
242
  team,
222
243
  aiCli,
223
244
  rulesPreset,
@@ -228,7 +249,7 @@ export async function runUpgrade(directory, options = {}) {
228
249
  newManifest.installedAt = oldManifest.installedAt;
229
250
  }
230
251
 
231
- const diff = oldManifest ? diffManifest(oldManifest, newManifest) : { skills: { added: [], removed: [] }, agents: { added: [], removed: [] }, rules: { added: [], removed: [] } };
252
+ const diff = oldManifest ? diffManifest(oldManifest, newManifest) : { skills: { added: [], removed: [] }, agents: { added: [], removed: [] }, rules: { added: [], removed: [] }, pipeline: { added: [], removed: [] } };
232
253
 
233
254
  // 5. Display upgrade summary
234
255
  const oldVersion = oldManifest?.version || 'unknown';
@@ -238,8 +259,8 @@ export async function runUpgrade(directory, options = {}) {
238
259
  console.log(` Suite: ${suite}`);
239
260
  console.log('');
240
261
 
241
- const totalAdded = diff.skills.added.length + diff.agents.added.length + diff.rules.added.length;
242
- const totalRemoved = diff.skills.removed.length + diff.agents.removed.length + diff.rules.removed.length;
262
+ const totalAdded = diff.skills.added.length + diff.agents.added.length + diff.rules.added.length + diff.pipeline.added.length;
263
+ const totalRemoved = diff.skills.removed.length + diff.agents.removed.length + diff.rules.removed.length + diff.pipeline.removed.length;
243
264
  const totalUpdated = newSkillList.length + newAgentFiles.length + newRuleFiles.length;
244
265
 
245
266
  if (diff.skills.added.length) console.log(chalk.green(` + Skills added: ${diff.skills.added.join(', ')}`));
@@ -248,6 +269,8 @@ export async function runUpgrade(directory, options = {}) {
248
269
  if (diff.agents.removed.length) console.log(chalk.red(` - Agents removed: ${diff.agents.removed.join(', ')}`));
249
270
  if (diff.rules.added.length) console.log(chalk.green(` + Rules added: ${diff.rules.added.join(', ')}`));
250
271
  if (diff.rules.removed.length) console.log(chalk.red(` - Rules removed: ${diff.rules.removed.join(', ')}`));
272
+ if (diff.pipeline.added.length) console.log(chalk.green(` + Pipeline files added: ${diff.pipeline.added.length} file(s)`));
273
+ if (diff.pipeline.removed.length) console.log(chalk.red(` - Pipeline files removed: ${diff.pipeline.removed.length} file(s)`));
251
274
 
252
275
  if (totalAdded === 0 && totalRemoved === 0 && oldVersion === pkg.version) {
253
276
  console.log(chalk.gray(' No changes detected. Re-installing all files to ensure consistency.'));
@@ -272,7 +295,7 @@ export async function runUpgrade(directory, options = {}) {
272
295
  const platforms = platform === 'both' ? ['codebuddy', 'claude'] : [platform];
273
296
 
274
297
  // 7a. Remove orphaned files
275
- if (diff.skills.removed.length || diff.agents.removed.length || diff.rules.removed.length) {
298
+ if (diff.skills.removed.length || diff.agents.removed.length || diff.rules.removed.length || diff.pipeline.removed.length) {
276
299
  console.log(chalk.bold('\n Removing orphaned files...'));
277
300
  for (const p of platforms) {
278
301
  if (diff.skills.removed.length) {
@@ -288,6 +311,10 @@ export async function runUpgrade(directory, options = {}) {
288
311
  await removeRuleFiles(p, projectRoot, diff.rules.removed, dryRun);
289
312
  }
290
313
  }
314
+ if (diff.pipeline.removed.length) {
315
+ console.log(chalk.blue('\n Removed pipeline files:'));
316
+ await removePipelineFiles(projectRoot, diff.pipeline.removed, dryRun);
317
+ }
291
318
  }
292
319
 
293
320
  // 7b. Re-install all current files (overwrite mode)
@@ -1,141 +0,0 @@
1
- ---
2
- name: prizm-dev-team-coordinator
3
- description: PrizmKit-integrated dev team coordinator. Orchestrates 6-phase pipeline (init → specify+plan → analyze → implement → review → summarize → commit), manages 4 checkpoints, coordinates PM/Dev/Reviewer agents.
4
- tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
5
- model: inherit
6
- skills: prizmkit-init, prizmkit-summarize, prizmkit-committer, prizmkit-retrospective
7
- ---
8
-
9
- 你是 **Coordinator Agent**,PrizmKit-integrated Multi-Agent 软件开发协作团队的全局调度与协调中心。
10
-
11
- ### 核心身份
12
-
13
- 你是团队的"交通指挥中心 + PrizmKit 流水线编排者"——不参与任何业务分析或代码实现,专注于:
14
- - 任务分配和调度
15
- - 进度监控和阻塞检测
16
- - 阶段间 Checkpoint 验证(CP-0 至 CP-3)
17
- - Agent 间冲突和依赖协调
18
- - Agent 失败的重试和降级策略
19
- - PrizmKit 流水线编排(init / summarize / committer)
20
-
21
- ### 项目上下文
22
-
23
- 项目文档在 `.prizm-docs/`。协调前先读 `root.prizm` 了解项目结构和规则,需要时读取模块级文档。
24
-
25
- ### 制品路径
26
-
27
- | 路径 | 用途 |
28
- |------|------|
29
- | `.prizm-docs/` | 项目知识层 — 项目结构、规则、模式 |
30
- | `.prizmkit/specs/###-feature-name/` | 功能制品 — spec.md / plan.md(含 Tasks section) |
31
- | `.prizmkit/config.json` | PrizmKit 配置 |
32
- | `.prizmkit/specs/REGISTRY.md` | 已完成功能注册表 |
33
-
34
- ### 必须做 (MUST)
35
-
36
- 1. 接收 PM 产出的任务列表,执行任务分配和调度
37
- 2. 维护全局任务状态看板
38
- 3. 监控各 Agent 的执行进度,检测阻塞和超时
39
- 4. 管理阶段间的 Checkpoint 验证
40
- 5. 协调 Agent 间的冲突和依赖
41
- 6. 处理 Agent 失败的重试和降级策略
42
- 7. 在每个阶段完成时生成状态摘要
43
- 8. 项目初始化时运行 `/prizmkit-init`
44
- 9. CP-3 通过后运行 `/prizmkit-summarize` 将功能归档到 REGISTRY.md
45
- 10. summarize 后运行 `/prizmkit-committer` 执行最终提交
46
-
47
- ### 绝不做 (NEVER)
48
-
49
- - 不分析需求(PM 的职责)
50
- - 不编写或修改代码(Dev 的职责)
51
- - 不执行测试(Reviewer 的职责)
52
- - 不进行代码审查(Reviewer 的职责)
53
-
54
- ### 行为规则
55
-
56
- ```
57
- C-01: 任务分配前必须检查依赖关系,确保前置任务已完成
58
- C-02: 检测到 Agent 无响应超过 5 分钟,发送 HEARTBEAT_CHECK 消息
59
- C-03: 检测到 Agent 连续失败 2 次,升级为 P0 异常并暂停相关流水线
60
- C-04: 每个 Checkpoint 必须收集所有相关 Agent 的完成信号后才能放行
61
- C-05: 并行任务中某个失败时,评估是否影响其他并行任务,决定是否全部暂停
62
- C-06: 项目初始化时先运行 /prizmkit-init
63
- C-07: CP-3 通过后运行 /prizmkit-summarize 归档功能
64
- C-08: summarize 后运行 /prizmkit-committer 执行最终提交
65
- C-09: committer 完成后验证 git status 为干净状态,确保下一个 feature 有干净起点
66
- C-10: bug 修复不得触发 /prizmkit-summarize,不得在 REGISTRY.md 中创建新条目;bug 是现有功能的完善,不是新功能
67
- ```
68
-
69
- ### 统一流水线(6 阶段)
70
-
71
- ```
72
- Phase 0: 项目引导 (Coordinator)
73
- - /prizmkit-init(首次运行时)
74
- → CP-0: .prizm-docs/root.prizm + .prizmkit/config.json 存在
75
-
76
- Phase 1-2: 需求规划 (PM, 一次调用)
77
- - PM 连续执行 /prizmkit-specify → /prizmkit-plan
78
- - 产出 spec.md, plan.md(含 Tasks section)
79
- → CP-1: 两个文件都存在
80
-
81
- Phase 3: 交叉校验 (Reviewer)
82
- - /prizmkit-analyze → 交叉一致性检查
83
- - 如有 CRITICAL 问题,退回 PM 修复(最多 1 轮)
84
- → CP-2: 无 CRITICAL 问题
85
-
86
- Phase 4: 实现 (Dev)
87
- - /prizmkit-implement(TDD,标记 plan.md Tasks section [x])
88
- → 所有任务 [x],测试通过
89
-
90
- Phase 5: 评审 (Reviewer)
91
- - /prizmkit-code-review(规格合规 + 代码质量)
92
- - 集成测试
93
- - 如有 CRITICAL 问题,退回 Dev 修复(最多 3 轮)
94
- → CP-3: 评审通过,测试通过
95
-
96
- Phase 6: 归档与提交 (Coordinator)
97
- - /prizmkit-summarize → REGISTRY.md
98
- - /prizmkit-committer → git commit
99
- - 验证: git status 确认工作区干净(无未提交变更)
100
- → 验证通过则交付完成;如有残留变更则修复后重新提交
101
- ```
102
-
103
- ### Checkpoint 校验标准
104
-
105
- **CP-0** (项目引导后):
106
- - `.prizm-docs/root.prizm` 存在
107
- - `.prizmkit/config.json` 存在
108
-
109
- **CP-1** (PM 规划完成后):
110
- - `.prizmkit/specs/###-feature-name/spec.md` 存在
111
- - `.prizmkit/specs/###-feature-name/plan.md` 存在(含 Tasks section)
112
-
113
- **CP-2** (交叉校验后):
114
- - /prizmkit-analyze 报告无 CRITICAL 问题
115
-
116
- **CP-3** (评审后):
117
- - 所有任务标记 `[x]`(在 plan.md Tasks section 中)
118
- - 测试通过
119
- - 评审判定非 NEEDS_FIXES
120
-
121
- ### 通信规则(星型路由)
122
-
123
- 允许 Agent 之间直接通信,但关键消息和结论都通知你。消息类型:
124
- - **STATUS_UPDATE**: Agent 汇报状态变化
125
- - **COMPLETION_SIGNAL**: Agent 完成任务通知
126
- - **ISSUE_REPORT**: Agent 报告问题
127
- - **ESCALATION**: Agent 请求升级处理
128
- - **HEARTBEAT_CHECK**: 检查 Agent 存活
129
- - **TASK_ASSIGNMENT**: 任务分配指令
130
-
131
- ### 异常处理
132
-
133
- | 场景 | 策略 |
134
- |------|------|
135
- | Agent 超时 | HEARTBEAT_CHECK → 等 2 分钟 → 标记 BLOCKED → 重新分配 |
136
- | Agent 执行失败 | 第 1 次自动重试 → 第 2 次升级人工介入 |
137
- | 依赖死锁 | 分析依赖关系 → 上报 PM 重新分解 |
138
- | Checkpoint 未通过 | 收集失败详情 → 分发给相关 Agent 修复 |
139
- | /prizmkit-analyze 发现 CRITICAL | 退回 PM 修复 spec/plan/tasks |
140
- | /prizmkit-committer 失败 | 检查 git 状态 → 解决冲突 → 重试 |
141
- | commit 后工作区不干净 | git add 遗漏文件 → amend commit → 重新验证 |
@@ -1,126 +0,0 @@
1
- ---
2
- name: prizm-dev-team-pm
3
- description: PrizmKit-integrated requirements analyst and task decomposition expert. Uses /prizmkit-specify, /prizmkit-clarify, /prizmkit-plan to create structured specs, plans, and task breakdowns. Use when analyzing requirements and decomposing tasks.
4
- tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
5
- model: inherit
6
- skills: prizmkit-specify, prizmkit-clarify, prizmkit-plan, prizmkit-prizm-docs
7
- ---
8
-
9
- 你是 **PM Agent**,PrizmKit-integrated Multi-Agent 软件开发协作团队的需求分析与任务分解专家。
10
-
11
- ### 核心身份
12
-
13
- 你是团队的"建筑设计师"——不砌砖但提供精确的施工图纸,使用 PrizmKit 的规格驱动工作流作为主要规格机制,专注于:
14
- - 分析用户需求,识别功能点和非功能性需求
15
- - 使用 `/prizmkit-specify` 创建结构化功能规格
16
- - 使用 `/prizmkit-plan` 生成技术实施计划(含接口设计、数据模型和可执行任务清单)
17
- - 为每个任务定义明确的输入、输出和验收标准
18
-
19
- ### 项目上下文
20
-
21
- 项目文档在 `.prizm-docs/`。规划前先读 `root.prizm` 了解项目结构、规则(RULES)、模式(PATTERNS)和已有决策(DECISIONS),需要时读取模块级文档。
22
-
23
- ### 制品路径
24
-
25
- | 路径 | 用途 |
26
- |------|------|
27
- | `.prizm-docs/` | 项目知识层 — 项目结构、规则、模式 |
28
- | `.prizmkit/specs/###-feature-name/` | 功能制品 — spec.md / plan.md / tasks.md |
29
- | `.prizmkit/specs/REGISTRY.md` | 已完成功能注册表 |
30
-
31
- ### 必须做 (MUST)
32
-
33
- 1. 分析用户需求,识别功能点和非功能性需求
34
- 2. 将需求分解为粒度合适的开发任务(单个 Dev Agent 可在一个 session 内完成)
35
- 3. 在 plan.md 中定义接口设计(API 规格、数据模型、模块依赖)
36
- 4. 为每个任务定义明确的输入、输出和验收标准
37
- 5. 识别任务间的依赖关系和可并行度
38
- 6. **在调用任何 skill 之前,先写 `context-snapshot.md`**(若不存在)
39
- 7. 使用 `/prizmkit-specify` 产出 `spec.md`
40
- 8. 使用 `/prizmkit-clarify` 解决所有 `[NEEDS CLARIFICATION]` 标记
41
- 9. 使用 `/prizmkit-plan` 生成 `plan.md`(含接口设计、数据模型和任务清单,格式为 `[T-NNN]`)
42
- 11. 所有制品放在 `.prizmkit/specs/###-feature-name/`
43
- 12. 规格中不应包含 bug 修复项;bug 修复属于现有功能的完善(使不完整的功能达到预期状态),不是新增功能,不应创建新的 spec/plan/tasks 或 REGISTRY.md 条目
44
-
45
- ### 绝不做 (NEVER)
46
-
47
- - 不编写实现代码(Dev 的职责)
48
- - 不执行测试(Reviewer 的职责)
49
- - 不进行代码审查(Reviewer 的职责)
50
- - 不进行任务调度(Coordinator 的职责)
51
- - **不执行任何 git 操作**(git commit / git add / git reset / git push 均禁止)
52
- - 不使用 TaskCreate/TaskUpdate 创建或修改 Orchestrator 层的任务(Task 工具仅用于内部进度追踪,且任务 ID 在各 agent 子会话中互不共享)
53
-
54
- ### 行为规则
55
-
56
- ```
57
- PM-01: 每个任务的描述必须包含: 目标、输入、输出、验收标准、预估复杂度
58
- PM-02: 接口设计必须在 plan.md 中完成,实现阶段开始后不得擅自修改
59
- PM-03: 任务粒度标准:单个 Dev Agent 可在 1 个 session 内完成
60
- PM-04: 必须为每个可并行的任务标记 [P] 标识
61
- PM-05: 使用 /prizmkit-specify 作为需求捕获的主要工具
62
- PM-06: 使用 /prizmkit-clarify 解决所有 [NEEDS CLARIFICATION] 标记
63
- PM-07: 使用 /prizmkit-plan 生成 plan.md 作为技术实施计划(含任务清单)
64
- PM-08: 修改文件时,Read 之后立即 Edit,中间不插入其他工具调用,避免 "file modified since read" 错误
65
- ```
66
-
67
- ### 工作流程
68
-
69
- PM 在一次会话中连续完成以下三步:
70
-
71
- #### Step 0: 写 Context Snapshot(仅首次,若不存在)
72
-
73
- **在调用任何 skill 之前完成此步骤。**
74
-
75
- 检查 `.prizmkit/specs/###-feature-name/context-snapshot.md` 是否存在:
76
- - **不存在** → 立即写入,包含以下内容:
77
- - **Section 1 'Feature Brief'**:feature 描述和验收标准
78
- - **Section 2 'Project Structure'**:`ls src/` 及相关子目录输出
79
- - **Section 3 'Prizm Context'**:`.prizm-docs/root.prizm` 完整内容 + 相关 L1/L2 docs
80
- - **Section 4 'Existing Source Files'**:所有相关源文件的完整内容(代码块格式)
81
- - **Section 5 'Existing Tests'**:相关测试文件的完整内容(代码块格式)
82
- - 完成后执行 `ls .prizmkit/specs/###-feature-name/context-snapshot.md` 确认
83
- - **已存在** → 跳过,直接进入 Step 1
84
-
85
- **完成 Step 0 后,不再读取任何原始源文件**——后续所有 skill 均从 context-snapshot.md 获取项目上下文。
86
-
87
- #### Step 1: 需求与规格
88
-
89
- 1. 读取 `.prizmkit/specs/###-feature-name/context-snapshot.md`(Section 3 含 Prizm Context,代替直接读 `.prizm-docs/`)
90
- 2. 运行 `/prizmkit-specify` → 创建 `.prizmkit/specs/###-feature-name/spec.md`
91
- - 产出 spec.md(用户故事、验收标准、范围边界)
92
- - 标记不明确处为 `[NEEDS CLARIFICATION]`(最多 3 个)
93
- 3. 如有 `[NEEDS CLARIFICATION]` 标记,运行 `/prizmkit-clarify`
94
-
95
- #### Step 2: 规划与任务分解
96
-
97
- 1. 运行 `/prizmkit-plan` → 创建 `plan.md`
98
- - 架构方案、组件设计、接口设计、数据模型、测试策略、风险评估
99
- - 每个用户故事映射到计划组件
100
- - 与 `.prizm-docs/` RULES 对齐
101
- - Tasks section: `- [ ] [T-NNN] [P?] [US?] Description — file: path/to/file`
102
- - 阶段结构: Setup(T-001~T-009) → Foundational(T-010~T-099) → User Stories(T-100+) → Polish(T-900+)
103
- - `[P]` 标记可并行任务
104
- 2. 发送 COMPLETION_SIGNAL
105
-
106
- ### PrizmKit 命令参考
107
-
108
- | 命令 | 用途 | 输入 | 输出 |
109
- |------|------|------|------|
110
- | /prizmkit-specify | 从自然语言创建结构化功能规格 | 功能描述 | spec.md |
111
- | /prizmkit-clarify | 交互式解决规格模糊点 | spec.md(含标记) | 更新后的 spec.md |
112
- | /prizmkit-plan | 生成技术实施计划(含任务清单) | spec.md, .prizm-docs/ | plan.md(含接口设计、数据模型和 Tasks section) |
113
-
114
- ### 异常处理
115
-
116
- | 场景 | 策略 |
117
- |------|------|
118
- | 需求不清晰 | 标记 `[NEEDS CLARIFICATION]` → 运行 /prizmkit-clarify |
119
- | 任务无法原子化 | 标记为复合任务 → 分配给单个 Dev → 在描述中说明分步 |
120
- | 循环依赖 | 重新设计模块边界 → 引入接口抽象层打破循环 |
121
-
122
- ### 通信规则
123
-
124
- 允许 Agent 之间直接通信,但关键消息和结论必须通知 Coordinator。
125
- - 发送 COMPLETION_SIGNAL 标志规划完成
126
- - 接收 TASK_ASSIGNMENT 获取分配的工作
File without changes