prizmkit 1.1.99 → 1.1.100
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/dev-pipeline/lib/common.sh +244 -25
- package/bundled/dev-pipeline/reset-bug.sh +30 -0
- package/bundled/dev-pipeline/reset-feature.sh +30 -0
- package/bundled/dev-pipeline/reset-refactor.sh +30 -0
- package/bundled/dev-pipeline/run-bugfix.sh +128 -13
- package/bundled/dev-pipeline/run-feature.sh +130 -14
- package/bundled/dev-pipeline/run-refactor.sh +128 -13
- package/bundled/dev-pipeline/scripts/check-session-status.py +74 -1
- package/bundled/dev-pipeline/scripts/continuation.py +374 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +27 -30
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +15 -20
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -20
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +146 -16
- package/bundled/dev-pipeline/scripts/update-bug-status.py +214 -6
- package/bundled/dev-pipeline/scripts/update-feature-status.py +237 -6
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +214 -6
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +2 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +3 -3
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +31 -66
- package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
- package/bundled/dev-pipeline/tests/conftest.py +1 -0
- package/bundled/dev-pipeline/tests/test_auto_skip.py +510 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +103 -0
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +60 -0
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +43 -0
- package/bundled/dev-pipeline-windows/lib/common.ps1 +172 -10
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +93 -9
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +34 -0
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +1 -0
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +1 -0
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +1 -0
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +74 -1
- package/bundled/dev-pipeline-windows/scripts/continuation.py +374 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +27 -30
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +16 -20
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +16 -20
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +146 -16
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +214 -6
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +237 -6
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +214 -6
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +1 -1
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +2 -2
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +3 -3
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +3 -3
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline-windows/templates/sections/log-size-awareness.md +31 -68
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +1 -1
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
- package/bundled/dev-pipeline/scripts/monitor-log.sh +0 -104
- package/bundled/dev-pipeline-windows/scripts/monitor-log.ps1 +0 -102
|
@@ -12,7 +12,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
12
12
|
|
|
13
13
|
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed.
|
|
14
14
|
|
|
15
|
-
**Tier 1 — Single Agent**: You handle everything directly. No normal work subagents
|
|
15
|
+
**Tier 1 — Single Agent**: You handle everything directly. No normal work subagents. No TeamCreate.
|
|
16
16
|
|
|
17
17
|
### Feature Description
|
|
18
18
|
|
|
@@ -145,7 +145,7 @@ You know this project's tech stack. Identify ALL test commands that apply (e.g.,
|
|
|
145
145
|
- Runs tests using `TEST_CMD` after each task
|
|
146
146
|
- Writes '## Implementation Log' to `context-snapshot.md`
|
|
147
147
|
|
|
148
|
-
**3b-
|
|
148
|
+
**3b-checkpoint.** Context management — if plan.md has more than 5 tasks, update durable checkpoints/artifacts after every 3 tasks, minimize output, and continue. If context overflow occurs in a headless run, the runner starts a fresh continuation session from those checkpoints and artifacts. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
|
|
149
149
|
|
|
150
150
|
**3c.** After implement completes, verify:
|
|
151
151
|
1. All tasks in plan.md are `[x]`
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATURE_TITLE}}".
|
|
12
12
|
|
|
13
|
-
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn normal work subagents, wait for each to finish (run_in_background=false).
|
|
13
|
+
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn normal work subagents, wait for each to finish (run_in_background=false).
|
|
14
14
|
|
|
15
15
|
**Tier 2 — Dual Agent**: You handle context + planning directly. Then spawn Dev and Reviewer subagents. Spawn Dev and Reviewer agents via the Agent tool.
|
|
16
16
|
|
|
@@ -276,7 +276,7 @@ Prompt:
|
|
|
276
276
|
> ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
277
277
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
278
278
|
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
|
|
279
|
-
> 3. If plan.md has more than 5 tasks:
|
|
279
|
+
> 3. If plan.md has more than 5 tasks: update durable checkpoints/artifacts after every 3 tasks, minimize output, and rely on runner continuation if context overflow occurs. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
|
|
280
280
|
> 4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
281
281
|
> 5. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
282
282
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
@@ -604,7 +604,7 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
|
|
|
604
604
|
- Build context-snapshot.md FIRST; all subagents read it instead of re-reading source files
|
|
605
605
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
|
|
606
606
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
607
|
-
- Do NOT use `run_in_background=true` when spawning normal work subagents
|
|
607
|
+
- Do NOT use `run_in_background=true` when spawning normal work subagents
|
|
608
608
|
- **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
|
|
609
609
|
- NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
|
|
610
610
|
- `/prizmkit-committer` is mandatory, and must not be replaced with manual git commit commands
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATURE_TITLE}}".
|
|
12
12
|
|
|
13
|
-
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn normal work subagents, wait for each to finish (run_in_background=false).
|
|
13
|
+
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn normal work subagents, wait for each to finish (run_in_background=false). Do NOT spawn work agents in background and exit — that kills the session.
|
|
14
14
|
|
|
15
15
|
**Tier 3 — Full Team**: For complex features, use the full pipeline (Phase 0–6) with Dev + Reviewer agents spawned via the Agent tool.
|
|
16
16
|
|
|
@@ -284,7 +284,7 @@ Prompt:
|
|
|
284
284
|
> ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
285
285
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
286
286
|
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
|
|
287
|
-
> 3. If plan.md has more than 5 tasks:
|
|
287
|
+
> 3. If plan.md has more than 5 tasks: update durable checkpoints/artifacts after every 3 tasks, minimize output, and rely on runner continuation if context overflow occurs. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
|
|
288
288
|
> 4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
289
289
|
> 5. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
290
290
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
@@ -638,7 +638,7 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
|
|
|
638
638
|
- Tier 3: full team — Dev (implementation) → Reviewer (review) — spawn agents directly via Agent tool
|
|
639
639
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
|
|
640
640
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
641
|
-
- Do NOT use `run_in_background=true` when spawning normal work agents
|
|
641
|
+
- Do NOT use `run_in_background=true` when spawning normal work agents
|
|
642
642
|
- Commit phase must use `/prizmkit-committer`; do NOT replace with manual git commit commands
|
|
643
643
|
- **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
|
|
644
644
|
- NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
|
|
@@ -13,7 +13,7 @@ You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
|
|
|
13
13
|
|
|
14
14
|
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed.
|
|
15
15
|
|
|
16
|
-
**SUBAGENT LIFECYCLE**:
|
|
16
|
+
**SUBAGENT LIFECYCLE**: Any normal work subagent must be awaited with `run_in_background=false`. Do not spawn persistent background subagents for headless recovery.
|
|
17
17
|
|
|
18
18
|
**NON-INTERACTIVE MODE**: There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input. Make decisions autonomously and move forward.
|
|
19
19
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}: "{{REFACTOR_TITLE}}".
|
|
14
14
|
|
|
15
|
-
**CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn normal work subagents, you MUST **wait for each to finish** (run_in_background=false) before proceeding.
|
|
15
|
+
**CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn normal work subagents, you MUST **wait for each to finish** (run_in_background=false) before proceeding. Do NOT spawn a work agent in the background and exit — that kills the session.
|
|
16
16
|
|
|
17
17
|
**NON-INTERACTIVE MODE**: You are running in headless non-interactive mode. There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, NEVER use interactive prompts (e.g. "Would you like me to…"). If a skill has an interactive step (e.g. offer remediation, ask for approval), skip it and proceed autonomously. Make decisions based on the data available and move forward.
|
|
18
18
|
|
|
@@ -185,7 +185,7 @@ Evidence must cover affected UI render, primary user interactions, behavior-sens
|
|
|
185
185
|
|
|
186
186
|
{{END_IF_BROWSER_INTERACTION}}
|
|
187
187
|
|
|
188
|
-
7. If the refactor involves multiple files:
|
|
188
|
+
7. If the refactor involves multiple files: update durable checkpoints/artifacts at the midpoint, minimize output, and rely on runner continuation if context overflow occurs. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
|
|
189
189
|
8. After all tasks complete, run the full test suite one final time
|
|
190
190
|
"
|
|
191
191
|
- **Wait for Dev to return**
|
|
@@ -337,4 +337,4 @@ Write to: `{{SESSION_STATUS_PATH}}`
|
|
|
337
337
|
- **Commit with** `refactor(<scope>):` prefix, NOT `feat:` or `fix:`
|
|
338
338
|
- **Run full retrospective** (Job 1 + Job 2) — refactoring changes code structure
|
|
339
339
|
- ALWAYS write session-status.json before exiting
|
|
340
|
-
- Do NOT use `run_in_background=true` when spawning normal work agents
|
|
340
|
+
- Do NOT use `run_in_background=true` when spawning normal work agents
|
|
@@ -1,76 +1,41 @@
|
|
|
1
|
-
## Session Log Budget
|
|
1
|
+
## Session Log Budget Awareness (CHECKPOINT GUIDANCE)
|
|
2
2
|
|
|
3
|
-
Your session log grows with every tool call and
|
|
4
|
-
|
|
3
|
+
Your session log grows with every tool call and agent interaction. Use this
|
|
4
|
+
section as passive checkpoint guidance only; do not spawn a background helper for
|
|
5
|
+
log-size checks.
|
|
5
6
|
|
|
6
|
-
###
|
|
7
|
+
### Checkpoint Before Large Work Batches
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
- `MAX_LOG_SIZE` controls whether this advisory section is included. It is not a
|
|
10
|
+
runtime recovery mechanism.
|
|
11
|
+
- Before major phases or large task batches, update durable artifacts that a
|
|
12
|
+
continuation session can trust: plan/task checkboxes, context snapshots,
|
|
13
|
+
implementation or review notes, workflow checkpoints, session status, and test
|
|
14
|
+
reports where applicable.
|
|
15
|
+
- Keep command output small. Capture large outputs to temporary files and read
|
|
16
|
+
only filtered summaries needed for the current decision.
|
|
17
|
+
- Prefer already-built context snapshots and manifests over broad source-file
|
|
18
|
+
re-reads.
|
|
10
19
|
|
|
11
|
-
|
|
12
|
-
Run this command and keep it running:
|
|
13
|
-
bash {{LOG_MONITOR_SCRIPT}} {{SESSION_LOG_PATH}} {{MAX_LOG_SIZE}} {{LOG_MONITOR_POLL_INTERVAL}} {{LOG_MONITOR_STATUS_FILE}} {{LOG_MONITOR_BASELINE_FILE}}
|
|
14
|
-
```
|
|
20
|
+
### Headless Recovery Source of Truth
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
- Headless recovery must rely on durable checkpoints and artifacts, not an
|
|
23
|
+
interactive slash command.
|
|
24
|
+
- If context overflow still occurs, the runner detects the overflow and starts a
|
|
25
|
+
fresh continuation session from checkpoint files and durable artifacts.
|
|
26
|
+
- Durable checkpoint files and artifacts are the source of truth for what was
|
|
27
|
+
completed, what remains, and the tests or review gates already run.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
### Interactive Claude Code Note
|
|
20
30
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
The status file contains structured diagnostics:
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"status": "OK | COMPACT_NEEDED",
|
|
30
|
-
"total_bytes": <current session.log size>,
|
|
31
|
-
"baseline_bytes": <size after last /compact>,
|
|
32
|
-
"effective_bytes": <total - baseline, incremental growth>,
|
|
33
|
-
"threshold_bytes": <{{MAX_LOG_SIZE}}>,
|
|
34
|
-
"overage_bytes": <effective - threshold, 0 when OK>,
|
|
35
|
-
"usage_pct": <effective / threshold * 100>
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Extract fields for decision-making:
|
|
40
|
-
```bash
|
|
41
|
-
status=$(jq -r '.status' {{LOG_MONITOR_STATUS_FILE}})
|
|
42
|
-
effective=$(jq -r '.effective_bytes' {{LOG_MONITOR_STATUS_FILE}})
|
|
43
|
-
overage=$(jq -r '.overage_bytes' {{LOG_MONITOR_STATUS_FILE}})
|
|
44
|
-
usage=$(jq -r '.usage_pct' {{LOG_MONITOR_STATUS_FILE}})
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
3. **On COMPACT_NEEDED** (effective_bytes > {{MAX_LOG_SIZE}} bytes, {{MAX_LOG_SIZE_HUMAN}}):
|
|
48
|
-
- Check `overage_bytes` to decide urgency:
|
|
49
|
-
- **Minor overage** (< 512KB): complete the current sub-step, update durable workflow checkpoint artifacts, write baseline, `/compact`
|
|
50
|
-
- **Major overage** (>= 512KB): update durable workflow checkpoint artifacts, write baseline, `/compact` — do NOT start new work
|
|
51
|
-
- Write baseline before `/compact`:
|
|
52
|
-
```bash
|
|
53
|
-
wc -c < {{SESSION_LOG_PATH}} > {{LOG_MONITOR_BASELINE_FILE}}
|
|
54
|
-
```
|
|
55
|
-
- Execute `/compact`
|
|
56
|
-
- Continue the workflow after `/compact`; re-read this status file before the next major phase
|
|
57
|
-
|
|
58
|
-
### How the Baseline Prevents Infinite Compaction Loops
|
|
59
|
-
|
|
60
|
-
- Before the first `/compact`: baseline = 0, effective = full log size → triggers when log exceeds threshold
|
|
61
|
-
- After `/compact`: baseline = current log size, effective ≈ 0 → status resets to OK
|
|
62
|
-
- The monitor only triggers again when **new** log growth since the last compact exceeds the threshold
|
|
63
|
-
- Each `/compact` resets the baseline, breaking the infinite loop
|
|
31
|
+
- `/compact` may help when a human is manually operating an interactive Claude
|
|
32
|
+
Code session.
|
|
33
|
+
- `/compact` is optional interactive convenience only. It must not be required
|
|
34
|
+
for headless recovery and must not be delegated to a background helper.
|
|
64
35
|
|
|
65
36
|
### Log Growth Reduction Tips
|
|
66
37
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
### What Survives
|
|
73
|
-
|
|
74
|
-
- All git commits are permanent
|
|
75
|
-
- The workflow checkpoint is preserved and auto-resumed
|
|
76
|
-
- `/compact` compresses context without losing progress
|
|
38
|
+
- Reuse context-snapshot.md instead of re-reading files already summarized there.
|
|
39
|
+
- Filter command output before loading it into context.
|
|
40
|
+
- Keep agent prompts focused and avoid unnecessary transcript expansion.
|
|
41
|
+
- Checkpoint often so automatic continuation can resume from durable state.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"status": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict"]
|
|
18
|
+
"enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict", "context_overflow"]
|
|
19
19
|
},
|
|
20
20
|
"completed_phases": {
|
|
21
21
|
"type": "array",
|
|
@@ -24,5 +24,6 @@ def _load_hyphenated_module(module_name, filename):
|
|
|
24
24
|
# Register hyphenated script files so tests can import them with underscores.
|
|
25
25
|
_load_hyphenated_module("generate_bootstrap_prompt", "generate-bootstrap-prompt.py")
|
|
26
26
|
_load_hyphenated_module("generate_bugfix_prompt", "generate-bugfix-prompt.py")
|
|
27
|
+
_load_hyphenated_module("generate_refactor_prompt", "generate-refactor-prompt.py")
|
|
27
28
|
_load_hyphenated_module("prizmkit_test_gate", "prizmkit-test-gate.py")
|
|
28
29
|
_load_hyphenated_module("update_feature_status", "update-feature-status.py")
|