agentleFS
michaelnealemichaelneale/mesh-llm/skippy/AGENTS.md

mesh-llm / skippy

AGENTS.md3.8k starsChanged 20 days agoApache-2.0View on GitHub

These instructions apply under skippy/ in addition to the root AGENTS.md. Paths and just commands below are relative to the workspace root. Skippy owns standalone inference and native runtimes; it must not depend on Mesh crates or plugin hosts. If a native build fails with CMake Error: ... generator : Ninja / Does not match the generator used previously: Unix Makefiles, the build directory still holds a CMake cache from a build configured with a different generator. That happens when…

We split this AGENTS.md into the rules it gives an agent

23 rules. About 0 are common, 10 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Do not branch on a model-family name or LLM_ARCH_* in shared Skippy stage planning, realization, proof, input ownership, or serving logic …

    line 52
  2. Very specific:

    Put genuinely family-specific graph construction and annotations in that model's implementation and its owning model_support/ patch.

    line 57
  3. Distinctive:

    Before adding a shared-runtime exception, audit the same capability across other families and test the general contract.

    line 59
  4. Distinctive:

    When touching one, replace it with a semantic contract or record the blocker and a migration plan.

    line 64
  5. Very specific:

    Do not reintroduce an external llama-server / rpc-server runtime lane.

    line 77
  6. Very specific:

    If you need to update upstream llama.cpp, use scripts/prepare-llama.sh, scripts/build-llama.sh, scripts/update-llama-pin.sh, and …

    line 78
  7. Distinctive:

    Keep the queue ordered by functional ownership, with unique contiguous patch numbers.

    line 81
  8. Distinctive:

    Before adding a patch, find the existing patch that introduces or owns the affected source, test, or fixture.

    line 85
  9. Distinctive:

    When deliberately changing queue boundaries, recreate the affected series from the pinned upstream and prove that the rebuilt series …

    line 99
  10. Distinctive:

    Treat the public Skippy ABI surface and model lifecycle/loading as distinct patch boundaries.

    line 105
  11. Distinctive:

    Treat the patched Skippy C ABI as a set of capability-owned modules, not as one implementation file.

    line 112
  12. Very specific:

    Keep include/skippy.h as an umbrella header only.

    line 115
  13. Very specific:

    Keep capability implementations in src/skippy/<capability>.cpp.

    line 119
  14. Very specific:

    Put new behavior in its owning module.

    line 122
  15. Very specific:

    Use snake_case filenames and preserve the skippy_ prefix for exported C symbols.

    line 126
  16. Distinctive:

    Keep new implementation files below 1,000 lines.

    line 128
  17. Very specific:

    Treat Doxygen-style comments in include/skippy.h and include/skippy/*.h as the source of truth for the public native API reference.

    line 140
  18. Distinctive:

    After changing a public Skippy header or exported function, prepare the patched native checkout and regenerate the website page:

    line 144
  19. Very specific:

    Commit the regenerated mesh/website/src/docs/pages/skippy-api.md with the native queue change.

    line 153
  20. Very specific:

    When changing the staged-runtime ABI in the patch queue, bump SKIPPY_ABI_VERSION_PATCH (or MINOR/MAJOR) in skippy/common.h AND keep the …

    line 218
  21. Distinctive:

    Treat the staged-runtime ABI the same as the mesh wire protocol: additive changes preferred, breaking changes need explicit acknowledgement.

    line 220
  22. Very specific:

    If skippy-ffi ABI constants change, run cargo test -p skippy-ffi --lib and cargo test -p skippy-runtime --lib in addition to the …

    line 224
  23. Very specific:

    Do not reintroduce an external llama-server or rpc-server runtime lane.

    line 228

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Skippy Agent Notes

These instructions apply under skippy/ in addition to the root AGENTS.md. Paths and just commands below are relative to the workspace root. Skippy owns standalone inference and native runtimes; it must not depend on Mesh crates or plugin hosts.

Key docs

DocWhat it covers
skippy/docs/ARCHITECTURE.mdCurrent product and API boundaries
skippy/docs/SKIPPY.mdHistorical Mesh integration plan
skippy/docs/SKIPPY_SPLITS.mdRunning large models with split serving
skippy/docs/LAYER_PACKAGE_REPOS.mdLayer-package publishing
skippy/docs/design/LLAMA_STAGE_INTEGRATION_PLAN.mdllama.cpp staged-runtime plan and patch-queue background

Building and native runtimes

  • just skippy builds the standalone skippy CLI and one locally packaged native runtime; it does not build MeshLLM. The CLI discovers target/debug/native-runtimes beside the executable automatically. Use --runtime-bundle only to select a different bundle explicitly.
  • just skippy-cli-build builds only the debug CLI. just skippy-cli-release-build builds only the release CLI. Those commands do not package a runtime.
  • just skippy-release builds the release CLI and selected native runtime without MeshLLM. just release-runtime-build <backend> builds one packageable native runtime under dist/native-runtimes/.
  • just release-build builds Skippy before MeshLLM. Release CI publishes one backend-neutral Skippy CLI archive per platform and native runtimes per backend. Static backend linkage is not a release or packaging lane.
  • For branch-local Skippy ABI, llama.cpp patch, MAS hidden-state, or native tensor changes, use the local packaged runtime; do not test new ABI symbols against a downloaded release runtime.

llama.cpp "generator does not match" error

If a native build fails with CMake Error: ... generator : Ninja / Does not match the generator used previously: Unix Makefiles, the build directory still holds a CMake cache from a build configured with a different generator. That happens when ninja appears on or leaves PATH between builds, because scripts/build-llama.sh picks the generator from PATH at configure time. The script detects the mismatch and clears the stale .deps/llama-build/... directory by itself before reconfiguring. On a checkout that predates the guard, remove the build directory named in the error and rebuild.

See CONTRIBUTING.md for full dev workflow.

llama.cpp ABI Patch Queue

Live graph stage realization

Ordinary model builders supply the graph at the actual runtime shape; the generic partitioner validates and realizes the admitted stage. Context graph reuse remains guarded by its normal input and computation-generation checks. Extracted stage programs, geometry recipes, installation, replay, and the experimental selector have been deleted. Do not restore a compatibility path. See the cutover qualification ledger. Certify independent builds at multiple shapes, numerical parity, persistent state, and every MTP head. Never weaken frontier/dependency equality or skip live contracts because a retired replay implementation is absent.

Graph state and cache representation are runtime facts, not operator settings. Derive complete cache capabilities from the loaded context's reserved/live graphs and native memory exporters. Do not restore config fields, environment overrides, family-name selection rules, or handmade smoke admission labels. Serving smoke tests should start the normal skippy serve --model-path path; split tests should consume planner-produced contracts.

No model-family special cases in shared Skippy machinery

  • Do not branch on a model-family name or LLM_ARCH_* in shared Skippy stage planning, realization, proof, input ownership, or serving logic to make a family pass. This is a hard rule for new code and repairs.
  • Express a difference through the graph, an explicit capability or input contract, or runtime metadata supplied by the owning model builder. Put genuinely family-specific graph construction and annotations in that model's implementation and its owning model_support/ patch.
  • Before adding a shared-runtime exception, audit the same capability across other families and test the general contract. If the capability cannot yet be expressed generally, report the gap instead of adding an architecture allowlist or a family-named fallback.
  • Existing family checks in shared Skippy paths are audit debt, not precedent. When touching one, replace it with a semantic contract or record the blocker and a migration plan; do not copy the pattern into another path.

mesh-llm embeds the stage runtime and links patched llama.cpp static ABI libraries. The only durable llama.cpp patch queue is skippy/llama_cpp/patches, pinned by skippy/llama_cpp/upstream.txt.

  • just build packages the selected native runtime and builds the standalone Skippy CLI, then builds the UI and dynamic MeshLLM host. The hosts never link a backend library.
  • Static llama.cpp compilation is the explicitly named native-runtime primitive (just release-runtime-build / scripts/package-native-runtime.sh --build), used when changing the Skippy ABI or patch queue. It is not a host build path.
  • Do not reintroduce an external llama-server / rpc-server runtime lane.
  • If you need to update upstream llama.cpp, use scripts/prepare-llama.sh, scripts/build-llama.sh, scripts/update-llama-pin.sh, and scripts/summarize-llama-upstream.sh.
  • Keep the queue ordered by functional ownership, with unique contiguous patch numbers. A source-layout change must be folded into the patches that own the affected capabilities; do not append a terminal "split", "move", or "cleanup" patch that reorganizes code introduced by earlier patches.
  • Before adding a patch, find the existing patch that introduces or owns the affected source, test, or fixture. Prefer updating that patch for fixes and extensions of its capability, including test-only changes. Rework any later patches that depend on it, update queue metadata, and validate a cold replay from the pinned upstream. Add a new patch only for a genuinely separate capability without an existing owner; explain that boundary in the change.
  • Apply the queue in three lanes: numbered core patches directly under patches/, numbered family-enablement patches listed by patches/model_support/series, then generated graph-semantics shards listed by patches/generated/series. Numbering is contiguous within each lane.
  • New model-family implementations and their family-specific conversion, template, multimodal, runtime, and tests belong in one focused model_support/ patch. Keep reusable Skippy machinery in the core lane and mechanically generated graph annotations in the generated lane.
  • When deliberately changing queue boundaries, recreate the affected series from the pinned upstream and prove that the rebuilt series produces the intended final tree. Once a capability has an owning module, every patch in the recreated series must edit that module directly rather than introducing code in an obsolete monolith and moving it later.
  • Treat the public Skippy ABI surface and model lifecycle/loading as distinct patch boundaries. Public declarations may precede their implementation, but a patch should not combine ABI definition with independently reviewable model loading or package behavior.

Skippy Native Source Layout

Treat the patched Skippy C ABI as a set of capability-owned modules, not as one implementation file.

  • Keep include/skippy.h as an umbrella header only. Public declarations belong in standalone C-compatible headers under include/skippy/, named for their capability: for example sampling.h, speculative_decoding.h, state.h, and model_package.h.
  • Keep capability implementations in src/skippy/<capability>.cpp. Private C++ declarations belong beside them in narrowly named headers under src/skippy/; they are not part of the installed ABI.
  • Put new behavior in its owning module. src/skippy.cpp is retired; do not recreate it. Runtime lifecycle, sessions, activation framing, execution, verification, sampling, state, tokenization, and model packaging each belong to their existing capability-owned source files.
  • Use snake_case filenames and preserve the skippy_ prefix for exported C symbols. Avoid generic helpers, utils, or expanded common buckets.
  • Keep new implementation files below 1,000 lines. If a capability approaches that size, split it by a narrower responsibility before adding more code.
  • Public headers must compile independently as C11 and C++17 headers. Declare each implementation source explicitly in CMake and install the complete include/skippy/ header tree.
  • Source include compatibility is not assumed. Do not add forwarding headers for retired paths unless a task explicitly requires them. Binary ABI changes still require the normal Skippy ABI version bump and synchronized Rust FFI constants.

Skippy native API documentation

  • Treat Doxygen-style comments in include/skippy.h and include/skippy/*.h as the source of truth for the public native API reference. Document every public header and exported skippy_* function beside its declaration with an @brief describing the capability it owns.
  • After changing a public Skippy header or exported function, prepare the patched native checkout and regenerate the website page:

    scripts/prepare-llama.sh pinned
    cargo xtool automation native-generator contracts api-doc
    cargo xtool automation native-generator contracts api-doc --check
  • Commit the regenerated mesh/website/src/docs/pages/skippy-api.md with the native queue change. Do not hand-edit the generated page or let a native API PR merge without updating the website reference.

Workspace Crates

Product crates live under skippy/crates/. The most important crates:

  • skippy-cli/ — standalone skippy command.

Shared foundations:

  • skippy-guardrails/ — guardrail and compaction primitives for OpenAI-compatible paths.
  • skippy-hardware-profile/, skippy-native-runtime/, skippy-runtime-install/ — hardware profile detection, native runtime manifest/selection, runtime download/install/cache.

OpenAI-compatible API:

  • skippy-inference-api/ — OpenAI-compatible HTTP frontend (chat, completions, responses, models).

Models:

  • skippy-model-artifact/, skippy-model-hf/, skippy-model-package/, skippy-model-ref/, skippy-model-resolver/ — model catalog, HuggingFace download, packaging, reference resolution.

Embedded staged runtime (skippy):

  • skippy-ffi/ — Rust ABI bindings to the patched llama.cpp staged runtime.
  • skippy-runtime/ — Rust-side staged runtime, package materialization, model info.
  • skippy-serving/ — embedded staged-runtime serving (frontend, binary transport, runtime state, embedded HTTP).
  • skippy-protocol/, skippy-topology/, skippy-coordinator/, skippy-cache/, skippy-metrics/, skippy-correctness/, skippy-package-builder/ — supporting skippy infrastructure.

Tools and benchmarks:

  • metrics-server/ — standalone metrics collector binary.
  • skippy-gpu-bench/, llama-spec-bench/ — benchmarking binaries.

This list covers the crates you are most likely to touch; check skippy/crates/ and each crate's Cargo.toml description for anything not listed.

Other product directories:

  • skippy/docs/design/ — Skippy architecture and native-runtime plans.
  • skippy/docs/ — family certification, configuration, benchmarks, parity, and split serving.
  • skippy/evals/ — Skippy benchmarking and evaluation scripts.
  • skippy/scripts/tools/, skippy/scripts/recipes/ — Clang rewriter and quantization recipes.
  • skippy/scripts/tests/ — product-owned script tests.
  • skippy/llama_cpp/patches/ — durable llama.cpp patch queue, pinned by skippy/llama_cpp/upstream.txt.

Key Source Files

Embedded staged runtime (skippy/crates/skippy-*):

  • skippy-ffi/src/lib.rs — Rust ABI mirror of the patched llama.cpp staged runtime; ABI_VERSION_* constants must stay in sync with skippy/common.h in the patch queue.
  • skippy-runtime/src/package.rs — layer-package materialization, identity-bound cache.
  • skippy-runtime/src/devices.rs — backend device enumeration.
  • skippy-serving/src/frontend.rs, skippy-serving/src/frontend/ — embedded chat/generation frontend.
  • skippy-serving/src/runtime_state.rs — KV-slot, lane, session state machine.
  • skippy-serving/src/binary_transport.rs, binary_transport/ — binary transport to embedded server.

OpenAI-compatible HTTP frontend (skippy/crates/skippy-inference-api/src/):

  • router.rs, chat.rs, completions.rs, responses.rs, models.rs, sse.rs, backend.rs — OpenAI surface.

Skippy ABI Compatibility

The patched llama.cpp staged runtime has its own ABI version, tracked in skippy/common.h (inside the patch queue) and mirrored by SKIPPY_ABI_VERSION_* constants in skippy/crates/skippy-ffi/src/lib.rs.

  • When changing the staged-runtime ABI in the patch queue, bump SKIPPY_ABI_VERSION_PATCH (or MINOR/MAJOR) in skippy/common.h AND keep the Rust constants in skippy-ffi/src/lib.rs in sync in the same change.
  • skippy-runtime consumes the ABI version for package loading and feature probing; an out-of-sync mirror will silently advertise the wrong version.
  • Treat the staged-runtime ABI the same as the mesh wire protocol: additive changes preferred, breaking changes need explicit acknowledgement.

ABI validation

If skippy-ffi ABI constants change, run cargo test -p skippy-ffi --lib and cargo test -p skippy-runtime --lib in addition to the workspace's normal checks. Do not stop at a build-only validation.

What NOT to add

Do not reintroduce an external llama-server or rpc-server runtime lane. The embedded staged runtime via patched llama.cpp is the supported path.

Download now (ZIP)

Trending

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about michaelneale/mesh-llm

The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 18

Talked about on GitHub, Bluesky and Hacker News (18 times).

On GitHub · 15

10 more on GitHub

On Hacker News · 1

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.