Move mayor files into mayor/ subdirectory

Prevents mayor-specific files (CLAUDE.md, hooks) from polluting child
agent workspaces. Child agents inherit the parent's working directory,
so keeping mayor files in a dedicated subdirectory ensures they don't
interfere with agent operations.

Includes:
- MayorDir constant in templates for consistent path handling
- Updated hooks.go, prime.go, role.go to use mayor/ paths
- Documentation updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
julianknutsen
2026-01-06 15:17:48 -08:00
parent 72544cc06d
commit b7b8e141b1
7 changed files with 130 additions and 8 deletions

View File

@@ -105,12 +105,14 @@ func discoverHooks(townRoot string) ([]HookInfo, error) {
var hooks []HookInfo
// Scan known locations for .claude/settings.json
// NOTE: Mayor settings are at ~/gt/mayor/.claude/, NOT ~/gt/.claude/
// Settings at town root would pollute all child workspaces.
locations := []struct {
path string
agent string
}{
{filepath.Join(townRoot, "mayor", ".claude", "settings.json"), "mayor/"},
{filepath.Join(townRoot, ".claude", "settings.json"), "town-root"},
{filepath.Join(townRoot, "deacon", ".claude", "settings.json"), "deacon/"},
}
// Scan rigs