feat!: overhaul UI, TUI, and agent surface (JSON, manifest, MCP)#8
Merged
Conversation
…tion
BREAKING CHANGE: internal action signatures move to cli/v3
(func(ctx, *cli.Command) error). User-facing flags and aliases are
preserved; --json and --yes/--no-input are added.
- Exit-code taxonomy (helpers/exit.go): 0 ok, 2 usage, 3 validation,
4 not-found, 5 git, 130 cancelled; mapped once via ExitErrHandler.
- TTY/color detection (helpers/term.go): IsInteractive, ColorEnabled
(honors NO_COLOR).
- New `scan` command (human + --json) and internal/schema envelope
({schemaVersion, command, ok, data|error}).
- internal/ui: lipgloss brand theme (forge accent), branded help
templates, summary/apply/diff renderers.
- Repo-wide gofumpt formatting pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completes the CLI output theming: log level colors and the timestamp are stripped when NO_COLOR is set or stderr is not a terminal, matching the ui package's color policy so piped/CI logs stay clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A template can declare its variables in yankrun.yaml (description, default, required, enum, pattern, transforms) plus ignore_patterns and post-generate hints. Templates without a manifest are unaffected. - domain.Manifest + services.LoadManifest/ValidateValues. - services.EnvValues collects YANKRUN_VAR_* value injection. - Engine is manifest-aware: Summary.Manifest, defaults folded in, manifest ignore_patterns merged, ResolveValues precedence helper (defaults < file < env < answers). - `template` resolves + validates against the manifest before applying and prints post-generate hints; scan --json exposes the manifest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- --json emits a single envelope (success or error) on stdout with the ApplyResult; logs drop to stderr. scan --json already landed. - Values via stdin (--input -) and environment (YANKRUN_VAR_*), merged by precedence: manifest defaults < file < env < prompts. - Dry-run computes per-file unified diffs (FileSummary.Diff) via a new Replacer.ReplaceContent; rendered coloured in the CLI, raw in JSON. - Non-interactive hardening: prompts gated behind a TTY/--yes/--json check so agents and CI never hang; re-runs are idempotent (0 matches, exit 0). template/clone/generate share one apply pipeline (actions/apply.go). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Interactive value entry, template/branch selection, and the setup
wizard now use charmbracelet/huh, themed with the forge accent. Manifest
metadata drives each field: description as help text, enum as a select,
required as validation. All prompts stay TTY-gated so non-interactive
runs never reach them.
Also adds a branded serve splash ("the anvil is hot") with the address
front and centre.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrites `yankrun tui` as a full-screen state machine: scan → fill values (manifest-aware huh form) → preview per-file diffs in a viewport → apply. Model holds no business logic; every operation goes through workflow.Engine. Requires a real terminal (exit 2 otherwise). Covered by a teatest suite (fill→preview→apply writes files, dry-run leaves them untouched, empty dir exits cleanly). The old exec-with-pipe integration test becomes a TTY-guard assertion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Exposes seven tools over the Model Context Protocol so agents can drive templating natively: yankrun_scan, _evaluate, _apply (dry-run diffs), _clone, _generate, _manifest, _templates. Each is a thin wrapper over workflow.Engine and returns the same JSON-tagged types as --json. Template listing/lookup is lifted into services.ListTemplates / FindTemplate, shared with the web workbench. Covered by in-memory client↔server round-trips plus a stdio smoke test that execs the binary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reskins the web UI onto the brand kit (forge flavor): dark shell (#05070a), Inter + JetBrains Mono self-hosted via go:embed (works offline), sticky edge-to-edge topbar with the accent mark, glass-card panels, terminal-window diff blocks, kit radii (no 999px pills), and a focus-visible accent outline. UX: value fields are manifest-driven (description, REQUIRED badge, enum → select, pattern validation) and dry-run previews render per-file unified diffs inline. Adds axeforge.css, the woff2 set, and favicon.svg; structlint now allows *.woff2. Extends server tests for the manifest payload, dry-run diffs, and served brand assets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Document the new agent-facing surface across README, COMMANDS, EXAMPLES, and docs/AI: the `scan` and `mcp` commands, `--json`/`--yes`, the `YANKRUN_VAR_*` precedence chain, the exit-code taxonomy, and the `yankrun.yaml` manifest spec. Add MCP client-config snippets and agent scan->apply recipes. - Makefile: `build-local` (bin/yankrun) and `test` (race) targets - release.yml: go-version 1.24 -> 1.25.10 - logger/styles: theme-driven, NO_COLOR-aware - .gitignore: bin/ Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
StructLint — All checks passed131 rules validated against
|
Make the workbench read as a guided flow, all within the brand kit: - Scan -> Fill -> Preview -> Apply stepper tracks real state (green done dots, pulsing accent on the next action) - fill-progress meter (n/m + bar, green when complete); rows get semantic left rules: green = filled, amber = required and empty - skeleton shimmer while scanning; indeterminate accent progress line and status spinner while busy - collapsible file trees and diffs with per-file +/- stats - count-up metrics, preset delete buttons, relative timestamps - keyboard shortcuts (Ctrl+Enter preview, / search, Esc dismiss) with a kbd legend; success toasts auto-dismiss - prefers-reduced-motion disables all animation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the stale demo (pre-brand-restyle) with a real-time capture of the new UI: the Scan -> Fill -> Preview -> Apply stepper, the manifest- driven required/enum fields, the fill-progress meter, and collapsible per-file diffs with +/- stats. Recorded at native playback speed (no timelapse) via user-flow; encoded small (640x400 @ 6fps, ~3.6MB) and displayed larger in the README via an explicit width so file size stays down without shrinking the picture. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Big-bang overhaul of yankrun across every surface: brand-consistent visuals, a real terminal UI, and a first-class agent/automation surface. One engine still powers CLI, TUI, serve, and MCP.
What changed
Agent & automation surface (new)
yankrun scan— read-only placeholder discovery;--jsonemits a versioned envelope--jsonon template/clone/generate (success and failure), logs to stderr--yes/--no-input— never prompt; fails fast on missing required values--input -reads values from stdin;YANKRUN_VAR_*injects from env0ok,1internal,2usage,3validation,4not-found,5git,130cancelledMCP server (new) —
yankrun mcpserves the engine over stdio with 7 tools(
yankrun_scan,yankrun_evaluate,yankrun_apply,yankrun_clone,yankrun_generate,yankrun_manifest,yankrun_templates).{ "mcpServers": { "yankrun": { "command": "yankrun", "args": ["mcp"] } } }Template manifest (new, optional) — a
yankrun.yamlat a template root declares itsvariables (default/required/enum/pattern), powering richer prompts, pre-apply validation,
and agent self-discovery. Templates without one keep working unchanged.
Visuals
NO_COLORand non-TTYBreaking
!marks this.Value precedence
manifest defaults<--input<YANKRUN_VAR_*< interactive answersTesting
-raceacross 12 packages; gofumpt-clean;go vetclean🤖 Generated with Claude Code