# LLM Runtime Architecture

The package treats `AGENTS.md` as the canonical behavior contract. The three
core meta-agent team members generate or repair runtime adapters as thin
mappings over that core.

## Runtime Matrix

| Runtime | Entry Point | Global Command | Adapter Files | Memory Access | Verification |
| --- | --- | --- | --- | --- | --- |
| Codex | plugin skill or root `AGENTS.md` | plugin slash command from `codex/plugins/<package-id>/commands/<slug>.md` | `codex/plugins/agentlas-core-engine-meta-agent/` | Reads repo files and `.agentlas/` contracts | plugin validation plus package verification |
| Claude Code | slash command | `.claude/commands/<slug>.md`, globally installable at `~/.claude/commands/<slug>.md` | `.claude/commands/`, `.claude/agents/`, `.claude/skills/` | Reads root docs and `.agentlas/` contracts | package verification |
| Gemini CLI | custom slash command | `gemini/extension/commands/<slug>.toml` in a Gemini extension, with fallback user command at `~/.gemini/commands/<slug>.toml` | `gemini/extension/`, `GEMINI.md`, `.gemini/GEMINI.md`, `.gemini/commands/` | Reads root docs and `.agentlas/` contracts | package verification |
| Antigravity | workflow slash command | `antigravity/workflows/<slug>.md`, globally installable at `~/.gemini/antigravity/global_workflows/<slug>.md`, with project fallback `.agents/workflows/<slug>.md` | `antigravity/workflows/`, `.agents/workflows/`, `AGENTS.md`, `GEMINI.md`, `.agents/skills/` | Reads root docs and `.agentlas/` contracts | package verification |
| Cursor | root rules through `AGENTS.md`-compatible behavior | command alias named in `AGENTS.md` and optional `.cursor/` adapter | optional `.cursor/` generated by target repo | Depends on project setup | package verification |
| Generic | `AGENTS.md` | command alias named in `AGENTS.md` | root `AGENTS.md` | Reads files in local project | package verification |

## Rules

- Keep behavior in `AGENTS.md`.
- Keep `.agentlas/global-commands.json` as the command registry for generated
  and packaged outputs.
- Keep runtime adapters short and explicit.
- Name unsupported capabilities instead of hiding them.
- Do not duplicate private or hosted-only Agentlas behavior in public adapters.
- Every adapter must point back to the canonical core and the package verifier.
- After generation, return `global_commands` so the user knows exactly what to
  type in Claude Code, Codex, Gemini CLI, Antigravity, generic AGENTS.md tools,
  and terminal.

## Model And Tool Selection

The meta-agent should choose models and tools by task:

- architecture and planning: strongest reasoning model available;
- file editing: runtime with filesystem tools and patch support;
- browser or UI validation: runtime with browser automation;
- memory review: runtime that can read the `.agentlas/` contracts and current
  repo files;
- public release: runtime with shell access for verification scripts.
