Skip to content

docs: add AI agent / LLM reference (docs/llms.md)#26

Merged
migus88 merged 2 commits into
masterfrom
docs/ai-agent-reference
Jun 24, 2026
Merged

docs: add AI agent / LLM reference (docs/llms.md)#26
migus88 merged 2 commits into
masterfrom
docs/ai-agent-reference

Conversation

@migus88

@migus88 migus88 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

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:

  • At-a-glance facts (package ids, target framework, namespaces, thread-safety, indexing, lifecycle rule)
  • Mental model + a 30-second example with real call syntax
  • Pathfinder entry point in full (every constructor + a method table) and a compact type map linking each remaining type to its docs/api/ page
  • Capability recipes — find a path, movement range (GetReachable), distance & line of sight, stepwise visualization, caching, multi-cell agents/terrain, Unity glue
  • Critical rules & gotchas that actually cause bugs — disposal, pathfinder reuse, not thread-safe, origin-excluded Path, failure-vs-exception, manual cache invalidation, frozen settings, x * Height + y indexing, zero-defaulted Cell fields, exclusive stepwise sessions
  • Decision guide for picking a constructor / query / caching

Audience 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

  • The exhaustive per-member signatures stay in docs/api/ (one maintained page per type); llms.md links 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.
  • The "maintained constantly" obligation lives in CLAUDE.md: any change to a public type/method/constructor/setting/default/cost-formula/lifecycle rule must update docs/llms.md (and the matching docs/api/ page) in the same change. llms.md itself carries only a one-line currency note.
  • Linked from docs/README.md and the README documentation section for discoverability.

Verification

Docs-only change (no .cs files touched). Pipeline run on this branch:

  • dotnet build src/mpath-source/Migs.MPath.slnBuild succeeded (only pre-existing warnings, 0 errors)
  • dotnet test …/Migs.MPath.Tests.csprojPassed! 115/115

The 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

migus88 and others added 2 commits June 25, 2026 01:39
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>
@migus88 migus88 merged commit c022205 into master Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant