[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78FHBJ1KXFF734GFE509TBJ":3,"skill-same:01M78FHBJ1KXFF734GFE509TBJ":47},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M78FHBJ1KXFF734GFE509TBJ","tui-editor-engine",null,"Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.","poppyTM\u002Foride","poppyTM","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F339400917?v=4","01M78F6YNKFR5S5JQR27X9F09Z","Poppy Team","01M78F6YP8ZZTRES9X8Q2ZAD21",1,"MIT","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tui-editor-engine\ndescription: Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.\n---\n\n# TUI Editor Engine\n\n## Purpose\n\nKeep the editor core correct and testable without a terminal. Everything here\nlives behind `internal\u002Fbuffer` and `internal\u002Feditor`; nothing in this skill\nrequires a TTY.\n\n## Index semantics — the rule that prevents silent corruption\n\nA text buffer has at least four notions of \"position\", and confusing them is the\nsingle most expensive class of bug in an editor.\n\n- **Byte offset** is the canonical internal index.\n- **Rune (scalar) offset** is what a \"column\" means to a caret.\n- **Grapheme cluster** is what a user perceives as one character.\n- **Visual column** accounts for tab width and wide characters.\n\nEvery conversion between them lives in `internal\u002Fbuffer`. No caller converts on\nits own, and no caller reaches into another package's arithmetic. The Rust\nimplementation got this from `ropey` for free; Go does not, so it is explicit\nhere and covered by property tests.\n\nTest cases must include: combining marks, emoji with modifiers, CJK wide\ncharacters, RTL text, a BOM, CRLF line endings, and a lone surrogate in a\nmalformed file.\n\n## Transaction-first editing\n\nAgent patches, user keystrokes, LSP code actions and undo\u002Fredo converge on the\nsame operation: a transaction with a recorded inverse. This is what makes a\ndiff, a conflict check and a replay possible without special cases.\n\n- An edit is applied and its inverse is recorded in the same step.\n- A group of edits is one undo step and carries the selection it produced.\n- Nothing mutates the buffer outside a transaction.\n\n## Undo grouping\n\nA group closes on an explicit boundary, never on a heuristic timer.\n\n| Boundary | Why |\n|---|---|\n| Newline | Every editor breaks the group on Enter; users expect it |\n| Cursor movement | Typing, moving, typing again are two thoughts |\n| Save | The saved state is a checkpoint |\n| Focus change | A different context is a different edit |\n| Explicit call | Paste and programmatic edits are one step |\n\nThe Rust implementation closed the group on movement but not on newline, so\n`Ctrl+Z` after `abc` + Enter + `xyz` erased all three. That is ledger item B1.\n\n## Undo and redo restore position\n\nUndo and redo restore the selection the group produced — not a clamped version\nof wherever the cursor happened to be. Redo of an insertion puts the cursor after\nthe inserted text. Ledger items B2–B4 cover the Rust behaviour here, including\nextra carets left pointing past the end of a shrunken buffer.\n\n## Multi-cursor invariants\n\n- Carets are kept sorted and deduplicated.\n- Edits apply from the highest offset down, so a prior edit never invalidates a\n  later offset.\n- Any operation that shrinks the buffer re-validates every caret.\n- A selection and extra carets are mutually exclusive as an edit target: either\n  the selection is replaced, or every caret inserts.\n\n## Large files\n\nDecide by capability, not by hope:\n\n- Binary detection before decoding — refuse rather than corrupt.\n- Line-indexed access so the viewport never walks the whole file.\n- Syntax, diagnostics and search bounded to what is visible or requested.\n- Search incremental, never a full-document regex scan on a 100 MB file.\n- The statusline says when a mode is degraded, instead of silently dropping\n  features.\n\n## Verification\n\n- Property tests over random edit sequences: apply, undo everything, and the\n  buffer equals the original byte for byte.\n- Conformance cases compare the buffer, carets, selection and undo labels\n  against the Rust oracle.\n","# TUI Editor Engine\n\n## Purpose\n\nKeep the editor core correct and testable without a terminal. Everything here\nlives behind `internal\u002Fbuffer` and `internal\u002Feditor`; nothing in this skill\nrequires a TTY.\n\n## Index semantics — the rule that prevents silent corruption\n\nA text buffer has at least four notions of \"position\", and confusing them is the\nsingle most expensive class of bug in an editor.\n\n- **Byte offset** is the canonical internal index.\n- **Rune (scalar) offset** is what a \"column\" means to a caret.\n- **Grapheme cluster** is what a user perceives as one character.\n- **Visual column** accounts for tab width and wide characters.\n\nEvery conversion between them lives in `internal\u002Fbuffer`. No caller converts on\nits own, and no caller reaches into another package's arithmetic. The Rust\nimplementation got this from `ropey` for free; Go does not, so it is explicit\nhere and covered by property tests.\n\nTest cases must include: combining marks, emoji with modifiers, CJK wide\ncharacters, RTL text, a BOM, CRLF line endings, and a lone surrogate in a\nmalformed file.\n\n## Transaction-first editing\n\nAgent patches, user keystrokes, LSP code actions and undo\u002Fredo converge on the\nsame operation: a transaction with a recorded inverse. This is what makes a\ndiff, a conflict check and a replay possible without special cases.\n\n- An edit is applied and its inverse is recorded in the same step.\n- A group of edits is one undo step and carries the selection it produced.\n- Nothing mutates the buffer outside a transaction.\n\n## Undo grouping\n\nA group closes on an explicit boundary, never on a heuristic timer.\n\n| Boundary | Why |\n|---|---|\n| Newline | Every editor breaks the group on Enter; users expect it |\n| Cursor movement | Typing, moving, typing again are two thoughts |\n| Save | The saved state is a checkpoint |\n| Focus change | A different context is a different edit |\n| Explicit call | Paste and programmatic edits are one step |\n\nThe Rust implementation closed the group on movement but not on newline, so\n`Ctrl+Z` after `abc` + Enter + `xyz` erased all three. That is ledger item B1.\n\n## Undo and redo restore position\n\nUndo and redo restore the selection the group produced — not a clamped version\nof wherever the cursor happened to be. Redo of an insertion puts the cursor after\nthe inserted text. Ledger items B2–B4 cover the Rust behaviour here, including\nextra carets left pointing past the end of a shrunken buffer.\n\n## Multi-cursor invariants\n\n- Carets are kept sorted and deduplicated.\n- Edits apply from the highest offset down, so a prior edit never invalidates a\n  later offset.\n- Any operation that shrinks the buffer re-validates every caret.\n- A selection and extra carets are mutually exclusive as an edit target: either\n  the selection is replaced, or every caret inserts.\n\n## Large files\n\nDecide by capability, not by hope:\n\n- Binary detection before decoding — refuse rather than corrupt.\n- Line-indexed access so the viewport never walks the whole file.\n- Syntax, diagnostics and search bounded to what is visible or requested.\n- Search incremental, never a full-document regex scan on a 100 MB file.\n- The statusline says when a mode is degraded, instead of silently dropping\n  features.\n\n## Verification\n\n- Property tests over random edit sequences: apply, undo everything, and the\n  buffer equals the original byte for byte.\n- Conformance cases compare the buffer, carets, selection and undo labels\n  against the Rust oracle.\n",{"name":5,"description":7},"main","1cd515630b8ceb57777d466bee4970fe7c2e30e0",".ai\u002Fskills\u002Ftui-editor-engine",0,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride","https:\u002F\u002Fgithub.com\u002FpoppyTM","https:\u002F\u002Fpoppy.lat","Construímos linguagens de programação e ferramentas para quem lê código com o mesmo cuidado com que escreve.","2026-09-30 10:15:52",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add poppyTM\u002Foride --skill tui-editor-engine",{"tool":39,"command":40},"bunx","bunx skills add poppyTM\u002Foride --skill tui-editor-engine",{"tool":42,"command":43},"pnpm","pnpm dlx skills add poppyTM\u002Foride --skill tui-editor-engine","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",true,[],[48,54,60,67,74,80],{"skillNo":49,"name":50,"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":51,"categories":52,"keywords":53,"publishedAt":19},"01M78FHQN254KEH0DETXT5JM29","zoom-reflow","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fzoom-reflow\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"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":57,"categories":58,"keywords":59,"publishedAt":19},"01M78FHP1880S695V8GQEE0RXK","wireframe-styleguide","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwireframe-styleguide\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M78FHHYM6AN2H819FABW01DZ","visual-regression","Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M78FHE53D8DD0QVRY5C37DA4","ui-implementation","Component-driven UI implementation, multi-state matrix (default, hover, focus-visible, active, disabled, loading, empty, error), DTCG design tokens, responsive layout contracts, and accessibility tree mapping.","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fui-implementation\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"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":77,"categories":78,"keywords":79,"publishedAt":19},"01M78FH9X6CPJX1H61ZDWTTVW8","tree-sitter-context-indexing","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftree-sitter-context-indexing\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M78FH7WHGHAGJAJMZ04DKPHE","threat-modeling","STRIDE methodology, trust boundaries, abuse cases, attack surface mapping","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fthreat-modeling\u002FSKILL.md",[],[]]