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
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# monitor-log.sh — Background log size monitor for AI session subagent
|
|
3
|
-
#
|
|
4
|
-
# Polls session.log size, computes effective size (current - baseline),
|
|
5
|
-
# and writes a structured JSON status file. Intended to be run by a
|
|
6
|
-
# background subagent inside the AI CLI session.
|
|
7
|
-
#
|
|
8
|
-
# Usage:
|
|
9
|
-
# bash monitor-log.sh <session_log> <max_size> <poll_interval> <status_file> <baseline_file>
|
|
10
|
-
#
|
|
11
|
-
# Status file format (JSON, rewritten each poll cycle):
|
|
12
|
-
# {
|
|
13
|
-
# "status": "OK" | "COMPACT_NEEDED",
|
|
14
|
-
# "total_bytes": <current session.log size in bytes>,
|
|
15
|
-
# "baseline_bytes": <baseline size from last compact>,
|
|
16
|
-
# "effective_bytes": <total - baseline>,
|
|
17
|
-
# "threshold_bytes": <compact threshold>,
|
|
18
|
-
# "overage_bytes": <effective - threshold, 0 if not exceeded>,
|
|
19
|
-
# "usage_pct": <effective / threshold * 100, integer>
|
|
20
|
-
# }
|
|
21
|
-
|
|
22
|
-
SESSION_LOG="${1}"
|
|
23
|
-
MAX_SIZE="${2}"
|
|
24
|
-
POLL_INTERVAL="${3}"
|
|
25
|
-
STATUS_FILE="${4}"
|
|
26
|
-
BASELINE_FILE="${5}"
|
|
27
|
-
|
|
28
|
-
# Validate required args
|
|
29
|
-
if [[ -z "$SESSION_LOG" || -z "$MAX_SIZE" || -z "$POLL_INTERVAL" || -z "$STATUS_FILE" || -z "$BASELINE_FILE" ]]; then
|
|
30
|
-
echo "Usage: $0 <session_log> <max_size> <poll_interval> <status_file> <baseline_file>" >&2
|
|
31
|
-
exit 1
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# Ensure status dir exists
|
|
35
|
-
mkdir -p "$(dirname "$STATUS_FILE")"
|
|
36
|
-
|
|
37
|
-
# Validate numeric args
|
|
38
|
-
if ! [[ "$MAX_SIZE" =~ ^[0-9]+$ ]]; then
|
|
39
|
-
echo "ERROR: max_size must be a non-negative integer" >&2
|
|
40
|
-
exit 1
|
|
41
|
-
fi
|
|
42
|
-
if ! [[ "$POLL_INTERVAL" =~ ^[0-9]+$ ]] || [[ "$POLL_INTERVAL" -le 0 ]]; then
|
|
43
|
-
echo "ERROR: poll_interval must be a positive integer" >&2
|
|
44
|
-
exit 1
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
echo "[monitor-log] Starting log monitor: max=${MAX_SIZE} interval=${POLL_INTERVAL}s" >&2
|
|
48
|
-
echo "[monitor-log] Watching: $SESSION_LOG" >&2
|
|
49
|
-
|
|
50
|
-
while true; do
|
|
51
|
-
# Read current log size
|
|
52
|
-
if [[ -f "$SESSION_LOG" ]]; then
|
|
53
|
-
size=$(wc -c < "$SESSION_LOG" 2>/dev/null | tr -d ' ')
|
|
54
|
-
else
|
|
55
|
-
size=0
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# Read baseline (resets after each /compact)
|
|
59
|
-
baseline=0
|
|
60
|
-
if [[ -f "$BASELINE_FILE" ]]; then
|
|
61
|
-
baseline=$(cat "$BASELINE_FILE" 2>/dev/null | tr -d ' ')
|
|
62
|
-
if ! [[ "$baseline" =~ ^[0-9]+$ ]]; then
|
|
63
|
-
baseline=0
|
|
64
|
-
fi
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
# Effective size = growth since last compact
|
|
68
|
-
effective=$((size - baseline))
|
|
69
|
-
if [[ $effective -lt 0 ]]; then
|
|
70
|
-
effective=0
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
# Determine status (MAX_SIZE=0 disables monitoring)
|
|
74
|
-
if [[ $MAX_SIZE -gt 0 && $effective -gt $MAX_SIZE ]]; then
|
|
75
|
-
status="COMPACT_NEEDED"
|
|
76
|
-
overage=$((effective - MAX_SIZE))
|
|
77
|
-
echo "[monitor-log] COMPACT_NEEDED: effective=${effective} overage=${overage} (threshold=${MAX_SIZE})" >&2
|
|
78
|
-
else
|
|
79
|
-
status="OK"
|
|
80
|
-
overage=0
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
# Usage percentage (effective / threshold * 100)
|
|
84
|
-
if [[ $MAX_SIZE -gt 0 ]]; then
|
|
85
|
-
usage_pct=$((effective * 100 / MAX_SIZE))
|
|
86
|
-
else
|
|
87
|
-
usage_pct=0
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
# Write structured JSON status
|
|
91
|
-
cat > "$STATUS_FILE" << EOF
|
|
92
|
-
{
|
|
93
|
-
"status": "${status}",
|
|
94
|
-
"total_bytes": ${size},
|
|
95
|
-
"baseline_bytes": ${baseline},
|
|
96
|
-
"effective_bytes": ${effective},
|
|
97
|
-
"threshold_bytes": ${MAX_SIZE},
|
|
98
|
-
"overage_bytes": ${overage},
|
|
99
|
-
"usage_pct": ${usage_pct}
|
|
100
|
-
}
|
|
101
|
-
EOF
|
|
102
|
-
|
|
103
|
-
sleep "$POLL_INTERVAL"
|
|
104
|
-
done
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
# monitor-log.ps1 — Background log size monitor for AI session subagent (PowerShell)
|
|
3
|
-
#
|
|
4
|
-
# Polls session.log size, computes effective size (current - baseline),
|
|
5
|
-
# and writes a structured JSON status file. Intended to be run by a
|
|
6
|
-
# background subagent inside the AI CLI session.
|
|
7
|
-
#
|
|
8
|
-
# Usage:
|
|
9
|
-
# pwsh -NoProfile -File monitor-log.ps1 <session_log> <max_size> <poll_interval> <status_file> <baseline_file>
|
|
10
|
-
# powershell.exe -NoProfile -File monitor-log.ps1 <session_log> <max_size> <poll_interval> <status_file> <baseline_file>
|
|
11
|
-
#
|
|
12
|
-
# Status file format (JSON, rewritten each poll cycle):
|
|
13
|
-
# {
|
|
14
|
-
# "status": "OK" | "COMPACT_NEEDED",
|
|
15
|
-
# "total_bytes": <current session.log size>,
|
|
16
|
-
# "baseline_bytes": <size after last /compact>,
|
|
17
|
-
# "effective_bytes": <total - baseline>,
|
|
18
|
-
# "threshold_bytes": <compact threshold>,
|
|
19
|
-
# "overage_bytes": <effective - threshold, 0 if not exceeded>,
|
|
20
|
-
# "usage_pct": <effective / threshold * 100>
|
|
21
|
-
# }
|
|
22
|
-
|
|
23
|
-
param(
|
|
24
|
-
[Parameter(Mandatory=$true)] [string]$SessionLog,
|
|
25
|
-
[Parameter(Mandatory=$true)] [long]$MaxSize,
|
|
26
|
-
[Parameter(Mandatory=$true)] [int]$PollInterval,
|
|
27
|
-
[Parameter(Mandatory=$true)] [string]$StatusFile,
|
|
28
|
-
[Parameter(Mandatory=$true)] [string]$BaselineFile
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
if ($MaxSize -lt 0) {
|
|
32
|
-
Write-Error "ERROR: MaxSize must be a non-negative integer"
|
|
33
|
-
exit 1
|
|
34
|
-
}
|
|
35
|
-
if ($PollInterval -le 0) {
|
|
36
|
-
Write-Error "ERROR: PollInterval must be a positive integer"
|
|
37
|
-
exit 1
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
# Ensure status directory exists
|
|
41
|
-
$statusDir = Split-Path -Parent $StatusFile
|
|
42
|
-
if (-not (Test-Path $statusDir)) {
|
|
43
|
-
New-Item -ItemType Directory -Path $statusDir -Force | Out-Null
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
Write-Error "[monitor-log] Starting log monitor: max=$MaxSize interval=${PollInterval}s"
|
|
47
|
-
Write-Error "[monitor-log] Watching: $SessionLog"
|
|
48
|
-
|
|
49
|
-
while ($true) {
|
|
50
|
-
# Read current log size
|
|
51
|
-
if (Test-Path $SessionLog) {
|
|
52
|
-
$size = (Get-Item $SessionLog).Length
|
|
53
|
-
} else {
|
|
54
|
-
$size = 0
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
# Read baseline (resets after each /compact)
|
|
58
|
-
$baseline = 0
|
|
59
|
-
if (Test-Path $BaselineFile) {
|
|
60
|
-
try {
|
|
61
|
-
$baseline = [long](Get-Content $BaselineFile -Raw).Trim()
|
|
62
|
-
} catch {
|
|
63
|
-
$baseline = 0
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
# Effective size = growth since last compact
|
|
68
|
-
$effective = $size - $baseline
|
|
69
|
-
if ($effective -lt 0) {
|
|
70
|
-
$effective = 0
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
# Determine status (MaxSize=0 disables monitoring)
|
|
74
|
-
if ($MaxSize -gt 0 -and $effective -gt $MaxSize) {
|
|
75
|
-
$status = "COMPACT_NEEDED"
|
|
76
|
-
$overage = $effective - $MaxSize
|
|
77
|
-
Write-Error "[monitor-log] COMPACT_NEEDED: effective=$effective overage=$overage (threshold=$MaxSize)"
|
|
78
|
-
} else {
|
|
79
|
-
$status = "OK"
|
|
80
|
-
$overage = 0
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
# Usage percentage
|
|
84
|
-
if ($MaxSize -gt 0) {
|
|
85
|
-
$usagePct = [Math]::Floor($effective * 100 / $MaxSize)
|
|
86
|
-
} else {
|
|
87
|
-
$usagePct = 0
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
# Write structured JSON status
|
|
91
|
-
@{
|
|
92
|
-
status = $status
|
|
93
|
-
total_bytes = $size
|
|
94
|
-
baseline_bytes = $baseline
|
|
95
|
-
effective_bytes = $effective
|
|
96
|
-
threshold_bytes = $MaxSize
|
|
97
|
-
overage_bytes = $overage
|
|
98
|
-
usage_pct = $usagePct
|
|
99
|
-
} | ConvertTo-Json -Compress | Out-File -FilePath $StatusFile -NoNewline
|
|
100
|
-
|
|
101
|
-
Start-Sleep -Seconds $PollInterval
|
|
102
|
-
}
|