title: Town & Rig Management: install, doctor, federation

description:
Reify the Gas Town installation as a first-class concept.

## Goals
- Installable: gt install [path] creates complete installation
- Diagnosable: gt doctor checks and fixes issues
- Federable: Clone town to VMs with central control

## Design Doc
See docs/town-design.md for full design.

status: open

issue_type: epic

type: blocks

created_by: daemon


title: Config package: Config, State types and JSON serialization

description: Define workspace and rig config structures

issue_type: task

type: parent-child


title: Extended addressing: Parse [machine:]rig/polecat

description: Support machine-prefixed polecat addresses


title: Workspace detection: Find() walking up directory tree

description: Find workspace root by looking for mayor/ or .gastown/


title: gt install command: Create workspace structure

description: Create mayor/, mail/, rigs/, config.json, state.json


title: Doctor framework: Check interface, Result types, Report

description: Framework for gt doctor health checks


title: Workspace doctor checks: Config, state, mail, boss, rigs

description: Health checks for workspace-level components


title: Rig doctor checks: Refinery health, clones, gitignore

description: Health checks for rig-level components


title: Connection interface: Protocol for local/remote ops

description: Abstract interface for local vs SSH operations


title: LocalConnection: Local file/exec/tmux operations

description: Implementation for local machine operations


title: Machine registry: Store and manage machine configs

description: Registry for federation machine management


title: Port Gas Town to Go

description:
Complete rewrite of Gas Town in Go for improved performance and single-binary distribution.

## Goals
- Single installable binary (gt)
- All Python functionality ported
- Federation support built-in
- Improved performance

## Phases
1. Core infrastructure (config, workspace, git wrapper)
2. Rig & polecat management
3. Session & tmux operations
4. Mail system
5. CLI commands
6. TUI (optional)


title: Go scaffolding: cmd/gt, go.mod, Cobra setup

description: Set up Go project structure with Cobra CLI framework