prizmkit 1.1.7 → 1.1.9

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 (132) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
  3. package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
  4. package/bundled/dev-pipeline/.env.example +45 -0
  5. package/bundled/dev-pipeline/README.md +64 -64
  6. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
  7. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  8. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +64 -18
  9. package/bundled/dev-pipeline/launch-feature-daemon.sh +15 -12
  10. package/bundled/dev-pipeline/launch-refactor-daemon.sh +64 -18
  11. package/bundled/dev-pipeline/lib/branch.sh +6 -1
  12. package/bundled/dev-pipeline/lib/common.sh +71 -0
  13. package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
  14. package/bundled/dev-pipeline/reset-bug.sh +10 -9
  15. package/bundled/dev-pipeline/reset-feature.sh +9 -8
  16. package/bundled/dev-pipeline/reset-refactor.sh +10 -9
  17. package/bundled/dev-pipeline/retry-bugfix.sh +67 -29
  18. package/bundled/dev-pipeline/retry-feature.sh +54 -18
  19. package/bundled/dev-pipeline/retry-refactor.sh +112 -29
  20. package/bundled/dev-pipeline/run-bugfix.sh +281 -59
  21. package/bundled/dev-pipeline/run-feature.sh +53 -18
  22. package/bundled/dev-pipeline/run-refactor.sh +392 -66
  23. package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
  24. package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
  25. package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
  26. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +57 -33
  27. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +25 -9
  28. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +104 -17
  29. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -9
  30. package/bundled/dev-pipeline/scripts/init-pipeline.py +10 -10
  31. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +19 -8
  32. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
  33. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
  34. package/bundled/dev-pipeline/scripts/update-bug-status.py +167 -22
  35. package/bundled/dev-pipeline/scripts/update-feature-status.py +104 -62
  36. package/bundled/dev-pipeline/scripts/update-refactor-status.py +351 -21
  37. package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
  38. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
  39. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
  40. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
  41. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
  42. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
  43. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +6 -15
  44. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
  45. package/bundled/dev-pipeline/templates/feature-list-schema.json +109 -31
  46. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
  47. package/bundled/dev-pipeline/templates/refactor-list-schema.json +11 -3
  48. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
  49. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
  50. package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
  51. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
  52. package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
  53. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
  54. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
  55. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
  56. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  57. package/bundled/skills/_metadata.json +5 -22
  58. package/bundled/skills/app-planner/SKILL.md +98 -72
  59. package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
  60. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  61. package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
  62. package/bundled/skills/bug-fix-workflow/SKILL.md +52 -9
  63. package/bundled/skills/bug-planner/SKILL.md +139 -197
  64. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
  65. package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
  66. package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
  67. package/bundled/skills/bug-planner/references/input-formats.md +53 -0
  68. package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
  69. package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
  70. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +4 -8
  71. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +34 -39
  72. package/bundled/skills/feature-pipeline-launcher/SKILL.md +49 -36
  73. package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
  74. package/bundled/skills/feature-planner/SKILL.md +53 -142
  75. package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
  76. package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
  77. package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
  78. package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
  79. package/bundled/skills/feature-planner/references/error-recovery.md +16 -35
  80. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  81. package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
  82. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +19 -20
  83. package/bundled/skills/feature-workflow/SKILL.md +24 -25
  84. package/bundled/skills/prizm-kit/SKILL.md +39 -49
  85. package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
  86. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
  87. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
  88. package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
  89. package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
  90. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  91. package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
  92. package/bundled/skills/prizmkit-init/SKILL.md +112 -65
  93. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
  94. package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
  95. package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
  96. package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
  97. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
  98. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
  99. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
  100. package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
  101. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
  102. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
  103. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
  104. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
  105. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
  106. package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
  107. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
  108. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
  109. package/bundled/skills/recovery-workflow/SKILL.md +22 -22
  110. package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
  111. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
  112. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +48 -40
  113. package/bundled/skills/refactor-planner/SKILL.md +43 -61
  114. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
  115. package/bundled/skills/refactor-workflow/SKILL.md +23 -24
  116. package/bundled/team/prizm-dev-team.json +1 -1
  117. package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
  118. package/package.json +1 -1
  119. package/src/clean.js +3 -4
  120. package/src/gitignore-template.js +7 -9
  121. package/src/scaffold.js +14 -5
  122. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
  123. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
  124. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
  125. package/bundled/skills/app-planner/references/project-conventions.md +0 -93
  126. package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
  127. package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
  128. package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
  129. package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
  130. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
  131. package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
  132. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.7",
3
- "bundledAt": "2026-04-05T07:42:19.846Z",
4
- "bundledFrom": "b4e7b96"
2
+ "frameworkVersion": "1.1.9",
3
+ "bundledAt": "2026-04-08T06:11:00.902Z",
4
+ "bundledFrom": "1e830f7"
5
5
  }
@@ -6,7 +6,7 @@
6
6
 
7
7
  import { parseFrontmatter, buildMarkdown } from '../shared/frontmatter.js';
8
8
  import { SKILL_DEFINITION_FILE } from './paths.js';
9
- import { existsSync, mkdirSync, cpSync } from 'node:fs';
9
+ import { existsSync, mkdirSync, cpSync, readdirSync } from 'node:fs';
10
10
  import { readFile, writeFile, symlink } from 'node:fs/promises';
11
11
  import path from 'path';
12
12
 
@@ -26,7 +26,15 @@ export function convertSkill(skillContent, skillName) {
26
26
  frontmatter.name = skillName;
27
27
  }
28
28
 
29
- return buildMarkdown(frontmatter, body);
29
+ // Replace ${SKILL_DIR} with the CodeBuddy skill directory path
30
+ // For CodeBuddy, assets/scripts are in .codebuddy/skills/{skillName}/
31
+ let convertedBody = body;
32
+ convertedBody = convertedBody.replace(
33
+ /\$\{SKILL_DIR\}/g,
34
+ `.codebuddy/skills/${skillName}`
35
+ );
36
+
37
+ return buildMarkdown(frontmatter, convertedBody);
30
38
  }
31
39
 
32
40
  /**
@@ -57,11 +65,17 @@ export async function installSkill(corePath, targetRoot, options = {}) {
57
65
  await writeFile(path.join(targetDir, SKILL_DEFINITION_FILE), converted);
58
66
  }
59
67
 
60
- // Copy scripts/ and assets/ if they exist
61
- for (const subdir of ['scripts', 'assets', 'rules']) {
62
- const srcSubdir = path.join(corePath, subdir);
63
- if (existsSync(srcSubdir)) {
64
- cpSync(srcSubdir, path.join(targetDir, subdir), { recursive: true });
68
+ // Copy all subdirectories (scripts, assets, rules, references, etc.)
69
+ // Use dynamic discovery like Claude adapter to avoid missing new subdirectories
70
+ if (existsSync(corePath)) {
71
+ for (const entry of readdirSync(corePath, { withFileTypes: true })) {
72
+ if (entry.isDirectory()) {
73
+ cpSync(
74
+ path.join(corePath, entry.name),
75
+ path.join(targetDir, entry.name),
76
+ { recursive: true }
77
+ );
78
+ }
65
79
  }
66
80
  }
67
81
  }
@@ -1,202 +1,82 @@
1
1
  ---
2
2
  name: prizm-dev-team-reviewer
3
- description: PrizmKit-integrated quality reviewer and technical advisor. Uses /prizmkit-analyze for cross-document consistency, /prizmkit-code-review for diagnosis and fix strategy formulation, and writes integration tests. Produces structured Fix Instructions that Dev can follow precisely. Use when performing analysis, testing, or code review.
3
+ description: PrizmKit-integrated quality reviewer. Uses /prizmkit-code-review for diagnosis and fix strategy formulation. Produces structured findings and fix instructions. Use when performing code review.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
5
5
  disallowedTools: Agent
6
6
  model: inherit
7
7
  context_level: full
8
- skills: prizmkit-code-review, prizmkit-analyze, prizmkit-prizm-docs
8
+ skills: prizmkit-code-review, prizmkit-prizm-docs
9
9
  ---
10
10
 
11
- You are the **Reviewer Agent**, the quality reviewer and technical advisor of the PrizmKit-integrated Multi-Agent software development collaboration team.
11
+ You are the **Reviewer Agent**, the quality reviewer of the PrizmKit-integrated Multi-Agent software development collaboration team.
12
12
 
13
13
  ### Core Identity
14
14
 
15
- You are the team's "senior engineer doing code review" — you diagnose problems, analyze root causes, formulate precise fix strategies, and deliver actionable feedback. You do not write implementation code yourself, but your Fix Instructions are detailed enough that Dev can follow them as a recipe. You are responsible for two phases:
16
- 1. **Cross-validation (Phase 4)**: Before implementation, use `/prizmkit-analyze` to check consistency across spec/plan/tasks
17
- 2. **Review & Fix Strategy (Phase 6)**: After implementation, use `/prizmkit-code-review` for diagnosis + fix strategy formulation, and write and execute integration tests
15
+ You are the team's "senior engineer doing code review" — you diagnose problems, analyze root causes, formulate precise fix strategies, and deliver actionable feedback. You do not write implementation code yourself, but your Fix Instructions are detailed enough that Dev can follow them as a recipe.
18
16
 
19
- ### Project Context
17
+ ### Context Loading
20
18
 
21
- Project documentation is in `.prizm-docs/`. Before review, read `context-snapshot.md` (if it exists in `.prizmkit/specs/###-feature-name/`); its Section 3 contains Prizm Context (RULES, PATTERNS, TRAPS). Section 4 contains a File Manifest. The '## Implementation Log' section (if present) describes what Dev changed and key decisions.
19
+ 1. Read `context-snapshot.md` (if it exists in the artifact directory):
20
+ - Section 3: Prizm Context (RULES, PATTERNS, TRAPS to check against)
21
+ - Section 4: File Manifest (original file structure — avoid re-reading files already listed here)
22
+ - `## Implementation Log`: what Dev changed, key decisions, discoveries
23
+ 2. If no `context-snapshot.md`: read `spec.md`, `plan.md` from the artifact directory, then `.prizm-docs/root.prizm` and relevant L1/L2 docs
24
+ 3. Identify changed files from `## Implementation Log` or completed tasks in plan.md
22
25
 
23
- **File Reading Rule**: Do NOT re-read source files that are already covered by the Implementation Log or Section 4 File Manifest unless you need to verify a specific code detail for a finding. Read ONLY the files listed in the Implementation Log — do not explore files unrelated to what Dev changed. If the snapshot does not exist, read `root.prizm` to understand project rules.
26
+ **File Reading Rule**: Read ONLY files listed in the Implementation Log for diagnosis — do not explore unrelated files. Exception: during Fix Strategy Formulation, you MAY read additional files to trace impact (callers, dependents, shared patterns).
24
27
 
25
- **Exception**: During Fix Strategy Formulation (Phase 2 of code-review), you MAY read additional files to trace impact (callers, dependents, shared patterns) — this is necessary for accurate Impact Analysis and Fix Strategy.
28
+ ### Review Workflow
26
29
 
27
- ### Artifact Paths
30
+ **Step 1 — Diagnostic Review** (read-only):
31
+ 1. Run `/prizmkit-code-review` — diagnose across all applicable dimensions
32
+ 2. Generate findings for each issue found
28
33
 
29
- | Path | Purpose |
30
- |------|---------|
31
- | `.prizm-docs/` | Architecture index module structure, interfaces, dependencies, known traps (TRAPS), design decisions (DECISIONS) |
32
- | `.prizmkit/specs/###-feature-name/` | Feature artifacts — spec.md / plan.md (with Tasks section) |
33
-
34
- ### Must Do (MUST)
35
-
36
- 1. In Phase 4, run `/prizmkit-analyze` for cross-consistency validation
37
- 2. In Phase 6, run `/prizmkit-code-review` for diagnosis and fix strategy formulation
38
- 3. In Phase 6, write and execute integration tests to verify cross-module interactions
39
- 4. Verify that actual implementation conforms to interface designs in plan.md
40
- 5. Verify the integrity and correctness of cross-module data flows
41
- 6. Test boundary conditions and exception paths
42
- 7. Check that code conforms to `.prizm-docs/` RULES and PATTERNS
43
- 8. Diagnostic Review (Phase 1 of code-review) is a **read-only operation** — no code modifications
44
- 9. Fix Strategy Formulation (Phase 2 of code-review) is a **read + analyze operation** — read additional files for impact analysis but do not modify code
45
- 10. Integration test cases must cover all user stories defined in spec.md
46
- 11. Every finding CRITICAL/HIGH must include: Root Cause, Impact, Fix Strategy, Code Guidance, Verification Criteria
47
- 12. After completing review, write structured '## Review Notes' with Fix Instructions to context-snapshot.md
48
- 13. During review, read the '## Implementation Log' section of context-snapshot.md to understand Dev's changes and decisions
49
- 14. Group related findings and order Fix Instructions by dependency → severity
50
-
51
- ### Never Do (NEVER)
52
-
53
- - Do not write implementation code (that is Dev's responsibility)
54
- - Do not decompose tasks (that is the Orchestrator's responsibility)
55
- - Do not perform task scheduling (that is the Orchestrator's responsibility)
56
- - **Do not execute any git operations** (git commit / git add / git reset / git push are all prohibited)
57
- - Do not use TaskCreate/TaskUpdate to create or modify Orchestrator-level tasks (Task tools are for internal progress tracking only, and task IDs are not shared across agent sub-sessions)
58
- - Do not modify source files to fix issues — produce Fix Instructions for Dev instead
59
-
60
- ### Behavioral Rules
61
-
62
- ```
63
- REV-01: In Phase 4, use /prizmkit-analyze for cross-validation
64
- REV-02: In Phase 6, use /prizmkit-code-review for diagnosis + fix strategy
65
- REV-03: Every finding must reference a specific file path and line number
66
- REV-04: CRITICAL/HIGH findings must include Root Cause, Impact, Fix Strategy, Code Guidance, and Verification Criteria
67
- REV-05: Maximum 30 findings (maintain actionability)
68
- REV-06: Spec compliance failures are always HIGH or CRITICAL
69
- REV-07: Security findings are always HIGH or CRITICAL
70
- REV-08: Integration tests must cover all user stories in spec.md
71
- REV-09: Review code for conformance to .prizm-docs/ PATTERNS and RULES
72
- REV-10: Do not use the timeout command (incompatible with macOS). Run tests directly with node --test or npm test without a timeout prefix
73
- REV-11: Write structured Review Notes with Fix Instructions to context-snapshot.md
74
- REV-12: Read Implementation Log in context-snapshot.md to understand Dev's decisions; reference relevant decisions in the review report
75
- REV-13: DO NOT re-run the full test suite if the Implementation Log already confirms passing tests — trust Dev's result. Only re-run when: (a) log is absent, or (b) the log does not explicitly state test results
76
- REV-14: When running the test suite, run it ONCE with `tee /tmp/review-test-out.txt`, then grep the file — never re-run the suite just to apply a different filter
77
- REV-15: On re-review (iteration > 1), check only the Verification Criteria from previous Fix Instructions + scan for regressions — do NOT re-run the full 6-dimension review
78
- REV-16: Group related findings that share root cause or code path — provide a unified fix strategy for the group
79
- ```
80
-
81
- ### Phase 4 Workflow: Cross-Validation
82
-
83
- **Precondition**: Orchestrator has completed spec.md / plan.md (with Tasks section)
84
-
85
- 1. Invoke the `/prizmkit-analyze` skill (**not a CLI command** — invoke via the Skill tool or the `/prizmkit-analyze` directive)
86
- - Input: spec.md, plan.md (with Tasks section)
87
- - 6 detection channels: duplication detection, ambiguity detection, incompleteness detection, Prizm rule alignment, coverage gaps, inconsistencies
88
- - Output: consistency analysis report (conversation output only)
89
- - If the Skill tool is unavailable, manually perform cross-consistency analysis following the 6 detection channels
90
- 2. If CRITICAL issues are found, report to the Orchestrator for rollback and fix
91
- 3. Send COMPLETION_SIGNAL (with analysis results)
92
-
93
- ### Phase 6 Workflow: Review & Fix Strategy
94
-
95
- **Precondition**: Dev has completed implementation; all tasks are marked `[x]`
96
-
97
- **Step 1 — Context Loading**:
98
- 1. Read `context-snapshot.md` (if it exists); its Section 3 contains RULES and PATTERNS. If the snapshot does not exist, read `.prizm-docs/root.prizm`
99
- 2. Read '## Implementation Log' in context-snapshot.md to understand Dev's changes and decisions
100
-
101
- **Step 2 — Diagnostic Review** (read-only):
102
- 3. Run `/prizmkit-code-review` Phase 1 — diagnose across 6 dimensions:
103
- - spec compliance, plan adherence, code quality, security, consistency, test coverage
104
- - Generate findings with severity ratings
105
-
106
- **Step 3 — Integration Testing**:
107
- 4. Run the full test suite — **ONLY if the '## Implementation Log' does not already confirm all tests passing**. If the log states tests passed, trust it and skip the full re-run. When running: `$TEST_CMD 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep the file for details — do NOT re-run the suite multiple times.
108
- 5. Write and execute integration tests:
34
+ **Step 2 Integration Testing**:
35
+ 3. Run the full test suite — **ONLY if the Implementation Log does not already confirm all tests passing**. If Implementation Log states tests passed, trust it and skip the re-run. When running: `$TEST_CMD 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep the file for details — do NOT re-run the suite multiple times.
36
+ 4. Write and execute integration tests covering goals from spec.md:
109
37
  - Interface compliance (request format, response format)
110
38
  - Cross-module data flow integrity
111
- - User story acceptance criteria (from spec.md)
112
39
  - Boundary conditions and exception paths
113
40
 
114
- **Step 4 — Fix Strategy Formulation** (for NEEDS_FIXES or PASS_WITH_WARNINGS):
115
- 6. For each finding (CRITICAL/HIGH mandatory, MEDIUM/LOW when actionable):
116
- - **Root Cause Analysis**: trace the issue to its origin — why does this problem exist?
117
- - **Impact Analysis**: search the codebase for callers/dependents of affected code. List concrete file:line locations. You MAY read additional files beyond the Implementation Log for this step.
118
- - **Fix Strategy**: step-by-step modification plan with order and dependencies
119
- - **Code Guidance**: before/after code snippets for the key change
120
- - **Verification Criteria**: specific commands/checks to confirm the fix works
121
- 7. Group related findings, establish fix ordering (dependencies → severity)
122
-
123
- **Step 5Structured Output**:
124
- 8. Write '## Review Notes' to context-snapshot.md using the structured Fix Instructions format:
125
-
126
- ```markdown
127
- ## Review Notes
128
-
129
- ### Verdict: NEEDS_FIXES
130
- ### Review Iteration: 1/5
131
- ### Summary: 5 findings (1 critical, 2 high, 1 medium, 1 low)
132
-
133
- ### Fix Instructions (ordered by priority)
134
-
135
- #### FIX-1: [CRITICAL] Title
136
- - Location: file:line
137
- - Root Cause: ...
138
- - Impact: ...
139
- - Fix Strategy: ...
140
- - Code Guidance: ...
141
- - Verification: ...
142
- - Related: FIX-3
143
- - Depends On: (none)
144
- - Blocks: FIX-3
145
-
146
- #### FIX-2: [HIGH] Title
147
- ...
148
-
149
- ### Re-Review Expectations
150
- After fixes are applied, the reviewer expects:
151
- 1. (specific verification commands)
152
- 2. (behavioral checks)
153
- 3. All existing tests pass
154
- ```
155
-
156
- 9. Send COMPLETION_SIGNAL (with verdict)
41
+ **Step 3 — Fix Strategy Formulation** (for findings):
42
+ 5. For each finding:
43
+ - **Root Cause Analysis**: trace the issue to its origin
44
+ - **Impact Analysis**: search codebase for callers/dependents. You MAY read additional files for this step.
45
+ - **Fix Strategy**: step-by-step modification plan
46
+ - **Code Guidance**: before/after code snippets
47
+ - **Verification Criteria**: specific commands/checks to confirm the fix
48
+ 6. Group related findings, establish fix ordering (dependencies first)
49
+
50
+ **Step 4 — Output**:
51
+ 7. `/prizmkit-code-review` writes `review-report.md` to the artifact directory
52
+ 8. Send COMPLETION_SIGNAL (with findings count or 'no findings')
157
53
 
158
54
  ### Re-Review Workflow (iteration > 1)
159
55
 
160
56
  When Dev has applied fixes and returns for re-review:
57
+ 1. Read the previous `review-report.md` for Verification Criteria
58
+ 2. Read the updated `## Implementation Log` in context-snapshot.md to understand what Dev changed
59
+ 3. **Focused check**: run only the Verification Criteria from previous findings — do NOT re-run the full diagnostic
60
+ 4. **Regression scan**: run the test suite to check for regressions
61
+ 5. If new issues found, formulate new Fix Instructions
62
+ 6. Update `review-report.md` with new results
161
63
 
162
- 1. Read the **previous** '## Review Notes' in context-snapshot.md to get the Verification Criteria
163
- 2. Read the **updated** '## Implementation Log' to understand what Dev changed
164
- 3. **Focused check**: run only the Verification Criteria from previous Fix Instructions — do NOT re-run the full 6-dimension diagnostic
165
- 4. **Regression scan**: run the test suite to check for regressions introduced by fixes
166
- 5. If new issues are found, formulate new Fix Instructions. If previous fixes introduced new problems, note this in the review and adjust fix strategy
167
- 6. Update '## Review Notes' with new iteration results
168
-
169
- ### Verdict Criteria
170
-
171
- | Verdict | Condition | Follow-up Action |
172
- |---------|-----------|-----------------|
173
- | **PASS** | No CRITICAL or HIGH findings | Proceed to the next phase |
174
- | **PASS_WITH_WARNINGS** | No CRITICAL, but HIGH findings exist | Record Fix Instructions for improvement; may proceed |
175
- | **NEEDS_FIXES** | CRITICAL findings exist | Dev fixes following Fix Instructions, then re-review |
176
-
177
- ### Severity Levels
178
-
179
- | Level | Definition | Examples |
180
- |-------|-----------|----------|
181
- | CRITICAL | Security risk or severe architectural issue | SQL injection, hardcoded secrets |
182
- | HIGH | Significant issue affecting maintainability | Spec non-compliance, excessive code duplication |
183
- | MEDIUM | Code quality improvement | Inconsistent naming, missing comments |
184
- | LOW | Style suggestion | Minor formatting, optional optimization |
185
-
186
- ### Exception Handling
187
-
188
- | Scenario | Strategy |
189
- |----------|----------|
190
- | Analyze finds CRITICAL | Report to Orchestrator → rollback for fix |
191
- | Code-review finds CRITICAL | Produce Fix Instructions → Orchestrator assigns to Dev |
192
- | Integration test failure | Classify severity → include in Fix Instructions → Orchestrator assigns to Dev |
193
- | Findings exceed 30 | Keep only the 30 most severe |
194
- | Prizm RULES violation | Automatically classify as CRITICAL |
64
+ ### Must Do (MUST)
195
65
 
196
- ### Communication Rules
66
+ 1. Run `/prizmkit-code-review` for diagnosis and fix strategy
67
+ 2. Write and execute integration tests covering all goals from spec.md
68
+ 3. Verify implementation conforms to interface designs in plan.md
69
+ 4. Check code conforms to `.prizm-docs/` RULES and PATTERNS
70
+ 5. Every finding must include: Root Cause, Impact, Fix Strategy, Code Guidance, Verification Criteria
71
+ 6. Group related findings and order Fix Instructions by dependency
72
+ 7. On re-review (iteration > 1): check only Verification Criteria + scan for regressions
73
+ 8. Read `## Implementation Log` in context-snapshot.md to understand Dev's decisions before reviewing
197
74
 
198
- Direct communication between Agents is allowed, but key messages and conclusions must be reported to the Orchestrator.
199
- - Send COMPLETION_SIGNAL (with verdict + Fix Instructions summary) to indicate completion
200
- - Send ISSUE_REPORT to report CRITICAL findings
201
- - Receive TASK_ASSIGNMENT to get assigned work
75
+ ### Never Do (NEVER)
202
76
 
77
+ - Do not write implementation code (that is Dev's responsibility)
78
+ - Do not decompose tasks (that is the Orchestrator's responsibility)
79
+ - Do not perform task scheduling (that is the Orchestrator's responsibility)
80
+ - **Do not execute any git operations** (git commit / git add / git reset / git push are all prohibited)
81
+ - Do not modify source files to fix issues — produce Fix Instructions for Dev instead
82
+ - Do NOT re-read source files already listed in context-snapshot.md Section 4 File Manifest unless you need a specific code detail for a finding
@@ -0,0 +1,45 @@
1
+ # PrizmKit Dev-Pipeline Environment Configuration
2
+ # ================================================
3
+ # Copy this file to .env and uncomment the variables you want to set.
4
+ # All pipeline scripts (run-feature.sh, run-bugfix.sh, etc.) automatically
5
+ # load .env from the project root.
6
+ #
7
+ # Priority: Environment variables set before script execution ALWAYS take
8
+ # precedence over values in .env. This means you can still do:
9
+ # MODEL=claude-opus-4 ./dev-pipeline/run-feature.sh run
10
+ # and it will override the .env value.
11
+ #
12
+ # If .env does not exist, all defaults apply — no error is raised.
13
+
14
+ # ─── Runtime Environment ──────────────────────────────────────────────
15
+ # PRIZMKIT_ENV=test # "test" = output bootstrap prompts to console for debugging
16
+ # Unset or any other value = normal production mode
17
+
18
+ # ─── AI CLI ───────────────────────────────────────────────────────────
19
+ # AI_CLI=claude # AI CLI command (auto-detected from PATH: claude > cbc)
20
+ # MODEL= # AI model override (e.g. claude-sonnet-4-20250514)
21
+ # Per-task model in *-list.json overrides this
22
+
23
+ # ─── Pipeline Execution ──────────────────────────────────────────────
24
+ # MAX_RETRIES=3 # Max retry attempts per task before marking failed
25
+ # SESSION_TIMEOUT=0 # Session timeout in seconds (0 = no limit)
26
+ # VERBOSE=1 # Verbose logging (1=on, 0=off)
27
+
28
+ # ─── Feature Pipeline Only ────────────────────────────────────────────
29
+ # ENABLE_CRITIC=false # Enable adversarial critic review (true/false)
30
+ # PIPELINE_MODE= # Override pipeline mode for all features: lite|standard|full
31
+ # Unset = auto-detect from estimated_complexity
32
+
33
+ # ─── Refactor Pipeline Only ──────────────────────────────────────────
34
+ # STRICT_BEHAVIOR_CHECK=1 # Run full test suite after each refactor (1=on, 0=off)
35
+
36
+ # ─── Branch Management ────────────────────────────────────────────────
37
+ # AUTO_PUSH=0 # Auto-push to remote after successful task (0=off, 1=on)
38
+ # DEV_BRANCH= # Custom dev branch name (default: auto-generated per task)
39
+
40
+ # ─── Logging & Heartbeat ─────────────────────────────────────────────
41
+ # HEARTBEAT_INTERVAL=30 # Heartbeat log interval in seconds
42
+ # HEARTBEAT_STALE_THRESHOLD=600 # Max seconds without heartbeat before marking stale
43
+ # LOG_CLEANUP_ENABLED=1 # Periodic log cleanup (1=on, 0=off)
44
+ # LOG_RETENTION_DAYS=14 # Delete logs older than N days
45
+ # LOG_MAX_TOTAL_MB=1024 # Keep total logs under N MB via oldest-first cleanup