/build skill records both for you. Use this page to record them by hand or in CI, or to read what a build recorded. Judges and the merge gate says how they count toward the verdict.
A runner records the result of each judge itself. See Write a judge.
Before you start
- Know the item’s number. It is the number on the Work page, not the issue number.
- Sign in to the factory with
outerlayer login, or use a factory key. - Hold the Emit evidence permission. A browser
outerlayer loginholds it when your role can create factory keys. The owner, admin and write roles can. Otherwise, use a factory key bound to you. See API keys.
Record the criteria
An item’s acceptance criteria are one list recorded on the item. OuterLayer reads criteria only from this list, never from the issue. A build records the list before it writes code:- It keeps each criterion’s text as the issue wrote it.
- It keeps the issue’s ids when every criterion has an id that fits the id rules. Otherwise it numbers the criteria
AC-<item number>-01,-02and so on. - It keeps a proof the issue states, as in
(proof: screenshot). - It gives every other criterion the proof a reviewer needs to believe it. A result that follows something a person does in your product’s interface gets a video. A state that a person only opens or looks at gets a screenshot. Text that a person reads gets a log: command output, a log line or an API response. A report that a tool writes gets a report. An outcome that none of these shows gets a
testproof: the runner records its test results at the head commit. A criterion that the issue says a person proves gets no proof. - When the issue holds no criteria, it drafts them from the issue’s description. The Criteria tab then says the build drafted the list.
(seam: component) says where the test runs. It does not change the proof. The build’s final report lists each proof it added.
To record the list yourself:
-
Write the criteria to a file:
-
Record it on the item:
proof names the artifact kind that proves the criterion. null means any artifact bound to the id proves it. The command also reads an acceptance file that ends in .md.
Only a person can replace a recorded list. An agent session can record an item’s first list, but not a replacement. A drafted list is no exception. Run the command with your own login, outside the agent session.
The id rules, the acceptance file format and the exit codes are in outerlayer emit criteria.
Attach an artifact
Capture the state first, then emit it:
A file outside the first five rows never counts as a stronger kind. Convert a
.mov recording to .mp4 or .webm before you emit it, for example.
A file can be at most 8 MiB. Video is the kind most likely to reach that limit.
Record each video proof of a web app as a chapter of the item’s one demo, not as a video of its own. See Record a demo. For an app that Playwright cannot drive, such as an iOS or Android app, see Record a video of a native app. A video that you emit by hand is never recorded again at a new head.
Where the artifact is attached
Inside a session started on a work item, the file is queued. The nextouterlayer sync uploads it with the session and prints its link. A session that was not started with OUTERLAYER_WORK refuses the emit, because nothing it produces may leave the machine.
Outside a session, the file uploads at once. It attaches to the first of these that exists:
- The pull request
--prnames. - In GitHub Actions, the pull request the run is for.
- The current git checkout.
--pr.
An artifact stays pending until a pull request claims it. Open the pull request, or declare it with outerlayer work pr, within 14 days. For an artifact emitted from a session, the period is 28 days. After that, OuterLayer deletes the file.
Bind it to a criterion
Pass the id of a recorded criterion to--for. The Criteria tab then shows the artifact on that criterion’s row:
outerlayer emit artifact records the commit it runs at.
A push moves the head. Every proof from an earlier commit then shows as out of date on the Criteria tab. Emit it again at the new head. See The Criteria tab.
A screenshot or video that no test can record is the one exception. The runner’s criteria judge can keep it current when no change since its commit can alter what it shows. See Kept proofs.
Prove a criterion with test results
A criterion can declare"proof": "test". Bind JUnit XML results to it with --for. Vitest, Jest, pytest, Go (through gotestsum), JUnit, RSpec and many other test runners can write that format.
--test:
= says where the test is written. The Criteria tab links a test to its source only when it knows the test’s file. Leave that part out when the results name the file themselves:
- Vitest’s JUnit reporter writes the file by default.
- jest-junit writes it only with its
addFileAttributeoption. - pytest writes it only under
junit_family=xunit1.
--test "<name>=<path>".
Outside CI, the command refuses results in which no bound test names a file, and uploads nothing. A host runs the tests again at the build’s final commit, and it finds them by their file. A CI job runs the tests at each commit, so there the command stores the results and prints a warning.
A criterion is proven when all of these are true:
- No bound test failed or errored.
- At least one bound test passed.
- No test you named with
--testwas skipped.
--replaces, or the old failure still counts.
The head-commit rule in Bind it to a criterion applies to results too. In GitHub Actions, the command records the pull request’s head commit, not the merge commit the checkout holds. On other CI systems, check out the pull request’s head commit before you run the tests.
With no passing results at the head commit, the work item’s page says “No passing JUnit results are recorded at this commit”. Run the tests at the head commit and emit the XML again. outerlayer work proofs --record does both for you when the earlier results named each test’s file. See How a test proof is recorded.
Test results from any source prove a criterion: CI, a runner build or a local session. To read the results on the item, see Read test results.
Replace an earlier artifact
outerlayer emit artifact prints the artifact’s id. Pass that id to --replaces to correct the artifact:
--replaces.
Record proofs by rerunning tests
A push makes every proof out of date. To record them again without a script of your own, let each criterion’s test write its proof.outerlayer work proofs --record then reruns those tests at the new head.
- Write a test that holds the criterion’s id. A demo test names it in a chapter. Any other test names it in a comment or a string.
-
Make the test write its proof. A report, log or file proof is the file
$OUTERLAYER_PROOF_OUT/<criterion id>.<ext>. The file’s kind must be the kind the criterion declares. -
Commit
.outerlayer-proofs.yamlat the repository root. It lists the runners that run the tests, and optionally the commands that start and stop the app: - Commit the tests.
-
Run
outerlayer work proofs --record.
test proof, the command runs the tests its newest results named, and emits their JUnit results. Emit the first results yourself, as in Prove a criterion with test results.
A runner runs the same command itself after a build or an amend ends, at the final commit. See The proofs stage. The built-in automation Record proofs again starts an amend that records the proofs at the head. It starts when the head moves later, or when a build ends before it records its proofs. See When the proofs are recorded again. A session of your own still runs the command after each push, because the runner’s recording can fail.
The file format, the other flags and the exit statuses are in outerlayer work proofs.
Record a video of a native app
Playwright drives a browser. For an app that it cannot drive, such as an iOS or Android app, a flow test records the video. The runner then records it again at each new head, as it does any other proof file. Know where the test runs before you write it. A runner build runs in a Linux container. An iOS simulator does not run there. Use an Android emulator on a host with KVM, or a remote simulator or device service that the build can reach.- Write a flow test for the criterion with a tool that drives your app, such as Maestro or Detox. Name the criterion’s id in the test.
-
Make the test save a screen recording of the flow as
$OUTERLAYER_PROOF_OUT/<criterion id>.mp4. The recorder of the simulator or emulator can make it, such asxcrun simctl io booted recordVideooradb shell screenrecord. -
Keep the file under 8 MiB. This command makes a recording smaller and writes it where the runner looks:
-
Add a runner for the flow tests to
.outerlayer-proofs.yaml. SettimeoutMinuteswhen a run can take longer than 10 minutes, for example to boot the simulator and install the app: -
Commit the flow tests and the proofs file, then run
outerlayer work proofs --record.
timeoutMinutes, and then records no proof from the file.
Find it afterwards
Once it uploads, the artifact appears on the work item’s page:- on its criterion’s row on Criteria, when it is bound to one;
- beside the row that names it on Judges;
- otherwise under Other artifacts on Judges.
- From a session, run
outerlayer sync. It prints a line for each artifact it uploads, ending with the link.outerlayer sync --jsonlists them underuploadedArtifacts. - Outside a session,
outerlayer emit artifactprints the link on the line after the id. - After another sync uploaded it, run
outerlayer sync --link <artifact id>, with the idemit artifactprinted. It prints the link and sends nothing. - From any machine, the
list_artifactstool of the MCP server lists a work item’s artifacts with their links.
emit artifact prints is not part of the link.