Full T1→T5 pipeline orchestration with adapter registry, escalation,
and blackboard event emission.
Key design decisions:
- Adapter registry maps config keys to concrete classes; VCS and notify
are optional (swallow init errors and degrade gracefully)
- _dispatch_brief() routes to LLM adapter (standard) or coding runtime
(coding_agent) based on brief.preferred_runtime
- _run_with_escalation() drives the retry/salvage loop: persists amended
briefs to the Blackboard before each re-submission
- Tier parsers (_parse_t1/t2/t3_output) build child TaskBriefs, preserving
the goal_anchor invariant and resolving agent personalities from the registry
- T5 Verifier is always spawned after T4; VCS commit only happens on
verified pass (status "passed" or "done")
- --dry-run flag: logs all actions, skips LLM, VCS, and notify calls
- Exposes CLI via `python -m core.team_runner` with --config, --dry-run,
--verbose flags
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OpenClawRuntimeAdapter:
- spawn() shells out to `openclaw session spawn --task <t> --mode run`
- get_result() polls `openclaw session get <id>` until terminal status or timeout
- kill() calls `openclaw session kill <id>`, silently succeeds if finished
- Parses JSON or raw-text session IDs; raises NotImplementedError with
helpful message when openclaw CLI is absent from PATH
ClaudeCodeRuntimeAdapter:
- spawn() launches `claude --permission-mode bypassPermissions --print <task>`
in a temp dir (or context["workdir"]), returns a UUID job_id
- Tracks all Popen instances in a thread-safe dict
- get_result() calls communicate(timeout=...), raises TimeoutError on timeout
- kill() terminates the Popen; silently ignores already-finished processes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sends notifications via `openclaw system event --text <msg> --mode now`.
- Always logs locally (info/warning/error) regardless of CLI availability
- Gracefully handles FileNotFoundError (openclaw not on PATH) and
TimeoutExpired; notifications are best-effort and never crash the pipeline
- OPENCLAW_SIGNAL_NUMBER env var stored for future direct-signal support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses PyGithub to interact with the GitHub REST API.
- Reads GITHUB_TOKEN from env; parses owner/repo from SSH or HTTPS URL
- create_branch() creates a branch off the configured base branch
- commit() accepts dict[str, str] {path: content} or list[str] of
local paths; uses Contents API (create_file / update_file)
- create_pr() and get_pr_status() delegate to PyGithub pull-request API
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements AnthropicAdapter using the anthropic SDK.
- Reads ANTHROPIC_API_KEY from env; raises ValueError if missing
- resolve_model() looks up capability_map in team.yaml config,
falls back to "capable" tier then hard-coded claude-sonnet-4-6
- complete() supports system_prompt, max_tokens (default 4096),
and temperature (default 0) via the context dict
- Adds PyGithub to requirements.txt (needed by GitHubAdapter)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>