Implement three-tier config architecture (gt-k1lr tasks 1-5)
**Architecture changes:** - Renamed `.gastown/` → `.runtime/` for runtime state (gitignored) - Added `settings/` directory for rig behavioral config (git-tracked) - Added `mayor/config.json` for town-level config (MayorConfig type) - Separated RigConfig (identity) from RigSettings (behavioral) **File location changes:** - Town runtime: `~/.gastown/*` → `~/.runtime/*` - Rig runtime: `<rig>/.gastown/*` → `<rig>/.runtime/*` - Rig config: `<rig>/.gastown/config.json` → `<rig>/settings/config.json` - Namepool state: `namepool.json` → `namepool-state.json` **New types:** - MayorConfig: town-level behavioral config - RigSettings: rig behavioral config (merge_queue, theme, namepool) - RigConfig now identity-only (name, git_url, beads, created_at) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ func NewManager(r *rig.Rig) *Manager {
|
||||
|
||||
// stateFile returns the path to the witness state file.
|
||||
func (m *Manager) stateFile() string {
|
||||
return filepath.Join(m.rig.Path, ".gastown", "witness.json")
|
||||
return filepath.Join(m.rig.Path, ".runtime", "witness.json")
|
||||
}
|
||||
|
||||
// loadState loads witness state from disk.
|
||||
@@ -261,7 +261,7 @@ func (m *Manager) checkPolecatHealth(name, path string) PolecatHealthStatus {
|
||||
}
|
||||
|
||||
// Check 2: State file activity
|
||||
stateFile := filepath.Join(path, ".gastown", "state.json")
|
||||
stateFile := filepath.Join(path, ".runtime", "state.json")
|
||||
if info, err := os.Stat(stateFile); err == nil {
|
||||
if time.Since(info.ModTime()) < threshold {
|
||||
return PolecatHealthy
|
||||
|
||||
Reference in New Issue
Block a user