Commit Graph

7 Commits

Author SHA1 Message Date
8277a00118 perf(team_runner): T4 capability fast-cheap — implementers produce structured JSON, don't need capable tier 2026-03-16 01:14:08 -04:00
45e3b7663e fix: lazy-import anthropic SDK; tolerate LLM adapter failure in dry-run mode
--dry-run was crashing with ModuleNotFoundError because:
1. adapters/llm/anthropic.py imported 'anthropic' at module level
2. TeamRunner.__init__ always built the LLM adapter regardless of dry_run flag

Fixes:
- Move 'import anthropic' inside AnthropicAdapter.__init__ (lazy import)
  so the module loads cleanly without the SDK installed
- In TeamRunner.__init__, wrap _build_llm in a try/except when dry_run=True
  so missing adapter deps are logged as warnings, not fatal errors

dry-run now works with no third-party packages installed.
2026-03-16 01:03:17 -04:00
7b1cf7315c refactor(team_runner): make runtimes config-driven — replace hardcoded slots with dict
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 00:50:17 -04:00
71316b3090 refactor(team_runner): replace static adapter imports with dynamic importlib loading
Concrete adapter classes (AnthropicAdapter, GitHubAdapter, etc.) are no
longer imported at the top of team_runner.py. Instead, each registry maps
short names to 'module.path:ClassName' strings resolved lazily via
importlib.import_module at instantiation time.

This means:
- Adding a new adapter requires only an entry in the registry string dict
  (or a full dotted path directly in team.yaml) — no changes to TeamRunner.
- Third-party / custom adapters work out of the box: set e.g.
  adapters.llm: mypackage.llm.openai:OpenAIAdapter in team.yaml.
- The runner no longer hard-wires knowledge of which concrete classes exist.

Addresses tandrewng review comment on PR #1.
2026-03-16 00:30:28 -04:00
60576fbf2f fix: remove hardcoded max_tokens/temperature from _dispatch_via_llm
Both values are now sourced from team.yaml (models.default_max_tokens and
models.default_temperature) via the adapter's __init__, eliminating the
last hardcoded magic numbers. Callers can still override per-call via
context dict if needed.
2026-03-15 21:43:01 -04:00
e097f4be21 feat(core): implement TeamRunner orchestration loop
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>
2026-03-15 03:15:37 -04:00
eaf7fd8f6f feat: initial bootstrap — structure, task_brief, blackboard, adapter bases, escalation, prompts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 02:19:14 -04:00