outerlayer context emit
Compile.outerlayer/ into each configured target’s native files.
Targets come from
targets in .outerlayer/config.json: claude-code, cursor, codex, copilot, factory. There is no --target flag. Bare outerlayer emit with no name still runs this, with a deprecation line.
A maintained skill (emitting-evidence, amend, reporting-findings, outerlayer) whose directory exists is rewritten to the installed CLI’s copy. --check reports one that differs as drift. Template skills (spec, writing-specs, build) are never rewritten or reported.
--check reports missing files and changed content for every output. It reports an orphaned output only when the file carries the generated-by header. .mcp.json and .cursor/mcp.json are JSON and carry no header, so they are never reported as orphaned.
Exit codes: 0 on success. 1 on drift under --check. 1 when .outerlayer/config.json is missing or has no targets; the message shows the fix, such as {"targets": ["claude-code"]}.
See also: Agent context, The .outerlayer directory.
outerlayer context materialize
Fetch this repository’s agent instructions from its context source and write them into the working tree:AGENTS.md, .claude/ and .outerlayer/.
The session-start hook runs this in a governed repository. Run it by hand to retry, or to check before a session. It refuses, writing nothing, while the repository still commits its own
AGENTS.md, .claude/ or .outerlayer/.
- Outside a git repository.
- On that refusal.
- When the source cannot be reached or read.
- When the repository is governed but its control plane cannot be identified, for example because the gateway refused the credential.
- When the control plane no longer governs the repository.
outerlayer import ruler
Port a.ruler/ tree into the equivalent .outerlayer/ tree.
It never overwrites an existing
.outerlayer/. A conflict in any directory stops the whole import before anything is written.
.ruler/ exists. 1 when the directory does not exist or an .outerlayer/ is already there.
outerlayer import capture
Install the maintained skills into.outerlayer/skills/: emitting-evidence, amend, reporting-findings and outerlayer.
When
.outerlayer/AGENTS.md exists, a snippet about emit artifact is appended to it. It is never created. A skill that differs from the installed CLI’s copy is rewritten, and the output names the file, so local edits to maintained skills do not last.
--dir does not exist or is not a directory.
outerlayer mcp install
Write or update theouterlayer MCP server entry. It writes the entry to .outerlayer/mcp.json when that file exists, else .mcp.json. It never writes an API key.
--transport is not stdio or http, or --dir does not exist. 1 with --transport http and no gateway: pass --url or run outerlayer login. 1 when .mcp.json is not valid JSON, its top level is not an object, or its mcpServers is not an object: fix or remove the file, then rerun.
See also: Use the MCP server.
outerlayer mcp serve
Run a stdio MCP server that bridges to the gateway. The stdio.mcp.json entry runs this.
It reads a factory key, or your login, at start-up. See Credential resolution.
It exits 1 before reading any input when it cannot connect. The MCP client shows the message as the connect error:
See also: Use the MCP server.