diff --git a/.beads/formulas/gastown-release.formula.toml b/.beads/formulas/gastown-release.formula.toml index 9f5b53fb..5c57f55d 100644 --- a/.beads/formulas/gastown-release.formula.toml +++ b/.beads/formulas/gastown-release.formula.toml @@ -47,7 +47,7 @@ Check all crew workspaces and the mayor rig: ```bash # Check each workspace -for dir in ~/gt/gastown/crew/* ~/gt/gastown/mayor; do +for dir in $GT_ROOT/gastown/crew/* $GT_ROOT/gastown/mayor; do if [ -d "$dir/.git" ] || [ -d "$dir" ]; then echo "=== Checking $dir ===" cd "$dir" 2>/dev/null || continue diff --git a/.beads/formulas/mol-boot-triage.formula.toml b/.beads/formulas/mol-boot-triage.formula.toml index 38e5d248..66a472af 100644 --- a/.beads/formulas/mol-boot-triage.formula.toml +++ b/.beads/formulas/mol-boot-triage.formula.toml @@ -47,7 +47,7 @@ bd show hq-deacon 2>/dev/null gt feed --since 10m --plain | head -20 # Recent wisps (operational state) -ls -lt ~/gt/.beads-wisp/*.wisp.json 2>/dev/null | head -5 +ls -lt $GT_ROOT/.beads-wisp/*.wisp.json 2>/dev/null | head -5 ``` **Step 4: Check Deacon mail** @@ -221,7 +221,7 @@ Then exit. The next daemon tick will spawn a fresh Boot. **Update status file** ```bash # The gt boot command handles this automatically -# Status is written to ~/gt/deacon/dogs/boot/.boot-status.json +# Status is written to $GT_ROOT/deacon/dogs/boot/.boot-status.json ``` Boot is ephemeral by design. Each instance runs fresh. diff --git a/.beads/formulas/mol-deacon-patrol.formula.toml b/.beads/formulas/mol-deacon-patrol.formula.toml index 7ec83e38..f293c2b3 100644 --- a/.beads/formulas/mol-deacon-patrol.formula.toml +++ b/.beads/formulas/mol-deacon-patrol.formula.toml @@ -480,7 +480,7 @@ needs = ["zombie-scan"] description = """ Execute registered plugins. -Scan ~/gt/plugins/ for plugin directories. Each plugin has a plugin.md with TOML frontmatter defining its gate (when to run) and instructions (what to do). +Scan $GT_ROOT/plugins/ for plugin directories. Each plugin has a plugin.md with TOML frontmatter defining its gate (when to run) and instructions (what to do). See docs/deacon-plugins.md for full documentation. @@ -497,7 +497,7 @@ For each plugin: Plugins marked parallel: true can run concurrently using Task tool subagents. Sequential plugins run one at a time in directory order. -Skip this step if ~/gt/plugins/ does not exist or is empty.""" +Skip this step if $GT_ROOT/plugins/ does not exist or is empty.""" [[steps]] id = "dog-pool-maintenance" @@ -736,13 +736,13 @@ Maintain daemon logs and state files. **Step 1: Check daemon.log size** ```bash # Get log file size -ls -la ~/.beads/daemon*.log 2>/dev/null || ls -la ~/gt/.beads/daemon*.log 2>/dev/null +ls -la ~/.beads/daemon*.log 2>/dev/null || ls -la $GT_ROOT/.beads/daemon*.log 2>/dev/null ``` If daemon.log exceeds 10MB: ```bash # Rotate with date suffix and gzip -LOGFILE="$HOME/gt/.beads/daemon.log" +LOGFILE="$GT_ROOT/.beads/daemon.log" if [ -f "$LOGFILE" ] && [ $(stat -f%z "$LOGFILE" 2>/dev/null || stat -c%s "$LOGFILE") -gt 10485760 ]; then DATE=$(date +%Y-%m-%dT%H-%M-%S) mv "$LOGFILE" "${LOGFILE%.log}-${DATE}.log" @@ -754,7 +754,7 @@ fi Clean up daemon logs older than 7 days: ```bash -find ~/gt/.beads/ -name "daemon-*.log.gz" -mtime +7 -delete +find $GT_ROOT/.beads/ -name "daemon-*.log.gz" -mtime +7 -delete ``` **Step 3: Prune state.json of dead sessions** diff --git a/.beads/formulas/mol-shutdown-dance.formula.toml b/.beads/formulas/mol-shutdown-dance.formula.toml index 6f044db0..35ca1264 100644 --- a/.beads/formulas/mol-shutdown-dance.formula.toml +++ b/.beads/formulas/mol-shutdown-dance.formula.toml @@ -8,7 +8,7 @@ goroutine (NOT a Claude session) that runs the interrogation state machine. Dogs are lightweight workers in Boot's pool (see dog-pool-architecture.md): - Fixed pool of 5 goroutines (configurable via GT_DOG_POOL_SIZE) -- State persisted to ~/gt/deacon/dogs/active/.json +- State persisted to $GT_ROOT/deacon/dogs/active/.json - Recovery on Boot restart via orphan state files ## State Machine @@ -151,7 +151,7 @@ If target doesn't exist: - Skip to EPITAPH with outcome=already_dead **3. Initialize state file:** -Write initial state to ~/gt/deacon/dogs/active/{dog-id}.json +Write initial state to $GT_ROOT/deacon/dogs/active/{dog-id}.json **4. Set initial attempt counter:** attempt = 1 @@ -477,11 +477,11 @@ bd close {warrant_id} --reason "{epitaph_summary}" **3. Move state file to completed:** ```bash -mv ~/gt/deacon/dogs/active/{dog-id}.json ~/gt/deacon/dogs/completed/ +mv $GT_ROOT/deacon/dogs/active/{dog-id}.json $GT_ROOT/deacon/dogs/completed/ ``` **4. Report to Boot:** -Write completion file: ~/gt/deacon/dogs/active/{dog-id}.done +Write completion file: $GT_ROOT/deacon/dogs/active/{dog-id}.done ```json { "dog_id": "{dog-id}", diff --git a/.beads/formulas/mol-town-shutdown.formula.toml b/.beads/formulas/mol-town-shutdown.formula.toml index 82f30ab2..0e76c72a 100644 --- a/.beads/formulas/mol-town-shutdown.formula.toml +++ b/.beads/formulas/mol-town-shutdown.formula.toml @@ -132,7 +132,7 @@ gt daemon rotate-logs gt doctor --fix ``` -Old logs are moved to `~/gt/logs/archive/` with timestamps. +Old logs are moved to `$GT_ROOT/logs/archive/` with timestamps. """ [[steps]] diff --git a/internal/formula/formulas/gastown-release.formula.toml b/internal/formula/formulas/gastown-release.formula.toml index 9f5b53fb..5c57f55d 100644 --- a/internal/formula/formulas/gastown-release.formula.toml +++ b/internal/formula/formulas/gastown-release.formula.toml @@ -47,7 +47,7 @@ Check all crew workspaces and the mayor rig: ```bash # Check each workspace -for dir in ~/gt/gastown/crew/* ~/gt/gastown/mayor; do +for dir in $GT_ROOT/gastown/crew/* $GT_ROOT/gastown/mayor; do if [ -d "$dir/.git" ] || [ -d "$dir" ]; then echo "=== Checking $dir ===" cd "$dir" 2>/dev/null || continue diff --git a/internal/formula/formulas/mol-boot-triage.formula.toml b/internal/formula/formulas/mol-boot-triage.formula.toml index 38e5d248..66a472af 100644 --- a/internal/formula/formulas/mol-boot-triage.formula.toml +++ b/internal/formula/formulas/mol-boot-triage.formula.toml @@ -47,7 +47,7 @@ bd show hq-deacon 2>/dev/null gt feed --since 10m --plain | head -20 # Recent wisps (operational state) -ls -lt ~/gt/.beads-wisp/*.wisp.json 2>/dev/null | head -5 +ls -lt $GT_ROOT/.beads-wisp/*.wisp.json 2>/dev/null | head -5 ``` **Step 4: Check Deacon mail** @@ -221,7 +221,7 @@ Then exit. The next daemon tick will spawn a fresh Boot. **Update status file** ```bash # The gt boot command handles this automatically -# Status is written to ~/gt/deacon/dogs/boot/.boot-status.json +# Status is written to $GT_ROOT/deacon/dogs/boot/.boot-status.json ``` Boot is ephemeral by design. Each instance runs fresh. diff --git a/internal/formula/formulas/mol-deacon-patrol.formula.toml b/internal/formula/formulas/mol-deacon-patrol.formula.toml index 7ec83e38..f293c2b3 100644 --- a/internal/formula/formulas/mol-deacon-patrol.formula.toml +++ b/internal/formula/formulas/mol-deacon-patrol.formula.toml @@ -480,7 +480,7 @@ needs = ["zombie-scan"] description = """ Execute registered plugins. -Scan ~/gt/plugins/ for plugin directories. Each plugin has a plugin.md with TOML frontmatter defining its gate (when to run) and instructions (what to do). +Scan $GT_ROOT/plugins/ for plugin directories. Each plugin has a plugin.md with TOML frontmatter defining its gate (when to run) and instructions (what to do). See docs/deacon-plugins.md for full documentation. @@ -497,7 +497,7 @@ For each plugin: Plugins marked parallel: true can run concurrently using Task tool subagents. Sequential plugins run one at a time in directory order. -Skip this step if ~/gt/plugins/ does not exist or is empty.""" +Skip this step if $GT_ROOT/plugins/ does not exist or is empty.""" [[steps]] id = "dog-pool-maintenance" @@ -736,13 +736,13 @@ Maintain daemon logs and state files. **Step 1: Check daemon.log size** ```bash # Get log file size -ls -la ~/.beads/daemon*.log 2>/dev/null || ls -la ~/gt/.beads/daemon*.log 2>/dev/null +ls -la ~/.beads/daemon*.log 2>/dev/null || ls -la $GT_ROOT/.beads/daemon*.log 2>/dev/null ``` If daemon.log exceeds 10MB: ```bash # Rotate with date suffix and gzip -LOGFILE="$HOME/gt/.beads/daemon.log" +LOGFILE="$GT_ROOT/.beads/daemon.log" if [ -f "$LOGFILE" ] && [ $(stat -f%z "$LOGFILE" 2>/dev/null || stat -c%s "$LOGFILE") -gt 10485760 ]; then DATE=$(date +%Y-%m-%dT%H-%M-%S) mv "$LOGFILE" "${LOGFILE%.log}-${DATE}.log" @@ -754,7 +754,7 @@ fi Clean up daemon logs older than 7 days: ```bash -find ~/gt/.beads/ -name "daemon-*.log.gz" -mtime +7 -delete +find $GT_ROOT/.beads/ -name "daemon-*.log.gz" -mtime +7 -delete ``` **Step 3: Prune state.json of dead sessions** diff --git a/internal/formula/formulas/mol-shutdown-dance.formula.toml b/internal/formula/formulas/mol-shutdown-dance.formula.toml index 6f044db0..35ca1264 100644 --- a/internal/formula/formulas/mol-shutdown-dance.formula.toml +++ b/internal/formula/formulas/mol-shutdown-dance.formula.toml @@ -8,7 +8,7 @@ goroutine (NOT a Claude session) that runs the interrogation state machine. Dogs are lightweight workers in Boot's pool (see dog-pool-architecture.md): - Fixed pool of 5 goroutines (configurable via GT_DOG_POOL_SIZE) -- State persisted to ~/gt/deacon/dogs/active/.json +- State persisted to $GT_ROOT/deacon/dogs/active/.json - Recovery on Boot restart via orphan state files ## State Machine @@ -151,7 +151,7 @@ If target doesn't exist: - Skip to EPITAPH with outcome=already_dead **3. Initialize state file:** -Write initial state to ~/gt/deacon/dogs/active/{dog-id}.json +Write initial state to $GT_ROOT/deacon/dogs/active/{dog-id}.json **4. Set initial attempt counter:** attempt = 1 @@ -477,11 +477,11 @@ bd close {warrant_id} --reason "{epitaph_summary}" **3. Move state file to completed:** ```bash -mv ~/gt/deacon/dogs/active/{dog-id}.json ~/gt/deacon/dogs/completed/ +mv $GT_ROOT/deacon/dogs/active/{dog-id}.json $GT_ROOT/deacon/dogs/completed/ ``` **4. Report to Boot:** -Write completion file: ~/gt/deacon/dogs/active/{dog-id}.done +Write completion file: $GT_ROOT/deacon/dogs/active/{dog-id}.done ```json { "dog_id": "{dog-id}", diff --git a/internal/formula/formulas/mol-town-shutdown.formula.toml b/internal/formula/formulas/mol-town-shutdown.formula.toml index 82f30ab2..0e76c72a 100644 --- a/internal/formula/formulas/mol-town-shutdown.formula.toml +++ b/internal/formula/formulas/mol-town-shutdown.formula.toml @@ -132,7 +132,7 @@ gt daemon rotate-logs gt doctor --fix ``` -Old logs are moved to `~/gt/logs/archive/` with timestamps. +Old logs are moved to `$GT_ROOT/logs/archive/` with timestamps. """ [[steps]]