https://raw.githubusercontent.com/zz-plant/ambit/HEAD/AGENTS.md
− Work on how the map draws starts at the specimen page: `npx vite`, or the `ambit-specimen` launch configuration, then `/ambit/dev/specimen.html`. It draws every node state at three times its size through the map's own code, beside the key entry for it, and `?still` draws them as a saved file does. `npm run render:images` writes the files the Image menu saves, and the specimen page whole, from a headless Chrome: this checkout's graph, or the demo with `--demo`. The demo carries a failing check an− ## Core Structure− ### Engine (handle and schema)− Opening the graph, the shape a row has, and how a database made last year reaches the shape this checkout expects.− ```− src/engine/engine.ts Entry point and public surface; re-exports the modules below− src/engine/paths.ts Where the authored data lives, and which config to read− src/engine/db.ts The handle, the schema, additive column migrations, backfills− src/engine/rows.ts What a row of each table looks like — a query names its row type from here− src/engine/migrate.ts Bringing a database up to the current schema — ADDED_COLUMNS lives here− src/engine/ontology.ts Node kinds and edge kinds — what a thing is, what a relation means− src/engine/vocabulary.ts The words the engine counts with — which states mean reached,− which lifecycles mean failing or recovering, which interventions are− middleware, which ledger actions are a check run, the audit− trail's outcome words, the one graph-summary query, `reachPhrase`− ("9 of 46 capabilities reached, and 9 of your own", the one way a− sentence states reach), and `DEFAULT_WINDOW_DAYS`, how far back a− report over the ledger looks− src/engine/schema.sql SQLite schema (capabilities, dependencies, authority, catalog,− preferences, synergies, session_learning, frontier_snapshots,− proposals, proposal_rejections, schema_meta, work ledger,− economics, goals, budgets, federation_imports, failure_signals,− declared_checks, sandboxes, delegation_records,− delegation_sources, session_log_cursors, tool_listings)− ```− ### Engine (discovery and seeding)− How a machine becomes a graph: which passes run, what each one writes, and which runtimes are read to get there.− ```− src/engine/discovery.ts Orchestrates the seed: which passes run, in what order− src/engine/seed/ What each pass actually writes− writers.ts Kind-stamping writers, and the config mapping− structure.ts Runtimes, models, dependencies, combos, infrastructure− declared.ts Actors, authority, catalog, credentials, economics− techtree.ts The curated tree− src/engine/techtree.json The curated tree itself: authored content, the same for everyone,− matched against a machine's capabilities by `detect` patterns. Eras 8− and 9 (Product, Operations) are what running a product needs; Launch− Ready is a capstone (`detect.requires_met`), reached by its steps− src/engine/mcp-clients.ts Cursor, Windsurf, Gemini CLI, Claude Desktop, Codex CLI, Cline, Roo Code,− Continue, Zed, VS Code, Copilot CLI, Amp, Goose and Kiro config readers:+ This file is short on purpose: it is loaded on every turn. It holds the commands, the check that says a change is done, and each rule in one line. The map of the code and the full text of each rule are in one guide per area, listed under [Where to read next](#where-to-read-next).+ ## Focused mode (since 2026-11-10)+ Ambit is in focused mode. On 2026-11-10 the owner decided to keep it as a small developer tool that has to earn its place, not to grow it into a platform. Until this section is removed, it overrides [docs/roadmap.md](docs/roadmap.md) and any other document that names work to do next.+ Take:+ - a fix for something broken: a failing build or check, a page error, a dead link, a release that stopped;+ - security updates and the monthly dependency pull request;+ - work that makes the capabilities the owner uses every day more reliable or easier to use: the capability graph, dependency checks, the configured/working/authorized distinction, and the MCP server;+ - what an outside user needs to try those capabilities: install, first run, the docs for them, and any bug they report;+ - keeping the config readers working when a supported agent changes its config format.+ Decline the rest, and say in your reply that Ambit is in focused mode:+ - new agent integrations or config readers added for completeness;+ - enterprise-platform features: organisation policy, central dashboards, multi-user or hosted modes;+ - new automation, services, secrets, paid APIs or scheduled jobs;+ - more enforcement on the call path: the control plane, grant promotion, budgets, delegation records and federation stay as they are, since the runtimes' own permission modes and sandboxes, and MCP gateways, own the call path now. `ambit can` and the deny-or-ask gate stay, unextended;+ - usage, quota and cost reporting that tools such as ccusage do as their whole job, and syncing MCP configs between runtimes, which tools such as vsync and mcp-sync do;+ - scanning tool descriptions for poisoning or prompt injection, which scanners such as Snyk Agent Scan do;+ - redesigns and refactors that serve none of the work above.+ The owner can still ask for any of these. Do one only when the request says it overrides this section.+ npm run dev:fixture # disposable graph and config, API :3101 and Vite :3100+ For site work in a fresh worktree, start with `npm ci` and `npm run dev:fixture`. [The site iteration guide](./CONTRIBUTING.md#iterate-on-the-site) has the dev and production URLs, how to override ports, and screenshot commands. `npm run shots -- --help` lists cases and sizes. A run writes a contact sheet and `report.json`. Add `--strict` to fail on flagged frames or `--expect-revision <sha>` to also require the deployed commit.+ ## When a change is done+ ```bash+ npm run check -- --fast # lint, typecheck and the suite: the loop to iterate in+ npm run check # every check CI runs from npm; run it before a pull request+ ```+ Each step prints one line. A step that fails prints the end of its output and the command that usually fixes it. Do not open a pull request while `npm run check` fails, and fix the cause instead of adding a second "fix build" commit. What each check is for is in [CONTRIBUTING.md](./CONTRIBUTING.md#the-checks-ci-runs).+ ## Where to read next+ Before editing a file, read the guide for its directory. Each has a one-line description of every file there and the full text of the rules that govern it.+ | You are editing | Read first |+ | --- | --- |+ | `src/engine/` (the graph, the CLI, the gate, the ledger) | [src/engine/AGENTS.md](src/engine/AGENTS.md) |+ | `src/server/`, `src/mcp/`, `src/control_plane/` | [src/server/AGENTS.md](src/server/AGENTS.md) |+ | `src/client/` (the map and every view), or any copy a person reads | [src/client/AGENTS.md](src/client/AGENTS.md) |+ | `src/shared/`, `scripts/`, `plugins/` | [src/shared/AGENTS.md](src/shared/AGENTS.md) |+ A change that crosses two areas reads both. When a guide and the code disagree, the code is right and the guide is the bug: fix the guide in the same change.+ Four invariants protect the API server, which can write an agent config. None may be relaxed. Read [the full text](src/server/AGENTS.md#security-posture) before touching `src/server`, any command that opens a socket, or anything that starts a process. [SECURITY.md](./SECURITY.md) is the same posture for a reviewer.+ 1. **Loopback only.** The server listens on `127.0.0.1`. Never bind `0.0.0.0`.+ 2. **Origin and Host allowlist.** A request from any other origin, or addressed to any other host name, is a 403 before routing. Write routes also need the API token.+ 3. **No entry creation over HTTP.** A route may edit allow-listed fields of a config entry that exists. No route adds an entry, runs a declared check, or reads an actor from a request body.+ 4. **No egress you did not type.** Nothing opens a socket or starts a command unless a person typed the command for it or an agent called the tool for it. The server never does.
Showing the first 40 of each.