{"owner":"anomalyco","repo":"opentui","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# OpenTUI Agent Guide\n\n## Engineering\n\n- Reuse existing seams; do not duplicate policy, ownership, or state across TypeScript, Zig, and framework layers.\n- For bug fixes, first add a focused regression test of observable behavior or invariants. If automation is impossible,\n  record the evidence and remaining manual verification; do not substitute contract sketches or guesses.\n- Make native ownership explicit; clean up handles, callbacks, buffers, and listeners on every exit path. Bound\n  input-driven work and test lifecycle failures.\n- Do not interchange byte lengths, code points, graphemes, and terminal display-cell widths.\n- `oxfmt` is the formatting source of truth (`semi: false`, `printWidth: 120`); avoid unrelated formatting churn.\n\n## Tooling And Runtimes\n\n- Use Bun for dependency management and development commands: `bun install`, `bun run <script>`, `bun test`, and `bun <file>`.\n- Run package scripts from the package directory unless the script is defined at the repository root.\n- Shared runtime code must preserve the supported Bun and Node paths. Keep runtime-specific behavior behind existing\n  platform/runtime/build seams; do not introduce Bun-only APIs into shared modules. Node checks use the version enforced\n  by `scripts/node26.mjs`.\n\n## Verification\n\n- Run the narrowest relevant test first, then the affected package suite.\n- Ordinary TypeScript source changes do not require the root build. Use the affected package's `test`, `typecheck`,\n  `build`, or validation scripts as applicable.\n- Run `bun run build` from the repository root after native or cross-package build/output changes, or when tests report\n  a missing/stale native artifact. It does not build web or examples; use their package scripts.\n- For native changes, run `bun run test:native` from `packages/core`. Filter with `bun run test:native -Dtest-filter=\"test name\"` while iterating.\n- For runtime, FFI, build, or export changes, run the relevant Node and packed-distribution scripts from that package\n  (such as `test:js:node` or `test:dist`) when present.\n- Use root `bun run fmt:check` and `bun run lint` for final static checks when relevant.\n\nPrefer tests and `TestRenderer` for automated debugging. For interactive behavior, load the `terminal-control` skill and\nuse its terminal tool to run, drive, and inspect the app; repository examples bind backtick to\n`renderer.console.toggle()` for captured `console.log` output. Ask for a user-run reproduction only when the required\nterminal or platform is unavailable locally.\n\n## Portable FFI\n\n- Portable symbol signatures must stay within the `node:ffi`/`bun:ffi` intersection. Use explicit widths such as\n  `u32`/`u64`, not backend-only ABI names such as `usize`, `napi_env`, or `napi_value`; represent `i64`/`u64` as `bigint`,\n  native booleans as `0`/`1`, and shared pointers as `number | bigint`.\n- Pass transient `ArrayBuffer` values or views directly to synchronous pointer parameters so the backend borrows the\n  owner. Do not pre-resolve them with `ptr()`.\n- Use `ptr(view)` only for addresses stored in structs or retained by native code, and keep the backing buffer alive for\n  the complete native lifetime.\n- Model C-string inputs as pointer parameters and pass owned, NUL-terminated byte buffers directly; string returns are\n  not portable. Create callbacks through the loaded library/platform facade, not `new JSCallback(...)`, and assume only\n  same-thread callbacks.\n"},"files":{"AGENTS.md":"# OpenTUI Agent Guide\n\n## Engineering\n\n- Reuse existing seams; do not duplicate policy, ownership, or state across TypeScript, Zig, and framework layers.\n- For bug fixes, first add a focused regression test of observable behavior or invariants. If automation is impossible,\n  record the evidence and remaining manual verification; do not substitute contract sketches or guesses.\n- Make native ownership explicit; clean up handles, callbacks, buffers, and listeners on every exit path. Bound\n  input-driven work and test lifecycle failures.\n- Do not interchange byte lengths, code points, graphemes, and terminal display-cell widths.\n- `oxfmt` is the formatting source of truth (`semi: false`, `printWidth: 120`); avoid unrelated formatting churn.\n\n## Tooling And Runtimes\n\n- Use Bun for dependency management and development commands: `bun install`, `bun run <script>`, `bun test`, and `bun <file>`.\n- Run package scripts from the package directory unless the script is defined at the repository root.\n- Shared runtime code must preserve the supported Bun and Node paths. Keep runtime-specific behavior behind existing\n  platform/runtime/build seams; do not introduce Bun-only APIs into shared modules. Node checks use the version enforced\n  by `scripts/node26.mjs`.\n\n## Verification\n\n- Run the narrowest relevant test first, then the affected package suite.\n- Ordinary TypeScript source changes do not require the root build. Use the affected package's `test`, `typecheck`,\n  `build`, or validation scripts as applicable.\n- Run `bun run build` from the repository root after native or cross-package build/output changes, or when tests report\n  a missing/stale native artifact. It does not build web or examples; use their package scripts.\n- For native changes, run `bun run test:native` from `packages/core`. Filter with `bun run test:native -Dtest-filter=\"test name\"` while iterating.\n- For runtime, FFI, build, or export changes, run the relevant Node and packed-distribution scripts from that package\n  (such as `test:js:node` or `test:dist`) when present.\n- Use root `bun run fmt:check` and `bun run lint` for final static checks when relevant.\n\nPrefer tests and `TestRenderer` for automated debugging. For interactive behavior, load the `terminal-control` skill and\nuse its terminal tool to run, drive, and inspect the app; repository examples bind backtick to\n`renderer.console.toggle()` for captured `console.log` output. Ask for a user-run reproduction only when the required\nterminal or platform is unavailable locally.\n\n## Portable FFI\n\n- Portable symbol signatures must stay within the `node:ffi`/`bun:ffi` intersection. Use explicit widths such as\n  `u32`/`u64`, not backend-only ABI names such as `usize`, `napi_env`, or `napi_value`; represent `i64`/`u64` as `bigint`,\n  native booleans as `0`/`1`, and shared pointers as `number | bigint`.\n- Pass transient `ArrayBuffer` values or views directly to synchronous pointer parameters so the backend borrows the\n  owner. Do not pre-resolve them with `ptr()`.\n- Use `ptr(view)` only for addresses stored in structs or retained by native code, and keep the backing buffer alive for\n  the complete native lifetime.\n- Model C-string inputs as pointer parameters and pass owned, NUL-terminated byte buffers directly; string returns are\n  not portable. Create callbacks through the loaded library/platform facade, not `new JSCallback(...)`, and assume only\n  same-thread callbacks.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# OpenTUI Agent Guide\n\n## Engineering\n\n- Reuse existing seams; do not duplicate policy, ownership, or state across TypeScript, Zig, and framework layers.\n- For bug fixes, first add a focused regression test of observable behavior or invariants. If automation is impossible,\n  record the evidence and remaining manual verification; do not substitute contract sketches or guesses.\n- Make native ownership explicit; clean up handles, callbacks, buffers, and listeners on every exit path. Bound\n  input-driven work and test lifecycle failures.\n- Do not interchange byte lengths, code points, graphemes, and terminal display-cell widths.\n- `oxfmt` is the formatting source of truth (`semi: false`, `printWidth: 120`); avoid unrelated formatting churn.\n\n## Tooling And Runtimes\n\n- Use Bun for dependency management and development commands: `bun install`, `bun run <script>`, `bun test`, and `bun <file>`.\n- Run package scripts from the package directory unless the script is defined at the repository root.\n- Shared runtime code must preserve the supported Bun and Node paths. Keep runtime-specific behavior behind existing\n  platform/runtime/build seams; do not introduce Bun-only APIs into shared modules. Node checks use the version enforced\n  by `scripts/node26.mjs`.\n\n## Verification\n\n- Run the narrowest relevant test first, then the affected package suite.\n- Ordinary TypeScript source changes do not require the root build. Use the affected package's `test`, `typecheck`,\n  `build`, or validation scripts as applicable.\n- Run `bun run build` from the repository root after native or cross-package build/output changes, or when tests report\n  a missing/stale native artifact. It does not build web or examples; use their package scripts.\n- For native changes, run `bun run test:native` from `packages/core`. Filter with `bun run test:native -Dtest-filter=\"test name\"` while iterating.\n- For runtime, FFI, build, or export changes, run the relevant Node and packed-distribution scripts from that package\n  (such as `test:js:node` or `test:dist`) when present.\n- Use root `bun run fmt:check` and `bun run lint` for final static checks when relevant.\n\nPrefer tests and `TestRenderer` for automated debugging. For interactive behavior, load the `terminal-control` skill and\nuse its terminal tool to run, drive, and inspect the app; repository examples bind backtick to\n`renderer.console.toggle()` for captured `console.log` output. Ask for a user-run reproduction only when the required\nterminal or platform is unavailable locally.\n\n## Portable FFI\n\n- Portable symbol signatures must stay within the `node:ffi`/`bun:ffi` intersection. Use explicit widths such as\n  `u32`/`u64`, not backend-only ABI names such as `usize`, `napi_env`, or `napi_value`; represent `i64`/`u64` as `bigint`,\n  native booleans as `0`/`1`, and shared pointers as `number | bigint`.\n- Pass transient `ArrayBuffer` values or views directly to synchronous pointer parameters so the backend borrows the\n  owner. Do not pre-resolve them with `ptr()`.\n- Use `ptr(view)` only for addresses stored in structs or retained by native code, and keep the backing buffer alive for\n  the complete native lifetime.\n- Model C-string inputs as pointer parameters and pass owned, NUL-terminated byte buffers directly; string returns are\n  not portable. Create callbacks through the loaded library/platform facade, not `new JSCallback(...)`, and assume only\n  same-thread callbacks.\n","category":"root","tokens":860}]}