docs: add AI agent / LLM reference (docs/llms.md)#26
Merged
Conversation
Introduce docs/llms.md, a single-file machine-first reference written for AI coding agents that consume MPath: the complete public API surface, capabilities, usage recipes, and the disposal/thread-safety/lifecycle rules that cause bugs — so an agent can write correct MPath code without reading the whole docs tree. Wire it for discoverability and constant upkeep: - link it from docs/README.md and the README documentation section - add a "Maintenance contract" to the doc and a matching rule in CLAUDE.md so any public API change must update docs/llms.md in the same change Docs-only change. Verified: solution builds clean; all 115 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Refocus docs/llms.md on agents that USE the library, and move the maintainer-oriented content into CLAUDE.md (which already serves agents editing this repo): - drop the "Where things live (for agents editing this repo)" section - move the full maintenance contract into CLAUDE.md, leaving llms.md with a one-line currency note - replace the exhaustive per-type member dump with a compact type map that links to docs/api/, so a new type adds one row instead of a block Net: 365 -> 301 lines, and the part that scales with the API is now one row per type rather than duplicated signatures that would drift from docs/api/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Introduces
docs/llms.md— a new documentation type written for AI coding agents that use MPath in their own projects. It front-loads everything an agent needs to write correct code on the first try:Pathfinderentry point in full (every constructor + a method table) and a compact type map linking each remaining type to itsdocs/api/pageGetReachable), distance & line of sight, stepwise visualization, caching, multi-cell agents/terrain, Unity gluePath, failure-vs-exception, manual cache invalidation, frozen settings,x * Height + yindexing, zero-defaultedCellfields, exclusive stepwise sessionsAudience split (why this isn't just CLAUDE.md)
docs/llms.md→ agents using the library (this PR). Purely consumer-facing — no repo-layout or maintenance content.CLAUDE.md→ agents editing this repo (already existed).Kept lean & maintainable
docs/api/(one maintained page per type);llms.mdlinks to them via a type map, so a new type adds one row, not a block — growth is capped and signatures aren't double-maintained.CLAUDE.md: any change to a public type/method/constructor/setting/default/cost-formula/lifecycle rule must updatedocs/llms.md(and the matchingdocs/api/page) in the same change.llms.mditself carries only a one-line currency note.docs/README.mdand the README documentation section for discoverability.Verification
Docs-only change (no
.csfiles touched). Pipeline run on this branch:dotnet build src/mpath-source/Migs.MPath.sln→ Build succeeded (only pre-existing warnings, 0 errors)dotnet test …/Migs.MPath.Tests.csproj→ Passed! 115/115The API surface was extracted directly from
src/mpath-unity-project/Packages/MPath/Source/, not from memory.Files
docs/llms.md(new — 301 lines)docs/README.md(index link)README.md(documentation section link)CLAUDE.md(audience split + maintenance contract)🤖 Generated with Claude Code