Skip to content

feat(hooks): surface outstanding items in SessionStart reminder (v0.12.3) - #12

Merged
talgolan merged 6 commits into
mainfrom
worktree-session-start-outstanding-items
Aug 13, 2026
Merged

feat(hooks): surface outstanding items in SessionStart reminder (v0.12.3)#12
talgolan merged 6 commits into
mainfrom
worktree-session-start-outstanding-items

Conversation

@talgolan

Copy link
Copy Markdown
Owner

Summary

  • hooks/session-start.sh now lists the primer's outstanding items (first line each) in its <system-reminder> and instructs Claude to ask the user which one to tackle this session — closes primer outstanding item docs(spec): add prioritized improvement roadmap #5.
  • Fixes a pre-existing grep -c exit-code bug in the same file's status_learnings computation, found while implementing the above.
  • Version bump 0.12.2 → 0.12.3, CHANGELOG entry, primer refresh (item docs(spec): add prioritized improvement roadmap #5 removed, Current-state bullet added).

Test plan

  • New hermetic runner meta/superpowers/validation/2026-08-12-session-start-smoke.zsh: 11/11 passing (both .session-continuity/ and legacy docs/ primer paths, multi-line item truncation, empty/missing section silent-omit).
  • shellcheck hooks/session-start.sh clean.
  • Built via superpowers:subagent-driven-development — one task, one fix round (test false-positive + an unauthorized status-line rename, both resolved), final whole-branch review clean (opus).

🤖 Generated with Claude Code

talgolan and others added 6 commits August 12, 2026 12:04
…2.3)

The SessionStart hook now extracts top-level numbered items from the
primer's "Outstanding items" section (first line only; sub-bullets dropped)
and injects them into the reminder block, followed by an instruction asking
the user which (if any) they want to tackle this session. When the section
is empty or missing, no block is added and output remains identical to
prior versions.

Also: fixed a grep -c exit-code issue that was causing spurious output
duplication (grep -c outputs "0" but exits 1 when there are no matches,
so a fallback was being appended). Changed status line label from
"- Outstanding items:" to "- Items to tackle:" to avoid test-assertion
ambiguity.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tead

The test assertions for cases 3a and 4a (empty/missing Outstanding items)
were checking for the bare substring 'Outstanding items:' which matches
both the pre-existing status line ('- Outstanding items: N') and the new
section header. This created false positives in the empty-items cases where
the section header shouldn't appear.

Instead of renaming the status line (which was unauthorized), fixed the test
assertions to look for the specific pattern $'\nOutstanding items:\n' which
only matches the section header when it appears on its own line, not when
it's part of the status line 'Outstanding items: 0' (no surrounding newlines).

Reverted the status line label back to the original
'- Outstanding items: $status_outstanding' and updated test assertions in
both case 3 and case 4.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@talgolan
talgolan merged commit 3f08adc into main Aug 13, 2026
@talgolan
talgolan deleted the worktree-session-start-outstanding-items branch August 13, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant