@@ -39,29 +39,49 @@ at runtime, enabling a workspace merge that implements the layering model.
3939
4040## Decision
4141
42- Three coordinated changes:
42+ Three coordinated changes, applied uniformly to both installation modes
43+ (per-org and per-repo):
4344
44- ** A. Org customizations live in ` customized/ ` .** The scaffold installs a
45+ ** A. Customizations live in ` customized/ ` .** The scaffold installs a
4546` customized/ ` directory with empty subdirs (` agents/ ` , ` skills/ ` , ` schemas/ ` ,
46- ` harness/ ` , ` policies/ ` , ` scripts/ ` , ` env/ ` ) containing ` .gitkeep ` files. Orgs add
47- overrides here. The main dirs are not in the ` .fullsend ` repo — they are
48- populated at runtime from upstream.
47+ ` harness/ ` , ` policies/ ` , ` scripts/ ` , ` env/ ` ) containing ` .gitkeep ` files. The
48+ location differs by install mode:
49+
50+ - ** Per-org** (` fullsend admin install <org> ` ): ` customized/ ` in the org-level
51+ ` <org>/.fullsend ` repo. Orgs add overrides here that apply to all enrolled
52+ repos.
53+ - ** Per-repo** (` fullsend admin install <owner/repo> ` ): ` .fullsend/customized/ `
54+ in the target repo itself. The repo adds overrides that apply only to that
55+ repo.
56+
57+ In both cases the main dirs (` agents/ ` , ` skills/ ` , etc.) are not committed —
58+ they are populated at runtime from upstream.
4959
5060** B. Runtime layering via reusable workflows.** Each reusable workflow adds a
5161"Prepare workspace" step that sparse-checkouts upstream defaults from
5262` fullsend-ai/fullsend@v0 ` , copies them into the main dirs (` agents/ ` , ` skills/ ` ,
53- etc.), then copies ` customized/* ` on top so org files overwrite upstream
54- defaults. The harness sees a single flat workspace — no changes to
63+ etc.), then copies customizations on top so override files replace upstream
64+ defaults. The workflow inspects ` install_mode ` to resolve the correct
65+ customization base:
66+
67+ - ` per-org ` : reads from ` customized/ `
68+ - ` per-repo ` : reads from ` .fullsend/customized/ `
69+
70+ The harness sees a single flat workspace in both modes — no changes to
5571` ResolveRelativeTo() ` or ` --fullsend-dir ` .
5672
5773** C. Scaffold stops writing upstream defaults.** ` WalkFullsendRepo ` skips files
5874in layered directories (` agents/ ` , ` skills/ ` , ` schemas/ ` , ` harness/ ` ,
5975` policies/ ` , ` scripts/ ` , ` env/ ` ) and upstream-only directories (` .github/actions/ ` ,
60- ` .github/scripts/ ` ). The installer writes only org-specific files and
61- ` customized/ ` gitkeeps.
76+ ` .github/scripts/ ` ). The installer writes only mode-specific files and
77+ ` customized/ ` gitkeeps. ` CustomizedDirs() ` returns paths for per-org installs;
78+ ` PerRepoCustomizedDirs() ` returns ` .fullsend/customized/ ` paths for per-repo
79+ installs.
6280
6381File categories after this change:
6482
83+ ** Per-org install** (` <org>/.fullsend ` repo):
84+
6585- ** Org-only** (~ 11 files): ` dispatch.yml ` , thin callers, shim template,
6686 ` AGENTS.md ` — always installed, never overwritten by upstream.
6787- ** Org overrides** (7 ` .gitkeep ` files):
@@ -73,14 +93,26 @@ File categories after this change:
7393- ** Upstream infrastructure** (~ 5 files): composite actions,
7494 ` setup-agent-env.sh ` — referenced directly from upstream, never in ` .fullsend ` .
7595
96+ ** Per-repo install** (target repo):
97+
98+ - ** Repo scaffolding** (~ 2 files): ` .github/workflows/fullsend.yaml ` (shim
99+ workflow), ` .fullsend/config.yaml ` (per-repo config).
100+ - ** Repo overrides** (7 ` .gitkeep ` files):
101+ ` .fullsend/customized/{agents,skills,schemas,harness,policies,scripts,env}/ ` —
102+ scaffold creates the structure, repo owners add real files.
103+ - ** Upstream defaults** and ** Upstream infrastructure** : same as per-org — provided
104+ at runtime, never committed to the repo.
105+
76106## Consequences
77107
78- - Fresh install produces a slim ` .fullsend ` repo (~ 24 files instead of ~ 82).
79- - Upgrades never overwrite org content — the installer does not touch
80- customizable content.
108+ - Fresh per-org install produces a slim ` .fullsend ` repo (~ 24 files instead of
109+ ~ 82). Per-repo install adds only ~ 16 files to the target repo.
110+ - Upgrades never overwrite customized content — the installer does not touch
111+ files in ` customized/ ` (per-org) or ` .fullsend/customized/ ` (per-repo).
81112- Upstream improvements to agents, skills, and schemas appear automatically at
82- runtime without re-install.
83- - Org overrides are explicit and auditable in ` customized/ ` .
113+ runtime without re-install, regardless of install mode.
114+ - Overrides are explicit and auditable: in ` customized/ ` for per-org, in
115+ ` .fullsend/customized/ ` for per-repo.
84116- Requires a public upstream repo (` fullsend-ai/fullsend ` is already public).
85117- Runtime availability: sparse checkout of upstream defaults requires
86118 github.com to be reachable at workflow execution time. GitHub Actions already
0 commit comments