--- name: quire description: Decides WHERE and WHEN to put working documents — reports, plans, goals, brainstorms, designs, journals, research, specs, tickets, bug notes. Use this skill whenever the user asks you to write a "report", "plan", "goal", "brainstorm", "design", "journal", "research note", "spec", or anything "in the quire" (formerly "workpad"; the old word still applies) — and also when another skill is about to drop a markdown file somewhere ad-hoc (e.g. a plugin's own `docs//` subdirectory, the repo root, `/tmp`, or alongside source code). If a quire exists, the quire wins for documents. Non-document output (raw state, streams, gate output) goes to scratch. This skill steers other skills toward one predictable place for markdown documents. allowed-tools: Bash(uv:*) --- # Quire Scope: markdown *about* the work (reports, plans, brainstorms, post-mortems). Decides **where** a document goes and **which kind** it is, not its contents. Wins over any other skill's folder (plugin-named folder, sibling `notes/`, repo root). ## Where the quire lives First hit wins: 1. **Explicit user instruction** in this conversation. 2. **`QUIRE_FOLDER`.** Subshells may not inherit it: try `just quire-folder` (or an equivalent recipe; `just` loads `.env`), then `printenv QUIRE_FOLDER`. Non-empty path = base. 3. **`WORKPAD_FOLDER`** (old name, fallback): same way, `just workpad-folder`, then `printenv WORKPAD_FOLDER`. 4. **External tickets folder** outside the repo (e.g. `../-tickets/`, or `GITEA_TICKETS_DIR`), if configured: base `/quire/`, or `/workpad/` if only that exists; tickets beside it as `//`. Unsure one exists: ask. 5. **`/docs/quire`** at the project root, if it exists. If `docs/workpad/` also exists, use `docs/quire/` and say once that the old folder is there too. 6. **`/docs/workpad`**, if it exists. 7. **`/.quire`**, if it exists. 8. **`/.workpad`**, if it exists. 9. **Else ask** where, offering `docs/quire/` (or `.quire/` without `/docs`); confirm before creating folders. Non-interactive agents (Athanor, gremlins, reviewer, other closed-door agents) take the offer and flag it. ## Folder structure Always: `brainstorm/` (options, half-formed ideas), `goals/` (acceptance criteria, milestones), `designs/` (architecture, RFC-style), `plans/` (steps to execute), `reports/` (findings, status). On demand: `archive/` (superseded), `bugs/`, `journals/` (append-only narratives), `research/` (external research, prior art), `specs/` (frozen), `tickets//` (Ticket context), `adepts/` (`spire:adepts`), `logs/` (Tiers). Create an on-demand folder when needed, never speculatively. Unknown folders are the user's; ignore them. ## Tiers - `reports/`: lasting reports, handoffs included. Tracked. - `logs/-/`: readable record of one build: `run.md`, `trunk-notes.md`, `review-.md`, `recheck-.md`, `brief-.md`. Git-ignored by the guard below. Stays in the main quire under an active ticket context. - **scratch**: `/.spire/scratch///`: raw state (streams, gate output, job files). Git-ignored. `` = the run log's checkout; run log in another repo or none: the cwd's. Override: `SPIRE_SCRATCH` (gremlins: `--scratch`). - Git-ignored (`logs/`, scratch, trash): Grep and Glob skip them; use the explicit path or `ls`. - `W` = `uv run --script "${CLAUDE_SKILL_DIR}/quire.py"`: any OS or shell, no POSIX snippets, JSON out; `--run ` sets ``. Briefs to other agents: its absolute path. If `${CLAUDE_SKILL_DIR}` appears literally, it is this SKILL.md's own folder; resolve it there and do not search elsewhere. - **Trash**: at build close Igor moves the run dir to `/.spire/trash//`, also when `SPIRE_SCRATCH` is set: `W trash …`. Ignored by the guard; the user empties it. - **7-day sweep**: run dirs with no file modified in 7 days and no `keep` file: `W sweep --move` (scratch root). - **Ignore guard** (fallback: `/spire:init` writes `/.spire/` and `/logs/` to the root `.gitignore`, or `.git/info/exclude`). Before the first write to `logs/` or `.spire/`, the dispatcher starting the run runs it itself (the Athanor at build start; Igor or Zathras before a dispatch writing there). Never overwrites; `.spire/.gitignore` covers scratch and trash: `W guard `. **Never commit:** scratch, `logs/`, gremlin state, Playwright or browser auth state, walker and probe scripts, briefs, real-data dumps, `__pycache__`. - Browser state and walker or probe scripts live in the run's scratch dir. Promote a script to `scripts/` or tests only by explicit decision. - During a build the Athanor commits code plus the files its brief names. Igor commits other quire files after a hand-back, by explicit paths, never while an Athanor commits in the same checkout. - A link into scratch or `logs/` is a pointer only: the claim stands on the quoted line. ## Ticket context **Ticket folder**: `/tickets//` (or `//`), created on demand once the id is known. **Active** only when: the user named the ticket this session ("we're on #42"), a ticket skill opened or created its folder this conversation, or the user asked for a file in the ticket. A folder existing or a number in the branch name does not count. Ticket-shaped but unnamed: ask once, keep the answer. The most recently named ticket stays active until the user switches. Reply names the ticket beside the path. Routing while active: - **Ticket folder:** `plans/`, `designs/`, `brainstorm/`, `reports/`, `bugs/`. - **Main quire:** `journals/`, `logs/`, `goals/`. - **`research/`, `specs/`:** main quire if another ticket would want it, else the ticket folder; a spec outliving the ticket is promoted to the main quire on close. Ticket folder: same kind subfolders, naming and subfolder rules; root holds only ticket-level files (`context.md`), never loose plans or reports. Main-quire files written under a ticket context carry the id in the slug (`2026-05-05-14-42-auth-token-leak.md`). ## File naming `YYYY-MM-DD-hh-` prefix: required in `reports/`, `plans/`, `journals/`, `bugs/`, `research/`; optional in `goals/`, `designs/`, `specs/`. Then a kebab-case topic slug: `2026-05-05-14-auth-token-leak.md`, not `2026-05-05-14-report.md`. ## When to create a subfolder One artifact, one file. **Multiple related files** (research cascade, report with appendices, plan with design notes): a dated subfolder (`reports/2026-05-05-15-q2-perf-audit/overview.md`, …); files inside drop the date prefix. ## Picking the right kind of document - **Plan vs. spec:** default `plans/`; `specs/` only for a source of truth not expected to change. - **Goal vs. plan:** what to reach vs. how. - **Report vs. journal:** a snapshot, revised vs. append-only (post-mortems, multi-day bug hunts, correction narratives). - **Brainstorm vs. design:** options without commitment vs. one approach to build from. ## Lifecycles Feature: `brainstorm → goal → design → plan`. Reactive: `report → design → plan`, `report → plan`, or just `plan`; a design only for a non-trivial fix. Skip stages that don't earn their keep. A new stage = a new file in the next folder; the earlier one stays. ## Defaults "Write a report / plan / brainstorm on X" = a file in the right folder, named as above, plus a short reply with the path, not the contents. Another skill's markdown artifact: that skill owns contents, this one location and name (ticket routing included). Out of scope: document format, ticket lifecycle, search tooling. ## Hand-back Final message when a brief asks for it: five fixed headings, one line per item; detail stays in the files. - **Done**: work done, with commits. - **Open**: unfinished work, extra work found, surviving findings, the stop reason if stopped early. - **Decisions taken (override if you disagree)**: each default taken, with its flag. - **Blocking decisions**: only points with no acceptable default; usually empty; at the end, never mid-run. - **Paths**: outputs, run log, reviews, scratch run dir, leftovers outside scratch.