0013 — AI-ready foundation: every repo exposes an API layer, MCP, agent docs and machine-readable metadata, validated by AIEO¶
- Status: ratified
- Number: 0013
- Date: 2026-10-30
- Proposed by: agent (Grok Bot, on a branch opened for bamr87)
- Ratified by: https://github.com/bamr87/bamr87/pull/494 (merged 2026-10-31 by @bamr87)
- Affects: constitution new § 16;
tools/aieo/(new home of AIEO, migrated frombamr87/zer0-CMSapps/aieo/) (follows § 15major-change-evidence, 0010; § 13 is 0011); specs UPS-AGENT, UPS-BE-12/31, UPS-DOC (by reference);templates/(newtemplates/ai-ready/kit); featuresHUB-050,HUB-051; requirementsFR47,FR48 - Supersedes: none (extends § 7, § 14 and UPS-AGENT)
- Related: 0007
public-docs-site(warn-then-fail rollout), 0008harness-prior-art-research, 0011eval-baseline-risk-tiers, docs/MACHINE-API.md, docs/AI-INTEGRATION.md, specs/AGENT-CONTEXT.md, specs/BACKEND.md,tools/fleetcore/mcp_server.py,bamr87/zer0-CMSapps/aieo/
Context¶
Amr's direction: "there also needs to be an amendment that all repos have common foundation models like an API layer, and MCP. essentially, every repo should be AI friendly and integrated. the AIEO engine should also be built to validate this."
Today AI-friendliness is uneven and unchecked. AGENTS.md is canonical under UPS-AGENT but present in only some repos. OpenAPI is a backend SHOULD/MUST (UPS-BE-12, UPS-BE-31) only for services. The hub alone publishes a machine API (/api/v1/*.json, llms.txt). MCP servers exist ad hoc: the harness console (tools/fleetcore/mcp_server.py), it-journey's quest server (scripts/quest/mcp_server.py) and AIEO's own tools. No rule says what every repo exposes to agents, and nothing scores it.
Prior art¶
Per 0008, existing standards and fleet assets come first; the only new pieces are a definition, a kit and a conformance check.
External standards
- Model Context Protocol (MCP) and the MCP Registry
server.json(schema2025-12-11,io.github.<owner>/<name>names): the standard way to expose tools and resources to agents, and to describe a server for discovery. Fit: the MCP layer and its manifest. Adopt. - OpenAPI 3.1: already the fleet's API contract (UPS-BE-12, UPS-BE-31). Fit: the API layer for apps and services. Adopt as-is.
- llms.txt (llmstxt.org): a plain-markdown index for LLMs at the site root. The hub already derives one (docs/MACHINE-API.md). Fit: agent discovery for every public site. Adopt.
- A2A Agent Card (
/.well-known/agent-card.json, A2A v0.3+): describes an agent service and its skills. Fit: only repos that run an agent (the harness, JEV, QA Lead). Adopt for those only; optional elsewhere. - schema.org JSON-LD: structured metadata in pages. zer0-mistakes already ships it (docs/seo/aieo), and AIEO scores it. Fit: content-site metadata. Adopt.
Fleet assets
- UPS-AGENT (specs/AGENT-CONTEXT.md) and the
agent-contextkit: AGENTS.md canonical, CLAUDE.md a pointer. Fit: the agent-docs layer. Reuse; no new rule. - UPS-DOC and § 14: every repo has a public site. Fit: the place llms.txt, the static data API and JSON-LD are served. Reuse.
- Hub machine API (docs/MACHINE-API.md):
/api/v1/index.jsondiscovery plusllms.txt,schema_version,status: degradedinstead of build failures. Fit: the reference shape for a content site's static data API. Generalise into the kit. - Harness console MCP (
tools/fleetcore/mcp_server.py, the user-harness-console server) and.mcp.json: a working stdio MCP server and client config. Fit: reference implementation for a tool repo's MCP server. Reuse its pattern. verify/mcp.json(gitorio, githubai, it-journey): an MCP client config for the Playwright verifier, not a server. Fit: none for exposure; noted so it is not mistaken for compliance.- SCHEMA framework (
SCHEMA.md,bamr87/SCHEMA,tools/schema_lint.py): structural contracts per repo. Fit: machine-readable structure. Reuse; the AI-ready manifest points to it. - AIEO (
bamr87/zer0-CMSapps/aieo/): an existing AI Engine Optimization engine with a CLI, a FastAPI backend, prompt-driven pattern scoring and an MCP server (aieo_score_content,aieo_list_patterns,aieo_landing_audit, ...). The originalbamr87/aieowas imported with full history by zer0-CMS#44 and then deleted (docs/CONSOLIDATION.md), which is why it 404s. Fit: the validator. Migrate it into the hub'stools/aieo/(Amr's decision) and extend it with a repo-readiness pattern pack; do not rebuild. tools/conformance.py: the fleet's existing gate. Fit: hosts the check id. Extend.- Build-vs-adopt: adopt every standard above. Build only the
templates/ai-ready/kit, a repo-readiness mode in AIEO (after migrating it into the hub'stools/aieo/) and one conformance check id. The AIEO build is tracked in the hub issue linked from this PR, starting with its own prior-art pass on external AI-readiness, llms.txt and MCP validators.
Amendment¶
Add constitution § 16 "AI-ready foundation" with this text:
- Common foundation — every active fleet repo is AI-ready: an agent can discover what it is, read its docs, query its data and call its capabilities without scraping. Every repo exposes four layers, sized to its type (item 2): an API layer, an MCP layer, agent docs and machine-readable metadata.
- By repo type — the type comes from the repo's
_data/fleet.ymlentry.- Apps and services: a documented REST API with a committed OpenAPI 3.1 document (UPS-BE-12, UPS-BE-31); an MCP server that wraps the main read operations (writes behind confirmation, as the harness console does).
- Content sites: a static JSON data API on the public site, shaped like the hub's (
/api/v1/index.jsondiscovery,schema_version,status: degradedinstead of build failure); schema.org JSON-LD on pages. Each site ships its own real MCP server as a local stdio server in the repo (mcp/), which agents' clients run against the site's public static data API (tools: search, read a page, list collections, query the data API), with aserver.jsonmanifest (stdio transport); a manifest alone does not satisfy the MCP layer. A static GitHub Pages site cannot host a live server, so no hosted endpoint is required or used.- Tools and CLIs: a
--jsonoutput mode on every user-facing command, documented in the README; an MCP server, or aserver.jsonmanifest for a server that wraps the CLI.- Libraries, themes and kits: agent docs and metadata only; the API and MCP layers are not required.
- Agent docs everywhere —
AGENTS.mdper UPS-AGENT, andllms.txtat the root of the public site (§ 14) linking the README, AGENTS.md, API docs and the data API index.- Machine-readable metadata — every repo has an
ai-ready.ymlmanifest at its root naming its type, its API layer (OpenAPI path, data API index or CLI JSON commands), its MCP server orserver.json, itsllms.txtURL and itsSCHEMA.md. MCP manifests follow the MCP Registryserver.jsonschema. A repo that runs an agent also publishes an A2A Agent Card at/.well-known/agent-card.json.- Shared kit, not from scratch — the hub ships
templates/ai-ready/(spec in its README: manifest,llms.txtgenerator, static data API generator, an MCP server skeleton for services and tools and a per-site content MCP server for content sites, both based ontools/fleetcore/mcp_server.py,server.jsontemplate, a CLI--jsonhelper and the score threshold). It is fanned out like the other kits and stamped<!-- kit: ai-ready vX.Y.Z -->. A repo extends the kit rather than building its own.- AIEO validates — the AIEO engine, which lives in the hub's
tools/aieo/(migrated frombamr87/zer0-CMSapps/aieo/by PR), scores AI-readiness per repo: the presence and validity of each layer (OpenAPI parses,server.jsonmatches the registry schema,llms.txtresolves and links live pages,--jsonoutput parses, JSON-LD validates) and, via its content patterns, how usable the agent docs are.tools/conformance.pyruns this as checkai-ready, calling the in-hub AIEO. The check is warn-only for each repo until that repo's fan-out PR lands, then a hard failure.- AIEO is held to § 13 — AIEO's scoring is an agent decision, so it must meet the § 13 eval-set requirements before its score can fail a build. Until then, only the structural checks (presence and schema validity) can fail, and the score is advisory. Once AIEO passes its evals, a repo whose score is below the minimum also fails. The minimum is 80/100 and lives in
templates/ai-ready/as one fleet-wide number.- Exemptions — archived repos and repos marked
archivedorretiredin_data/fleet.ymlare exempt. A repo may claim a layer as not applicable only with a one-line reason inai-ready.yml, which the completeness review (§ 15) accepts or rejects.- Secrets and private repos — no layer exposes secrets or private data. A private repo exposes its layers to the fleet only (no public
llms.txtor data API), and its check runs with $0 Actions spend.
Consequences¶
- Follow-up: build
templates/ai-ready/and add theai-readycheck id totools/conformance.pyandtemplates/conformance/conformance.yml(featureHUB-051). - Follow-up: migrate AIEO from
bamr87/zer0-CMSapps/aieo/into the hub'stools/aieo/by PR, then add its repo-readiness mode (aieo repo <path> --json, plus an MCP tool), tracked in the hub issue linked from this PR. AIEO's reusable content-scoring workflow ran on the deleted original repo and is re-homed in the hub. - Sequenced follow-up (approved by Amr): after the PR moving AIEO into the hub's
tools/aieo/merges, a separate zer0-CMS PR removesapps/aieo/. Nothing is removed before that move merges. - Follow-up: add a
type:field to_data/fleet.ymlentries where it is missing (registry edit, no settings). - Follow-up: drop the stale
aieorow (bamr87/aieo,projects/aieo) from_data/conformance.ymlby regenerating it. - Fan-out: one PR per spoke repo after ratification adds the kit and turns that repo's check from warn to fail.
- Merging the pull request that carries this record ratifies it. An agent never merges it.