[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E37873FKENST3518GCTP2P":3,"skill-same:01M6E37873FKENST3518GCTP2P":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6E37873FKENST3518GCTP2P","tui-render-debug",null,"Diagnose and fix pi-go TUI rendering corruption, especially displaced panels, stale rows, cursor drift, and terminal-specific ANSI incompatibilities.","dimetron\u002Fpi-go","dimetron","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F877433?v=4","01M6E34QX9HKYKMWJVZQEPR2Q3","Dmytro Rashko","01M6E34R2A6563XM0PTZE8KPGG",224,"MIT","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002F.pi-go\u002Fskills\u002Ftui-render-debug\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"debug","tui","render debug","tui render debug","render","terminal","go","diagnose","fix","pi","cursor","stale","drift","ansi","panels","rendering","2026-11-10 10:12:30",false,"---\nname: tui-render-debug\ndescription: Diagnose and fix pi-go TUI rendering corruption, especially displaced panels, stale rows, cursor drift, and terminal-specific ANSI incompatibilities.\n---\n\n# TUI Render Debugging\n\nUse this skill when pi-go's Bubble Tea interface is broken in a terminal: text\nappears in the wrong row or column, the sidebar moves, old frames remain after a\nresize, or a redraw repairs the display.\n\n## Establish the symptom\n\nCapture the exact terminal, `TERM`, `COLORTERM`, `TERMINAL_EMULATOR`, terminal\nsize, and whether a full redraw or switching terminal modes repairs the frame.\nCompare the broken frame with the next clean frame. A clean redraw after a bad\nincremental frame points to renderer cursor state, not necessarily to bad\n`View()` geometry.\n\nFor JetBrains IDE terminals, record `TERMINAL_EMULATOR=JetBrains-JediTerm`.\nJediTerm can report `TERM=xterm-256color` while mishandling cursor-backward-tab\n(`CSI Z`, CBT), which makes Bubble Tea's differential renderer believe the\ncursor is in a different column than the emulator.\n\n## Separate output leaks from renderer drift\n\nThe interactive TUI owns the terminal. Search the active path for direct output:\n\n```bash\nrg -n 'fmt\\.Print|log\\.Print|os\\.(Stdout|Stderr)|slog\\.' internal cmd\n```\n\nRoutine diagnostics must use the session logger. User-facing notices must use\nthe TUI message or notice channel. A subprocess's stdout and stderr must be\ncaptured and surfaced as a tool result. Direct writes can move the cursor, but\nthe absence of leaked stderr does not rule out a renderer incompatibility.\n\n## Build a red-capable repro\n\nUse a PTY with the affected environment and capture stdout and stderr separately.\nCount and inspect control sequences in stdout; stderr should contain only\ndiagnostics expected outside the frame.\n\nFor renderer-level tests, create an `ultraviolet.TerminalRenderer` with the\naffected environment, move from a later column to an earlier column, and assert\nthat unsupported CBT is not emitted. Replay the captured bytes through a\nJediTerm-compatible emulator when available. Also verify ordinary xterm and\ntmux\u002Fscreen environments remain unchanged.\n\n## Fix decisions\n\nKeep frame geometry tests independent: every rendered row must match the\nterminal width, the rail must stay in one display column, and no ANSI escape may\nleak into visible content. Do not solve a terminal capability bug by changing\nlayout constants.\n\nWhen the Bubble Tea dependency has no per-capability switch, isolate a\ncompatibility environment to Bubble Tea's renderer. Preserve the original\nenvironment for subprocesses and use the original environment for color-profile\ndetection. Prefer disabling only the broken capability when the dependency\nsupports it; otherwise use the narrowest compatible renderer profile and add a\ncomment explaining why.\n\n## Verification\n\nRun the focused regression test first, then the full TUI package, race tests for\nthe affected seam, `golangci-lint run .\u002Finternal\u002Ftui\u002F...`, and a build. Re-run\nthe PTY capture and confirm the affected terminal no longer drifts while normal\nterminal output and colors remain intact.\n","# TUI Render Debugging\n\nUse this skill when pi-go's Bubble Tea interface is broken in a terminal: text\nappears in the wrong row or column, the sidebar moves, old frames remain after a\nresize, or a redraw repairs the display.\n\n## Establish the symptom\n\nCapture the exact terminal, `TERM`, `COLORTERM`, `TERMINAL_EMULATOR`, terminal\nsize, and whether a full redraw or switching terminal modes repairs the frame.\nCompare the broken frame with the next clean frame. A clean redraw after a bad\nincremental frame points to renderer cursor state, not necessarily to bad\n`View()` geometry.\n\nFor JetBrains IDE terminals, record `TERMINAL_EMULATOR=JetBrains-JediTerm`.\nJediTerm can report `TERM=xterm-256color` while mishandling cursor-backward-tab\n(`CSI Z`, CBT), which makes Bubble Tea's differential renderer believe the\ncursor is in a different column than the emulator.\n\n## Separate output leaks from renderer drift\n\nThe interactive TUI owns the terminal. Search the active path for direct output:\n\n```bash\nrg -n 'fmt\\.Print|log\\.Print|os\\.(Stdout|Stderr)|slog\\.' internal cmd\n```\n\nRoutine diagnostics must use the session logger. User-facing notices must use\nthe TUI message or notice channel. A subprocess's stdout and stderr must be\ncaptured and surfaced as a tool result. Direct writes can move the cursor, but\nthe absence of leaked stderr does not rule out a renderer incompatibility.\n\n## Build a red-capable repro\n\nUse a PTY with the affected environment and capture stdout and stderr separately.\nCount and inspect control sequences in stdout; stderr should contain only\ndiagnostics expected outside the frame.\n\nFor renderer-level tests, create an `ultraviolet.TerminalRenderer` with the\naffected environment, move from a later column to an earlier column, and assert\nthat unsupported CBT is not emitted. Replay the captured bytes through a\nJediTerm-compatible emulator when available. Also verify ordinary xterm and\ntmux\u002Fscreen environments remain unchanged.\n\n## Fix decisions\n\nKeep frame geometry tests independent: every rendered row must match the\nterminal width, the rail must stay in one display column, and no ANSI escape may\nleak into visible content. Do not solve a terminal capability bug by changing\nlayout constants.\n\nWhen the Bubble Tea dependency has no per-capability switch, isolate a\ncompatibility environment to Bubble Tea's renderer. Preserve the original\nenvironment for subprocesses and use the original environment for color-profile\ndetection. Prefer disabling only the broken capability when the dependency\nsupports it; otherwise use the narrowest compatible renderer profile and add a\ncomment explaining why.\n\n## Verification\n\nRun the focused regression test first, then the full TUI package, race tests for\nthe affected seam, `golangci-lint run .\u002Finternal\u002Ftui\u002F...`, and a build. Re-run\nthe PTY capture and confirm the affected terminal no longer drifts while normal\nterminal output and colors remain intact.\n",{"name":5,"description":7},"main","bcfcd42255878c3d40e545abcdeb2520b6d31a52",".pi-go\u002Fskills\u002Ftui-render-debug",34,"https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go","https:\u002F\u002Fpi-go.sh","https:\u002F\u002Fgithub.com\u002Fdimetron","🎸💻 🚧🦞","2026-11-12 06:53:11",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add dimetron\u002Fpi-go --skill tui-render-debug",{"tool":60,"command":61},"bunx","bunx skills add dimetron\u002Fpi-go --skill tui-render-debug",{"tool":63,"command":64},"pnpm","pnpm dlx skills add dimetron\u002Fpi-go --skill tui-render-debug","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002F.pi-go\u002Fskills\u002Ftui-render-debug\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"_AIWF_IMPORT.json","REFERENCE","参考文档",371,"https:\u002F\u002Fgithub.com\u002FiDorgham\u002FWorkspace-Factory\u002Fblob\u002Fmaster\u002Ffactory\u002Flibrary\u002Fskills\u002Fgithub_imports\u002Fembedding-strategies\u002F_AIWF_IMPORT.json",[75,105,128,147,163,184],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":86,"publishedAt":40},"01M70SJ3216A0Y2NXYJJ2MVER0","verify-session-flow","Formally verify the interactive session flow before or after changing it. Use when editing internal\u002Ftui\u002Ftui.go's handleKey, handleInterruptKey, handleInputSubmit, ctrlCCount or quitting, internal\u002Ftui\u002Fagent_loop.go's enqueuePrompt, submit, steerPrompt, cancelAgent or handleAgentDone, or the deferred-init splash — or when a user reports that Ctrl+C quit on the first press, that Esc did not stop a turn or a goal loop, that a queued prompt was lost when they canceled, or that the TUI hung on a spinner nothing could clear.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-session-flow\u002FSKILL.md",[81],{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,30,104,25],"session","verify session flow","verify","flow","submit","editing","init","use","loop","prompt","when","interactive","reports","first","goal","CTRL","clear","spinner",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":40},"01M70SJ02CTB40V2VFGAF80SBG","verify-run-pipeline","Formally verify the \u002Frun phase machine before or after changing it. Use when editing internal\u002Ftui\u002Frun.go's phase transitions (handleRunAgentDone, runGates result handling, verifyRunComplete, retryRun, reportGateHang, merge), internal\u002Fsop\u002Fverdict.go's Passed, or the checklist refresh — or when a run merged work it should not have, retried a hung gate, lost a cycle at the retry budget, or merged on a stale PASS.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-run-pipeline\u002FSKILL.md",[],[112,113,89,114,115,116,92,117,118,119,94,97,120,121,122,123,124,125,126,127],"pipeline","verify run pipeline","run","run pipeline","retry","cycle","run phase","machine","phase","refresh","work","verdict","transitions","result","merge","sop",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":135,"publishedAt":40},"01M70SHWJV9N3PQWRAMCQE9C2E","verify-history-rewrite","Formally verify the session-history rewrite path before or after changing it. Use when editing internal\u002Fsession\u002Fautocompact.go, internal\u002Fsession\u002Fcompaction*.go, internal\u002Fsession\u002Fstore.go's Compact\u002FClearEvents\u002FrewriteEvents, internal\u002Fagent\u002Fagent.go's Run\u002FRunStreaming\u002FrunPreTurn, or internal\u002Ftui\u002Fcommands.go's clearConversation\u002FclearSessionContext and the context gauge — or when a turn is canceled mid-flight, a tool call and its result get separated, a session's history disappears while the agent is still working, or the model is sent a tool result whose call was compacted away.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-history-rewrite\u002FSKILL.md",[134],{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[136,137,138,89,139,140,92,87,141,142,94,143,97,144,145,125,114,146,30,25],"history","rewrite","verify history rewrite","get","model","tool","call","compact","store","gauge","commands",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":154,"publishedAt":40},"01M70SHSJ5A2XV5SXBXM96RH7P","verify-goal-loop","Formally verify the \u002Fgoal automatic loop before or after changing it. Use when editing internal\u002Ftui\u002Fgoal.go, internal\u002Ftui\u002Fagent_loop.go's handleAgentDone\u002FcancelAgent\u002FsteerPrompt, or internal\u002Ftools\u002Fgoal.go's GoalController — or when a goal loop will not stop, stops one cycle early, closes a goal that is not met, or restarts a goal you finished.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-goal-loop\u002FSKILL.md",[153],{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[95,155,156,89,101,157,92,117,94,97,158,159,30,25,160,161,162],"verify goal loop","verify goal","goal loop","you","automatic","Tools","it","stop",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":170,"publishedAt":40},"01M70SHPYN1AS6D6RJ8HN270RZ","verify-agent-lifecycle","Formally verify the subagent lifecycle before or after changing it. Use when editing internal\u002Fsubagent\u002Forchestrator.go's Spawn, trackAgent, forwardAgentEvents, terminalStatus, Cancel, ShutdownWithTimeout or evictCompletedAgentsLocked, or internal\u002Fsubagent\u002Fpool.go — or when a canceled agent is reported as failed, an agent vanishes from the list with no verdict, the orchestrator panics on a pool release, or an agent can be canceled twice.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-agent-lifecycle\u002FSKILL.md",[169],{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[171,172,173,89,174,92,94,97,175,176,177,178,123,179,180,181,182,30,161,183],"lifecycle","verify agent lifecycle","agent lifecycle","as","cancel","subagent","can","with","orchestrator","spawn","release","list","pool",{"skillNo":185,"name":186,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":193,"publishedAt":40},"01M6E37WZM8ZF36DRYQGZDGP7M","test-new-skill","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Ftui\u002F.pi-go\u002Fskills\u002Ftest-new-skill\u002FSKILL.md",[189,192],{"categoryNo":190,"categoryName":191,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[194,195,196,197],"test","new skill","test new skill","new"]