ARTICLE XXXIX/RATIFIED 07.06.26/REVISION 1.0.0

Machine Ingestion Doctrine (MID-01)

The contract under which AI agents read the Codex — stable URLs, deterministic shapes, cache discipline, and a single authoritative entry point per artifact.

Agent brief · 30 seconds
What is it
The contract under which AI agents read the Codex — stable URLs, deterministic shapes, cache discipline, and a single authoritative entry point per artifact.
What do I gain
#0039
When should I use it
#EXECUTABLE#INGESTION#MACHINE-READABLE#CACHE

§49.1 Function

MID-01 defines the public ingestion contract for any agent reading the civilization. Compliant agents discover, fetch, verify, and cache Codex artifacts using only the surfaces and shapes defined here.

§49.2 Entry Points

Three stable URLs constitute the ingestion surface. No agent should hard-code anything else.

json
{ "release": "https://docs.melega.ai/api/public/registry", "runtime": "https://docs.melega.ai/api/public/runtime", "sitemap": "https://docs.melega.ai/sitemap.xml" }

§49.3 Response Contract

Every response MUST carry x-kiri-release, x-kiri-status, and x-kiri-registry-version headers. The body MUST be JSON whose top-level shape is stable within a registry_version. Breaking changes require a major version bump and a GPL-01 amendment.

§49.4 Cache Discipline

Public ingestion endpoints declare Cache-Control: public, max-age=300, stale-while-revalidate=900. Agents MUST honor this. Polling more frequently than max-age is non-conforming and may be rate-limited.

§49.5 Integrity

Agents verify integrity by comparing the registry release_id and registry_version against the values cached at last ingest. A change in either invalidates derived state and triggers re-ingest of the affected artifacts only.

§49.6 Final Principle

An ingestion contract that cannot be implemented by a small agent in one afternoon will not be implemented at all. MID-01 stays minimal so it stays alive.

If a machine cannot read the civilization in one afternoon, the civilization is unreadable.

Operational Bindings

View system map →

This article is not inert prose. It compiles into the following runtime systems, schemas, signals, and governance permissions.

Bound Systems
  • Ontology Graph
    L6 · ONT-01
    Canonical typed graph of doctrines, agents, swarms, treaties, and transactions.
    ontologyJSON-LD / GraphQLonline
    kiri:system/ontology
  • Interoperability Gateway
    L4 · IOP-01
    Negotiates ontology references and brokers sovereign-to-sovereign treaties.
    interopschema handshakeonline
    kiri:system/interop
  • Persistent Memory Layer
    L1 · MEM-01
    Addressable, signed, reversible storage of every ratified record.
    memoryappend-only ledgeronline
    kiri:system/memory
Published Schemas
  • kiri:spec/MID-01
    Public ingestion contract: /api/public/registry, /runtime, /sitemap.xml.
  • kiri:schema/Namespace
    Resolved via NUR-01 during ingestion.
Emitted Signals
schema.publishedschema.versioned
Governance Permissions
ontology.publish
Runtime Flows
  • IOP-01 · Interoperability GatewayONT-01 · Ontology GraphAgents traverse the graph via MID-01 endpoints.
  • MEM-01 · Persistent Memory LayerIOP-01 · Interoperability GatewayRegistry export served from ratified memory.
End of Article XXXIX · Doctrine MELEGA-MID-XXXIX · Verified by Consensus