77 lines
3.1 KiB
Markdown
77 lines
3.1 KiB
Markdown
|
|
# Sea Haven Industries — Claude Code Engineering Plugin
|
|||
|
|
|
|||
|
|
This directory is the **Sea Haven Claude Code plugin**: context and hooks for
|
|||
|
|
Claude Code sessions run against the `sea-haven-industries/orchestrator` repo.
|
|||
|
|
Copy `settings.template.json` into `~/.claude/settings.json` (or merge it into
|
|||
|
|
an existing one) to activate the hooks.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## Project overview
|
|||
|
|
|
|||
|
|
The orchestrator is the R720-hosted Plane-2 SDLC pipeline. It runs a
|
|||
|
|
multi-model multi-agent loop — **Claude Sonnet** (coordinator/clarifier/planner),
|
|||
|
|
**GPT-4.1** (cross-reviewer), **DeepSeek** (fast_coder/builder), **Gemini**
|
|||
|
|
(scanner) — gated by a CI trust boundary (`agent-team-apply-verify.yml`).
|
|||
|
|
|
|||
|
|
Key directories:
|
|||
|
|
|
|||
|
|
| Path | Purpose |
|
|||
|
|
|------|---------|
|
|||
|
|
| `agent-team/` | The pipeline package (`agent_team.*`) + tests |
|
|||
|
|
| `agent-team/run-team.py` | CLI: `serve`, `start`, `answer` sub-commands |
|
|||
|
|
| `agent-team/agent_team/coordinator.py` | Keystone: graph + transport wiring |
|
|||
|
|
| `agent-team/agent_team/graph.py` | LangGraph state machine (P1–P3+) |
|
|||
|
|
| `agent-team/agent_team/nodes/` | Pipeline node implementations |
|
|||
|
|
| `agent-team/agent_team/transport/` | Slack / GitHub / Claude Code adapters |
|
|||
|
|
| `.github/workflows/agent-team-apply-verify.yml` | CI trust boundary (NEVER edit directly; use a WS PR) |
|
|||
|
|
| `sea-haven-claude-plugin/` | This plugin |
|
|||
|
|
|
|||
|
|
## Development rules
|
|||
|
|
|
|||
|
|
1. **Green before merge**: `cd agent-team && python3 -m ruff check . && python3 -m pytest -q` must pass.
|
|||
|
|
2. **No secrets in code**: all tokens go in env vars or GitHub secrets.
|
|||
|
|
3. **No SSH/AWS/infra commands**: the R720 box is VPN-only; never attempt network access from a Claude Code session.
|
|||
|
|
4. **Draft PRs only**: all automated changes go out as `--draft`; humans merge.
|
|||
|
|
5. **CI YAML edits** require a security review (`/sh-security-review`) and a separate WS PR — never inline.
|
|||
|
|
|
|||
|
|
## Delegating tasks to the pipeline
|
|||
|
|
|
|||
|
|
### Via Slack
|
|||
|
|
|
|||
|
|
Post `/new-task <description>` in any channel the Sea Haven bot is in. The
|
|||
|
|
listener routes it to the coordinator's `start_task`, which begins the
|
|||
|
|
CLARIFY → PLAN → REVIEW → BUILD → VERIFY pipeline. You'll receive a clarifier
|
|||
|
|
question back in Slack.
|
|||
|
|
|
|||
|
|
### Via this Claude Code session (auto-delegate hook)
|
|||
|
|
|
|||
|
|
Prefix your prompt with `/delegate ` (or `DELEGATE: `) to auto-send the task
|
|||
|
|
to the pipeline HTTP API instead of answering it locally:
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
/delegate Add OAuth2 to the admin portal — use PKCE, no client secret stored
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
The hook calls `POST http://127.0.0.1:8765/tasks` (requires
|
|||
|
|
`AGENT_TEAM_API_TOKEN` env var) and returns the `thread_id` so you can track
|
|||
|
|
the task in the coordinator.
|
|||
|
|
|
|||
|
|
Set `AGENT_TEAM_API_URL` to override the default `http://127.0.0.1:8765`.
|
|||
|
|
Set `AGENT_TEAM_API_TOKEN` to the bearer token from `run-team.py serve`.
|
|||
|
|
|
|||
|
|
## Available slash commands
|
|||
|
|
|
|||
|
|
These are defined in `settings.template.json` (copy to `~/.claude/settings.json`):
|
|||
|
|
|
|||
|
|
| Command | Effect |
|
|||
|
|
|---------|--------|
|
|||
|
|
| _(hooks auto-detect `/delegate` prefix)_ | Auto-delegate to pipeline |
|
|||
|
|
|
|||
|
|
## Phases
|
|||
|
|
|
|||
|
|
- **P1**: INTAKE → CLARIFY (human gate) → PLAN
|
|||
|
|
- **P2**: + adversarial REVIEW loop (GPT-4.1 cross-reviewer)
|
|||
|
|
- **P3**: + BUILD (DeepSeek) → VERIFY (CI gate)
|
|||
|
|
- **P3+**: + DISPATCH (push head branch + trigger `workflow_dispatch`)
|