outerlayer spec commands find, file and edit the issue that holds a spec, in your factory’s issue tracker. The same four commands work for GitHub, Linear and Jira. You need only an OuterLayer credential, because OuterLayer holds the tracker’s credential.
The starter /spec skill runs these commands for you. See Write a spec with /spec. To connect a tracker, see Connect an issue tracker.
Every command on this page takes these options:
A command connects the repository to a factory on its own when exactly one factory fits. See Automatic connection. A failed command prints the reason and exits
1. See Refusals.
outerlayer spec target
Say where a spec would be filed, and whether the factory can file there. Needswork.read.
A factory can file in GitHub when it has a linked repository, and in each Linear or Jira tracker it is connected to. When it can file in more than one,
tracker shows the factory’s default tracker. With no default, it shows none chosen until you pass --tracker. To set a default, see Connect an issue tracker.
With --json, the output has tracker, trackers, scopes, repositories and canFile. tracker is null when none is chosen.
outerlayer spec search
Find open and closed issues that match a query, so you do not file a spec twice. Needswork.read.
no matching issues when it finds none.
--json, the output is { "issues": [ ... ] }. Each issue has key, state, title, tracker, updatedAt and url.
outerlayer spec file
File a spec as a new issue. Needsspec.insert.
The command prints the key, the URL, the issue’s
updatedAt and the command that builds the issue:
--json, the output has key, number, repository, tracker, updatedAt, url and workBuild. workBuild is the command that builds the issue.
Filing needs two things:
- A key with
spec.insert. The Agent preset carries it. To add it to another key, see API keys. - A tracker connection that can write. For GitHub, an organization admin approves the Issues: Read and write permission of the OuterLayer GitHub App once. For Linear and Jira, connect the tracker with write access. Until then,
spec targetprintscan file: no, andspec filesends the tracker nothing.
outerlayer spec edit
Replace the body of an issue that holds a spec. Needsspec.update, which is a permission of its own. A key can file specs and not be able to rewrite them.
<key> is the issue key, such as acme/api#12 or ENG-142.
Pass the
updatedAt that spec file or your last spec edit printed. On Linear, any change to the issue counts as a change, not only a change to its description.
The command prints the key, the URL and the issue’s new updatedAt. With --json, the output has key, number, tracker, updatedAt and url.
The criteria of the work item
When the issue has a work item,spec edit also records the criteria of the new body as the item’s list. This is what emit criteria does.
The command reads a criterion from each numbered line that opens with an id in backticks:
- For a GitHub issue, 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, the id looks like
`AC-ENG-142-01`: the issue key is betweenAC-and the two digits.
emit criteria command to run yourself.
With --json, the output also has a criteria object. It has item (the item’s number), outcome (recorded, unchanged or not_recorded) and count. For not_recorded, it also has reason. The object is absent when the body lists no criteria or the issue has no work item.
Refusals
A refused command prints one sentence that says what is wrong, with the choices when there are any. It exits1. The API sends the code as error.code.
A key without the needed permission gets
403, and OuterLayer sends the tracker nothing. The message names the missing permission.