prizmkit 1.0.153 → 1.1.0

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 (81) hide show
  1. package/bin/create-prizmkit.js +27 -2
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/claude/paths.js +1 -1
  4. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +482 -57
  5. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +2 -6
  6. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +6 -0
  7. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +6 -0
  8. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +7 -1
  9. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +11 -0
  10. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +9 -0
  11. package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +12 -0
  12. package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +7 -0
  13. package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +8 -0
  14. package/bundled/dev-pipeline/templates/sections/directory-convention-full.md +9 -0
  15. package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +6 -0
  16. package/bundled/dev-pipeline/templates/sections/failure-capture.md +21 -0
  17. package/bundled/dev-pipeline/templates/sections/failure-log-check.md +8 -0
  18. package/bundled/dev-pipeline/templates/sections/feature-context.md +23 -0
  19. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +15 -0
  20. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +15 -0
  21. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +31 -0
  22. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +36 -0
  23. package/bundled/dev-pipeline/templates/sections/phase-commit.md +26 -0
  24. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +14 -0
  25. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +20 -0
  26. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +3 -0
  27. package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +24 -0
  28. package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +45 -0
  29. package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +24 -0
  30. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +36 -0
  31. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +24 -0
  32. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -0
  33. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +32 -0
  34. package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +17 -0
  35. package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +16 -0
  36. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +28 -0
  37. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +36 -0
  38. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +82 -0
  39. package/bundled/dev-pipeline/templates/sections/phase0-init.md +4 -0
  40. package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +12 -0
  41. package/bundled/dev-pipeline/templates/sections/resume-header.md +2 -0
  42. package/bundled/dev-pipeline/templates/sections/session-context.md +6 -0
  43. package/bundled/dev-pipeline/templates/sections/subagent-timeout-recovery.md +6 -0
  44. package/bundled/skills/_metadata.json +21 -177
  45. package/bundled/skills/app-planner/SKILL.md +22 -3
  46. package/bundled/skills/app-planner/references/project-brief-guide.md +110 -0
  47. package/bundled/skills/bug-fix-workflow/SKILL.md +4 -0
  48. package/bundled/skills/bug-planner/SKILL.md +2 -2
  49. package/bundled/skills/dev-pipeline-launcher/SKILL.md +1 -1
  50. package/bundled/skills/prizm-kit/SKILL.md +18 -47
  51. package/bundled/skills/prizm-kit/assets/project-memory-template.md +1 -1
  52. package/bundled/skills/prizmkit-analyze/SKILL.md +4 -4
  53. package/bundled/skills/prizmkit-init/SKILL.md +4 -4
  54. package/bundled/skills/prizmkit-plan/SKILL.md +126 -108
  55. package/bundled/skills/prizmkit-plan/assets/plan-template.md +1 -2
  56. package/bundled/skills/refactor-workflow/SKILL.md +142 -124
  57. package/bundled/team/prizm-dev-team.json +2 -8
  58. package/package.json +1 -1
  59. package/src/clean.js +8 -0
  60. package/src/gitignore-template.js +12 -0
  61. package/src/index.js +3 -22
  62. package/src/scaffold.js +20 -11
  63. package/src/upgrade.js +6 -31
  64. package/bundled/skills/prizmkit-clarify/SKILL.md +0 -93
  65. package/bundled/skills/prizmkit-specify/SKILL.md +0 -118
  66. package/bundled/skills/prizmkit-specify/assets/spec-template.md +0 -56
  67. package/bundled/skills/prizmkit-tool-adr-manager/SKILL.md +0 -67
  68. package/bundled/skills/prizmkit-tool-adr-manager/assets/adr-template.md +0 -26
  69. package/bundled/skills/prizmkit-tool-api-doc-generator/SKILL.md +0 -55
  70. package/bundled/skills/prizmkit-tool-bug-reproducer/SKILL.md +0 -61
  71. package/bundled/skills/prizmkit-tool-ci-cd-generator/SKILL.md +0 -53
  72. package/bundled/skills/prizmkit-tool-db-migration/SKILL.md +0 -64
  73. package/bundled/skills/prizmkit-tool-dependency-health/SKILL.md +0 -122
  74. package/bundled/skills/prizmkit-tool-deployment-strategy/SKILL.md +0 -57
  75. package/bundled/skills/prizmkit-tool-error-triage/SKILL.md +0 -54
  76. package/bundled/skills/prizmkit-tool-log-analyzer/SKILL.md +0 -54
  77. package/bundled/skills/prizmkit-tool-monitoring-setup/SKILL.md +0 -74
  78. package/bundled/skills/prizmkit-tool-onboarding-generator/SKILL.md +0 -69
  79. package/bundled/skills/prizmkit-tool-perf-profiler/SKILL.md +0 -54
  80. package/bundled/skills/prizmkit-tool-security-audit/SKILL.md +0 -129
  81. package/bundled/skills/prizmkit-tool-tech-debt-tracker/SKILL.md +0 -138
@@ -28,7 +28,7 @@ from datetime import datetime, timezone
28
28
  # Ordered pipeline phases — index defines forward-only progression.
29
29
  # Phase detection is monotonic: once a phase is reached, earlier phases
30
30
  # cannot be re-entered (prevents false positives from file content mentions).
31
- PHASE_ORDER = ["specify", "plan", "analyze", "implement", "code-review", "retrospective", "commit"]
31
+ PHASE_ORDER = ["plan", "analyze", "implement", "code-review", "retrospective", "commit"]
32
32
 
33
33
  # Keywords for phase detection.
34
34
  # "strong" keywords are skill invocations — high confidence, but still
@@ -36,13 +36,9 @@ PHASE_ORDER = ["specify", "plan", "analyze", "implement", "code-review", "retros
36
36
  # "weak" keywords are contextual hints — also forward-only, used when no
37
37
  # strong keyword matches.
38
38
  PHASE_KEYWORDS = {
39
- "specify": {
40
- "strong": ["prizmkit-specify"],
41
- "weak": ["spec.md", "specification", "gathering requirements"],
42
- },
43
39
  "plan": {
44
40
  "strong": ["prizmkit-plan"],
45
- "weak": ["plan.md", "architecture", "task checklist", "task breakdown"],
41
+ "weak": ["spec.md", "plan.md", "specification", "architecture", "task checklist", "task breakdown", "gathering requirements"],
46
42
  },
47
43
  "analyze": {
48
44
  "strong": ["prizmkit-analyze"],
@@ -23,6 +23,12 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
23
23
 
24
24
  {{ACCEPTANCE_CRITERIA}}
25
25
 
26
+ ### Project Brief
27
+
28
+ > Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
29
+
30
+ {{PROJECT_BRIEF}}
31
+
26
32
  ### Dependencies (Already Completed)
27
33
 
28
34
  {{COMPLETED_DEPENDENCIES}}
@@ -23,6 +23,12 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
23
23
 
24
24
  {{ACCEPTANCE_CRITERIA}}
25
25
 
26
+ ### Project Brief
27
+
28
+ > Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
29
+
30
+ {{PROJECT_BRIEF}}
31
+
26
32
  ### Dependencies (Already Completed)
27
33
 
28
34
  {{COMPLETED_DEPENDENCIES}}
@@ -23,6 +23,12 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
23
23
 
24
24
  {{ACCEPTANCE_CRITERIA}}
25
25
 
26
+ ### Project Brief
27
+
28
+ > Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
29
+
30
+ {{PROJECT_BRIEF}}
31
+
26
32
  ### Dependencies (Already Completed)
27
33
 
28
34
  {{COMPLETED_DEPENDENCIES}}
@@ -177,7 +183,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
177
183
  ls .prizmkit/specs/{{FEATURE_SLUG}}/spec.md .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null
178
184
  ```
179
185
 
180
- - spec.md missing: Run `/prizmkit-specify` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the feature description — do NOT pause for interactive input.
186
+ - spec.md missing: Run `/prizmkit-plan` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the feature description — do NOT pause for interactive input.
181
187
  - plan.md missing: Run `/prizmkit-plan` → generate plan.md (architecture, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
182
188
 
183
189
  > All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing.
@@ -0,0 +1,11 @@
1
+ ## Context Budget Rules (CRITICAL — read before any phase)
2
+
3
+ You are running in headless mode with a FINITE context window. Exceeding it will crash the session and lose all work. Follow these rules strictly:
4
+
5
+ 1. **context-snapshot.md is your single source of truth** — After it is built, ALWAYS read context-snapshot.md instead of re-reading individual source files
6
+ 2. **Never re-read your own writes** — After you create/modify a file, do NOT read it back to verify. Trust your write was correct.
7
+ 3. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
8
+ 4. **One task at a time** — Complete and test one task before starting the next.
9
+ 5. **Minimize tool output** — When running commands, use `| head -20` or `| tail -20` to limit output. Never dump entire test suites or logs.
10
+ 6. **No intermediate commits** — Do NOT run `git add`/`git commit` during implementation phases. All changes are committed once at the end via `/prizmkit-committer`.
11
+ 7. **Capture test output once** — When running test suites, always use `$TEST_CMD 2>&1 | tee /tmp/test-out.txt | tail -20`. Then grep `/tmp/test-out.txt` for details. Never re-run the suite just to apply a different filter.
@@ -0,0 +1,9 @@
1
+ ## Critical Paths
2
+
3
+ | Resource | Path |
4
+ |----------|------|
5
+ | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
6
+ | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
7
+ | Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
8
+ | Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
9
+ | Project Root | {{PROJECT_ROOT}} |
@@ -0,0 +1,12 @@
1
+ ## Critical Paths
2
+
3
+ | Resource | Path |
4
+ |----------|------|
5
+ | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
6
+ | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
7
+ | Team Config | `{{TEAM_CONFIG_PATH}}` |
8
+ | Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
9
+ | Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
10
+ | Critic Agent Def | {{CRITIC_SUBAGENT_PATH}} |
11
+ | Project Root | {{PROJECT_ROOT}} |
12
+ | Feature List Path | {{FEATURE_LIST_PATH}} |
@@ -0,0 +1,7 @@
1
+ ## Critical Paths
2
+
3
+ | Resource | Path |
4
+ |----------|------|
5
+ | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
6
+ | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
7
+ | Project Root | {{PROJECT_ROOT}} |
@@ -0,0 +1,8 @@
1
+ ## PrizmKit Directory Convention
2
+
3
+ ```
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes
5
+ .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
6
+ ```
7
+
8
+ **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes. Append-only after initial creation.
@@ -0,0 +1,9 @@
1
+ ## PrizmKit Directory Convention
2
+
3
+ ```
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes
5
+ .prizmkit/specs/{{FEATURE_SLUG}}/spec.md
6
+ .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
7
+ ```
8
+
9
+ **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes. This eliminates redundant I/O across all agents.
@@ -0,0 +1,6 @@
1
+ ## PrizmKit Directory Convention
2
+
3
+ ```
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md
5
+ .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
6
+ ```
@@ -0,0 +1,21 @@
1
+ ## Failure Capture Protocol
2
+
3
+ If you encounter an unrecoverable error, context overflow, or are about to exit without completing all phases:
4
+
5
+ 1. Write `.prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md` BEFORE exiting:
6
+ ```
7
+ FAILURE_TYPE: timeout | test_failure | review_rejected | context_overflow | unknown
8
+ PHASE: <which phase failed>
9
+ ROOT_CAUSE: <1-2 sentence explanation>
10
+ ATTEMPTED: <approaches already tried>
11
+ SUGGESTION: <what the next session should try differently>
12
+ DISCOVERED_TRAPS:
13
+ - [CRITICAL|HIGH|LOW] <gotcha discovered during this failed session> | FIX: <approach>
14
+ ```
15
+
16
+ 2. This file is intentionally lightweight — write it BEFORE context runs out.
17
+
18
+ **Lifecycle**: failure-log.md is a temporary cross-session artifact. Do NOT commit it to git. After a successful session (all phases complete + commit done), delete it:
19
+ ```bash
20
+ rm -f .prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md
21
+ ```
@@ -0,0 +1,8 @@
1
+ **Check for previous failure log:**
2
+ ```bash
3
+ cat .prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md 2>/dev/null || echo "NO_PREVIOUS_FAILURE"
4
+ ```
5
+ If failure-log.md exists:
6
+ - Read ROOT_CAUSE and SUGGESTION — adjust your approach accordingly
7
+ - Read DISCOVERED_TRAPS — if any are genuine, inject into .prizm-docs/ during the commit phase retrospective
8
+ - Do NOT delete failure-log.md until this session completes all phases and commits successfully
@@ -0,0 +1,23 @@
1
+ <feature-context>
2
+ ### Feature Description
3
+
4
+ {{FEATURE_DESCRIPTION}}
5
+
6
+ ### Acceptance Criteria
7
+
8
+ {{ACCEPTANCE_CRITERIA}}
9
+
10
+ ### Project Brief
11
+
12
+ > Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
13
+
14
+ {{PROJECT_BRIEF}}
15
+
16
+ ### Dependencies (Already Completed)
17
+
18
+ {{COMPLETED_DEPENDENCIES}}
19
+
20
+ ### App Global Context
21
+
22
+ {{GLOBAL_CONTEXT}}
23
+ </feature-context>
@@ -0,0 +1,15 @@
1
+ ### Analyze — Reviewer Subagent
2
+
3
+ Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
4
+
5
+ Prompt:
6
+ > "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
7
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
8
+ > 2. Run prizmkit-analyze: cross-check `plan.md` (including Tasks section) against feature description and acceptance criteria for consistency.
9
+ > 3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
10
+ > Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
11
+
12
+ Wait for Reviewer to return.
13
+ - If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in plan.md. Then re-run analyze (max 1 round).
14
+
15
+ **CP-2**: No CRITICAL issues.
@@ -0,0 +1,15 @@
1
+ ### Analyze — Reviewer Agent
2
+
3
+ Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
4
+
5
+ Prompt:
6
+ > "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
7
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
8
+ > 2. Run prizmkit-analyze: cross-check `spec.md` and `plan.md` (including Tasks section) for consistency.
9
+ > 3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
10
+ > Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
11
+
12
+ Wait for Reviewer to return.
13
+ - If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in spec.md/plan.md. Then re-run analyze (max 1 round).
14
+
15
+ **CP-2**: No CRITICAL issues.
@@ -0,0 +1,31 @@
1
+ ### Browser Verification (playwright-cli) — MANDATORY
2
+
3
+ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without actually running playwright-cli.
4
+
5
+ **Startup**:
6
+ 1. Check if port is already in use: `lsof -ti:3001 | xargs kill -9 2>/dev/null || true`
7
+ 2. Start dev server: `{{BROWSER_SETUP_COMMAND}}`
8
+ 3. Wait for server to be ready: poll `{{BROWSER_URL}}` with `curl -s -o /dev/null -w "%{http_code}"` until it returns 200 or 302 (max 30 seconds, 2s interval)
9
+ 4. If the page requires authentication, use playwright-cli to register a test user and log in first
10
+
11
+ **Verification**:
12
+ 5. Use `playwright-cli` to open `{{BROWSER_URL}}`, then verify:
13
+ {{BROWSER_VERIFY_STEPS}}
14
+ 6. Take a final screenshot for evidence
15
+
16
+ **Cleanup (REQUIRED — you started it, you stop it)**:
17
+ 7. Stop the dev server process you started in step 2 (kill the process)
18
+ 8. Verify port is released: `lsof -ti:3001 | xargs kill -9 2>/dev/null || true`
19
+
20
+ **Reporting**:
21
+ 9. Append results to `context-snapshot.md`:
22
+ ```
23
+ ## Browser Verification
24
+ URL: {{BROWSER_URL}}
25
+ Steps executed: [list]
26
+ Screenshot: [path]
27
+ Result: PASS / FAIL (reason)
28
+ Server cleanup: confirmed
29
+ ```
30
+
31
+ If verification fails, log the failure details but continue to commit. Failures do NOT block the commit, but you MUST attempt verification and MUST clean up the dev server.
@@ -0,0 +1,36 @@
1
+ ### Architecture Sync & Commit (SINGLE COMMIT) — DO NOT SKIP
2
+
3
+ **For bug fixes**: run `/prizmkit-retrospective` for structural sync only (skip knowledge injection unless a new TRAPS was discovered). Use `fix(<scope>):` commit prefix.
4
+
5
+ **a.** Check if feature already committed:
6
+ ```bash
7
+ git log --oneline | grep "{{FEATURE_ID}}" | head -3
8
+ ```
9
+ - If a commit for `{{FEATURE_ID}}` already exists → **skip d** (do NOT run /prizmkit-committer, do NOT run git reset, do NOT stage or unstage anything). Proceed directly to e Final verification.
10
+ - If no existing commit → proceed normally with b–d.
11
+
12
+ **b.** Run `/prizmkit-retrospective` (**before commit**, maintains `.prizm-docs/` architecture index):
13
+ - **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
14
+ - **Architecture knowledge** (feature sessions only): extract TRAPS, RULES, DECISIONS from completed work into `.prizm-docs/`
15
+ - **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
16
+ - Stage doc changes: `git add .prizm-docs/`
17
+ ⚠️ Do NOT commit here. Only stage.
18
+ - **For bug-fix sessions**: structural sync only, skip knowledge injection unless a genuinely new pitfall was discovered
19
+
20
+ **c.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
21
+ ```bash
22
+ git add <specific-files-created-or-modified>
23
+ git add .prizm-docs/
24
+ ```
25
+
26
+ **d.** Run `/prizmkit-committer` → THE ONLY commit for this feature:
27
+ `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
28
+ This single commit includes: feature code + tests + .prizm-docs/ updates. Do NOT push.
29
+ - MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
30
+ - Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
31
+
32
+ **e.** Final verification:
33
+ ```bash
34
+ git status --short
35
+ ```
36
+ Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file> && git commit --amend --no-edit`, do NOT create a separate commit.
@@ -0,0 +1,26 @@
1
+ ### Architecture Sync & Commit (SINGLE COMMIT)
2
+
3
+ **a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
4
+ 1. **Structural sync**: Use `git diff --cached --name-status` to locate changed modules, update KEY_FILES/INTERFACES/DEPENDENCIES/file counts in affected `.prizm-docs/` files
5
+ 2. **Architecture knowledge** (feature sessions only): Extract TRAPS/RULES/DECISIONS from completed work into `.prizm-docs/`
6
+ 3. **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
7
+ 4. Stage doc changes: `git add .prizm-docs/`
8
+ ⚠️ Do NOT commit here. Only stage.
9
+
10
+ **b.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
11
+ ```bash
12
+ git add <specific-files-created-or-modified>
13
+ git add .prizm-docs/
14
+ ```
15
+
16
+ **c.** Run `/prizmkit-committer` → THE ONLY commit for this feature:
17
+ `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
18
+ This single commit includes: feature code + tests + .prizm-docs/ updates. Do NOT push.
19
+ - MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
20
+ - Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
21
+
22
+ **d.** Final verification:
23
+ ```bash
24
+ git status --short
25
+ ```
26
+ Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file> && git commit --amend --no-edit`, do NOT create a separate commit.
@@ -0,0 +1,14 @@
1
+ - **Section 3 — Prizm Context**: full content of root.prizm and relevant L1/L2 docs
2
+ - **Section 4 — File Manifest**: For each file relevant to this feature, list: file path, why it's needed (modify/reference/test), key interface signatures (function names + params + return types). Do NOT include full file content — agents read files on-demand. Format:
3
+ ### Files to Modify
4
+ | File | Why Needed | Key Interfaces |
5
+ |------|-----------|----------------|
6
+ | `<source-dir>/config.js` | Add runtime config layer | `config` (Zod object), `configSchema` |
7
+
8
+ ### Files for Reference
9
+ | File | Why Needed | Key Interfaces |
10
+ |------|-----------|----------------|
11
+ | `<source-dir>/security/permission-guard.js` | Permission check integration | `checkCommandPermission(userId, cmd)` |
12
+
13
+ ### Known TRAPS (from .prizm-docs/)
14
+ - <trap entries extracted from L1/L2 docs>
@@ -0,0 +1,20 @@
1
+ ### Build Context Snapshot
2
+
3
+ ```bash
4
+ ls .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md 2>/dev/null && echo "EXISTS" || echo "MISSING"
5
+ ```
6
+
7
+ If MISSING — build it now:
8
+ 1. Read `.prizm-docs/root.prizm` and relevant L1/L2 prizm docs
9
+ 2. Detect source code directories: read KEY_FILES and STRUCTURE sections from `root.prizm` to identify where source code lives (e.g. `src/`, `app/`, `lib/`, `cmd/`, `packages/`, or project root). If `root.prizm` is missing, scan the project tree:
10
+ ```bash
11
+ find . -maxdepth 2 -type f \( -name "*.js" -o -name "*.ts" -o -name "*.py" -o -name "*.go" -o -name "*.java" -o -name "*.rb" -o -name "*.rs" \) -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/vendor/*' | head -30
12
+ ```
13
+ Identify the top-level source directories from the results.
14
+ 3. Scan the detected source directories for files related to this feature; read each one
15
+ 4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
16
+ - **Section 1 — Feature Brief**: feature description + acceptance criteria (copy from above)
17
+ - **Section 2 — Project Structure**: run the following to get a visual directory tree, then paste output:
18
+ ```bash
19
+ find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
20
+ ```
@@ -0,0 +1,3 @@
1
+ - **Section 3 — Prizm Context**: content of root.prizm and relevant L1/L2 docs
2
+ - **Section 4 — Existing Source Files**: **full verbatim content** of each related file in fenced code blocks (with `### path/to/file` heading and line count). Include ALL files needed for implementation and review — downstream phases read this section instead of re-reading individual source files
3
+ - **Section 5 — Existing Tests**: full content of related test files as code block
@@ -0,0 +1,24 @@
1
+ ### Code Challenge — Critic Agent
2
+
3
+ **Guard**: Verify critic agent file exists before spawning:
4
+ ```bash
5
+ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
6
+ ```
7
+ If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Code Challenge."
8
+
9
+ Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
10
+
11
+ Prompt:
12
+ > "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
13
+ > **MODE: Code Challenge**
14
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
15
+ > 2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
16
+ > 3. Read the actual source files changed (from Implementation Log).
17
+ > 4. Read comparable existing source files in the same module for style comparison.
18
+ > 5. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
19
+ > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
20
+
21
+ Wait for Critic to return.
22
+ - Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
23
+
24
+ **CP-3.5**: Code challenges reviewed and resolved.
@@ -0,0 +1,45 @@
1
+ ### Plan Challenge — Critic Agent(s)
2
+
3
+ **Guard**: Verify critic agent file exists before spawning:
4
+ ```bash
5
+ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "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
+ **If {{CRITIC_COUNT}} = 1 → Single Critic** (skip to CP-2.5 after this):
12
+
13
+ Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
14
+
15
+ Prompt:
16
+ > "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
17
+ > **MODE: Plan Challenge**
18
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
19
+ > 2. Read `.prizm-docs/root.prizm` and relevant L1/L2 docs for affected modules.
20
+ > 3. Read existing source files in the modules this plan touches.
21
+ > 4. Challenge plan.md against the project's existing architecture, patterns, and style.
22
+ > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` with findings (or 'No significant challenges')."
23
+
24
+ **If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
25
+
26
+ Spawn 3 Critic agents sequentially (each with run_in_background=false), each with a different focus lens:
27
+
28
+ Critic-A prompt (append to base prompt above):
29
+ > "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
30
+ > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-A.md`."
31
+
32
+ Critic-B prompt (append to base prompt above):
33
+ > "**Focus Lens: Data Model & Edge Cases.** Prioritize: data model design fit, entity relationships, edge cases in business logic, missing boundary conditions.
34
+ > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-B.md`."
35
+
36
+ Critic-C prompt (append to base prompt above):
37
+ > "**Focus Lens: Security & Performance.** Prioritize: security attack surface, authentication/authorization gaps, performance bottlenecks, resource leaks.
38
+ > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-C.md`."
39
+
40
+ After all critics return, read all 3 reports:
41
+ - Challenge raised by **2/3 or more** critics → **must respond** (adjust plan or justify why not)
42
+ - Challenge raised by **1/3 only** → logged in context-snapshot but not blocking
43
+ - Max 1 plan revision round.
44
+
45
+ **CP-2.5**: Plan challenges reviewed and resolved.
@@ -0,0 +1,24 @@
1
+ ### Plan Challenge — Critic Agent
2
+
3
+ **Guard**: Verify critic agent file exists before spawning:
4
+ ```bash
5
+ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
6
+ ```
7
+ If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan Challenge."
8
+
9
+ Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
10
+
11
+ Prompt:
12
+ > "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
13
+ > **MODE: Plan Challenge**
14
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
15
+ > 2. Read `.prizm-docs/root.prizm` and relevant L1/L2 docs for affected modules.
16
+ > 3. Read existing source files in the modules this plan touches.
17
+ > 4. Challenge plan.md against the project's existing architecture, patterns, and style.
18
+ > Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` with findings (or 'No significant challenges')."
19
+
20
+ Wait for Critic to return.
21
+ - Read challenge-report.md. For items marked CRITICAL/HIGH: decide whether to adjust plan.md or document why the plan stands.
22
+ - Max 1 plan revision round.
23
+
24
+ **CP-2.5**: Plan challenges reviewed and resolved.
@@ -0,0 +1,36 @@
1
+ ### Local Deploy Verification
2
+
3
+ You just implemented this feature — you know the project's tech stack and build tools.
4
+
5
+ 1. **Build**: Run the project's build/compile commands. If a required tool is missing, install it first.
6
+ 2. **Fix**: If build fails with code errors (type errors, missing imports, config issues), fix them (max 2 rounds), then re-verify.
7
+ 3. **Assess and record** — append to context-snapshot.md:
8
+ - **ALL builds pass** → `## Deploy Verification: PASS` — proceed to commit
9
+ - **Some builds fail with fixable errors** → fix and re-verify (already handled in step 2)
10
+ - **Cannot build locally** (missing system-level deps you cannot install) → Generate `DEPLOY.md` with:
11
+ ```
12
+ # Local Development Setup
13
+
14
+ ## Prerequisites
15
+ - [tool]: [install instruction]
16
+
17
+ ## Build Steps
18
+ 1. [exact command]
19
+
20
+ ## Run / Dev Mode
21
+ [exact command to start the app locally]
22
+
23
+ ## Verify
24
+ [how to confirm the app is running correctly]
25
+ ```
26
+ Record: `## Deploy Verification: PARTIAL — see DEPLOY.md for missing prerequisites`
27
+
28
+ Deploy verification does NOT block the commit, but you MUST attempt it.
29
+
30
+ **Smoke test** (only if build passed and project can be started):
31
+ 1. Start the project locally (e.g., `make dev`, `npm start`, `go run .`, etc.)
32
+ 2. Verify basic functionality: hit key endpoints, check health routes, confirm the UI loads
33
+ 3. Stop the server process you started — do NOT leave it running
34
+ 4. Record smoke test results in `## Deploy Verification` section
35
+
36
+ If the project cannot be started locally (e.g., requires external services, databases, credentials), skip the smoke test and note why.
@@ -0,0 +1,24 @@
1
+ ### Implement — Dev Subagent
2
+
3
+ **Build artifacts rule** (passed to Dev): After any build/compile command (`go build`, `npm run build`, `tsc`, etc.), ensure the output binary or build directory is in `.gitignore`. Never commit compiled binaries, build output, or generated artifacts.
4
+
5
+ Spawn Dev subagent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false).
6
+
7
+ Prompt:
8
+ > "Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
9
+ > **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
10
+ > ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
11
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
12
+ > 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Use `TEST_CMD=<TEST_CMD>` for testing. Baseline failures: `BASELINE_FAILURES=<BASELINE_FAILURES>`.
13
+ > 3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
14
+ > 4. Do NOT execute any git commands (no git add/commit/reset/push).
15
+ > Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
16
+
17
+ Wait for Dev to return. All tasks must be `[x]`, tests pass.
18
+
19
+ **Gate Check — Implementation Log**:
20
+ After Dev agent returns, verify the Implementation Log was written:
21
+ ```bash
22
+ grep -q "## Implementation Log" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
23
+ ```
24
+ If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
@@ -0,0 +1,41 @@
1
+ ### Implement — Dev Agent
2
+
3
+ **Build artifacts rule** (passed to Dev): After any build/compile command (`go build`, `npm run build`, `tsc`, etc.), ensure the output binary or build directory is in `.gitignore`. Never commit compiled binaries, build output, or generated artifacts.
4
+
5
+ Before spawning Dev, check plan.md Tasks section:
6
+ ```bash
7
+ grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null || true
8
+ ```
9
+ - If result is `0` (all tasks already `[x]`) → **SKIP this phase**, go directly to Review. Do NOT spawn Dev.
10
+ - If result is non-zero → spawn Dev agent below.
11
+
12
+ Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false).
13
+
14
+ Prompt:
15
+ > "Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
16
+ > **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
17
+ > ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
18
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
19
+ > 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Use `TEST_CMD=<TEST_CMD>` for testing. Baseline failures: `BASELINE_FAILURES=<BASELINE_FAILURES>`.
20
+ > 3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
21
+ > 4. Do NOT execute any git commands (no git add/commit/reset/push).
22
+ > Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
23
+
24
+ **Gate Check — Implementation Log**:
25
+ After Dev agent returns, verify the Implementation Log was written:
26
+ ```bash
27
+ grep -q "## Implementation Log" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
28
+ ```
29
+ If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
30
+
31
+ Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
32
+ 1. Check progress: `grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md`
33
+ 2. If any tasks remain: re-spawn Dev with this recovery prompt:
34
+ > "Read {{DEV_SUBAGENT_PATH}}. You are resuming implementation of feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
35
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Section 4 has File Manifest, 'Implementation Log' (if present) shows what was already done.
36
+ > 2. Run `git diff HEAD` to see actual code changes already made.
37
+ > 3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks. Use `TEST_CMD=<TEST_CMD>` for testing.
38
+ > 4. Do NOT execute any git commands."
39
+ 3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
40
+
41
+ All tasks `[x]`, tests pass.
@@ -0,0 +1,32 @@
1
+ ### Implement + Test
2
+
3
+ **Build artifacts**: After any build/compile command (`go build`, `npm run build`, `tsc`, etc.), ensure the output binary or build directory is in `.gitignore`:
4
+ ```bash
5
+ # Example for Go
6
+ grep -q '^/binary-name$' .gitignore || echo '/binary-name' >> .gitignore
7
+ ```
8
+ Never commit compiled binaries, build output, or generated artifacts.
9
+
10
+ **3a.** Detect test commands and record baseline:
11
+
12
+ You know this project's tech stack. Identify ALL test commands that apply (e.g., `go test ./...`, `npm test`, `cargo test`, `pytest`, `make test`, etc.). Record them as `TEST_CMDS`. Then record baseline:
13
+ ```bash
14
+ # Run each test command, capture output
15
+ $TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
16
+ ```
17
+
18
+ **3b.** Run `/prizmkit-implement` — this handles the full implementation cycle:
19
+ - Reads plan.md Tasks section from `.prizmkit/specs/{{FEATURE_SLUG}}/`
20
+ - Reads context from `context-snapshot.md` (Prizm docs, TRAPS, file manifest)
21
+ - Implements task-by-task with TDD, marking each `[x]` immediately
22
+ - Creates/updates L2 `.prizm` docs when creating new modules or significantly modifying existing ones — AI selectively decides which modules warrant L2 based on complexity and importance
23
+ - Runs tests using `TEST_CMD` after each task
24
+ - Writes '## Implementation Log' to `context-snapshot.md`
25
+
26
+ **3c.** After implement completes, verify:
27
+ 1. All tasks in plan.md are `[x]`
28
+ 2. Run the full test suite to ensure nothing is broken
29
+ 3. Verify each acceptance criterion from Section 1 of context-snapshot.md is met — check mentally, do NOT re-read files you already wrote
30
+ 4. If any criterion is not met, fix it now (max 2 fix rounds)
31
+
32
+ **CP-2**: All acceptance criteria met, all tests pass.