os-sdlc hook 2/3: arm hook + shakedown #400

Open
opened 2026-08-15 10:44:51 +00:00 by jared · 9 comments
Owner

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

  • bin/refresh-plugins after the child fix merges.
  • Shakedown (operator-run): one ticket through intake, one real Agent call, hook advances the pipeline with no manual event piping; recover subcommand is the safety net.
  • Close-out: confirm no leftover instrumentation/workaround docs, then close with the close protocol.

Blocked by: #412 (hook fix) and #410 (gate subprocess ignores stored target_name — shakedown lint gates false-escalate until fixed).

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 - [ ] bin/refresh-plugins after the child fix merges. - [ ] Shakedown (operator-run): one ticket through intake, one real Agent call, hook advances the pipeline with no manual event piping; recover subcommand is the safety net. - [ ] Close-out: confirm no leftover instrumentation/workaround docs, then close with the close protocol. Blocked by: #412 (hook fix) and #410 (gate subprocess ignores stored target_name — shakedown lint gates false-escalate until fixed).
Author
Owner

Decomposition into tasks:

  • 1. Instrumentation audit + removal — sweep plugins/os-sdlc/ (hooks/, hooks.json, lib/os_sdlc/runner/) for #399 verification-era scaffolding (payload captures, temp logs, conditionals). Remove or record "none found". Green suite after.
  • 2. bin/refresh-plugins — confirm cached hook matches repo copy.
  • 3. Shakedown prep — one small real ticket through runner intake (.sdlc/ in cwd). Dispatch must be synchronous (#402: async Agent calls fire the hook at launch, not completion).
  • 4. Controlled shakedown — one Agent call in a fresh session; hook advances pipeline with no manual event piping. Verify .sdlc/ dispatch marked returned + state transitioned.
  • 5. Safety-net check — os-sdlc-runner recover inspect after the run (and --reemit/--rollback only if wedged).
  • 6. Close-out — dispatch-hook.md status, implementation-status/os-sdlc.md history row, os-backlog close with follow-ups (hook 3/3 under #333; #402).
Decomposition into tasks: - [x] 1. Instrumentation audit + removal — sweep plugins/os-sdlc/ (hooks/, hooks.json, lib/os_sdlc/runner/) for #399 verification-era scaffolding (payload captures, temp logs, conditionals). Remove or record "none found". Green suite after. - [x] 2. bin/refresh-plugins — confirm cached hook matches repo copy. - [ ] 3. Shakedown prep — one small real ticket through runner intake (.sdlc/ in cwd). Dispatch must be synchronous (#402: async Agent calls fire the hook at launch, not completion). - [ ] 4. Controlled shakedown — one Agent call in a fresh session; hook advances pipeline with no manual event piping. Verify .sdlc/ dispatch marked returned + state transitioned. - [ ] 5. Safety-net check — os-sdlc-runner recover inspect after the run (and --reemit/--rollback only if wedged). - [ ] 6. Close-out — dispatch-hook.md status, implementation-status/os-sdlc.md history row, os-backlog close with follow-ups (hook 3/3 under #333; #402).
Author
Owner

In scope

  • Removing #399 verification-era instrumentation from plugins/os-sdlc/ (hooks, hooks.json, runner lib, stray capture files).
  • bin/refresh-plugins so the cleaned hook is live.
  • One controlled end-to-end shakedown: one real ticket through intake, one synchronous Agent dispatch, hook advances the pipeline unaided.
  • One recover inspect run against post-shakedown state; --reemit/--rollback only if wedged.
  • Close-out records: dispatch-hook.md status, os-sdlc status-leaf history row.

Out of scope

  • Hook 3/3 (remaining #333 chain) — separate child ticket.
  • Fixing #402 (async dispatches fire the hook at launch, not completion) — worked around here by keeping the shakedown dispatch synchronous.
  • Any pipeline/runner behavior changes, hardening, or refactors beyond instrumentation removal.
  • Multi-ticket or async shakedowns; bulk rollout.

Acceptance criteria

  • No verification scaffolding remains under plugins/os-sdlc/ (ast-grep/grep sweep documented on this issue, removals or "none found").
  • Full test suite green and rubocop clean after removal.
  • bin/refresh-plugins run; cached hook byte-identical to repo copy.
  • Shakedown ticket visible in .sdlc/ after intake with a pending dispatch.
  • After the one synchronous Agent call: dispatch marked returned and ticket state transitioned, with zero manual event piping.
  • os-sdlc-runner recover (inspect) reads the post-shakedown state cleanly, reporting no wedge.
  • Close via os-backlog close with done/evidence/follow-ups; follow-ups name hook 3/3 (#333) and #402.
**In scope** - Removing #399 verification-era instrumentation from plugins/os-sdlc/ (hooks, hooks.json, runner lib, stray capture files). - bin/refresh-plugins so the cleaned hook is live. - One controlled end-to-end shakedown: one real ticket through intake, one synchronous Agent dispatch, hook advances the pipeline unaided. - One `recover` inspect run against post-shakedown state; --reemit/--rollback only if wedged. - Close-out records: dispatch-hook.md status, os-sdlc status-leaf history row. **Out of scope** - Hook 3/3 (remaining #333 chain) — separate child ticket. - Fixing #402 (async dispatches fire the hook at launch, not completion) — worked around here by keeping the shakedown dispatch synchronous. - Any pipeline/runner behavior changes, hardening, or refactors beyond instrumentation removal. - Multi-ticket or async shakedowns; bulk rollout. **Acceptance criteria** - [ ] No verification scaffolding remains under plugins/os-sdlc/ (ast-grep/grep sweep documented on this issue, removals or "none found"). - [ ] Full test suite green and rubocop clean after removal. - [ ] bin/refresh-plugins run; cached hook byte-identical to repo copy. - [ ] Shakedown ticket visible in .sdlc/ after intake with a pending dispatch. - [ ] After the one synchronous Agent call: dispatch marked returned and ticket state transitioned, with zero manual event piping. - [ ] `os-sdlc-runner recover` (inspect) reads the post-shakedown state cleanly, reporting no wedge. - [ ] Close via os-backlog close with done/evidence/follow-ups; follow-ups name hook 3/3 (#333) and #402.
Author
Owner

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 error warn. 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.

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 error `warn`. 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.
Author
Owner

Shakedown blocked on #359: runner's first dispatch names agent code-probe, hook matches exact subagent_type (ticket_flow.rb:13), but no code-probe agent 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.

Shakedown blocked on #359: runner's first dispatch names agent `code-probe`, hook matches exact subagent_type (ticket_flow.rb:13), but no `code-probe` agent 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.
Author
Owner

Blocker #359 is closed (code-probe agent registered; #403's end-to-end run used it). Removing waiting; shakedown tasks 3-6 are unblocked.

Blocker #359 is closed (code-probe agent registered; #403's end-to-end run used it). Removing waiting; shakedown tasks 3-6 are unblocked.
Author
Owner

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.

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.
Author
Owner

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.

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.
Author
Owner

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.

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.
Author
Owner

Frozen in the 2026-08-16 backlog reset — see #419 for the expiry procedure. Do not work unless a live run rediscovers this issue.

Frozen in the 2026-08-16 backlog reset — see #419 for the expiry procedure. Do not work unless a live run rediscovers this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#400
No description provided.