| name | gc-update |
| description | Sync Gas City fork with upstream, build, install, and summarize changes |
| disable-model-invocation | true |
| context | fork |
| allowed-tools | Bash, Read, Glob, Grep, mcp__github__list_commits |
Gas City Daily Update
Sync justSteve/gascity fork with steveyegge/gascity upstream, install the new version to /home/gtuser/gt, and ensure healthy state.
Workflow
-
Check for updates
cd /root/projects/gascity && git fetch upstream 2>&1
-
Compare versions
- Get current local commit:
git log --oneline -1
- Get upstream head:
git log --oneline upstream/main -1
- List commits between:
git log --oneline HEAD..upstream/main
- If no new commits, skip to step 5 (doctor check)
-
Sync fork with upstream
cd /root/projects/gascity && git stash push -m "Pre-sync $(date +%Y-%m-%d)" 2>/dev/null
git checkout main
git merge upstream/main --ff-only
git push origin main
-
Build and install
cd /root/projects/gascity && go build -o /tmp/gt-new ./cmd/gt
/tmp/gt-new version
sudo cp /tmp/gt-new /usr/local/bin/gt
gt version
-
Run doctor with auto-fix
sudo -u gtuser bash -c 'cd /home/gtuser/gt && gt doctor --fix --verbose 2>&1'
-
Address remaining issues (max 2 attempts)
Review doctor output for failures and warnings. For each fixable issue:
- Attempt a targeted fix (e.g., clear stuck wisp, sync clone, fix permissions)
- Re-run
gt doctor to verify
- Stop after 2 fix attempts per issue - do not loop endlessly
Common fixes to attempt:
patrol-not-stuck: Use gt release or investigate the stuck wisp
misclassified-wisps: Usually fixed by --fix flag
clone-divergence: Pull the divergent clones
priming: Note in report (requires manual AGENTS.md edit)
-
Initialize dashboard terminals
/root/projects/COO/tmuxMOO/bin/dashboard.sh
-
Start town services via gt-user terminal
sudo -u gtuser tmux send-keys -t gt-user:main.0 'cd /home/gtuser/gt && gt up' Enter
sleep 5
sudo -u gtuser tmux send-keys -t gt-user:main.0 'gt mayor status' Enter
sleep 2
sudo -u gtuser tmux capture-pane -t gt-user:main.0 -p | tail -20
-
Final status report
Provide a summary table (and save to /root/projects/COO/CurrentStatus.md):
| Category | Status |
|---|
| GT Version | (old -> new, or "unchanged") |
| Commits Pulled | (count or "none") |
| Doctor Passed | (count) |
| Doctor Warnings | (count + brief list) |
| Doctor Failed | (count + brief list) |
| Manual Fixes Attempted | (what was tried) |
| Remaining Issues | (what needs human attention) |
-
Attach to mayor
sudo -u gtuser tmux send-keys -t gt-user:main.0 'gt mayor attach' Enter
Environment Notes
Critical: GT runs as gtuser, not root. All GT commands must be run as gtuser:
gt mayor start
sudo -u gtuser bash -c 'cd /home/gtuser/gt && gt mayor attach'
File Permissions: Files in /root/ are not accessible to GT agents. To share:
cp /root/projects/COO/somefile.md /home/gtuser/gt/<rig>/
chown gtuser:gtuser /home/gtuser/gt/<rig>/somefile.md
Behavior Notes
- No endless retries: If a fix doesn't work after 2 attempts, log it and move on
- Run as gtuser: GT commands must run as gtuser, not root
- Report honestly: Include failures and unfixed issues in the final report