smart_toy Why AI Agent Documentation?

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.

1

Agent Discovers Files

AI agents fetch llms.txt or read repo-specific config files like .cursorrules or CLAUDE.md.

2

Understands the API

The agent learns trustcv's classes, methods, parameters, and best practices from the structured documentation.

3

Writes Correct Code

With full API knowledge, the agent generates valid, leakage-free cross-validation code using the right splitters and methods.

hub Supported AI Agents

trustcv provides documentation files for all major AI coding agents.

public llms.txt (Universal)

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.

description llms.txt description llms-full.txt

terminal Claude Code

Claude Code reads CLAUDE.md at the repo root for project-specific instructions — architecture, commands, conventions, and key APIs.

description CLAUDE.md

code GitHub Copilot

GitHub Copilot reads .github/copilot-instructions.md for repo-specific context, providing architecture overview, key APIs, and coding conventions.

description copilot-instructions.md

edit_note Cursor IDE

Cursor reads .cursorrules at the repo root for project-specific instructions, covering architecture, commands, and API patterns.

description .cursorrules

data_object API Schema (JSON)

A structured JSON schema with every class, method signature, parameter type, default value, and usage example. Any AI agent can parse this programmatically.

data_object api-schema.json

auto_awesome Other Agents

Windsurf, Aider, Gemini CLI, OpenAI Codex, and others can use llms.txt or api-schema.json as context for trustcv-aware code generation.

description llms.txt data_object api-schema.json

folder_open Documentation Files

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

article The llms.txt Standard

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.

link How to Use

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

psychology Using with AI Agents

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}
"""

data_object Structured API Schema

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.

schema Schema Structure

{
  "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": [...]
}

settings Setup by Agent

How each AI agent picks up trustcv's documentation.

terminal Claude Code

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

code GitHub Copilot

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

edit_note Cursor IDE

Automatic — Cursor reads .cursorrules from the repo root.

# Already included in the repository
# .cursorrules
# Cursor picks this up automatically

auto_awesome Other Agents

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