os-sdlc hook 2/3: arm hook + shakedown #400
Labels
No labels
P0
P1
P2
P3
bug
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#400
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Child of #333. Depends on hook 1/3. Remove instrumentation, bin/refresh-plugins, controlled shakedown: one ticket through intake, one Agent call, hook advances pipeline without manual event piping. recover subcommand is the safety net.
VERDICT: CREATE — user-created parent-chain ticket, mid-flight; skeptic hard floor (user-requested).
Context
Decomposed 2026-08-16. Hook-fix code work split to child #412. Code-probe found no in-repo instrumentation to remove ("instrumentation" refers to session-level manual event piping, which the child fix obsoletes); recover subcommand confirmed live (bin/os-sdlc-runner:75-90, ADR-0117).
Tasks
Blocked by: #412 (hook fix) and #410 (gate subprocess ignores stored target_name — shakedown lint gates false-escalate until fixed).
Decomposition into tasks:
In scope
recoverinspect run against post-shakedown state; --reemit/--rollback only if wedged.Out of scope
Acceptance criteria
os-sdlc-runner recover(inspect) reads the post-shakedown state cleanly, reporting no wedge.Tasks 1–2 done. Audit: no verification-era instrumentation found — #399 (
eacd3e5) was docs-only; hook's only outputs are its stdout JSON and pre-existing errorwarn. Evidence: ast-grep sweep (File.write/File.open/$stderr/warn/Logger) + grep for capture/instrument/debug markers + git log since 2026-08-07 all clean. Suite green: 911 runs, 2238 assertions, 0 failures. bin/refresh-plugins run; cached post_tool_use.rb byte-identical to repo copy.Shakedown blocked on #359: runner's first dispatch names agent
code-probe, hook matches exact subagent_type (ticket_flow.rb:13), but nocode-probeagent type is registered (skill only) — harness rejects the dispatch. Ticket 385 intake state is intact (recover inspect: state code-probe, pending dispatch consistent, no premature advance). Tasks 3–5 resume after #359 is fixed or a different entry map is chosen.Blocker #359 is closed (code-probe agent registered; #403's end-to-end run used it). Removing waiting; shakedown tasks 3-6 are unblocked.
Deviation incident 2026-08-15 — /os-sdlc:implement run for #402+#405, session https://claude.ai/code/session_01GSYJVRGmBiLGjPppHjY3bZ. Deviating skill: plugins/os-sdlc/skills/implement/SKILL.md.
Expected: the PostToolUse hook advances the pipeline on its own when a pipeline agent finishes. Actual: every stage of both tickets needed hand-piped bare-name events (echo '{"tool_name":"Agent","tool_input":{"subagent_type":"code-probe"},"cwd":...}' | ruby plugins/os-sdlc/hooks/post_tool_use.rb) because (a) the hook is not armed in the marketplace manifest and (b) dispatches carry namespaced subagent_type (os-sdlc:code-probe) which the hook does not map to bare stage names. Note the events must use tool_name Agent, not Task. Repro context: any /os-sdlc:implement run in a session on this machine.
Investigation 2026-08-15 (session https://claude.ai/code/session_01GSYJVRGmBiLGjPppHjY3bZ): the hook is ALREADY ARMED — hooks.json registered via the plugin, symlink live, and it demonstrably fired on every Agent call all session (ADR-0121 guard errors). No leftover instrumentation found in hooks/. The remaining real gap for 'hook advances pipeline without manual event piping' is namespaced subagent_type: dispatches arrive as os-sdlc:code-probe but maps/default.yaml and ticket_flow.rb match bare code-probe, so nothing advances. Fix shape: strip the namespace prefix in extract_agent (hooks/post_tool_use.rb:54) or at the ticket_flow.rb:14 match — but weigh dispatch-hook.md's documented spurious-match caveat (a same-type Agent call outside the pipeline can match a pending dispatch row) before widening matching. Suggest rescoping this ticket's checklist to: namespace-strip + spurious-match guard decision + the shakedown.
Pre-flight: held. No task checklist yet (under-decomposed), and the shakedown targets code being changed by #365/#409 — will decompose and run after both land.
Frozen in the 2026-08-16 backlog reset — see #419 for the expiry procedure. Do not work unless a live run rediscovers this issue.