You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): add migrate-customizations command with PR creation
Signed-off-by: Greg Allen <gallen@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Greg Allen <gallen@redhat.com>
Copy file name to clipboardExpand all lines: docs/architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,7 +242,7 @@ Fullsend provides a base set of agent definitions. The adopting organization's *
242
242
- Config-level agent registration: an `agents` list in both `OrgConfig` and `PerRepoConfig` declares agent harness sources as pinned URLs or local paths, replacing compiled-in agent discovery ([ADR 0058](ADRs/0058-agent-registration.md)).
243
243
- Runtime resolution: `fullsend run <name>` looks up the agent in config and loads the harness directly from the URL or path — no intermediate wrapper files on disk. Role and slug come from the harness content itself.
244
244
- Additive merge: config entries overlay scaffold-discovered agents (config wins on name collision), enabling gradual extraction of first-party agents without disrupting existing installations. Builds on [ADR 0045](ADRs/0045-forge-portable-harness-schema.md) harness identity model.
245
-
- CLI management: `fullsend agent add/list/update/remove` manages config entries and auto-pins URLs to a commit SHA with an integrity hash.
245
+
- CLI management: `fullsend agent add/list/update/remove/migrate-customizations` manages config entries and auto-pins URLs to a commit SHA with an integrity hash.
│ ├── --fullsend-dir <dir> # Base directory with .fullsend layout
48
+
│ ├── --repo <owner/repo> # Target repo for migration PR
49
+
│ └── --dry-run # Preview changes without PR
46
50
├── lock [agent-name] # Pin remote deps to lock.yaml
47
51
│ ├── --all # Lock all harnesses in the harness directory
48
52
│ ├── --fullsend-dir <path> # Base directory with .fullsend layout
@@ -85,6 +89,28 @@ fullsend
85
89
└── --role <string> # Agent role for minting (required with --mint-url)
86
90
```
87
91
92
+
### Migrate Customizations
93
+
94
+
The `fullsend agent migrate-customizations` command converts `customized/` directory overlays (deprecated by [ADR-0064](../../ADRs/0064-deprecate-customized-directory-overlay.md)) into config-driven agents with `base:` composition harnesses. It scans the local `customized/` directory, classifies each override, and delivers changes via PR:
| Dead | Agent already registered in config | Delete customized files |
109
+
| Custom | Not in upstream scaffold | Move files, register local path in config |
110
+
| Modified | Standard scaffold agent, not in config | Compute `base:` composition harness via `DiffHarness`, register in config |
111
+
112
+
The diff engine (`internal/harness/diff.go`) computes the minimal child harness that reproduces the customized version when composed with the upstream base. It mirrors `mergeBaseIntoChild` semantics: scalar overrides, slice concatenation extras, map merge deltas, and security fields always included.
113
+
88
114
### Command Decomposition
89
115
90
116
The `mint`, `inference`, and `github` subcommands decompose setup into role-specific operations for organizations that separate GCP and GitHub responsibilities:
@@ -549,6 +575,7 @@ var executableFiles = map[string]struct{}{
549
575
|------|-------|---------|
550
576
|`internal/cli/root.go`|~34 | CLI entry point, command registration |
Copy file name to clipboardExpand all lines: docs/guides/getting-started/operations.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ For organizations that separate GCP and GitHub responsibilities across teams, fu
75
75
| Developer |`fullsend agent list`| List registered agents and their sources |
76
76
| Developer |`fullsend agent update <name> [sha]`| Re-pin a URL agent to a new commit SHA |
77
77
| Developer |`fullsend agent remove <name>`| Unregister an agent from config |
78
+
| Developer |`fullsend agent migrate-customizations`| Migrate `customized/` overlays to config-driven agents via PR |
78
79
79
80
The typical handoff: a GCP admin runs `mint deploy` + `mint enroll` + `inference provision`, then passes the mint URL and WIF provider resource name to a GitHub maintainer who runs `github setup --mint-url=... --inference-wif-provider=...`.
Copy file name to clipboardExpand all lines: docs/guides/user/customizing-agents.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,17 @@ security: # Security is enabled by default with fail_mode
95
95
96
96
## Layered Configuration Resolution
97
97
98
+
> **Deprecated:** The `customized/` directory overlay mechanism described
99
+
> below is deprecated per [ADR-0064](../../ADRs/0064-deprecate-customized-directory-overlay.md).
100
+
> Use `base:` composition instead: register agents in `config.yaml` with a
101
+
> `base:` URL pointing to the upstream harness, and override only the fields
102
+
> that differ. See [ADR-0045](../../ADRs/0045-forge-portable-harness-schema.md)
103
+
> for the composition model and [ADR-0058](../../ADRs/0058-agent-registration.md)
104
+
> for config-driven registration.
105
+
> Run `fullsend agent migrate-customizations --dry-run` to preview the
106
+
> migration, then `fullsend agent migrate-customizations --repo owner/repo`
107
+
> to apply it.
108
+
98
109
Fullsend uses a three-tier configuration inheritance model for all configuration: agent definitions, skills, policies, harness definitions, and guardrails. Each configuration tier can extend or override the one below it.
99
110
100
111
```
@@ -149,6 +160,9 @@ For per-repo mode, the same structure lives at `.fullsend/customized/` within th
149
160
150
161
### How Override Resolution Works
151
162
163
+
> **Deprecated:** This section describes the deprecated `customized/` overlay.
164
+
> See the [deprecation notice above](#layered-configuration-resolution).
165
+
152
166
**File-level replacement, not field-level merging.** When you place a file in `customized/harness/code.yaml`, it completely replaces the upstream `harness/code.yaml`. There is no YAML field merging.
153
167
154
168
**Example: Adding a skill to the code agent**
@@ -190,6 +204,10 @@ To add a custom skill to the code agent's harness:
190
204
191
205
### Customizing Pre-commit Tool Dependencies
192
206
207
+
> **Note:** The `customized/scripts/.pre-commit-tools.yaml` L1 overlay path
208
+
> referenced below uses the deprecated `customized/` mechanism.
209
+
> The per-repo L2 path (`.pre-commit-tools.yaml` at repo root) is unaffected.
210
+
193
211
Fullsend auto-detects and installs tools required by a target repo's pre-commit hooks. The resolver reads `.pre-commit-config.yaml`, matches hooks against a tools registry, and installs missing dependencies before the authoritative pre-commit check runs.
194
212
195
213
Only hooks that pre-commit **cannot self-serve** need registry entries:
0 commit comments