Context
Found by the repo-wide /code-tidying:batch-simplify sweep (62 groups / 986 files, branch claude/repo-code-tidying-batch-twhddw). The sweep's doctrine files latent defects instead of fixing them mid-sweep, because the fix changes observable behavior; this issue is that filing.
Three scripts print usage by extracting their own header comment with a hardcoded sed -n 'A,Bp' "$0" range that no longer matches the header: scripts/affected-tests.sh:141-143 cuts off mid-sentence; plugins/source-control/skills/babysit-prs/scripts/fetch-all-pr-comments.sh:53-56 (and reap.sh:62, doctor.sh:76) truncate sections; plugins/songwriting/context/pat-pattison/scripts/datamuse.sh:42 uses sed -n '2,28p' so the five examples on lines 29-33 never print.
Proposed work
- Replace the hardcoded ranges with a derived extraction (the pattern babysit-readiness-gate.sh already uses: awk to the end-of-header marker), or re-pin the ranges with a comment coupling them to the header.
Acceptance criteria
References
scripts/affected-tests.sh:141-143
plugins/source-control/skills/babysit-prs/scripts/fetch-all-pr-comments.sh:53-56
plugins/source-control/skills/babysit-prs/scripts/reap.sh:62
plugins/source-control/skills/babysit-prs/scripts/doctor.sh:76
plugins/songwriting/context/pat-pattison/scripts/datamuse.sh:42
Filed by the /code-tidying:batch-simplify closeout (Phase 8).
Context
Found by the repo-wide
/code-tidying:batch-simplifysweep (62 groups / 986 files, branchclaude/repo-code-tidying-batch-twhddw). The sweep's doctrine files latent defects instead of fixing them mid-sweep, because the fix changes observable behavior; this issue is that filing.Three scripts print usage by extracting their own header comment with a hardcoded
sed -n 'A,Bp' "$0"range that no longer matches the header:scripts/affected-tests.sh:141-143cuts off mid-sentence;plugins/source-control/skills/babysit-prs/scripts/fetch-all-pr-comments.sh:53-56(and reap.sh:62, doctor.sh:76) truncate sections;plugins/songwriting/context/pat-pattison/scripts/datamuse.sh:42usessed -n '2,28p'so the five examples on lines 29-33 never print.Proposed work
Acceptance criteria
--helpoutput for each listed script ends at its header's actual last line (verified by running each with --help).References
scripts/affected-tests.sh:141-143plugins/source-control/skills/babysit-prs/scripts/fetch-all-pr-comments.sh:53-56plugins/source-control/skills/babysit-prs/scripts/reap.sh:62plugins/source-control/skills/babysit-prs/scripts/doctor.sh:76plugins/songwriting/context/pat-pattison/scripts/datamuse.sh:42Filed by the /code-tidying:batch-simplify closeout (Phase 8).