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
@@ -13,7 +13,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
13
13
 
14
14
  **CRITICAL**: You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn subagents, wait for each to finish (run_in_background=false). Do NOT spawn agents in background and exit — that kills the session.
15
15
 
16
- **Tier 3 — Full Team**: PM + Dev + Reviewer agents spawned directly via Task tool. Full 7-phase pipeline.
16
+ **Tier 3 — Full Team**: For complex features, create a coordinated agent team via TeamCreate. Use the full 7-phase pipeline with Dev + Reviewer agents.
17
17
 
18
18
  ### Feature Description
19
19
 
@@ -68,16 +68,14 @@ LLM context is frozen at prompt time. Modifying a skill source file during this
68
68
  ## PrizmKit Directory Convention
69
69
 
70
70
  ```
71
- .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← PM writes, all agents read
71
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes, all subagents read
72
72
  .prizmkit/specs/{{FEATURE_SLUG}}/spec.md
73
73
  .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
74
- .prizmkit/specs/REGISTRY.md
75
74
  ```
76
75
 
77
- **`context-snapshot.md`** is the shared knowledge base. PM writes it once; Dev and Reviewer read it instead of re-scanning source files. This eliminates redundant I/O across all agents.
76
+ **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes it once; Dev and Reviewer read it instead of re-scanning source files. This eliminates redundant I/O across all agents.
78
77
 
79
78
  ### Agent Files
80
- - PM Agent: `{{PM_SUBAGENT_PATH}}`
81
79
  - Dev Agent: `{{DEV_SUBAGENT_PATH}}`
82
80
  - Reviewer Agent: `{{REVIEWER_SUBAGENT_PATH}}`
83
81
 
@@ -120,7 +118,7 @@ Save the list of **pre-existing failing tests** (if any) as `BASELINE_FAILURES`.
120
118
 
121
119
  ### Step 1: Team Setup
122
120
 
123
- No TeamCreate required. Agents are spawned directly via the `Task` tool using `subagent_type`.
121
+ Create a coordinated agent team for this feature session:
124
122
 
125
123
  1. Run init script:
126
124
  `python3 {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}`
@@ -128,8 +126,12 @@ No TeamCreate required. Agents are spawned directly via the `Task` tool using `s
128
126
  2. Check for existing artifacts:
129
127
  `ls .prizmkit/specs/{{FEATURE_SLUG}}/ 2>/dev/null`
130
128
 
129
+ 3. Create the agent team:
130
+ - Call `TeamCreate` with `team_name="prizm-dev-team-{{FEATURE_ID}}"` and `description="Implementing {{FEATURE_TITLE}}"`
131
+ - Reference team config at `{{TEAM_CONFIG_PATH}}` for agent definitions
132
+ - Spawn Dev and Reviewer agents as team members
133
+
131
134
  Agent files are at:
132
- - PM: `{{PM_SUBAGENT_PATH}}`
133
135
  - Dev: `{{DEV_SUBAGENT_PATH}}`
134
136
  - Reviewer: `{{REVIEWER_SUBAGENT_PATH}}`
135
137
 
@@ -144,7 +146,7 @@ python3 {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEAT
144
146
  After team setup: check `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — if exists, all agents MUST use it. Read existing artifacts and resume from Phase {{RESUME_PHASE}}.
145
147
  {{END_IF_RESUME}}
146
148
 
147
- ### Phase 1-2: Specify + Plan — PM Agent
149
+ ### Phase 1-2: Specify + Plan — Orchestrator (you)
148
150
 
149
151
  Check existing artifacts first:
150
152
  ```bash
@@ -152,40 +154,44 @@ ls .prizmkit/specs/{{FEATURE_SLUG}}/ 2>/dev/null
152
154
  ```
153
155
 
154
156
  - Both (spec.md, plan.md) exist → **SKIP to CP-1**
155
- - `context-snapshot.md` exists → PM reads it instead of re-scanning source files
156
- - Some missing → PM generates only missing files
157
+ - `context-snapshot.md` exists → use it directly, skip Phase 1
158
+ - Some missing → generate only missing files
157
159
 
158
- Before spawning PM, check whether feature code already exists in the project:
160
+ Before planning, check whether feature code already exists in the project:
159
161
  ```bash
160
162
  grep -r "{{FEATURE_SLUG}}" src/ --include="*.js" --include="*.ts" -l 2>/dev/null | head -20
161
163
  ```
162
164
 
163
- Record result as `EXISTING_CODE` (list of files, or empty). Pass this to PM prompt below.
165
+ Record result as `EXISTING_CODE` (list of files, or empty).
166
+
167
+ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing implementation — document what exists, identify gaps, do NOT re-implement what is already done.
168
+
169
+ **Step A — Build Context Snapshot** (skip if `context-snapshot.md` already exists):
164
170
 
165
- Spawn PM agent (Task tool, subagent_type="prizm-dev-team-pm", run_in_background=false).
171
+ 1. Read `.prizm-docs/root.prizm` and relevant L1/L2 prizm docs
172
+ 2. Scan `src/` for files related to this feature; read each one
173
+ 3. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
174
+ - **Section 1 — Feature Brief**: feature description + acceptance criteria (copy from above)
175
+ - **Section 2 — Project Structure**: relevant `ls src/` output
176
+ - **Section 3 — Prizm Context**: full content of root.prizm and relevant L1/L2 docs
177
+ - **Section 4 — Existing Source Files**: **full verbatim content** of each related file in fenced code blocks (with `### path/to/file` heading and line count). Include ALL files needed for implementation and review — downstream subagents read this section instead of re-reading individual source files
178
+ - **Section 5 — Existing Tests**: full content of related test files as code blocks
179
+ 4. Confirm: `ls .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`
166
180
 
167
- **Construct prompt dynamically** — always prefix with:
168
- > "Read {{PM_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}), complete the following IN THIS SINGLE SESSION — do NOT exit until ALL listed steps are done and files are written to disk:"
181
+ **After Step A, do NOT re-read any original source files** — use context-snapshot.md for all subsequent work.
169
182
 
170
- If `EXISTING_CODE` is non-empty, append to prefix:
171
- > "NOTE: The following files related to this feature already exist in the codebase: `<EXISTING_CODE list>`. Your spec/plan/tasks must reflect this existing implementation — document what exists, identify gaps, do NOT re-implement what is already done."
183
+ **Step B Planning Artifacts** (generate only missing files):
172
184
 
173
- **Step A — Build Context Snapshot** (include only if `context-snapshot.md` does NOT exist):
174
- > "Step A: Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`. This is the team knowledge base — complete it before anything else. Include:
175
- > - Section 1 'Feature Brief': feature description and acceptance criteria
176
- > - Section 2 'Project Structure': output of `ls src/` and relevant subdirectories
177
- > - Section 3 'Prizm Context': full content of `.prizm-docs/root.prizm` and relevant L1/L2 docs
178
- > - Section 4 'Existing Source Files': full content of every related source file as a code block
179
- > - Section 5 'Existing Tests': full content of related test files as code blocks
180
- > Confirm with `ls .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`."
185
+ ```bash
186
+ ls .prizmkit/specs/{{FEATURE_SLUG}}/spec.md .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null
187
+ ```
181
188
 
182
- **Step BPlanning Artifacts** (include only missing files):
183
- - spec.md missing: "Run prizmkit-specify → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the feature description do NOT pause for interactive input."
184
- - plan.md missing: "Run prizmkit-plan → generate plan.md (architecture, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)"
189
+ - spec.md missing: Run `/prizmkit-specify` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the feature description do NOT pause for interactive input.
190
+ - plan.md missing: Run `/prizmkit-plan` → generate plan.md (architecture, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
185
191
 
186
- > "All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing."
192
+ > All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing.
187
193
 
188
- Wait for PM to return. **CP-1**: Both files exist. If missing, diagnose from PM output — do NOT spawn another PM blindly.
194
+ **CP-1**: Both spec.md and plan.md exist.
189
195
 
190
196
  ### Phase 4: Analyze — Reviewer Agent
191
197
 
@@ -199,9 +205,7 @@ Prompt:
199
205
  > Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
200
206
 
201
207
  Wait for Reviewer to return.
202
- - If CRITICAL issues found: spawn PM to fix use this prompt:
203
- > "Read {{PM_SUBAGENT_PATH}}. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST for full project context. Do NOT re-read individual source files. Fix ONLY the following CRITICAL issues in spec.md/plan.md/tasks.md: `<list issues>`. Do NOT exit until all files are updated."
204
- Then re-run analyze (max 1 round).
208
+ - If CRITICAL issues found: fix them yourselfread `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in spec.md/plan.md/tasks.md. Then re-run analyze (max 1 round).
205
209
 
206
210
  **CP-2**: No CRITICAL issues.
207
211
 
@@ -287,7 +291,7 @@ Wait for Reviewer to return.
287
291
 
288
292
  **CP-3**: Integration tests pass, verdict is not NEEDS_FIXES.
289
293
 
290
- ### Phase 7: Summarize & Commit — DO NOT SKIP
294
+ ### Phase 7: Retrospective & Commit — DO NOT SKIP
291
295
 
292
296
  {{IF_MODE_SELF_EVOLVE}}
293
297
  **Framework Validation Gate (self-evolve mode)**:
@@ -310,7 +314,7 @@ bash {{VALIDATOR_SCRIPTS_DIR}}/validate-framework.sh
310
314
  Then set `"reload_needed": true` in session-status.json.
311
315
  {{END_IF_MODE_SELF_EVOLVE}}
312
316
 
313
- **For bug fixes**: skip `/prizmkit-summarize`, skip retrospective, and use `fix(<scope>):` commit prefix.
317
+ **For bug fixes**: run `/prizmkit-retrospective` for structural sync only (skip knowledge injection unless a new TRAPS was discovered). Use `fix(<scope>):` commit prefix.
314
318
 
315
319
  **7a.** Check if feature already committed:
316
320
  ```bash
@@ -319,33 +323,17 @@ git log --oneline | grep "{{FEATURE_ID}}" | head -3
319
323
  - If a commit for `{{FEATURE_ID}}` already exists → **skip 7c** (do NOT run /prizmkit-committer, do NOT run git reset, do NOT stage or unstage anything). Proceed directly to Step 3.
320
324
  - If no existing commit → proceed normally with 7a–7c.
321
325
 
322
- **7b.** Run `/prizmkit-summarize` archive to REGISTRY.md
326
+ **7b.** Run `/prizmkit-retrospective` (**before commit**, the sole maintainer of `.prizm-docs/`):
327
+ - **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
328
+ - **Knowledge injection** (feature sessions only): extract TRAPS, RULES, DECISIONS from completed work
329
+ - Stage all doc changes: `git add .prizm-docs/`
330
+ - **For bug-fix sessions**: structural sync only, skip knowledge injection unless a genuinely new pitfall was discovered
323
331
 
324
- **7b.5.** Update prizm-docs (feature sessions):
325
- - Read the 'Implementation Log' in `context-snapshot.md` to identify changed files
326
- - For each changed file, check if any related `.prizm-docs/` L1/L2 doc needs updating (new APIs, changed behavior, new TRAPS)
327
- - Update `.prizm-docs/changelog.prizm`: append one-line entry `- feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
328
- - Stage all modified prizm-docs: `git add .prizm-docs/`
329
- - Pipeline docs pass condition is `REGISTRY.md` OR `.prizm-docs/` changed in final commit
330
-
331
- **7b.6.** Run `/prizmkit-retrospective` (feature sessions only, **before commit**):
332
- - Extract lessons from completed feature — compare spec/plan/tasks vs actual
333
- - Update relevant `.prizm-docs/` sections: TRAPS, RULES, DECISIONS
334
- - Write `.prizmkit/specs/{{FEATURE_SLUG}}/retrospective.md`
335
- - Stage any `.prizm-docs/` changes: `git add .prizm-docs/`
336
- - **Skip if this session is bug-fix-only**
337
-
338
- **7c.** Mark feature complete:
339
- ```bash
340
- python3 {{VALIDATOR_SCRIPTS_DIR}}/update-feature-status.py \
341
- --feature-list "{{FEATURE_LIST_PATH}}" \
342
- --state-dir "{{PROJECT_ROOT}}/dev-pipeline/state" \
343
- --feature-id "{{FEATURE_ID}}" --session-id "{{SESSION_ID}}" --action complete
344
- ```
332
+ **7c.** Run `/prizmkit-committer` → `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`, do NOT push
345
333
 
346
- **7d.** Run `/prizmkit-committer` `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`, do NOT push
334
+ **7d.** MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
347
335
 
348
- **7e.** MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
336
+ **7e.** Do NOT run `update-feature-status.py` here the pipeline runner handles feature-list.json updates automatically after session exit.
349
337
 
350
338
  ---
351
339
 
@@ -389,18 +377,20 @@ After writing `session-status.json`, verify repository is clean:
389
377
  git status --short
390
378
  ```
391
379
 
392
- If any files remain, include them in the last commit:
380
+ If any files remain (e.g. session-status.json), stage and create a follow-up commit:
393
381
 
394
382
  ```bash
395
383
  git add -A
396
- git commit --amend --no-edit
384
+ git commit -m "chore({{FEATURE_ID}}): include session artifacts"
397
385
  ```
398
386
 
399
387
  Re-check `git status --short` and ensure it is empty before exiting.
400
388
 
401
389
  ## Step 4: Team Cleanup
402
390
 
403
- No team cleanup needed agents were spawned directly without TeamCreate.
391
+ Clean up the agent team created in Step 1:
392
+ - Call `TeamDelete` to remove the team and free resources
393
+ - Only call TeamDelete after all agents have completed and session-status.json is written
404
394
 
405
395
  ## Critical Paths
406
396
 
@@ -409,7 +399,6 @@ No team cleanup needed — agents were spawned directly without TeamCreate.
409
399
  | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
410
400
  | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
411
401
  | Team Config | `{{TEAM_CONFIG_PATH}}` |
412
- | PM Agent Def | {{PM_SUBAGENT_PATH}} |
413
402
  | Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
414
403
  | Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
415
404
  | Session Status Output | {{SESSION_STATUS_PATH}} |
@@ -418,8 +407,8 @@ No team cleanup needed — agents were spawned directly without TeamCreate.
418
407
 
419
408
  ## Reminders
420
409
 
421
- - Tier 3: full team — PM (planning) → Dev (implementation) → Reviewer (review) — agents spawned directly via Task tool (no TeamCreate needed)
422
- - context-snapshot.md is the team knowledge base: PM writes it once, all agents read it
410
+ - Tier 3: full team — Dev (implementation) → Reviewer (review) — create coordinated team via TeamCreate, clean up with TeamDelete at session end
411
+ - context-snapshot.md is the team knowledge base: orchestrator writes it once, all agents read it
423
412
  - Do NOT use `run_in_background=true` when spawning agents
424
413
  - ALWAYS write session-status.json before exiting
425
414
  - Commit phase must use `/prizmkit-committer`; do NOT replace with manual git commit commands
@@ -18,17 +18,17 @@ You are the **bug fix session orchestrator**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}
18
18
 
19
19
  **CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn subagents, you MUST **wait for each to finish** (run_in_background=false) before proceeding. Do NOT spawn an agent in the background and exit — that kills the session.
20
20
 
21
- **MANDATORY TEAM REQUIREMENT**: You MUST use the `prizm-dev-team` multi-agent team. This is NON-NEGOTIABLE. All implementation and review work MUST be performed by the appropriate team agents (Dev, Reviewer).
21
+ **MANDATORY TEAM REQUIREMENT**: You MUST use the `prizm-dev-team` multi-agent team. This is NON-NEGOTIABLE. All implementation and review work MUST be performed by the appropriate team agents (Dev, Reviewer). You are the orchestrator — handle coordination, planning, and commit phases directly.
22
22
 
23
23
  **BUG FIX DOCUMENTATION POLICY**: Bug fixes MUST NOT be recorded as new documentation entries:
24
- - Do NOT run `/prizmkit-summarize` (no REGISTRY.md entries)
24
+ - Run `/prizmkit-retrospective` with structural sync only (Job 1) — skip knowledge injection unless a genuinely new TRAP was discovered
25
25
  - Do NOT create spec/plan/tasks under `.prizmkit/specs/`
26
26
  - Do NOT update `.prizm-docs/` module docs for pure bug fixes (unless TRAPS update is needed)
27
27
  - Commit with `fix(<scope>):` prefix, NOT `feat:`
28
28
 
29
29
  ### Team Definition Reference
30
30
 
31
- - **Source of truth**: `core/team/prizm-dev-team.json`
31
+ - **Source of truth**: `{{TEAM_CONFIG_PATH}}`
32
32
  - **Installed team config**: `{{TEAM_CONFIG_PATH}}`
33
33
 
34
34
  ### Bug Description
@@ -81,7 +81,7 @@ You are the **bug fix session orchestrator**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}
81
81
  - If valid, reuse it. Set `TEAM_REUSED=true`
82
82
 
83
83
  2. **If no reusable team**, create a new one:
84
- - Reference `core/team/prizm-dev-team.json`
84
+ - Reference `{{TEAM_CONFIG_PATH}}`
85
85
  - Call `TeamCreate` with `team_name="prizm-dev-team-{{BUG_ID}}"` and `description="Fixing {{BUG_TITLE}}"`
86
86
  - Set `TEAM_REUSED=false`
87
87
 
@@ -211,7 +211,7 @@ You are the **bug fix session orchestrator**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}
211
211
  1. Run `/prizmkit-committer` with:
212
212
  - Commit message: `fix({{FIX_SCOPE}}): {{BUG_TITLE}}`
213
213
  - Include both fix code and reproduction test
214
- - Do NOT run `/prizmkit-summarize`
214
+ - Do NOT run `/prizmkit-retrospective` with REGISTRY archiving
215
215
  - Do NOT push (user will push manually)
216
216
  2. If a new pitfall was discovered (not previously in TRAPS):
217
217
  - Update the affected module's TRAPS section in `.prizm-docs/`
@@ -267,7 +267,7 @@ Write to: `{{SESSION_STATUS_PATH}}`
267
267
 
268
268
  | Resource | Path |
269
269
  |----------|------|
270
- | Team Definition (source of truth) | `core/team/prizm-dev-team.json` |
270
+ | Team Definition (source of truth) | `{{TEAM_CONFIG_PATH}}` |
271
271
  | Team Config (installed) | `{{TEAM_CONFIG_PATH}}` |
272
272
  | Bug Fix Artifacts Dir | `.prizmkit/bugfix/{{BUG_ID}}/` |
273
273
  | Fix Plan | `.prizmkit/bugfix/{{BUG_ID}}/fix-plan.md` |
@@ -282,7 +282,7 @@ Write to: `{{SESSION_STATUS_PATH}}`
282
282
  - **MANDATORY**: Use `prizm-dev-team` — single-agent execution is FORBIDDEN
283
283
  - **Only 2 artifact files per bug**: fix-plan.md + fix-report.md — NEVER more
284
284
  - **Do NOT create** spec.md, plan.md, or tasks.md for bug fixes
285
- - **Do NOT run** `/prizmkit-summarize` (no REGISTRY.md entries for bugs)
285
+ - **Do NOT run** `/prizmkit-retrospective` knowledge injection for bugs (structural sync only, unless genuinely new TRAP discovered)
286
286
  - **Commit with** `fix(<scope>):` prefix, NOT `feat:`
287
287
  - **Update TRAPS** in `.prizm-docs/` only if a genuinely new pitfall was discovered
288
288
  - Dev agents use TDD approach: reproduction test goes from RED → GREEN
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "status": {
17
17
  "type": "string",
18
- "enum": ["success", "partial", "failed", "commit_missing", "docs_missing"]
18
+ "enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict"]
19
19
  },
20
20
  "completed_phases": {
21
21
  "type": "array",
@@ -1,133 +1,21 @@
1
- """Shared fixtures for dev-pipeline tests."""
1
+ """Shared fixtures and import helpers for dev-pipeline tests."""
2
2
 
3
- import json
3
+ import importlib
4
4
  import os
5
- import pytest
6
-
7
-
8
- @pytest.fixture
9
- def sample_feature_list():
10
- """A valid feature-list.json structure."""
11
- return {
12
- "$schema": "dev-pipeline-feature-list-v1",
13
- "app_name": "TestApp",
14
- "global_context": {
15
- "language": "Python",
16
- "framework": "FastAPI",
17
- },
18
- "features": [
19
- {
20
- "id": "F-001",
21
- "title": "Project Infrastructure Setup",
22
- "description": "Set up the project structure.",
23
- "priority": 1,
24
- "estimated_complexity": "low",
25
- "dependencies": [],
26
- "acceptance_criteria": ["Has package.json", "Has README.md"],
27
- "status": "pending",
28
- },
29
- {
30
- "id": "F-002",
31
- "title": "User Authentication",
32
- "description": "Implement user login and registration.",
33
- "priority": 2,
34
- "estimated_complexity": "high",
35
- "dependencies": ["F-001"],
36
- "acceptance_criteria": ["Login works", "Registration works"],
37
- "status": "pending",
38
- },
39
- {
40
- "id": "F-003",
41
- "title": "Dashboard View",
42
- "description": "Create main dashboard.",
43
- "priority": 3,
44
- "estimated_complexity": "medium",
45
- "dependencies": ["F-001", "F-002"],
46
- "acceptance_criteria": ["Dashboard renders"],
47
- "status": "pending",
48
- },
49
- ],
50
- }
51
-
52
-
53
- @pytest.fixture
54
- def sample_bug_list():
55
- """A valid bug-fix-list.json structure."""
56
- return {
57
- "$schema": "dev-pipeline-bug-fix-list-v1",
58
- "project_name": "TestProject",
59
- "global_context": {
60
- "language": "Python",
61
- },
62
- "bugs": [
63
- {
64
- "id": "B-001",
65
- "title": "Login crash on empty password",
66
- "description": "App crashes when password is empty.",
67
- "severity": "critical",
68
- "priority": 1,
69
- "error_source": {
70
- "type": "stack_trace",
71
- "stack_trace": "Traceback ... ValueError",
72
- "error_message": "Password cannot be empty",
73
- },
74
- "verification_type": "automated",
75
- "acceptance_criteria": ["No crash on empty password"],
76
- "status": "pending",
77
- "affected_feature": "F-002",
78
- "affected_modules": ["auth"],
79
- },
80
- {
81
- "id": "B-002",
82
- "title": "Slow dashboard loading",
83
- "description": "Dashboard takes 10s to load.",
84
- "severity": "medium",
85
- "priority": 2,
86
- "error_source": {
87
- "type": "user_report",
88
- "reproduction_steps": ["Open dashboard", "Wait 10 seconds"],
89
- },
90
- "verification_type": "manual",
91
- "acceptance_criteria": ["Dashboard loads in <2s"],
92
- "status": "pending",
93
- "affected_feature": "F-003",
94
- "environment": {"os": "macOS", "browser": "Chrome"},
95
- },
96
- ],
97
- }
98
-
99
-
100
- @pytest.fixture
101
- def feature_list_file(tmp_path, sample_feature_list):
102
- """Write sample feature list to a temp file and return the path."""
103
- path = tmp_path / "feature-list.json"
104
- path.write_text(json.dumps(sample_feature_list, indent=2), encoding="utf-8")
105
- return str(path)
106
-
107
-
108
- @pytest.fixture
109
- def bug_list_file(tmp_path, sample_bug_list):
110
- """Write sample bug list to a temp file and return the path."""
111
- path = tmp_path / "bug-fix-list.json"
112
- path.write_text(json.dumps(sample_bug_list, indent=2), encoding="utf-8")
113
- return str(path)
114
-
115
-
116
- @pytest.fixture
117
- def state_dir(tmp_path):
118
- """Create and return a basic state directory."""
119
- sd = tmp_path / "state"
120
- sd.mkdir()
121
- features_dir = sd / "features"
122
- features_dir.mkdir()
123
- return str(sd)
124
-
125
-
126
- @pytest.fixture
127
- def bugfix_state_dir(tmp_path):
128
- """Create and return a basic bugfix state directory."""
129
- sd = tmp_path / "bugfix-state"
130
- sd.mkdir()
131
- bugs_dir = sd / "bugs"
132
- bugs_dir.mkdir()
133
- return str(sd)
5
+ import sys
6
+
7
+ # Add dev-pipeline/scripts to the import path so tests can import modules
8
+ # without requiring package installation.
9
+ _scripts_dir = os.path.join(os.path.dirname(__file__), "..", "scripts")
10
+ sys.path.insert(0, _scripts_dir)
11
+
12
+ # generate-bootstrap-prompt.py has a hyphenated filename that Python can't
13
+ # import normally. Load it via importlib and register under an underscore name
14
+ # so test files can do: `from generate_bootstrap_prompt import ...`
15
+ _spec = importlib.util.spec_from_file_location(
16
+ "generate_bootstrap_prompt",
17
+ os.path.join(_scripts_dir, "generate-bootstrap-prompt.py"),
18
+ )
19
+ _mod = importlib.util.module_from_spec(_spec)
20
+ sys.modules["generate_bootstrap_prompt"] = _mod
21
+ _spec.loader.exec_module(_mod)