prizmkit 1.1.111 → 1.1.113

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 (119) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codex/skill-adapter.js +4 -0
  3. package/bundled/agents/prizm-dev-team-reviewer.md +12 -1
  4. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +10 -10
  5. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -0
  6. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +20 -73
  7. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +290 -421
  8. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
  9. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +259 -481
  10. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -0
  11. package/bundled/dev-pipeline/scripts/init-pipeline.py +12 -0
  12. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +24 -1
  13. package/bundled/dev-pipeline/scripts/prompt_framework.py +312 -0
  14. package/bundled/dev-pipeline/scripts/update-bug-status.py +87 -20
  15. package/bundled/dev-pipeline/scripts/update-feature-status.py +82 -16
  16. package/bundled/dev-pipeline/scripts/update-refactor-status.py +68 -28
  17. package/bundled/dev-pipeline/scripts/utils.py +171 -0
  18. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  19. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +7 -1
  20. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +17 -19
  21. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +21 -26
  22. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +9 -1
  23. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +11 -8
  24. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +122 -182
  25. package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +16 -0
  26. package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +12 -0
  27. package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +9 -0
  28. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +31 -0
  29. package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +22 -0
  30. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +23 -0
  31. package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +20 -0
  32. package/bundled/dev-pipeline/templates/sections/bugfix-phase-init.md +9 -0
  33. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +15 -0
  34. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +29 -0
  35. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +11 -0
  36. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +7 -0
  37. package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +31 -0
  38. package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +40 -0
  39. package/bundled/dev-pipeline/templates/sections/failure-capture.md +2 -2
  40. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +8 -2
  41. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +7 -1
  42. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +7 -1
  43. package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +17 -0
  44. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +13 -0
  45. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +9 -0
  46. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +37 -0
  47. package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +22 -0
  48. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +16 -0
  49. package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +9 -0
  50. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +22 -0
  51. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +19 -0
  52. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +11 -0
  53. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +7 -0
  54. package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +28 -0
  55. package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +52 -0
  56. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +104 -26
  57. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +14 -0
  58. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +239 -0
  59. package/bundled/dev-pipeline/tests/test_unified_cli.py +6 -2
  60. package/bundled/dev-pipeline/tests/test_utils.py +66 -1
  61. package/bundled/skills/_metadata.json +1 -1
  62. package/bundled/skills/app-planner/SKILL.md +8 -7
  63. package/bundled/skills/app-planner/references/project-brief-guide.md +2 -2
  64. package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +1 -1
  65. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +1 -1
  66. package/bundled/skills/app-planner/references/rules-configuration.md +53 -26
  67. package/bundled/skills/bug-fix-workflow/SKILL.md +191 -336
  68. package/bundled/skills/bug-planner/SKILL.md +6 -5
  69. package/bundled/skills/bug-planner/references/critic-and-verification.md +3 -3
  70. package/bundled/skills/bug-planner/references/schema-validation.md +2 -1
  71. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +70 -1
  72. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -21
  73. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +2 -2
  74. package/bundled/skills/feature-pipeline-launcher/SKILL.md +25 -26
  75. package/bundled/skills/feature-planner/SKILL.md +9 -11
  76. package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
  77. package/bundled/skills/feature-planner/references/decomposition-patterns.md +1 -1
  78. package/bundled/skills/feature-planner/references/error-recovery.md +2 -1
  79. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +2 -2
  80. package/bundled/skills/feature-planner/references/new-project-planning.md +35 -39
  81. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -1
  82. package/bundled/skills/feature-workflow/SKILL.md +170 -298
  83. package/bundled/skills/prizmkit/SKILL.md +103 -57
  84. package/bundled/skills/prizmkit-code-review/SKILL.md +97 -116
  85. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -0
  86. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +14 -3
  87. package/bundled/skills/prizmkit-committer/SKILL.md +59 -47
  88. package/bundled/skills/prizmkit-deploy/SKILL.md +162 -381
  89. package/bundled/skills/prizmkit-deploy/references/database-setup.md +12 -3
  90. package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +220 -0
  91. package/bundled/skills/prizmkit-implement/SKILL.md +51 -40
  92. package/bundled/skills/prizmkit-init/SKILL.md +4 -3
  93. package/bundled/skills/prizmkit-plan/SKILL.md +85 -70
  94. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +94 -73
  95. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +20 -18
  96. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +11 -13
  97. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +18 -14
  98. package/bundled/skills/prizmkit-retrospective/SKILL.md +56 -48
  99. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +79 -27
  100. package/bundled/skills/prizmkit-test/SKILL.md +138 -141
  101. package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +1 -1
  102. package/bundled/skills/prizmkit-test/references/examples.md +11 -9
  103. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +1 -1
  104. package/bundled/skills/prizmkit-test/references/test-report-template.md +2 -2
  105. package/bundled/skills/recovery-workflow/SKILL.md +195 -256
  106. package/bundled/skills/recovery-workflow/evals/evals.json +21 -13
  107. package/bundled/skills/recovery-workflow/references/detection.md +48 -39
  108. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +258 -322
  109. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +32 -13
  110. package/bundled/skills/refactor-planner/SKILL.md +2 -2
  111. package/bundled/skills/refactor-planner/references/behavior-preservation.md +24 -19
  112. package/bundled/skills/refactor-planner/references/fast-path.md +2 -4
  113. package/bundled/skills/refactor-planner/references/planning-phases.md +2 -2
  114. package/bundled/skills/refactor-workflow/SKILL.md +174 -307
  115. package/package.json +1 -1
  116. package/src/scaffold.js +5 -0
  117. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +0 -6
  118. package/bundled/skills/feature-workflow/references/brainstorm-guide.md +0 -137
  119. package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +0 -116
@@ -1,45 +1,53 @@
1
1
  {
2
2
  "skill_name": "recovery-workflow",
3
- "notes": "These test cases require workspace state setup. Each has a setup_description that creates the necessary mock state before the skill is invoked. Due to the interactive nature and state-dependency of this skill, automated evaluation is limited — qualitative review is primary.",
3
+ "notes": "These test cases require workspace state setup. Recovery now treats fix-plan.md and fix-report.md as optional signals; branch, diff, spec.md, plan.md, review artifacts, and pipeline state are also valid recovery signals.",
4
4
  "evals": [
5
5
  {
6
6
  "id": 1,
7
- "name": "bugfix-mid-fix",
7
+ "name": "bugfix-mid-fix-with-plan",
8
8
  "prompt": "My session broke, help me recover",
9
- "expected_output": "Should auto-detect bug-fix-workflow from fix/B-001-* branch. Should detect fix-plan.md + code changes infer Phase 5 (Review). Should display recovery report with workflow type, phase, artifacts, code stats. After user confirms, should invoke /prizmkit-code-review on existing changes.",
10
- "setup_description": "Create fix/B-001-login-crash branch, .prizmkit/bugfix/B-001/fix-plan.md, modify 3 source files + 1 test file. No fix-report.md, no commits ahead of main.",
9
+ "expected_output": "Should auto-detect bug-fix-workflow from fix/B-001-* branch. Should detect fix-plan.md + code changes as optional plan signal plus implementation diff -> infer Review. Should display recovery report with workflow type, phase, artifacts, and code stats. Should ask recovery approach before invoking /prizmkit-code-review or recovery script.",
10
+ "setup_description": "Create fix/B-001-login-crash branch, optional .prizmkit/bugfix/B-001/fix-plan.md, modify 3 source files + 1 test file. No fix-report.md, no commits ahead of main.",
11
11
  "files": []
12
12
  },
13
13
  {
14
14
  "id": 2,
15
+ "name": "bugfix-diff-no-fix-plan",
16
+ "prompt": "Continue the previous bug fix",
17
+ "expected_output": "Should auto-detect bug-fix-workflow from fix/B-002-* branch even without fix-plan.md. Code/test changes should infer Review. Should not require .prizmkit/bugfix/B-002/fix-plan.md to exist.",
18
+ "setup_description": "Create fix/B-002-null-pointer branch and modify 2 source files + 1 test file. No .prizmkit/bugfix/B-002 directory, no fix-plan.md, no fix-report.md.",
19
+ "files": []
20
+ },
21
+ {
22
+ "id": 3,
15
23
  "name": "bugfix-plan-only",
16
24
  "prompt": "Continue the previous work",
17
- "expected_output": "Should auto-detect bug-fix-workflow from fix/B-002-* branch. Should detect fix-plan.md but no code changes infer Phase 4 (Fix). Should read fix-plan.md and start implementing the fix.",
18
- "setup_description": "Create fix/B-002-null-pointer branch, .prizmkit/bugfix/B-002/fix-plan.md with diagnosis and fix approach. No code changes.",
25
+ "expected_output": "Should auto-detect bug-fix-workflow from fix/B-003-* branch. Should detect spec.md or plan.md but no code changes -> infer Fix. Should read the plan artifact and resume implementation only after user chooses interactive recovery.",
26
+ "setup_description": "Create fix/B-003-null-pointer branch with spec.md and plan.md. No code changes.",
19
27
  "files": []
20
28
  },
21
29
  {
22
- "id": 3,
30
+ "id": 4,
23
31
  "name": "feature-list-exists",
24
32
  "prompt": "resume",
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.",
33
+ "expected_output": "Should auto-detect feature-workflow from .prizmkit/plans/feature-list.json. Should detect list exists but no pipeline state -> infer Launch. Should ask recovery approach; launcher handoff is valid after user selection.",
26
34
  "setup_description": "On main branch, create .prizmkit/plans/feature-list.json with 3 features. No .prizmkit/state/features/ directory.",
27
35
  "files": []
28
36
  },
29
37
  {
30
- "id": 4,
38
+ "id": 5,
31
39
  "name": "refactor-monitoring",
32
40
  "prompt": "pick up where it left off",
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.",
41
+ "expected_output": "Should auto-detect refactor-workflow from .prizmkit/plans/refactor-list.json + pipeline state. Should infer Monitor / Recover Pipeline. Should ask whether to run recovery script, resume interactively, clean retry, or start fresh.",
34
42
  "setup_description": "On main branch, create .prizmkit/plans/refactor-list.json with 2 items. Create .prizmkit/state/refactor/ with status files showing 1 completed, 1 in-progress.",
35
43
  "files": []
36
44
  },
37
45
  {
38
- "id": 5,
46
+ "id": 6,
39
47
  "name": "no-workflow-detected",
40
48
  "prompt": "recover",
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 .prizmkit/plans/feature-list.json, no bug-fix artifacts, no .prizmkit/plans/refactor-list.json, no fix/* or feat/* or refactor/* branches.",
49
+ "expected_output": "Should detect no workflow signatures in workspace. Should display guidance suggesting /feature-workflow, /bug-fix-workflow, or /refactor-workflow. Should NOT attempt recovery actions.",
50
+ "setup_description": "Clean workspace on main branch. No .prizmkit/plans/*.json files, no pipeline state, no fix/* or feat/* or refactor/* branch, no spec.md or plan.md.",
43
51
  "files": []
44
52
  }
45
53
  ]
@@ -1,58 +1,67 @@
1
1
  # Recovery Phase Detection
2
2
 
3
- The script uses **priority-ordered signature matching**:
3
+ Detection uses priority-ordered signals, but no single signal is authoritative. Prefer a conservative recovery phase when signals disagree.
4
4
 
5
- ```
6
- 1. Current branch matches fix/* → bug-fix-workflow
7
- 2. .prizmkit/bugfix/ directory has content bug-fix-workflow
8
- 3. Current branch matches refactor/* → refactor-workflow
9
- 4. .prizmkit/plans/refactor-list.json exists → refactor-workflow
10
- 5. Current branch matches feat/* → feature-workflow
11
- 6. .prizmkit/plans/feature-list.json exists feature-workflow
12
- 7. None of the above → no workflow detected
13
- ```
5
+ ## Signature Priority
6
+
7
+ 1. Current branch starts with `fix/` -> likely `bug-fix-workflow`.
8
+ 2. `.prizmkit/state/bugfix/` or `.prizmkit/plans/bug-fix-list.json` has relevant failed/in-progress state -> likely bugfix pipeline.
9
+ 3. `.prizmkit/bugfix/` has optional bugfix artifacts -> possible `bug-fix-workflow`.
10
+ 4. Current branch starts with `refactor/` -> likely `refactor-workflow`.
11
+ 5. `.prizmkit/plans/refactor-list.json` or `.prizmkit/state/refactor/` exists -> likely refactor pipeline.
12
+ 6. Current branch starts with `feat/` -> likely `feature-workflow`.
13
+ 7. `.prizmkit/plans/feature-list.json` or `.prizmkit/state/features/` exists -> likely feature pipeline.
14
+ 8. `spec.md` or `plan.md` exists without family-specific signals -> current-workspace Fast Path; ask which workflow it belongs to.
15
+ 9. None of the above -> no workflow detected.
14
16
 
15
- Bug-fix-workflow has highest priority because it is purely interactive and benefits most from recovery (no pipeline retry fallback).
17
+ Bug-fix signals are prioritized because interactive bug recovery benefits most from preserving local diagnosis and fix work.
16
18
 
17
- ## If No Workflow Detected
19
+ ## Optional vs Required Artifacts
20
+
21
+ `fix-plan.md` and `fix-report.md` are optional bug recovery signals. They are useful when present, but bug-fix recovery must also infer from branch, diff, `spec.md`, `plan.md`, review artifacts, commits, and bug-list entries.
22
+
23
+ ## If No Workflow Is Detected
18
24
 
19
25
  Show guidance and exit:
20
26
 
21
- ```
22
- No interrupted workflow detected in this workspace.
27
+ ```markdown
28
+ No interrupted workflow was detected in this workspace.
23
29
 
24
- To start a new workflow:
25
- /feature-workflow — build features from idea to code
26
- /bug-fix-workflow — fix a specific bug interactively
27
- /refactor-workflow behavior-preserving code restructuring
30
+ Start a new workflow:
31
+ - /feature-workflow — build features from idea to code
32
+ - /bug-fix-workflow — fix a specific bug interactively
33
+ - /refactor-workflow restructure code while preserving behavior
28
34
  ```
29
35
 
30
36
  ## Phase Inference Tables
31
37
 
32
- ### Bug-Fix-Workflow Recovery
38
+ ### Bug-Fix Recovery
33
39
 
34
- | Detected State | Resume From | Actions |
35
- |---------------|------------|---------|
36
- | 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 |
37
- | `fix-plan.md` exists, no code changes | Phase 4: Fix | Read fix-plan.md. Implement the fix following the plan |
38
- | `fix-plan.md` + code changes exist | Phase 5: Review | Invoke `/prizmkit-code-review` on all changes |
39
- | All docs + review passed | Phase 6: User Verification | Ask user to verify the fix works |
40
- | All docs + committed | Phase 7: Merge Decision | Ask merge vs keep branch |
40
+ | Detected state | Resume from | Actions |
41
+ |---|---|---|
42
+ | `fix/*` branch, no implementation artifacts | Diagnosis / triage | Restore bug context, confirm understanding, choose next action |
43
+ | `spec.md` or `plan.md`, no code changes | Fix | Read plan and implement the root-cause fix |
44
+ | Optional `fix-plan.md`, no code changes | Fix | Read fix plan and implement the fix |
45
+ | Code/test changes, no review artifact | Review | Run tests if safe, then invoke `/prizmkit-code-review` |
46
+ | Review artifact or optional `fix-report.md` | User verification | Ask user whether to verify manually before commit |
47
+ | Commit ahead on fix branch | Merge decision | Ask merge / keep branch / decide later |
41
48
 
42
- Note: Bug-fix Phases 1-3 (Diagnosis, Triage, Reproduce) collapse to Phase 1 because they don't produce persistent artifacts. If interrupted during these phases, recovery restarts from Phase 1.
49
+ Bug-fix diagnosis, triage, and reproduction do not always create durable artifacts. If interrupted before code changes or a plan artifact, restart from diagnosis rather than guessing.
43
50
 
44
- ### Feature-Workflow Recovery
51
+ ### Feature Recovery
45
52
 
46
- | Detected State | Resume From | Actions |
47
- |---------------|------------|---------|
48
- | No `.prizmkit/plans/feature-list.json` | Phase 1: Brainstorm | Cannot recover conversation context. Start requirement clarification, leverage workspace content |
49
- | `.prizmkit/plans/feature-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `feature-pipeline-launcher` |
50
- | `.prizmkit/plans/feature-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status via `feature-pipeline-launcher` (Intent B) |
53
+ | Detected state | Resume from | Actions |
54
+ |---|---|---|
55
+ | No feature list and no Fast Path artifacts | Route selection | Clarify whether to plan, implement Fast Path, or start app planning |
56
+ | `spec.md` or `plan.md` with feature context | Fast Path continuation | Continue implementation, review, retrospective, or commit based on diff |
57
+ | `.prizmkit/plans/feature-list.json`, no pipeline state | Launch | Invoke `feature-pipeline-launcher` |
58
+ | Feature list plus `.prizmkit/state/features/` | Monitor/recover | Check launcher status or run recovery script |
51
59
 
52
- ### Refactor-Workflow Recovery
60
+ ### Refactor Recovery
53
61
 
54
- | Detected State | Resume From | Actions |
55
- |---------------|------------|---------|
56
- | No `.prizmkit/plans/refactor-list.json` | Phase 1: Brainstorm | Start refactoring goal clarification |
57
- | `.prizmkit/plans/refactor-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `refactor-pipeline-launcher` |
58
- | `.prizmkit/plans/refactor-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status |
62
+ | Detected state | Resume from | Actions |
63
+ |---|---|---|
64
+ | No refactor list and no Fast Path artifacts | Route selection | Clarify behavior-preserving refactor goal |
65
+ | `spec.md` or `plan.md` with refactor context | Fast Path continuation | Continue implementation, behavior checks, review, retrospective, or commit |
66
+ | `.prizmkit/plans/refactor-list.json`, no pipeline state | Launch | Invoke `refactor-pipeline-launcher` |
67
+ | Refactor list plus `.prizmkit/state/refactor/` | Monitor/recover | Check launcher status or run recovery script |