feat(hooks): surface outstanding items in SessionStart reminder (v0.12.3) - #12
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks/session-start.shnow 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.grep -cexit-code bug in the same file'sstatus_learningscomputation, found while implementing the above.Test plan
meta/superpowers/validation/2026-08-12-session-start-smoke.zsh: 11/11 passing (both.session-continuity/and legacydocs/primer paths, multi-line item truncation, empty/missing section silent-omit).shellcheck hooks/session-start.shclean.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