Skip to content

feat(plugin): wire hook-driven workflow state updates into HUD snapshot (#1324)#1331

Merged
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775309311/pane-2
Apr 4, 2026
Merged

feat(plugin): wire hook-driven workflow state updates into HUD snapshot (#1324)#1331
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775309311/pane-2

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Add hud_helpers.py module with hook-lifecycle-aware state update functions
  • Wire all 5 hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop) to update HUD state
  • 45 new tests covering mode transitions, focus detection, strategy detection, and full lifecycle

Field Ownership by Hook

Hook Fields Updated
SessionStart currentMode, phase (from pending context)
UserPromptSubmit currentMode, phase, focus (reset), blockerCount (reset)
PreToolUse activeAgent, focus, executionStrategy
PostToolUse activeAgent, lastHandoff, currentMode/phase (via parse_mode)
Stop activeAgent (clear), phase→completed, focus/strategy/council/blockers (clear)

Test plan

  • python3 -m pytest hooks/tests/test_hud_helpers.py -v — 45 passed
  • python3 -m pytest hooks/ --ignore=hooks/lib/test_mode_engine.py -v — 455 passed
  • yarn workspace codingbuddy exec tsc --noEmit — pass
  • yarn workspace codingbuddy exec vitest run — 5959 passed

Closes #1324

…ot (#1324)

Add hud_helpers.py module with consistent state update functions called
from each hook lifecycle event:

- SessionStart: init_baseline() seeds currentMode/phase from pending context
- UserPromptSubmit: on_mode_entry() sets mode, phase, resets focus/blockers
- PreToolUse: on_tool_start() updates activeAgent, focus, executionStrategy
- PostToolUse: on_tool_end() records agent handoffs and parse_mode transitions
- Stop: on_session_stop() clears active state, sets phase=completed

45 new tests covering all state transitions and a full lifecycle test.
@JeremyDev87 JeremyDev87 added feat plugin packages/claude-code-plugin labels Apr 4, 2026
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 4, 2026 1:40pm

@JeremyDev87 JeremyDev87 self-assigned this Apr 4, 2026
@JeremyDev87 JeremyDev87 merged commit 3a031e9 into master Apr 4, 2026
29 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775309311/pane-2 branch April 4, 2026 13:53
@JeremyDev87 JeremyDev87 added the wow-experience Plugin Wow Experience Design label Apr 4, 2026

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: ✅ APPROVE

CI Status: ALL PASS

#1324 — Hook-driven workflow state updates

  • Hooks systematically update HUD state: SessionStart (init), UserPromptSubmit (mode), PreToolUse/PostToolUse (workflow), Stop (cleanup)
  • Field ownership clearly defined per hook
  • Does NOT modify codingbuddy-hud.py (scope discipline)

✅ HUD state kept fresh by hooks for status bar consumption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat plugin packages/claude-code-plugin wow-experience Plugin Wow Experience Design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(plugin): wire hook-driven workflow state updates into the HUD snapshot

1 participant