Fixes nested workspace detection and symlink path issues in workspace.Find()
- Remove filepath.EvalSymlinks() for consistency with os.Getwd()
- Add isInWorktreePath() to detect polecats/crew directories
- Continue walking up to outermost workspace when in worktree paths
- Add integration tests for symlink and nested workspace scenarios
Session names `gt-mayor` and `gt-deacon` were hardcoded, causing tmux
session name collisions when running multiple towns simultaneously.
Changed to `gt-{town}-mayor` and `gt-{town}-deacon` format (e.g.,
`gt-ai-mayor`) to allow concurrent multi-town operation.
Key changes:
- session.MayorSessionName() and DeaconSessionName() now take townName param
- Added workspace.GetTownName() helper to load town name from config
- Updated all callers in cmd/, daemon/, doctor/, mail/, rig/, templates/
- Updated tests with new session name format
- Bead IDs remain unchanged (already scoped by .beads/ directory)
Fixes#60🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- gt crew at: auto-detect crew from cwd, run gt prime after launch
- Polecats now use git worktrees from refinery (faster than clones)
- Updated architecture.md for two-tier beads mail model
- Town beads (gm-*) for Mayor mail/coordination
- Rig .beads/ symlinks to refinery/rig/.beads
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes gt-e5o: When a rig has its own mayor/ directory, workspace
detection now continues searching upward for primary markers.
Changes:
- Add AlternativePrimaryMarker (mayor/config.json) to distinguish
town-level mayor from rig-level mayor clones
- Continue searching after finding secondary marker (mayor/) to
prefer primary matches higher in the tree
- Return the first secondary match only if no primary is found
This fixes role detection for polecats/refinery/witness when running
from within a rig that has its own mayor/ clone.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Detection:
- Find() walks up from given directory looking for markers
- Primary marker: config/town.json
- Secondary marker: mayor/ directory
- Follows symlinks using filepath.EvalSymlinks
Functions:
- Find, FindOrError: from given directory
- FindFromCwd, FindFromCwdOrError: from current directory
- IsWorkspace: check if directory is workspace root
Closes gt-f9x.2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>