Files
alkane-os/vendor/zerocopy/AGENTS.md
T
x ad31cfbafa Vendor flare-ui v0.2.9 and prove the schema-driven UI in an image
Spike, not the final UI: it answers whether flare-ui can drive Alkane OS's
on-box pages, and what it costs.

What works:

- schema/alkane-bb.json authors the sidebar as data (3 sections, 14 tabs);
- src/bin/ui-spike.rs renders it through flare_ui::nav + flare_ui::shell, so
  the unified sidebar, ordering and surface filtering come from the schema
  rather than from hand-written HTML;
- the render uses the shared bf- design tokens, the same ones the rest of the
  suite uses.

Size, measured rather than assumed (armv7, release, stripped):

  ui-baseline   323 KiB   (maud + serde_json, no flare-ui)
  ui-spike      771 KiB   (flare-ui + wschema + sha2)
  marginal      448 KiB

Vendoring: third-party/flare-ui is the full v0.2.9 tree pinned in
flare-ui/flare-ui.lock (a partial archive does not compile, since the crate
include_str!s assets from dash-editor/). vendor/ is re-generated as a cargo
directory source with the new registry dependencies (maud, sha2, typenum,
digest, generic-array, block-buffer, crypto-common, cfg-if, etc.) so the build
still works offline. third-party/README.md records how to re-pin.
2026-11-04 14:06:25 -06:00

3.0 KiB

Instructions for AI Agents

These instructions apply to work in the zerocopy/ subtree.

Standing Rules

  • Cargo: For zerocopy crate build, test, and lint commands, never run cargo directly. Use ./cargo.sh. Repository tools outside this crate may have their own invocation commands. See the toolchain reference for toolchain selection and version gating.

  • README generation: Do not edit README.md directly. It is generated from the top-level documentation in src/lib.rs. Regenerate it with:

    (cd .. && cargo -q run --manifest-path tools/Cargo.toml \
      -p generate-readme) > README.md
    
  • TODOs: Do not use TODO unless you intend to block the PR; CI rejects TODO. Use FIXME for non-blocking follow-up work.
  • Documentation: Keep documentation and instruction references synchronized when moving, renaming, or changing the behavior of referenced code or files.

  • File headers: New files must use the repository copyright header with the file's creation year. Preserve an existing file's original creation year.

  • Formatting: Follow ci/check_fmt.sh.

  • Comments and Markdown: Wrap prose at 80 columns from the left margin when practical, including the comment prefix. Do not wrap tables, diagrams, long URLs, code blocks, or other content when wrapping would impair readability. In Markdown, indent wrapped bullet continuation lines by two spaces and put a blank line after each section heading.

  • Derived traits in tests: For traits whose documentation requires derive-only implementation, test fixture types MUST use Zerocopy's derives. Do not bypass a derive rejection with a manual implementation; instead, test the lower-level internal primitive or extend the derive. Generated derive-output snapshots and crate-owned built-in implementations are exempt.

Task-Specific Skills

Use the applicable skills in addition to these standing rules. Skills compose; when more than one applies, use all of them.

  • For authoring, modifying, building, testing, or validating zerocopy code, use the zerocopy-development skill.
  • For reviewing zerocopy changes, use the zerocopy-review skill.
  • For unsafe Rust, unsafe APIs or traits, raw pointers, FFI, layout or validity reasoning, safety comments or # Safety documentation, soundness analysis, or invariant-bearing abstractions, use the unsafe-rust skill. That skill is the source of truth for unsafe-code authoring and review methodology.