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.
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
- package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
- package/bundled/dev-pipeline/.env.example +45 -0
- package/bundled/dev-pipeline/README.md +64 -64
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
- package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +64 -18
- package/bundled/dev-pipeline/launch-feature-daemon.sh +15 -12
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +64 -18
- package/bundled/dev-pipeline/lib/branch.sh +6 -1
- package/bundled/dev-pipeline/lib/common.sh +71 -0
- package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
- package/bundled/dev-pipeline/reset-bug.sh +10 -9
- package/bundled/dev-pipeline/reset-feature.sh +9 -8
- package/bundled/dev-pipeline/reset-refactor.sh +10 -9
- package/bundled/dev-pipeline/retry-bugfix.sh +67 -29
- package/bundled/dev-pipeline/retry-feature.sh +54 -18
- package/bundled/dev-pipeline/retry-refactor.sh +112 -29
- package/bundled/dev-pipeline/run-bugfix.sh +281 -59
- package/bundled/dev-pipeline/run-feature.sh +53 -18
- package/bundled/dev-pipeline/run-refactor.sh +392 -66
- package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
- package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
- package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +57 -33
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +25 -9
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +104 -17
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -9
- package/bundled/dev-pipeline/scripts/init-pipeline.py +10 -10
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +19 -8
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +167 -22
- package/bundled/dev-pipeline/scripts/update-feature-status.py +104 -62
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +351 -21
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +6 -15
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
- package/bundled/dev-pipeline/templates/feature-list-schema.json +109 -31
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +11 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/skills/_metadata.json +5 -22
- package/bundled/skills/app-planner/SKILL.md +98 -72
- package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
- package/bundled/skills/bug-fix-workflow/SKILL.md +52 -9
- package/bundled/skills/bug-planner/SKILL.md +139 -197
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +4 -8
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +34 -39
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +49 -36
- package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
- package/bundled/skills/feature-planner/SKILL.md +53 -142
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
- package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
- package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
- package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills/feature-planner/references/error-recovery.md +16 -35
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +19 -20
- package/bundled/skills/feature-workflow/SKILL.md +24 -25
- package/bundled/skills/prizm-kit/SKILL.md +39 -49
- package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
- package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
- package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
- package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
- package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
- package/bundled/skills/prizmkit-init/SKILL.md +112 -65
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
- package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
- package/bundled/skills/recovery-workflow/SKILL.md +22 -22
- package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +48 -40
- package/bundled/skills/refactor-planner/SKILL.md +43 -61
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
- package/bundled/skills/refactor-workflow/SKILL.md +23 -24
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
- package/package.json +1 -1
- package/src/clean.js +3 -4
- package/src/gitignore-template.js +7 -9
- package/src/scaffold.js +14 -5
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
- package/bundled/skills/app-planner/references/project-conventions.md +0 -93
- package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
- package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
- package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
- package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
- package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
- package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
- package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Bug Confirmation Templates
|
|
2
|
+
|
|
3
|
+
## Per-Bug Confirmation Template
|
|
4
|
+
|
|
5
|
+
Present this after extracting and clarifying each bug:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─ Bug Confirmation: B-NNN ─────────────────────────────
|
|
9
|
+
│ Title: <auto-suggested title>
|
|
10
|
+
│ Description: <expected vs actual behavior>
|
|
11
|
+
│ Severity: <auto-classified> | Verification: <type>
|
|
12
|
+
│
|
|
13
|
+
│ Reproduction: <steps if available, or "not provided">
|
|
14
|
+
│ Affected: <module/feature or "unknown">
|
|
15
|
+
│
|
|
16
|
+
│ Acceptance Criteria (fix verified when):
|
|
17
|
+
│ 1. <criterion — specific enough for automated pipeline to verify>
|
|
18
|
+
│ 2. <criterion>
|
|
19
|
+
│
|
|
20
|
+
│ Open Questions:
|
|
21
|
+
│ - <any unclear points, or "None">
|
|
22
|
+
└────────────────────────────────────────────────────────
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then ask three confirmation questions:
|
|
26
|
+
1. "描述是否准确?是否需要修改?" / "Is the description accurate? Any corrections?"
|
|
27
|
+
2. "是否需要补充更多细节?(复现步骤、环境信息、相关代码位置等)" / "Need to add more details? (reproduction steps, environment, related code locations, etc.)"
|
|
28
|
+
3. "验证条件是否具体到 pipeline 可以自主判断修复成功?" / "Are the acceptance criteria specific enough that the pipeline can autonomously verify the fix?"
|
|
29
|
+
|
|
30
|
+
Only finalize the bug entry after user confirms all three points.
|
|
31
|
+
|
|
32
|
+
## Completeness Review Template
|
|
33
|
+
|
|
34
|
+
Display during Phase 4 pre-generation review:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
┌─ Completeness Review ─────────────────────────────────────────────────
|
|
38
|
+
│ Bug │ Description │ Criteria │ Reproducible │ Notes
|
|
39
|
+
│ B-001 │ ✓ Clear │ ✓ Specific │ ✓ Yes │ —
|
|
40
|
+
│ B-002 │ ⚠ Vague │ ⚠ Subjective│ ✓ Yes │ "encoding works" → needs specific test case
|
|
41
|
+
│ B-003 │ ✓ Clear │ ⚠ No metric│ ⚠ No steps │ needs perf threshold + reproduction steps
|
|
42
|
+
└────────────────────────────────────────────────────────────────────────
|
|
43
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
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 critic mechanism is disabled by default but can be enabled per-bug based on severity and complexity.
|
|
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
|
+
**Browser verification is a feature-pipeline capability only.** Bug fixes use the `verification_type` field instead:
|
|
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 that require visual verification (e.g., "Button doesn't show error message"), describe the verification steps in acceptance criteria.
|
|
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.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Error Recovery & Resume Support
|
|
2
|
+
|
|
3
|
+
Reference document for bug-planner error handling and session recovery. Load this when validation fails, a session is interrupted, or existing artifacts are detected.
|
|
4
|
+
|
|
5
|
+
## Validation Failure Handling
|
|
6
|
+
|
|
7
|
+
### Warnings Only
|
|
8
|
+
|
|
9
|
+
If `validate-bug-list.py` returns warnings but no errors:
|
|
10
|
+
1. Present warnings to user
|
|
11
|
+
2. Ask: "Proceed with these warnings, or fix them first?"
|
|
12
|
+
3. If user approves → write file and continue
|
|
13
|
+
4. If user wants fixes → address each warning, re-validate
|
|
14
|
+
|
|
15
|
+
### Errors Found
|
|
16
|
+
|
|
17
|
+
If validation returns errors:
|
|
18
|
+
1. Group errors by type (missing fields, invalid values, duplicate IDs, broken references)
|
|
19
|
+
2. Auto-fix where possible:
|
|
20
|
+
- Missing `status` → set to `pending`
|
|
21
|
+
- Duplicate IDs → re-number with next sequential B-NNN
|
|
22
|
+
- Invalid `priority` → re-derive from severity using the mapping table
|
|
23
|
+
3. Present fixes to user for confirmation
|
|
24
|
+
4. Re-validate after fixes
|
|
25
|
+
5. Maximum 3 total validation attempts — if still failing after 3 rounds, present the raw errors and ask user for guidance
|
|
26
|
+
|
|
27
|
+
### JSON Parse Failure
|
|
28
|
+
|
|
29
|
+
If the generated JSON is malformed:
|
|
30
|
+
1. Do not write the file
|
|
31
|
+
2. Regenerate from the collected bug data (Phase 2-3 state)
|
|
32
|
+
3. Re-validate before writing
|
|
33
|
+
|
|
34
|
+
## Resume Support
|
|
35
|
+
|
|
36
|
+
### Checkpoint-Based Resumption
|
|
37
|
+
|
|
38
|
+
When bug-planner detects existing artifacts, determine the last completed checkpoint and offer to resume:
|
|
39
|
+
|
|
40
|
+
| Existing Artifact | Last Checkpoint | Resume From |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `.prizmkit/plans/bug-fix-list.json` (valid) | CP-BP-5 | Offer: "Valid bug list exists. Append new bugs (Route B) or regenerate?" |
|
|
43
|
+
| `.prizmkit/plans/bug-fix-list.json` (invalid) | CP-BP-4 | Re-run Phase 5 validation and fix |
|
|
44
|
+
| `.prizmkit/plans/bug-fix-list.draft.json` | CP-BP-2 or CP-BP-3 | Load draft, determine phase from content completeness, resume |
|
|
45
|
+
| `.prizmkit/config.json` with tech_stack | CP-BP-1 (partial) | Skip project context questions, start at Phase 2 |
|
|
46
|
+
| No artifacts | — | Start from Phase 1 |
|
|
47
|
+
|
|
48
|
+
### Resume Detection Flow
|
|
49
|
+
|
|
50
|
+
1. Check for `.prizmkit/plans/bug-fix-list.json`
|
|
51
|
+
- If exists and valid → offer Route B (append) or full regeneration
|
|
52
|
+
- If exists but invalid → offer to fix and re-validate (resume from CP-BP-4)
|
|
53
|
+
2. Check for `.prizmkit/plans/bug-fix-list.draft.json`
|
|
54
|
+
- If exists → load draft, count bugs with/without confirmation, resume from appropriate phase
|
|
55
|
+
3. Check for `.prizmkit/config.json`
|
|
56
|
+
- If exists with tech_stack → skip Phase 1 context gathering
|
|
57
|
+
4. If no artifacts → start fresh (Route A)
|
|
58
|
+
|
|
59
|
+
### Session Interruption Recovery
|
|
60
|
+
|
|
61
|
+
If a bug-planner session is interrupted mid-planning:
|
|
62
|
+
|
|
63
|
+
1. On next invocation, run the Resume Detection Flow above
|
|
64
|
+
2. If a draft exists, present: "Found a draft with N bugs from a previous session. Resume from where you left off, or start fresh?"
|
|
65
|
+
3. If user resumes → load draft state, skip completed phases
|
|
66
|
+
4. If user starts fresh → archive draft as `bug-fix-list.draft.TIMESTAMP.json`, begin Phase 1
|
|
67
|
+
|
|
68
|
+
## Draft Management
|
|
69
|
+
|
|
70
|
+
- Save drafts to `.prizmkit/plans/bug-fix-list.draft.json` after each completed phase (CP-BP-1 through CP-BP-4)
|
|
71
|
+
- Drafts use the same schema as the final file but may have incomplete fields
|
|
72
|
+
- Delete draft after successful generation of the final `bug-fix-list.json`
|
|
73
|
+
- Keep at most 1 draft — overwrite on each phase completion
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Bug Input Format Detection & Extraction
|
|
2
|
+
|
|
3
|
+
Auto-detect the user's input format and extract structured bug information accordingly.
|
|
4
|
+
|
|
5
|
+
## Format A: Stack Trace / Error Log
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
TypeError: Cannot read property 'token' of null
|
|
9
|
+
at AuthService.handleLogin (src/services/auth.ts:42)
|
|
10
|
+
at LoginPage.onSubmit (src/pages/login.tsx:28)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Extract: `error_source.type="stack_trace"`, `error_message`, `stack_trace`, `affected_modules`
|
|
14
|
+
|
|
15
|
+
## Format B: Natural Language User Report
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
When I click the login button with correct credentials, the page turns white.
|
|
19
|
+
Expected: redirect to home page.
|
|
20
|
+
Actual: white screen with no error message visible.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Extract: `error_source.type="user_report"`, `reproduction_steps`, `description` (expected vs actual)
|
|
24
|
+
|
|
25
|
+
## Format C: Failed Test Output
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
FAIL src/services/__tests__/auth.test.ts
|
|
29
|
+
● AuthService > handleLogin > should return token on success
|
|
30
|
+
Expected: "abc123"
|
|
31
|
+
Received: null
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Extract: `error_source.type="failed_test"`, `failed_test_path`, `error_message`
|
|
35
|
+
|
|
36
|
+
## Format D: Log Pattern
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
[2026-03-07 10:23:45] ERROR [auth-service] Connection timeout after 30000ms
|
|
40
|
+
[2026-03-07 10:23:45] ERROR [auth-service] Failed to authenticate user: ETIMEDOUT
|
|
41
|
+
[2026-03-07 10:23:46] ERROR [auth-service] Connection timeout after 30000ms
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Extract: `error_source.type="log_pattern"`, `log_snippet`, `affected_modules`
|
|
45
|
+
|
|
46
|
+
## Format E: Monitoring Alert
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
ALERT: CPU usage > 95% for auth-service pod (5min avg)
|
|
50
|
+
ALERT: Error rate spike: 500 errors/min on /api/login endpoint
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Extract: `error_source.type="monitoring_alert"`, `error_message`, `affected_modules`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Schema Validation Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist for manual validation when `validate-bug-list.py` is not available. The script is the source of truth — this checklist mirrors its logic.
|
|
4
|
+
|
|
5
|
+
## Required Top-Level Fields
|
|
6
|
+
|
|
7
|
+
- [ ] `$schema`: must be `"dev-pipeline-bug-fix-list-v1"`
|
|
8
|
+
- [ ] `project_name`: non-empty string
|
|
9
|
+
- [ ] `bugs`: non-empty array
|
|
10
|
+
|
|
11
|
+
## Per-Bug Required Fields
|
|
12
|
+
|
|
13
|
+
- [ ] `id`: matches pattern `B-NNN` (e.g., `B-001`)
|
|
14
|
+
- [ ] `title`: non-empty string
|
|
15
|
+
- [ ] `description`: non-empty string
|
|
16
|
+
- [ ] `severity`: one of `critical`, `high`, `medium`, `low`
|
|
17
|
+
- [ ] `error_source.type`: one of `stack_trace`, `user_report`, `failed_test`, `log_pattern`, `monitoring_alert`
|
|
18
|
+
- [ ] `verification_type`: one of `automated`, `manual`, `hybrid`
|
|
19
|
+
- [ ] `acceptance_criteria`: non-empty array of strings
|
|
20
|
+
- [ ] `status`: must be `pending` for new bugs
|
|
21
|
+
|
|
22
|
+
## Consistency Checks
|
|
23
|
+
|
|
24
|
+
- [ ] No duplicate bug IDs
|
|
25
|
+
- [ ] If `priority` is set, must be one of `high`, `medium`, `low`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Severity Auto-Classification Rules
|
|
2
|
+
|
|
3
|
+
When extracting bugs, apply these rules to auto-suggest severity:
|
|
4
|
+
|
|
5
|
+
| Severity | Indicators | Examples |
|
|
6
|
+
|----------|------------|----------|
|
|
7
|
+
| **critical** | System crash, data loss, security breach, OOM, unrecoverable error | `Segmentation fault`, `OutOfMemoryError`, `SQL injection vulnerability`, `Database corrupted` |
|
|
8
|
+
| **high** | Core feature broken, authentication failure, data integrity issue, timeout | `Auth token invalid`, `Payment failed`, `Connection timeout`, `500 Internal Server Error` |
|
|
9
|
+
| **medium** | Feature partially broken, workaround exists, incorrect output | `CSV encoding issue`, `Pagination not working`, `Wrong date format`, `Missing validation` |
|
|
10
|
+
| **low** | Cosmetic issue, minor inconvenience, edge case | `UI misalignment`, `Typo in error message`, `Slow loading (non-critical page)`, `Non-breaking warning` |
|
|
11
|
+
|
|
12
|
+
## Special Cases
|
|
13
|
+
|
|
14
|
+
- Failed test → medium (unless test covers critical path, then high)
|
|
15
|
+
- User report with "cannot use app" → high
|
|
16
|
+
- User report with "annoying but works" → low
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
Validate bug-fix-list.json against the PrizmKit bug-fix-list schema.
|
|
3
|
+
Validate .prizmkit/plans/bug-fix-list.json against the PrizmKit bug-fix-list schema.
|
|
4
4
|
|
|
5
5
|
Usage:
|
|
6
|
-
python3 validate-bug-list.py [bug-fix-list.json] [--feature-list feature-list.json]
|
|
6
|
+
python3 validate-bug-list.py [.prizmkit/plans/bug-fix-list.json] [--feature-list .prizmkit/plans/feature-list.json]
|
|
7
7
|
|
|
8
8
|
Exit codes:
|
|
9
9
|
0 = valid
|
|
@@ -19,7 +19,7 @@ import re
|
|
|
19
19
|
VALID_SEVERITIES = {"critical", "high", "medium", "low"}
|
|
20
20
|
VALID_SOURCE_TYPES = {"stack_trace", "user_report", "failed_test", "log_pattern", "monitoring_alert"}
|
|
21
21
|
VALID_VERIFICATION_TYPES = {"automated", "manual", "hybrid"}
|
|
22
|
-
VALID_STATUSES = {"pending", "
|
|
22
|
+
VALID_STATUSES = {"pending", "triaging", "reproducing", "fixing", "verifying", "completed", "failed", "needs_info", "skipped"}
|
|
23
23
|
BUG_ID_PATTERN = re.compile(r"^B-\d{3}$")
|
|
24
24
|
SCHEMA_VERSION = "dev-pipeline-bug-fix-list-v1"
|
|
25
25
|
|
|
@@ -117,10 +117,6 @@ def validate(bug_list_path, feature_list_path=None):
|
|
|
117
117
|
if priority not in ("high", "medium", "low"):
|
|
118
118
|
errors.append(f"{prefix} ({bug_id}): invalid priority '{priority}' — must be one of 'high', 'medium', 'low'")
|
|
119
119
|
|
|
120
|
-
# Cross-reference affected_feature
|
|
121
|
-
affected_feature = bug.get("affected_feature")
|
|
122
|
-
if affected_feature and feature_ids and affected_feature not in feature_ids:
|
|
123
|
-
warnings.append(f"{prefix} ({bug_id}): affected_feature '{affected_feature}' not found in feature-list.json")
|
|
124
120
|
|
|
125
121
|
# Output results
|
|
126
122
|
if errors:
|
|
@@ -145,7 +141,7 @@ def validate(bug_list_path, feature_list_path=None):
|
|
|
145
141
|
|
|
146
142
|
|
|
147
143
|
if __name__ == "__main__":
|
|
148
|
-
bug_list = sys.argv[1] if len(sys.argv) > 1 else "bug-fix-list.json"
|
|
144
|
+
bug_list = sys.argv[1] if len(sys.argv) > 1 else ".prizmkit/plans/bug-fix-list.json"
|
|
149
145
|
feature_list = None
|
|
150
146
|
|
|
151
147
|
if "--feature-list" in sys.argv:
|
|
@@ -17,7 +17,7 @@ Three execution modes are available. The user chooses one before configuring oth
|
|
|
17
17
|
|
|
18
18
|
**Background mode documentation**: When the user chooses background/daemon mode, record the choice and PID in `.prizmkit/bugfix-pipeline-run.log` (append-only) with timestamp, so the decision is traceable:
|
|
19
19
|
```
|
|
20
|
-
[2026-03-26T10:30:00] MODE=daemon PID=12345 BUG_LIST
|
|
20
|
+
[2026-03-26T10:30:00] MODE=daemon PID=12345 BUG_LIST=.prizmkit/plans/bug-fix-list.json BUGS=3
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### When to Use
|
|
@@ -48,7 +48,7 @@ Three execution modes are available. The user chooses one before configuring oth
|
|
|
48
48
|
Before any action, validate:
|
|
49
49
|
|
|
50
50
|
1. **bugfix pipeline exists**: Confirm `dev-pipeline/launch-bugfix-daemon.sh` and `dev-pipeline/run-bugfix.sh` are present and executable
|
|
51
|
-
2. **For start**:
|
|
51
|
+
2. **For start**: `.prizmkit/plans/bug-fix-list.json` must exist in `.prizmkit/plans/` (or user-specified path)
|
|
52
52
|
3. **Dependencies**: `jq`, `python3`, AI CLI (`cbc` or `claude`) must be in PATH
|
|
53
53
|
|
|
54
54
|
Quick check:
|
|
@@ -56,8 +56,8 @@ Quick check:
|
|
|
56
56
|
command -v jq && command -v python3 && (command -v cbc || command -v claude) && echo "All dependencies OK"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
If
|
|
60
|
-
> "No bug-fix-list.json found. Run the `bug-planner` skill first to generate one, or provide a path to your bug fix list."
|
|
59
|
+
If `.prizmkit/plans/bug-fix-list.json` is missing, inform user:
|
|
60
|
+
> "No .prizmkit/plans/bug-fix-list.json found. Run the `bug-planner` skill first to generate one, or provide a path to your bug fix list."
|
|
61
61
|
|
|
62
62
|
### Workflow
|
|
63
63
|
|
|
@@ -69,7 +69,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
69
69
|
|
|
70
70
|
1. **Check prerequisites**:
|
|
71
71
|
```bash
|
|
72
|
-
ls bug-fix-list.json 2>/dev/null && echo "Found" || echo "Missing"
|
|
72
|
+
ls .prizmkit/plans/bug-fix-list.json 2>/dev/null && echo "Found" || echo "Missing"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
2. **Check not already running**:
|
|
@@ -82,7 +82,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
82
82
|
```bash
|
|
83
83
|
python3 -c "
|
|
84
84
|
import json
|
|
85
|
-
with open('bug-fix-list.json') as f:
|
|
85
|
+
with open('.prizmkit/plans/bug-fix-list.json') as f:
|
|
86
86
|
data = json.load(f)
|
|
87
87
|
bugs = data.get('bugs', [])
|
|
88
88
|
severity_order = {'critical': 0, 'high': 1, 'medium': 2, 'low': 3}
|
|
@@ -101,8 +101,8 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
101
101
|
If pipeline state already exists, use the status command instead:
|
|
102
102
|
```bash
|
|
103
103
|
python3 dev-pipeline/scripts/update-bug-status.py \
|
|
104
|
-
--bug-list bug-fix-list.json \
|
|
105
|
-
--state-dir
|
|
104
|
+
--bug-list .prizmkit/plans/bug-fix-list.json \
|
|
105
|
+
--state-dir .prizmkit/state/bugfix \
|
|
106
106
|
--action status 2>/dev/null
|
|
107
107
|
```
|
|
108
108
|
|
|
@@ -117,20 +117,16 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
117
117
|
|
|
118
118
|
Use `AskUserQuestion` to present the following configuration choices. Each question is a separate selectable option:
|
|
119
119
|
|
|
120
|
-
**Question 1 —
|
|
121
|
-
- Off (default) — Skip adversarial review
|
|
122
|
-
- On — Enable critic review after bug fix (+2-5 min/bug for critical/high severity)
|
|
123
|
-
|
|
124
|
-
**Question 2 — Verbose logging** (multiSelect: false):
|
|
120
|
+
**Question 1 — Verbose logging** (multiSelect: false):
|
|
125
121
|
- On (default) — Detailed AI session logs including tool calls and subagent activity
|
|
126
122
|
- Off — Minimal logging
|
|
127
123
|
|
|
128
|
-
**Question
|
|
124
|
+
**Question 2 — Max retries** (multiSelect: false):
|
|
129
125
|
- 3 (default)
|
|
130
126
|
- 1
|
|
131
127
|
- 5
|
|
132
128
|
|
|
133
|
-
**Question
|
|
129
|
+
**Question 3 — Session timeout** (multiSelect: false):
|
|
134
130
|
- None (default) — No timeout
|
|
135
131
|
- 30 min — `SESSION_TIMEOUT=1800`
|
|
136
132
|
- 1 hour — `SESSION_TIMEOUT=3600`
|
|
@@ -142,7 +138,6 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
142
138
|
|
|
143
139
|
| Config choice | Environment variable |
|
|
144
140
|
|-----------|---------------------|
|
|
145
|
-
| Critic: On | `ENABLE_CRITIC=true` |
|
|
146
141
|
| Verbose: Off | `VERBOSE=0` |
|
|
147
142
|
| Verbose: On | `VERBOSE=1` |
|
|
148
143
|
| Max retries: N | `MAX_RETRIES=N` |
|
|
@@ -168,34 +163,34 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
168
163
|
|
|
169
164
|
**Foreground command:**
|
|
170
165
|
```bash
|
|
171
|
-
VERBOSE=1 dev-pipeline/run-bugfix.sh run bug-fix-list.json
|
|
166
|
+
VERBOSE=1 dev-pipeline/run-bugfix.sh run .prizmkit/plans/bug-fix-list.json
|
|
172
167
|
```
|
|
173
168
|
With all options:
|
|
174
169
|
```bash
|
|
175
170
|
VERBOSE=1 MAX_RETRIES=5 SESSION_TIMEOUT=3600 \
|
|
176
|
-
dev-pipeline/run-bugfix.sh run bug-fix-list.json
|
|
171
|
+
dev-pipeline/run-bugfix.sh run .prizmkit/plans/bug-fix-list.json
|
|
177
172
|
```
|
|
178
173
|
|
|
179
174
|
**Background daemon command:**
|
|
180
175
|
```bash
|
|
181
|
-
dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json --env "VERBOSE=1"
|
|
176
|
+
dev-pipeline/launch-bugfix-daemon.sh start .prizmkit/plans/bug-fix-list.json --env "VERBOSE=1"
|
|
182
177
|
```
|
|
183
178
|
With all options:
|
|
184
179
|
```bash
|
|
185
|
-
dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json \
|
|
180
|
+
dev-pipeline/launch-bugfix-daemon.sh start .prizmkit/plans/bug-fix-list.json \
|
|
186
181
|
--env "VERBOSE=1 MAX_RETRIES=5"
|
|
187
182
|
```
|
|
188
183
|
|
|
189
184
|
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 7.
|
|
190
185
|
```
|
|
191
186
|
# To run in foreground:
|
|
192
|
-
VERBOSE=1 dev-pipeline/run-bugfix.sh run bug-fix-list.json
|
|
187
|
+
VERBOSE=1 dev-pipeline/run-bugfix.sh run .prizmkit/plans/bug-fix-list.json
|
|
193
188
|
|
|
194
189
|
# To run in background (detached):
|
|
195
|
-
dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json --env "VERBOSE=1"
|
|
190
|
+
dev-pipeline/launch-bugfix-daemon.sh start .prizmkit/plans/bug-fix-list.json --env "VERBOSE=1"
|
|
196
191
|
|
|
197
192
|
# To check status:
|
|
198
|
-
dev-pipeline/run-bugfix.sh status bug-fix-list.json
|
|
193
|
+
dev-pipeline/run-bugfix.sh status .prizmkit/plans/bug-fix-list.json
|
|
199
194
|
```
|
|
200
195
|
|
|
201
196
|
7. **Confirm and launch** (Foreground and Background only — Manual mode ends at step 6):
|
|
@@ -208,7 +203,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
208
203
|
|
|
209
204
|
**If foreground**: Pipeline runs to completion in the terminal. After it finishes:
|
|
210
205
|
- Summarize results: total bugs, fixed, failed, skipped
|
|
211
|
-
- If all fixed: each bug session has already run `prizmkit-retrospective` (structural sync)
|
|
206
|
+
- If all fixed: each bug session has already run `prizmkit-retrospective` internally (structural sync by default; full retrospective when the fix changed interfaces, dependencies, or observable behavior). Ask user what's next.
|
|
212
207
|
- If some failed: show failed bug IDs and suggest `retry-bugfix.sh <B-XXX>` or `dev-pipeline/reset-bug.sh <B-XXX> --clean --run`
|
|
213
208
|
|
|
214
209
|
**If background daemon**:
|
|
@@ -218,7 +213,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
218
213
|
```
|
|
219
214
|
2. Start log monitoring — Use the Bash tool with `run_in_background: true`:
|
|
220
215
|
```bash
|
|
221
|
-
tail -f
|
|
216
|
+
tail -f .prizmkit/state/bugfix/pipeline-daemon.log
|
|
222
217
|
```
|
|
223
218
|
3. Report to user:
|
|
224
219
|
- Pipeline PID
|
|
@@ -238,14 +233,14 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
238
233
|
2. **Show bug-level progress**:
|
|
239
234
|
```bash
|
|
240
235
|
python3 dev-pipeline/scripts/update-bug-status.py \
|
|
241
|
-
--bug-list bug-fix-list.json \
|
|
242
|
-
--state-dir
|
|
236
|
+
--bug-list .prizmkit/plans/bug-fix-list.json \
|
|
237
|
+
--state-dir .prizmkit/state/bugfix \
|
|
243
238
|
--action status
|
|
244
239
|
```
|
|
245
240
|
|
|
246
241
|
3. **Show recent log activity** (last 20 lines):
|
|
247
242
|
```bash
|
|
248
|
-
tail -20
|
|
243
|
+
tail -20 .prizmkit/state/bugfix/pipeline-daemon.log
|
|
249
244
|
```
|
|
250
245
|
|
|
251
246
|
4. **Summarize** to user: total bugs, completed, in-progress, failed, pending, needs-info.
|
|
@@ -277,20 +272,20 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
277
272
|
|
|
278
273
|
2. **If running** -- Start live tail with Bash tool `run_in_background: true`:
|
|
279
274
|
```bash
|
|
280
|
-
tail -f
|
|
275
|
+
tail -f .prizmkit/state/bugfix/pipeline-daemon.log
|
|
281
276
|
```
|
|
282
277
|
|
|
283
278
|
3. **If not running** -- Show last 50 lines:
|
|
284
279
|
```bash
|
|
285
|
-
tail -50
|
|
280
|
+
tail -50 .prizmkit/state/bugfix/pipeline-daemon.log
|
|
286
281
|
```
|
|
287
282
|
|
|
288
283
|
4. **For per-bug session logs** (when user asks about a specific bug):
|
|
289
284
|
```bash
|
|
290
285
|
# Check bug status for last session ID
|
|
291
|
-
cat
|
|
286
|
+
cat .prizmkit/state/bugfix/bugs/<BUG_ID>/status.json 2>/dev/null
|
|
292
287
|
# Then tail that bug's session log
|
|
293
|
-
tail -100
|
|
288
|
+
tail -100 .prizmkit/state/bugfix/bugs/<BUG_ID>/sessions/<SESSION_ID>/logs/session.log
|
|
294
289
|
```
|
|
295
290
|
|
|
296
291
|
---
|
|
@@ -300,35 +295,35 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
300
295
|
When user says "retry B-001":
|
|
301
296
|
|
|
302
297
|
```bash
|
|
303
|
-
dev-pipeline/retry-bugfix.sh B-001 bug-fix-list.json
|
|
298
|
+
dev-pipeline/retry-bugfix.sh B-001 .prizmkit/plans/bug-fix-list.json
|
|
304
299
|
```
|
|
305
300
|
|
|
306
|
-
**Note:** `retry-bugfix.sh`
|
|
301
|
+
**Note:** `retry-bugfix.sh` runs exactly one bug session and exits. It **preserves prior session artifacts and checkpoint state** — reads `retry_count` and `resume_from_phase` from `status.json` so the AI session can resume from where it left off. For a full clean retry, use `dev-pipeline/reset-bug.sh <B-XXX> --clean --run`.
|
|
307
302
|
|
|
308
303
|
Environment variables (optional):
|
|
309
304
|
```bash
|
|
310
|
-
SESSION_TIMEOUT=3600 dev-pipeline/retry-bugfix.sh B-001 bug-fix-list.json
|
|
305
|
+
SESSION_TIMEOUT=3600 dev-pipeline/retry-bugfix.sh B-001 .prizmkit/plans/bug-fix-list.json
|
|
311
306
|
```
|
|
312
307
|
|
|
313
308
|
### Error Handling
|
|
314
309
|
|
|
315
310
|
| Error | Action |
|
|
316
311
|
|-------|--------|
|
|
317
|
-
|
|
|
312
|
+
| `.prizmkit/plans/bug-fix-list.json` not found | Tell user to run `bug-planner` skill first |
|
|
318
313
|
| `jq` not installed | Suggest: `brew install jq` |
|
|
319
314
|
| `cbc`/`claude` not in PATH | Check AI CLI installation |
|
|
320
315
|
| Bugfix pipeline already running | Show status, ask if user wants to stop and restart |
|
|
321
316
|
| PID file stale (process dead) | `launch-bugfix-daemon.sh` auto-cleans, retry start |
|
|
322
|
-
| Launch failed (process died immediately) | Show last 20 lines of log: `tail -20
|
|
317
|
+
| Launch failed (process died immediately) | Show last 20 lines of log: `tail -20 .prizmkit/state/bugfix/pipeline-daemon.log` |
|
|
323
318
|
| All bugs blocked/failed/needs-info | Show status, suggest retrying or providing more info |
|
|
324
319
|
| Permission denied on script | Run `chmod +x dev-pipeline/launch-bugfix-daemon.sh dev-pipeline/run-bugfix.sh` |
|
|
325
320
|
|
|
326
321
|
### Integration Notes
|
|
327
322
|
|
|
328
|
-
- **After bug-planner**: This is the natural next step. When user finishes bug planning and has
|
|
323
|
+
- **After bug-planner**: This is the natural next step. When user finishes bug planning and has `.prizmkit/plans/bug-fix-list.json`, suggest launching the bugfix pipeline.
|
|
329
324
|
- **Session independence**: In daemon mode, the bugfix pipeline runs completely detached. User can close the AI CLI, open a new session later, and use this skill to check progress or stop the pipeline.
|
|
330
325
|
- **Single instance**: Only one bugfix pipeline can run at a time. The PID file prevents duplicates.
|
|
331
|
-
- **Feature pipeline coexistence**: Bugfix and feature pipelines use separate state directories (
|
|
326
|
+
- **Feature pipeline coexistence**: Bugfix and feature pipelines use separate state directories (`.prizmkit/state/bugfix/` vs `.prizmkit/state/features/`), so they can run simultaneously without conflict.
|
|
332
327
|
- **State preservation**: Stopping and restarting the bugfix pipeline resumes from where it left off -- completed bugs are not re-fixed.
|
|
333
328
|
- **Bug ordering**: Bugs are processed by severity (critical → high → medium → low), then by priority number within the same severity.
|
|
334
329
|
- **Background mode traceability**: When daemon mode is chosen, the decision is logged to `.prizmkit/bugfix-pipeline-run.log` with timestamp, PID, and bug count for auditability.
|