feat(dashboard): /config — add-agent-type wizard (clone template) #460

Closed
opened 2026-04-27 13:50:58 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As an operator, I want an "+ Add agent type" button in /config that opens a wizard to create a new agent type by cloning an existing one, naming it, picking a Forgejo user, and choosing a role, so that I can spin up custom roles (e.g. qa, translator, release-manager) without hand-editing agents.json.

Acceptance criteria

Wizard

  • Step 1: pick template (existing type to clone) + role dropdown
  • Step 2: name (slug-validated, lowercased), forgejo_user (must already exist in Forgejo — mcp__forgejo__search_users lookup), display_name
  • Step 3: confirm — shows the resulting JSON diff
  • On confirm: PUT /config/agents, then trigger just agents-sync-equivalent server-side reconciliation to create the container
  • Reconciliation status streamed back ("starting container", "ready", or error) — operator can close wizard once "ready"

Server

  • New endpoint or reuse PUT /config/agents: when a new type appears in the resolved config, container reconciler picks it up on next pass (no extra plumbing needed if reconciler already diffs)
  • If forgejo_user doesn't exist in Forgejo, surface a clear error and don't write the config

Tests

  • Cloning from dev produces a valid new type with all required fields populated
  • Slug validation rejects spaces / uppercase / collisions
  • Server-side: invalid forgejo_user → 400

Out of scope

  • Removing agent types via UI (delete is risky — keep it manual via JSON for now, with a confirmation step)
  • Re-naming existing types (rename touches container names + git branches — separate epic)
  • Bulk import of agent definitions

References

  • Depends on Phase 4a (skeleton with the button stub) — #456
  • docs/agents-architecture.md
  • docs/credentials.md (forgejo_user wiring)
## User story As an operator, I want an "+ Add agent type" button in `/config` that opens a wizard to create a new agent type by cloning an existing one, naming it, picking a Forgejo user, and choosing a role, so that I can spin up custom roles (e.g. `qa`, `translator`, `release-manager`) without hand-editing `agents.json`. ## Acceptance criteria ### Wizard - [ ] Step 1: pick template (existing type to clone) + role dropdown - [ ] Step 2: name (slug-validated, lowercased), forgejo_user (must already exist in Forgejo — `mcp__forgejo__search_users` lookup), display_name - [ ] Step 3: confirm — shows the resulting JSON diff - [ ] On confirm: PUT `/config/agents`, then trigger `just agents-sync`-equivalent server-side reconciliation to create the container - [ ] Reconciliation status streamed back ("starting container", "ready", or error) — operator can close wizard once "ready" ### Server - [ ] New endpoint or reuse PUT `/config/agents`: when a new type appears in the resolved config, container reconciler picks it up on next pass (no extra plumbing needed if reconciler already diffs) - [ ] If forgejo_user doesn't exist in Forgejo, surface a clear error and don't write the config ### Tests - [ ] Cloning from `dev` produces a valid new type with all required fields populated - [ ] Slug validation rejects spaces / uppercase / collisions - [ ] Server-side: invalid forgejo_user → 400 ## Out of scope - Removing agent types via UI (delete is risky — keep it manual via JSON for now, with a confirmation step) - Re-naming existing types (rename touches container names + git branches — separate epic) - Bulk import of agent definitions ## References - Depends on Phase 4a (skeleton with the button stub) — `#456` - `docs/agents-architecture.md` - `docs/credentials.md` (forgejo_user wiring)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#460
No description provided.