feat(ws0+ws2+ws4): Sea Haven plugin scaffold + Slack /new-task + auto-delegate hook #46
No reviewers
Labels
No labels
app
bug
ci
compliance
content
dependencies
docs
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
infra
invalid
javascript
needs-triage
python
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adam/orchestrator#46
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/ws0-plugin-slack-intake-autodelegate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
sea-haven-claude-plugin/CLAUDE.md(WS0): Claude Code context file for Sea Haven sessions — pipeline overview, development rules,/new-taskand/delegateusage guide, phase reference table.sea-haven-claude-plugin/settings.template.json(WS0): Template.claude/settings.jsonwiring theUserPromptSubmithook. Copy to~/.claude/settings.json(or merge) and setSEA_HAVEN_PLUGIN_DIRto activate.sea-haven-claude-plugin/hooks/user_prompt_submit.py(WS4):UserPromptSubmitClaude Code hook. Prompts prefixed with/delegateorDELEGATE:are forwarded toPOST /taskson the agent-team HTTP API (WS1) and blocked — the task runs in the pipeline; Claude doesn't answer locally. Graceful on missing token, HTTP errors, and network failures (shows a human-readable block reason).run()is a pure function; tests inject a fake_call_api.agent_team/transport/slack_listener.py(WS2): AddNewTaskCallbacktype alias +new_task_callbackinjected param toSlackListener. A/new-task <description>slash command from an allowlisted owner callsnew_task_callback(text, "slack")after AUTHZ-01 and before the answer path — so new-task commands are never misrouted as answers. Callback exception is caught (listen loop stays alive).All 1066 tests passing.
ruff checkclean.Test plan
cd agent-team && python3 -m pytest -q→ 1066 passed, 0 failedpython3 -m ruff check .→ all checks passed_is_new_task_command+_handle_new_task_commandinslack_listener.pyrun()inhooks/user_prompt_submit.py(all delegate/error paths)CLAUDE.mdcontent accuracyOUTSTANDING (attended — do NOT merge until done)
Wire
new_task_callbackinrun-team.py: at serve startup, injectnew_task_callback=coordinator.start_taskintoSlackListener(viadefault_slack_listener_factoryor the listener factory). Currently the defaultSlackListenerhasnew_task_callback=None(ignores/new-task).Install the plugin on the Mac: copy
sea-haven-claude-plugin/settings.template.jsonto~/.claude/settings.json(or merge thehookssection), then setSEA_HAVEN_PLUGIN_DIRto the path ofsea-haven-claude-plugin/in the shell env or.envrc.Provision
AGENT_TEAM_API_TOKEN: export the token thatrun-team.py serveprints so the auto-delegate hook can authenticate. SetAGENT_TEAM_API_URLif the API is not at the defaulthttp://127.0.0.1:8765.Smoke-test
/delegate: startrun-team.py serve, then in a Claude Code session type/delegate Add a test file for the new dispatch node. Confirm the hook blocks with athread_idand the coordinator picks up the task.Smoke-test
/new-taskin Slack: post/new-task Fix the flaky CI testin#agent-team. Confirm the listener callsstart_taskand the bot replies with a clarifying question.🤖 Generated with Claude Code
https://claude.ai/code/session_01QYp761G9HojkmLqLZrASVi
Generated by Claude Code