prizmkit 1.1.114 → 1.1.116

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 (77) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/.env.example +0 -1
  3. package/bundled/dev-pipeline/README.md +4 -6
  4. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +40 -518
  5. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +27 -99
  6. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +283 -0
  7. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +3 -13
  8. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +2 -0
  9. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +0 -1
  10. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +14 -2
  11. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +25 -31
  12. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -8
  13. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -3
  14. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +13 -7
  15. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +13 -1
  16. package/bundled/dev-pipeline/scripts/continuation.py +8 -40
  17. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +76 -261
  18. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +16 -35
  19. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -34
  20. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +6 -0
  21. package/bundled/dev-pipeline/scripts/init-pipeline.py +6 -0
  22. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +6 -0
  23. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
  24. package/bundled/dev-pipeline/scripts/prompt_framework.py +114 -63
  25. package/bundled/dev-pipeline/scripts/update-bug-status.py +3 -7
  26. package/bundled/dev-pipeline/scripts/update-checkpoint.py +54 -22
  27. package/bundled/dev-pipeline/scripts/update-feature-status.py +3 -7
  28. package/bundled/dev-pipeline/scripts/update-refactor-status.py +3 -7
  29. package/bundled/dev-pipeline/scripts/utils.py +6 -37
  30. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  31. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +1 -1
  32. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +9 -91
  33. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -66
  34. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +10 -16
  35. package/bundled/dev-pipeline/templates/feature-list-schema.json +32 -17
  36. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -16
  37. package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -16
  38. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +1 -1
  39. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
  40. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
  41. package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -1
  42. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +1 -1
  43. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +1 -1
  44. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +1 -1
  45. package/bundled/dev-pipeline/tests/conftest.py +1 -0
  46. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +164 -0
  47. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +48 -76
  48. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +25 -3
  49. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +25 -5
  50. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +329 -16
  51. package/bundled/dev-pipeline/tests/test_unified_cli.py +40 -9
  52. package/bundled/skills/_metadata.json +1 -1
  53. package/bundled/skills/bug-planner/SKILL.md +5 -4
  54. package/bundled/skills/bug-planner/references/verification.md +29 -0
  55. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +8 -0
  56. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +2 -2
  57. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +1 -6
  58. package/bundled/skills/feature-pipeline-launcher/SKILL.md +6 -12
  59. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +0 -1
  60. package/bundled/skills/feature-planner/SKILL.md +13 -12
  61. package/bundled/skills/feature-planner/assets/planning-guide.md +2 -2
  62. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +8 -11
  63. package/bundled/skills/prizmkit-plan/SKILL.md +15 -1
  64. package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +101 -0
  65. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +5 -5
  66. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +2 -7
  67. package/bundled/skills/refactor-planner/SKILL.md +10 -8
  68. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +9 -0
  69. package/bundled/team/prizm-dev-team.json +2 -9
  70. package/package.json +1 -1
  71. package/bundled/agents/prizm-dev-team-critic.md +0 -179
  72. package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +0 -8
  73. package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +0 -22
  74. package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +0 -61
  75. package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +0 -38
  76. package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +0 -22
  77. package/bundled/skills/bug-planner/references/critic-and-verification.md +0 -44
@@ -1,22 +0,0 @@
1
- ### Plan Challenge — Critic Agent
2
-
3
- **Guard**: Verify critic agent file exists before spawning:
4
-
5
- ```bash
6
- {{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
7
- ```
8
-
9
- If `CRITIC:MISSING`, mark `critic-plan-review` as `skipped` and continue.
10
-
11
- **Focus**: Challenge the bug diagnosis and fix plan before implementation:
12
- - Is the root cause actually supported by the evidence?
13
- - Does the reproduction test prove the bug before the fix?
14
- - Is the fix minimal, or does it mask the symptom?
15
- - Are adjacent regressions likely?
16
- - Does manual/hybrid verification policy match `{{VERIFICATION_TYPE}}`?
17
-
18
- Spawn `prizm-dev-team-critic` with default/no worktree isolation. Do not request AI tool-created worktree isolation.
19
-
20
- The Critic writes `.prizmkit/bugfix/{{BUG_ID}}/challenge-report.md`. Resolve CRITICAL/HIGH findings before implementation, or document why the plan stands.
21
-
22
- **Checkpoint update**: Set step `critic-plan-review` to `completed` after challenges are resolved, or `skipped` when critic is unavailable.
@@ -1,61 +0,0 @@
1
- ### Plan Challenge — Critic Agent(s)
2
-
3
- **Guard**: Verify critic agent file exists before spawning:
4
- ```bash
5
- {{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
6
- ```
7
- If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan Challenge."
8
-
9
- **Choose ONE path based on `{{CRITIC_COUNT}}`:**
10
-
11
- **Agent spawn failure policy**:
12
- - If spawning Critic fails with team/config/lock errors, retry at most once.
13
- - If the second attempt fails, do not keep spawning variants. Either create the required team once (when team tooling is available) or perform the plan challenge inline and write the required challenge report yourself.
14
- - Record the fallback in the report; do not burn multiple minutes on repeated identical spawn failures.
15
-
16
- **No silent report polling**:
17
- - Do NOT run a long no-output loop waiting for `challenge-report*.md`.
18
- - If you need to wait for a report file, use a short bounded check (≤120s) that prints elapsed time and reports present on every iteration.
19
- - If reports are still missing after the bounded check, request one status update; if still missing, perform the missing challenge lens inline and continue.
20
-
21
- **If {{CRITIC_COUNT}} = 1 → Single Critic** (skip to CP-2.5 after this):
22
-
23
- **Spawn Agent**:
24
- | Parameter | Value |
25
- |-----------|-------|
26
- | subagent_type | prizm-dev-team-critic |
27
- | mode | plan |
28
- | run_in_background | false |
29
- | isolation | default/no worktree; do not request worktree isolation |
30
-
31
- No-worktree boundary: this prevents AI tool-created `.claude/worktrees/...` subagent worktrees. It does not disable PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...`, which are controlled separately by `USE_WORKTREE`.
32
-
33
- **Prompt**:
34
- > {{AGENT_PROMPT_CRITIC_PLAN_CHALLENGE}}
35
-
36
- **If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
37
-
38
- Spawn 3 Critic agents in PARALLEL (issue all 3 Agent tool calls in the SAME message turn). Do NOT wait for one before spawning the next. Each with mode="plan", run_in_background=false, and default/no worktree isolation; do not request worktree isolation.
39
-
40
- No-worktree boundary: default/no worktree isolation prevents AI tool-created `.claude/worktrees/...` subagent worktrees. It does not disable PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...`, which are controlled separately by `USE_WORKTREE`.
41
-
42
- Critic-A prompt (append to base prompt above):
43
- > "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
44
- > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-A.md`."
45
-
46
- Critic-B prompt (append to base prompt above):
47
- > "**Focus Lens: Data Model & Edge Cases.** Prioritize: data model design fit, entity relationships, edge cases in business logic, missing boundary conditions.
48
- > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-B.md`."
49
-
50
- Critic-C prompt (append to base prompt above):
51
- > "**Focus Lens: Security & Performance.** Prioritize: security attack surface, authentication/authorization gaps, performance bottlenecks, resource leaks.
52
- > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-C.md`."
53
-
54
- After all critics return, read all 3 reports:
55
- - Challenge raised by **2/3 or more** critics → **must respond** (adjust plan or justify why not)
56
- - Challenge raised by **1/3 only** → logged in context-snapshot but not blocking
57
- - Max 1 plan revision round.
58
-
59
- **CP-2.5**: Plan challenges reviewed and resolved.
60
-
61
-
@@ -1,38 +0,0 @@
1
- ### Plan Challenge — Critic Agent
2
-
3
- **Guard**: Verify critic agent file exists before spawning:
4
- ```bash
5
- {{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
6
- ```
7
- If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan Challenge."
8
-
9
- **Spawn Agent**:
10
- | Parameter | Value |
11
- |-----------|-------|
12
- | subagent_type | prizm-dev-team-critic |
13
- | mode | plan |
14
- | run_in_background | false |
15
- | isolation | default/no worktree; do not request worktree isolation |
16
-
17
- No-worktree boundary: this prevents AI tool-created `.claude/worktrees/...` subagent worktrees. It does not disable PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...`, which are controlled separately by `USE_WORKTREE`.
18
-
19
- **Prompt**:
20
- > {{AGENT_PROMPT_CRITIC_PLAN_CHALLENGE}}
21
-
22
- **Agent spawn failure policy**:
23
- - If spawning Critic fails with team/config/lock errors, retry at most once.
24
- - If the second attempt fails, do not keep spawning variants. Either create the required team once (when team tooling is available) or perform the plan challenge inline and write `challenge-report.md` yourself.
25
- - Record the fallback in the report; do not burn multiple minutes on repeated identical spawn failures.
26
-
27
- **No silent report polling**:
28
- - Do NOT run a long no-output loop waiting for `challenge-report.md`.
29
- - If you need to wait for the report file, use a short bounded check (≤120s) that prints elapsed time and whether the report exists on every iteration.
30
- - If the report is still missing after the bounded check, request one status update; if still missing, perform the challenge inline and continue.
31
-
32
- Wait for Critic to return.
33
- - Read challenge-report.md. For items marked CRITICAL/HIGH: decide whether to adjust plan.md or document why the plan stands.
34
- - Max 1 plan revision round.
35
-
36
- **CP-2.5**: Plan challenges reviewed and resolved.
37
-
38
-
@@ -1,22 +0,0 @@
1
- ### Plan Challenge — Critic Agent
2
-
3
- **Guard**: Verify critic agent file exists before spawning:
4
-
5
- ```bash
6
- {{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
7
- ```
8
-
9
- If `CRITIC:MISSING`, mark `critic-plan-review` as `skipped` and continue.
10
-
11
- **Focus**: Challenge behavior preservation and plan safety before implementation:
12
- - Is observable behavior clearly defined and protected?
13
- - Do existing/new tests cover the behavior affected by this refactor?
14
- - Is the plan too broad for the stated scope?
15
- - Are file moves/renames safe for imports, public APIs, and integrations?
16
- - Is rollback realistic?
17
-
18
- Spawn `prizm-dev-team-critic` with default/no worktree isolation. Do not request AI tool-created worktree isolation.
19
-
20
- The Critic writes `.prizmkit/refactor/{{REFACTOR_ID}}/challenge-report.md`. Resolve CRITICAL/HIGH findings before implementation, or document why the plan stands.
21
-
22
- **Checkpoint update**: Set step `critic-plan-review` to `completed` after challenges are resolved, or `skipped` when critic is unavailable.
@@ -1,44 +0,0 @@
1
- # Adversarial Critic Review & Browser Verification
2
-
3
- ## Adversarial Critic Review (Testing Defaults)
4
-
5
- All bug fixes support optional critic review for additional quality assurance. The planner enables critic review by default for critical/high severity bugs and leaves it disabled for medium/low bugs; users can override per bug.
6
-
7
- ### Default Critic Behavior
8
-
9
- | Severity | `critic` | `critic_count` | Rationale |
10
- |----------|----------|----------------|-----------|
11
- | critical | `true` | `1` | Single critic review for critical bugs |
12
- | high | `true` | `1` | Single critic review for high-severity bugs |
13
- | medium | `false` | (omitted) | Skip critic for medium-severity bugs |
14
- | low | `false` | (omitted) | Skip critic for low-severity bugs |
15
-
16
- - `critic: true` — Enable adversarial review after fix implementation
17
- - `critic_count: 1` — Single critic agent reviews the fix
18
- - Critic verifies: fix addresses root cause, no regressions introduced, acceptance criteria met
19
-
20
- **User Override**: During Phase 2 or Phase 3, users can opt to enable/disable critic on a per-bug basis.
21
-
22
- ## Browser Verification
23
-
24
- Bug fixes can use `browser_interaction` when the bug is reproducible through a UI. The `verification_type` field still declares the overall verification mode:
25
-
26
- - `verification_type: automated` — Use unit/integration tests to verify the fix
27
- - `verification_type: manual` — Describe manual testing steps in acceptance criteria (including any browser verification steps)
28
- - `verification_type: hybrid` — Combine automated tests with manual browser verification steps
29
-
30
- For UI-related bugs, add `browser_interaction.verify_steps` when concrete browser goals are known. Also keep acceptance criteria measurable so the bugfix session can verify the fix without asking the user.
31
-
32
- ### Example
33
-
34
- ```
35
- Bug Title: Login error message not displaying
36
- Verification Type: manual
37
- Acceptance Criteria:
38
- 1. Navigate to /login with invalid credentials
39
- 2. Verify error message "Invalid email or password" appears below the email field
40
- 3. Verify error message is red (#FF0000)
41
- 4. Verify form fields are still enabled and can be re-submitted
42
- ```
43
-
44
- The bugfix pipeline AI will use these criteria during manual verification.