refactor(development): move gastown patches to separate files
All checks were successful
CI / check (push) Successful in 3m37s

Replace inline postPatch substituteInPlace calls with proper unified
diff patch files, following the pattern established by beads.

This improves maintainability:
- Each patch is in its own file with clear naming
- Patches use proper unified diff format
- Easier to review, update, and track individual fixes
- Default.nix is cleaner (237 lines of substituteInPlace -> 15 lines)

Patches included:
- gastown-fix-validate-recipient.patch
- gastown-fix-agent-bead-address-title.patch
- gastown-fix-agent-bead-rig-prefix.patch
- gastown-fix-role-home-paths.patch
- gastown-fix-town-root-detection.patch
- gastown-fix-copydir-symlinks.patch
- gastown-statusline-optimization.patch

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nixos_configs/crew/harry
2026-01-31 09:06:05 -08:00
committed by John Ogle
parent 21a8b5c5d9
commit 56097aefa4
8 changed files with 274 additions and 237 deletions

View File

@@ -0,0 +1,19 @@
diff --git a/internal/cmd/prime.go b/internal/cmd/prime.go
index 0000000..1111111 100644
--- a/internal/cmd/prime.go
+++ b/internal/cmd/prime.go
@@ -276,12 +276,12 @@ func detectRole(cwd, townRoot string) RoleInfo {
// Check for mayor role
// At town root, or in mayor/ or mayor/rig/
if relPath == "." || relPath == "" {
- ctx.Role = RoleMayor
- return ctx
+ return ctx // RoleUnknown - town root is shared space
}
+
+ // Check for mayor role: mayor/ or mayor/rig/
if len(parts) >= 1 && parts[0] == "mayor" {
ctx.Role = RoleMayor
return ctx
}