Claude
|
2aa72d73f4
|
feat(ws0+ws2+ws4): plugin scaffold, Slack /new-task, auto-delegate hook
WS0 — sea-haven-claude-plugin/ scaffold:
- CLAUDE.md: Sea Haven engineering context (pipeline overview, rules,
/new-task + /delegate usage, available phases)
- settings.template.json: UserPromptSubmit hook wiring template
- hooks/user_prompt_submit.py: standalone script (WS4)
WS2 — SlackListener /new-task intake:
- Add NewTaskCallback type alias (Callable[[str, str], str])
- Add new_task_callback param to SlackListener.__init__
- _is_new_task_command() helper for slash_commands+/new-task detection
- _handle_new_task_command() method: authorized-only, calls callback,
exception-safe (listen loop stays alive on callback errors)
- handle_event() routes /new-task BEFORE the answer path (post-AUTHZ-01)
WS4 — UserPromptSubmit auto-delegate hook:
- /delegate <text> and DELEGATE: <text> prefixes trigger delegation
- Calls POST /tasks on the agent-team HTTP API (WS1)
- Blocks the Claude Code prompt; shows thread_id + next-steps message
- Graceful degradation: missing token, HTTP error, network error all
produce a block with a human-readable reason
- run() is a pure function for testability (no stdin/stdout in tests)
Tests: 22 new tests in test_ws0_ws2_ws4_plugin_slack_hook.py.
Full suite: 1066 passed. ruff clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYp761G9HojkmLqLZrASVi
|
2026-06-23 01:39:12 +00:00 |
|