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
fix(multi-repo): address review feedback on PR #974
Bundles six review fixes:
- TUI strict-mode: add 'p' to the bare-lowercase blocklist so the new
Projects dialog does not bypass the strict-mode contract. In strict
mode, reach Projects via the command palette.
- TUI discoverability: add ("p", "Projects") to the help overlay
(non-strict) and a "projects" entry to the command palette so the
feature is reachable from `?` and Ctrl+K. Bumped help DIALOG_HEIGHT
43 -> 44 to fit the extra row.
- Web API: introduce typed RegistryError (Conflict / NotFound / Other)
in projects::add and projects::remove. Server now returns 409 only
on conflicts and 500 on I/O errors; delete returns 404 only on
missing entries. CLI and TUI callers compile unchanged via
Into<anyhow::Error>.
- Refactor: extract apply_picked_project() and open_projects_picker()
out of handle_worktree_config_key, drop the
#[allow(clippy::too_many_lines)].
- Docs: add docs/guides/multi-repo-workspaces.md with the full user
story (registry, scopes, CLI/TUI/web flows, limitations). Wire it
into website sync-docs PAGES, URL_MAP, and docsNav.
- E2E: add tests/e2e/project_registry.rs with six tests covering
add/list/remove round-trip, JSON output, non-git rejection,
duplicate-within-scope, cross-scope override, --project requires
--worktree, and unknown --project name fast-fail.
Verified: cargo fmt, cargo clippy --all-targets --features serve,
cargo test --features serve --lib (1604 pass), cargo test --test e2e
project_registry (6 pass), web/tsc --noEmit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Run a single AoE session across several git repositories at once. Each repo gets its own worktree on a shared branch name, all rooted under one workspace directory, attached to one tmux session.
4
+
5
+
Use this when a unit of work, a feature, a bug fix, an investigation, touches more than one repo and you want one agent driving all of them, not N agents you have to mentally reconcile.
6
+
7
+
## When to Use
8
+
9
+
| Scenario | Multi-repo? |
10
+
|---|---|
11
+
| Bug spans backend and frontend repos | Yes |
12
+
| Refactor across an OSS core and a private wrapper | Yes |
13
+
| Feature limited to a single repo | No, regular session |
14
+
| Investigating logs that touch many repos | Yes, agent picks the relevant ones |
15
+
| OSS core is pinned and rarely changes | Use [`on_create` hooks](repo-config.md) instead |
16
+
17
+
## Quick Start
18
+
19
+
### 1. Register your repos once
20
+
21
+
```bash
22
+
aoe project add /path/to/backend
23
+
aoe project add /path/to/frontend
24
+
aoe project add /path/to/shared-lib
25
+
```
26
+
27
+
`aoe project list` shows what is registered.
28
+
29
+
### 2. Start a multi-repo session
30
+
31
+
CLI:
32
+
33
+
```bash
34
+
aoe add /path/to/backend \
35
+
--project frontend \
36
+
--project shared-lib \
37
+
-w feat/auth-rewrite -b
38
+
```
39
+
40
+
TUI: open the new-session dialog (`n`), enter the worktree branch, focus the **Extra Repos** field, press `Ctrl+R`, and pick the registered projects you want to include.
41
+
42
+
Web: `+ New session`, pick a primary repo, then click registered projects in the **Extra repos** picker (or paste a path with the free-text input).
43
+
44
+
### 3. The agent sees one workspace
45
+
46
+
The session starts in the workspace root with all the worktrees as siblings:
47
+
48
+
```
49
+
~/aoe-workspaces/feat-auth-rewrite/
50
+
├── backend/ ← branch feat/auth-rewrite
51
+
├── frontend/ ← branch feat/auth-rewrite
52
+
└── shared-lib/ ← branch feat/auth-rewrite
53
+
```
54
+
55
+
The agent navigates between them like any normal multi-repo working tree. Use `cd` and standard git commands; AoE does not impose any cross-repo orchestration.
56
+
57
+
## The Project Registry
58
+
59
+
Saved repo paths the multi-repo pickers draw from. Two scopes:
60
+
61
+
| Scope | File | Visibility |
62
+
|---|---|---|
63
+
| Global |`<app_dir>/projects.json`| Every profile |
64
+
| Profile |`<app_dir>/profiles/{profile}/projects.json`| Only that profile |
65
+
66
+
`<app_dir>` is `$XDG_CONFIG_HOME/agent-of-empires/` on Linux, `~/.agent-of-empires/` on macOS.
67
+
68
+
When both scopes hold the same canonical path, the **profile entry wins** in merged views (this is how `--allow-override` is meant to be used: stage a profile-specific name on top of a global default).
69
+
70
+
### Default scope
71
+
72
+
| Invocation | Default scope |
73
+
|---|---|
74
+
|`aoe project add <path>`| Global |
75
+
|`aoe -p <profile> project add <path>`| Profile |
76
+
77
+
Pass `--scope global` or `--scope profile` to override.
78
+
79
+
### Cross-scope collisions
80
+
81
+
```bash
82
+
aoe project add /repo/foo # global
83
+
aoe -p other project add /repo/foo # ERROR: same path in global scope
84
+
aoe -p other project add /repo/foo --allow-override # OK, profile shadows global
85
+
```
86
+
87
+
## CLI Reference
88
+
89
+
```bash
90
+
# List
91
+
aoe project list # merged (global + active profile)
92
+
aoe project list --scope global # globals only
93
+
aoe project list --scope profile # active profile only
94
+
aoe project list --json # machine-readable
95
+
96
+
# Add
97
+
aoe project add /path/to/repo # global, name = basename
98
+
aoe project add /path/to/repo --name shortname # custom display name
`--repo` and `--project` may be mixed; the union is passed to the workspace builder. The builder rejects duplicate repo names, so the same repo via two paths is a hard error.
113
+
114
+
`aoe list --json` includes a `workspace_repos` array for each session; the array is empty for single-repo sessions.
115
+
116
+
## Web Dashboard
117
+
118
+
The Projects page (folder icon in the sidebar footer) is full CRUD over the registry: add, remove, switch scope, opt into `allow_override`. Read-only servers (`aoe serve --read-only`) hide the destructive controls.
119
+
120
+
The new-session wizard surfaces the registry as toggleable chips on the Project step. The free-text input still works for paths that aren't registered.
121
+
122
+
Multi-repo sessions are bucketed into a single **Multi-repo** group at the bottom of the sidebar, regardless of which repo was chosen as the primary. Each session row shows a chip per repo under the title.
123
+
124
+
## Limitations
125
+
126
+
These are out of scope for the current release; tracked separately:
127
+
128
+
-**One branch name per workspace**: every repo gets the same `-w <branch>` value. Per-repo branch names is a future feature.
129
+
-**No agent-driven repo pull-in mid-session**: if the agent realizes it needs another repo, you have to start a new session. Tracked alongside the orchestrator work.
130
+
-**No saved workspace templates** ("named bundles of repos"): each session picks the set fresh. If your bundle is fixed, register the repos and select them all from the picker.
131
+
-**No per-repo PR tracking**: AoE does not track PRs today. Coordinated PR workflow happens outside AoE.
132
+
133
+
## Related
134
+
135
+
-[Worktrees Reference](worktrees.md) — how the per-repo worktrees are created.
136
+
-[Repository Configuration & Hooks](repo-config.md) — `on_create` hooks for fixed sibling repos that don't need a registry entry.
137
+
-[CLI Reference](../cli/reference.md) — full `aoe project` and `aoe add --project` flag listing.
0 commit comments