feat(plugin): wire hook-driven workflow state updates into HUD snapshot (#1324)#1331
Merged
Merged
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 4, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
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.
5 tasks
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
hud_helpers.pymodule with hook-lifecycle-aware state update functionsField Ownership by Hook
currentMode,phase(from pending context)currentMode,phase,focus(reset),blockerCount(reset)activeAgent,focus,executionStrategyactiveAgent,lastHandoff,currentMode/phase(via parse_mode)activeAgent(clear),phase→completed,focus/strategy/council/blockers(clear)Test plan
python3 -m pytest hooks/tests/test_hud_helpers.py -v— 45 passedpython3 -m pytest hooks/ --ignore=hooks/lib/test_mode_engine.py -v— 455 passedyarn workspace codingbuddy exec tsc --noEmit— passyarn workspace codingbuddy exec vitest run— 5959 passedCloses #1324