diff --git a/CHANGELOG.md b/CHANGELOG.md index d3dc90a6..517c01b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,121 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0] - 2026-01-04 + +Major release featuring the Convoy Dashboard, two-level beads architecture, and significant multi-agent improvements. + +### Added + +#### Convoy Dashboard (Web UI) +- **`gt dashboard` command** - Launch web-based monitoring UI for Gas Town (#71) +- **Polecat Workers section** - Real-time activity monitoring with tmux session timestamps +- **Refinery Merge Queue display** - Always-visible MR queue status +- **Dynamic work status** - Convoy status columns with live updates +- **HTMX auto-refresh** - 10-second refresh interval for real-time monitoring + +#### Two-Level Beads Architecture +- **Town-level beads** (`~/gt/.beads/`) - `hq-*` prefix for Mayor mail and cross-rig coordination +- **Rig-level beads** - Project-specific issues with rig prefixes (e.g., `gt-*`) +- **`gt migrate-agents` command** - Migration tool for two-level architecture (#nnub1) +- **TownBeadsPrefix constant** - Centralized `hq-` prefix handling +- **Prefix-based routing** - Commands auto-route to correct rig via `routes.jsonl` + +#### Multi-Agent Support +- **Pluggable agent registry** - Multi-agent support with configurable providers (#107) +- **Multi-rig management** - `gt rig start/stop/restart/status` for batch operations (#11z8l) +- **`gt crew stop` command** - Stop crew sessions cleanly +- **`spawn` alias** - Alternative to `start` for all role subcommands +- **Batch slinging** - `gt sling` supports multiple beads to a rig in one command (#l9toz) + +#### Ephemeral Polecat Model +- **Immediate recycling** - Polecats recycled after each work unit (#81) +- **Updated patrol formula** - Witness formula adapted for ephemeral model +- **`mol-polecat-work` formula** - Updated for ephemeral polecat lifecycle (#si8rq.4) + +#### Cost Tracking +- **`gt costs` command** - Session cost tracking and reporting +- **Beads-based storage** - Costs stored in beads instead of JSONL (#f7jxr) +- **Stop hook integration** - Auto-record costs on session end +- **Tmux session auto-detection** - Costs hook finds correct session + +#### Conflict Resolution +- **Conflict resolution workflow** - Formula-based conflict handling for polecats (#si8rq.5) +- **Merge-slot gate** - Refinery integration for ordered conflict resolution +- **`gt done --phase-complete`** - Gate-based phase handoffs (#si8rq.7) + +#### Communication & Coordination +- **`gt mail archive` multi-ID** - Archive multiple messages at once (#82) +- **`gt mail --all` flag** - Clear all mail for agent ergonomics (#105q3) +- **Convoy stranded detection** - Detect and feed stranded convoys (#8otmd) +- **`gt convoy --tree`** - Show convoy + child status tree +- **`gt convoy check`** - Cross-rig auto-close for completed convoys (#00qjk) + +#### Developer Experience +- **Shell completion** - Installation instructions for bash/zsh/fish (#pdrh0) +- **`gt prime --hook`** - LLM runtime session handling flag +- **`gt doctor` enhancements** - Session-hooks check, repo-fingerprint validation (#nrgm5) +- **Binary age detection** - `gt status` shows stale binary warnings (#42whv) +- **Circuit breaker** - Automatic handling for stuck agents (#72cqu) + +#### Infrastructure +- **SessionStart hooks** - Deployed during `gt install` for Mayor role +- **`hq-dog-role` beads** - Town-level dog role initialization (#2jjry) +- **Watchdog chain docs** - Boot/Deacon lifecycle documentation (#1847v) +- **Integration tests** - CI workflow for `gt install` and `gt rig add` (#htlmp) +- **Local repo reference clones** - Save disk space with `--reference` cloning + +### Changed + +- **Handoff migrated to skills** - `gt handoff` now uses skills format (#nqtqp) +- **Crew workers push to main** - Documentation clarifies no PR workflow for crew +- **Session names include town** - Mayor/Deacon sessions use town-prefixed names +- **Formula semantics clarified** - Formulas are templates, not instructions +- **Witness reports stopped** - No more routine Mayor reports (saves tokens) + +### Fixed + +#### Daemon & Session Stability +- **Thread-safety** - Added locks for agent session resume support +- **Orphan daemon prevention** - File locking prevents duplicate daemons (#108) +- **Zombie tmux cleanup** - Kill zombie sessions before recreating (#vve6k) +- **Tmux exact matching** - `HasSession` uses exact match to prevent prefix collisions +- **Health check fallback** - Prevents killing healthy sessions on tmux errors + +#### Beads Integration +- **Mayor/rig path** - Use correct path for beads to prevent prefix mismatch (#38) +- **Agent bead creation** - Fixed during `gt rig add` (#32) +- **bd daemon startup** - Circuit breaker and restart logic (#2f0p3) +- **BEADS_DIR environment** - Correctly set for polecat hooks and cross-rig work + +#### Agent Workflows +- **Default branch detection** - `gt done` no longer hardcodes 'main' (#42) +- **Enter key retry** - Reliable Enter key delivery with retry logic (#53) +- **SendKeys debounce** - Increased to 500ms for reliability +- **MR bead closure** - Close beads after successful merge from queue (#52) + +#### Installation & Setup +- **Embedded formulas** - Copy formulas to new installations (#86) +- **Vestigial cleanup** - Remove `rigs/` directory and `state.json` files +- **Symlink preservation** - Workspace detection preserves symlink paths (#3, #75) +- **Golangci-lint errors** - Resolved errcheck and gosec issues (#76) + +### Contributors + +Thanks to all contributors for this release: +- @kiwiupover - README updates (#109) +- @michaellady - Convoy dashboard (#71), ResolveBeadsDir fix (#54) +- @jsamuel1 - Dependency updates (#83) +- @dannomayernotabot - Witness fixes (#87), daemon race condition (#64) +- @markov-kernel - Mayor session hooks (#93), daemon init recommendation (#95) +- @rawwerks - Multi-agent support (#107) +- @jakehemmerle - Daemon orphan race condition (#108) +- @danshapiro - Install role slots (#106), rig beads dir (#61) +- @vessenes - Town session helpers (#91), install copy formulas (#86) +- @kustrun - Init bugs (#34) +- @austeane - README quickstart fix (#44) +- @Avyukth - Patrol roles per-rig check (#26) + ## [0.1.1] - 2026-01-02 ### Fixed diff --git a/internal/cmd/info.go b/internal/cmd/info.go new file mode 100644 index 00000000..5cca9fee --- /dev/null +++ b/internal/cmd/info.go @@ -0,0 +1,186 @@ +package cmd + +import ( + "encoding/json" + "fmt" + "os" + "strings" + + "github.com/spf13/cobra" +) + +var infoCmd = &cobra.Command{ + Use: "info", + GroupID: GroupDiag, + Short: "Show Gas Town information and what's new", + Long: `Display information about the current Gas Town installation. + +This command shows: + - Version information + - What's new in recent versions (with --whats-new flag) + +Examples: + gt info + gt info --whats-new + gt info --whats-new --json`, + Run: func(cmd *cobra.Command, args []string) { + whatsNewFlag, _ := cmd.Flags().GetBool("whats-new") + jsonFlag, _ := cmd.Flags().GetBool("json") + + if whatsNewFlag { + showWhatsNew(jsonFlag) + return + } + + // Default: show basic info + info := map[string]interface{}{ + "version": Version, + "build": Build, + } + + if commit := resolveCommitHash(); commit != "" { + info["commit"] = shortCommit(commit) + } + if branch := resolveBranch(); branch != "" { + info["branch"] = branch + } + + if jsonFlag { + enc := json.NewEncoder(os.Stdout) + enc.SetIndent("", " ") + enc.Encode(info) + return + } + + fmt.Printf("Gas Town v%s (%s)\n", Version, Build) + if commit, ok := info["commit"].(string); ok { + if branch, ok := info["branch"].(string); ok { + fmt.Printf(" %s@%s\n", branch, commit) + } else { + fmt.Printf(" %s\n", commit) + } + } + fmt.Println("\nUse 'gt info --whats-new' to see recent changes") + }, +} + +// VersionChange represents agent-relevant changes for a specific version +type VersionChange struct { + Version string `json:"version"` + Date string `json:"date"` + Changes []string `json:"changes"` +} + +// versionChanges contains agent-actionable changes for recent versions +var versionChanges = []VersionChange{ + { + Version: "0.2.0", + Date: "2026-01-04", + Changes: []string{ + "NEW: Convoy Dashboard - Web UI for monitoring Gas Town (gt dashboard)", + "NEW: Two-level beads architecture - hq-* prefix for town, rig prefixes for projects", + "NEW: Multi-agent support with pluggable registry", + "NEW: gt rig start/stop/restart/status - Multi-rig management commands", + "NEW: Ephemeral polecat model - Immediate recycling after each work unit", + "NEW: gt costs command - Session cost tracking and reporting", + "NEW: Conflict resolution workflow for polecats with merge-slot gates", + "NEW: gt convoy --tree and gt convoy check for cross-rig coordination", + "NEW: Batch slinging - gt sling supports multiple beads at once", + "NEW: spawn alias for start across all role subcommands", + "NEW: gt mail archive supports multiple message IDs", + "NEW: gt mail --all flag for clearing all mail", + "NEW: Circuit breaker for stuck agents", + "NEW: Binary age detection in gt status", + "NEW: Shell completion installation instructions", + "CHANGED: Handoff migrated to skills format", + "CHANGED: Crew workers push directly to main (no PRs)", + "CHANGED: Session names include town name", + "FIX: Thread-safety for agent session resume", + "FIX: Orphan daemon prevention via file locking", + "FIX: Zombie tmux session cleanup", + "FIX: Default branch detection (no longer hardcodes 'main')", + "FIX: Enter key retry logic for reliable delivery", + "FIX: Beads prefix routing for cross-rig operations", + }, + }, + { + Version: "0.1.1", + Date: "2026-01-02", + Changes: []string{ + "FIX: Tmux keybindings scoped to Gas Town sessions only", + "NEW: OSS project files - CHANGELOG.md, .golangci.yml, RELEASING.md", + "NEW: Version bump script - scripts/bump-version.sh", + "FIX: gt rig add and gt crew add CLI syntax documentation", + "FIX: Rig prefix routing for agent beads", + "FIX: Beads init targets correct database", + }, + }, + { + Version: "0.1.0", + Date: "2026-01-02", + Changes: []string{ + "Initial public release of Gas Town", + "NEW: Town structure - Hierarchical workspace with rigs, crews, and polecats", + "NEW: Rig management - gt rig add/list/remove", + "NEW: Crew workspaces - gt crew add for persistent developer workspaces", + "NEW: Polecat workers - Transient agent workers managed by Witness", + "NEW: Mayor - Global coordinator for cross-rig work", + "NEW: Deacon - Town-level lifecycle patrol and heartbeat", + "NEW: Witness - Per-rig polecat lifecycle manager", + "NEW: Refinery - Merge queue processor with code review", + "NEW: Convoy system - gt convoy create/list/status", + "NEW: Sling workflow - gt sling ", + "NEW: Molecule workflows - Formula-based multi-step task execution", + "NEW: Mail system - gt mail inbox/send/read", + "NEW: Escalation protocol - gt escalate with severity levels", + "NEW: Handoff mechanism - gt handoff for context-preserving session cycling", + "NEW: Beads integration - Issue tracking via beads (bd commands)", + "NEW: Tmux sessions with theming", + "NEW: Status dashboard - gt status", + "NEW: Activity feed - gt feed", + "NEW: Nudge system - gt nudge for reliable message delivery", + }, + }, +} + +// showWhatsNew displays agent-relevant changes from recent versions +func showWhatsNew(jsonOutput bool) { + if jsonOutput { + enc := json.NewEncoder(os.Stdout) + enc.SetIndent("", " ") + enc.Encode(map[string]interface{}{ + "current_version": Version, + "recent_changes": versionChanges, + }) + return + } + + // Human-readable output + fmt.Printf("\nWhat's New in Gas Town (Current: v%s)\n", Version) + fmt.Println(strings.Repeat("=", 50)) + fmt.Println() + + for _, vc := range versionChanges { + // Highlight if this is the current version + versionMarker := "" + if vc.Version == Version { + versionMarker = " <- current" + } + + fmt.Printf("## v%s (%s)%s\n\n", vc.Version, vc.Date, versionMarker) + + for _, change := range vc.Changes { + fmt.Printf(" * %s\n", change) + } + fmt.Println() + } + + fmt.Println("Tip: Use 'gt info --whats-new --json' for machine-readable output") + fmt.Println() +} + +func init() { + infoCmd.Flags().Bool("whats-new", false, "Show agent-relevant changes from recent versions") + infoCmd.Flags().Bool("json", false, "Output in JSON format") + rootCmd.AddCommand(infoCmd) +} diff --git a/internal/cmd/version.go b/internal/cmd/version.go index cd06836a..9c5595ae 100644 --- a/internal/cmd/version.go +++ b/internal/cmd/version.go @@ -11,7 +11,7 @@ import ( // Version information - set at build time via ldflags var ( - Version = "0.1.2" + Version = "0.2.0" // Build can be set via ldflags at compile time Build = "dev" // Commit and Branch - the git revision the binary was built from (optional ldflag)