Skip to content

AI Context

AI coding agents consume layered documentation that provides complete understanding of the Ioto platform. This context enables AI agents to write correct, idiomatic Ioto code without guesswork — using the Safe Runtime functions, fiber-based async patterns, and proper memory management conventions.

Context Layers

ContextDescription
CLAUDE.mdProject instructions, coding conventions, and build commands.
AI/designs/DESIGN.mdArchitecture overview, module design, and key decisions.
AI/context/Per-module API guides covering the runtime, database, web server, JSON, URL client, MQTT, and more.
API ReferenceComplete documentation for every public function and data structure.

CLAUDE.md

The CLAUDE.md file at the root of each project provides instructions that AI agents read automatically. It includes:

  • Build commands — How to compile, test, and run the project.
  • Coding conventions — Indentation, naming, line limits, and style rules.
  • Project structure — Key directories, configuration files, and entry points.
  • Security policies — What is and isn't in scope for security auditing.

Architecture Documentation

The AI/designs/DESIGN.md file provides a high-level architecture overview:

  • Module organization and dependencies
  • Data flow between components
  • Threading model (single-threaded fiber scheduling)
  • Memory management strategy (Safe Runtime with global error handler)
  • Key design decisions and their rationale

Per-Module API Guides

The AI/context/ directory contains detailed guides for each Ioto module:

ModuleGuideCoverage
Safe Runtimemodules/r.mdMemory allocation, strings, buffers, lists, hashes, fibers, events, logging
Databasemodules/db.mdSchema design, CRUD operations, change callbacks, pagination
Web Servermodules/web.mdRequest handling, routing, authentication, sessions, TLS
JSONmodules/json.mdParsing, path queries, tree manipulation, serialization
URL Clientmodules/url.mdHTTP requests, streaming, JSON responses
MQTTmodules/mqtt.mdPublish/subscribe, QoS, connection management
WebSocketmodules/websock.mdReal-time communication, event handling
OpenAImodules/openai.mdChat Completions, Responses API, streaming, agentic workflows
Cryptographymodules/crypt.mdTLS, certificates, hashing, encryption
OS Abstractionmodules/osdep.mdPortable types, platform detection

Each guide covers the module's API functions, data structures, usage patterns, and code examples. AI agents read these guides to understand how to correctly use each module.

How Context is Used

When you invoke a skill or ask Claude Code to build something, the AI agent:

  1. Reads CLAUDE.md for project conventions and build instructions
  2. Consults the architecture documentation for design context
  3. References the relevant module guides for API details
  4. Uses the skill's guided workflow for step-by-step implementation

This layered approach means the AI agent has the same level of understanding as a developer who has read the full documentation — enabling it to write production-quality code on the first attempt.

Keeping Context Updated

The context files are included in each Ioto agent distribution and are updated with each release. If you extend the Ioto platform or add custom modules, you can add your own context files to the AI/context/ directory to help AI agents understand your extensions.