Skip to content

Plan: make MIKE IO documentation excellent for AI agents - #995

Open
ecomodeller wants to merge 2 commits into
mainfrom
agent-documentation-plan
Open

Plan: make MIKE IO documentation excellent for AI agents#995
ecomodeller wants to merge 2 commits into
mainfrom
agent-documentation-plan

Conversation

@ecomodeller

Copy link
Copy Markdown
Member

Adds roadmap/ai-agent-documentation.md — an execution plan, no code changes.

Why

Our documentation assumes a human reading a rendered website. Increasingly the thing writing MIKE IO scripts is an agent, and it works from whatever the model already believes about the API plus whatever it can reach at the time. When those disagree with reality the script fails on the first run, and that cost lands on the user rather than on us. In advisory work the script is the deliverable, so this is not a niche concern.

Two things follow, and the plan is built around them.

Measure before writing. It is easy to write an agent guide against imagined failures. Phase 1 builds a task suite of realistic advisory work and scores generated scripts by whether they actually execute against tests/testdata/, with a cheap rubric pass on top for idiom. Everything written later has to trace back to an observed failure — including the length budget, which is decided by comparing variants rather than by taste.

Ship it in the wheel. Agent guidance goes in src/mikeio/AGENTS.md as package data. A file in site-packages is always version-matched to the installed code and needs no network, which matters on the locked-down machines a lot of advisory work happens on. The docs site serves the same bytes for agents that fetch.

The failure mode of any such file is rotting into confidently teaching an API that no longer exists — worse than having none, and shipped to every user. So every fenced Python block in it is executed by a test in CI: a recipe that breaks fails on the PR that broke it.

Also found while scoping

docs.yml triggers on pull requests with paths: ['docs/**'], but the push trigger also lists src/mikeio/**. A PR touching only source therefore does not rebuild the docs — so a change that breaks a user-guide code block passes review and only fails after it is merged. Quarto executing the user guide is our correctness guarantee for the largest body of example code in the project, and it currently does not gate PRs. One-line fix, filed as its own issue.

Separately, generate_llms_txt.py already emits frontmatter descriptions into llms.txt, but only 2 of 19 pages have one, so the published index is a bare list of titles.

Scope

Consumer agents only — agents writing user scripts. Agents working inside this repo are already served by CLAUDE.md, CONTEXT.md and adr/. No MCP server: everything it would serve is static text, and it would be a service to operate.

Work items are filed as individual issues.

Documentation is currently written for humans reading a rendered website.
The people writing MIKE IO scripts increasingly are not reading it — an
agent is, and it gets whatever the model already believes about the API
plus whatever it can reach. That produces scripts that fail on the first
run, and the cost lands on the user, not on us.

The plan targets that directly: measure what agents actually get wrong
against a task suite, then fix only what the measurement shows. Agent
guidance ships inside the wheel so it is always version-matched and
reachable without a network, and its snippets are executed in CI so it
cannot rot into confidently teaching an API that no longer exists.

Lives outside roadmap/features/ so it stays out of the generated public
roadmap.
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