junco
contents

Tickets & the inbox

The folder inbox is the second dispatch surface: drop a Markdown ticket and the daemon claims it by atomic rename, runs the agent in an isolated worktree, verifies, runs the diff-vs-spec critic, and opens a draft PR — the same pipeline the GitHub label loop feeds (see how it works).

Anatomy

A ticket is one file: YAML frontmatter between --- delimiters, then a Markdown plan body sent to the agent as the prompt. Four flavors, selected in this order:

  1. assess: present — audit ticket: parked findings, never a PR. Machine-composed by junco assess.
  2. analyze: present — investigation ticket: parked comment draft, never a PR. Machine-composed by junco analyze.
  3. repo: present — PR-flow ticket: worktree, agent, verification, critic, draft PR.
  4. none of the three — Q&A ticket: answered in place, no git, tools defaulting to a read-only subset (read, grep, find, ls).

The field-by-field frontmatter contract lives on the ticket schema page; junco schema prints the same data as JSON Schema.

The plan shape that works

Plan quality is the single biggest lever on agent performance: in testing, a structured plan ran several times faster and used far fewer tokens than a loose prompt doing the same work. The shape, from the shipped examples/pr-ticket.md:

warn — never cd inside the ## Verification block. Junco runs it with cwd set to the worktree; a leading cd moves out of it and the verification fails for the wrong reason. Plan-lint rejects it outright.
note — write portable verification commands — the block runs in the daemon's shell on whatever OS hosts it. wc -l < file pads with whitespace on BSD; sed -i needs '' there; date -v (BSD) and date -d (GNU) differ. When in doubt, prefer awk or Python one-liners.

Plan-lint

A deterministic linter checks every ticket before the agent starts. Failures route straight to failed/ with a phase_error naming the rule — before any tokens are spent. Enforced rules:

Submitting and managing

junco submit ./my-ticket.md
cat my-ticket.md | junco submit -
junco list failed
junco retry --all
junco rm add-util-2026-07-18

junco submit queues a ticket (also reads stdin); junco list [box] lists tickets newest-first per queue box (inbox|processing|done|failed); junco retry <name…|--all> moves failed tickets back to the inbox — note a retried ticket is cut at the first appended <!-- junco-result separator, so a body containing that literal line loses its tail; junco rm <name> deletes a still-queued ticket from the inbox.

Templates and examples

examples/ ships three shapes: qa-ticket.md (no repo:, answered in place), pr-ticket.md (the full plan shape above), and amend-ticket.md (amends_pr: — new commits on an existing PR branch, with an amend-mode strict Notes block that forbids rebasing, squashing, and force-pushes). templates/plain/task.md and task-code.md are blank starters in plain Markdown; templates/task.md and task-code.md are the same with Obsidian Templater date/title placeholders for vault-based dispatch. The bundled junco-dispatch skill scaffolds tickets to this exact shape and submits them for you.