Commit Graph

755 Commits

Author SHA1 Message Date
goose
52533c354d fix: Use --initial-branch=main in rig integration tests
The test helper createTestGitRepo was using plain `git init` which
creates a branch based on the system's init.defaultBranch config.
When AddRig tries to detect and checkout the default branch, it
falls back to "main" if detection fails, causing "pathspec 'main'
did not match" errors in CI where the system default is "master".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 07:23:06 -08:00
max
7ae08ed219 chore: Bump version to 0.2.1
Some checks failed
Release / goreleaser (push) Failing after 4m18s
Release / publish-npm (push) Has been skipped
Release / update-homebrew (push) Has been skipped
2026-01-05 00:51:00 -08:00
gastown/crew/jack
6b8c897e37 feat: use hq- prefix for Mayor and Deacon session names
Town-level services (Mayor, Deacon) now use hq- prefix instead of gt-:
- hq-mayor (was gt-mayor)
- hq-deacon (was gt-deacon)

This distinguishes town-level sessions from rig-level sessions which
continue to use gt- prefix (gt-gastown-witness, gt-gastown-crew-max, etc).

Changes:
- session.MayorSessionName() returns "hq-mayor"
- session.DeaconSessionName() returns "hq-deacon"
- ParseSessionName() handles both hq- and gt- prefixes
- categorizeSession() handles both prefixes
- categorizeSessions() accepts both prefixes
- Updated all tests and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 00:42:24 -08:00
nux
ca71f9b8de fix: Polecat lifecycle cleanup - stale worktrees and git tracking
Fixes gt-v07fl: Polecat lifecycle cleanup for stale worktrees and git
tracking conflicts.

Changes:
1. Add .claude/ to .gitignore (prevents untracked file accumulation)
2. Add beads runtime state patterns to .gitignore (prevents future tracking)
3. Remove .beads/ runtime state from git tracking (mq/, issues.jsonl, etc.)
   - Formulas and config remain tracked (needed for go install)
   - Created follow-up gt-mpyuq for formulas refactor
4. Add DetectStalePolecats() to polecat manager for identifying cleanup candidates
5. Add CountCommitsBehind() to git package for staleness detection
6. Add `gt polecat stale <rig>` command for stale polecat detection/cleanup
   - Shows polecats without active sessions
   - Identifies polecats far behind main (configurable threshold)
   - Optional --cleanup flag to auto-nuke stale polecats

The existing `gt polecat gc` command handles branch cleanup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 00:23:34 -08:00
Steve Yegge
d9962c54d6 Merge pull request #138 from greghughespdx/fix/sling-no-daemon
fix(sling): Add --no-daemon and BEADS_DIR for reliable bd calls
2026-01-05 00:01:17 -08:00
Steve Yegge
325f818e11 Merge pull request #131 from greghughespdx/polecat/furiosa-mk0rmk9b
fix(sling): Set hook slot when creating agent beads
2026-01-04 23:59:33 -08:00
Steve Yegge
820ff17f9a Merge pull request #129 from dlukt/main
feat: Add gt config command for managing agent settings
2026-01-04 23:53:43 -08:00
Greg Hughes
afe5cab0ad fix(sling): Add --no-daemon and BEADS_DIR for reliable bd calls
- Add --no-daemon to all 17 bd exec calls to bypass daemon socket timing issues
- Set BEADS_DIR in verifyBeadExists() so bd can find beads from any directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:28:13 -08:00
mayor
252dcc41f8 Merge remote-tracking branch 'origin/polecat/rockryder-mk0frt3g' 2026-01-04 23:17:58 -08:00
mayor
32cc3e42bc fix: Resolve CI lint and build errors
- Add error suppression for enc.Encode() calls in info.go (errcheck lint)
- Add missing encoding/json import in install_integration_test.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:13:03 -08:00
jack
fd3cb6133e fix(done): use ResolveBeadsDir in getDispatcherFromBead
Fixes PR #39 to follow the pattern established in PR #54 - all beads
initialization in done.go should use ResolveBeadsDir to support
.beads/redirect files in worktrees.
2026-01-04 23:10:11 -08:00
Steve Yegge
b207d2976b Merge pull request #39 from cvsloane/fix/polecat-dispatcher-notification
feat: notify dispatcher when polecat work completes
2026-01-04 23:09:23 -08:00
Steve Yegge
4ffdc4fe40 Merge pull request #54 from michaellady/polecat/fixer-mjy8jxh1
Clean 2-line fix with comprehensive tests. All tests pass locally.
2026-01-04 23:06:01 -08:00
Steve Yegge
97e06be2b4 Merge pull request #123 from akatz-ai/fix/convoy-cross-rig-tracking
fix(sling): Format cross-rig beads as external refs in convoy tracking
2026-01-04 23:05:44 -08:00
greghughespdx
92c9f544fe fix(sling): Set hook slot when creating agent beads (#124)
Sync with mayor/rig fix: Set hook slot in CreateAgentBead and pass
beadID to UpdateAgentState.

Fixes: mi-619

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:05:21 -08:00
dave
a455016361 fix(rig): infer rig name from cwd for 'gt rig status'
When no rig argument is provided, now uses GetRole() to detect the
rig from the current directory or GT_ROLE environment variable.
Shows a helpful error message if rig cannot be determined.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 22:26:49 -08:00
george
cfdce55770 fix: pass gt prime as initial prompt in crew start commands
The issue: gt crew start --all was not priming crew sessions like
gt crew at does.

Root cause: gt crew at passes "gt prime" as the initial prompt to
BuildCrewStartupCommand(), while gt crew start (via startCrewMember
and runStartCrew) passed an empty string and tried to send gt prime
afterwards via NudgeSession. This created a race condition where the
SessionStart hook would fire and Claude would start responding before
the nudge arrived.

Fix: Pass "gt prime" directly in the startup command for all three
cases: startCrewMember, runStartCrew new session, and runStartCrew
session restart. This makes the behavior consistent with gt crew at.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 22:18:24 -08:00
Darko Luketic
b6dd6f005a Merge branch 'steveyegge:main' into main 2026-01-05 07:14:19 +01:00
Steve Yegge
1508177d9a fix(crew): infer rig from cwd for 'gt crew start --all'
The crew start command now infers the rig name from the current
working directory when using --all without specifying a rig. This
matches the behavior of crew stop and other commands.

Before: gt crew start gastown --all (required)
After:  gt crew start --all (infers from cwd)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 22:10:47 -08:00
Darko Luketic
5787a16067 feat: Add gt config command for managing agent settings
Implements GitHub issue #127 - allow custom agent configuration
through a CLI interface instead of command-line aliases.

The gt config command provides:
- gt config agent list [--json]    List all agents
- gt config agent get <name>       Show agent configuration
- gt config agent set <name> <cmd> Set custom agent command
- gt config agent remove <name>    Remove custom agent
- gt config default-agent [name]   Get/set default agent

Users can now define custom agents (e.g., claude-glm) and
override built-in presets (claude, gemini, codex) through
town settings instead of shell aliases.

Changes:
- Add SaveTownSettings() to internal/config/loader.go
- Add internal/cmd/config.go with full config command implementation
- Add comprehensive unit tests for both SaveTownSettings and
  all config subcommands (17 test cases covering success and
  error scenarios)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-05 06:58:46 +01:00
slit
2d56b6c02b test: Add E2E integration tests for hook slot verification (mi-3zc)
Add comprehensive integration tests covering hook slot operations:
- BasicHook: Verify bead can be hooked to an agent
- Singleton: Document that bd allows multiple hooks (gt enforces singleton)
- Unhook: Verify hook removal via status change
- DifferentAgents: Verify independent hooks per agent
- HookPersistence: Verify hooks survive beads instance recreation
- StatusTransitions: Test open -> hooked -> open -> hooked -> closed

Also fix missing json import in install_integration_test.go.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 19:46:27 -08:00
alice
8f03b44771 test: Add unit tests for formatTrackBeadID helper
Extract the cross-rig bead formatting logic into a testable helper
function and add comprehensive unit tests:

- TestFormatTrackBeadID: 8 test cases covering HQ beads, cross-rig
  beads, and edge cases (single segment, empty string, many segments)
- TestFormatTrackBeadIDConsumerCompatibility: 3 test cases verifying
  the external ref format can be correctly parsed by consumers in
  convoy.go, model.go, feed/convoy.go, and web/fetcher.go

The helper function includes godoc with examples showing expected
behavior for different bead ID formats.
2026-01-04 20:53:17 -05:00
gastown/witness
e11bcb931e fix(sling): Format cross-rig beads as external refs in convoy tracking
When creating auto-convoys for cross-rig beads (e.g., gt-xxx or gu-xxx),
the tracking relation was failing because bd couldn't resolve the bead ID
from HQ context. Now formats non-HQ beads as external:prefix:id for proper
resolution.

Fixes convoy tracking for cross-rig sling operations.
2026-01-04 20:28:28 -05:00
vuvalini
f0c94db99e fix: Add explicit wisp respawn instructions for patrol agents
When patrol agents (witness, refinery, deacon) complete their patrol wisp,
they were left idle because the instructions only said "loop back" without
specifying the command to create a new wisp.

Updated:
- Work loop instructions in prime.go now explicitly tell agents:
  * If context LOW: run `bd mol wisp mol-<role>-patrol` to create new wisp
  * If context HIGH: use `gt handoff` and exit for daemon respawn
- mol-witness-patrol.formula.toml loop-or-exit step now has clear commands

This ensures patrol agents always either create a new wisp or exit cleanly,
preventing the "session alive but idle" state that caused mail to pile up.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 16:55:56 -08:00
rockryder
8592098036 fix: Hook persists across session interruption via in_progress lookup (gt-ttn3h)
The hook query now falls back to checking in_progress beads assigned to the
agent when no hooked beads are found. This ensures work is not lost when
a session is interrupted after claiming work.

Previously, gt hook only looked for status=hooked beads, so work that had
been claimed but not completed appeared lost. The fix extends the query to
also include in_progress beads assigned to the agent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 16:52:42 -08:00
nux
3b9d1a113c fix(sling): Set hook slot when creating agent beads
Sync with mayor/rig fix: Set hook slot in CreateAgentBead and pass
beadID to UpdateAgentState.

Fixes: mi-619

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 16:28:57 -08:00
gastown/crew/gus
86c4ea2fa6 release: bump version to v0.2.0
Some checks failed
Release / goreleaser (push) Failing after 2m48s
Release / publish-npm (push) Has been skipped
Release / update-homebrew (push) Has been skipped
- Update version.go to 0.2.0
- Add comprehensive CHANGELOG.md entry for v0.2.0 (178 commits)
- Add gt info command with --whats-new flag for agent-relevant changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 15:20:25 -08:00
corpus
095a426ebf fix: Clear polecat hook on completion by using rig path (gt-2wc1n)
The bd slot command doesn't route correctly from town root - it only
works when run from the rig directory. This fix changes done.go to
use the rig path (filepath.Join(townRoot, ctx.Rig)) instead of
townRoot when calling slot commands.

Bug: gt polecat nuke was blocked by stale hooks on closed beads
because gt done wasn't actually clearing the hook_bead field.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 15:18:39 -08:00
nux
ae9741ad7f fix(peek): Support cross-rig crew paths like beads/crew/dave
gt peek now correctly handles crew worker paths by detecting the crew/
prefix and using the proper crew session name format (gt-{rig}-crew-{name}).

Changes:
- Add CaptureSession method to Manager for raw session ID capture
- Detect crew/ prefix in peek command and use CrewSessionName
- Update help text with crew path examples

Fixes: gt-yud21

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 15:16:56 -08:00
vuvalini
00d73b8f8c perf: Batch and parallelize convoy worker lookups (gt-a40d8)
Optimize getWorkersForIssues() from O(N×R) to O(R) subprocess calls:
- Batch sqlite queries per rig using WHERE hook_bead IN (...)
- Parallelize rig lookups with goroutines

Expected improvement: 300-600ms → 50-100ms for moderate convoys

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:49:38 -08:00
prime
af95b7b7f4 Remove StateIdle and idle polecat concept
The transient polecat model says: "Polecats exist only while working."
This removes the deprecated StateIdle and updates the codebase:

- Remove StateIdle from polecat/types.go (keep StateActive for legacy data)
- Update manager.go: Get() returns StateDone (not StateIdle) when no work
- Update manager.go: Add/Recreate return StateWorking (not StateIdle)
- Remove zombie scan logic from deacon.go (no idle polecats to scan for)
- Update tests to reflect new behavior

The correct lifecycle is now:
- Spawn: polecat created with work (StateWorking)
- Work: sessions cycle, sandbox persists
- Done: polecat signals completion (StateDone)
- Nuke: Witness destroys sandbox

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:41:28 -08:00
dinki
871410f157 refactor: Rename RecreateWithOptions to RepairWorktreeWithOptions
Clarify that this operation is for stale state recovery, not normal recycling:

- Recreate → RepairWorktree
- RecreateWithOptions → RepairWorktreeWithOptions
- Updated comments to explain this handles reconciliation when AllocateName
  returns a name that already exists (stale state needing repair)
- Updated polecat_spawn.go output: Recreating → Repairing stale
- Updated gc command help text for consistency

The function is useful for atomic hook_bead setting during repair, so kept
rather than replacing with Remove + Add.

Fixes gt-l0lok

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:28:40 -08:00
corpus
b732eb075b Remove gt polecat done/reset/finish/sleep commands (idle producers)
These commands transitioned polecats to idle state, violating the transient
model. From PRIMING.md: "Polecats exist only while working. One task, then nuked."

Removed:
- gt polecat done - marked polecat as done and returned to idle
- gt polecat reset - force reset polecat to idle state
- gt polecat finish - alias for done
- gt polecat sleep - deprecated transition to done state
- gt polecat wake - deprecated transition to working state
- Manager.Finish() method
- Manager.Reset() method
- Manager.Wake() method
- Manager.Sleep() method

The correct model is: polecats use 'gt done' which signals Witness for nuke.
There is no "return to idle" - only death.

(gt-32d4a)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:27:54 -08:00
gastown/crew/jack
eea4435269 feat(rig): Add --branch flag for custom default branch
Add --branch flag to `gt rig add` to specify a custom default branch
instead of auto-detecting from remote. This supports repositories that
use non-standard default branches like `develop` or `release`.

Changes:
- Add --branch flag to `gt rig add` command
- Store default_branch in rig config.json
- Propagate default branch to refinery, witness, daemon, and all commands
- Rename ensureMainBranch to ensureDefaultBranch for clarity
- Add Rig.DefaultBranch() method for consistent access
- Update crew/manager.go and swarm/manager.go to use rig config

Based on PR #49 by @kustrun - rebased and extended with additional fixes.

Co-authored-by: kustrun <kustrun@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:01:02 -08:00
mayor
31df1bb2c1 Merge remote-tracking branch 'origin/polecat/scrotus-mk083pw5' 2026-01-04 13:53:59 -08:00
Steve Yegge
2fd2bdf62a Merge pull request #71 from michaellady/feature/convoy-dashboard
Add lint fixes and E2E tests for convoy dashboard
2026-01-04 13:45:54 -08:00
scrotus
4de5a96400 refactor: use hq- prefix for role bead references
Migrate all role bead references from gt-*-role to hq-*-role using
beads.RoleBeadIDTown() function. Role beads are stored in town beads
(~/gt/.beads/) with the hq- prefix.

Changes:
- internal/cmd/prime.go: Use RoleBeadIDTown() for all roles
- internal/doctor/agent_beads_check.go: Use RoleBeadIDTown() for rig agents
- internal/polecat/manager.go: Use RoleBeadIDTown("polecat")
- internal/cmd/crew_add.go: Use RoleBeadIDTown("crew")
- internal/beads/beads.go: Update comments to document hq- convention
- Templates: Update bd show gt-deacon to bd show hq-deacon

Note: Tmux session names remain as gt-* (runtime identifiers).
Bead IDs use hq-* for town-level agents (persistent storage).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 13:17:39 -08:00
Steve Yegge
8c3872e64f Merge pull request #87 from dannomayernotabot/main
fix(sling): add --no-daemon flag to mol bond command
2026-01-04 13:12:22 -08:00
Steve Yegge
15e9c210b9 Merge pull request #93 from markov-kernel/fix/mayor-session-hooks
fix: deploy SessionStart hooks in gt install for Mayor role
2026-01-04 13:09:24 -08:00
Steve Yegge
dfa0a758e7 Merge pull request #107 from rawwerks/pr/multi-agent-support
feat(config): Add multi-agent support with pluggable registry
2026-01-04 13:05:09 -08:00
Steve Yegge
ea13c269ae Merge pull request #108 from jakehemmerle/fix/daemon-orphan-race-condition
fix(daemon): prevent orphan daemons via file locking
2026-01-04 13:01:12 -08:00
Chris Sloane
1733c6dbae fix: use mayor/rig path for beads to prevent prefix mismatch (#38)
When creating agent beads for polecats or crew workers, the code was
using the rig root path (e.g., ~/gt/infra-dashboard/) instead of the
mayor/rig path where the actual beads database lives.

The rig root .beads/ directory only contains config.yaml with no
database. When bd runs from there, it walks up the directory tree
and finds the town-level beads database (with 'gm' prefix) instead
of the rig's database (with the rig's prefix like 'id'). This causes
prefix mismatch errors:

  Error: prefix mismatch: database uses 'gm' but you specified 'id'

The routes.jsonl file maps rig prefixes to <rig>/mayor/rig, so the
code should always use that path for beads operations.

Changes:
- polecat/manager.go: Always use mayor/rig path, remove fallback logic
- cmd/crew_add.go: Use mayor/rig path instead of rig root

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 12:58:53 -08:00
Steve Yegge
257bfbcbd8 Merge pull request #106 from danshapiro/fix/install-role-slots-pr
CI failures unrelated to this PR (formula embed issue)
2026-01-04 12:56:33 -08:00
gastown/crew/george
c2034ceea3 fix(costs): auto-detect tmux session in Stop hook
gt costs record now auto-detects the current tmux session when
running inside tmux, so the Stop hook no longer requires --session
flag or GT_SESSION env var.

Detection order:
1. --session flag
2. GT_SESSION env var
3. GT_RIG/GT_ROLE derivation
4. Current tmux session (new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 12:31:16 -08:00
jakehemmerle
c25ff34b5b fix(daemon): prevent orphan daemons via file locking
Add syscall.Flock() exclusive lock in daemon.Run() to prevent TOCTOU
race condition where concurrent 'gt daemon start' commands could spawn
multiple daemons. Only the first to acquire the lock succeeds; others
exit cleanly. Lock is per-town (in townRoot/daemon/daemon.lock) so
multiple GT instances from different directories work independently.

Also detect race losers in runDaemonStart() by comparing spawned PID
with PID file, reporting 'already running' instead of false success.
2026-01-04 15:30:57 -05:00
Steve Yegge
1f90882a0d Merge pull request #91 from vessenes/refactor/town-session-helper
CI failures unrelated to this PR (formula embed issue)
2026-01-04 12:29:54 -08:00
mayor
ea1a41f1f5 feat(config): Add multi-agent support with pluggable registry
Implements agent abstraction layer to support multiple AI coding agents.

Built-in presets (E2E tested):
- Claude Code (default)
- Gemini CLI
- OpenAI Codex

Key changes:
- Add AgentRegistry with built-in presets and custom agent support
- Add TownSettings with default_agent and custom agents map
- Add Agent field to RigSettings for per-rig agent selection
- Update ResolveAgentConfig for hierarchical config resolution
- Update spawn paths to use configured agent instead of hardcoded claude

Configuration hierarchy (first match wins):
1. Rig's Runtime config (backwards compat)
2. Rig's Agent -> custom agents -> built-in presets
3. Town's default_agent setting
4. Fallback to Claude

Additional agents (aider, opencode, etc.) can be added via config file:
settings/agents.json

Addresses Issue #10: Agent Agnostic Engine with Multi-provider support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 14:56:14 -05:00
max
44e9f81d50 docs: document asymmetric error handling in initTownAgentBeads (gt-m39yd)
Explain why agent bead creation failures are hard errors while role bead
creation failures are soft errors (log and continue).

Agent beads are identity beads that form the CV/reputation ledger foundation.
Role beads are documentation templates not required for agent operation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:42:04 -08:00
angharad
b7d82c7243 feat(install): Add hq-dog-role to initTownAgentBeads (gt-2jjry)
Add Dog role bead creation to the roleDefs slice, ensuring Dog
agents have their role definition created during gt install.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:40:07 -08:00
splendid
acd2565a5b fix: remove vestigial state.json files from agent directories
Agent directories (witness/, refinery/, mayor/) contained state.json files
with last_active timestamps that were never updated, making them stale and
misleading. This change removes:

- initAgentStates function that created vestigial state.json files
- AgentState type and related Load/Save functions from config package
- MayorStateValidCheck from doctor checks
- requesting_* lifecycle verification (dead code - flags were never set)
- FileStateJSON constant and MayorStatePath function

Kept intact:
- daemon/state.json (actively used for daemon runtime state)
- crew/<name>/state.json (operational CrewWorker metadata)
- Agent state tracking via beads (the ZFC-compliant approach)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:36:23 -08:00