3.3 KiB
3.3 KiB
Task Todo
- Review the current project instructions and check for task-relevant lessons.
- Check repository status before writing the implementation plan.
- Inspect existing engine, CLI, docs, and frontend event handling for disposal-tracking impact.
- Write the design spec for webhook case management in an isolated worktree.
- Confirm the design with the user before implementation.
Design Review
- Spec path:
docs/superpowers/specs/2026-06-09-webhook-case-management-design.md - Scope fixed to local case management plus outbound and inbound webhook integration.
- Confirmed behaviors:
- manual handling and external callback handling are both supported
- cases are created from
time_alarm,batch_pending_disposal, andwarning_escalated - both batch-event webhooks and case-state webhooks are required
- callback
statusis exactlyhandled - callback-applied case handling must emit a
case_eventwebhook
2026-06-09 Implementation Plan
- Create isolated worktree for implementation on branch
feat/webhook-case-management. - Re-check runtime baseline in the worktree and note the local Python environment requirement.
- Write the detailed implementation plan to
docs/superpowers/plans/2026-06-09-webhook-case-management-implementation.md. - Execute backend case-state TDD cycle.
- Execute webhook integration TDD cycle.
- Execute management API TDD cycle.
- Execute frontend case-management TDD cycle.
- Run full verification and record outcomes.
2026-06-09 Implementation Review
- Worktree path:
/Users/glo/.config/superpowers/worktrees/cold_display_guard/webhook-case-management - Baseline note: the default
python3in this shell resolves to macOS system Python 3.9 and cannot import the repo'sdataclass(..., slots=True)code. Python verification in this worktree must run througheval "$(/opt/homebrew/bin/pyenv init -)" && python ..., which resolves to Python 3.12.11. - Frontend baseline check in the worktree passed with
node --test web/test/zone-state.test.js. - Implemented:
src/cold_display_guard/cases.pyfor case lifecycle and JSONL persistencesrc/cold_display_guard/webhooks.pyfor outbound event/case webhook delivery and audit logging- runtime integration in
src/cold_display_guard/main.py - case listing/summary/manual-handle/callback routes in
src/cold_display_guard/manage_api.py - frontend case summary and manual-handle flow in
web/src/main.jsandweb/src/zone-state.js
- Targeted verification passed during implementation:
eval "$(/opt/homebrew/bin/pyenv init -)" && PYTHONPATH=src python -m unittest tests/test_cases.py -veval "$(/opt/homebrew/bin/pyenv init -)" && PYTHONPATH=src python -m unittest tests/test_webhooks.py -veval "$(/opt/homebrew/bin/pyenv init -)" && PYTHONPATH=src python -m unittest tests/test_main.py -veval "$(/opt/homebrew/bin/pyenv init -)" && PYTHONPATH=src python -m unittest tests/test_manage_api.py -vnode --test web/test/zone-state.test.js
- Final verification passed:
eval "$(/opt/homebrew/bin/pyenv init -)" && PYTHONPATH=src python -m unittest discover -s tests -vcd web && pnpm build
- Frontend build note: the isolated worktree needed
cd web && pnpm install --frozen-lockfilebeforepnpm buildbecausenode_modulesare not shared into new worktrees.