Skip to content

Commit d2d28f5

Browse files
committed
docs: add ADR and implementation plan for agent registration
Add ADR and implementation plan for declaring agents in config.yaml instead of compiling them into the binary. fullsend run resolves agents from config at runtime, loading harnesses directly from URLs or local paths — no intermediate wrapper files on disk. Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
1 parent 79d3840 commit d2d28f5

3 files changed

Lines changed: 532 additions & 0 deletions

File tree

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: "NNNN. Agent registration"
3+
status: Accepted
4+
relates_to:
5+
- agent-architecture
6+
- agent-infrastructure
7+
topics:
8+
- agents
9+
- per-repo
10+
- configuration
11+
- extensibility
12+
---
13+
14+
# NNNN. Agent registration
15+
16+
Date: 2026-06-29
17+
18+
## Status
19+
20+
Accepted
21+
22+
## Context
23+
24+
Which agents fullsend knows about is currently compiled into the binary.
25+
Scaffold-embedded harnesses define the canonical agent set, and a
26+
hardcoded `externalAgents` map in `baseurl.go` extends it for agents
27+
extracted to standalone repos. Adding an agent requires a code change,
28+
extracted agents need special handling, and first-party and third-party
29+
agents follow different paths.
30+
31+
The triage agent extraction to `fullsend-ai/agents`
32+
([ADR 0045](0045-forge-portable-harness-schema.md) Phase 4) is the
33+
first agent to move out of the scaffold. The registration mechanism
34+
must support both first-party extractions and user-defined agents
35+
without code changes.
36+
37+
## Decision
38+
39+
Make agent registration a **config-level concept**. Add an `agents`
40+
list to both `OrgConfig` and `PerRepoConfig`. (Note: ADR 0045 Phase 4
41+
previously removed the `agents` block from `OrgConfig`; this re-adds
42+
a field with the same YAML key but different semantics — harness
43+
source URLs rather than role/name/slug identity tuples.) Each entry
44+
is a URL or local path, with an optional name override:
45+
46+
```yaml
47+
agents:
48+
- https://raw.githubusercontent.com/fullsend-ai/agents/<sha>/harness/triage.yaml#sha256=<hash>
49+
- name: lint
50+
source: harness/my-linter.yaml
51+
```
52+
53+
`fullsend run <name>` resolves agents from config at runtime, loading
54+
harnesses directly from URLs or local paths. No intermediate wrapper
55+
files are generated on disk — role and slug come from the harness
56+
content itself. Config entries merge additively with
57+
scaffold-discovered agents (config wins on name collision), enabling
58+
gradual migration. Once all first-party agents are extracted, config
59+
becomes authoritative and the scaffold fallback is removed.
60+
61+
A `fullsend agent` CLI subcommand (`add`, `list`, `update`, `remove`)
62+
manages entries (single-user CLI operations; no concurrency guard on
63+
config read/write) and auto-pins URLs to a commit SHA with an
64+
integrity hash. Per-repo config gains `allowed_remote_resources` so per-repo
65+
installs can validate base composition without an org config repo.
66+
Per-repo config is read from the **base branch**, not the PR branch,
67+
so a PR cannot inject an attacker-controlled `allowed_remote_resources`
68+
entry or agent source.
69+
70+
See the [implementation plan](../plans/agent-registration.md) for
71+
phasing, schema details, CLI behavior, and migration mechanics.
72+
73+
## Consequences
74+
75+
- Anyone can add an agent to a fullsend installation via `fullsend agent add` — no code change required.
76+
- First-party and third-party agents follow the same registration path.
77+
- The additive merge model allows agents to be extracted from the scaffold one at a time without disrupting existing installations.
78+
- Per-repo installs no longer need org config for remote resource validation.
79+
- No forced migration — empty config falls back to scaffold discovery until populated.
80+
81+
## References
82+
83+
- [ADR 0033](0033-per-repo-installation-mode.md) -- per-repo installation mode
84+
- [ADR 0038](0038-universal-harness-access.md) -- URL-based resource references and integrity hashes
85+
- [ADR 0045](0045-forge-portable-harness-schema.md) -- harness composition via `base:` URLs
86+
- [ADR 0057](0057-repos-management.md) -- repos management for per-repo installations
87+
- [Implementation plan](../plans/agent-registration.md)

docs/architecture.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ The registry is the bridge between the abstract roles defined in [agent-architec
227227

228228
Fullsend provides a base set of agent definitions. The adopting organization's **`.fullsend`** repository extends this with org-specific agents in its `agents/` directory, following the inheritance model: fullsend defaults, then org config, then per-repo overrides. (See [ADR 0003](ADRs/0003-org-config-repo-convention.md).)
229229

230+
**Decided:** Agents are declared in `config.yaml` (both org and per-repo) and resolved at runtime by `fullsend run` directly from URLs or local paths — no compiled-in registry or wrapper files. See [ADR NNNN](ADRs/NNNN-agent-registration.md).
231+
230232
**Open questions:**
231233

232234
- How are new agent roles added, tested, and promoted to production? (See [testing-agents.md](problems/testing-agents.md).) (Functional tests provide a framework for testing agent roles against controlled fixtures — [ADR 0052](ADRs/0052-functional-tests-for-agent-pipelines.md). Promotion workflow remains open.)

0 commit comments

Comments
 (0)