Machine-readable documentation for AI coding agents — Claude Code, GitHub Copilot, Cursor, Gemini CLI, and more. trustcv provides structured files so any AI assistant can understand the API and write correct code.
AI coding agents work best when they have structured, machine-readable documentation. trustcv ships documentation files that major AI agents automatically discover and use, so they can write correct cross-validation code for medical ML projects.
AI agents fetch llms.txt or read repo-specific config files like .cursorrules or CLAUDE.md.
The agent learns trustcv's classes, methods, parameters, and best practices from the structured documentation.
With full API knowledge, the agent generates valid, leakage-free cross-validation code using the right splitters and methods.
trustcv provides documentation files for all major AI coding agents.
The llms.txt standard provides a single Markdown file any LLM or agent can fetch to understand a project. Includes API reference, code examples, and common patterns.
llms.txt llms-full.txt
Claude Code reads CLAUDE.md at the repo root for project-specific instructions —
architecture, commands, conventions, and key APIs.
GitHub Copilot reads .github/copilot-instructions.md for repo-specific context,
providing architecture overview, key APIs, and coding conventions.
Cursor reads .cursorrules at the repo root for project-specific instructions,
covering architecture, commands, and API patterns.
A structured JSON schema with every class, method signature, parameter type, default value, and usage example. Any AI agent can parse this programmatically.
api-schema.json
Windsurf, Aider, Gemini CLI, OpenAI Codex, and others can use llms.txt or api-schema.json
as context for trustcv-aware code generation.
Complete list of AI agent documentation files included in trustcv.
| File | Target Agent | Format | Description |
|---|---|---|---|
llms.txt |
All LLMs & agents | Markdown | Concise API reference with examples and common patterns (~5 KB) |
llms-full.txt |
All LLMs & agents | Markdown | Extended reference with all 29 CV methods, full signatures, and 7 examples (~20 KB) |
api-schema.json |
Programmatic agents | JSON | Structured API schema — classes, methods, params, types, defaults |
CLAUDE.md |
Claude Code | Markdown | Project instructions for Claude Code (repo root) |
.github/copilot-instructions.md |
GitHub Copilot | Markdown | Repo-specific context for GitHub Copilot |
.cursorrules |
Cursor IDE | Text | Project-specific instructions for Cursor |
llms.txt is an emerging standard for providing LLM-readable documentation at a well-known URL. Any agent can fetch it to understand the project.
Point your AI agent to the trustcv llms.txt file:
# Fetch the concise reference
curl https://ki-smile.github.io/trustcv/llms.txt
# Fetch the full reference (all 29 methods, complete signatures)
curl https://ki-smile.github.io/trustcv/llms-full.txt
# Fetch the structured JSON schema
curl https://ki-smile.github.io/trustcv/api-schema.json
Pass the documentation as context to any LLM:
# Example: give an LLM trustcv context
import httpx
llms_txt = httpx.get("https://ki-smile.github.io/trustcv/llms.txt").text
prompt = f"""Using the trustcv library documented below, write code to:
1. Check for data leakage in my dataset
2. Run patient-grouped 5-fold CV with a RandomForest
3. Report clinical metrics with 95% CIs
Documentation:
{llms_txt}
"""
The api-schema.json file provides a machine-parseable JSON schema of the entire trustcv API.
Agents can load this to get exact class names, method signatures, parameter types, and defaults.
{
"name": "trustcv",
"version": "1.0.6",
"classes": [
{
"name": "TrustCVValidator",
"aliases": ["TrustCV"],
"import": "from trustcv import TrustCV",
"constructor": {
"params": [
{"name": "method", "type": "str", "default": "stratified_kfold"},
{"name": "n_splits", "type": "int", "default": 5},
...
]
},
"methods": [
{"name": "validate", "params": [...], "returns": "ValidationResult"},
{"name": "fit_validate", "params": [...], "returns": "ValidationResult"}
]
}
],
"splitters": {
"iid": [...],
"grouped": [...],
"temporal": [...],
"spatial": [...],
"multilabel": [...]
},
"examples": [...]
}
How each AI agent picks up trustcv's documentation.
Automatic — Claude Code reads CLAUDE.md from the repo root when you open the project.
No setup required.
# Just clone and start working
git clone https://github.com/ki-smile/trustcv.git
cd trustcv
# Claude Code automatically reads CLAUDE.md
Automatic — Copilot reads .github/copilot-instructions.md when working in the repo.
# Already included in the repository
# .github/copilot-instructions.md
# Copilot picks this up automatically
Automatic — Cursor reads .cursorrules from the repo root.
# Already included in the repository
# .cursorrules
# Cursor picks this up automatically
Pass the llms.txt URL as context or use the API schema:
# Provide as context to any agent
# URL: https://ki-smile.github.io/trustcv/llms.txt
# URL: https://ki-smile.github.io/trustcv/api-schema.json