Conversation
Remove old Rust/Zellij-era specs (011-014). Add TUI design artifacts (layout, mockups, keybinds, styles) and technical research (interfaces, schemas, message types, package structure) for the Go/bubbletea rewrite.
…ator Phase 0+1 planning artifacts: - plan.md: 3-wave implementation plan (core TUI, task sources, daemon/persistence) - research.md: consolidated research decisions (6 key decisions with rationale) - data-model.md: entity definitions, state machines, interface contracts - quickstart.md: development bootstrap and workflow guide Updated project memory for Go rewrite: - constitution.md v2: Go/bubbletea stack, opencode harness, testing standards - architecture.md: new package structure, worker lifecycle, message flow - AGENTS.md: Go build commands, updated repository layout
Wave 1 (WP01-06): Core TUI + worker lifecycle Wave 2 (WP07-11): Task sources + worker management Wave 3 (WP12-13): Daemon mode + persistence Each WP references specific tui-technical.md sections and has clear scope boundaries for independent coder agent sessions.
WP01: go.mod with all deps, cmd/kasmos/main.go with cobra + minimal bubbletea program, signal handling, alt screen. WP02: internal/worker/ package - WorkerBackend interface, SubprocessBackend (os/exec), Worker state machine, OutputBuffer ring buffer, session ID extraction, WorkerManager with atomic IDs. Full test suite passes including -race.
internal/tui/ package with 6 files: model.go (Model + Init/Update/View), layout.go (4 breakpoints, responsive dimension math), styles.go (full Charm bubblegum palette, gradient title, indicators, badges), keys.go (26 bindings, ShortHelp/FullHelp, context-dependent states), messages.go (22 message types for full event catalog), panels.go (header, empty table, welcome viewport, status bar, help overlay). Empty dashboard renders matching V11 mockup. Resize, focus cycling, help toggle all functional.
commands.go: spawnWorkerCmd, readWorkerOutput (goroutine + Send), waitWorkerCmd, killWorkerCmd tea.Cmd constructors. overlays.go: spawn dialog with role selector, prompt textarea, files input. Centered with hot pink border + backdrop. update.go: full lifecycle dispatch - spawn dialog submit, workerSpawned/Output/Exited handlers, table selection sync, viewport auto-follow, spinner and tick refresh. panels.go: table rows from live workers with spinner status, viewport shows selected worker output, real status bar counts. main.go: SubprocessBackend init, NewModel(backend), SetProgram.
- Remove statusBar field mutation in renderStatusBar() (View must be pure) - Export ExtractSessionID from worker package, delete duplicate in tui/update.go - Remove unused statusBar field from Model struct
WP05: Continue dialog with parent info, quit confirmation with running worker count, worker chain tree rendering (├─/└─/│ glyphs), viewport chain references, updateKeyStates for Continue key. WP07: Kill running workers (x key, 3s grace SIGTERM→SIGKILL), restart failed/killed workers (r key, pre-filled spawn dialog). WP08: internal/task/ package with Source interface, SpecKittySource (YAML frontmatter parser + dependency resolution), GsdSource (checkbox markdown), AdHocSource, DetectSourceType, CLI positional arg, full test suite. Review fixes: deduplicate TaskState/Task types (TUI now imports from task package), guard done/in-progress tasks from retroactive blocking, simplify state transition in workerSpawnedMsg handler.
WP06: Fullscreen viewport mode (f key toggle), auto-follow logic, vim-style scroll controls (j/k/d/u/G/g), 4-phase key routing refactor, context-dependent key activation, graceful shutdown (kill all running workers on quit confirm). WP10: kasmos setup subcommand with dependency validation (opencode, git), agent definition scaffolding (.opencode/agents/ with planner, coder, reviewer, release templates), idempotent file creation, project root detection, full test suite.
WP09: Real task panel rendering with selection, status badges, and worker assignment display. Batch spawn dialog with checkbox selection. Worker-task association on spawn (InProgress) and exit (Done/Failed). Dependency re-resolution on task completion. Task counts in status bar. WP11: On-demand AI helpers - failure analysis (a key) spawns headless reviewer worker to identify root cause + suggest fix. Prompt generation (g key) spawns headless planner to generate implementation prompts. Analysis viewport rendering with structured output. Restart with suggested prompt flow.
…Panel View purity: remove viewport.SetWidth/SetHeight from renderFullScreen (redundant with resizeFullScreenViewport in Update), remove selectedTaskIdx mutation from renderTasksPanel (use local clamped var).
WP12: Headless daemon mode (-d flag) with NDJSON and human-readable event logging, TTY auto-detection, --spawn-all for batch execution, auto-exit with aggregate stats, SIGPIPE handling. WP13: Session persistence to .kasmos/session.json with debounced atomic writes, --attach flag for session restore, orphan detection (mark running workers as killed when PID dead), worker counter reset, output tail preservation (last 200 lines), full test suite.
- Fix NextWorkerNum using manager.Counter() instead of len(workers)+1 - Remove 6 dead message types (tasksLoaded, taskStateChanged, etc.) - Extract handleAnalysisModeKeys() to deduplicate 3 identical blocks - Add analysis mode key disabling in updateKeyStates() - Lower tooSmall layout threshold from 80x24 to 60x15 - Add TUI test suite (model defaults, layout breakpoints, key states, daemon formatting) - Rewrite README to reflect Go/bubbletea rewrite (was Rust/Zellij) - Bump version to v2.0.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete rewrite of kasmos from a Rust/Zellij MCP orchestrator to a Go/bubbletea terminal UI for managing concurrent OpenCode agent sessions. This is the full implementation of feature 016 across 13 work packages in 3 waves.
What's New
.kasmos/session.jsonwith debounced atomic writes and--attachresume-d) with human or NDJSON output,--spawn-allfor CI/automationImplementation
Packages
cmd/kasmos/internal/tui/internal/worker/internal/task/internal/persist/internal/setup/