Commit Graph

10 Commits

Author SHA1 Message Date
Ryan Snodgrass
e1f2bb8b4b feat(ui): import comprehensive UX system from beads
Import beads' UX design system into gastown:

- Add internal/ui/ package with Ayu theme colors and semantic styling
  - styles.go: AdaptiveColor definitions for light/dark mode
  - terminal.go: TTY detection, NO_COLOR/CLICOLOR support
  - markdown.go: Glamour rendering with agent mode bypass
  - pager.go: Smart paging with GT_PAGER support

- Add colorized help output (internal/cmd/help.go)
  - Group headers in accent color
  - Command names styled for scannability
  - Flag types and defaults muted

- Add gt thanks command (internal/cmd/thanks.go)
  - Contributor display with same logic as bd thanks
  - Styled with Ayu theme colors

- Update gt doctor to match bd doctor UX
  - Category grouping (Core, Infrastructure, Rig, Patrol, etc.)
  - Semantic icons (✓ ⚠ ✖) with Ayu colors
  - Tree connectors for detail lines
  - Summary line with pass/warn/fail counts
  - Warnings section at end with numbered issues

- Migrate existing styles to use ui package
  - internal/style/style.go uses ui.ColorPass etc.
  - internal/tui/feed/styles.go uses ui package colors

Co-Authored-By: SageOx <ox@sageox.ai>
2026-01-09 22:46:06 -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
toecutter
8dea4acf8c refactor: add TownBeadsPrefix constant for hq- prefix (gt-3jnnu)
Add TownBeadsPrefix constant to agent_ids.go to centralize the "hq"
prefix string used for town-level agent beads. This makes prefix
changes easier and reduces string duplication.

Also update agent_beads_check.go to use the helper functions instead
of hardcoded strings for consistency.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:45:53 -08:00
imperator
1532a08aeb feat: Update agent bead lookups to use correct tier (gt-eqptl)
Implement two-level beads architecture for agent lookups:

- Town-level agents (Mayor, Deacon) now use hq- prefix and are
  looked up in town beads (~/.beads/)
- Rig-level agents continue using rig prefix (e.g., gt-) and are
  looked up in rig beads

Changes:
- Add MayorBeadIDTown(), DeaconBeadIDTown(), DogBeadIDTown() helpers
- Add GetTownBeadsPath() for town beads path resolution
- Update gt status to pre-fetch town-level agent beads
- Update agentIDToBeadID() to use town-level IDs
- Update agent_beads_check.go to check/fix in correct tier
- Update agentAddressToIDs() in deacon.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 21:09:59 -08:00
Jacob
aaee7fed40 fix(doctor): use route path directly for agent beads check (#36)
The agent-beads-exist check was hardcoding '/mayor/rig' suffix when
constructing the beads path, but routes.jsonl can contain paths like
'my-saas' without this suffix.

This caused the check to look for beads in the wrong location:
- Expected: <town>/<route-path>/.beads (e.g., ~/gt/my-saas/.beads)
- Actual: <town>/<rig>/mayor/rig/.beads (e.g., ~/gt/my-saas/mayor/rig/.beads)

The fix stores the full route path and uses it directly when creating
the beads client, instead of reconstructing an assumed path structure.

Fixes agent beads not being found when routes use simple rig names.
2026-01-02 18:19:58 -08:00
Steve Yegge
87bc02b009 fix: Use rig's configured prefix for agent bead IDs (gt-kdy77, gt-ihvq0)
Added WithPrefix variants to agent bead ID functions:
- AgentBeadIDWithPrefix(prefix, rig, role, name)
- WitnessBeadIDWithPrefix, RefineryBeadIDWithPrefix
- CrewBeadIDWithPrefix, PolecatBeadIDWithPrefix

Updated callers to use rig's configured prefix:
- crew_add.go: reads r.Config.Prefix for crew worker beads
- rig/manager.go: uses prefix param for witness/refinery beads
- doctor/agent_beads_check.go: uses prefix from routes.jsonl

This allows non-gastown rigs (like beads with bd- prefix) to have
properly-prefixed agent beads.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 15:29:16 -08:00
Steve Yegge
c92b11d1bd feat: Standardize agent bead naming to prefix-rig-role-name (gt-zvte2)
Implements canonical naming convention for agent bead IDs:
- Town-level: gt-mayor, gt-deacon (unchanged)
- Rig-level: gt-<rig>-witness, gt-<rig>-refinery (was gt-witness-<rig>)
- Named: gt-<rig>-crew-<name>, gt-<rig>-polecat-<name> (was gt-crew-<rig>-<name>)

Changes:
- Added AgentBeadID helper functions to internal/beads/beads.go
- Updated all ID generation call sites to use helpers
- Fixed session parsing in theme.go, statusline.go, agents.go
- Updated doctor check and fix to use canonical format
- Updated tests for new format

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 14:54:37 -08:00
Steve Yegge
c6ba5361ad fix: Use shared role beads consistently
All agent bead creation now uses shared role beads:
- gt-mayor-role, gt-deacon-role
- gt-witness-role, gt-refinery-role
- gt-crew-role, gt-polecat-role

Previous code created per-instance role bead references like
gt-witness-gastown-role which is wrong. Role beads are shared
class definitions, not per-instance.

Files fixed:
- internal/rig/manager.go
- internal/doctor/agent_beads_check.go
- internal/cmd/prime.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 14:05:40 -08:00
Steve Yegge
990d9820a0 feat: Create crew agent beads in doctor --fix and crew add
- doctor/agent_beads_check.go: Check and create agent beads for all crew workers
  - New listCrewWorkers() helper finds crew directories in each rig
  - Run() checks for missing crew agent beads
  - Fix() creates missing crew agent beads with proper fields

- cmd/crew_add.go: Create agent bead when adding a crew worker
  - Creates gt-crew-<rig>-<name> agent bead after workspace creation
  - Non-fatal if bead creation fails (warns but continues)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:07:01 -08:00
Steve Yegge
2ae7bd24a3 feat: gt doctor checks agent beads exist (gt-bq4wo)
Adds agent-beads-exist check to gt doctor:
- Verifies witness/refinery beads exist for each rig
- Verifies deacon/mayor beads exist in first rig
- Supports --fix to create missing agent beads
- Skips non-gt prefixes (beads library limitation)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 02:40:00 -08:00