prizmkit 1.1.196 → 1.1.198

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 (108) hide show
  1. package/bin/create-prizmkit.js +1 -7
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +1 -1
  4. package/bundled/adapters/antigravity/rules-adapter.js +1 -13
  5. package/bundled/adapters/claude/paths.js +0 -1
  6. package/bundled/adapters/claude/settings-adapter.js +3 -8
  7. package/bundled/adapters/codex/paths.js +0 -1
  8. package/bundled/adapters/codex/settings-adapter.js +1 -1
  9. package/bundled/adapters/cursor/assets/prizmkit-hook.cjs +1 -1
  10. package/bundled/adapters/cursor/rules-adapter.js +1 -13
  11. package/bundled/adapters/pi/paths.js +0 -1
  12. package/bundled/dev-pipeline/.env.example +2 -2
  13. package/bundled/dev-pipeline/README.md +6 -5
  14. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +2 -2
  15. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +15 -25
  16. package/bundled/dev-pipeline/prizmkit_runtime/iterate.py +1 -69
  17. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +1 -114
  18. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +2 -2
  19. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +78 -0
  20. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +4 -234
  21. package/bundled/dev-pipeline/prizmkit_runtime/status.py +0 -5
  22. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +9 -1
  23. package/bundled/dev-pipeline/scripts/feature_list_contract.py +0 -43
  24. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +15 -76
  25. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -112
  26. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +0 -13
  27. package/bundled/dev-pipeline/scripts/init-pipeline.py +0 -1
  28. package/bundled/dev-pipeline/scripts/prompt_framework.py +0 -79
  29. package/bundled/dev-pipeline/scripts/status_common.py +150 -4
  30. package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -2
  31. package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -2
  32. package/bundled/dev-pipeline/scripts/utils.py +6 -0
  33. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -5
  34. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -101
  35. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +0 -35
  36. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -52
  37. package/bundled/dev-pipeline/templates/feature-list-schema.json +0 -25
  38. package/bundled/dev-pipeline/templates/iterate/evaluate-prompt.md +5 -16
  39. package/bundled/dev-pipeline/templates/iterate/evaluation-schema.json +1 -58
  40. package/bundled/dev-pipeline/templates/iterate/headless-plan-prompt.md +1 -12
  41. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +0 -1
  42. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +0 -1
  43. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +2 -2
  44. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  45. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +1 -1
  46. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +0 -2
  47. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
  48. package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +0 -5
  49. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -2
  50. package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +1 -1
  51. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -3
  52. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
  53. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +3 -3
  54. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
  55. package/bundled/dev-pipeline/templates/sections/retrospective.md +3 -3
  56. package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +1 -1
  57. package/bundled/rules/USAGE.md +5 -19
  58. package/bundled/rules/general/coding-baseline.md +2 -2
  59. package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
  60. package/bundled/skills/_metadata.json +4 -4
  61. package/bundled/skills/app-planner/SKILL.md +1 -1
  62. package/bundled/skills/app-planner/references/generated-plan-review.md +1 -1
  63. package/bundled/skills/app-planner/references/rules-configuration.md +6 -7
  64. package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +2 -20
  65. package/bundled/skills/bug-planner/SKILL.md +5 -6
  66. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +1 -1
  67. package/bundled/skills/bug-planner/references/input-formats.md +2 -2
  68. package/bundled/skills/bug-planner/references/schema-validation.md +0 -1
  69. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +2 -9
  70. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +36 -25
  71. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +32 -26
  72. package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -25
  73. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +32 -26
  74. package/bundled/skills/feature-planner/SKILL.md +4 -10
  75. package/bundled/skills/feature-planner/references/completeness-review.md +2 -2
  76. package/bundled/skills/feature-planner/references/new-project-planning.md +0 -1
  77. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -25
  78. package/bundled/skills/iterate-pipeline-launcher/SKILL.md +53 -42
  79. package/bundled/skills/iterate-pipeline-launcher/references/configuration.md +47 -43
  80. package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
  81. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +2 -2
  82. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  83. package/bundled/skills/prizmkit-init/SKILL.md +6 -7
  84. package/bundled/skills/prizmkit-init/references/config-schema.md +5 -9
  85. package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +1 -1
  86. package/bundled/skills/prizmkit-plan/SKILL.md +1 -1
  87. package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
  88. package/bundled/skills/prizmkit-retrospective/references/rule-evolution-steps.md +11 -17
  89. package/bundled/skills/prizmkit-workflow/SKILL.md +6 -3
  90. package/bundled/skills/prizmkit-workflow/references/cold-start-rules.md +8 -7
  91. package/bundled/templates/project-memory-template.md +2 -1
  92. package/package.json +1 -1
  93. package/src/clean.js +29 -7
  94. package/src/config.js +29 -48
  95. package/src/index.js +2 -9
  96. package/src/manifest.js +5 -9
  97. package/src/platforms.js +0 -14
  98. package/src/prompts.js +0 -13
  99. package/src/scaffold.js +100 -327
  100. package/src/upgrade.js +38 -42
  101. package/bundled/adapters/claude/rules-adapter.js +0 -25
  102. package/bundled/adapters/codebuddy/rules-adapter.js +0 -30
  103. package/bundled/adapters/codex/rules-adapter.js +0 -30
  104. package/bundled/adapters/pi/rules-adapter.js +0 -13
  105. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +0 -10
  106. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -111
  107. package/bundled/skills/bug-planner/references/verification.md +0 -26
  108. package/bundled/skills/feature-planner/references/browser-interaction.md +0 -39
package/src/upgrade.js CHANGED
@@ -20,17 +20,18 @@ import {
20
20
  import {
21
21
  installSkills,
22
22
  installSettings,
23
+ installBuiltinRules,
23
24
  installPipeline,
24
25
  installPrizmkitScripts,
25
26
  installGitHook,
26
27
  installProjectMemory,
28
+ removeLegacyPlatformBuiltinRules,
27
29
  resolvePipelineFileList,
28
30
  findStaleManagedPipelineFiles,
29
31
  removeStaleManagedPipelineFiles,
30
32
  resolveRuleNamesForRuntime,
31
33
  resolveSkillList,
32
34
  removeRetiredAgentTeamArtifacts,
33
- EXTRAS_REGISTRY,
34
35
  } from './scaffold.js';
35
36
  import { canonicalizePlatformSelection, expandPlatforms, isKnownPlatform, PLATFORM_IDS, platformLabel, resolvePayloadPlatforms, uniquePlatforms, unknownPlatformMessage } from './platforms.js';
36
37
  import { normalizeRuntime, runtimeLabel } from './runtimes.js';
@@ -228,6 +229,22 @@ export async function reconcileDroppedPayloadPlatformRules(projectRoot, {
228
229
  });
229
230
  }
230
231
 
232
+ export async function removeBuiltinRuleFiles(projectRoot, ruleFileNames, dryRun) {
233
+ const builtinDir = path.join(projectRoot, '.prizmkit', 'rules', 'builtin');
234
+ for (const fileName of ruleFileNames) {
235
+ const baseName = path.basename(fileName);
236
+ const filePath = path.join(builtinDir, baseName);
237
+ if (await fs.pathExists(filePath)) {
238
+ if (dryRun) {
239
+ console.log(chalk.gray(` [dry-run] remove ${path.relative(projectRoot, filePath)}`));
240
+ } else {
241
+ await fs.remove(filePath);
242
+ console.log(chalk.red(` ✗ removed ${path.relative(projectRoot, filePath)}`));
243
+ }
244
+ }
245
+ }
246
+ }
247
+
231
248
  /**
232
249
  * Remove rule files for a specific platform.
233
250
  */
@@ -322,7 +339,6 @@ export async function runUpgrade(directory, options = {}) {
322
339
  // 3. Resolve new skill list and built-in rules (migrating legacy minimal suites/presets)
323
340
  const suite = 'core';
324
341
  const runtime = normalizeRuntime(oldManifest?.runtime);
325
- const pipeline = oldManifest?.options?.pipeline ?? true;
326
342
  const rulesPreset = 'recommended';
327
343
  const aiCli = userConfig.ai_cli || oldManifest?.options?.aiCli || '';
328
344
 
@@ -372,14 +388,7 @@ export async function runUpgrade(directory, options = {}) {
372
388
  const newRuleFiles = resolveRuleNamesForRuntime(rulesMeta, runtime).map(name => `${name}.md`);
373
389
 
374
390
  // Resolve pipeline file list from source (for manifest diff)
375
- const newPipelineFiles = pipeline ? resolvePipelineFileList(runtime) : [];
376
-
377
- // Resolve extras: merge old manifest extras + default extras for old manifests without the field
378
- const extrasToInstall = [...new Set([
379
- ...(oldManifest?.files?.extras || []),
380
- // Old manifests without extras field: default to all registered extras
381
- ...(!oldManifest?.files?.extras ? Object.keys(EXTRAS_REGISTRY) : []),
382
- ])].filter(name => EXTRAS_REGISTRY[name]); // only keep extras that still exist in registry
391
+ const newPipelineFiles = resolvePipelineFileList(runtime);
383
392
 
384
393
  const payloadPlatforms = resolvePayloadPlatforms(platform, aiCli);
385
394
 
@@ -394,7 +403,6 @@ export async function runUpgrade(directory, options = {}) {
394
403
  pipeline: newPipelineFiles,
395
404
  aiCli,
396
405
  rulesPreset,
397
- extras: extrasToInstall,
398
406
  payloadPlatforms,
399
407
  });
400
408
 
@@ -403,12 +411,10 @@ export async function runUpgrade(directory, options = {}) {
403
411
  newManifest.installedAt = oldManifest.installedAt;
404
412
  }
405
413
 
406
- const diff = oldManifest ? diffManifest(oldManifest, newManifest) : { skills: { added: [], removed: [] }, rules: { added: [], removed: [] }, pipeline: { added: [], removed: [] }, extras: { added: [], removed: [] } };
414
+ const diff = oldManifest ? diffManifest(oldManifest, newManifest) : { skills: { added: [], removed: [] }, rules: { added: [], removed: [] }, pipeline: { added: [], removed: [] } };
407
415
  const removedPipelineSet = new Set(diff.pipeline.removed);
408
- const staleManagedPipelineFiles = pipeline
409
- ? (await findStaleManagedPipelineFiles(projectRoot, runtime))
410
- .filter(file => !removedPipelineSet.has(file))
411
- : [];
416
+ const staleManagedPipelineFiles = (await findStaleManagedPipelineFiles(projectRoot, runtime))
417
+ .filter(file => !removedPipelineSet.has(file));
412
418
 
413
419
  // 5. Display upgrade summary
414
420
  const oldVersion = oldManifest?.version || 'unknown';
@@ -419,8 +425,8 @@ export async function runUpgrade(directory, options = {}) {
419
425
  console.log(` Suite: ${suite}`);
420
426
  console.log('');
421
427
 
422
- const totalAdded = diff.skills.added.length + diff.rules.added.length + diff.pipeline.added.length + diff.extras.added.length;
423
- const totalRemoved = diff.skills.removed.length + diff.rules.removed.length + diff.pipeline.removed.length + diff.extras.removed.length + staleManagedPipelineFiles.length;
428
+ const totalAdded = diff.skills.added.length + diff.rules.added.length + diff.pipeline.added.length;
429
+ const totalRemoved = diff.skills.removed.length + diff.rules.removed.length + diff.pipeline.removed.length + staleManagedPipelineFiles.length;
424
430
  const totalUpdated = newSkillList.length + newRuleFiles.length;
425
431
 
426
432
  if (diff.skills.added.length) console.log(chalk.green(` + Skills added: ${diff.skills.added.join(', ')}`));
@@ -430,8 +436,6 @@ export async function runUpgrade(directory, options = {}) {
430
436
  if (diff.pipeline.added.length) console.log(chalk.green(` + Pipeline files added: ${diff.pipeline.added.length} file(s)`));
431
437
  if (diff.pipeline.removed.length) console.log(chalk.red(` - Pipeline files removed: ${diff.pipeline.removed.length} file(s)`));
432
438
  if (staleManagedPipelineFiles.length) console.log(chalk.red(` - Stale managed pipeline files: ${staleManagedPipelineFiles.length} file(s)`));
433
- if (diff.extras.added.length) console.log(chalk.green(` + Extras added: ${diff.extras.added.join(', ')}`));
434
- if (diff.extras.removed.length) console.log(chalk.red(` - Extras removed: ${diff.extras.removed.join(', ')}`));
435
439
 
436
440
  if (totalAdded === 0 && totalRemoved === 0 && oldVersion === pkg.version) {
437
441
  console.log(chalk.gray(' No changes detected. Re-installing all files to ensure consistency.'));
@@ -465,10 +469,10 @@ export async function runUpgrade(directory, options = {}) {
465
469
  }
466
470
  console.log(chalk.blue(`\n Removed retired agent/team artifacts (${p}):`));
467
471
  await removeRetiredAgentTeamArtifacts(p, projectRoot, dryRun);
468
- if (diff.rules.removed.length) {
469
- console.log(chalk.blue(`\n Removed rules (${p}):`));
470
- await removeRuleFiles(p, projectRoot, diff.rules.removed, dryRun);
471
- }
472
+ }
473
+ if (diff.rules.removed.length) {
474
+ console.log(chalk.blue('\n Removed built-in rules:'));
475
+ await removeBuiltinRuleFiles(projectRoot, diff.rules.removed, dryRun);
472
476
  }
473
477
  if (diff.pipeline.removed.length) {
474
478
  console.log(chalk.blue('\n Removed pipeline files:'));
@@ -491,30 +495,22 @@ export async function runUpgrade(directory, options = {}) {
491
495
  console.log(chalk.blue(' Skills:'));
492
496
  await installSkills(p, newSkillList, projectRoot, dryRun, runtime);
493
497
 
494
- // Settings/Rules
495
- console.log(chalk.blue('\n Settings & Rules:'));
498
+ // Settings/Hooks
499
+ console.log(chalk.blue('\n Settings & Hooks:'));
496
500
  await installSettings(p, projectRoot, {}, dryRun, runtime);
497
501
 
498
502
  console.log('');
499
503
  }
500
504
 
501
- // Pipeline (with forceOverwrite)
502
- if (pipeline) {
503
- console.log(chalk.blue(' Pipeline:'));
504
- await installPipeline(projectRoot, dryRun, { forceOverwrite: true, runtime });
505
- console.log('');
506
- }
505
+ console.log(chalk.blue(' Built-in Rules:'));
506
+ await installBuiltinRules(projectRoot, dryRun, runtime);
507
+ await removeLegacyPlatformBuiltinRules(projectRoot, rulesMeta, oldManifest, dryRun);
508
+ console.log('');
507
509
 
508
- // Extras (external tools via registry)
509
- if (extrasToInstall.length > 0) {
510
- for (const extraName of extrasToInstall) {
511
- const entry = EXTRAS_REGISTRY[extraName];
512
- if (!entry) continue;
513
- console.log(chalk.blue(` ${entry.label}:`));
514
- await entry.install(projectRoot, dryRun, { platform, aiCli });
515
- console.log('');
516
- }
517
- }
510
+ // Pipeline (with forceOverwrite)
511
+ console.log(chalk.blue(' Pipeline:'));
512
+ await installPipeline(projectRoot, dryRun, { forceOverwrite: true, runtime });
513
+ console.log('');
518
514
 
519
515
  // Git hook
520
516
  console.log(chalk.blue(' Git Hook:'));
@@ -1,25 +0,0 @@
1
- /**
2
- * Claude Code Rules Adapter
3
- * Generates .claude/rules/ files for PrizmKit-enabled projects.
4
- * Rules provide modular, path-scoped instructions for Claude Code.
5
- */
6
-
7
- import { mkdirSync } from 'node:fs';
8
- import { writeFile } from 'node:fs/promises';
9
- import path from 'path';
10
-
11
- /**
12
- * Install PrizmKit rules to the target project's .claude/rules/ directory.
13
- * @param {string} targetRoot - Target project root
14
- * @param {Array<{name: string, content: string}>} ruleFiles - Rules to install
15
- */
16
- export async function installRules(targetRoot, ruleFiles) {
17
- const rulesDir = path.join(targetRoot, '.claude', 'rules');
18
- mkdirSync(rulesDir, { recursive: true });
19
-
20
- for (const rule of ruleFiles) {
21
- // Use the basename (after /) as the filename
22
- const baseName = rule.name.includes('/') ? rule.name.split('/').pop() : rule.name;
23
- await writeFile(path.join(rulesDir, `${baseName}.md`), rule.content);
24
- }
25
- }
@@ -1,30 +0,0 @@
1
- /**
2
- * CodeBuddy Rules Adapter
3
- * Installs .codebuddy/rules/*.mdc files for PrizmKit-enabled projects.
4
- */
5
- import { mkdirSync } from 'node:fs';
6
- import { writeFile } from 'node:fs/promises';
7
- import path from 'path';
8
-
9
- export async function installRules(targetRoot, ruleFiles) {
10
- // ruleFiles: [{ name: 'prizm/prizm-documentation', content: '...' }, ...]
11
- const rulesDir = path.join(targetRoot, '.codebuddy', 'rules');
12
- mkdirSync(rulesDir, { recursive: true });
13
-
14
- for (const rule of ruleFiles) {
15
- const mdcContent = convertToMdc(rule.content, rule.name);
16
- // Use the basename (after /) as the filename
17
- const baseName = rule.name.includes('/') ? rule.name.split('/').pop() : rule.name;
18
- await writeFile(path.join(rulesDir, `${baseName}.mdc`), mdcContent);
19
- }
20
- }
21
-
22
- function convertToMdc(mdContent, name) {
23
- // Strip existing frontmatter from .md, build .mdc frontmatter
24
- const bodyMatch = mdContent.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
25
- const descMatch = mdContent.match(/description:\s*"([^"]+)"/);
26
- const body = bodyMatch ? bodyMatch[1] : mdContent;
27
- const description = descMatch ? descMatch[1] : name;
28
-
29
- return `---\ndescription: ${description}\nalwaysApply: true\nenabled: true\nupdatedAt: ${new Date().toISOString()}\nprovider: \n---\n${body}`;
30
- }
@@ -1,30 +0,0 @@
1
- /**
2
- * Codex Rules Adapter
3
- *
4
- * PrizmKit rules are behavioral Markdown guidance, not Codex execpolicy
5
- * .rules files. Install them as project-local guidance resources and point
6
- * AGENTS.md to this directory.
7
- */
8
-
9
- import { mkdirSync, rmSync } from 'node:fs';
10
- import { writeFile } from 'node:fs/promises';
11
- import path from 'path';
12
-
13
- export const CODEX_RULES_DIR = '.agents/rules';
14
-
15
- export async function installRules(targetRoot, ruleFiles) {
16
- const rulesDir = path.join(targetRoot, CODEX_RULES_DIR);
17
- mkdirSync(rulesDir, { recursive: true });
18
-
19
- for (const rule of ruleFiles) {
20
- const baseName = rule.name.includes('/') ? rule.name.split('/').pop() : rule.name;
21
- await writeFile(path.join(rulesDir, `${baseName}.md`), rule.content);
22
- }
23
- }
24
-
25
- export function removeLegacyCodexRules(targetRoot, ruleFileNames) {
26
- const legacyRulesDir = path.join(targetRoot, '.codex', 'rules');
27
- for (const fileName of ruleFileNames) {
28
- rmSync(path.join(legacyRulesDir, path.basename(fileName)), { force: true });
29
- }
30
- }
@@ -1,13 +0,0 @@
1
- /** Install behavioral Markdown guidance for Pi project sessions. */
2
- import { mkdirSync } from 'node:fs';
3
- import { writeFile } from 'node:fs/promises';
4
- import path from 'node:path';
5
-
6
- export async function installRules(targetRoot, ruleFiles) {
7
- const rulesDir = path.join(targetRoot, '.pi', 'rules');
8
- mkdirSync(rulesDir, { recursive: true });
9
- for (const rule of ruleFiles) {
10
- const baseName = path.basename(rule.name);
11
- await writeFile(path.join(rulesDir, `${baseName}.md`), rule.content);
12
- }
13
- }
@@ -1,10 +0,0 @@
1
- ### Manual / Hybrid Verification Gate
2
-
3
- `verification_type` is `{{VERIFICATION_TYPE}}`.
4
-
5
- The pipeline session is always headless and must complete manual/hybrid verification automatically. Do not ask for a user, wait for UAT, or stop as `partial`.
6
-
7
- 1. Select the available non-interactive verification path: browser tooling, CLI/API checks, fixtures, project test commands, or another deterministic local check.
8
- 2. Cover the reported behavior and acceptance criteria; for browser-visible behavior, capture both the original reproduction and post-fix result when the configured tooling is available.
9
- 3. Record the selected verification method, commands/tool, inputs, outputs, limitations, and evidence paths in `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` and the session/checkpoint metadata.
10
- 4. Continue through the authoritative `prizmkit-test` gate, `/prizmkit-retrospective`, and `/prizmkit-committer` when all gates pass. If required verification evidence is missing or blocked, run `{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step manual-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason manual_verification_blocked`, write `failure-log.md`, and stop rather than requesting user input or fabricating a pass.
@@ -1,111 +0,0 @@
1
- ### Browser Verification (playwright-cli) — MANDATORY
2
-
3
- You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without actually running playwright-cli.
4
-
5
- **CRITICAL CONSTRAINT — playwright-cli ONLY, NO Playwright MCP**:
6
- - You MUST use `playwright-cli` (the CLI tool) for ALL browser interactions in this phase
7
- - **NEVER** use Playwright MCP server, Playwright MCP tools, or any MCP-based browser automation
8
- - If you have Playwright MCP configured, IGNORE it entirely — use the CLI command `playwright-cli` exclusively
9
- - All browser actions go through `playwright-cli <command>` via the shell/terminal command tool, not through any MCP tool call
10
-
11
- **Step 0 — Playwright CLI Readiness Check (BLOCKING — must pass before any browser action)**:
12
-
13
- 0a. Check if `playwright-cli` is installed using the runtime helper:
14
- ```bash
15
- {{RUNTIME_HELPER_CMD}} executable version playwright-cli --arg=--version
16
- ```
17
- If output is `NOT_INSTALLED`, install it:
18
- ```bash
19
- npm install -g @playwright/cli@latest
20
- ```
21
- Then verify installation succeeded:
22
- ```bash
23
- {{RUNTIME_HELPER_CMD}} executable version playwright-cli --arg=--version
24
- ```
25
- If installation fails, log the error in context-snapshot.md under `## Browser Verification: SKIPPED — playwright-cli installation failed` and proceed to the next phase. Do NOT attempt browser verification without playwright-cli.
26
-
27
- 0b. Learn playwright-cli usage (run once per session to understand available commands):
28
- ```bash
29
- playwright-cli --help
30
- ```
31
- Use this output to determine the correct commands for your verification steps. Do NOT guess command syntax — refer to the help output.
32
-
33
- 0c. Check if playwright-cli skill is installed for the current AI platform:
34
- ```bash
35
- {{RUNTIME_HELPER_CMD}} platform skill playwright-cli --prefix
36
- ```
37
- If `SKILL_MISSING`: run `playwright-cli install --skills`. If current platform is NOT claude, copy the installed skill from the Claude user skills directory to the path shown by the helper output for the current platform.
38
-
39
- 0d. Read the installed playwright-cli skill for workflow guidance:
40
- After skill installation, read the skill's SKILL.md to understand recommended workflows and patterns. Use these patterns to construct your verification flow — do NOT invent your own patterns if the skill provides them.
41
-
42
- **Step 1 — Start Dev Server**:
43
-
44
- You know this project's tech stack. Detect and start the dev server yourself:
45
-
46
- 1. Identify the dev server start command from project config (`package.json` scripts, `Makefile`, `docker-compose.yml`, etc.)
47
- 2. Use the pre-detected port if available, otherwise determine the dev server port from project config. Do NOT hardcode or guess the port. Record it as `DEV_PORT` in your notes.
48
- 3. Verify the port is available:
49
- ```bash
50
- {{RUNTIME_HELPER_CMD}} port check {{DEV_PORT}}
51
- ```
52
- 4. Start the dev server with the runtime helper and capture a PID file:
53
- ```bash
54
- {{RUNTIME_HELPER_CMD}} process start --pid-file .prizmkit/state/browser-dev-server.pid -- <start-command tokens>
55
- ```
56
- 5. Wait for server to be ready:
57
- ```bash
58
- {{RUNTIME_HELPER_CMD}} web wait-ready --url http://localhost:{{DEV_PORT}} --timeout 30 --interval 2
59
- ```
60
- 6. Open the app in playwright-cli: `playwright-cli open http://localhost:{{DEV_PORT}}`
61
- 7. If the page requires authentication, use playwright-cli to register a test user and log in first
62
-
63
- **Step 2 — Verification**:
64
-
65
- Use `playwright-cli snapshot` on the running app to discover actual element refs, then verify these goals:
66
- {{BROWSER_VERIFY_STEPS}}
67
-
68
- Construct your verification workflow based on:
69
- 1. The playwright-cli skill documentation (read in Step 0d)
70
- 2. The `playwright-cli --help` output (captured in Step 0b)
71
- 3. The current task's Verification Gates and implemented features
72
-
73
- Decide the concrete playwright-cli actions (click, fill, snapshot, screenshot, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW using playwright-cli commands.
74
-
75
- Take a final screenshot for evidence: `playwright-cli screenshot`
76
-
77
- **Step 3 — Cleanup (REQUIRED — you started it, you stop it)**:
78
-
79
- 1. Close the playwright-cli browser: `playwright-cli close`
80
- 2. Stop the dev server process using the PID file written in Step 1:
81
- ```bash
82
- {{RUNTIME_HELPER_CMD}} process cleanup-pid <pid-from-.prizmkit/state/browser-dev-server.pid>
83
- ```
84
- 3. Verify port is released:
85
- ```bash
86
- {{RUNTIME_HELPER_CMD}} port check {{DEV_PORT}}
87
- ```
88
-
89
- **Step 4 — Reporting**:
90
-
91
- Append results to `context-snapshot.md`:
92
- ```
93
- ## Browser Verification
94
- URL: http://localhost:<DEV_PORT>
95
- Dev Server Command: <actual command used>
96
- playwright-cli version: <version>
97
- Steps executed: [list of playwright-cli commands used]
98
- Screenshot: [path]
99
- Result: PASS / FAIL (reason)
100
- Server cleanup: confirmed
101
- Browser cleanup: confirmed
102
- ```
103
-
104
- Browser blocking policy: `{{BROWSER_BLOCKING}}`.
105
-
106
- If verification fails:
107
- - If `{{BROWSER_BLOCKING}}` is `true`: update checkpoint step `browser-verification` to failed with terminal `WORKFLOW_BLOCKED` (`{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason browser_verification_failed`), write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
108
- - If `{{BROWSER_BLOCKING}}` is `false`: log the failure details, mark checkpoint step `browser-verification` according to the evidence, clean up the dev server/browser, and continue.
109
-
110
- You MUST attempt verification and MUST clean up the dev server in both cases.
111
-
@@ -1,26 +0,0 @@
1
- # Bug Verification Guidance
2
-
3
- ## Verification Defaults
4
-
5
- All bug fixes need verification that matches severity, reproduction clarity, and risk.
6
-
7
- | Severity | Default verification expectation | Rationale |
8
- |---|---|---|
9
- | critical | Automated or hybrid verification with explicit regression coverage | Crash/data-loss/security bugs need durable proof. |
10
- | high | Automated or hybrid verification for the broken core path | Core-feature failures need regression protection. |
11
- | medium | Focused automated or manual verification | Workaround cases need proof without over-scoping. |
12
- | low | Smallest meaningful check | Cosmetic or minor edge cases should stay lightweight. |
13
-
14
- ## Verification Type
15
-
16
- - `automated`: use when a unit, integration, or E2E test can reliably reproduce the bug and prove the fix.
17
- - `manual`: use when reproduction needs external state or human judgment and no stable automated check is practical.
18
- - `hybrid`: use when automated regression coverage is possible but final confidence needs manual/browser confirmation.
19
-
20
- ## Browser Verification
21
-
22
- Qualifying UI-reproducible bugs default directly to `browser_interaction` with `tool: "playwright-cli"`. Include affected bugs in the batch summary so the user can opt out specific items or override `verify_steps`/`blocking` per item.
23
-
24
- - `tool`: `"playwright-cli"` (default and sole supported tool for local dev-server verification in an isolated browser).
25
- - `blocking`: optional boolean (default `false`) controlling whether browser verification failure blocks commit.
26
- - `verify_steps`: describe what to prove, not low-level click scripts.
@@ -1,39 +0,0 @@
1
- # Browser Interaction Planning
2
-
3
- For web apps with UI, features that involve user-facing pages or interactive flows receive a `browser_interaction` field by default. This enables the dev-pipeline to verify UI behavior automatically after implementation using `playwright-cli`.
4
-
5
- ## How to Capture
6
-
7
- During Phase 4.2, auto-generate `browser_interaction` with `tool: "playwright-cli"` for all qualifying features (see `SKILL.md` §Browser Interaction Planning for auto-detection rules) — do NOT prompt for browser tool selection or ask per feature.
8
-
9
- Present a **batch summary** to the user showing which features received `browser_interaction`. In that summary, the user can opt out specific features or override `verify_steps` / `blocking` per item.
10
-
11
- For each qualifying feature, generate the `browser_interaction` object:
12
-
13
- ```json
14
- {
15
- "browser_interaction": {
16
- "tool": "playwright-cli",
17
- "verify_steps": [
18
- "Verify login form renders with email and password fields",
19
- "Verify valid credentials redirect to dashboard",
20
- "Verify invalid password shows error message"
21
- ]
22
- }
23
- }
24
- ```
25
-
26
- ## Field Rules
27
-
28
- - `tool`: Always `"playwright-cli"` (the default and sole supported browser verification tool, using an isolated local browser against the project's dev server).
29
- - `blocking`: Optional boolean (defaults to `false` when omitted). Set to `true` only when a browser verification failure must block commit.
30
- - `verify_steps` are **verification goals**, not specific tool commands. Describe WHAT to verify, not HOW to verify it. The pipeline AI will:
31
- 1. Auto-detect the dev server start command from project config (`package.json`, `Makefile`, etc.)
32
- 2. Start the server and discover the URL/port at runtime
33
- 3. Use `playwright-cli snapshot` to discover real element refs
34
- 4. Decide the concrete click/fill/assert operations itself
35
- This works better than prescribing URLs/commands at planning time because: (1) ports may differ across environments, (2) element refs don't exist yet, (3) UI structure may change during implementation, (4) the AI has full context of the actual code when it runs verification.
36
- - **Good**: `"Verify login form accepts valid credentials and redirects to dashboard"`
37
- - **Bad**: `"click <ref> — click login button"` (guesses at refs that don't exist yet)
38
- - Do NOT specify `url`, `setup_command`, or `port` — the AI detects these at runtime from the actual project configuration.
39
- - An empty `browser_interaction: {}` object (no `verify_steps`) is valid — it defaults to `tool: "playwright-cli"` and the AI explores the app to verify the feature works as expected.