overnightworks

aco

Operate aco (agent claims, the work board, landing) in any repository that coordinates with it. Use before `aco start`, `aco claim`, `aco land`, writing a pull request body, or editing an item body; when briefing agents or releasing a claim; and whenever aco refuses something.

overnightworks 0 Updated 10h ago

Resources

1
GitHub

Install

npx skillscat add overnightworks/marketplace/aco

Install via the SkillsCat registry.

SKILL.md

Operating aco as a head

This skill says the order and the traps of one lane. aco owns the facts: flags,
outputs, and refusal sentences are in the installed aco <command> --help (the
local owner) and in README.md and specs/<command>.spec.md of the aco
repository (github.com/overnightworks/aco; a local checkout may carry another
directory name, so find it with git -C <candidate> remote get-url origin, and
read the spec on the forge when none exists). Read the spec of a command before
using it the first time; this file copies none of it. The head contract
(docs/contract/HEAD.md, sections "Lanes" and "Landing") says that a lane is
claimed, reviewed and landed; this says how.

Session start

  1. aco status — who holds what; resume a lane you own (its worktree is listed).
  2. aco next (--json) — the item to pull. An item whose wait.operator holds
    a step and ideas are never named (ideas are listed apart under ideas:);
    an item with unruled expectations is refined first, not dispatched
    (specs/next.spec.md); start the atelier:refine subagent to catalogue the
    expectations the operator may have omitted.
    Code built ahead of its caller is listed in .aco/ahead-of-caller.toml
    (specs/ahead-of-caller.spec.md). A red line in aco next names an entry
    whose item is no longer open: delete that code, or, where an open item now
    calls it, point the entry at that item.
    An audit that aco next names as due (audit_due) is dispatched before the
    item it names and before the head waits, as a delegated run of the audit
    skill with the entry's run text. A recurring audit is declared as
    [[audit]] in .aco/board.toml; aco next --json lists the due ones under
    audits, and the audit is dispatched even when aco next exits 3 with no
    actionable item (specs/next.spec.md, NEXT-62..68).
  3. aco board --json reads the whole board, read-only (bare aco board refuses);
    the browser view for deciding expectation lines is aco serve (specs/serve.spec.md).

Start a lane

  • Before the claim, trace callers and owners into the scope (HEAD.md: "Lanes", Trace before the claim). A live claim changes scope only through aco rescope <n> --add PATH (or --drop PATH), after the body's scope says so, run from the claim's own worktree (it refuses the main checkout, unlike aco start); a second aco claim refuses. A lane edits a path outside its claim when the work needs it and runs on to ready-to-land; its pathsOutsideClaim lists those paths and requiredHeadActions names the one aco rescope <n> --add PATH... to run from the lane worktree before landing. A lane that stops at the scope stage with awaiting-head and an outside list is resumed after that rescope or a revert.
  • Issue item: from the main checkout, run the aco start <n> ... line that
    aco next prints and fill any <reason> placeholder it prints (for example after
    --whole); it creates the worktree
    <repo>-worktrees/issue-<n>-<slug> and branch, then claims. A blocked or skipped
    item prints no start line: it is not started; report its blocker. Scope comes
    from the item body's aco block; --scope PATH (repeatable) must match it. When
    the block lacks scope, write scope = [...] into the body first (the paths
    the trace-before-claim step named); when it lacks whole and the scope names a
    directory or more than three paths, write a one-sentence whole = "..." too,
    because aco refuses the claim without it.
    start has no --json. specs/start.spec.md.
  • A malformed ... blocked-by list refusal has so far been GitHub's issue listing
    still showing the blocker count from before a dependency was added or removed; it
    clears on a retry a minute later. Never answer it with --out-of-order. One that
    persists is a defect (see Friction).
  • --whole REASON is required for a wide scope (any directory, more than three
    paths); aco refuses the claim without it. One sentence why it does not split.
    Prefer a body whole field.
  • --out-of-order REASON is required when a higher-ranked item is free or a
    blocker is open; aco refuses the start without it (HEAD.md: "Session
    start").
  • Issue-less work: create the fix/<slug> or docs/<slug> worktree yourself, then
    aco claim --scope PATH in lane mode from inside it (specs/claim.spec.md).
    Release with aco release --merged <pr> or --abandoned REASON
    (specs/release.spec.md).
  • Identity (every lane): a Claude or Grok head leaves ACO_AGENT unset; aco takes its
    CLAUDE_CODE_SESSION_ID or GROK_SESSION_ID, which the head's own subagents inherit,
    and that identity ends with the session. A Codex head, whose session variable aco does
    not read, is started with ACO_AGENT in its environment (ACO_AGENT=<name no other running head uses> codex), so every command and agent it starts carries it; a prefix
    on single commands does not reach its delegated agents. A Codex session already
    running without it prefixes every aco command with ACO_AGENT=<name> rather than
    --agent, so there is one form everywhere and Claude's auto mode does not trip: the
    name is the holder of its existing claims when they share one (aco status shows it),
    otherwise one new name, and each old claim is landed or released under its own holder.
    Every brief names the same prefix for every aco command the agent runs, because native
    Codex subagents do not inherit it. A missing identity refuses before the named command
    starts (specs/output.spec.md, OUT-05).
  • An open pull request without a claim (a dependency bot's, a fixer's): aco adopt <pr> --no-item deps|fix|docs makes it a claimed lane on its own branch; deps needs
    dependency_paths in .aco/board.toml. Then land as usual (specs/adopt.spec.md).
  • Bundled cards (HEAD.md: "Lanes", Bundles): before the claim, append each
    card's sentences, its [[expectation]] entries byte for byte (their
    card_hash holds) and its Done when to the lead body, and pipe it through
    aco check -. Add each of the card's blockers to the lead, and point each
    item the card blocks at the lead (drop an edge from the card to the lead or to
    another folded card instead of moving it), with the dependency call under "Item bodies" below.
    Then
    gh issue close <card> --duplicate-of <lead> --comment "Folded into #<lead>.".
    Claim the lead with --scope covering every folded card's paths and --whole
    naming the bundle.

After aco start, run the lane through the lane workflow
(plugins/atelier/workflows/lane.js), starting it as the README's section
"Layout" says; when a lane may run by hand, HEAD.md's "Lanes" says.
Never message a step running inside a lane: it ends without its result and the
run hangs. Stop the run, correct the body and start a new one.

Briefs

aco brief <n> --step build|review|fix|land [--json] prints the body, live claim,
lane tip and touched files plus that step's own rules. Dispatch briefs point at the
body, so build them from this output rather than from memory (specs/brief.spec.md).
--step refuses (no .aco/brief.toml in the repository, exit 2) unless the
repository tracks .aco/brief.toml. Where it refuses, run aco brief <n> without
--step: the four sections are the brief, and the step's rules come from the
contract and this skill.

Item bodies

  • Open an item with aco item new --title … --kind task|feature|container [--parent N], with the body on stdin. Under storage = "github" it opens the
    GitHub issue, sets its issue type and parent, and refuses a possible twin (a
    similar open or recently closed title) unless --not-a-twin is given
    (specs/item.spec.md). A bare gh issue create leaves type and parent unset.
    --parent N retypes an open Task parent to Container and refuses any other
    non-container (ITEM-29, ITEM-45). A sub-issue linked by hand under a parent
    that has no type makes aco check refuse has parent <ref> of kind <kind>, which is not a container; only a container holds children (LAND-27,
    specs/landing-grammar.spec.md); set the parent's type with gh api -X PATCH repos/<owner>/<repo>/issues/<parent> -f type=Container.
  • aco --repo OWNER/NAME item new ... opens the item in another repository
    whose checkout sits under aco's configured root, under that repository's storage and rules; one
    it cannot find is refused by name and nothing is written. It prints only the
    item id, so name the repository with it when you report. Only item new takes
    a foreign --repo this way; every other command acts on the checkout it runs in.
  • Pulling an idea is a decision, not an idle step: remove the board's
    idea label and replace the body with a work-item body (the fenced aco
    block); aco claim refuses an idea whose body still lacks the
    work-item block (body incomplete).
  • Read an item body with aco item show <n> --json (its body and body_hash) and
    write the whole body with aco item edit <n> --base <hash> < file, under both
    storages. A stale-base refusal means read again and apply your change to the new
    body. A PR body uses gh pr view and gh pr edit.
  • Record each blocker as a GitHub issue dependency, never as a body line: aco next
    and aco board read only those (specs/body-block.spec.md). gh api -X POST repos/<owner>/<repo>/issues/<n>/dependencies/blocked_by -F issue_id=<id>, where
    <id> is gh api repos/<owner>/<repo>/issues/<m> --jq .id of the blocker; a
    blocker in another repository works the same way. For a brief, read an item's
    open blockers with aco check <n> (specs/check.spec.md, CHECK-08).
  • Pipe the new body through aco check - before writing it; it reports defects
    in the fenced aco block (specs/check.spec.md, specs/body-block.spec.md).
  • aco check <issue> judges a written issue body's contract.
  • A slice becomes an item with aco cut (specs/cut.spec.md).
  • An operator question is written only as an option line in the item body (shape:
    specs/body-block.spec.md, "Option lines"), never as a yes/no line. Put it on an
    existing open item with the ask tool of aco mcp (specs/mcp.spec.md). A
    session without the tool, or a revision of a returned line, writes it by hand:
    pipe the new body through aco check - first, then write it with
    aco item edit <n> --base <hash>.
    The message to the operator carries the link ask returned, or, when it returns none,
    the link aco board --url <n> --line K prints.
    Read references/decision-cards.md before writing or revising a card: it holds
    the judgement aco check cannot make.
  • After ask, start aco wait <n> --line <k> as a background command (the flag
    repeats for several lines); it ends, waking the session, when a named line is
    no longer open (specs/wait.spec.md). Start it again after a restart or a
    compaction and when it ends with exit 2; stop it when the card is settled
    another way.
  • When aco next names nothing actionable, run aco wait without an item as a
    background command, and aco next once it ends: it ends when aco next would
    name an action, such as a closed blocker or a ruled card, or when a recurring
    audit is due (AUDIT <name>, WAIT-23, WAIT-25): aco next may still exit 3,
    and the audit runs first (specs/wait.spec.md).
    Start it again after a restart or a compaction.
  • Outside an option's contract, a card carries no issue numbers, paths, file names,
    backticks, code names or flags; the problem is at most 20 words and an option name
    2 to 5 words. aco check - refuses an open or
    returned option line that breaks this (BODY-96..BODY-98 in specs/body-block.spec.md),
    and the item is malformed until the body is fixed: aco next lists it under SKIPPED
    (NEXT-36), aco board names it with its defect (BODY-50), and aco claim refuses it
    (BODY-52).
  • Record a chat answer with the record_answer tool of aco mcp, from option or
    other and the card_hash that read_inbox shows (specs/mcp.spec.md). A session
    without the tool transcribes it with aco rule <n> --line <k> --option <letter> --via chat --card-hash <hash>, the hash being the line's card_hash in aco rulings <n> --json;
    an answer that fits no option uses --other "<the operator's words>" instead of
    --option. "Unclear" has no record_answer form: it uses
    aco rule <n> --line <k> --unclear --card-hash <hash> [--note "<the operator's words>"] without --via: the line stays open and returns
    to its head (specs/rule.spec.md). aco rule only transcribes the operator's word;
    aco rulings prints the line index --line takes. aco rulings <n> (also --json)
    shows that one item, open or closed, and refuses a pull request number
    (specs/rulings.spec.md).
  • Mark a step only the operator can take with the step tool of aco mcp, on the item
    it belongs to, or with a title when no open item holds it. A step is one paste and
    at most one short action: the tool takes purpose, paste and expected, and the
    step line is the one action. The paste is one command line, with an optional leading
    cd, or one link. The tool refuses what specs/mcp.spec.md lists, so a refusal names
    the field to fix. It does not refuse a placeholder such as scp <file> host:/x, so the
    head keeps the rest: nothing to fill in, no secret, an irreversible paste says so in
    its step line, and anything longer is a script an agent writes first and the paste
    calls. read_inbox marks a step that is not of the one-paste form with form old
    (the table lacks paste, or a field breaks the tool's rules); its head rewrites it
    with the tool, which keeps its since. The
    tool writes the block's wait.operator, which alone makes the item wait on him,
    and the label needs-operator as its view; it removes neither. An answer he gives
    on the board (aco serve) removes the wait and the label and writes now itself
    (specs/serve.spec.md). An answer he gives in chat is recorded with answer_step of
    aco mcp, which works like a board answer (specs/mcp.spec.md). Either answer
    leaves next as it is: the head rewrites it only when his answer changes the work
    that follows, or when it still names his finished step.
    The message to the operator carries the link step returned, or, when it returns none,
    the link aco board --url <n> prints.
  • An item that waits carries one wait in its block: his step, a date or a trigger
    fact, with since (specs/body-block.spec.md). frozen_until is a body defect.
  • Take back your own open or returned line only with aco withdraw <n> --line <k>, never
    by editing the body (specs/withdraw.spec.md); it refuses a ruled line. Withdrawing a
    returned line drops the operator's note, so carry that note into the line that replaces
    it first.
  • Write an attempt's end (an item whose block holds an [attempt] table) with
    aco outcome (specs/outcome.spec.md), never by editing the body; repair a
    partial_write result with the command it names.

Pull request body

The body carries exactly one classification line outside any code fence:
Work-Item: #<n> plus a closing reference (Closes #<n>), or No-Item: fix|docs for
a lane claim. Run aco check <pr> before landing; it refuses a
missing, doubled or fenced line (specs/landing-grammar.spec.md); a pass proves the
classification, the closing reference, a claim on the head branch and the default-branch
target, not that the work is reviewed or the checks are green.

The lane writes its record file (record in the result, <scratch>/lane-record.json) itself and checks it with aco lane-record check; a lane whose record fails the check ends awaiting-head at record. Each run also stores its record on the claim (aco lane-record begin and add, which aco's specs/lane-record.spec.md owns); a refused begin or add ends the run awaiting-head at record. A lane outside the workflow (run by hand, issue-less, or an adopted --no-item lane) can store its runs with aco lane-record begin and add given --branch <branch> in place of the item, and land without --record; or it writes lane-record.json itself, with its independent review's verdict on the landed head and risk material or normal, runs aco lane-record check on it and lands with --record (Land; specs/lane-record.spec.md, LANREC-102). An adopted lane a dependency bot built writes "build": "none" (aco's specs/lane-record.spec.md owns the grammar). One more line records the routing, beside the file until the paste is dropped: the head pastes the lane result's routingLine as is. Its
grammar belongs to aco's specs/lane-record.spec.md (LANREC-*), which is not copied here.
The head writes it before the landing, because a landing agent does not know the routing.
The fix and gate slots each hold one value, the last model that ran; an earlier fixer or gate stays out.
Identical blocking entries print in the counted form the grammar names. On a line too long to hold every entry,
the lane keeps every count and drops the locations, and the full list stays in the lane result.

A head that changes how lanes run (routing, budgets, a brief) tags those lanes with the lane's experiment
arg and judges the change with aco stats tag:<tag> <FROM..TO before> (specs/stats.spec.md), where
FROM..TO before is the date range of the lanes that ran before the change, so the tagged lanes are compared
against them.

Push the branch, then open the pull request with gh pr create (title, head, base,
body).

A pull request lands exactly one item (LAND-18/19). A partial slice of a larger item
becomes its own item first (aco cut).

Land

Gates are green and you hold the tip the reviewers saw. After a merge of the default branch into a ready-to-land lane the tip changed, so the head re-runs the lane with pr, the new tip and deltaFrom the judged tip, which yields a fresh stored record; a lane that stored its record lands without --record, which aco refuses on a claim with stored runs; a lane without stored runs lands with --record <file>, since aco refuses a landing on a claim with neither (specs/lane-record.spec.md, LANREC-100). A run that stopped awaiting-head or was lost may already be approved at the head: the landing path is in workflows/lane.md, Awaiting-head results. Landing is delegated as a
named task, but the precondition is aco's. The landing task runs under the claim's
identity. A subagent of the claiming head's own provider inherits it and passes neither
ACO_AGENT nor --agent; an agent started through another provider's CLI (grok,
codex) can carry its own session variable, so the head does not hand the landing to
one. Any other identity is refused. A later session resuming an issue lane whose claim
an earlier session holds (aco status prints the holder before its (role)) first runs
aco handover <n> --from '<holder>' --reason '<why, e.g. the operator restarted the head>'
once, then lands, releases and rescopes as the holder (specs/handover.spec.md); never
--agent or ACO_AGENT='<holder>'. A successor head takes an issue-less lane claim the same way with
aco handover --branch <branch> --from '<holder>' --reason '<why>', then lands,
releases and rescopes it as the holder with no override (specs/handover.spec.md HANDOVER-16..HANDOVER-22).

  1. Stand in a clean checkout of the default branch — the primary checkout, never the
    lane worktree.
  2. aco land <pr> --head <sha> (the lane's requiredHeadActions spell the command, without --record once the lane stored its record; a lane without stored runs adds --record <file>) merges only if the PR head is that sha, then runs
    the release for you: claim released, clean merged worktree and branch removed
    (--keep-worktree keeps them). specs/land.spec.md. aco land has already
    released the claim; after a land, the head's release step is verifying that
    with aco status. A merge made outside aco land is released with
    aco release <n> --merged <pr> for an issue lane; without <n> aco
    takes it for an issue-less lane and refuses. Make that merge so the squash commit ends with the pull request's classification line as its trailer (specs/landing-grammar.spec.md): gh pr merge <pr> --squash --match-head-commit <sha> --body '<classification line>'. aco land also fast-forwards this checkout to the landed main
    (in marketplace that checkout is the installed contract for every agent);
    the landing runs no git command beside or after it.
    Where the target branch has a merge queue, aco land writes the body, enqueues
    the pinned head and waits for the queue to merge it, about a minute being
    normal. A re-run resumes: queued, it waits again; merged, it releases; removed
    from the queue, it starts at the preflight. A red queue run drops the entry,
    a drop without one is a re-run, and a third red goes to the repository's
    head. The refusal sentences are in
    specs/land.spec.md (LANDCMD-59 to LANDCMD-70).
  3. The landing agent reports the follow-up lines aco land prints (freed:,
    next:, in aco also reinstall:) to the head and runs none of
    them. The head acts on them as HEAD.md's "Landing" says, then
    runs aco next.

If the merge worked but a step failed, aco land prints follow-up incomplete
and the re-run command; re-run it, which resumes and never merges twice.
Abandoned: aco release <n> --abandoned REASON, the item stays open; only a lane without stored runs (a workflow lane that never began a run: it ended at sync or at the scope check, or aco refused its begin; or a lane outside the workflow that stored no runs) passes --record <file>, the lane result's record path or the lane's own file, and a workflow lane's requiredHeadActions say so. A lane stopped
by the Claude usage limit writes no record, and the release goes without --record. Until the routing line is dropped, the head
starts the reason with the lane's Routing: line, on one line within 512 characters, since aco
parses an abandoned lane's routing only then (the same slots and counting as in the pull request body: on a line too long
for every entry the locations go and every count stays, and the full blocking list stays in the lane result);
where the lane has an open pull request, the line goes into that body as usual.

Rename a repository

The head runs this, in this order; the operator takes only the steps marked so, each
as the ready step given here. The head fills in the real repository names (OLD, NEW)
Sonar keys (KEY_OLD, KEY_NEW) and the file name of the workflow that runs the quality
gate (WORKFLOW, from gh workflow list) in the first line of each block and in each link
before handing it over; the blocks use them as shell variables. The Sonar key and binding follow quality's
docs/naming.md, P2. aco's trap is
PIN-52 and E-PIN-42 in specs/storage-pin.spec.md of aco: every clone whose origin
still names the old repository refuses a cross-repository read until step 5 re-points it.

  1. Drain (agent): aco status shows no claim and no live lane but the rename's own, and
    no lane worktree is open (uv sync --reinstall can fail on one). Move the callers
    of the repository's actions and reusable workflows first: GitHub redirects git and
    web URLs, not uses:.
  2. One pull request (agent) carries every name change (package, CLI, config
    variables, image name, documents) except the Sonar key, green under the old name;
    the key commit (the change of sonar.projectKey in sonar-project.properties) stays local. Settings another repository owns (platform's OpenTofu
    GitHub settings) change and apply first.
  3. Disable CI (operator; auto mode refuses it to an agent as a CI bypass):
    OLD=old-name && cd ~/git/$OLD && gh workflow disable WORKFLOW
  4. Rename (agent): gh repo rename NEW -R overnightworks/OLD --yes. Then the Sonar key (operator, web): open
    https://sonarcloud.io/project/key?id=KEY_OLD, field Update Key, set KEY_NEW and
    save, once its Background Tasks show nothing
    pending.
  5. Local move (agent), while nothing runs inside the clone: the repository's own sessions
    end first and the move runs from a session outside it. The block stops at the first
    failure and -x shows where; it stops before moving anything when a target exists; a
    missing worktrees, kept-files (~/git/tmp/$OLD) or Claude project directory is skipped. Each origin
    keeps its URL form and changes only the repository name. Claude project directories
    of worktrees (<P>-OLD-worktrees-*) stay: with no worktree open they belong to
    removed worktrees. If auto mode refuses a part, the operator takes that part (#586):
    OLD=old-name NEW=new-name bash -euxo pipefail -c '
    shopt -s nullglob
    P=~/.claude/projects/${HOME//\//-}-git
    cd ~/git
    for target in $NEW $NEW-worktrees $P-$NEW tmp/$NEW; do
      if [ -e $target ]; then echo "$target exists, nothing moved" >&2; exit 1; fi
    done
    mv $OLD $NEW
    if [ -d $OLD-worktrees ]; then mv $OLD-worktrees $NEW-worktrees; fi
    if [ -d tmp/$OLD ]; then mv tmp/$OLD tmp/$NEW; fi
    dirs=($NEW $NEW-worktrees/*)
    for d in "${dirs[@]}"; do
      url=$(git -C "$d" remote get-url origin)
      git -C "$d" remote set-url origin "${url%/*}/$NEW.git"
    done
    if [ -d $NEW-worktrees ]; then git -C ~/git/$NEW worktree repair ~/git/$NEW-worktrees/*; fi
    if [ -d $P-$OLD ]; then mv $P-$OLD $P-$NEW; fi
    for d in "${dirs[@]}"; do
      if [ -f "$d/uv.lock" ]; then (cd "$d" && uv venv --allow-existing && uv sync --locked --reinstall); fi
    done'
    Never re-clone: open worktrees, local branches and unpushed commits live only in the clone; aco's claims live on the remote. Where .aco/board.toml names a canonical remote other than origin, re-point that one the same way. Also set the
    origin of any deploy checkout outside ~/git. The agent reports user units, links
    in ~/.local/bin, ~ and ~/srv, and uv tools that point into the old path to the
    repository's head.
  6. Resume (head): claude --resume from the new clone, never with --fork-session, keeps the session id, so the
    claim holder stays valid. Scratchpads do not move: a brief naming one's absolute path
    is stale. Peer session addresses follow the directory: tell the peers the new one.
  7. Re-enable CI (operator):
    NEW=new-name && cd ~/git/$NEW && gh workflow enable WORKFLOW
    Then an agent pushes the key commit (sonar.projectKey set to KEY_NEW) and the head lands it. The operator re-saves the
    binding at https://sonarcloud.io/project/settings?id=KEY_NEW: General Settings ›
    Repository binding, Save. An agent checks that SonarCloud lists no project with KEY_OLD.
  8. Aftermath (agent): gh repo edit NEW --description "…". Each dependent gets one
    release item for what names the old repository (dependency pins, images, imports,
    config variables, documents). Rewrite open item bodies that link the old name before
    any repository takes it, because a reuse ends the redirect; closed items and comments
    stay, a named risk. The old image package is deleted only on the operator's yes.

Open risk: without hal rename, whether an agent's auto mode allows each part of step 5
is unverified; the first run (#586, marketplace to atelier) proves it or names the part
as the operator's.

Friction

A refusal this skill did not predict is a defect in the skill or in aco. Resolve it
from the spec first, then open one item in overnightworks/aco
(search it first) naming the command, the refusal sentence and the wish with its
reason (not a finished solution), and extend this skill only where the answer is
a how, not a copied fact.

A lane-workflow step that does not fit is reported on the marketplace board
(HEAD.md: "Other repositories", Friction goes to its owner), not worked
around silently.