Repository navigation
feat(agent): AgentProfile + ProfileRegistry — closes #1 - #5
Merged
Merged
Conversation
- 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]>
EngineerProjects
added a commit
that referenced
this pull request
Jun 4, 2026
feat(agent): AgentProfile + ProfileRegistry — closes #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentProfilestruct — persistent team-member persona (ID, Name, Role, SystemPrompt, Model, Skills, Metadata)ProfileRegistry— SQLite-backed CRUD (Register, Get, List, FindByRole, Delete)Seed()inserts 3 built-in profiles on first use without overwriting user edits: orchestrator, researcher, coder20260604_005_agent_profilescreates theagent_profilestable via GORM AutoMigrateGAgentProfilelives in thedbpackage (no circular import)Test plan
TestProfileRegistry_Seed— 3 built-ins exist after seedingTestProfileRegistry_Seed_Idempotent— calling Seed twice produces no duplicatesTestProfileRegistry_Register_And_Get— round-trip preserves all fieldsTestProfileRegistry_Register_EmptyID— returns errorTestProfileRegistry_Register_Upsert— second Register updates the recordTestProfileRegistry_Get_NotFound— returnsdb.ErrProfileNotFoundTestProfileRegistry_FindByRole— case-insensitive role matchTestProfileRegistry_Delete— removes record, subsequent Get returns not-foundTestProfileRegistry_Delete_NoOp— deleting absent ID does not errorTestProfileRegistry_List— returns all profiles sorted by IDAll 10 tests pass. Full
go build ./...clean.Closes #1
🤖 Generated with Claude Code