Commit Graph

19 Commits

Author SHA1 Message Date
86d0b34462 chore: sync agency-agents submodule with upstream 2026-06-01 09:00:15 -04:00
c5dabf41f4 chore: update submodule URL to Gitea 2026-04-02 10:04:48 -04:00
8994f87a43 feat: implement core/team_runner.py and cli/agency.py
- core/blackboard.py: add t3_task_lists table, extend event kinds to
  include full visibility vocabulary (gate_pending, gate_approved,
  gate_rejected, gate_paused, gate_resumed, path_amendment, log), and
  add query methods (get_events, get_latest_gate_event, get_t3_task_lists,
  all_t3_committed, get_briefs, get_workstreams, etc.)

- core/team_runner.py: full run lifecycle orchestrator
  - Loads team.yaml + role_registry.yaml, instantiates all four adapter types
  - T1 Plan (two-phase: plan + accept), T2 Lead/Specialist/Synthesis,
    T3 Squad Lead with mesh draft/commit cycle and mesh-timeout escalation,
    T4 swarm+pipeline with dep-ordering, T5 fan-out + joint verdict
  - Async (asyncio.gather) for parallel workstream and T4/T5 fan-out
  - Gate logic: gate_pending → notify → poll blackboard → gate_approved/rejected
  - Path amendment monitor (background task)
  - EscalationHandler integrated into _dispatch_with_retry
  - T3 mesh timeout → T2 re-scope escalation
  - Terminal failure → notify + run status=failed
  - VCS branch creation + PR at T1 Accept phase
  - Runtime selection: coding_agent runtime for preferred_runtime="coding_agent",
    tier_runtime_map overrides, fallback to default runtime

- cli/agency.py: agency CLI with subcommands
  - run: start pipeline, prints run_id + watch/inspect hints
  - watch: tails blackboard events live with ANSI-coloured output
  - inspect: run tree, --tier filter, --brief detail view
  - approve: write gate_approved directly to blackboard (universal gate path)
  - reject: write gate_rejected with --reason
  - pause: write gate_paused signal
  - resume: write gate_resumed signal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 16:40:43 -04:00
641f122cdb docs: add CLAUDE.md agent quick reference
docs: add CLAUDE.md agent quick reference
2026-03-30 15:19:07 -04:00
54afa0f53f docs: resolve all design questions + visibility layer + portability audit
docs: resolve all design questions + visibility layer + portability audit
2026-03-30 15:18:48 -04:00
f228061c4d docs: update design doc with new architecture decisions
docs: update design doc with new architecture decisions
2026-03-30 15:18:30 -04:00
1c99e40f98 docs: purge OpenClaw/Hans specifics from core design
Portability audit — all platform-specific concerns moved to adapter layer:

- Gate Approval UX (Resolved Mechanics): rewritten as platform-agnostic.
  Core: runner writes gate_pending, calls notify_adapter.send(), polls
  blackboard for gate_approved. Universal path: agency CLI writes directly
  to blackboard. Adapter handles its own inbound response bridge internally.

- pending_gates.json removed from core directory structure and runner
  responsibilities — adapter-internal state, not a core concern.

- 'User → Hans → team_runner.start()' → 'User → team_runner.start()'
  Core has no dependency on a specific caller.

- 'notify_adapter.send(...to Andrew via Hans)' → 'notify_adapter.send()'
  throughout design.md and buildspec.md.

- anthropic.py description: 'via OpenClaw or direct API' → 'direct API'
  (anthropic adapter never goes via OpenClaw)

- Output/review decision: 'Hans messages Andrew' → 'notify_adapter.send()'
- Run visibility decision: 'Andrew via Hans' → 'via notify_adapter.send()'
- Decisions log: gate approval and visibility entries rewritten accordingly

Adapter layer correctly unchanged:
  adapters/notify/openclaw.py — OpenClaw-specific, owns its inbound bridge
  adapters/runtime/openclaw.py — OpenClaw sessions_spawn, correctly isolated
  team.yaml example config — adapter selection is config, not core
2026-03-30 14:31:55 -04:00
8f143e779d docs: resolve remaining 3 design questions (spawn ownership, gate UX, mesh timeout)
- Spawn calls: runner owns all runtime_adapter.spawn() calls; tiers write
  status=pending briefs to blackboard, runner's spawn loop acts on them.
  Gate logic lives in the spawn loop — no gate plumbing needed in agents.

- Gate approval UX: Signal reply via Hans + direct CLI both supported.
  Both write gate_approved to blackboard; runner doesn't care which path.
  Hans uses pending_gates.json for multi-run disambiguation.

- T3 mesh timeout: escalate to T2 (domain boundary problem). If T2 also
  exhausts retry budget, normal escalation ladder handles it. No force-commit.

Add pending_gates.json to directory structure and buildspec.
Update runner step in build order with full spawn loop responsibilities.
2026-03-30 14:22:39 -04:00
a721db63f6 docs: lock in visibility layer, resolve all 5 open design questions
- Resolve T3 mesh mechanics: blackboard-based draft/commit cycle
- Resolve T1 plan output schema: formal JSON structure with workstreams + parallelism groups
- Resolve T5 consensus: T3 aggregates joint verdict (pass/partial/fail), partial retries failed slices only
- Resolve path amendment mechanism: event-based, runner notifies higher tier, no approval gate
- Resolve failure handling: confirmed distributed ownership, runner owns T1 + terminal only

Add run visibility layer:
- Human-readable live log (normal + verbose modes)
- Configurable inspection gates (t1_plan always, t2_synthesis recommended, others optional)
- strict_mode flag for full gating on early runs
- cli/agency.py: run, watch, inspect, approve, reject, pause, resume
- gate_pending halt loop in team_runner, gate_approved/rejected resume
- Expanded blackboard event vocabulary (gate_*, path_amendment, log)
- t3_task_lists table for mesh coordination state
- Inspection gate flow added to buildspec Key Flows

Build order updated: 16 steps (added cli/ step, clarified runner gate responsibilities)
2026-03-30 13:43:19 -04:00
882b769d21 chore: sync agency-agents submodule with upstream 2026-03-30 09:00:16 -04:00
ce3c020de2 docs: add open design questions section 2026-03-16 20:45:47 -04:00
b54436f474 docs: T1 two-phase lifecycle, T2 Lead Architect, shared assumptions, conflict resolution 2026-03-16 20:41:13 -04:00
1ed7023c08 docs: update design — dynamic dispatch, distributed ownership, orchestration patterns 2026-03-16 16:13:33 -04:00
9efbb3b010 docs: add CLAUDE.md agent quick reference 2026-03-16 15:52:44 -04:00
72bd744664 docs: add design doc and buildspec (#5) 2026-03-16 15:51:14 -04:00
084cfb0bb2 feat: implement all adapter layers (#2)
Adapters implemented:
- adapters/llm/anthropic.py — Anthropic Claude SDK, capability-based model selection,
  max_tokens + temperature configurable via team.yaml, lazy SDK import
- adapters/vcs/github.py — GitHub PR/branch operations via gh CLI
- adapters/notify/openclaw.py — OpenClaw system event notifications
- adapters/runtime/openclaw.py — OpenClaw sessions_spawn for agent execution
- adapters/runtime/claude_code.py — Claude Code CLI for T4/T5 coding tasks

All adapters follow the abstract base interfaces from Phase 1.
Config-driven model selection via capability_map in team.yaml.
2026-03-16 11:45:11 -04:00
ce1ce85b87 feat: expand role_registry with specialist roles + update agency-agents submodule (#4)
Role registry changes:
- T2 backend: software-architect → backend-architect
- T2 frontend: software-architect → frontend-architect
- T3 backend: senior-developer → senior-backend-developer (NEW)
- T3 frontend: senior-developer → senior-frontend-developer (NEW)
- T4 backend: backend-architect → backend-developer
- T4 default: senior-developer → backend-developer
- Added coverage for: ai, security, mobile, database, devops, docs, data, embedded, e2e, accessibility

Submodule updated to include: frontend-architect, backend-developer,
senior-backend-developer, senior-frontend-developer.

Clean tier separation:
  T2 = architects (design)
  T3 = senior devs (lead + implement-or-delegate)
  T4 = developers (pure implementation)
  T5 = reviewers/testers (verification)
2026-03-16 11:44:54 -04:00
70f1c2f49e chore: point agents submodule at forked repo for resilience 2026-03-15 02:34:11 -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