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
Subhrajit Makur
7fe505d673 fix: create mayor/daemon.json during gt start and gt doctor --fix (#225)
* fix: create mayor/daemon.json during gt start and gt doctor --fix (#5)

- Add DaemonPatrolConfig type with heartbeat and patrol settings
- Add Load/Save/Ensure functions for daemon patrol config
- Create daemon.json in gt start (non-fatal if fails)
- Make PatrolHooksWiredCheck fixable with Fix() method
- Add comprehensive tests for both config and doctor checks

This fixes the issue where gt doctor expects mayor/daemon.json to exist
but it was never created by gt start or any other command.

* refactor: use constants.DirMayor instead of hardcoded string
2026-01-06 12:59:41 -08:00
Olivier Debeuf De Rijcker
26d696cdc3 fix: recommend 'gt daemon start' instead of invalid 'gt daemon init'
The gt doctor patrol-hooks-wired check was recommending 'gt daemon init'
which doesn't exist. The daemon is auto-initialized when running
'gt daemon start', so that's the correct command to recommend.

Fixes #94

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 12:14:49 +01:00
Avyukth
3e5562222d fix: Check patrol role templates per-rig instead of at town level
- PatrolRolesHavePromptsCheck now verifies templates exist in each rig's
  mayor clone at <rig>/mayor/rig/internal/templates/roles/
- Track missing templates by rig using missingByRig map
- Fix copies embedded templates to each rig's location
- Add GetAllRoleTemplates helper to templates package
- Add tests for no-rigs case and multiple-rigs scenarios
2026-01-03 00:34:51 +05:30
Steve Yegge
879018f35d fix: gt commands follow .beads/redirect for shared beads (gt-ln5af)
Added ResolveBeadsDir() helper that follows .beads/redirect files,
enabling crew workers and polecats to properly access shared beads.

Updated callers:
- mailbox.go: NewMailboxFromAddress follows redirect
- catalog.go: LoadCatalog follows redirect at all levels
- doctor checks: beads_check, patrol_check, wisp_check follow redirect

Also added comprehensive tests for the redirect resolution logic.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:34:22 -08:00
Steve Yegge
8122a9e944 fix: Remove hardcoded actors, let bd use default chain
bd defaults to $BD_ACTOR → git config user.name → $USER, which is
more accurate for system tools like doctor and rig init.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 19:50:30 -08:00
Steve Yegge
fe19c8d15e feat: Wire up created_by field for beads issues (gt-u6nri)
- Add CreatedBy field to Issue struct (matches beads GH#748)
- Add Actor field to CreateOptions, pass --actor to bd create
- Add ActorString() method to RoleInfo for identity formatting
- Update all beads.Create() callers to pass Actor
- Update direct bd create exec calls with --actor:
  - mail/router.go: uses sender identity
  - patrol_helpers.go: uses role name
  - doctor/patrol_check.go: uses "gt-doctor"
  - rig/manager.go: uses "gt-rig-init"

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 19:42:41 -08:00
Steve Yegge
7e568770de refactor: remove legacy .beads-wisp infrastructure (gt-5klh)
Wisps are now just a flag on regular beads issues (Wisp=true).
No separate directory needed - hooks stored in .beads/.

Changes:
- wisp package: WispDir now points to .beads/, removed PatrolCycle
- manager.go: removed initWispBeads() - no separate dir to create
- mrqueue.go: MRs stored in .beads/mq/ instead of .beads-wisp/mq/
- doctor: removed obsolete wisp directory checks
- docs: updated wisp-architecture.md to reflect simplified model

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:34:14 -08:00
Steve Yegge
b77e0fe09a chore: remove stale prompts/, mayor/, and scripts/ directories
- Delete prompts/roles/*.md (duplicates of internal/templates/roles/*.md.tmpl)
- Delete mayor/rig/docs/ (stale draft, canonical version in docs/)
- Delete scripts/ (replaced by Makefile and internal/daemon/)
- Update doctor check to validate internal/templates/roles/*.md.tmpl
- Update docs/prompts.md to reflect actual template location

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:46:56 -08:00
Steve Yegge
0b5fda69fd Add patrol awareness and wiring to gt rig add / gt doctor (gt-7923)
gt rig add changes:
- Seed patrol molecules (Deacon, Witness, Refinery) when adding rig
- Create plugin directories at town (~gt/plugins/) and rig levels
- Update command documentation and structure output

gt doctor changes:
- patrol-molecules-exist: Verify patrol molecules exist
- patrol-hooks-wired: Verify daemon triggers patrols
- patrol-not-stuck: Detect stale wisps (>1h in_progress)
- patrol-plugins-accessible: Verify plugin directories exist
- patrol-roles-have-prompts: Verify role prompts exist

All patrol checks support --fix where applicable.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:17:32 -08:00