Skip to main content
This page lists every outerlayer emit command and outerlayer demo record, with their flags and exit codes. For the tasks they serve, see Prove the work, Record a demo and Findings. Every emit command takes these options. demo record takes neither. Each command exits 0 on success. It exits 1, with the reason on stderr, when it refuses or the input is not valid. emit finding and emit findings also exit 3. In CI, set the credential variables instead of running login. See In CI. A command connects the repository to a factory on its own when exactly one factory fits. See Automatic connection. On this page, a recorded session is an agent session started with OUTERLAYER_WORK set to a work item’s number. Inside an agent session started without it, every emit command refuses.

outerlayer emit artifact

Upload a proof artifact with a caption.
The file type sets the artifact’s kind. See the table in Attach an artifact. A file can be at most 8 MiB, and its name at most 120 characters. The command prints the artifact’s id, for a later --replaces. When you reach the gateway’s rate limit for uploads, the command prints how many seconds it waits. Then it sends the artifact again, up to 3 attempts. If every attempt fails, the command exits 1 with an error that names the rate limit and the seconds to wait. See Rate limits. More on --test:
  • --test needs --for and an .xml file. Without either, the command exits 1.
  • A name several tests share binds all of them, with a warning.
  • A test’s own title is enough when the reporter puts its describe blocks in front, as in widgets > adr > returns one row. The command binds the one test whose full name ends with the title after > or ›, and prints that full name. When several tests match, it exits 1 and lists them.
  • <name>=<path>:<line> gives the test’s location, as in --test "renders the banner=src/login.test.ts:42".
  • <name>=<path> gives only the test’s file. The path must end in a test source’s extension, such as .ts or .py, with no spaces.
  • A testcase’s own file and line attributes win over the location you give. With neither, a classname that is a test file’s path gives the file.
  • When no bound test names its file, the command exits 1 and uploads nothing, because a host cannot run the tests again at a later commit. Give each test’s file with <name>=<path>. In a CI job, the command prints a warning and stores the results.
  • The command exits 1 on a name the file does not hold, or on a location that is absolute or leaves the repository. When names in the file contain the name you gave, it lists some of them.
With --for, the command reads an .xml file first and exits 1 on a malformed file, before it sends anything. Without --for, it sends an .xml file without checking it. More on --replaces:
  • A target that already uploaded is hidden everywhere.
  • A target still in the local queue is cancelled, so it never uploads.
  • If you name several ids and one is still queued, the command refuses. Run outerlayer sync first, then retry.
Inside a recorded session, the artifact is queued and uploads on the next outerlayer sync, which prints its link. Outside a session, it uploads at once, and the command prints the link on the line after the id. See Where the artifact is attached. With --json, the output depends on where the artifact goes:
  • In a recorded session, it has spooled (true) and record. record.artifactId is the id that --replaces takes.
  • Outside a session, it has id, kind, prNumber, provenance, repository, url and verification. It also has clientArtifactId, the id that --replaces takes.
verification is confirmed when OuterLayer already knows the pull request, and pending otherwise. See also: Prove the work.

outerlayer demo record

Record a demo script. The CLI carries the recorder and its own Playwright release, so the repository installs neither.
The command needs a CLI installed with npm install --global @outerlayer/cli. It does not run through npx. See Before you start. Without --no-voice, each line is spoken with the CLI’s voice. That needs espeak-ng. The first run downloads the voice pack (about 400 MB) to ~/.outerlayer/voice/. The script imports test and expect from @outerlayer/playwright. Without --config, it runs in one Chromium project, with no retry and no time limit. The command prints the path of each manifest it finds. Under outerlayer work proofs --record, the demo goes to the folder that OUTERLAYER_PROOF_OUT names. See also: Record the demo.

Record a script in any language

Put a command after -- to record a demo from a script in any language.
The script tells its demo with outerlayer demo chapter, beat, beat-end, run, http, checks, frame and chapter-end. These commands work only inside outerlayer demo record. Outside it, each exits 1 and says so. The recorder makes each check from a command it ran, an HTTP call it made or a JUnit report it read. See Record a demo from a script.

outerlayer emit demo

Attach a narrated demo to a work item from the manifest that demo record wrote.
More on these flags:
  • --replaces takes the id that outerlayer work demo --item <n> --json prints for the item’s newest demo record. Outside a recorded session it needs --item. See Record the demo again.
  • --output writes a summary next to the file, as <file>.json. The command exits 1 when the demo holds a frozen, silent stretch over 2 seconds, a beat shows steps for more than 4 seconds after its line, or a check failed. See Render the demo on your machine.
  • --json prints recordArtifactId, video, clips, screenshots, failures, differences and exitCode. video is the whole video’s artifact id, or omitted when it was left out for its size. screenshots lists each chapter with a frame decision, with the artifact id or the reason.
  • --json with --output prints the summary instead: output, seconds, leftOutSeconds, deadAirCutSeconds, chapters, measure, deadAir, failures and, when present, note.
The command needs ffmpeg and ffprobe on PATH. A narrated run also needs espeak-ng. The command reads manifest versions 1 to 6. The manifest’s fields are in Manifest format.

What the command stores

  • One video artifact named demo.webm, for the whole demo. It is bound to no criterion. The video is WebM with VP9 video and, when narrated, Opus audio.
  • One video artifact named chapter-NN.webm for each chapter. It is a time range of the whole video. A chapter is bound to its criterion only when it ran at least one check and every check passed.
  • One screenshot artifact named screenshot-NN.png for a chapter whose test marked a frame. The command stores the frame only when the chapter’s criterion declares the proof screenshot and every check of the chapter passed. Otherwise it prints the reason. A frame over 8 MiB is also left out.
  • The manifest, as the demo record.
When the whole video is over 8 MiB, the command stores one clip for each chapter and no whole video. See What the command stores. Inside a recorded session, the artifacts and the record are queued and upload on the next outerlayer sync. A second run with the same manifest, video, --item and --pr stores nothing new. When an upload fails part way, run the command again. It stores only what is missing.

Refusals

The command refuses, and uploads nothing, in these cases:
  • The manifest is not valid, or its video is missing. A manifest holds 1 to 200 chapters, and only the first chapter may have no criterion.
  • The manifest’s version is newer than the CLI reads. The refusal says to update the CLI.
  • ffmpeg or ffprobe is not on PATH, or a narrated run has no espeak-ng. Pass --no-narration to run without espeak-ng.
  • A chapter ends after the video ends, overlaps the one before it, or names a criterion twice.
  • A chapter names a criterion that is not on the item’s recorded list. When the list cannot be read, the command warns and goes on.
  • A narration line breaks a rule in Write the lines, or is over 2,000 characters. The refusal names the chapter, the beat, the line and the reason.
  • The demo still holds a frozen, silent stretch over 2 seconds. The refusal names where.
  • A beat shows steps for more than 4 seconds after its line ends. The refusal names the beat.
  • A narration line is still longer than its chapter at 1.3 times speed. The refusal names the chapter and the overrun in seconds.
  • A clip is larger than 8 MiB. The refusal names the chapter and the size.
  • A file of the voice pack does not match its pinned checksum. The refusal names the file.
  • With --compare, the two runs differ in their chapters, titles or checks. The refusal names the first difference.
  • With --compare, a still file of either run is missing, is not a PNG, or does not match its checksum.
  • With --compare, both manifests are the same file.
See also: Emit the demo.

outerlayer emit finding

Record one problem you hit in the factory.
A finding that lacks a required field is refused. The refusal lists every missing field, and nothing is stored. The command also refuses a --problem that is not in this factory, and an event id that is not in the session. The command adds two things to the finding, and removes credentials from both before it sends them:
  • The lines around --line in --file, or around --rule-line in --rule-path, read from your checkout.
  • The tool call and its output at the start event, read from the session.
With --json, the output has workItemId, count and results. count is the number of findings stored. Each result has id and outcome, which is stored or needs_choice. A result can also have these keys:
  • method: how the finding joined its problems.
  • problems: the problems the finding joined, each with id and title.
  • overridden: the problems you named that a key match replaced.
  • candidates: the close problems of a needs_choice result, each with id, title, reportCount and reports.

Choose among candidates

Every finding joins a problem. The command decides which in this order:
  1. A key match. A context finding’s key is its rule path, quoted sentence and relation. A flaky test’s key is its file and test name. A command alone is never a key. A finding whose key matches an earlier report joins that report’s problem, and the output names it. --problem and --new are then ignored.
  2. Your choice. --problem links the finding to each problem you name. --new records a new problem, titled with the finding’s title.
  3. A search. With neither flag, OuterLayer searches every problem in the factory. If none is close, it records a new problem.
If some problems are close, the command stores nothing and exits 3. It prints up to three problems, each with its id, title and reports. It also prints the three rules for what counts as the same problem. Exit code 3 is not a failure. Run the same command again with --problem <id> --link-reason <text> for each problem the finding reports, or with --new:

Mark when the problem started and ended

A finding’s time runs from a start event to an end event. The CLI reads the events from the session’s transcript on your machine, and from the transcripts of its subagents. The defaults for --started-at and --ended-at are in the table above. When the session has events and no start is found, the command stores nothing. It prints the recent events, each with an id and its time, and exits 1:
Run the command again with --started-at e118. An id with a prefix, such as a5c9fb78:e42, is an event of the subagent that the prefix names. --find <text> also lists older events. Only Claude Code sessions have a transcript the CLI can read. Where the CLI finds no transcript, the finding records no time. It still counts toward how often the problem occurs. See also: Findings.

outerlayer emit findings

Record a batch of findings from a JSON file.
- as the file reads standard input. The file looks like this:
The file holds:
  • "schemaVersion": 3. Any other version is refused.
  • Optional headSha and contextSourceSha. headSha defaults to the checkout’s HEAD.
  • 1 to 500 findings. Each has the fields of emit finding, under the flag’s name in camel case. --where is where.label. The --rule-* flags are rule.path, rule.relation, rule.quote and rule.line. --trace-id, --turn and --round are where.traceId, where.turnIndex and where.round.
A finding can also carry these fields:
  • problems, a list of problem ids, with linkReason. Or "new": true.
  • codeReviewProblem, a code review problem id on the same work item.
  • startedAt and endedAt, as event ids. They default as in emit finding.
  • "untimed": true, to record no time.
The whole batch is checked before anything is sent. A finding with no start event stops the whole batch, unless it carries "untimed": true. The findings that need no choice are stored. The ones that need a choice are listed and not stored, and the command exits 3. Add problems with linkReason, or "new": true, to those findings and run the command again. Findings already stored keep their problems. See Choose among candidates. With --json, the output has the same keys as emit finding. results holds one entry for each finding of the file. See also: Findings.

outerlayer emit step

Report that you started a step of the work. The work item’s Overview tab shows each step as it is reported.
The name is free text of 1 to 80 characters on one line. A step has a start and nothing else, so run the command again when the next step starts. The start time is the time you ran the command. The step names the person or the runner behind your credential as the one who started it. If the gateway cannot be reached, or answers with a 5xx, the step is queued on this machine and the command exits 0. outerlayer sync sends each queued step, which then shows at the time you ran the command. A queued step older than 14 days is dropped. If the gateway refuses the step with a 4xx, the command prints the gateway’s reason, exits 1 and queues nothing. With --json, a stored step prints id, item and startedAt. item holds the item’s number. A queued step prints a line of text, not JSON.

outerlayer emit criteria

Record a work item’s acceptance criteria as one list. OuterLayer reads criteria only from this list, never from an issue. spec edit also records the criteria in the new body of an issue.
The file is JSON, or an acceptance file ending in .md. - reads JSON from standard input.
The list holds 1 to 200 criteria. The command checks the file before it sends anything, and names the id or value it refuses.

The acceptance file

The command reads a .md file as follows:
  • Each numbered list item that opens with an id in backticks is one criterion. Its text is the rest of the item.
  • The id looks like `AC-412-01`: AC-, an issue number of three or more digits, and two digits. For a Linear or Jira issue, it looks like `AC-ENG-142-01`, with the issue key between AC- and the two digits.
  • A numbered item with any other id is ignored. A file with no matching item is refused with “lists no criteria”.
  • A (proof: <kind>) written outside backticks names the criterion’s proof.
  • A bulleted item that names an id is a note about that criterion, so it is skipped.

Replace a recorded list

Every list you record is kept, with who recorded it and when. The newest is the item’s current list. Only a person can replace a recorded list. An agent session, or a key bound to no member, gets 409. Run the replacement with your own login, outside the agent session. A JSON file may carry a top-level "drafted": true. A build sets it on a list it drafted from the issue’s description, and the item’s Criteria tab then says so. A drafted list is replaced like any other: until a person replaces it, a later build’s record is refused. A list a person records is never marked drafted, even when its file says so. Recording a list starts a new evaluation of the item’s linked pull requests. With --json, the output has workItemId, count and replaced. replaced is true when the list replaced an earlier one. See also: Record the criteria, The Criteria tab.

outerlayer emit plan-note

Record the plan note of a child work item. A plan note is what a build leaves for the other children of its plan. A later child build reads the notes of the children that have shipped. See What a child build receives.
The file is Markdown with four headings:
Or the file is JSON with four fields:
No text part is empty. A build with nothing to pass on says so in words. The three text parts hold 8,000 characters at most together. The command refuses a longer note, and states the limit, before it sends anything. A note is a summary: the pull request holds the detail. A plan note is valid when it affects no child and says that the other children have nothing to follow.

Who may record a note

The key of a build’s live claim records a note on its own item. A member who is logged in, with Withdraw others’ work (work.update), records a note on any child. A plain API key is refused with member_login_required, even one bound to a member.

Refusals

Replace a note

Every note you record is kept, with who recorded it and when. The newest note is current. Record a new note when a later change makes the first one wrong. The new note replaces the old one for the other children. The old note stays in the item’s history. A plan note is a record for builds and for people. It is never proof, and recording one does not change the item’s verdict. With --json, the output has id, workItemId and replaced. replaced is true when the note replaced an earlier one.