diff --git a/.claude/skills/implement/SKILL.md b/.claude/skills/implement/SKILL.md new file mode 100644 index 00000000..d20ebd0f --- /dev/null +++ b/.claude/skills/implement/SKILL.md @@ -0,0 +1,20 @@ +--- +name: implement +description: Implement a piece of work based on a spec or set of tickets. +disable-model-invocation: true +--- + +Implement the work described by the user in the spec or ticket(s). + +Work one ticket at a time, from a fresh context per ticket. If the ticket isn't on a branch yet, branch from `develop` as `{issue-number}-{kebab-title}` per the repo convention. + +Use `/tdd` where possible, at pre-agreed seams. + +Run checks as you go, not just at the end: + +- **Frontend** (`angular-client/`): typecheck/build regularly; run single Karma specs while iterating (`ng test`), the full suite once at the end; `npx prettier --check` + `npx ng lint` before finishing. +- **Backend** (`scylla-server/`): `cargo build` and single tests regularly, `cargo test` once at the end. + +Once the behaviour is done, use `/code-review` to review the work. + +Commit with `/commit` (applies the `#{ticket-number} - {description}` convention) to the ticket's branch. Do not push or open a PR unless asked — that's `/open-pr`. diff --git a/.claude/skills/to-spec/SKILL.md b/.claude/skills/to-spec/SKILL.md index b39d7d0d..ecc3491a 100644 --- a/.claude/skills/to-spec/SKILL.md +++ b/.claude/skills/to-spec/SKILL.md @@ -8,15 +8,19 @@ This skill takes the current conversation context and codebase understanding and Issue tracker conventions live in `docs/agents/issue-tracker.md`; the triage label vocabulary lives in `docs/agents/triage-labels.md`. +A spec is a **review artifact** — it is staged and reviewed as a PR before it publishes as an issue. See `docs/agents/spec-review.md`. + ## Process 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching. +If a wayfinder map fed this spec, read the map's Decisions-so-far as the source and link the spec back to it. A large effort may be several specs — run this skill once per coherent feature. + 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better — the ideal number is one. Check with the user that these seams match their expectations. -3. Write the spec using the template below, then publish it to the project issue tracker. Apply the `ready-for-agent` triage label - no need for additional triage. +3. Write the spec using the template below to `docs/spec//spec.md`, and open it as a PR for review (`docs/agents/spec-review.md`). Once the PR is approved and merged, publish the spec as an issue and apply the `ready-for-agent` triage label - no need for additional triage. `to-tickets` then breaks it into implementation tickets parented to this spec. diff --git a/.claude/skills/to-tickets/SKILL.md b/.claude/skills/to-tickets/SKILL.md index c68ffc3e..077c884c 100644 --- a/.claude/skills/to-tickets/SKILL.md +++ b/.claude/skills/to-tickets/SKILL.md @@ -10,6 +10,8 @@ Break a plan, spec, or conversation into a set of **tickets** — tracer-bullet Issue tracker conventions live in `docs/agents/issue-tracker.md`; the triage label vocabulary lives in `docs/agents/triage-labels.md`. +A ticket set is a **review artifact** — it is drafted as files and reviewed as a PR before the tickets publish. This is the gate that keeps unreviewed tickets off the tracker. See `docs/agents/spec-review.md`. + ## Process ### 1. Gather context @@ -60,9 +62,13 @@ Ask the user: Iterate until the user approves the breakdown. -### 5. Publish the tickets to the issue tracker +### 5. Stage the tickets for review + +Draft the approved tickets as local files under `docs/spec//` — one kebab-named file per ticket, using the issue-body template below — and open them as a PR against `develop` (draft per the repo convention, marked ready when set). This is the review gate (`docs/agents/spec-review.md`): the slicing is reviewed as a diff before any issue exists. + +### 6. Publish once the review PR merges -Publish the approved tickets to the project issue tracker (GitHub Issues — see `docs/agents/issue-tracker.md`). Publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real issue identifiers. Use GitHub's native sub-issue / blocking relationship where it fits; otherwise set each ticket's "Blocked by" to the blocking issues. Apply the `ready-for-agent` triage label unless instructed otherwise — the tickets are agent-grabbable by construction. +After the PR is approved and merged, create the tickets on the issue tracker (GitHub Issues — see `docs/agents/issue-tracker.md`), one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real issue identifiers. Use GitHub's native sub-issue / blocking relationship where it fits; otherwise set each ticket's "Blocked by" to the blocking issues. Set each ticket's `Parent` to the spec issue. Apply the `ready-for-agent` triage label unless instructed otherwise — the tickets are agent-grabbable by construction. Then delete the temporary `docs/spec//` drafts; the tracker issues are the durable home. Do NOT close or modify any parent issue. diff --git a/.claude/skills/wayfinder/SKILL.md b/.claude/skills/wayfinder/SKILL.md new file mode 100644 index 00000000..b36fe12b --- /dev/null +++ b/.claude/skills/wayfinder/SKILL.md @@ -0,0 +1,137 @@ +--- +name: wayfinder +description: Plan a huge chunk of work — more than one agent session can hold — as a shared map of investigation tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear. +disable-model-invocation: true +--- + +A loose idea has arrived — too big for one agent session, and wrapped in fog: the way from here to the **destination** isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a **shared map** on the repo's issue tracker, then works its tickets one at a time until the route is clear. + +The destination varies per effort, and naming it is the first act of charting — it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic — engineering work, course content, whatever fits the shape. + +## Plan, don't do + +Wayfinder is **planning** by default: each ticket resolves a decision, and the map is done when the way is clear — nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its **Notes** — carrying execution into the map itself — but absent that, produce decisions, not deliverables. + +## Refer by name + +Every map and ticket is an issue, so it has a **name** — its title. In everything the human reads — narration, the map's Decisions-so-far — refer to it by that name, never by a bare id, number, or slug. A wall of `#42, #43, #44` is illegible; names read at a glance. The id and URL don't vanish — a name wraps its link — but they ride *inside* the name, never stand in for it. + +## The Map + +The map is a single issue on this repo's issue tracker, labelled `wayfinder:map` — the canonical artifact. Its tickets are child issues of the map. + +The map is an **index**, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links. + +Argos tracks issues on GitHub. See the **Wayfinding operations** section of `docs/agents/issue-tracker.md` for how the map, its child tickets, blocking, and frontier queries are physically expressed here. + +### The map body + +The whole map at low resolution, loaded once per session. Open tickets are **not** listed — they are open child issues, found by query. + +```markdown +## Destination + + + +## Notes + + + +## Decisions so far + + + +- [](link) — + +## Not yet specified + + + +## Out of scope + + +``` + +### Tickets + +Each ticket is a **child issue** of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session: + +```markdown +## Question + + +``` + +Each ticket carries a `wayfinder:` label — one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)). + +A session **claims** a ticket by assigning it to the dev driving the map, **first**, before any work, so concurrent sessions skip it. That assignee _is_ the claim: an open, unassigned ticket is unclaimed. + +Blocking uses the tracker's **native** dependency relationship — essential because it renders the frontier _visually_ in the tracker's own UI, so the human sees what's takeable without opening the map. Only a tracker that lacks native blocking falls back to a body convention. A ticket is **unblocked** when every ticket blocking it is closed; the **frontier** is the open, unblocked, unclaimed children — the edge of the known. + +The answer isn't part of the body — it's recorded on resolution (see [Work through the map](#work-through-the-map)). Assets created while resolving a ticket are linked from the issue, not pasted in. + +## Ticket Types + +Every ticket is either **HITL** — human in the loop, worked *with* a human who speaks for themselves — or **AFK**, driven by the agent alone. A HITL ticket only resolves through that live exchange; the agent never stands in for the human's side of it (a grilling agent that answers its own questions has broken this). + +- **Research** (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases via the `/research` skill. Creates a markdown summary as a linked asset. Use when knowledge outside the current working directory is required. +- **Prototype** (HITL): Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI/logic code via the `/prototype` skill. Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question. +- **Grilling** (HITL): Conversation via the `/grilling` and `/domain-modeling` skills, one question at a time. The default case. +- **Task** (HITL or AFK): Manual work that must happen before a *decision* can be made — nothing to decide, prototype, or research, but the discussion is blocked until it's done. Signing up for a service so its API can be judged, provisioning access, moving data so its shape can be seen. This is the one type that *does* rather than decides — and it earns its place by unblocking a decision, not by delivering the destination. The agent drives it alone where it can (AFK); otherwise it hands the human a precise checklist (HITL). Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on. + +## Fog of war + +The map is _deliberately_ incomplete: don't chart what you can't yet see. Beyond the live tickets lies the **fog of war** — the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets — one at a time, until the way to the destination is clear and no tickets remain. + +The map's **Not yet specified** section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier _toward_ the destination — everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed. + +**Fog or ticket?** The test is whether you can state the question precisely now — _not_ whether you can answer it now. + +- **Ticket when** the question is already sharp — even if it's blocked and you can't act on it yet. +- **Not yet specified when** you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it. + +**Not yet specified** excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section). + +## Out of scope + +Fog only ever gathers _toward_ the destination. The destination fixes the scope, so work beyond it is **out of scope** — it isn't fog, and it doesn't belong in **Not yet specified**. It gets its own **Out of scope** section on the map: work you've consciously ruled out of _this_ effort. Scope, not sharpness, lands it here. + +Out-of-scope work never graduates — the frontier stops at the destination — so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption. + +Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination — mis-scoped in while charting, or exposed by a resolution — **close it** (a closed ticket is unambiguously off the frontier) and leave one line in the **Out of scope** section: the gist plus why it's out of scope, linking the closed ticket. It stays out of **Decisions so far**, which records the route actually walked — a scope boundary isn't a step on it. + +## Invocation + +Two modes. Either way, **never resolve more than one ticket per session.** + +### Chart the map + +User invokes with a loose idea. + +1. **Name the destination.** Run a `/grilling` and `/domain-modeling` session to pin down what this map is finding its way to — the spec, decision, or change. The destination fixes the scope, so it's settled first. +2. **Map the frontier.** Grill again, **breadth-first** this time: fan out across the whole space rather than deep on any one thread, surfacing the open decisions and the first steps takeable now. **If this surfaces no fog** — the way to the destination is already clear, the whole journey small enough for one session — you don't need a map. Stop and ask the user how they'd like to proceed. +3. **Create the map** (label `wayfinder:map`): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into **Not yet specified**. +4. **Create the tickets you can specify now** as child issues of the map — then wire blocking edges in a **second pass** (issues need ids before they can reference each other). Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog — the **Not yet specified** section. +5. Stop — charting the map is one session's work; do not also resolve tickets. + +### Work through the map + +User invokes with a map (URL or number). A ticket is **optional** — without one, you pick the next decision, not the user. + +1. Load the **map** — the low-res view, not every ticket body. +2. Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order. **Claim it**: assign it to yourself before any work. +3. Resolve it — **zoom as needed**: fetch the full body of any related or closed ticket on demand; invoke the skills the `## Notes` block names. If in doubt, use `/grilling` and `/domain-modeling`. +4. Record the resolution: post the answer as a **resolution comment**, **close** the issue, and **append a context pointer** to the map's Decisions-so-far. +5. Add newly-surfaced tickets (create-then-wire); graduate any fog the answer has made specifiable, clearing each graduated patch from **Not yet specified** so it lives only as its new ticket. If the answer reveals a ticket — this one or another — sits beyond the destination, **rule it out of scope** rather than resolving it on the route. If the decision invalidates other parts of the map, update or delete those tickets. + +The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently. + +## Reaching the destination + +The map is done when the frontier is empty and no fog remains — the way to the destination is clear. Wayfinder **hands off** here; it does not build. What happens next depends on the destination: + +- **A spec** → run `/to-spec` to synthesise the map's Decisions-so-far into one spec, linked back to the map. A large effort may be **several** specs — run `/to-spec` once per coherent feature, each reading its slice of the map. Each spec then goes through `/to-tickets` → `/implement`. +- **A locked decision** → the map itself is the artifact; hand it off. +- **An in-place change** → hand off to `/to-tickets` (or, if it collapsed to a single slice, straight to `/implement`). + +Specs and ticket sets produced on the way out are review artifacts — see `docs/agents/spec-review.md`. diff --git a/CLAUDE.md b/CLAUDE.md index 13be793a..f33d8e3f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,7 +50,15 @@ Frontend and backend conventions live alongside their code and auto-load when ed ## Agent skills -Workflow skills (commit, open-pr, update-pr, address-pr-comments, run-local, verify-telemetry, verify-graph) and Matt Pocock's engineering and issue-authoring skills live in `.claude/skills/`. The AI issue-authoring flow is `grill-with-docs → to-spec → to-tickets → triage`. `grill-with-docs` orchestrates the `grilling` and `domain-modeling` primitives. See `docs/adr/0002-misc-adopt-matt-pocock-skills.md`, `docs/adr/0003-misc-rename-to-spec-to-tickets.md`, and `docs/adr/0004-misc-split-grill-with-docs.md`. The `caveman` terse mode is on by default in this repo as a pilot — see the Communication section above. +Workflow skills (commit, open-pr, update-pr, address-pr-comments, run-local, verify-telemetry, verify-graph) and Matt Pocock's engineering and issue-authoring skills live in `.claude/skills/`. + +The **main flow** (idea → ship): `grill-with-docs` sharpen the idea → `to-spec` write the spec → `to-tickets` slice it into tracer-bullet implementation tickets → `implement` per ticket (drives `tdd`, then `code-review`, then `commit`). A well-understood single feature can skip straight from grill to `to-spec`; a trivial one-liner goes straight to `implement`. `grill-with-docs` orchestrates the `grilling` and `domain-modeling` primitives. + +**On-ramps** merge onto that flow: a huge, foggy effort too big for one session → `wayfinder`, which charts a map of investigation tickets on the tracker, then merges at `to-spec` (one map can feed several specs); raw incoming issues → `triage`. + +**Spec/plan review:** a spec (`to-spec`) or ticket set (`to-tickets`) is staged as a file and reviewed as a PR before it publishes to the tracker — see `docs/agents/spec-review.md`. Wayfinder investigation tickets are reviewed on the tracker instead and don't pass through this gate. + +See `docs/adr/0002-misc-adopt-matt-pocock-skills.md`, `docs/adr/0003-misc-rename-to-spec-to-tickets.md`, `docs/adr/0004-misc-split-grill-with-docs.md`, and `docs/adr/0005-misc-wayfinder-and-spec-review.md`. The `caveman` terse mode is on by default in this repo as a pilot — see the Communication section above. ### Issue tracker diff --git a/docs/adr/0005-misc-wayfinder-and-spec-review.md b/docs/adr/0005-misc-wayfinder-and-spec-review.md new file mode 100644 index 00000000..a7cee266 --- /dev/null +++ b/docs/adr/0005-misc-wayfinder-and-spec-review.md @@ -0,0 +1,26 @@ +# Adopt wayfinder + implement, and reshape the planning pipeline into a spec/plan review requirement + +Argos completes the Matt Pocock engineering-flow adoption. It takes his main flow as the spine — `grill-with-docs → to-spec → to-tickets → implement` — adds `wayfinder` as the exploration on-ramp and `research` as a delegated-reading skill, and reshapes the branch-based planning pipeline (proposed in #669) from a default multi-phase flow into a narrow **spec/plan review requirement**. This supersedes the planning-pipeline design; #669 is closed in its favour. + +## Considered Options + +- Make wayfinder the default spine ("wayfinder-first"). Rejected — Matt's own router keeps the grill-led `idea → ship` chain as the front door and treats wayfinder as a situational on-ramp; crowning it the spine was deferred upstream as a larger move. +- Keep #669's planning pipeline as the default way to plan a feature. Rejected — it conflates exploration (now `wayfinder`'s job) with the review gate, and frames a heavy three-phase ceremony as the default. +- Adopt the spine, wayfinder as on-ramp, and keep only the review gate from #669 (chosen). + +## Why this shape + +- **Wayfinder is an on-ramp, not the spine.** It plans an effort too big for one session as a map of *investigation* tickets that resolve to decisions, then merges onto the main flow at `to-spec`. One map can feed several specs. It produces decisions, not deliverables, and hands off — it does not build. +- **The path to implementation tickets is always `to-tickets`.** Whether an idea came through wayfinder or a plain grill, it consolidates at `to-spec` and slices at `to-tickets`. Two distinct things are called "ticket": wayfinder *investigation* tickets (decisions) and *implementation* tickets (tracer-bullet build slices). +- **The pipeline's real value was a review gate, and only that survives.** #669 existed to (a) let a plan be reviewed as git history before it fans into issues and (b) keep unreviewed tickets off the tracker. Wayfinder already reviews its investigation tickets continuously on the tracker, so the branch gate is redundant there. What remains is a requirement attached to two artifact types — a **spec** and a **plan/ticket set** — regardless of origin: stage as a file, review as a PR, publish only on merge. It is decoupled from grilling and wayfinder. +- **`code-review` is not vendored.** Argos already has a `/code-review`; `implement` uses it. `implement`'s commit step uses Argos's `/commit` convention, not a bare commit. + +## Consequences + +- New skills `.claude/skills/wayfinder/`, `.claude/skills/implement/`, and `.claude/skills/research/` (research adopted separately in #689). `implement` drives `tdd` → `code-review` → `commit`; it does not push or open PRs. +- `docs/agents/issue-tracker.md` gains a **Wayfinding operations** section (GitHub sub-issues, native issue dependencies with a body fallback, frontier query, claim, resolve), the `ai-workflow` workflow label, and the `wayfinder:map` / `wayfinder:` label namespace. +- `docs/agents/spec-review.md` documents the review requirement; `to-spec` stages to `docs/spec//spec.md` and `to-tickets` drafts per-ticket files under `docs/spec//`, each opened as a PR before publishing. This restores a local-file draft mode that the #683 fold-in had dropped. +- Glossary gains wayfinder map / destination / frontier / investigation-ticket / spec-plan-review / ai-workflow terms; `CLAUDE.md` documents the main flow, the on-ramps, and the review gate. +- #669 (branch-based planning pipeline) is superseded and closed; its durable pieces — the `ai-workflow` label and the review-before-publish idea — live on here in reshaped form. #682 (`/start-ticket`) is closed as superseded: `implement` plus the `{issue}-{kebab-title}` branch convention cover it. + +See `docs/adr/0002-misc-adopt-matt-pocock-skills.md` through `0004`, `docs/agents/spec-review.md`, and `docs/agents/issue-tracker.md`. diff --git a/docs/agents/glossary.md b/docs/agents/glossary.md index 1ce1a56b..bc38a601 100644 --- a/docs/agents/glossary.md +++ b/docs/agents/glossary.md @@ -15,3 +15,15 @@ Plain-language definitions of the workflow and agent-tooling terms used across t **Spec (PRD).** A feature spec — you may also know this document as a PRD (Product Requirements Document). The `to-spec` skill writes one; `to-tickets` then breaks it into tracer-bullet tickets. **Idea.** A raw, un-fleshed feature or bug scrap filed as a single needs-triage ticket before anyone has classified it — the lightweight counterpart to a spec. Filed by the `log-future-addition` skill for `/triage` to classify like any other intake. Deliberately thin; anything already thought through belongs in `to-spec` or `grill-with-docs`. + +**Spec/plan review.** The requirement that a spec (`to-spec`) or a ticket set (`to-tickets`) is staged as a file and reviewed as a PR before it publishes to the tracker — the gate that keeps unreviewed tickets off the tracker. Not a planning flow, not attached to grilling. See spec-review.md. + +**Wayfinder map.** For an effort too big for one session, a single `wayfinder:map` issue that charts the way to a **destination** as a set of **investigation tickets** (child issues) resolved one at a time. Produced and worked by the `/wayfinder` skill; it merges onto the main flow at `to-spec` (one map can feed several specs). + +**Destination.** What a wayfinder map is finding its way to — a spec, a locked decision, or an in-place change. Named first; it fixes the map's scope. + +**Frontier.** On a wayfinder map, the open, unblocked, unclaimed tickets — the takeable edge of the known. Everything past it is **fog of war**: decisions you can see coming but can't yet phrase sharply, recorded in the map's "Not yet specified" section until a resolution graduates them into tickets. + +**Investigation ticket.** A wayfinder child issue that resolves one decision, of type `research` / `prototype` / `grilling` / `task`. Distinct from a tracer-bullet *implementation* ticket, which builds code; an investigation ticket produces a decision. + +**ai-workflow.** A label marking issues whose subject is the AI dev workflow itself (skills, `docs/agents/`), orthogonal to the area labels. diff --git a/docs/agents/issue-tracker.md b/docs/agents/issue-tracker.md index e0b1e9e6..b5d5e7d7 100644 --- a/docs/agents/issue-tracker.md +++ b/docs/agents/issue-tracker.md @@ -26,6 +26,9 @@ These apply when an AI skill files an issue with `gh issue create`. They govern | Area | `angular-client`, `scylla-server`, `DevOps` | | Type | `bug`, `new feature`, `feature enhancement`, `good first issue`, `epic` | | Difficulty | `straightforward`, `medium`, `difficult` | +| Workflow | `ai-workflow` (the subject is the AI dev workflow itself, orthogonal to area) | + +Wayfinder uses its own label namespace, created with `gh label create`: `wayfinder:map` for the map issue and `wayfinder:research` / `wayfinder:prototype` / `wayfinder:grilling` / `wayfinder:task` for its child tickets (see the Wayfinding operations section). The triage roles (`needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`) are applied by `/triage`, not at creation time (see triage-labels.md) — with one exception: the `log-future-addition` skill files a raw idea directly with `needs-triage`, placing it straight in the triage queue (a type or area is added only where clear, area not required; see glossary.md). @@ -40,3 +43,14 @@ Create a GitHub issue. ## When a skill says "fetch the relevant ticket" Run `gh issue view --comments`. + +## Wayfinding operations + +Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets. + +- **Map**: a single issue labelled `wayfinder:map`, holding the Destination / Notes / Decisions-so-far / fog body. `gh issue create --label wayfinder:map`. +- **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #` at the top of the child body. Labels: `wayfinder:` (`research` / `prototype` / `grilling` / `task`). Once claimed, the ticket is assigned to the driving dev. +- **Blocking**: GitHub's **native issue dependencies** — the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/Northeastern-Electric-Racing/Argos/issues//dependencies/blocked_by -F issue_id=`, where `` is the blocker's numeric **database id** (`gh api repos/Northeastern-Electric-Racing/Argos/issues/ --jq .id` — *not* the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only — the live gate). Where dependencies aren't available on the repo, fall back to a `Blocked by: #, #` line at the top of the child body. A ticket is unblocked when every blocker is closed. +- **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins. +- **Claim**: `gh issue edit --add-assignee @me` — the session's first write. +- **Resolve**: `gh issue comment --body ""`, then `gh issue close `, then append a context pointer (gist + link) to the map's Decisions-so-far. diff --git a/docs/agents/spec-review.md b/docs/agents/spec-review.md new file mode 100644 index 00000000..8acda2c6 --- /dev/null +++ b/docs/agents/spec-review.md @@ -0,0 +1,22 @@ +# Spec & plan review + +Specs and plans are **review artifacts**. Before either publishes to the tracker as issues, it is staged as a file and reviewed as a git pull request. This is the one gate that keeps unreviewed tickets off the tracker. + +It is **not** a planning flow and **not** attached to grilling or wayfinder. It attaches to two artifact types only — a **spec** (from `/to-spec`) and a **plan** / ticket set (from `/to-tickets`) — however they were produced. + +## The requirement + +- **A spec** (`/to-spec`) is written to `docs/spec//spec.md`, opened as a PR against `develop` (draft per the repo PR convention, marked ready when set), reviewed, and merged. Only then is the spec published as its issue. If it came from a wayfinder map, the spec reads the map and links back to it. +- **A plan** (`/to-tickets`) is drafted as local files under `docs/spec//` — one kebab-named file per proposed ticket — opened as a PR, reviewed, and merged. Only then are the tickets created on the tracker, each with `Parent` = the spec issue. +- The staged files under `docs/spec//` are **temporary** — they exist for review and are deleted once the issues exist. The spec and its tickets are the durable home. + +## What is *not* gated + +- **Wayfinder investigation tickets** — reviewed continuously on the tracker as each resolves; they don't pass through this gate. +- **A trivial one-liner** with no spec and no ticket set — nothing to review; `/implement` in place at the author's discretion. + +## Why + +Two reasons, both about handoff. First, a plan people can see and comment on as a diff before it fans out into issues. Second — and this is the load-bearing one — **no unreviewed tickets spam the tracker**: an implementation ticket only exists once its slicing was approved. + +Issues carry the `ai-workflow` label when the subject is the AI dev workflow itself. See `issue-tracker.md` for the label palette and `glossary.md` for the terms. diff --git a/docs/spec/README.md b/docs/spec/README.md new file mode 100644 index 00000000..5d51e0e0 --- /dev/null +++ b/docs/spec/README.md @@ -0,0 +1,10 @@ +# docs/spec/ + +Staging area for the **spec/plan review** gate (`docs/agents/spec-review.md`). + +Each in-review effort gets a folder `docs/spec//` holding: + +- `spec.md` — the spec drafted by `/to-spec`, reviewed as a PR before it publishes as an issue. +- one kebab-named file per proposed ticket — drafted by `/to-tickets`, reviewed as a PR before the tickets publish. + +These files are **temporary**: they exist for review and are deleted once the corresponding issues exist on the tracker. The tracker issues are the durable home. Persistent docs (ADRs, `CONTEXT.md`) do not live here.