From 1c0d4774dec19090635cd2fb70e02775b000ed0f Mon Sep 17 00:00:00 2001 From: simpros <38320875+simpros@users.noreply.github.com> Date: Sun, 8 Nov 2026 21:03:32 +0100 Subject: [PATCH 1/2] =?UTF-8?q?SKILLS-SPROUT:=20#=20Skills=20refresh=20?= =?UTF-8?q?=E2=80=94=20sprout=20(mattpocock/skills)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .agents/skills/code-review/SKILL.md | 10 +- .../skills/codebase-design/DESIGN-IT-TWICE.md | 4 +- .agents/skills/diagnosing-bugs/SKILL.md | 4 +- .../{CONTEXT-FORMAT.md => GLOSSARY-FORMAT.md} | 20 +- .agents/skills/domain-modeling/SKILL.md | 24 +- .agents/skills/grilling/SKILL.md | 4 +- .agents/skills/handoff/SKILL.md | 2 +- .agents/skills/implement-spec/SKILL.md | 42 ++++ .../skills/implement-spec/agents/openai.yaml | 5 + .agents/skills/implement/SKILL.md | 6 +- .../improve-codebase-architecture/SKILL.md | 12 +- .agents/skills/research/SKILL.md | 12 + .agents/skills/research/agents/openai.yaml | 3 + .../skills/resolving-merge-conflicts/SKILL.md | 14 -- .../agents/openai.yaml | 3 - .agents/skills/retro/SKILL.md | 44 ++++ .agents/skills/retro/agents/openai.yaml | 5 + .agents/skills/tdd/SKILL.md | 4 +- .agents/skills/to-tickets/SKILL.md | 4 +- .agents/skills/triage/SKILL.md | 2 +- .agents/skills/wayfinder/SKILL.md | 8 +- .agents/skills/wizard/SKILL.md | 44 ++++ .agents/skills/wizard/agents/openai.yaml | 3 + .agents/skills/wizard/template.sh | 223 ++++++++++++++++++ .github/workflows/docs.yml | 2 +- AGENTS.md | 2 +- CODE-STYLE.md | 2 +- CONTEXT.md => GLOSSARY.md | 0 README.md | 2 +- docs/adr/README.md | 2 +- docs/operator-deploy.md | 2 +- docs/site/assemble.ts | 2 +- skills-lock.json | 48 ++-- 33 files changed, 476 insertions(+), 88 deletions(-) rename .agents/skills/domain-modeling/{CONTEXT-FORMAT.md => GLOSSARY-FORMAT.md} (70%) create mode 100644 .agents/skills/implement-spec/SKILL.md create mode 100644 .agents/skills/implement-spec/agents/openai.yaml create mode 100644 .agents/skills/research/SKILL.md create mode 100644 .agents/skills/research/agents/openai.yaml delete mode 100644 .agents/skills/resolving-merge-conflicts/SKILL.md delete mode 100644 .agents/skills/resolving-merge-conflicts/agents/openai.yaml create mode 100644 .agents/skills/retro/SKILL.md create mode 100644 .agents/skills/retro/agents/openai.yaml create mode 100644 .agents/skills/wizard/SKILL.md create mode 100644 .agents/skills/wizard/agents/openai.yaml create mode 100644 .agents/skills/wizard/template.sh rename CONTEXT.md => GLOSSARY.md (100%) diff --git a/.agents/skills/code-review/SKILL.md b/.agents/skills/code-review/SKILL.md index e28d7acb..83183e0a 100644 --- a/.agents/skills/code-review/SKILL.md +++ b/.agents/skills/code-review/SKILL.md @@ -8,9 +8,9 @@ Two-axis review of the diff between `HEAD` and a fixed point the user supplies: - **Standards**: does the code conform to this repo's documented coding standards? - **Spec**: does the code faithfully implement the originating issue / spec? -Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings. +Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings. Start every sub-agent with a fresh context window. -The issue tracker should have been provided to you. If `docs/agents/issue-tracker.md` is missing, tell the user to run `/setup-matt-pocock-skills`. +The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`. ## Process @@ -26,14 +26,14 @@ Before going further, confirm the fixed point resolves (`git rev-parse ``` +Word each question so "yes" accepts your recommended answer. + Each round the user answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a _later_ round, not this one. -Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait. +Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent with a fresh context window to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait. The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding. diff --git a/.agents/skills/handoff/SKILL.md b/.agents/skills/handoff/SKILL.md index 2eb98a51..a224edc6 100644 --- a/.agents/skills/handoff/SKILL.md +++ b/.agents/skills/handoff/SKILL.md @@ -5,7 +5,7 @@ argument-hint: "What will the next session be used for?" disable-model-invocation: true --- -Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace. +Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS (`$TMPDIR`, else `/tmp`; `%TEMP%` on Windows) - not the current workspace. Include a "suggested skills" section in the document, naming which skills the next agent should call the Skill tool for. diff --git a/.agents/skills/implement-spec/SKILL.md b/.agents/skills/implement-spec/SKILL.md new file mode 100644 index 00000000..73d36c23 --- /dev/null +++ b/.agents/skills/implement-spec/SKILL.md @@ -0,0 +1,42 @@ +--- +name: implement-spec +description: "Implement the result of /to-spec and /to-tickets in code." +disable-model-invocation: true +--- + +You have been provided a spec. This spec should have tickets associated with it, describing how to implement the spec. + +The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`. + +The goal is the entire spec implemented on a single **integration branch**, with every ticket resolved the way the issue tracker closes work. + +The tickets are not a list of steps. They are a **task graph** with blocking relationships between them. This means there is always a **frontier** of tickets which are ready to be grabbed. + +Start every subagent with a fresh context window. + +Communication to and from subagents should be sparse. Communicate primarily through **context pointers**: to the spec, tickets, research notes, and previous commits. Don't duplicate information already available via pointers. + +**Implementer subagents** should be run in the background where possible for maximum concurrency. + +## Steps + +1. Read the spec and tickets to understand the task graph. + +2. (optional) Use an **exploration subagent** to conduct any exploration required by the tickets - relevant codebase files or external documentation. Ensure the exploration subagent can save files - it should save its markdown notes in a directory outside the repo, accessible by all future subagents. This lets **implementer subagents** focus on implementation rather than exploration. + +3. Create the integration branch. If the issue tracker closes work through PRs, or the user asks for one, open a draft PR after the first merge in step 5 (a branch with no commits ahead of main can't open one), marked as closing the spec and tickets. + +4. Use a fresh **implementer subagent** for each ticket, each in its own worktree on its own branch. Each implementer subagent: + - confirms its worktree is based on the integration branch before starting, and resets onto it if not; + - calls the Skill tool with `tdd` to build the ticket; + - merges the integration branch tip into its own branch before reporting done + +5. Once an **implementer subagent** completes, merge its work to the integration branch with a **merger subagent**. + +6. If this changes the **frontier** of available tickets, kick off more **implementer subagents** to work on the new tickets. This allows for maximum concurrency. + +7. Once all tickets are complete, call the Skill tool with `code-review` on the integration branch. Fix all issues raised by the code review in a single fresh **implementer subagent**. + +8. If a draft PR exists, mark it ready for review. Otherwise, resolve each ticket the way the issue tracker closes work, and report the integration branch. + +9. Clean up all **implementer subagent** worktrees. diff --git a/.agents/skills/implement-spec/agents/openai.yaml b/.agents/skills/implement-spec/agents/openai.yaml new file mode 100644 index 00000000..f5e91af2 --- /dev/null +++ b/.agents/skills/implement-spec/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Implement Spec" + short_description: "Implement the result of /to-spec and /to-tickets in code." +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/implement/SKILL.md b/.agents/skills/implement/SKILL.md index 7a0b11f5..bd49e472 100644 --- a/.agents/skills/implement/SKILL.md +++ b/.agents/skills/implement/SKILL.md @@ -6,10 +6,12 @@ disable-model-invocation: true Implement the work described by the user in the spec or tickets. -Use /tdd where possible, at pre-agreed seams. +If the user passes a ticket reference, fetch it from the issue tracker and state its title before starting. If the reference is ambiguous, ask. + +Call the Skill tool with "tdd" where possible, at pre-agreed seams. Run typechecking regularly, single test files regularly, and the full test suite once at the end. -Once done, use /code-review to review the work. +Once done, call the Skill tool with "code-review" to review the work. Commit your work to the current branch. diff --git a/.agents/skills/improve-codebase-architecture/SKILL.md b/.agents/skills/improve-codebase-architecture/SKILL.md index a578dd0a..f1eabb56 100644 --- a/.agents/skills/improve-codebase-architecture/SKILL.md +++ b/.agents/skills/improve-codebase-architecture/SKILL.md @@ -11,7 +11,7 @@ Surface architectural friction and propose **deepening opportunities**: refactor This command is _informed_ by the project's domain model and built on a shared design vocabulary: - Call the Skill tool with "codebase-design" for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion, and don't drift into "component," "service," "API," or "boundary." -- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs/adr/` record decisions this command should not re-litigate. +- The domain language in `GLOSSARY.md` gives names to good seams; ADRs in `docs/adr/` record decisions this command should not re-litigate. ## Process @@ -22,9 +22,9 @@ This command is _informed_ by the project's domain model and built on a shared d - If the user named a direction (a module, a subsystem, a pain point), take it, and skip the inference below. - Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots, the files and areas that keep coming up, and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net. -Read the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first. +Read the project's domain glossary (`GLOSSARY.md`) and any ADRs in the area you're touching first. -Then spawn a sub-agent to walk the codebase. Don't follow rigid heuristics; explore organically and note where you experience friction: +Then spawn a sub-agent with a fresh context window to walk the codebase. Don't follow rigid heuristics; explore organically and note where you experience friction: - Where does understanding one concept require bouncing between many small modules? - Where are modules **shallow**, with an interface nearly as complex as the implementation? @@ -51,7 +51,7 @@ For each candidate, render a card with: End the report with a **Top recommendation** section: which candidate you'd tackle first and why. -**Use CONTEXT.md vocabulary for the domain, and the `/codebase-design` vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module," not "the FooBarHandler," and not "the Order service." +**Use GLOSSARY.md vocabulary for the domain, and the `/codebase-design` vocabulary for the architecture.** If `GLOSSARY.md` defines "Order," talk about "the Order intake module," not "the FooBarHandler," and not "the Order service." **ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007, but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids. @@ -65,7 +65,7 @@ Once the user picks a candidate, call the Skill tool with "grilling" to walk the Side effects happen inline as decisions crystallize; call the Skill tool with "domain-modeling" to keep the domain model current as you go: -- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md`. Create the file lazily if it doesn't exist. -- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there. +- **Naming a deepened module after a concept not in `GLOSSARY.md`?** Add the term to `GLOSSARY.md`. Create the file lazily if it doesn't exist. +- **Sharpening a fuzzy term during the conversation?** Update `GLOSSARY.md` right there. - **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing; skip ephemeral reasons ("not worth it right now") and self-evident ones. - **Want to explore alternative interfaces for the deepened module?** Call the Skill tool with "codebase-design" and use its design-it-twice parallel sub-agent pattern. diff --git a/.agents/skills/research/SKILL.md b/.agents/skills/research/SKILL.md new file mode 100644 index 00000000..ffc9eb89 --- /dev/null +++ b/.agents/skills/research/SKILL.md @@ -0,0 +1,12 @@ +--- +name: research +description: Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent. +--- + +Spin up a **background agent** to do the research, so you keep working while it reads. Start it with a fresh context window. + +Its job: + +1. Investigate the question against **primary sources** (official docs, source code, specs, first-party APIs), not a secondary write-up of them. Follow every claim back to the source that owns it. +2. Write the findings to a single Markdown file, citing each claim's source. +3. Save it where the repo already keeps such notes; match the existing convention, and if there is none, put it somewhere sensible and say where. diff --git a/.agents/skills/research/agents/openai.yaml b/.agents/skills/research/agents/openai.yaml new file mode 100644 index 00000000..e18b96ca --- /dev/null +++ b/.agents/skills/research/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Research" + short_description: "Research from high-trust sources" diff --git a/.agents/skills/resolving-merge-conflicts/SKILL.md b/.agents/skills/resolving-merge-conflicts/SKILL.md deleted file mode 100644 index bfb7e560..00000000 --- a/.agents/skills/resolving-merge-conflicts/SKILL.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: resolving-merge-conflicts -description: "Use when you need to resolve an in-progress git merge/rebase conflict." ---- - -1. **See the current state** of the merge/rebase. Check git history, and the conflicting files. - -2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets. - -3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`. - -4. Discover the project's **automated checks** and run them, typically typecheck, then tests, then format. Fix anything the merge broke. - -5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased. diff --git a/.agents/skills/resolving-merge-conflicts/agents/openai.yaml b/.agents/skills/resolving-merge-conflicts/agents/openai.yaml deleted file mode 100644 index 331ffb9d..00000000 --- a/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +++ /dev/null @@ -1,3 +0,0 @@ -interface: - display_name: "Resolving Merge Conflicts" - short_description: "Resolve merge and rebase conflicts" diff --git a/.agents/skills/retro/SKILL.md b/.agents/skills/retro/SKILL.md new file mode 100644 index 00000000..12149acf --- /dev/null +++ b/.agents/skills/retro/SKILL.md @@ -0,0 +1,44 @@ +--- +name: retro +description: "Conduct a retrospective on a coding session." +disable-model-invocation: true +--- + +The user has asked for a **retrospective**. You are suggesting improvements to the coding agent's **environment** to improve future runs. + +## Steps + +1. Call the Skill tool with `writing-for-agents` for the writing style guide. + +2. Read the primary sources for the session the user specifies. This may mean searching through session logs on this machine. If the user doesn't specify a session, default to the current one. + +3. Look for candidates for improvement in these categories. + +- **Navigation**: how easy was it for the agent to find the right files? Are there hidden dependencies between files? Would a **navigation pointer** make it easier? _Use when_ the session took a long time to find a piece of information. +- **Automated checks**: are there automated checks that could catch errors the agent made? Linting, typing, tests, filesystem linters? Read the repo's own check command first (its `package.json`/build-tool `lint`/`check` scripts, its CI workflow), so a check that already exists but sits unwired or silently broken is the finding, not a reinvention. A repo with no **guardrail** (no pre-commit hook and no CI job running its lint/typecheck/test command) is itself a finding: an un-linted repo is a standing missed opportunity, not a neutral default. _Use when_ the agent made a mistake an automated check could have caught, or the repo has no guardrail at all. +- **Coding standards**: should the **reviewer agent** be given a new rule to enforce? Should an existing rule be removed or clarified? Classify the violation first: a **mechanical** one (a fixed syntactic pattern, a banned API, an import shape, a file-location rule) gets a deterministic check, full stop: a custom rule in the repo's own linter, a new pre-commit hook, or a new CI job, whichever the repo's language and existing guardrail make cheapest. Default to building the check over writing the rule. Reserve `CODING_STANDARDS.md` for genuine **judgement calls** (cross-file consistency, "matches the surrounding style," anything no guardrail could ever substitute for). _Use when_ the reviewer agent failed to catch a mistake. +- **Global AGENTS.md**: are there any steering instructions that should be moved to coding standards (or automated checks) instead? _Use when_ the AGENTS.md file is particularly large - in the repo OR the user's global scope. +- **Tool economy**: did the agent make expensive tool calls that could be streamlined? Is there any custom tooling (CLI's, MCP's) that is particularly token-inefficient? _Use when_ the agent made an expensive tool call. +- **No-ops**: look for instructions in steering files that don't modify the agent's behavior. _Use when_ the steering files are large and unwieldy. +- **Information access**: look for opportunities to increase the agent's access to information. Teeing dev server logs, readonly access to third-party services. _Use when_ a crucial piece of information was not available to the agent. + +4. Present these candidates to the user, in order of severity. + +## Reference + +### Implementation vs Review + +Remember that all work goes through two stages: implementation and review. The implementation agent has the most **context pressure**. They are responsible for exploration, writing code, and debugging failures. + +The review agent has the least context pressure - it receives a diff, so no exploration needed. It often does not need to write code or debug. + +This means that the review agent should be responsible for imposing coding standards, not the implementation agent. + +### Files + +You have access to several files in the repo: + +- `CLAUDE.md`/`AGENTS.md`: these files are pushed to the context window of any agent working in this repo. They should be used incredibly sparingly, usually only for **navigation pointers** to other files. +- `CODING_STANDARDS.md`: this file is read during review, not implementation. Add **navigation pointers** to docs folders if the standards file gets more than 1,000 lines long. +- Docs: use docs as references files, pointed to by other files. Look for existing docs before writing new ones. +- Skills: use skills for docs (since their description goes into the agent's context window), or for user-invoked commands. Follow the advice in the `writing-for-agents` skill. diff --git a/.agents/skills/retro/agents/openai.yaml b/.agents/skills/retro/agents/openai.yaml new file mode 100644 index 00000000..a2f0bac3 --- /dev/null +++ b/.agents/skills/retro/agents/openai.yaml @@ -0,0 +1,5 @@ +interface: + display_name: "Retro" + short_description: "Conduct a retrospective on a coding session." +policy: + allow_implicit_invocation: false diff --git a/.agents/skills/tdd/SKILL.md b/.agents/skills/tdd/SKILL.md index 8fc08671..01eadaa3 100644 --- a/.agents/skills/tdd/SKILL.md +++ b/.agents/skills/tdd/SKILL.md @@ -7,7 +7,7 @@ description: Test-driven development. Use when the user wants to build features TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle: consult them before and during the loop, not after. -When exploring the codebase, read `CONTEXT.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching. +When exploring the codebase, read `GLOSSARY.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching. ## What a good test is @@ -21,7 +21,7 @@ A **seam** is the public boundary you test at: the interface where you observe b **Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case. -Ask: "What's the public interface, and which seams should we test?" +Ask: "What's the public interface, and which seams should we test?" Give each proposed seam a one-line note on what it catches and what it misses. When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), call the Skill tool with "codebase-design" for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run. diff --git a/.agents/skills/to-tickets/SKILL.md b/.agents/skills/to-tickets/SKILL.md index e868c831..9b77a01d 100644 --- a/.agents/skills/to-tickets/SKILL.md +++ b/.agents/skills/to-tickets/SKILL.md @@ -60,7 +60,7 @@ Iterate until the user approves the breakdown. Publish the approved tickets. **How** depends on the tracker `/setup-matt-pocock-skills` configured; the tickets are the same either way, only the shape of the blocking edges changes: - **Local files** → write one file per ticket under `.scratch//issues/-.md`, numbered from `01` in dependency order (blockers first). Each file's "Blocked by" lists the numbers/titles it depends on. Use the per-ticket file template below: one ticket per file, never a single combined file. -- **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking / sub-issue relationship where it has one; 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. +- **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. If the source was an existing issue, make each ticket its sub-issue (tracker doc's operation). Apply the `ready-for-agent` triage label unless instructed otherwise; the tickets are agent-grabbable by construction. Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom. @@ -98,7 +98,7 @@ The end-to-end behaviour this ticket makes work, from the user's perspective, no ## Blocked by -- A reference to each blocking ticket, or "None (can start immediately)". +- A reference to each blocking ticket, or "None (can start immediately)". Omit this section when blockers were set as native edges. diff --git a/.agents/skills/triage/SKILL.md b/.agents/skills/triage/SKILL.md index 37ddea1e..3fd5617e 100644 --- a/.agents/skills/triage/SKILL.md +++ b/.agents/skills/triage/SKILL.md @@ -73,7 +73,7 @@ Show counts and a one-line summary per item. Let the maintainer pick. 3. **Verify the claim.** Before any grilling, check that the claim holds up. For a bug, reproduce it from the reporter's steps. For a PR, confirm the diff does what it claims: check it out, run the relevant tests or commands. Report what happened: confirmed (with code path), failed, or insufficient detail (a strong `needs-info` signal). A confirmed verification makes a much stronger agent brief. -4. **Grill (if needed).** If the request needs fleshing out, call the Skill tool twice, for "grilling" and "domain-modeling", and grill it into shape a round of questions at a time, sharpening domain terms and updating `CONTEXT.md`/ADRs inline as decisions land. +4. **Grill (if needed).** If the request needs fleshing out, call the Skill tool twice, for "grilling" and "domain-modeling", and grill it into shape a round of questions at a time, sharpening domain terms and updating `GLOSSARY.md`/ADRs inline as decisions land. 5. **Apply the outcome:** - `ready-for-agent`: post an agent brief comment ([AGENT-BRIEF.md](AGENT-BRIEF.md)). diff --git a/.agents/skills/wayfinder/SKILL.md b/.agents/skills/wayfinder/SKILL.md index 812805b7..975d6bf9 100644 --- a/.agents/skills/wayfinder/SKILL.md +++ b/.agents/skills/wayfinder/SKILL.md @@ -62,7 +62,7 @@ Each ticket is a **child issue** of the map; the tracker's issue id is its ident ``` -Each ticket carries a `wayfinder:` label, one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)). +Each ticket carries a `wayfinder:` label, one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)). `wayfinder:` labels are the only labels a map and its tickets carry, never a triage label like `ready-for-agent`: they are decisions, not implementation work. 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. @@ -111,8 +111,8 @@ User invokes with a loose idea. 1. **Name the destination.** Call the Skill tool twice, for "grilling" and "domain-modeling", 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. **Fire the research subagents.** For each `research` ticket you just created, spin up a subagent that calls the Skill tool with "research" to resolve it in parallel, capturing its findings on a throwaway `research/` branch with a context pointer from the ticket. +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). Write cross-references in that pass too, with real ids: a placeholder `#` auto-links to an unrelated issue. 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. **Fire the research subagents.** For each `research` ticket you just created, spin up a subagent with a fresh context window that calls the Skill tool with "research" to resolve it in parallel, capturing its findings on a throwaway `research/` branch with a context pointer from the ticket. Push the branch but open no PR: it is never merged. 6. Stop: charting is one session's work; it hand-resolves nothing. ### Work through the map @@ -121,7 +121,7 @@ User invokes with a map (URL or number). A ticket is **optional**: without one, 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; call the Skill tool for whichever skills the `## Notes` block names. If in doubt, call the Skill tool twice, for "grilling" and "domain-modeling". +3. Resolve it as the type its `wayfinder:` label names (see [Ticket Types](#ticket-types)). Read the label, not just the body: the body never states the type. **Zoom as needed**: fetch the full body of any related or closed ticket on demand; call the Skill tool for whichever skills the `## Notes` block names. If in doubt, call the Skill tool twice, for "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 that 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. diff --git a/.agents/skills/wizard/SKILL.md b/.agents/skills/wizard/SKILL.md new file mode 100644 index 00000000..c4294ad8 --- /dev/null +++ b/.agents/skills/wizard/SKILL.md @@ -0,0 +1,44 @@ +--- +name: wizard +description: Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself. +--- + +# Wizard + +A **wizard** is a bash script that walks a human, step by step, through a manual procedure that's tedious to do by hand and tedious to re-explain to an AI every time. It opens each URL, says exactly what to click and copy, captures the values, writes them where they belong (`.env`, GitHub secrets), confirms at every stage, and shows how many stages are left. It might configure third-party services, run a one-off migration, or move the project from one state to another. + +The delightful UX is already solved by [template.sh](template.sh): stage-by-stage progress, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent `.env` upserts, `gh secret`/`gh variable` writes, and a closing summary. **Your job is only to scope the procedure and author its stages.** The library above the `STAGES` marker is identical in every wizard; that consistency is the point: never hand-edit it. + +A wizard is ephemeral by default: built for one run, saved to a scratch or `scripts/` path, deleted when the job's done. Commit it only when the user wants a repeatable setup path that should live in the repo. + +## Process + +### 1. Scope the procedure + +Work out every manual step the human must take and every value that gets captured along the way. Read the repo first, don't ask cold: + +- For setup: `.env`, `.env.example`, `.env.*`, `README`, `docker-compose*`, framework config, and `.github/workflows/*` (every `secrets.*` / `vars.*` reference is a value the wizard must produce). +- For a migration or transition: the current state, the target state, and the irreversible actions between them. + +Then show the user the ordered list of stages and the values each produces, and confirm: they may add, drop, or reorder. + +**Done when:** every stage is named in order, and for each captured value you know (a) where the human gets it, (b) where it's written (`.env`, a GitHub secret, both, or nowhere; some stages are pure actions), and (c) whether it's secret (hidden entry) or public. + +### 2. Map each stage's journey + +For each stage, write the precise path a human follows: which URL to open, what to do there, where a value is shown, which variable it fills: e.g. "Dashboard → Developers → API keys → Reveal test key → copy". Where you don't actually know the current UI or the exact command, say so and ask the user or check the docs: never invent steps that may not exist. + +**Done when:** every stage traces to concrete instructions a stranger could follow. + +### 3. Author the wizard + +Copy `template.sh` to the target path. Replace the example stage with one `stage` per step, in dependency order. Use the library helpers: `stage`, `say`/`step`, `open_url`, `ask`/`ask_secret`, `write_env`, `set_secret`/`set_var`, `pause`/`confirm`. Set `TOTAL_STAGES` to the number of stages you wrote. + +Hold the bar the template sets: open the URL before asking for its value, use `ask_secret` for anything secret, `write_env` every persisted value, `set_secret` only the values CI actually needs, and `confirm` before any irreversible action. Each `stage` clears the screen so only the current step is visible: keep a stage to one focused task so nothing the human needs scrolls away. Don't touch the library above the marker. + +### 4. Verify and hand off + +- `bash -n