diff options
| author | Matt Pocock <bot@x> | 2026-12-04 20:12:33 +0000 |
|---|---|---|
| committer | Matt Pocock <bot@x> | 2026-12-04 20:12:33 +0000 |
| commit | eca3a7d63913660dbe7cb2e7ccfa0ae137df2d35 (patch) | |
| tree | 7e5616694554d49adcd30d92962a1677d4f87fa8 | |
| parent | 9e1f4fd4a5762b7bc6cdf5959b1843c49bb5f6e9 (diff) | |
| parent | 72188b29f453b07d5759c56e303e1542cb1cea92 (diff) | |
Merge maingrilling-lookup-fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 files changed, 348 insertions, 40 deletions
diff --git a/.changeset/adr-when-a-decision-changes.md b/.changeset/adr-when-a-decision-changes.md new file mode 100644 index 0000000..9f4c7c3 --- /dev/null +++ b/.changeset/adr-when-a-decision-changes.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`domain-modeling` now says what happens to an ADR once the code moves on: the code stays the source of truth for what the app does, a reversal gets a new ADR that names the dropped approach, and the old ADR is deleted. The optional Status field is gone, since it went stale ([#822](https://github.com/mattpocock/skills/issues/822)). Thanks to @iKon85. diff --git a/.changeset/architecture-load-domain-modeling.md b/.changeset/architecture-load-domain-modeling.md new file mode 100644 index 0000000..0c0ee67 --- /dev/null +++ b/.changeset/architecture-load-domain-modeling.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`improve-codebase-architecture` now loads `domain-modeling` at the start of the grilling loop, so the agent knows when an ADR is worth offering. Thanks to @JayYa. diff --git a/.changeset/bounded-context-link.md b/.changeset/bounded-context-link.md new file mode 100644 index 0000000..04544d4 --- /dev/null +++ b/.changeset/bounded-context-link.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`domain-modeling` and `setup-matt-pocock-skills` now link to Martin Fowler's explanation of a bounded context. diff --git a/.changeset/code-review-uncommitted.md b/.changeset/code-review-uncommitted.md new file mode 100644 index 0000000..cd659c8 --- /dev/null +++ b/.changeset/code-review-uncommitted.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`code-review` now reviews uncommitted work too: staged changes, unstaged changes and new files. Thanks to @sorcerai. diff --git a/.changeset/grilling-drop-dont-block.md b/.changeset/grilling-drop-dont-block.md new file mode 100644 index 0000000..8c219c4 --- /dev/null +++ b/.changeset/grilling-drop-dont-block.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": minor +--- + +`grilling` no longer tells the agent to ask questions while its sub-agents are still exploring. Those early questions could change, or arrive in extra batches, while you were answering. Thanks to @itsramiel. diff --git a/.changeset/grilling-lookup-fallback.md b/.changeset/grilling-lookup-fallback.md index e796683..8c5ac14 100644 --- a/.changeset/grilling-lookup-fallback.md +++ b/.changeset/grilling-lookup-fallback.md @@ -2,4 +2,4 @@ "mattpocock-skills": patch --- -`grilling` looks a fact up itself when it can't dispatch a sub-agent, such as when the host doesn't allow one, and still asks the questions that don't depend on it ([#1499](https://github.com/mattpocock/skills/issues/1499)). Thanks to @L1QU1D-D14M0ND. +`grilling` looks a fact up itself when it can't dispatch a sub-agent, such as when the host doesn't allow one ([#1499](https://github.com/mattpocock/skills/issues/1499)). Thanks to @L1QU1D-D14M0ND. diff --git a/.changeset/implement-commit-before-review.md b/.changeset/implement-commit-before-review.md new file mode 100644 index 0000000..7ddfbae --- /dev/null +++ b/.changeset/implement-commit-before-review.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`implement` now commits before calling `code-review`, which only diffs committed work. Review fixes go in a commit on top. diff --git a/.changeset/implement-fetch-spec.md b/.changeset/implement-fetch-spec.md new file mode 100644 index 0000000..5a54d12 --- /dev/null +++ b/.changeset/implement-fetch-spec.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`implement` now fetches a ticket's spec along with the ticket, so it sees the test seams agreed in `to-spec`. Thanks to @fabiandistler. diff --git a/.changeset/implement-spec-pr-body.md b/.changeset/implement-spec-pr-body.md new file mode 100644 index 0000000..c69e5e8 --- /dev/null +++ b/.changeset/implement-spec-pr-body.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`implement-spec` now rewrites the PR body before marking the PR ready, instead of leaving the placeholder it opened with. Thanks to @JayYa. diff --git a/.changeset/implement-spec-review-reports.md b/.changeset/implement-spec-review-reports.md new file mode 100644 index 0000000..5218c96 --- /dev/null +++ b/.changeset/implement-spec-review-reports.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`implement-spec` now comments the code review's reports on the PR before marking it ready. Thanks to @palonsorodriguez. diff --git a/.changeset/perfect-docs-quick-start.md b/.changeset/perfect-docs-quick-start.md new file mode 100644 index 0000000..c953b34 --- /dev/null +++ b/.changeset/perfect-docs-quick-start.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`perfect-docs` now requires a quick start for each mode of use, first in the navigation and shaped like a Guide. diff --git a/.changeset/perfect-docs-skill.md b/.changeset/perfect-docs-skill.md new file mode 100644 index 0000000..82f553c --- /dev/null +++ b/.changeset/perfect-docs-skill.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +Add `perfect-docs`, an in-progress model-invoked skill: the target state for a library's docs site, for any language and docs tool. Learn, Guides and Reference each own one kind of fact; Learn teaches concepts in learning-graph order with a problem-first arc; Reference is hand-written with one entry per public export; and automated checks cover code examples, export coverage, cross-links, links and redirects. diff --git a/.changeset/prototype-read-branch-file.md b/.changeset/prototype-read-branch-file.md new file mode 100644 index 0000000..4b1c259 --- /dev/null +++ b/.changeset/prototype-read-branch-file.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`prototype`: the agent now has to read the file for its branch (`LOGIC.md` or `UI.md`) before building. It used to build from a one-line summary instead. Thanks to @MLazolatorre. diff --git a/.changeset/retro-style-guide-scope.md b/.changeset/retro-style-guide-scope.md new file mode 100644 index 0000000..e29626d --- /dev/null +++ b/.changeset/retro-style-guide-scope.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`retro` now says the `writing-for-agents` style guide is for steering files, so its report to you stays in readable prose. Thanks to @Elemand3D. diff --git a/.changeset/setup-bounded-contexts.md b/.changeset/setup-bounded-contexts.md new file mode 100644 index 0000000..a7b9c9e --- /dev/null +++ b/.changeset/setup-bounded-contexts.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`setup-matt-pocock-skills` now offers a `GLOSSARY-MAP.md` when the repo has several bounded contexts. It used to look for JavaScript workspace files. Thanks to @max-lancaster. diff --git a/.changeset/setup-drop-skill-list.md b/.changeset/setup-drop-skill-list.md new file mode 100644 index 0000000..ed77764 --- /dev/null +++ b/.changeset/setup-drop-skill-list.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`setup-matt-pocock-skills` no longer ends by listing which skills read the config files. The agent was guessing the list. Thanks to @mrclrchtr. diff --git a/.changeset/setup-gitlab-merge-requests.md b/.changeset/setup-gitlab-merge-requests.md new file mode 100644 index 0000000..77b738a --- /dev/null +++ b/.changeset/setup-gitlab-merge-requests.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`setup-matt-pocock-skills` now tells agents in GitLab repos to write merge request descriptions with the `pr` skill. Thanks to @CVogel. diff --git a/.changeset/wayfinder-frontier-sub-issues.md b/.changeset/wayfinder-frontier-sub-issues.md new file mode 100644 index 0000000..492f6af --- /dev/null +++ b/.changeset/wayfinder-frontier-sub-issues.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`setup-matt-pocock-skills`' GitHub frontier query now reads the map's sub-issues through the API, instead of `gh issue list`, which can't scope to a map and stops at 30 issues ([#1490](https://github.com/mattpocock/skills/issues/1490)). Thanks to @mfroembgen. diff --git a/.changeset/wayfinder-prototype-tickets.md b/.changeset/wayfinder-prototype-tickets.md new file mode 100644 index 0000000..3e5b8d4 --- /dev/null +++ b/.changeset/wayfinder-prototype-tickets.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`wayfinder`: prototype tickets now follow the `prototype` skill. The agent used to build from wayfinder's own summary instead. Thanks to @MLazolatorre and @VladimirMarko. diff --git a/.changeset/wizard-tput-dim.md b/.changeset/wizard-tput-dim.md new file mode 100644 index 0000000..f22dca5 --- /dev/null +++ b/.changeset/wizard-tput-dim.md @@ -0,0 +1,5 @@ +--- +"mattpocock-skills": patch +--- + +`wizard`: the script no longer exits before printing anything on macOS terminals that don't support dim text. Thanks to @the-kwisatz-haderach. diff --git a/docs/engineering/code-review.md b/docs/engineering/code-review.md index 12283d7..5ffb0d1 100644 --- a/docs/engineering/code-review.md +++ b/docs/engineering/code-review.md @@ -1,6 +1,6 @@ ## What it does -`code-review` reviews the diff between `HEAD` and a fixed point you name (a commit, a branch, a tag, `main`, `HEAD~5`) along two axes. **Standards** asks whether the code follows how this repo writes code. **Spec** asks whether the code does what the originating issue or [spec](https://www.aihero.dev/ai-coding-dictionary/spec) asked for. Each axis runs in its own [sub-agent](https://www.aihero.dev/ai-coding-dictionary/subagent) so neither sees the other's reasoning. +`code-review` reviews the diff between your working tree and a fixed point you name (a commit, a branch, a tag, `main`, `HEAD~5`) along two axes. **Standards** asks whether the code follows how this repo writes code. **Spec** asks whether the code does what the originating issue or [spec](https://www.aihero.dev/ai-coding-dictionary/spec) asked for. Each axis runs in its own [sub-agent](https://www.aihero.dev/ai-coding-dictionary/subagent) so neither sees the other's reasoning. The skill never merges or re-ranks the two axes. The report ends with a worst issue *per axis* and declines to name a single winner across them. A change can pass one axis and fail the other. Code that follows every convention but implements the wrong thing passes Standards and fails Spec. Code that does exactly what the [ticket](https://www.aihero.dev/ai-coding-dictionary/ticket) asked but breaks the repo's conventions does the reverse. A blended verdict lets the passing axis hide the failing one. @@ -78,7 +78,7 @@ Each fix adds new code to review, and the judgement-call half of the Standards a **Does it review my uncommitted work?** -No. It diffs `<fixed-point>...HEAD`. The three-dot form measures from the merge-base and excludes staged and working-tree changes. If `implement` has not made an interim commit, the review cannot see the work that is about to go into the next commit. Commit first, then review, then amend or add a fixup. +Yes. It reviews everything since the merge-base with your fixed point: commits, staged and unstaged changes, and new files that git doesn't ignore. Unrelated edits in your working tree get reviewed too, so stash those first. ## It's working if diff --git a/docs/engineering/domain-modeling.md b/docs/engineering/domain-modeling.md index 35fba8e..47080f9 100644 --- a/docs/engineering/domain-modeling.md +++ b/docs/engineering/domain-modeling.md @@ -54,6 +54,9 @@ It cross-references **code** and the committed `GLOSSARY.md` and ADRs, and nothi **My `GLOSSARY.md` is 500 lines. 1,000. 3,000. What do I do?** The size is a symptom. The cause is that the file has taken in implementation detail and decisions that never belonged in a glossary. The fix is a direct instruction: `/grill-with-docs make my GLOSSARY.md more concise and remove any implementation details from it`. Run it against a bloated file and most of it goes. Only split it with a `GLOSSARY-MAP.md` once the file is lean and still covers two domains that a reader would not want to hold at once. Splitting a bloated file gives you several bloated files. The skill's guidance here is not yet strong enough to prevent the growth in the first place, and the issue tracking that is still open. +**Do I need a `GLOSSARY.md` or a `GLOSSARY-MAP.md`?** +Start with one `GLOSSARY.md`. Count [bounded contexts](https://martinfowler.com/bliki/BoundedContext.html), not packages: a monorepo with twenty packages can share one language. Move to a `GLOSSARY-MAP.md` when the same word means different things in two parts of the repo, and both meanings are right. To make the split, run `/domain-modeling split GLOSSARY.md by bounded context`. Each context gets its own `GLOSSARY.md`, and the map at the repo root links to them. + **Why is it `GLOSSARY.md` and not `CONTEXT.md`?** It was `CONTEXT.md` (and `CONTEXT-MAP.md`) until 1.3.0. The file is a glossary and nothing else, so `GLOSSARY.md` says so, and, as one reader put it, "with ai agents everything is [context](https://www.aihero.dev/ai-coding-dictionary/context)". If your repo still has a `CONTEXT.md`, re-run `/setup-matt-pocock-skills`: it offers to `git mv` the file and update `docs/agents/domain.md`. Every skill in the set looks for `GLOSSARY.md`, so keeping the old name means patching all of them. diff --git a/docs/engineering/implement-spec.md b/docs/engineering/implement-spec.md index 771a7ca..14334fc 100644 --- a/docs/engineering/implement-spec.md +++ b/docs/engineering/implement-spec.md @@ -29,7 +29,7 @@ Everything lands on one branch. Each implementer: 2. builds its ticket with [tdd](https://aihero.dev/skills-tdd), red-green one slice at a time, 3. merges the integration branch tip into its own branch before reporting done, so landing it is a fast-forward. -The tracker decides whether a pull request exists at all. If your tracker closes work through PRs, or you ask for one, the skill opens a draft PR after the first merge and marks it ready at the end. Otherwise the run stops on the integration branch with every ticket resolved the way your tracker closes work, which works fully offline against a local markdown tracker. +The tracker decides whether a pull request exists at all. If your tracker closes work through PRs, or you ask for one, the skill opens a draft PR after the first merge. At the end it rewrites the PR body, comments the code review's reports on the PR and marks it ready. Otherwise the run stops on the integration branch with every ticket resolved the way your tracker closes work, which works fully offline against a local markdown tracker. Implementers talk to the orchestrator through [context pointers](https://www.aihero.dev/ai-coding-dictionary/context-pointer) (the spec, the ticket, shared exploration notes, earlier commits) rather than pasted summaries. This keeps each subagent's prompt small and leaves room in the orchestrator's window for the graph. diff --git a/docs/engineering/implement.md b/docs/engineering/implement.md index b08985c..79c81b2 100644 --- a/docs/engineering/implement.md +++ b/docs/engineering/implement.md @@ -32,13 +32,13 @@ If the tickets came from [to-tickets](https://aihero.dev/skills-to-tickets), [se A run has five steps, in order: -1. Read the ticket or spec and work out the seams. +1. Read the ticket and its spec, if it has one, and work out the seams. 2. Drive [tdd](https://aihero.dev/skills-tdd) at the pre-agreed seams, one red-green slice at a time. 3. Typecheck often, run single test files as it goes. 4. Run the full test suite once, at the end. 5. Run [code-review](https://aihero.dev/skills-code-review), then commit to the current branch. -One run covers one ticket. The tickets [to-tickets](https://aihero.dev/skills-to-tickets) produces are tracer-bullet vertical slices sized to fit a single fresh [context window](https://www.aihero.dev/ai-coding-dictionary/context-window), so the intended rhythm is: clear context, implement one ticket, commit, clear again. Each ticket is self-contained, so you can discard the previous ticket's context. +One run covers one ticket. The tickets [to-tickets](https://aihero.dev/skills-to-tickets) produces are tracer-bullet vertical slices sized to fit a single fresh [context window](https://www.aihero.dev/ai-coding-dictionary/context-window), so the intended rhythm is: clear context, implement one ticket, commit, clear again. Each run needs only its ticket and the spec, so you can discard the previous ticket's context. ## Pre-agreed seams @@ -60,11 +60,9 @@ Not with `/implement`: one invocation, one ticket. For a whole spec in one run, Not built in. It commits straight to the current branch. Several people find this too eager, because the code lands before they can verify it works. There is no configuration flag and no PR mode. People override it in the invocation ("commit to a branch and open a PR") or by editing their local copy of the skill. When the agent does write the PR, [pr](https://aihero.dev/skills-pr) shapes its body. -**`code-review` says it cannot see my changes.** +**Can I keep the review out of the run?** -`code-review` reviews `git diff <fixed-point>...HEAD`, which excludes staged and working-tree changes. `implement` runs it before committing, so unless an interim commit already exists there is nothing in that diff to review. Multiple people have reported this and it is unfixed on both sides. Commit first, then review against the point you branched from. - -Separately, some people do not want the review inside the run at all, because an agent reviewing the code it just wrote is biased toward its own solution. Running [code-review](https://aihero.dev/skills-code-review) in a fresh session against a fixed point is a valid alternative. The same bias is why that skill runs its two axes in separate sub-agents. +Yes. Some people do not want it there, because an agent reviewing the code it just wrote is biased toward its own solution. Running [code-review](https://aihero.dev/skills-code-review) in a fresh session against a fixed point is a valid alternative. The same bias is why that skill runs its two axes in separate sub-agents. **One ticket burned 150k tokens. Am I using it wrong?** @@ -72,7 +70,7 @@ Probably not. The ticket is more likely too big. A run does codebase exploration **`/implement #2` in a fresh session worked on something completely unrelated.** -The agent resolved `#2` against another numbered list in context, such as a todo file or checklist, rather than the configured tracker. `implement` now fetches a passed reference from the issue tracker and states its title before starting, and asks when the reference is ambiguous. Check that title matches the ticket you meant; passing the issue URL or `owner/repo#2` removes the ambiguity entirely. +The agent resolved `#2` against another numbered list in context, such as a todo file or checklist, rather than the configured tracker. `implement` now fetches a passed reference (and its spec, if any) from the issue tracker, states the ticket's title before starting, and asks when the reference is ambiguous. Check that title matches the ticket you meant; passing the issue URL or `owner/repo#2` removes the ambiguity entirely. ## It's working if diff --git a/docs/engineering/setup-matt-pocock-skills.md b/docs/engineering/setup-matt-pocock-skills.md index 4b255af..794a7e9 100644 --- a/docs/engineering/setup-matt-pocock-skills.md +++ b/docs/engineering/setup-matt-pocock-skills.md @@ -33,7 +33,7 @@ It starts each section with the recommended answer, and skips any question its e | --- | --- | --- | | **Issue tracker** | the one matching your `git remote` | always, because this is the one real choice | | **Triage labels** | keep the five canonical names (`needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`) | only if the `triage` skill is installed | -| **Domain docs** | single-context: one `GLOSSARY.md` plus `docs/adr/` at the root | only if it spots monorepo signals, and then it offers a multi-context `GLOSSARY-MAP.md` | +| **Domain docs** | single-context: one `GLOSSARY.md` plus `docs/adr/` at the root | only if it finds several bounded contexts, and then it offers a multi-context `GLOSSARY-MAP.md` | The tracker options: diff --git a/docs/productivity/grilling.md b/docs/productivity/grilling.md index eff7c56..599d83e 100644 --- a/docs/productivity/grilling.md +++ b/docs/productivity/grilling.md @@ -26,7 +26,7 @@ The **design tree** is the model of the subject: decisions with decisions hangin Inside a round, every question has a fixed format: numbered and titled behind a `❓`, then the body, then the agent's recommended answer alone on a `➡️` line. This format lets you answer a round by number ("1 yes, 2 the second option, 3 no, here's why") instead of by quoting questions back. The format has one known problem. The recommendation sometimes argues *against* the question as it was worded, so agreeing with the recommendation means answering "no" to the question. When that happens, answer the recommendation and say so. -The other half of the design is the split between facts and decisions. Facts are the skill's own job. When a frontier question needs something the [environment](https://www.aihero.dev/ai-coding-dictionary/environment) can settle, the agent dispatches a [sub-agent](https://www.aihero.dev/ai-coding-dictionary/subagent) to find out rather than asking you. The round does not wait for that research; only the questions that depend on it wait. Decisions are yours, and the agent must wait for them. An agent running `grilling` that answers its own decisions has broken the skill. The session ends when the frontier is empty. The agent then waits for you to confirm a shared understanding before it acts on what you agreed. +The other half of the design is the split between facts and decisions. Facts are the skill's own job. When a frontier question needs something the [environment](https://www.aihero.dev/ai-coding-dictionary/environment) can settle, the agent dispatches a [sub-agent](https://www.aihero.dev/ai-coding-dictionary/subagent) to find out rather than asking you. Decisions are yours, and the agent must wait for them. An agent running `grilling` that answers its own decisions has broken the skill. The session ends when the frontier is empty. The agent then waits for you to confirm a shared understanding before it acts on what you agreed. The frontier has one limit. The agent chooses it by judgement; it does not compute it from a graph. So it can put two questions in one round and only later find that one answer should have changed the other. The only guard is to tell it. That reopens the affected branch in the next round. @@ -78,7 +78,6 @@ This is a real bug, still unfixed, and users report it across [harnesses](https: - Nothing in a round needs another question in the same round answered first. - Later rounds ask things the first round could not have asked. - It goes and looks facts up (reading files, dispatching a sub-agent) rather than asking you something it could have found out. -- Research running in the background does not stall the round; only the questions that depend on it wait. - It stops at the end and asks you to confirm the understanding is shared, instead of starting work. - Question count stays high while round count stays low. diff --git a/skills/engineering/ask-matt/SKILL.md b/skills/engineering/ask-matt/SKILL.md index 4bfeeb6..8d6256b 100644 --- a/skills/engineering/ask-matt/SKILL.md +++ b/skills/engineering/ask-matt/SKILL.md @@ -23,7 +23,7 @@ The route most work travels. You have an idea and want it built. - **`/handoff`** back what you learned, and reference it from the original idea thread. 3. **Branch: is this a multi-session build?** - **Yes** → **`/to-spec`** (turn the thread into a spec), then **`/to-tickets`** to split it into tracer-bullet tickets, each declaring its **blocking edges**. Then work the tickets one of two ways: - - **`/implement`** per ticket, **`/clear`ing context between each one**. On a local tracker that's one file per ticket under `.scratch/<feature>/issues/`, worked blockers-first by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed. Each ticket is self-contained, so the last one's context is disposable. + - **`/implement`** per ticket, **`/clear`ing context between each one**. On a local tracker that's one file per ticket under `.scratch/<feature>/issues/`, worked blockers-first by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed. Each run needs only its ticket and the spec, so the last one's context is disposable. - **`/implement-spec`** for the whole spec in one run. It reads the tickets as a **task graph**, runs implementer subagents across the ready **frontier** in parallel, and lands everything on one **integration branch**. Reach for it when you'd rather orchestrate the build than drive each ticket yourself. - **No** → **`/implement`** right here, in the same context window. @@ -35,7 +35,7 @@ The route most work travels. You have an idea and want it built. ### Context hygiene -Keep steps 1–3 in **one unbroken context window** (don't compact or clear until after `/to-tickets`) so the grilling, spec, and tickets all build on the same thinking. Each `/implement` then starts fresh, working from the ticket. Run `/retro` in the session it's looking back on, before you clear; after clearing, point it at that session's log instead. +Keep steps 1–3 in **one unbroken context window** (don't compact or clear until after `/to-tickets`) so the grilling, spec, and tickets all build on the same thinking. Each `/implement` then starts fresh, working from the ticket and its spec. Run `/retro` in the session it's looking back on, before you clear; after clearing, point it at that session's log instead. The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~150k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-tickets`, don't push on degraded; `/compact` at the nearest phase boundary and carry on (see Phase boundaries). diff --git a/skills/engineering/code-review/SKILL.md b/skills/engineering/code-review/SKILL.md index 83183e0..6a5906e 100644 --- a/skills/engineering/code-review/SKILL.md +++ b/skills/engineering/code-review/SKILL.md @@ -3,7 +3,7 @@ name: code-review description: "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\"." --- -Two-axis review of the diff between `HEAD` and a fixed point the user supplies: +Two-axis review of the changes since 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? @@ -18,7 +18,7 @@ The issue tracker should have been provided to you. If not, tell the user to run Whatever the user said is the fixed point (a commit SHA, branch name, tag, `main`, `HEAD~5`, etc.). If they didn't specify one, ask for it. -Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`. +The diff is `git diff --merge-base <fixed-point>` plus the untracked files (`git ls-files --others --exclude-standard`). List the commits with `git log <fixed-point>..HEAD --oneline`. Before going further, confirm the fixed point resolves (`git rev-parse <fixed-point>`) and the diff is non-empty. A bad ref or empty diff should fail here, not inside two parallel sub-agents. @@ -61,13 +61,13 @@ Issue both sub-agent calls together, in the foreground, and aggregate the report **Standards sub-agent prompt** should include: -- The full diff command and commit list. +- Both diff commands and the commit list. - The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full (the sub-agent has no other access to it). - The brief: "Report, per file/hunk where relevant, (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls: documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words." **Spec sub-agent prompt** should include: -- The diff command and commit list. +- Both diff commands and the commit list. - The path or fetched contents of the spec. - The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words." diff --git a/skills/engineering/domain-modeling/ADR-FORMAT.md b/skills/engineering/domain-modeling/ADR-FORMAT.md index d7e61f3..274ca5e 100644 --- a/skills/engineering/domain-modeling/ADR-FORMAT.md +++ b/skills/engineering/domain-modeling/ADR-FORMAT.md @@ -18,10 +18,13 @@ That's it. An ADR can be a single paragraph. The value is in recording *that* a Only include these when they add genuine value. Most ADRs won't need them. -- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`): useful when decisions are revisited - **Considered Options**: only when the rejected alternatives are worth remembering - **Consequences**: only when non-obvious downstream effects need to be called out +## When a decision changes + +The code says _what_ the app does, and stays the source of truth for it. An ADR adds _why_. When the code moves on from an ADR, write a new ADR for the new decision, list the old approach in its Considered Options ("we did this, and dropped it, because..."), and delete the old ADR. Git keeps it. Also delete any ADR that fails the bar below. + ## Numbering Scan `docs/adr/` for the highest existing number and increment by one. diff --git a/skills/engineering/domain-modeling/SKILL.md b/skills/engineering/domain-modeling/SKILL.md index a4438c6..310b16e 100644 --- a/skills/engineering/domain-modeling/SKILL.md +++ b/skills/engineering/domain-modeling/SKILL.md @@ -9,7 +9,7 @@ Actively build and sharpen the project's domain model as you design. This is the ## File structure -Most repos have a single context: +Most repos have a single [bounded context](https://martinfowler.com/bliki/BoundedContext.html), in the DDD sense: ``` / diff --git a/skills/engineering/implement-spec/SKILL.md b/skills/engineering/implement-spec/SKILL.md index 73d36c2..d7e58a8 100644 --- a/skills/engineering/implement-spec/SKILL.md +++ b/skills/engineering/implement-spec/SKILL.md @@ -37,6 +37,6 @@ Communication to and from subagents should be sparse. Communicate primarily thro 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. +8. If a draft PR exists, rewrite its body (keeping the closing references), comment the code review's reports on it and 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/skills/engineering/implement/SKILL.md b/skills/engineering/implement/SKILL.md index bd49e47..0bdad76 100644 --- a/skills/engineering/implement/SKILL.md +++ b/skills/engineering/implement/SKILL.md @@ -6,12 +6,12 @@ disable-model-invocation: true Implement the work described by the user in the spec or tickets. -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. +If the user passes a ticket reference, fetch it (and its spec, if any) 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, call the Skill tool with "code-review" to review the work. +Once done, commit your work to the current branch. -Commit your work to the current branch. +Then call the Skill tool with "code-review" to review the work. Commit any fixes on top. diff --git a/skills/engineering/improve-codebase-architecture/SKILL.md b/skills/engineering/improve-codebase-architecture/SKILL.md index f1eabb5..db36078 100644 --- a/skills/engineering/improve-codebase-architecture/SKILL.md +++ b/skills/engineering/improve-codebase-architecture/SKILL.md @@ -61,9 +61,9 @@ Do NOT propose interfaces yet. After the file is written, ask the user: "Which o ### 3. Grilling loop -Once the user picks a candidate, call the Skill tool with "grilling" to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive. +Once the user picks a candidate, call the Skill tool twice, for "grilling" and "domain-modeling". Walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive. -Side effects happen inline as decisions crystallize; call the Skill tool with "domain-modeling" to keep the domain model current as you go: +Side effects happen inline as decisions crystallize: - **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. diff --git a/skills/engineering/prototype/SKILL.md b/skills/engineering/prototype/SKILL.md index a004450..ef68f24 100644 --- a/skills/engineering/prototype/SKILL.md +++ b/skills/engineering/prototype/SKILL.md @@ -11,8 +11,8 @@ A prototype is **throwaway code that answers a question**. The question decides Identify which question is being answered, using the user's prompt, the surrounding code, or by asking if the user is around: -- **"Does this logic / state model feel right?"** → [LOGIC.md](LOGIC.md). Build a single shareable HTML file (free-play buttons plus tabbed guided walkthroughs) that pushes the state machine through cases that are hard to reason about on paper, and that a non-developer can drive. -- **"What should this look like?"** → [UI.md](UI.md). Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar. +- **"Does this logic / state model feel right?"** → read [LOGIC.md](LOGIC.md). +- **"What should this look like?"** → read [UI.md](UI.md). The two branches produce very different artifacts, so getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype. diff --git a/skills/engineering/retro/SKILL.md b/skills/engineering/retro/SKILL.md index 12149ac..9b22ff7 100644 --- a/skills/engineering/retro/SKILL.md +++ b/skills/engineering/retro/SKILL.md @@ -8,7 +8,7 @@ The user has asked for a **retrospective**. You are suggesting improvements to t ## Steps -1. Call the Skill tool with `writing-for-agents` for the writing style guide. +1. Call the Skill tool with `writing-for-agents` for the style guide to steering files. 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. diff --git a/skills/engineering/setup-matt-pocock-skills/SKILL.md b/skills/engineering/setup-matt-pocock-skills/SKILL.md index 2df0b07..1b13013 100644 --- a/skills/engineering/setup-matt-pocock-skills/SKILL.md +++ b/skills/engineering/setup-matt-pocock-skills/SKILL.md @@ -27,13 +27,13 @@ Look at the current repo to understand its starting state. Read whatever exists; - `docs/agents/`: does this skill's prior output already exist? - `.scratch/`: a sign that a local-markdown issue tracker convention is already in use - Is the `triage` skill installed? (a `triage` skill folder alongside this one, or `triage` in your available skills.) This decides whether Section B runs at all. -- Monorepo signals: a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, or a populated `packages/*` with its own `src/`. These are present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo. +- [Bounded contexts](https://martinfowler.com/bliki/BoundedContext.html), in the DDD sense. Almost every repo has just one. ### 2. Present findings and ask Summarise what's present and what's missing. Then take the sections in order. One section, one answer, then the next. -Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it (Section B when `triage` isn't installed, Section C when there's no monorepo). +Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it (Section B when `triage` isn't installed, Section C when there's only one bounded context). **Section A: Issue tracker.** @@ -60,7 +60,7 @@ The defaults are the five canonical roles, each label string equal to its name: **Section C: Domain docs.** Default to **single-context** (one `GLOSSARY.md` + `docs/adr/` at the repo root). This fits almost every repo; write it without asking. -Offer **multi-context** (a root `GLOSSARY-MAP.md` pointing to per-context `GLOSSARY.md` files) only when exploration found monorepo signals. Then confirm which layout they want. +Offer **multi-context** (a root `GLOSSARY-MAP.md` pointing to per-context `GLOSSARY.md` files) only when exploration found several bounded contexts. Then confirm which layout they want. ### 3. Confirm and edit @@ -101,6 +101,8 @@ The block: [one-line summary of layout: "single-context" or "multi-context"]. See `docs/agents/domain.md`. ``` +On GitLab, end the `### Issue tracker` summary with: "Write merge request (MR) descriptions with the `pr` skill." + Include the `### Triage labels` sub-block, and write `docs/agents/triage-labels.md`, only when `triage` is installed and Section B ran. When it isn't, both are omitted. When Section B ran on GitHub or GitLab, create each configured label the tracker lacks (`gh label create` / `glab label create`). @@ -117,4 +119,4 @@ For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch us ### 5. Done -Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit `docs/agents/*.md` directly later; re-running this skill is only necessary if they want to switch issue trackers or restart from scratch. +Tell the user the setup is complete. Mention they can edit `docs/agents/*.md` directly later; re-running this skill is only necessary if they want to switch issue trackers or restart from scratch. diff --git a/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md b/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md index dc806f5..b233020 100644 --- a/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +++ b/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md @@ -45,6 +45,6 @@ Used by `/wayfinder`. The **map** is a single issue with **child** issues as tic - **Map**: a single issue labelled `wayfinder:map`, holding the 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 (see **Make an issue a sub-issue of a parent**). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev. - **Blocking**: see **Blocking** under Conventions. -- **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 (see **Count open blockers**, or an open issue in the `Blocked by` line) or an assignee; first in map order wins. +- **Frontier query**: list the map's open sub-issues with no assignee and no open blocker, in map order; the first wins. `gh api --paginate repos/{owner}/{repo}/issues/<map>/sub_issues --jq '.[] | select(.state == "open" and (.assignees | length) == 0 and .issue_dependencies_summary.blocked_by == 0) | "#\(.number) \(.title)"'`. Without sub-issues, read the children from the map's task list instead, and drop any with an assignee or an open issue in its `Blocked by` line. - **Claim**: `gh issue edit <n> --add-assignee @me`, the session's first write. - **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far. diff --git a/skills/engineering/wayfinder/SKILL.md b/skills/engineering/wayfinder/SKILL.md index 975d6bf..ae9a3a3 100644 --- a/skills/engineering/wayfinder/SKILL.md +++ b/skills/engineering/wayfinder/SKILL.md @@ -75,7 +75,7 @@ The answer isn't part of the body; it's recorded on resolution (see [Work throug 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 to surface a fact a decision waits on. Resolved by a subagent that calls the Skill tool with "research". 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) by calling the Skill tool with "prototype". Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question. +- **Prototype** (HITL): Call the Skill tool with "prototype". Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question. - **Grilling** (HITL): Conversation. The default case. Always call the Skill tool twice, for "grilling" and "domain-modeling". - **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. diff --git a/skills/engineering/wizard/template.sh b/skills/engineering/wizard/template.sh index 081ed3d..3373dc8 100644 --- a/skills/engineering/wizard/template.sh +++ b/skills/engineering/wizard/template.sh @@ -13,8 +13,8 @@ set -euo pipefail # ────────────────────────────────────────────────────────────────────────── if [[ -t 1 ]] && command -v tput >/dev/null 2>&1 && [[ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]]; then - BOLD=$(tput bold); DIM=$(tput dim); RESET=$(tput sgr0) - BLUE=$(tput setaf 4); GREEN=$(tput setaf 2); YELLOW=$(tput setaf 3) + BOLD=$(tput bold || true); DIM=$(tput dim || printf '\033[2m'); RESET=$(tput sgr0 || true) + BLUE=$(tput setaf 4 || true); GREEN=$(tput setaf 2 || true); YELLOW=$(tput setaf 3 || true) else BOLD=""; DIM=""; RESET=""; BLUE=""; GREEN=""; YELLOW="" fi diff --git a/skills/in-progress/README.md b/skills/in-progress/README.md index 456c29d..58652a7 100644 --- a/skills/in-progress/README.md +++ b/skills/in-progress/README.md @@ -16,3 +16,4 @@ npx skills@latest add mattpocock/skills --skill=<name> - **[setup-ts-deep-modules](./setup-ts-deep-modules/SKILL.md)**: Wire dependency-cruiser into a TypeScript repo so each package is a deep module: implementation hidden in subfolders, reachable only through its entry-point files, tests exercising it through those. User-invoked. - **[software-factory](./software-factory/SKILL.md)**: Shared language for designing a software factory: the tasks it runs and the services it plugs into. Call it alongside a grilling session. User-invoked. - **[chief-of-staff](./chief-of-staff/SKILL.md)**: Delegate the work to fresh subagents and remember what it taught you in a dated wiki, so the next session picks up the thread. User-invoked. +- **[perfect-docs](./perfect-docs/SKILL.md)**: The target state for a library's docs site: quick starts, Learn, Guides and Reference, one home per fact, concepts in learning-graph order, every code example checked against the source, every export covered, rigorous cross-links and redirects. diff --git a/skills/in-progress/perfect-docs/SKILL.md b/skills/in-progress/perfect-docs/SKILL.md new file mode 100644 index 0000000..bc7f1c6 --- /dev/null +++ b/skills/in-progress/perfect-docs/SKILL.md @@ -0,0 +1,66 @@ +--- +name: perfect-docs +description: "The target state for a library's documentation site: quick starts, Learn, Guides and Reference, one home per fact, concepts taught in learning-graph order, every code example checked against the source, every export covered, rigorous cross-links, redirects for every moved URL. Use when writing, restructuring or auditing a docs site, deciding where a piece of documentation belongs, or adding a check that keeps docs true to the code." +--- + +# Perfect Docs + +Measure a docs site against this target: every gap is a finding, and every change moves the site toward it. The target holds for any language and any docs tool. Each **automated check** below says what it must guarantee; the project picks the tool. + +## Vocabulary + +Use these words exactly, each in this one sense. + +- **Learn**: the reader's first journey through the library. It names the problems the library solves, then teaches every **concept** in **learning-graph** order. +- **Quick start**: the shortest path from install to working code, for one **mode** of use. +- **Mode**: a distinct way to use the library, such as a CLI and a library API, or one framework among several. +- **Guide**: one task, titled the way a developer searches for it. +- **Reference**: one **entry** per public export, written by hand. +- **Concept**: an idea a reader must hold to use the library. Its **home** is a heading in Learn. +- **Learning graph**: concepts as nodes, with an edge from A to B when B makes sense only after A. It has no cycles. +- **Forward mention**: a mention of a concept before its home in reading order. It is a cycle in the learning graph. +- **Home**: the one place a fact lives. Every other place links to it. +- **Entry**: the Reference heading for one export. Its anchor is the export's name. +- **Aside**: a collapsible block in Learn that holds depth a first-time reader can skip. +- **Fold**: lines of a code example hidden until the reader expands them. + +Say **concept** where "topic" or "idea" might come to mind, and **entry** where "API doc" might. + +## The sections + +The site has three sections, and each owns one kind of fact: + +| Section | Owns | Links out to | +| --------- | ---------------------------------------------------------- | ----------------------------------------- | +| Learn | what each concept is, why it exists, the order to learn it | Reference, on every export mention | +| Guides | the steps and choices of one task | Learn for concepts, Reference for exports | +| Reference | what each export does | Learn, for the concept behind it | + +A fact lives in exactly one home. Every other page that needs it links there, with at most a one-line gloss. A change to a behaviour is then a one-place edit, and the site cannot contradict itself. + +Every site has a quick start for each mode of use, first in the navigation, before Learn. A quick start takes the shape of a Guide (see [`guides.md`](guides.md)): it ends with working, checked code and teaches nothing, so every concept links to its home in Learn and every export to its entry. + +The quick starts, Learn and Reference are complete: every mode has a quick start, every concept has a home in Learn, and every public export has an entry in Reference. Guides are extra and never needed for completeness. + +## Topic files + +Read a topic file when the work touches that area. + +- [`learn.md`](learn.md): turning the learning graph into a reading order, breadth and depth, the problem-first arc, asides. +- [`guides.md`](guides.md): choosing Guide topics and the shape of a Guide. +- [`reference.md`](reference.md): the shape of an entry, and the coverage check. +- [`examples.md`](examples.md): concise examples, folds, and the examples check. +- [`links.md`](links.md): cross-link rules, the link check, the URL list and redirects. +- [`style.md`](style.md): the prose style, glossary terms, and the style review. + +## Automated checks + +Each runs in CI and fails the build on a violation. + +1. **Examples**: every code block is checked by the project's compiler or type checker against the current source. See [`examples.md`](examples.md). +2. **Coverage**: every public export has an entry, and every entry names a public export. See [`reference.md`](reference.md). +3. **Cross-links**: every export mention in Learn and Guides links to its entry, and every entry links to Learn. See [`links.md`](links.md). +4. **Links**: every internal link and anchor resolves. See [`links.md`](links.md). +5. **Redirects**: every page or anchor that leaves the URL list has a redirect or alias. See [`links.md`](links.md). + +What no check can judge (reading order, the problem each section opens with, the prose) is the job of the **style review** in [`style.md`](style.md). diff --git a/skills/in-progress/perfect-docs/agents/openai.yaml b/skills/in-progress/perfect-docs/agents/openai.yaml new file mode 100644 index 0000000..a6d282c --- /dev/null +++ b/skills/in-progress/perfect-docs/agents/openai.yaml @@ -0,0 +1,3 @@ +interface: + display_name: "Perfect Docs" + short_description: "The target state for a docs site" diff --git a/skills/in-progress/perfect-docs/examples.md b/skills/in-progress/perfect-docs/examples.md new file mode 100644 index 0000000..9fe6379 --- /dev/null +++ b/skills/in-progress/perfect-docs/examples.md @@ -0,0 +1,20 @@ +# Examples + +The docs are code-heavy. Every example is concise: it shows the problem it solves and nothing else. + +## Folds + +Lines that are not the point (imports, setup, types the reader has met) are folded, not deleted. The reader sees the focus and can expand the rest. The full example, folds included, is what the examples check compiles. + +## The examples check + +Every code block is checked in CI by the project's own compiler or type checker, against the current source. A rename in the code then fails the docs build, not the reader. + +A code block meets the check in one of two ways: + +- **Checked in place**: the docs tool extracts the block and checks it. +- **Included from a file**: the block is a region of a real file in the repo that is already checked or tested. + +Checking is the requirement; running is a bonus. An example that also runs, doctest-style, is welcome. + +The only blocks the check skips are blocks explicitly marked as not code: shell commands, program output, pseudo-code. The mark is explicit on each block. diff --git a/skills/in-progress/perfect-docs/guides.md b/skills/in-progress/perfect-docs/guides.md new file mode 100644 index 0000000..e1c56de --- /dev/null +++ b/skills/in-progress/perfect-docs/guides.md @@ -0,0 +1,18 @@ +# Guides + +A Guide is one task, titled the way a developer searches for it: "Add retries to a fetch call", "Test code that uses X". Guides bring readers in from search, and serve developers who already know what they want to do. + +## Choosing topics + +Take topics from real questions: issues, discussions, chat, search terms. A topic chosen by walking the API belongs in Reference instead. + +## Shape + +1. **The end result**, stated in one or two lines. +2. **What it assumes**: links to the Learn sections the reader needs. +3. **Steps with code.** Each step is an action and the code for it. +4. **The complete result**: the full, checked example, with folds where it is long. + +A quick start has the same shape. Its end result is the first working code in one mode, and it assumes no Learn section. + +A Guide explains no concept. Every concept links to its home in Learn, and every export mention links to its entry in Reference (see [`links.md`](links.md)). diff --git a/skills/in-progress/perfect-docs/learn.md b/skills/in-progress/perfect-docs/learn.md new file mode 100644 index 0000000..d3a38fa --- /dev/null +++ b/skills/in-progress/perfect-docs/learn.md @@ -0,0 +1,35 @@ +# Learn + +Learn turns a graph into a line. The learning graph has every concept as a node, with an edge from A to B when B makes sense only after A. The hard work is choosing which concepts come first and which sit together in one section. + +## Map the learning graph + +Before writing or restructuring Learn, sketch the learning graph in your working notes: every concept, and the concepts each one needs first. The graph is a thinking tool. It stays in your notes and is never committed or checked. + +The graph has no cycles. A **forward mention** is a cycle: it relies on a concept the reader meets later. Order the sections so each concept's home comes before its first use. Where a forward mention survives every ordering, keep it to a name and a link, and count it as a cost to remove later. + +## Order the sections + +- **Group related concepts.** Concepts that share a problem or are used together share a section. +- **Go broad first.** Early sections give the reader a sense of the whole: several concepts at a shallow depth. +- **Go deep later.** Later sections return to a concept for its detail. +- **Go deep early on an unlocking concept.** When one concept unlocks most of the rest, teach it in depth early. + +The first section names the problems the library solves and why the reader needs it. It is the only place in the docs that sells. + +## The problem-first arc + +Every section runs this arc. It is an arc, not a template: the headings are free, and a broad section can run it once for a group of concepts. + +1. **The problem.** Something the reader tries to do, in their words. Show it with code that hurts without the concept. A problem can also be conceptual, or a **gap**: something the reader expects the platform or another tool to fill. Name the gap. +2. **The concept.** Introduce it as the solution, by its glossary term. Link to the concepts it builds on. +3. **The concept working.** A concise example that solves the problem. See [`examples.md`](examples.md). +4. **What it unlocks.** A line that points to the sections that build on it. + +## Asides + +Depth a first-time reader can skip goes in an **aside**: a collapsible block, closed by default. Leaves of the learning graph and edge cases are typical asides. A returning reader opens it; a first-time reader keeps their place in the line. + +## Homes + +Each concept's home is a heading in Learn. A concept does not need its own page or chapter, but its heading has a stable anchor, because Reference, Guides and the rest of Learn link to it. diff --git a/skills/in-progress/perfect-docs/links.md b/skills/in-progress/perfect-docs/links.md new file mode 100644 index 0000000..0d88c1c --- /dev/null +++ b/skills/in-progress/perfect-docs/links.md @@ -0,0 +1,27 @@ +# Links + +The sections are cross-linked rigorously, and every link is checked. + +## Cross-link rules + +- **Learn and Guides to Reference**: every inline-code mention of a public export links to its entry. Every mention, not only the first. +- **Guides to Learn**: every concept a Guide relies on links to its home in Learn. +- **Reference to Learn**: every entry links to at least one Learn heading. + +The cross-links check fails the build on an unlinked export mention in Learn or a Guide, and on an entry with no link to Learn. + +## The link check + +Every internal link resolves to a page that exists, and every anchor to a heading that exists. A broken link or anchor fails the build. + +## The URL list and redirects + +The repo commits a list of every published URL: every page and every heading anchor. The build regenerates it, so a rename shows up as a diff in review. + +The redirects check compares the regenerated list with the committed one: + +- A page that leaves the list needs a redirect to its new home. +- An anchor that leaves the list needs an alias on its new heading. A server cannot redirect a fragment. +- A page or anchor with no new home (a deleted export) redirects to its nearest parent page. + +Redirects and aliases stay for good. A link in an old tweet or answer keeps working. diff --git a/skills/in-progress/perfect-docs/reference.md b/skills/in-progress/perfect-docs/reference.md new file mode 100644 index 0000000..7a09f0f --- /dev/null +++ b/skills/in-progress/perfect-docs/reference.md @@ -0,0 +1,24 @@ +# Reference + +Reference describes what each public export does, for a reader who already understands the library. It is written by hand, as native pages of the docs site: it cross-links freely and takes whatever shape serves the reader. It is never generated from doc comments. + +## Entries + +Each public export has exactly one **entry**: a heading whose anchor is the export's name. An entry holds: + +1. **The signature**, as a checked code block (see [`examples.md`](examples.md)). When the signature changes, the build fails until the entry is updated. +2. **What it does**: parameters, the return value, and the errors it raises. +3. **Links to Learn**: at least one, to the concept behind the export. + +An entry describes. The why and the teaching live in Learn, behind a link. + +Things with no export (configuration files, CLI flags, environment variables) get hand-written entries too. Each needs a coverage check against the place its options are defined. + +## The coverage check + +The check runs both ways: + +- It lists the package's public exports from its entry points, with the language's own tooling (the compiler, a module graph). Every export with no entry fails. +- It lists every entry. Every entry whose name is not a public export fails, so a rename or a deletion cannot leave a stale entry. + +"Public" means what the package exposes to its users, not every symbol in the source. The check reads the code's exports, never its comments. diff --git a/skills/in-progress/perfect-docs/style.md b/skills/in-progress/perfect-docs/style.md new file mode 100644 index 0000000..30e3a5d --- /dev/null +++ b/skills/in-progress/perfect-docs/style.md @@ -0,0 +1,14 @@ +# Style + +The docs speak in simple, declarative English: short sentences, one idea each, stated as fact. They name things with the terms in the repo's `GLOSSARY.md`, spelled and cased exactly as it defines them, and use each term in one sense everywhere. Learn draws its concepts from the glossary without mapping to it one to one. + +Selling belongs to Learn's first section only. Every other page states what is true. + +## The style review + +An agent reviews every changed page against the target: this file, the problem-first arc in [`learn.md`](learn.md), and the one-home rule in [`SKILL.md`](SKILL.md). Each finding names the line and the rule. The review covers what no automated check can judge: + +- a sentence that hedges, or holds two ideas; +- a term used outside its glossary sense, or a synonym where the glossary has a term; +- a fact restated where it should link to its home; +- a section that skips the problem, or a forward mention a different order would remove. diff --git a/skills/productivity/grilling/SKILL.md b/skills/productivity/grilling/SKILL.md index 5acf090..e71f286 100644 --- a/skills/productivity/grilling/SKILL.md +++ b/skills/productivity/grilling/SKILL.md @@ -25,6 +25,6 @@ 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 with a fresh context window to find it, or look it up yourself if you can't dispatch one; 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 fact; 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, or look it up yourself if you can't dispatch one; don't ask the user for anything you could look up yourself. 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. |
