Skip to main content
The 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. Needs work.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. Find open and closed issues that match a query, so you do not file a spec twice. Needs work.read.
The query has 1 to 256 characters. The command returns at most 20 issues, newest activity first. It prints no matching issues when it finds none.
With --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. Needs spec.insert.
The command prints the key, the URL, the issue’s updatedAt and the command that builds the issue:
With --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 target prints can file: no, and spec file sends the tracker nothing.
OuterLayer keeps a record of every write it tries in your tracker. The record cannot be edited or deleted.

outerlayer spec edit

Replace the body of an issue that holds a spec. Needs spec.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.
Without --updated-at, the edit does not check for another person’s change, and it replaces that change.
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 between AC- and the two digits.
The command ignores a line with any other id. It records nothing when the body lists no such line, or when the item already holds the same list. Only a person may replace a list that the item already has. Inside an agent session, or with a key bound to no member, OuterLayer refuses to record the list. The edit of the issue still stands. The command prints the refusal and the 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 exits 1. 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.