{
"skill": "charm-tui",
"format_version": 1,
"status": "Specifications authored; agent evaluations not executed.",
"scenarios": [
{
"id": "preserve-v1",
"setup": "Existing Go app pins Bubble Tea v1 and uses a custom picker.",
"prompt": "Fix the resize bug without changing the UI or upgrading dependencies.",
"must_pass": [
"Inspect existing imports and layout before editing.",
"Keep the v1 API unless a necessary change is explained.",
"Test the reported resize and preserve key/output behavior."
],
"must_not": [
"An incidental v2 migration.",
"Replacing the picker with stock list behavior."
]
},
{
"id": "preserve-custom-design",
"setup": "Existing picker has an animated mascot, custom counters, two themes, and a bespoke header.",
"prompt": "Reduce duplicated code without removing features or changing how this picker looks.",
"must_pass": [
"Record current visible and interaction contracts.",
"Simplify repeated plumbing beneath those contracts.",
"Compare before and after on fixed fixtures."
],
"must_not": [
"Removing the mascot or counters as cleanup.",
"Claiming fewer lines proves equivalence."
]
},
{
"id": "focus-and-modal",
"setup": "Picker has normal navigation, a search editor, and a confirmation overlay.",
"prompt": "Typing q in search quits the app, and closing a dialog sometimes accepts the row beneath it. Fix both.",
"must_pass": [
"Focused input receives printable text.",
"The modal consumes the closing event exactly once.",
"Restore focus and retain any required component commands.",
"Add regression tests for both bugs."
],
"must_not": [
"Broadcasting all key events to every child.",
"Disabling q everywhere instead of resolving context."
]
},
{
"id": "stale-before-debounce",
"setup": "Async search A is in flight; user types B; B has a 150 ms debounce. Backend can complete out of order.",
"prompt": "Ensure the UI always represents the latest query, including errors and loading state.",
"must_pass": [
"Invalidate identity at the query change, before the new debounce fires.",
"Cancel superseded work and pass context to the backend.",
"Reject stale rows, stale errors, and stale completion flags.",
"Use deterministic out-of-order completion tests."
],
"must_not": [
"Only incrementing generation when B starts.",
"Using Batch or sleeps to assume order."
]
},
{
"id": "v2-box-width",
"setup": "Lip Gloss v2 container has a one-cell border and two padding cells on each horizontal side; no margins. Outer allocation is 40 cells.",
"prompt": "Fix a child that wraps two characters before the right edge and document the sizing rule.",
"must_pass": [
"Recognize an inner content width of 34 cells for this style.",
"Set the outer style width to 40, not 34.",
"Test actual display width and handle allocations smaller than the frame."
],
"must_not": [
"Treating Width as content width.",
"Ignoring external margins when generalizing the calculation."
]
},
{
"id": "small-unicode",
"setup": "Data contains CJK, combining marks, emoji, ANSI styles, and long paths. The footer wraps at narrow widths.",
"prompt": "Make this UI safe at 40x12 and at initial zero size without breaking Unicode.",
"must_pass": [
"Measure terminal cells and actual rendered chrome.",
"Clamp allocations and provide a safe too-small fallback.",
"Preserve identity and selection across layout changes.",
"Test styled and multilingual data."
],
"must_not": [
"Byte slicing rendered strings.",
"Using rune count as universal display width.",
"Claiming zero-sized content makes an oversized frame fit."
]
},
{
"id": "pipeline-picker",
"setup": "Command accepts newline-separated candidates on stdin and must return one stable ID for another program.",
"prompt": "Add an inline selector that works in pipelines and cancels cleanly.",
"must_pass": [
"Separate candidate input from interactive terminal input.",
"Reserve stdout for final machine output after UI completion.",
"Define non-TTY, cancelled, failed, and interrupted behavior.",
"Verify no logs or escape sequences contaminate the result."
],
"must_not": [
"Writing renderer/debug output to result stdout.",
"Assuming stderr can always be safely logged to while it is the UI sink.",
"Returning a selection on cancel."
]
},
{
"id": "streaming-history",
"setup": "Long-running log view appends events while the user reads older output. Syntax rendering is expensive.",
"prompt": "Keep the view responsive and stop it jumping back to the bottom.",
"must_pass": [
"Separate follow-tail state from scrolling.",
"Preserve the reading anchor while new data arrives.",
"Bound retained data or specify a retention policy.",
"Cache expensive rendering with complete invalidation keys and measure costs.",
"Avoid repeated exact whole-history measurement for an overflow check."
],
"must_not": [
"Unconditionally scrolling to bottom on append.",
"Silently dropping durable log events while claiming full retention.",
"Rendering every historical item on each tick."
]
},
{
"id": "accessible-form",
"setup": "Small form collects project name and two options; users include assistive-technology users and CI jobs.",
"prompt": "Choose and implement an appropriate Charm interface with an accessible path.",
"must_pass": [
"Consider Huh or an equally small prompt flow rather than a full-screen framework.",
"Provide genuine plain/accessible or noninteractive behavior.",
"Explain validation and preserve entered values on errors."
],
"must_not": [
"Equating NO_COLOR with complete screen-reader accessibility.",
"Hanging noninteractive execution for input."
]
},
{
"id": "ssh-isolation",
"setup": "Two SSH clients use the same TUI service with different terminal sizes and backgrounds.",
"prompt": "Fix cross-session theme and cursor interference.",
"must_pass": [
"Make model and mutable terminal/theme state session-scoped.",
"Bind subscriptions and cancellation to session lifetime.",
"Test two concurrent sessions with different capabilities."
],
"must_not": [
"Using process-global active model or mutable terminal capability state.",
"Claiming a UI fix validates SSH authentication security."
]
},
{
"id": "matching-test-major",
"setup": "Application imports charm.land/bubbletea/v2 but a tutorial uses unversioned x/exp/teatest.",
"prompt": "Add integration tests without introducing a major-version mismatch.",
"must_pass": [
"Inspect the helper module and choose teatest/v2 or an appropriate v2-compatible harness.",
"Verify toolchain and dependency compatibility in the target module graph.",
"Use bounded waits and check final outcome."
],
"must_not": [
"Assuming unversioned teatest is the v2 helper.",
"Claiming helper existence proves compatibility with every later release."
]
},
{
"id": "no-tui-needed",
"setup": "A Go command converts input files to JSON; no interactive task exists.",
"prompt": "Make this command pleasant to use and review whether Charm would help.",
"must_pass": [
"Prefer clear flags, errors, help, and machine-readable output.",
"Decline unnecessary TUI infrastructure while offering task-appropriate improvements."
],
"must_not": [
"Adding Bubble Tea solely because the skill was loaded.",
"Replacing scriptable output with a full-screen view."
]
},
{
"id": "write-cancellation",
"setup": "A confirmation dialog submits a remote delete operation; the server may commit before cancellation arrives.",
"prompt": "Let Escape cancel safely and avoid duplicate deletion requests.",
"must_pass": [
"Distinguish dismissing a dialog from proving server-side cancellation.",
"Track operation identity and reconcile completion.",
"Prevent duplicate active submissions and explain retry semantics."
],
"must_not": [
"Applying latest-search-wins logic to silently forget a committed write.",
"Reporting cancelled solely because the dialog disappeared."
]
},
{
"id": "conflicting-source-notes",
"setup": "Maintainer notes say no list-level cache; implementation at the same revision contains one.",
"prompt": "Study the list and recommend performance improvements.",
"must_pass": [
"Read the implementation and report the documentation discrepancy.",
"Base cache-existence claims on code, not the stale note.",
"Measure before proposing another cache."
],
"must_not": [
"Repeating the stale note as fact.",
"Claiming an entire application was benchmarked from a source read."
]
}
]
}