feat(tui): add Upgrade Tools menu with parallel upgrade engine#73
Draft
feat(tui): add Upgrade Tools menu with parallel upgrade engine#73
Conversation
- Add ToolRef schema (name + command) to UserManifest with validation - Embed built-in tool catalog (tools/engram.yaml, tools/crit.yaml) - Add internal/tui/tool_catalog.go loader for embedded catalog - Persist manifest.Tools after wizard confirm, preserving user overrides - Add internal/tui/steps/tool_upgrade.go with parallel upgrade engine using injected executor for deterministic tests - Render '(no upgradable)' badge for tools with no effective command - Show empty-state and confirm gate before executing upgrades - Wire 'Upgrade Tools' option into main TUI menu
Three follow-up fixes on top of the initial Upgrade Tools feature based on real-usage feedback: - Catalog wins over manifest. Resolution was 'manifest command first, catalog fallback'. A stale 'command:' override in the user's devrune.yaml (e.g. 'brew install tomasz-tomczyk/tap/crit') would silently shadow the catalog's correct command and fail. Invert the order: catalog always wins for known tools; manifest 'command:' only serves unknown tools as an extensibility hatch. - Drop the redundant preview screen. The flow showed a Note listing upgradable tools (advances on any key, contradicting the 'enter submit' hint) immediately before a Confirm screen that already listed the same tools with their commands. Land directly on the Confirm screen. - Add the standard '◆ DevRune' header to every Upgrade Tools screen (preview/confirm/summary/empty/all-non-upgradable) via BannerNote(), matching the convention used by 'devrune upgrade'. Tests updated: 'manifest wins' assertion inverted; new cases cover 'catalog wins even when manifest differs' and 'manifest used when catalog entry is empty' (fallback path for unknown tools). Refs davidarce/devrune-starter-catalog#71 (corrects the upstream crit command so users picking up the new catalog get the fix automatically).
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.
New Feature
Description
Adds a new Upgrade Tools entry to the DevRune TUI menu that lets users update declared external tools (e.g.
crit,engram) in parallel using the upgrade commands defined indevrune.yaml.Motivation
DevRune's manifest already declares external tools that integrate with the workflow (Crit for plan review, Engram for memory). Until now, users had to upgrade them manually outside DevRune. Centralizing tool upgrades in the TUI removes friction, surfaces what's installed at a glance, and keeps users on stable versions without leaving the app.
Implementation
tools:todevrune.yamlwithname+commandper tool. Validated ininternal/model/manifest.go.tools/*.yamlfiles compiled in via//go:embed(same pattern as agents). Defaults:crit = brew install crit,engram = brew install gentleman-programming/tap/engram.ExistingConfig.Toolspropagates throughinternal/cli/init.goandinternal/cli/menu.go; persisted at the confirm step alongside agents.internal/tui/steps/tool_upgrade.goruns all upgradable tools concurrently, preserves a stable order by index, and returns a structured{name, status, error}summary. Individual failures don't abort the run.func(command string) errorparameter (defaults tosh -c <command>) keeps tests deterministic.(no upgradable)badge and are excluded from execution. If no tools are declared at all, an empty-state screen routes back to the main menu.Testing
manifest_test.go(5 cases),tool_catalog_test.go(loader smoke),app_test.go(5 table-driven cases),tool_upgrade_test.go(10 engine tests with injected executor)tools:section ininternal/parse/manifest_test.goDocumentation
testdata/manifests/valid-full.yamlreflects the new sectionBreaking Changes
None. The
tools:field is additive and optional; existing manifests continue to work unchanged.Out of Scope
Downgrades, rollback, version pinning, auto-upgrade on launch, and external (non-embedded) catalogs — all deliberate non-goals tracked in the SDD PRD.
SDD Trail
Built via the full SDD workflow (
explore → plan → implement → review). Review verdict:okwith 5 non-blocking minors documented in.sdd/sdd-upgrade-tools/review.md(workdir is gitignored).