textual-ui-developer
Develop and debug the MassGen Textual TUI with deterministic replay, snapshot regression tests, and targeted runtime checks.
What this skill does
# Textual UI Developer Use this skill to improve the MassGen Textual UI while minimizing flaky reproduction and API cost. ## Use This Skill When - You need to debug timeline rendering or ordering issues. - You need to verify layout/styling changes in the real Textual shell. - You need to update or add TUI regression tests (snapshot/golden/transcript). - You need to reproduce UI behavior from `events.jsonl` deterministically. ## Default Strategy Prefer deterministic workflows before live model runs: 1. Reproduce from recorded/synthetic events (`events.jsonl`) with no API calls. 2. Confirm behavior in the real shell using `--tui-real`. 3. Encode findings into tests (unit, transcript golden, snapshot). 4. Use live `massgen --display textual` or `--textual-serve` only when needed. ## Quick Commands ```bash # Full frontend/TUI test suite uv run pytest massgen/tests/frontend -q # Timeline transcript goldens uv run pytest massgen/tests/frontend/test_timeline_transcript_golden.py -q UPDATE_GOLDENS=1 uv run pytest massgen/tests/frontend/test_timeline_transcript_golden.py -q # Snapshot scaffold tests uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py -q uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py --snapshot-update -q uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py -q --snapshot-report snapshot_report.html uv run python scripts/render_snapshot_svgs.py --real-tui-only # Event replay (no API cost) uv run python scripts/dump_timeline_from_events.py /path/to/events.jsonl [agent_id] uv run python scripts/dump_timeline_from_events.py --tui /path/to/events.jsonl [agent_id] uv run python scripts/dump_timeline_from_events.py --tui-real /path/to/events.jsonl [agent_id] # Example synthetic fixture uv run python scripts/dump_timeline_from_events.py --tui-real massgen/tests/frontend/fixtures/synthetic_tui_events.jsonl agent_a ``` ## Workflow ### 1) Reproduce with Event Replay (No API Cost) Start with transcript replay to verify timeline semantics quickly: ```bash uv run python scripts/dump_timeline_from_events.py /path/to/events.jsonl agent_a ``` Then inspect visually: ```bash # Lightweight timeline-focused view uv run python scripts/dump_timeline_from_events.py --tui /path/to/events.jsonl agent_a # Full runtime TextualApp shell uv run python scripts/dump_timeline_from_events.py --tui-real /path/to/events.jsonl agent_a ``` Optional speed control for real replay: ```bash MASSGEN_TUI_REPLAY_SPEED=8 uv run python scripts/dump_timeline_from_events.py --tui-real /path/to/events.jsonl agent_a ``` Exit replay with `q`. ### 2) Convert Findings into Tests Pick the narrowest layer that captures the bug: - Unit logic: `test_tool_batch_tracker.py`, `test_content_processor.py`, helpers. - Transcript/golden behavior: `test_timeline_transcript_golden.py` + `massgen/tests/frontend/golden/`. - Widget/shell snapshots: `test_timeline_snapshot_scaffold.py` + `massgen/tests/frontend/__snapshots__/`. - Replay script behavior: `test_dump_timeline_from_events_script.py`. ### Final Presentation Focus Loop When iterating specifically on final-answer visualization: 1. Validate header semantics in unit tests (winner line, tie-break markers, vote line formatting) in `test_timeline_section_widget.py`. 2. Regenerate only final-presentation snapshots if intended UI changed: - `uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py --snapshot-update -q` 3. Verify runtime shell appearance with no API cost: - `uv run python scripts/dump_timeline_from_events.py --tui-real massgen/tests/frontend/fixtures/synthetic_tui_events.jsonl agent_a` 4. Run full frontend suite before finalizing: - `uv run pytest massgen/tests/frontend -q` ### 3) Snapshot Workflow If snapshot tests mismatch: 1. Open `snapshot_report.html`. 2. Check `Show difference` toggle interpretation: - ON = blend-diff overlay (can look purple/black). - OFF = raw current vs historical snapshots. 3. If change is intentional, regenerate with `--snapshot-update`. 4. Re-run the frontend suite to confirm stability. ### 3.1) Mandatory Screenshot Review For visual/UI tasks, do not rely on test pass/fail alone. You must read screenshots directly before finalizing: 1. Review the snapshot images in `snapshot_report.html` (current vs historical). 2. Keep `Show difference` OFF first to verify raw rendering; then optionally use ON for pixel-level drift. 3. If screenshots are provided in chat/task context, inspect those images directly and compare against expected runtime appearance. 4. If your viewer cannot open `.svg`, render via browser engine: - `npx playwright screenshot "file:///ABS/PATH/to/snapshot.svg" /tmp/snapshot.png` - Batch all (or real-TUI-only): `uv run python scripts/render_snapshot_svgs.py [--real-tui-only]` - Prefer this over ImageMagick conversion for Textual snapshots to avoid false artifacts. 5. Call out any mismatch between rendered snapshots and expected real TUI look, even if tests pass. 6. Only conclude "visual change verified" after explicit screenshot review. ### 4) Optional Live Visual Validation Use live runs only after deterministic checks pass: ```bash # Native terminal TUI uv run massgen --display textual # Browser-hosted Textual uv run massgen --textual-serve ``` ## Key Files - `scripts/dump_timeline_from_events.py`: text replay, `--tui`, and `--tui-real` modes. - `massgen/frontend/displays/textual_terminal_display.py`: `TextualApp`, shell layout, runtime event routing. - `massgen/frontend/displays/tui_event_pipeline.py`: timeline event adapter and filtering logic. - `massgen/frontend/displays/timeline_event_recorder.py`: deterministic text transcript recorder. - `massgen/tests/frontend/test_timeline_snapshot_scaffold.py`: snapshot scaffold (widget + real shell states). - `massgen/tests/frontend/test_timeline_transcript_golden.py`: transcript golden regressions. - `docs/modules/testing.md`: canonical testing commands and parity notes. ## Done Criteria A TUI change is complete when: 1. Relevant deterministic tests were added or updated first. 2. `uv run pytest massgen/tests/frontend -q` passes. 3. Snapshot/golden updates are intentional and reviewed. 4. `--tui-real` replay confirms expected real-shell behavior for the target scenario.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.