Skip to content

release: multi-agent foundation — AgentProfile, Mailbox, Dispatcher, TeamBus - #9

Merged
EngineerProjects merged 12 commits into
mainfrom
dev
Jun 4, 2026
Merged

EngineerProjects merged 12 commits into
mainfrom
dev

Conversation

@EngineerProjects

Copy link
Copy Markdown
Collaborator

What's in this release

Features

  • AgentProfile — persistent team-member persona with UUID ID, Nickname (injected into system prompt), Role, TeamID
  • ProfileRegistry — SQLite-backed CRUD with seed of 3 built-in profiles (Nexus, Aria, Kai)
  • Mailbox — persistent per-agent async inbox (task, reply, broadcast, event message kinds)
  • Dispatcher — routes messages between agents: Send, Reply, Broadcast, Assign by role/team
  • TeamBus — polls agent inboxes and dispatches to a MessageHandler

Infrastructure

  • Branching strategy: feat/* → dev → main
  • CI Gate job: Build + Test + Lint must all pass before any PR can merge
  • Branch protection on both main and dev
  • go vet added to CI lint job

Documentation

  • docs/team.md — full multi-agent system documentation
  • CONTRIBUTING.md — updated with branching strategy, Gate CI, package boundaries

Package structure

internal/agent    →  AgentProfile, ProfileRegistry
internal/mailbox  →  Message, Mailbox (SQLite)
internal/team     →  Dispatcher, TeamBus

Tests

  • 15 tests on AgentProfile / ProfileRegistry
  • 15 tests on Mailbox
  • 11 tests on Dispatcher / TeamBus
  • All passing with race detector

Closes #1, #2, #3

EngineerProjects and others added 12 commits June 4, 2026 13:14
- AgentProfile struct: ID, Name, Role, SystemPrompt, Model, Skills, Metadata
- ProfileRegistry: SQLite-backed CRUD via db.DB (Register, Get, List, FindByRole, Delete)
- Seed() inserts 3 built-in profiles (orchestrator, researcher, coder) without overwriting user edits
- DB migration 20260604_005_agent_profiles adds the agent_profiles table
- 10 unit tests covering CRUD, upsert, seed idempotency, role filtering, not-found errors

Closes #1

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- ID is now a random UUID (globally unique — multiple agents can share the same role)
- Nickname replaces Name: injected into the system prompt ("You are Maria, a researcher.")
- TeamID field groups agents into named teams for future dispatch filtering
- SystemPromptTemplate supports {{.Nickname}} substitution; SystemPrompt() builds the full prompt
- Built-in profiles: Nexus (manager), Aria (researcher), Kai (engineer) with fixed UUIDs
- FindByTeam() added to registry and DB layer
- 15 unit tests covering UUID uniqueness, nickname injection, multi-role scenarios, team isolation

Closes #1

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
feat(agent): AgentProfile + ProfileRegistry — closes #1
- Message struct with UUID ID, Kind, FromAgent, ToAgent, Subject, Body, ReplyTo, TeamID
- MessageKind enum: task, reply, broadcast, event
- Mailbox interface: Send, Receive, MarkRead, MarkAllRead, History, Thread, Delete
- SQLiteMailbox implementation backed by db.DB
- Broadcast fan-out: expands "*" to individual per-recipient records via agentLister callback
- DB model GMailboxMessage + migration 20260604_005_mailbox_messages
- 15 unit tests: send/receive, ordering, mark-read, history, thread, delete, broadcast, inbox isolation

Closes #2

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
feat(mailbox): persistent per-agent message inbox
Move inter-agent coordination to internal/team, separate from agent execution:
- Dispatcher: Send, Reply, Broadcast, Assign (route by role/team)
- ErrNoAgentForRole: typed error for unmatched Assign
- TeamBus: polls agent inboxes, dispatches to MessageHandler; Start idempotent, Stop drains cleanly
- 11 tests covering all Dispatcher methods and TeamBus delivery/idempotency

Dependency chain: internal/team → internal/agent + internal/mailbox (no cycles)

Closes #3

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
feat(team): Dispatcher and TeamBus — closes #3
Covers AgentProfile, Mailbox, Dispatcher, TeamBus with usage examples,
package structure, built-in profiles, conversation threads, and roadmap.
Also adds the link in the README documentation table.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Fix develop → dev in push/PR triggers
- Add go vet step in the lint job
- Add Gate job (needs: build, test, lint) as the single required status
  check — adding new jobs in future does not require updating branch
  protection rules
- Branch protection on main and dev now requires Gate to pass before merge

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Add branching strategy section: feat/* → dev → main
- Explain Gate CI requirement (Build + Test + Lint must pass before merge)
- Update package boundaries to include internal/team and internal/mailbox
- Update PR checklist with Gate CI table and local commands
- Note that PRs must target dev, not main

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Change value receiver to pointer receiver — Map contains sync.RWMutex
so copying by value is unsafe and flagged by go vet.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@EngineerProjects
EngineerProjects merged commit 1874bdc into main Jun 4, 2026
8 checks passed
EngineerProjects added a commit that referenced this pull request Jun 4, 2026
release: multi-agent foundation — AgentProfile, Mailbox, Dispatcher, TeamBus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Agent definition — AgentProfile struct and registry

1 participant