diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md index f8c20cd592..5ae2c14c11 100644 --- a/autoplan/SKILL.md +++ b/autoplan/SKILL.md @@ -579,7 +579,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/canary/SKILL.md b/canary/SKILL.md index e7a1715f8f..8cce0c36d5 100644 --- a/canary/SKILL.md +++ b/canary/SKILL.md @@ -571,7 +571,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/codex/SKILL.md b/codex/SKILL.md index af351d7f10..6e473c6fee 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -574,7 +574,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/context-restore/SKILL.md b/context-restore/SKILL.md index 7a272722e7..78829434a6 100644 --- a/context-restore/SKILL.md +++ b/context-restore/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/context-save/SKILL.md b/context-save/SKILL.md index 014407fbe4..3acab7c3a7 100644 --- a/context-save/SKILL.md +++ b/context-save/SKILL.md @@ -574,7 +574,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/cso/SKILL.md b/cso/SKILL.md index ebacf1ac09..5a937a2042 100644 --- a/cso/SKILL.md +++ b/cso/SKILL.md @@ -577,7 +577,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/design-consultation/SKILL.md b/design-consultation/SKILL.md index 9bab21e2df..ec53d23ac5 100644 --- a/design-consultation/SKILL.md +++ b/design-consultation/SKILL.md @@ -597,7 +597,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/design-html/SKILL.md b/design-html/SKILL.md index f6e9e17f89..93b8fea410 100644 --- a/design-html/SKILL.md +++ b/design-html/SKILL.md @@ -578,7 +578,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/design-review/SKILL.md b/design-review/SKILL.md index e874a94aa1..02d1a13614 100644 --- a/design-review/SKILL.md +++ b/design-review/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/design-shotgun/SKILL.md b/design-shotgun/SKILL.md index 9fd662ce68..29123bcb4e 100644 --- a/design-shotgun/SKILL.md +++ b/design-shotgun/SKILL.md @@ -592,7 +592,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/devex-review/SKILL.md b/devex-review/SKILL.md index 14ed560d23..dc99b00d1d 100644 --- a/devex-review/SKILL.md +++ b/devex-review/SKILL.md @@ -577,7 +577,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/document-generate/SKILL.md b/document-generate/SKILL.md index 2c7e6f0727..c7ed2feb01 100644 --- a/document-generate/SKILL.md +++ b/document-generate/SKILL.md @@ -577,7 +577,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/document-release/SKILL.md b/document-release/SKILL.md index 43ba9adb12..5ee2d34bd4 100644 --- a/document-release/SKILL.md +++ b/document-release/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/health/SKILL.md b/health/SKILL.md index 921a7b5b4b..3bfdb0d89e 100644 --- a/health/SKILL.md +++ b/health/SKILL.md @@ -573,7 +573,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/investigate/SKILL.md b/investigate/SKILL.md index daf6be6d81..b91960d3d6 100644 --- a/investigate/SKILL.md +++ b/investigate/SKILL.md @@ -612,7 +612,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/ios-clean/SKILL.md b/ios-clean/SKILL.md index c9073b6d58..4ba99adca5 100644 --- a/ios-clean/SKILL.md +++ b/ios-clean/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/ios-design-review/SKILL.md b/ios-design-review/SKILL.md index 7bfbdd851a..605fa1999e 100644 --- a/ios-design-review/SKILL.md +++ b/ios-design-review/SKILL.md @@ -577,7 +577,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/ios-fix/SKILL.md b/ios-fix/SKILL.md index 2d1c3d4b10..f1adc4a406 100644 --- a/ios-fix/SKILL.md +++ b/ios-fix/SKILL.md @@ -578,7 +578,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/ios-qa/SKILL.md b/ios-qa/SKILL.md index 0d40c16e55..b3b69b2dd1 100644 --- a/ios-qa/SKILL.md +++ b/ios-qa/SKILL.md @@ -581,7 +581,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/ios-sync/SKILL.md b/ios-sync/SKILL.md index e7a8039247..e182d54486 100644 --- a/ios-sync/SKILL.md +++ b/ios-sync/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md index 2eb9faa6c0..fa99c2848f 100644 --- a/land-and-deploy/SKILL.md +++ b/land-and-deploy/SKILL.md @@ -570,7 +570,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/landing-report/SKILL.md b/landing-report/SKILL.md index aec9978baf..752fcafd7c 100644 --- a/landing-report/SKILL.md +++ b/landing-report/SKILL.md @@ -571,7 +571,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/learn/SKILL.md b/learn/SKILL.md index 08a78b23ca..b6d0d2611c 100644 --- a/learn/SKILL.md +++ b/learn/SKILL.md @@ -573,7 +573,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/office-hours/SKILL.md b/office-hours/SKILL.md index efa58f7def..40a2d38def 100644 --- a/office-hours/SKILL.md +++ b/office-hours/SKILL.md @@ -608,7 +608,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/open-gstack-browser/SKILL.md b/open-gstack-browser/SKILL.md index 64a93770e7..5dd2233730 100644 --- a/open-gstack-browser/SKILL.md +++ b/open-gstack-browser/SKILL.md @@ -570,7 +570,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/pair-agent/SKILL.md b/pair-agent/SKILL.md index 533a29dc73..219866ce1d 100644 --- a/pair-agent/SKILL.md +++ b/pair-agent/SKILL.md @@ -572,7 +572,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/plan-ceo-review/SKILL.md b/plan-ceo-review/SKILL.md index 57cbf54640..e3ad8674b5 100644 --- a/plan-ceo-review/SKILL.md +++ b/plan-ceo-review/SKILL.md @@ -602,7 +602,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/plan-design-review/SKILL.md b/plan-design-review/SKILL.md index b1b110ae15..5cfbe1e7e8 100644 --- a/plan-design-review/SKILL.md +++ b/plan-design-review/SKILL.md @@ -574,7 +574,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/plan-devex-review/SKILL.md b/plan-devex-review/SKILL.md index 7336b70a55..dd712b9799 100644 --- a/plan-devex-review/SKILL.md +++ b/plan-devex-review/SKILL.md @@ -580,7 +580,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md index c4ec10bb60..6da2b6342b 100644 --- a/plan-eng-review/SKILL.md +++ b/plan-eng-review/SKILL.md @@ -578,7 +578,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/plan-tune/SKILL.md b/plan-tune/SKILL.md index 41c45342ec..2b7593c67e 100644 --- a/plan-tune/SKILL.md +++ b/plan-tune/SKILL.md @@ -583,7 +583,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/qa-only/SKILL.md b/qa-only/SKILL.md index db1c3dd081..e2a47468f7 100644 --- a/qa-only/SKILL.md +++ b/qa-only/SKILL.md @@ -573,7 +573,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/qa/SKILL.md b/qa/SKILL.md index c5fdf9b565..768b78d767 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -579,7 +579,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/retro/SKILL.md b/retro/SKILL.md index 287f24e35d..4093c0bab5 100644 --- a/retro/SKILL.md +++ b/retro/SKILL.md @@ -590,7 +590,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/review/SKILL.md b/review/SKILL.md index 4d8049d540..b0771ea498 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/scrape/SKILL.md b/scrape/SKILL.md index 0af5db5068..cd6334828d 100644 --- a/scrape/SKILL.md +++ b/scrape/SKILL.md @@ -571,7 +571,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/scripts/resolvers/preamble/generate-context-recovery.ts b/scripts/resolvers/preamble/generate-context-recovery.ts index 23f35c3e74..e551246c83 100644 --- a/scripts/resolvers/preamble/generate-context-recovery.ts +++ b/scripts/resolvers/preamble/generate-context-recovery.ts @@ -3,6 +3,13 @@ import type { TemplateContext } from '../types'; export function generateContextRecovery(ctx: TemplateContext): string { const binDir = ctx.host === 'codex' ? '$GSTACK_BIN' : ctx.paths.binDir; + // Two branch forms are in play and must not be confused (#1127): + // - $BRANCH (from `eval gstack-slug`): sanitized to [a-zA-Z0-9._-], so + // `feat/foo` → `featfoo`. This is the form gstack-review-log/read use for + // `-reviews.jsonl` filenames, so review lookups MUST use it. + // - $_BRANCH (from the preamble's `git branch --show-current`): the raw + // branch, which is how timeline.jsonl records the `branch` field, so the + // timeline greps below MUST keep using it. return `## Context Recovery At session start or after compaction, recover recent project context. @@ -13,7 +20,7 @@ _PROJ="\${GSTACK_HOME:-$HOME/.gstack}/projects/\${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/\${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/\${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/\${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/\${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\\"branch\\":\\"\${_BRANCH}\\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/setup-deploy/SKILL.md b/setup-deploy/SKILL.md index a35ab97640..00dee7ae55 100644 --- a/setup-deploy/SKILL.md +++ b/setup-deploy/SKILL.md @@ -574,7 +574,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/setup-gbrain/SKILL.md b/setup-gbrain/SKILL.md index cad27fceca..c01f698777 100644 --- a/setup-gbrain/SKILL.md +++ b/setup-gbrain/SKILL.md @@ -573,7 +573,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/ship/SKILL.md b/ship/SKILL.md index ecf203787f..af3b92f645 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -575,7 +575,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/skillify/SKILL.md b/skillify/SKILL.md index e7911473eb..b7bdb8054e 100644 --- a/skillify/SKILL.md +++ b/skillify/SKILL.md @@ -571,7 +571,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/spec/SKILL.md b/spec/SKILL.md index 7279b9c377..f5bbfe2294 100644 --- a/spec/SKILL.md +++ b/spec/SKILL.md @@ -572,7 +572,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) @@ -1583,7 +1583,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/sync-gbrain/SKILL.md b/sync-gbrain/SKILL.md index 4a3a5bc1d7..1a3d3aee33 100644 --- a/sync-gbrain/SKILL.md +++ b/sync-gbrain/SKILL.md @@ -573,7 +573,7 @@ _PROJ="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}" if [ -d "$_PROJ" ]; then echo "--- RECENT ARTIFACTS ---" find "$_PROJ/ceo-plans" "$_PROJ/checkpoints" -type f -name "*.md" 2>/dev/null | xargs ls -t 2>/dev/null | head -3 - [ -f "$_PROJ/${_BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${_BRANCH}-reviews.jsonl" | tr -d ' ') entries" + [ -f "$_PROJ/${BRANCH}-reviews.jsonl" ] && echo "REVIEWS: $(wc -l < "$_PROJ/${BRANCH}-reviews.jsonl" | tr -d ' ') entries" [ -f "$_PROJ/timeline.jsonl" ] && tail -5 "$_PROJ/timeline.jsonl" if [ -f "$_PROJ/timeline.jsonl" ]; then _LAST=$(grep "\"branch\":\"${_BRANCH}\"" "$_PROJ/timeline.jsonl" 2>/dev/null | grep '"event":"completed"' | tail -1) diff --git a/test/regression-1127-context-recovery-branch-form.test.ts b/test/regression-1127-context-recovery-branch-form.test.ts new file mode 100644 index 0000000000..e586816788 --- /dev/null +++ b/test/regression-1127-context-recovery-branch-form.test.ts @@ -0,0 +1,64 @@ +/** + * Regression for #1127 — Context Recovery looked up `-reviews.jsonl` + * with the WRONG branch form, so review history for slashed branches + * (feat/*, fix/*) was never reported. + * + * Two branch forms coexist and must not be confused: + * - `$BRANCH` — from `eval gstack-slug`, sanitized to [a-zA-Z0-9._-] + * (`feat/foo` → `featfoo`). This is the form gstack-review-log (writer) and + * gstack-review-read (reader) use for `-reviews.jsonl` filenames, so + * the Context Recovery review lookup MUST use it too. + * - `$_BRANCH` — the raw `git branch --show-current` from the preamble, which + * is how timeline.jsonl records its `branch` field, so the timeline greps + * MUST keep using it. + * + * Before the fix, the review lookup used bare `$_BRANCH`, which (a) mismatched + * the strip-form file gstack-review-log writes for slashed branches and (b) is + * not even guaranteed to be defined inside this self-contained block. The fix + * routes the review lookup through `$BRANCH` while leaving the timeline greps on + * `$_BRANCH`. This test pins both halves so neither regresses. + */ +import { describe, test, expect } from 'bun:test'; +import type { TemplateContext } from '../scripts/resolvers/types'; +import { HOST_PATHS } from '../scripts/resolvers/types'; +import { generateContextRecovery } from '../scripts/resolvers/preamble/generate-context-recovery'; + +function makeCtx(host: 'claude' | 'codex'): TemplateContext { + return { + skillName: 'test-skill', + tmplPath: 'test.tmpl', + host, + paths: HOST_PATHS[host], + preambleTier: 2, + }; +} + +describe('#1127 Context Recovery branch-form consistency', () => { + for (const host of ['claude', 'codex'] as const) { + test(`reviews.jsonl lookup uses canonical $BRANCH, not bare $_BRANCH (${host})`, () => { + const out = generateContextRecovery(makeCtx(host)); + // The review line must reference the strip-form $BRANCH that + // gstack-review-log/read write/read with. + expect(out).toContain('${BRANCH}-reviews.jsonl'); + // ...and must NOT use the raw $_BRANCH, which mismatches for slashed branches. + expect(out).not.toContain('${_BRANCH}-reviews.jsonl'); + }); + + test(`$BRANCH is in scope: the block evals gstack-slug before use (${host})`, () => { + const out = generateContextRecovery(makeCtx(host)); + const slugIdx = out.indexOf('gstack-slug'); + const reviewIdx = out.indexOf('${BRANCH}-reviews.jsonl'); + expect(slugIdx).toBeGreaterThan(-1); + expect(reviewIdx).toBeGreaterThan(slugIdx); + }); + + test(`timeline.jsonl greps keep using raw $_BRANCH (${host})`, () => { + const out = generateContextRecovery(makeCtx(host)); + // timeline.jsonl records the raw branch, so these greps must stay on + // $_BRANCH — guard against an over-eager fix that converts them too. + expect(out).toContain('${_BRANCH}'); + // But the raw form must no longer appear in the reviews filename. + expect(out).not.toContain('${_BRANCH}-reviews.jsonl'); + }); + } +});