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
@@ -0,0 +1,14 @@
1
+ # Operation: Status — Detailed Steps
2
+
3
+ Check freshness of all .prizm docs.
4
+
5
+ PRECONDITION: .prizm-docs/ exists with root.prizm.
6
+
7
+ STEPS:
8
+ 1. Get last git modification time of root.prizm via `git log -1 --format="%ai" -- .prizm-docs/root.prizm`.
9
+ 2. Count commits since that time via `git log --since="<timestamp>" --oneline | wc -l`.
10
+ 3. For each L1/L2 doc, compare git modification time of the .prizm file (`git log -1 --format="%ai" -- <prizm-file>`) against latest git modification of source files in that module (`git log -1 --format="%ai" -- <module-path>/`).
11
+ 4. Classify each doc as: FRESH (prizm file updated after latest source change), STALE (source changed more recently than prizm file), MISSING (module exists but no .prizm doc).
12
+ 5. Flag any docs exceeding size limits.
13
+
14
+ OUTPUT: Freshness report table with columns: DOC_PATH | LEVEL | STATUS | PRIZM_LAST_MOD | SOURCE_LAST_MOD.
@@ -0,0 +1,19 @@
1
+ # Operation: Update — Detailed Steps
2
+
3
+ Update .prizm-docs/ to reflect recent code changes.
4
+
5
+ PRECONDITION: .prizm-docs/ exists with root.prizm.
6
+
7
+ STEPS:
8
+ 1. Get changed files via `git diff --cached --name-status`. If nothing staged, use `git diff --name-status`. If no git changes at all, do full rescan comparing code against existing docs — this includes checking for modules that have source files but no L2 doc.
9
+ 2. Map changed files to modules by matching against MODULE_INDEX or MODULE_GROUPS in root.prizm. Group changes by module.
10
+ 3. Classify each change: A (added) -> new KEY_FILES entries. D (deleted) -> remove entries, update counts. M (modified) -> check dependency changes. R (renamed) -> update all path references.
11
+ 4. Update affected docs: L2 first (KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, TRAPS, CHANGELOG), then L1 (FILES count, KEY_FILES, DEPENDENCIES — L1 does NOT contain INTERFACES/DATA_FLOW/TRAPS/DECISIONS), then L0 (MODULE_INDEX or MODULE_GROUPS counts, CROSS_CUTTING) only if structural change. No UPDATED timestamps — git tracks modification times. **Preserve** any `PROJECT_BRIEF:` line in root.prizm — it is managed by prizmkit-init, not by this skill.
12
+ 5. Skip updates if: only internal implementation changed (no interface/dependency change), only comments/whitespace/formatting, only .prizm files changed. DO NOT skip test file changes or bug fixes — they may reveal TRAPS worth capturing in L2.
13
+ 6. If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA) and matches no existing module: create L1 immediately, add to MODULE_INDEX. If the current diff includes Added or Modified source files in this module → also create L2 immediately with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. Otherwise defer L2.
14
+ 6a. **L2 gap check** (runs during full rescan mode only — when no git changes detected): For each existing module in MODULE_INDEX, check if L2 doc exists. If L2 is missing and the module has source files with meaningful logic (not trivial config/wrapper) → create L2 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. This ensures Update fills documentation gaps left by previous sessions.
15
+ 7. Append entries to changelog.prizm using format: `- <module-path> | <verb>: <description>`
16
+ 8. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> split or archive.
17
+ 9. Stage updated .prizm files via `git add .prizm-docs/`
18
+
19
+ OUTPUT: List of updated/created/skipped docs with reasons.
@@ -0,0 +1,17 @@
1
+ # Operation: Validate — Detailed Steps
2
+
3
+ Check format compliance and consistency of all .prizm docs.
4
+
5
+ PRECONDITION: .prizm-docs/ exists.
6
+
7
+ STEPS:
8
+ 1. FORMAT CHECK: Verify all .prizm files use KEY: value format. Flag any prose paragraphs, code blocks (```), markdown headers (##), emoji, ASCII art, or horizontal rules. Flag TRAPS entries missing severity prefix ([CRITICAL], [HIGH], or [LOW]). Note: [REVIEW] preceding severity (e.g., `[REVIEW][HIGH]`) is a valid temporary staleness marker, not a format violation.
9
+ 2. SIZE CHECK: Verify size limits: L0 <= 4KB, L1 <= 4KB, L2 <= 5KB. Report files exceeding limits with current size.
10
+ 3. POINTER CHECK: Verify all arrow (->) references resolve to existing .prizm files. Report broken pointers.
11
+ 4. STALENESS CHECK: Compare git modification time of each .prizm file against source directory. Flag docs where source was modified more recently.
12
+ 5. COMPLETENESS CHECK: Verify root.prizm has all required fields (PRIZM_VERSION, PROJECT, LANG, MODULE_INDEX or MODULE_GROUPS). Verify L1 docs have MODULE, FILES, RESPONSIBILITY, DEPENDENCIES (no INTERFACES/TRAPS/DECISIONS). Verify L2 docs have MODULE, FILES, KEY_FILES, DEPENDENCIES, INTERFACES, TRAPS.
13
+ 6. ANTI-PATTERN CHECK: Flag duplicate information across levels, implementation details in L0/L1, TODO items, session-specific context.
14
+ 7. RULES HIERARCHY CHECK: Verify L1/L2 RULES do not contradict root.prizm RULES. L1/L2 may only supplement with module-specific exceptions.
15
+ 8. TRAPS STALENESS CHECK: For each L2 doc where TRAPS section has more than 8 entries, verify that TRAPS include staleness metadata (`STALE_IF:` or `REF:` fields). Flag TRAPS without any staleness metadata as `NEEDS_METADATA` — these are not auto-removed, but flagged for the next `/prizmkit-retrospective` to enrich with `STALE_IF:` globs or `REF:` hashes.
16
+
17
+ OUTPUT: Validation report with PASS/FAIL per check, list of issues with file paths and suggested fixes.
@@ -19,19 +19,15 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
19
19
  ## When to Use
20
20
 
21
21
  - **Before every commit** (mandatory in pipeline) — ensures docs and code are in sync
22
- - After completing a feature
23
- - After code review passes (PASS or PASS WITH WARNINGS)
22
+ - After completing a feature, refactoring, or bug fix
23
+ - After code review passes
24
24
  - User says "retrospective", "retro", "update docs", "sync docs", "wrap up"
25
- - After refactoring or bugfix cycles (structural sync + optional TRAPS update)
26
25
 
27
- ## PRECONDITION
26
+ ## Input
28
27
 
29
- | Mode | Required Input | Expected Source | If Missing |
30
- |---|---|---|---|
31
- | **Feature** | Code review verdict (PASS/PASS_WITH_WARNINGS) | `.prizmkit/specs/###-feature-name/` context-snapshot.md Review Notes | Run `/prizmkit-code-review` |
32
- | **Refactor** | Code review verdict + behavior preservation evidence | `.prizmkit/refactor/<slug>/` context-snapshot.md | Run `/prizmkit-code-review` in refactor mode |
33
- | **Bugfix** | Code review verdict + regression test evidence | `.prizmkit/bugfix/<BUG_ID>/` context-snapshot.md | Run `/prizmkit-code-review` in bugfix mode |
34
- | **Standalone** (user-invoked) | Code changes in working tree | `git diff` output | No prerequisite — runs structural sync only |
28
+ | Parameter | Required | Description |
29
+ |-----------|----------|-------------|
30
+ | `artifact_dir` | No | Directory containing spec.md, plan.md, review-report.md. If omitted, scan `.prizmkit/` subdirectories for the most recently modified directory with a `plan.md`. If no artifact directory found, run in standalone mode (structural sync only from `git diff`). |
35
31
 
36
32
  ## When NOT to Use
37
33
 
@@ -39,32 +35,36 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
39
35
  - Only test files changed — no module-level impact
40
36
  - Only .prizm files changed — avoid circular updates
41
37
 
42
- ## PRECONDITION: Review Verdict Gate
43
-
44
- Before executing, check the most recent `/prizmkit-code-review` verdict from the current session context:
45
-
46
- | Verdict | Action |
47
- |---------|--------|
48
- | `PASS` | Proceed normally |
49
- | `PASS_WITH_WARNINGS` | Proceed normally (warnings are informational) |
50
- | `NEEDS_FIXES` | **ABORT** — do not sync docs for code that failed review. Output: "Code review verdict is NEEDS_FIXES. Fix the issues identified in code review first, then re-run `/prizmkit-code-review` before proceeding to retrospective." |
51
- | No verdict found | Proceed with warning: "No code review verdict found — running retrospective without review gate. Consider running `/prizmkit-code-review` first." |
52
-
53
- This gate prevents updating `.prizm-docs/` for code that hasn't passed review, which would create a false impression that the codebase is in a consistent, reviewed state.
54
-
55
38
  ---
56
39
 
57
40
  ### Job 1: Structural Sync (always runs)
58
41
  Synchronize `.prizm-docs/` structure with actual codebase changes from this session.
59
- → Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed 7-step procedure (1a–1g).
42
+ → Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed procedure.
60
43
 
61
44
  **Key outputs**: Updated L1 file counts, L2 INTERFACES/DATA_FLOW, changelog entries, stale TRAPS cleanup.
62
45
 
63
46
  ---
64
47
 
65
- ### Job 2: Knowledge Injection (conditional — skip for pure refactors)
48
+ ### Job 2: Knowledge Injection (conditional)
66
49
  Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into architecture docs.
67
- → Read `${SKILL_DIR}/references/knowledge-injection-steps.md` for the detailed 3-step procedure (2a–2c).
50
+ → Read `${SKILL_DIR}/references/knowledge-injection-steps.md` for the detailed procedure.
51
+
52
+ **Review gate**: Before running Job 2, check `review-report.md` in the artifact directory for the `## Verdict:` line:
53
+ - Verdict is `PASS` → proceed
54
+ - Verdict is `NEEDS_FIXES` → **skip Job 2** — do not inject knowledge for code that hasn't passed review. Output warning: "Review report has unresolved findings. Skipping knowledge injection."
55
+ - No `review-report.md` found → proceed with warning
56
+ - No artifact directory (standalone mode) → skip Job 2, only Job 1 runs
57
+
58
+ **Skip for**: pure refactors (no behavioral change).
59
+
60
+ **Bug Fix Documentation Policy**:
61
+ - DEFAULT for bug fixes: Run Job 1 (structural sync) only. Skip Job 2 (knowledge injection).
62
+ - RUN Job 2 when the bug fix causes any of:
63
+ • Interface signature changes
64
+ • Dependency additions/removals
65
+ • Observable behavior changes to existing features
66
+ • Newly discovered TRAPs (gotchas/pitfalls)
67
+ - When any of the above apply, run full retrospective (Job 1 + Job 2).
68
68
 
69
69
  **Key outputs**: New TRAPS entries, RULES updates, DECISIONS records in relevant L1/L2 docs and root.prizm.
70
70
 
@@ -82,45 +82,7 @@ Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into archite
82
82
  git add .prizm-docs/
83
83
  ```
84
84
 
85
- **3c.** Handoff:
86
- - `/prizmkit-committer` — proceed to commit
87
-
88
- ---
89
-
90
- ## Integration with Pipeline
91
-
92
- In the dev-pipeline, this skill is the **single doc maintenance step** before commit:
93
-
94
- ```
95
- implement → code-review → retrospective (architecture sync) → committer (pure commit)
96
- ```
97
-
98
- The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show changes in the final commit. This skill satisfies that requirement.
99
-
100
- ## HANDOFF Chain
101
-
102
- | From | To | Condition |
103
- |------|----|-----------|
104
- | `prizmkit-code-review` | **this skill** | Review verdict is PASS or PASS_WITH_WARNINGS |
105
- | **this skill** | `prizmkit-deploy` (conditional) | Architecture synced; deploy only if new infrastructure components detected (new DB, cache, MQ, etc.) |
106
- | **this skill** | `prizmkit-committer` (direct) | Architecture synced, no new infrastructure components |
107
- | `prizmkit-deploy` | `prizmkit-committer` | Deploy docs updated, ready to commit |
108
- | `prizmkit-committer` | — | Committed |
109
-
110
- ### Deploy Decision Logic
111
-
112
- After structural sync and knowledge injection are complete, decide the next step:
113
-
114
- 1. **Check if this is a fast-path change** (bugfix, config tweak, simple refactor) → skip deploy, go to `/prizmkit-committer`
115
- 2. **Check `.prizmkit/config.json`** for `deploy_strategy` field:
116
- - If absent → skip deploy (project hasn't configured deployment yet)
117
- - If present → continue to step 3
118
- 3. **Scan this session's changes** for new infrastructure indicators:
119
- - New `Dockerfile`, `docker-compose.yml`, cloud config files (vercel.json, fly.toml, etc.)
120
- - New database migrations, new cache/queue dependencies in package.json/requirements.txt
121
- - New environment variables added to source code
122
- - If any found → invoke `/prizmkit-deploy`
123
- - If none found → go to `/prizmkit-committer`
85
+ **HANDOFF:** `/prizmkit-committer`
124
86
 
125
87
  ## Output
126
88
 
@@ -3,10 +3,9 @@
3
3
  **2a.** Gather context — read the **actual code that was changed** plus any available artifacts:
4
4
 
5
5
  - `git diff HEAD` — the real source of truth for what happened
6
- - `.prizmkit/specs/###-feature-name/context-snapshot.md` read the '## Implementation Log' section (Dev's changes, decisions, discoveries) and '## Review Notes' section (Reviewer's findings). These are the **preferred source** for pre-categorized decisions and findings. If these sections exist, prefer them over re-extracting from git diff.
7
- - `.prizmkit/specs/###-feature-name/plan.md` if feature work, read planned vs actual
8
- - `.prizmkit/bugfix/<id>/fix-report.md` — if bugfix, read what was discovered
9
- - `.prizmkit/specs/###-feature-name/failure-log.md` — if a previous session failed, read DISCOVERED_TRAPS. These are high-value TRAPS because they come from actual failures — prioritize injecting them into `.prizm-docs/`
6
+ - `review-report.md` in the artifact directory read the findings and fix instructions. If this file exists, use it as a source for pre-categorized decisions and findings.
7
+ - `plan.md` in the artifact directory read planned vs actual
8
+ - Any companion documents in the artifact directory (e.g., `refactor-analysis.md`, `fix-report.md`) — read what was discovered
10
9
  - The relevant `.prizm-docs/` L1/L2 docs for affected modules
11
10
 
12
11
  **2b.** Extract knowledge from what was **observed in code**, not invented:
@@ -1,4 +1,4 @@
1
- # Structural Sync — Detailed Steps (1a–1g)
1
+ # Structural Sync — Detailed Steps
2
2
 
3
3
  **1a.** Get changed files:
4
4
  ```bash
@@ -19,16 +19,14 @@ git diff --name-status
19
19
 
20
20
  **1d.** Update affected docs (bottom-up: L2 → L1 → L0):
21
21
 
22
- - **L2**: If L2 exists → update KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, CHANGELOG, TRAPS, DECISIONS. If L2 does NOT exist AND the module has Added or Modified source files in the current diff with meaningful logic (not trivial config) → create L2 using the L2 GENERATION TEMPLATE, then populate from source.
22
+ - **L2**: If L2 exists → update KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, CHANGELOG, TRAPS, DECISIONS. If L2 does NOT exist AND the module has Added or Modified source files in the current diff with meaningful logic (not trivial config) → create L2 with these sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. Populate from source.
23
23
  - **L1**: Update FILES count, KEY_FILES (if major files added/removed), DEPENDENCIES (if module-level deps changed). **L1 does NOT contain INTERFACES, DATA_FLOW, TRAPS, or DECISIONS** — those belong in L2 only.
24
- - **L0 root.prizm**: Update MODULE_INDEX file counts only if counts changed. Update CROSS_CUTTING if cross-module concerns changed. Update only if structural change (module added/removed).
24
+ - **L0 root.prizm**: Update MODULE_INDEX file counts only if counts changed. Update CROSS_CUTTING if cross-module concerns changed. Update only if structural change (module added/removed). **Preserve** any `PROJECT_BRIEF:` line — it is managed by prizmkit-init.
25
25
 
26
- **1d-migrate.** Legacy TRAPS format migration (opportunistic):
27
- While updating an affected L1/L2 doc, if you encounter TRAPS entries **without** a severity prefix (e.g., `- foo | FIX: bar` instead of `- [LOW] foo | FIX: bar`), prepend `[LOW]` as a conservative default. This clears legacy format debt incrementally only in files already being touched, never as a bulk operation.
28
-
29
- **1e.** If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA in PRIZM-SPEC Section 9.1 Step 2) and matches no existing module:
30
- 1. Create L1 doc immediately, add to MODULE_INDEX.
31
- 2. If the current diff includes Added or Modified source files with meaningful logic in this module → create L2 immediately using the L2 GENERATION TEMPLATE. Otherwise defer L2 to the next session that touches this module.
26
+ **1e.** If new directory qualifies as a module and matches no existing module:
27
+ - A directory qualifies as a module if any of: contains source files forming a logical unit, contains entry/config/interface files, contains qualifying sub-modules, or is referenced by multiple modules as dependency.
28
+ - Create L1 doc immediately, add to MODULE_INDEX.
29
+ - If the current diff includes Added or Modified source files with meaningful logic create L2 immediately. Otherwise defer L2.
32
30
 
33
31
  **1f.** Enforce size limits:
34
32
  - L0 > 4KB → if using MODULE_INDEX with > 15 entries, convert to MODULE_GROUPS format (group by functional domain). Otherwise, consolidate MODULE_INDEX descriptions.
@@ -39,25 +37,9 @@ While updating an affected L1/L2 doc, if you encounter TRAPS entries **without**
39
37
 
40
38
  **1g. TRAPS staleness check** (only when an L2 doc's TRAPS section has > 10 entries):
41
39
 
42
- (Note: `/prizmkit-prizm-docs` Validate uses a lower threshold of > 8 entries to flag TRAPS needing staleness metadata. This step uses > 10 because it performs actual cleanup, which is more expensive. Validate warns early; this step acts later.)
43
-
44
40
  Perform a quick staleness scan on existing TRAPS to prevent unbounded accumulation:
45
41
  1. If a TRAP has `STALE_IF:` and the glob-matched files no longer exist (verified via `ls`) → delete the TRAP entry, append CHANGELOG: `remove: archived stale TRAP - <summary>`
46
42
  2. If a TRAP has `REF:` → check if the referenced file still exists and the REF commit is less than 180 days old (via `git log --since="180 days ago" <hash> 2>/dev/null`). If the file is deleted OR the REF commit is older than 180 days → prepend `[REVIEW]` to the severity, signaling it needs verification during the next retrospective Job 2
47
43
  3. Process at most 5 of the oldest TRAPS per L2 doc per session (to bound context cost)
48
44
 
49
45
  This step is lightweight — it only triggers when TRAPS exceed 10 entries, and processes at most 5 per run.
50
-
51
- **1h. Periodic full TRAPS audit** (runs approximately once every 10 retrospective sessions):
52
-
53
- Check `.prizm-docs/changelog.prizm` for the marker `audit: traps-audit full-scan`. If the marker does not exist, OR the most recent `audit: traps-audit full-scan` entry has 10+ other changelog entries after it:
54
-
55
- 1. Scan ALL L2 `.prizm` files (not just ones touched this session)
56
- 2. For each L2 doc with TRAPS entries:
57
- - Verify referenced file paths still exist (via `ls`)
58
- - If `STALE_IF:` glob matches zero files → delete the TRAP, append CHANGELOG: `remove: archived stale TRAP - <summary>`
59
- - If `REF:` commit is older than 180 days AND the referenced file was significantly refactored (>50% lines changed since REF commit) → prepend `[REVIEW]`
60
- 3. Process at most 3 TRAPS per L2 doc to bound context cost (total max ~15 TRAPS per audit)
61
- 4. Append to `.prizm-docs/changelog.prizm`: `- root | audit: traps-audit full-scan — checked N docs, removed M stale, marked K for review`
62
-
63
- This is a lightweight background pass. If the project has fewer than 5 L2 docs, skip this step (not enough accumulation to warrant auditing).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "recovery-workflow"
3
- description: "Recover and resume interrupted interactive workflow sessions. Auto-detects which workflow (feature-workflow, bug-fix-workflow, refactor-workflow) was interrupted and what phase it reached by inspecting git branch names, characteristic artifacts, and pipeline state — then resumes from the breakpoint. Use this skill whenever an AI CLI session is interrupted mid-workflow, times out, or hits token limits. Trigger on: 'recover', 'resume', 'continue where I left off', 'session interrupted', 'session timed out', 'pick up where it left off', 'token limit exceeded', 'salvage partial work'. (project)"
3
+ description: "Recover and resume interrupted interactive workflow sessions. Auto-detects which workflow (feature-workflow, bug-fix-workflow, refactor-workflow) was interrupted and what phase it reached by inspecting git branch names, characteristic artifacts, and pipeline state — then resumes from the breakpoint. Use this skill whenever an AI CLI session is interrupted mid-workflow, times out, or hits token limits. Trigger on: 'recover', 'resume', 'continue where I left off', 'session interrupted', 'session timed out', 'pick up where it left off', 'token limit exceeded', 'salvage partial work'."
4
4
  ---
5
5
 
6
6
  # Recovery Workflow
@@ -25,8 +25,8 @@ User says:
25
25
  | Workflow | Branch Pattern | Key Artifacts |
26
26
  |----------|---------------|---------------|
27
27
  | bug-fix-workflow | `fix/<BUG_ID>-*` | `.prizmkit/bugfix/<BUG_ID>/fix-plan.md`, `fix-report.md` |
28
- | feature-workflow | `feat/*` | `feature-list.json`, `dev-pipeline/state/features/` |
29
- | refactor-workflow | `refactor/*` | `refactor-list.json`, `dev-pipeline/state/refactors/` |
28
+ | feature-workflow | `feat/*` | `.prizmkit/plans/feature-list.json`, `.prizmkit/state/features/features/` |
29
+ | refactor-workflow | `refactor/*` | `.prizmkit/plans/refactor-list.json`, `.prizmkit/state/refactor/refactors/` |
30
30
 
31
31
  ---
32
32
 
@@ -71,9 +71,9 @@ The script uses **priority-ordered signature matching**:
71
71
  1. Current branch matches fix/* → bug-fix-workflow
72
72
  2. .prizmkit/bugfix/ directory has content → bug-fix-workflow
73
73
  3. Current branch matches refactor/* → refactor-workflow
74
- 4. refactor-list.json exists → refactor-workflow
74
+ 4. .prizmkit/plans/refactor-list.json exists → refactor-workflow
75
75
  5. Current branch matches feat/* → feature-workflow
76
- 6. feature-list.json exists → feature-workflow
76
+ 6. .prizmkit/plans/feature-list.json exists → feature-workflow
77
77
  7. None of the above → no workflow detected
78
78
  ```
79
79
 
@@ -92,7 +92,7 @@ To start a new workflow:
92
92
  • /refactor-workflow — behavior-preserving code restructuring
93
93
  ```
94
94
 
95
- **CHECKPOINT CP-RW-0**: Workflow type and phase identified.
95
+ **CHECKPOINT CP-REC-0**: Workflow type and phase identified.
96
96
 
97
97
  ---
98
98
 
@@ -148,7 +148,7 @@ If the user declines, suggest alternatives:
148
148
  - "Use `/feature-workflow` to start fresh"
149
149
  - "Use `/refactor-workflow` to start fresh"
150
150
 
151
- **CHECKPOINT CP-RW-1**: User confirmed recovery.
151
+ **CHECKPOINT CP-REC-1**: User confirmed recovery.
152
152
 
153
153
  ---
154
154
 
@@ -160,10 +160,10 @@ If the user declines, suggest alternatives:
160
160
 
161
161
  1. **Read the workflow's SKILL.md** from `core/skills/orchestration-skill/workflows/{workflow-type}/SKILL.md`
162
162
  2. **Read existing artifacts** to restore context — check in this order for the most efficient recovery:
163
- - If `session-summary.md` exists in the artifact directory → read it first. It provides a lightweight summary of completed tasks, key decisions, active TRAPS, and remaining work from the interrupted session.
164
- > **Note**: `session-summary.md` is generated by the pipeline's bootstrap prompt system (`generate-bootstrap-prompt.py`) at the end of each AI CLI session. It may not exist if the session crashed before completion or if running in interactive (non-pipeline) mode. If absent, reconstruct context from the artifacts below.
165
- - Then read remaining artifacts: spec, plan, code diffs, bug descriptions, etc.
166
- 3. **Read relevant `.prizm-docs/`** — load project context (L0 root, relevant L1). If `session-summary.md` was found, use its "Files Changed" section to focus L1/L2 loading on affected modules only.
163
+ - If `context-snapshot.md` exists in the artifact directory → read it first. It provides a snapshot of completed tasks, key decisions, and remaining work from the interrupted session.
164
+ - If `session-summary.md` exists read it for a lightweight summary of the previous session.
165
+ - Then read remaining artifacts: spec.md, plan.md, review-report.md, code diffs, bug descriptions, etc.
166
+ 3. **Read relevant `.prizm-docs/`** — load project context (L0 root, relevant L1/L2 for affected modules).
167
167
 
168
168
  This step replaces the context that was lost when the AI session was interrupted.
169
169
 
@@ -175,7 +175,7 @@ Phase inference table:
175
175
 
176
176
  | Detected State | Resume From | Actions |
177
177
  |---------------|------------|---------|
178
- | On `fix/<BUG_ID>-*` branch, no artifacts | Phase 1: Deep Bug Diagnosis | Read bug description from `bug-fix-list.json`. Start interactive diagnosis Q&A |
178
+ | On `fix/<BUG_ID>-*` branch, no artifacts | Phase 1: Deep Bug Diagnosis | Read bug description from `.prizmkit/plans/bug-fix-list.json`. Start interactive diagnosis Q&A |
179
179
  | `fix-plan.md` exists, no code changes | Phase 4: Fix | Read fix-plan.md. Implement the fix following the plan |
180
180
  | `fix-plan.md` + code changes exist | Phase 5: Review | Invoke `/prizmkit-code-review` on all changes |
181
181
  | All docs + review passed | Phase 6: User Verification | Ask user to verify the fix works |
@@ -195,11 +195,11 @@ Phase inference table:
195
195
 
196
196
  | Detected State | Resume From | Actions |
197
197
  |---------------|------------|---------|
198
- | No `feature-list.json` | Phase 1: Brainstorm | Cannot recover conversation context. Start requirement clarification, but leverage any workspace content (README, existing code) for context |
199
- | `feature-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `feature-pipeline-launcher` to start the pipeline |
200
- | `feature-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status via `feature-pipeline-launcher` (Intent B: Check Status) |
198
+ | No `.prizmkit/plans/feature-list.json` | Phase 1: Brainstorm | Cannot recover conversation context. Start requirement clarification, but leverage any workspace content (README, existing code) for context |
199
+ | `.prizmkit/plans/feature-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `feature-pipeline-launcher` to start the pipeline |
200
+ | `.prizmkit/plans/feature-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status via `feature-pipeline-launcher` (Intent B: Check Status) |
201
201
 
202
- **Note**: Feature-workflow recovery is simpler because Phases 3-4 are pipeline-driven. The main recovery value is avoiding re-brainstorming (Phase 1) when `feature-list.json` already exists.
202
+ **Note**: Feature-workflow recovery is simpler because Phases 3-4 are pipeline-driven. The main recovery value is avoiding re-brainstorming (Phase 1) when `.prizmkit/plans/feature-list.json` already exists.
203
203
 
204
204
  ---
205
205
 
@@ -209,9 +209,9 @@ Phase inference table (mirrors feature-workflow):
209
209
 
210
210
  | Detected State | Resume From | Actions |
211
211
  |---------------|------------|---------|
212
- | No `refactor-list.json` | Phase 1: Brainstorm | Start refactoring goal clarification |
213
- | `refactor-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `refactor-pipeline-launcher` to start the pipeline |
214
- | `refactor-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status |
212
+ | No `.prizmkit/plans/refactor-list.json` | Phase 1: Brainstorm | Start refactoring goal clarification |
213
+ | `.prizmkit/plans/refactor-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `refactor-pipeline-launcher` to start the pipeline |
214
+ | `.prizmkit/plans/refactor-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status |
215
215
 
216
216
  ---
217
217
 
@@ -232,7 +232,7 @@ Recovery complete.
232
232
  • Or start a new workflow
233
233
  ```
234
234
 
235
- **CHECKPOINT CP-RW-2**: Workflow recovered and completed.
235
+ **CHECKPOINT CP-REC-2**: Workflow recovered and completed.
236
236
 
237
237
  ---
238
238
 
@@ -243,9 +243,9 @@ Recovery complete.
243
243
  | No workflow signature matches | Show guidance message, suggest original workflow skills |
244
244
  | Branch exists but artifacts are inconsistent | Trust git as ground truth, report discrepancy in detection report |
245
245
  | Test failures in existing code | Report in detection summary; user decides whether to continue |
246
- | Multiple workflows could match (e.g., on main but both feature-list.json and bug-fix artifacts exist) | Pick highest priority (bug-fix > refactor > feature), mention others in report |
246
+ | Multiple workflows could match (e.g., on main but both .prizmkit/plans/feature-list.json and bug-fix artifacts exist) | Pick highest priority (bug-fix > refactor > feature), mention others in report |
247
247
  | Detection script fails | Fall back to manual detection (run individual git/file checks in bash) |
248
- | Bug ID not found in bug-fix-list.json | Continue with branch-only context; note that full bug description is unavailable |
248
+ | Bug ID not found in .prizmkit/plans/bug-fix-list.json | Continue with branch-only context; note that full bug description is unavailable |
249
249
 
250
250
  ---
251
251
 
@@ -22,16 +22,16 @@
22
22
  "id": 3,
23
23
  "name": "feature-list-exists",
24
24
  "prompt": "resume",
25
- "expected_output": "Should auto-detect feature-workflow from feature-list.json. Should detect feature-list.json exists but no pipeline state → infer Phase 3 (Launch). Should invoke feature-pipeline-launcher to start the pipeline.",
26
- "setup_description": "On main branch, create feature-list.json with 3 features. No dev-pipeline/state/features/ directory.",
25
+ "expected_output": "Should auto-detect feature-workflow from .prizmkit/plans/feature-list.json. Should detect .prizmkit/plans/feature-list.json exists but no pipeline state → infer Phase 3 (Launch). Should invoke feature-pipeline-launcher to start the pipeline.",
26
+ "setup_description": "On main branch, create .prizmkit/plans/feature-list.json with 3 features. No .prizmkit/state/features/features/ directory.",
27
27
  "files": []
28
28
  },
29
29
  {
30
30
  "id": 4,
31
31
  "name": "refactor-monitoring",
32
32
  "prompt": "pick up where it left off",
33
- "expected_output": "Should auto-detect refactor-workflow from refactor-list.json + pipeline state. Should infer Phase 4 (Monitor). Should check pipeline status and report results.",
34
- "setup_description": "On main branch, create refactor-list.json with 2 items. Create dev-pipeline/state/refactors/ with status files showing 1 completed, 1 in-progress.",
33
+ "expected_output": "Should auto-detect refactor-workflow from .prizmkit/plans/refactor-list.json + pipeline state. Should infer Phase 4 (Monitor). Should check pipeline status and report results.",
34
+ "setup_description": "On main branch, create .prizmkit/plans/refactor-list.json with 2 items. Create .prizmkit/state/refactor/refactors/ with status files showing 1 completed, 1 in-progress.",
35
35
  "files": []
36
36
  },
37
37
  {
@@ -39,7 +39,7 @@
39
39
  "name": "no-workflow-detected",
40
40
  "prompt": "恢复",
41
41
  "expected_output": "Should detect no workflow signatures in workspace. Should display guidance message suggesting /feature-workflow, /bug-fix-workflow, or /refactor-workflow. Should NOT attempt any recovery actions.",
42
- "setup_description": "Clean workspace on main branch. No feature-list.json, no bug-fix artifacts, no refactor-list.json, no fix/* or feat/* or refactor/* branches.",
42
+ "setup_description": "Clean workspace on main branch. No .prizmkit/plans/feature-list.json, no bug-fix artifacts, no .prizmkit/plans/refactor-list.json, no fix/* or feat/* or refactor/* branches.",
43
43
  "files": []
44
44
  }
45
45
  ]
@@ -85,7 +85,14 @@ def detect_workflow_type(project_root):
85
85
  return ("refactor-workflow", {"branch": branch})
86
86
 
87
87
  # Priority 4: refactor-list.json exists → refactor-workflow
88
- if os.path.isfile(os.path.join(project_root, "refactor-list.json")):
88
+ # Check both new and old paths for backward compatibility
89
+ new_refactor = os.path.join(project_root, ".prizmkit", "plans", "refactor-list.json")
90
+ old_refactor = os.path.join(project_root, "refactor-list.json")
91
+ if os.path.isfile(new_refactor):
92
+ return ("refactor-workflow", {"branch": branch})
93
+ elif os.path.isfile(old_refactor):
94
+ print(f"⚠️ Migration notice: refactor-list.json found in root. "
95
+ f"Please move to .prizmkit/plans/refactor-list.json", file=sys.stderr)
89
96
  return ("refactor-workflow", {"branch": branch})
90
97
 
91
98
  # Priority 5: feat/* branch → feature-workflow
@@ -93,7 +100,14 @@ def detect_workflow_type(project_root):
93
100
  return ("feature-workflow", {"branch": branch})
94
101
 
95
102
  # Priority 6: feature-list.json exists → feature-workflow
96
- if os.path.isfile(os.path.join(project_root, "feature-list.json")):
103
+ # Check both new and old paths for backward compatibility
104
+ new_feature = os.path.join(project_root, ".prizmkit", "plans", "feature-list.json")
105
+ old_feature = os.path.join(project_root, "feature-list.json")
106
+ if os.path.isfile(new_feature):
107
+ return ("feature-workflow", {"branch": branch})
108
+ elif os.path.isfile(old_feature):
109
+ print(f"⚠️ Migration notice: feature-list.json found in root. "
110
+ f"Please move to .prizmkit/plans/feature-list.json", file=sys.stderr)
97
111
  return ("feature-workflow", {"branch": branch})
98
112
 
99
113
  # No match
@@ -164,10 +178,27 @@ def _infer_pipeline_workflow_phase(project_root, list_filename, state_subdir, wo
164
178
  No list file → Phase 1: Brainstorm
165
179
  List file, no pipeline state → Phase 3: Launch
166
180
  List file + pipeline state → Phase 4: Monitor
181
+
182
+ Checks new path (.prizmkit/plans/<list_filename>) first, then falls back
183
+ to old root-level path with a migration warning.
167
184
  """
168
- has_list = os.path.isfile(os.path.join(project_root, list_filename))
169
- state_dir = os.path.join(project_root, "dev-pipeline", "state", state_subdir)
170
- has_pipeline_state = os.path.isdir(state_dir) and bool(os.listdir(state_dir))
185
+ # Check new path first, then old path with fallback warning
186
+ new_list_path = os.path.join(project_root, ".prizmkit", "plans", list_filename)
187
+ old_list_path = os.path.join(project_root, list_filename)
188
+ has_list = os.path.isfile(new_list_path)
189
+ if not has_list and os.path.isfile(old_list_path):
190
+ has_list = True
191
+ print(f"⚠️ Migration notice: {list_filename} found in root. "
192
+ f"Please move to .prizmkit/plans/{list_filename}", file=sys.stderr)
193
+
194
+ # Check new state path first, then old path with fallback warning
195
+ new_state_dir = os.path.join(project_root, ".prizmkit", "state", state_subdir)
196
+ old_state_dir = os.path.join(project_root, "dev-pipeline", "state", state_subdir)
197
+ has_pipeline_state = os.path.isdir(new_state_dir) and bool(os.listdir(new_state_dir))
198
+ if not has_pipeline_state and os.path.isdir(old_state_dir) and bool(os.listdir(old_state_dir)):
199
+ has_pipeline_state = True
200
+ print(f"⚠️ Migration notice: pipeline state found at dev-pipeline/state/{state_subdir}. "
201
+ f"Please move to .prizmkit/state/{state_subdir}", file=sys.stderr)
171
202
 
172
203
  artifacts = {
173
204
  f"{workflow_label}_list_exists": has_list,
@@ -176,16 +207,16 @@ def _infer_pipeline_workflow_phase(project_root, list_filename, state_subdir, wo
176
207
 
177
208
  if has_list and has_pipeline_state:
178
209
  return 4, "Monitor", artifacts, \
179
- f"{list_filename} + pipeline state exist", \
210
+ f".prizmkit/plans/{list_filename} + pipeline state exist", \
180
211
  "check pipeline status and report results"
181
212
 
182
213
  if has_list:
183
214
  return 3, "Launch", artifacts, \
184
- f"{list_filename} exists, no pipeline state", \
215
+ f".prizmkit/plans/{list_filename} exists, no pipeline state", \
185
216
  "launch pipeline → monitor progress"
186
217
 
187
218
  return 1, "Brainstorm", artifacts, \
188
- f"no {list_filename} found", \
219
+ f"no .prizmkit/plans/{list_filename} found", \
189
220
  f"{workflow_label} goal clarification → plan → launch → monitor"
190
221
 
191
222
 
@@ -199,7 +230,7 @@ def infer_feature_phase(project_root):
199
230
  def infer_refactor_phase(project_root):
200
231
  """Infer refactor-workflow phase from artifacts and pipeline state."""
201
232
  return _infer_pipeline_workflow_phase(
202
- project_root, "refactor-list.json", "refactors", "refactor"
233
+ project_root, "refactor-list.json", "refactor", "refactor"
203
234
  )
204
235
 
205
236
 
@@ -256,6 +287,9 @@ def detect_code_changes(project_root, main_branch="main"):
256
287
  files that represent actual implementation work.
257
288
  """
258
289
  IGNORED_FILES = {
290
+ ".prizmkit/plans/feature-list.json",
291
+ ".prizmkit/plans/bug-fix-list.json",
292
+ ".prizmkit/plans/refactor-list.json",
259
293
  "feature-list.json",
260
294
  "bug-fix-list.json",
261
295
  "refactor-list.json",
@@ -265,7 +299,6 @@ def detect_code_changes(project_root, main_branch="main"):
265
299
  }
266
300
  IGNORED_PREFIXES = (
267
301
  ".prizmkit/",
268
- "dev-pipeline/state/",
269
302
  ".prizm-docs/",
270
303
  ".claude/",
271
304
  ".codebuddy/",