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

@@ -270,7 +270,7 @@ func (info RoleInfo) ActorString() string {
func getRoleHome(role Role, rig, polecat, townRoot string) string {
switch role {
case RoleMayor:
return townRoot
return filepath.Join(townRoot, "mayor")
case RoleDeacon:
return filepath.Join(townRoot, "deacon")
case RoleWitness:
@@ -423,7 +423,7 @@ func runRoleList(cmd *cobra.Command, args []string) error {
name Role
desc string
}{
{RoleMayor, "Global coordinator at town root"},
{RoleMayor, "Global coordinator at mayor/"},
{RoleDeacon, "Background supervisor daemon"},
{RoleWitness, "Per-rig polecat lifecycle manager"},
{RoleRefinery, "Per-rig merge queue processor"},