Wayfinder
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 decision tickets — questions whose resolution is a decision, not slices of a build to execute — 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, research, 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, 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.
Tracker: this skill tracks the map and its tickets as issues in the project's issue tracker — see Tracker Operations for every map and ticket operation, and for the authoritative statement of the preflight gate. Wayfinder currently requires GitHub: charting and working the map lean on native sub-issues, native blocking edges, and assignee-based claim, and no other tracker exposes all three yet. It also requires a repo that can actually hold issues, and both are checked before charting a map and again before resuming one. If either fails, stop and ask the user how to track the effort — don't invent a parallel tracker, and don't start a map on a repo that can't carry it through.
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.
## Destination
<what reaching the end of this map looks like — the spec, decision, or change this effort is finding its way to. One or two lines; every session orients to it before choosing a ticket.>
## Notes
<domain; skills every session should consult; standing preferences for this effort>
## Decisions so far
<!-- the index — one line per closed ticket: enough to judge relevance, then zoom the link for the detail the ticket holds -->
- [<closed ticket title>](link) — <one-line gist of the answer>
## Not yet specified
<!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->
## Out of scope
<!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->
Tickets
Each ticket is a child issue of the map; the tracker's issue number is its identity. Its body is the question, sized to one session:
## Question
<the decision or investigation this ticket resolves>
Each ticket carries a wayfinder:<type> label — one of research, prototype, grilling, task (see 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 — see Claim a ticket for the race-safe procedure (assignment alone isn't exclusive). 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. A ticket is unblocked when every ticket blocking it is closed; the frontier is the set of 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). 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 session that answers its own questions has broken this).
- Research (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases to surface a fact a decision waits on. Resolved by dispatching the
researcheragent directly (Agent(subagent_type: "researcher")) — not/mine-research, whose Phase 1 and Phase 3 are interactiveAskUserQuestiongates that block on a live human and can't be satisfied by an AFK, ticket-driven dispatch. Write the ticket's title and body so they already carry the agent's input contract (Proposal, Motivation, Flexibility, Constraints) — that scoping happens once, when the ticket is charted, not re-interrogated at dispatch time. Depth defaults tonormalunless the ticket says otherwise. 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
/mine-mockup. 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
/mine-grilland/mine-domain-model, 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.
Tracker Operations
Wayfinder is GitHub-only, so this section names GitHub tools directly rather than describing them. That's deliberate: the map is built from native sub-issues, native blocking edges, and assignee-based claim, and the guarantees below live in the exact invocation — which auth a call runs under, which flag creates the edge — not in the intent behind it. mine-wayfinder is exempted from FR#1 in the tracker-agnostic design for this reason.
Operations go through gh-issue (a thin passthrough to gh issue that upgrades to bot-token auth when available — see "GitHub tool reference" in rules/common/capabilities-core.md). Claiming is the one exception, and uses raw gh; see below.
Two preflight checks. Both run before charting a new map and again before resuming an existing one — the answers are live state, not properties a past session can vouch for. Either failing means stop and ask the user how to track the effort rather than working a map that would fail partway through:
- The tracker is GitHub —
$ISSUE_TRACKERis set togh. - The repo has Issues enabled —
gh api repos/{owner}/{repo} --jq .has_issues. If it returnsfalseor errors, stop.gh-issue overviewalways exits 0 even when Issues are disabled, so it cannot stand in for this check.
Labels (wayfinder:map, wayfinder:research, wayfinder:prototype, wayfinder:grilling, wayfinder:task) must exist before they're used. Fetch existing label names once, then create only the ones missing — don't blanket-suppress gh label create's stderr, or real failures (permissions, network, a malformed repo) look identical to "label already exists":
existing="$(gh label list --json name --jq '.[].name')"
grep -qxF "wayfinder:map" <<<"$existing" || gh label create "wayfinder:map" --color 5319e7 --description "Wayfinder map issue"
grep -qxF "wayfinder:research" <<<"$existing" || gh label create "wayfinder:research" --color 0e8a16
grep -qxF "wayfinder:prototype" <<<"$existing" || gh label create "wayfinder:prototype" --color 1d76db
grep -qxF "wayfinder:grilling" <<<"$existing" || gh label create "wayfinder:grilling" --color fbca04
grep -qxF "wayfinder:task" <<<"$existing" || gh label create "wayfinder:task" --color d93f0b
Bodies go in files, never in --body. Map bodies and ticket questions are multi-line Markdown, routinely containing backticks and quotes; as a shell argument that content gets mangled, and command substitutions in it get evaluated. Run get-skill-tmpdir mine-wayfinder once per session, call the result <dir>, and stage every body there. This is the general rule from rules/common/git-workflow.md (Issue Creation Conventions), applied to each call below.
Create the map: write the map body to <dir>/map-body.md, then:
gh-issue create --title "<destination title>" --label "wayfinder:map" --body-file "<dir>/map-body.md"
Create a child ticket, wired to the map: gh issue create supports native sub-issues via --parent, so a ticket is parented in the same call that creates it — no separate wiring step needed for parent/child. Write the question to <dir>/ticket-<slug>.md — one file per ticket, so a batch doesn't overwrite itself:
gh-issue create --title "<ticket title>" --label "wayfinder:<type>" --body-file "<dir>/ticket-<slug>.md" --parent <map-issue-number>
Wire blocking edges (second pass): blocking between two tickets you're creating in the same batch still needs both issue numbers to exist first, so wire it after both are created:
gh-issue edit <blocked-ticket-number> --add-blocked-by <blocking-ticket-number>
This is GitHub's native blocking relationship (gh ≥2.90), so it renders in the tracker's own UI — the frontier is visible without opening the map.
Claim a ticket — use raw gh, not gh-issue. gh-issue may run under a bot token when a GitHub App is configured, and claiming as the bot doesn't merely weaken the race check, it inverts it: every session assigns the same bot identity, every session sees that identity sitting first, and every session concludes it won. The claim must carry the human driving the map (the same reasoning capabilities-core.md documents for PR authorship).
--add-assignee is additive, not exclusive, so two concurrent sessions can both add themselves to the same ticket and both believe they claimed it. Verify after claiming, every time, whether claiming for manual work (Work through the map step 2) or before dispatching a research agent (Chart the map step 5):
gh issue edit <ticket-number> --add-assignee @me
me="$(gh api user --jq .login)"
first="$(gh issue view <ticket-number> --json assignees --jq '.assignees[0].login')"
[ "$me" = "$first" ] || echo "lost the claim race on <ticket-number>"
Resolve $me from gh api user as shown, never from the identity you assume you're running as — that assumption is exactly what lets a bot-token claim pass unnoticed.
A mismatch is a stop, not a warning to note and work past: someone else owns the ticket, so leave their assignment alone, don't unassign anything, and pick a different ticket from the frontier.
Record the resolution and close:
Write the resolution to <dir>/resolution-<ticket-number>.md first — same reason as the creation calls:
gh-issue comment <ticket-number> --body-file "<dir>/resolution-<ticket-number>.md"
gh-issue close <ticket-number>
Query the frontier (open, unblocked, unclaimed children of the map): fetch the map's children as JSON and filter with jq. Inspect one row's shape first (blockedBy is {nodes: [...], totalCount: N}; parent is null or {number, title}) before scripting a batch query, since exact field availability can vary by gh version:
gh-issue list --state open --json number,title,labels,assignees,parent,blockedBy --limit 100 \
--jq '[.[] | select(.parent.number == <map-issue-number>
and (.assignees | length) == 0
and (.blockedBy.nodes | map(select(.state != "CLOSED")) | length) == 0)]'
Invocation
Two modes. Either way, never resolve more than one ticket per session — with the exception of research tickets.
Chart the map
User invokes with a loose idea.
- Run the preflight — both checks in Tracker Operations. Do this before step 1, not after: steps 1-2 spend real work grilling the idea, and there's no point paying for it on a repo that can't hold the map.
- Name the destination. Run
/mine-grilland/mine-domain-modelto 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. - 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:
AskUserQuestion:
question: "The frontier surfaced no fog — the way to the destination looks clear enough for one session. How do you want to proceed?"
header: "Wayfinder"
multiSelect: false
options:
- label: "Handle it directly, no map"
description: "Skip wayfinder — the effort is small enough to just do now"
- label: "Chart it as a map anyway"
description: "Still worth tracking as tickets, even though it's small"
- Create the map (label
wayfinder:map): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into Not yet specified. - Create the tickets you can specify now as child issues of the map (parented at creation via
--parent) — then wire blocking edges in a second pass, once every new ticket's number is known. Before ending the session, re-fetch the new tickets and confirm every intended blocking edge landed — an interrupted second pass leaves tickets that look unblocked but shouldn't be. Verification is a hard stop: if re-fetching shows a missing blocking edge, stop here — do not proceed to step 5 — and repair or retry the edge, then re-fetch and verify again, looping until every intended edge lands. Only move on once verification passes; otherwise research tickets can be dispatched while their prerequisites remain open. Everything you can't yet specify stays in the fog — the Not yet specified section. - Fire the research subagents. First, claim every research ticket in this batch (see Claim a ticket) — all of them, before any dispatch, so no other session grabs one mid-batch; drop any ticket that loses its claim race and proceed without it. For each claimed
researchticket, dispatch theresearcheragent directly — not/mine-research, whose Phase 1/Phase 3AskUserQuestiongates require a human who isn't there for an AFK dispatch. Derive the agent's input-contract fields (Proposal, Motivation, Flexibility, Constraints) from the ticket's own title and body, and default Depth tonormalunless the ticket specifies otherwise. Fire every research ticket's agent in parallel; this now genuinely runs AFK, sinceresearcher(unlike/mine-research) has no interactive gates. Point Output file path atdesign/research/<ticket-slug>/research.md, committed — the same durable conventionmine-prior-art,mine-define,mine-research, andmine-whyuse (a topic directory holding a fixedresearch.md, matching thedesign/research/*/research.mdglobmine-defineandmine-whyalready scan for prior research). After each dispatch completes, verify the output file exists and contains the# Research Brief:header (same checkmine-defineuses). On success: resolve the ticket exactly as Work through the map step 4 does — post a resolution comment summarizing the finding, close the ticket, and append a context pointer to the map's Decisions-so-far (re-fetching the map body fresh immediately before the append, per the note in that step — several research tickets in this batch may be writing to it in sequence). On failure: post a comment on the ticket noting the dispatch failed, and release the claim with rawgh—gh issue edit <ticket-number> --remove-assignee @me, the same personal-account path you claimed with — so a later session can retry it rather than finding it claimed and stuck. - Report back. Tell the user the frontier size (how many tickets are now takeable), list them by name, and give the map's link. Stop — charting is one session's work; it hand-resolves nothing.
Work through the map
User invokes with a map (URL or number). If no map is named, first look for one: gh issue list --label "wayfinder:map" --state open --json number,title,url, and ask the user which to resume if more than one is open. A ticket is optional — without one, you pick the next decision, not the user.
- Run the preflight — both checks in Tracker Operations. Do this before looking for a map, not after: on a machine pointed at a different tracker, a lookup by number resolves against the wrong system and can silently land on an unrelated issue, and steps 2-5 then attempt sub-issue, blocking-edge, and assignee operations that tracker doesn't have. Run check 2 here as well — an existing map proves only that Issues were enabled when it was charted, not that they still are, nor that this checkout still resolves to the repo holding it.
- Load the map — the low-res view, not every ticket body.
- Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order (see Query the frontier). Claim it (see Claim a ticket) before any work — if the race check shows someone else got there first, go back and pick a different frontier ticket.
- Resolve it — zoom as needed: fetch the full body of any related or closed ticket on demand; invoke the skills the
## Notesblock names. If in doubt, use/mine-grilland/mine-domain-model. - Record the resolution: post the answer as a resolution comment and close the issue, then append a context pointer to the map's Decisions-so-far — before writing it, re-fetch the map's current body fresh (not the copy loaded in step 1) and apply the edit on top of that, so a stale in-memory copy never overwrites another session's concurrent edit.
- 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 — re-fetch the map body fresh again before this edit, for the same reason as step 4. 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.
- Report back. Tell the user what was resolved, the current frontier size, and the map's link. If the frontier is now empty, say plainly that the destination is reached and suggest the natural next step (e.g., handing the map off to
/mine-define).
The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.