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

@@ -147,7 +147,10 @@ func runPrime(cmd *cobra.Command, args []string) error {
}
// Ensure beads redirect exists for worktree-based roles
ensureBeadsRedirect(ctx)
// Skip if there's a role/location mismatch to avoid creating bad redirects
if !roleInfo.Mismatch {
ensureBeadsRedirect(ctx)
}
// NOTE: reportAgentState("running") removed (gt-zecmc)
// Agent liveness is observable from tmux - no need to record it in bead.