pi-matt-pocock 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.zh-CN.md +37 -19
- package/README.md +80 -13
- package/package.json +12 -7
- package/procedures/code-review.md +25 -17
- package/procedures/codebase-design.md +11 -10
- package/procedures/deslop.md +4 -2
- package/procedures/diagnosing-bugs.md +25 -25
- package/procedures/domain-modeling.md +18 -20
- package/procedures/grill-me.md +1 -1
- package/procedures/grill-with-docs.md +1 -1
- package/procedures/grilling.md +29 -5
- package/procedures/handoff.md +1 -1
- package/procedures/implement.md +7 -1
- package/procedures/improve-codebase-architecture.md +22 -22
- package/procedures/pr.md +169 -0
- package/procedures/prototype.md +7 -6
- package/procedures/research.md +2 -2
- package/procedures/retro.md +42 -0
- package/procedures/setup-matt-pocock-skills.md +26 -22
- package/procedures/tdd.md +17 -15
- package/procedures/teach.md +11 -7
- package/procedures/to-questionnaire.md +7 -5
- package/procedures/to-spec.md +2 -2
- package/procedures/to-tickets.md +12 -12
- package/procedures/triage.md +22 -22
- package/procedures/wait-what.md +1 -1
- package/procedures/wayfinder.md +24 -24
- package/procedures/wizard.md +7 -7
- package/procedures/writing-for-agents.md +14 -14
- package/{procedures → references}/ADR-FORMAT.md +11 -11
- package/{procedures → references}/AGENT-BRIEF.md +4 -4
- package/{procedures → references}/DEEPENING.md +3 -3
- package/{procedures → references}/DESIGN-IT-TWICE.md +7 -7
- package/{procedures → references}/GLOSSARY-FORMAT.md +9 -2
- package/{procedures → references}/HTML-REPORT.md +15 -15
- package/{procedures → references}/LEARNING-RECORD-FORMAT.md +10 -10
- package/{procedures → references}/LOGIC.md +5 -5
- package/{procedures → references}/MISSION-FORMAT.md +2 -2
- package/{procedures → references}/OUT-OF-SCOPE.md +11 -11
- package/{procedures → references}/RESOURCES-FORMAT.md +1 -1
- package/{procedures → references}/SKILL-MECHANICS.md +3 -3
- package/{procedures → references}/UI.md +14 -14
- package/{procedures → references}/bdd-best-practices.md +3 -3
- package/{procedures → references}/bdd.md +9 -9
- package/{procedures → references}/domain.md +12 -12
- package/references/issue-tracker-github.md +50 -0
- package/{procedures → references}/issue-tracker-gitlab.md +9 -9
- package/{procedures → references}/issue-tracker-local.md +3 -3
- package/{procedures → references}/phase-boundaries.md +8 -8
- package/src/catalog.json +49 -28
- package/src/catalog.ts +58 -2
- package/src/index.ts +539 -363
- package/src/native-dialog.ts +149 -213
- package/src/resolver.ts +57 -11
- package/src/workflow.ts +76 -18
- package/upstream/UPSTREAM.md +116 -0
- package/{scripts → upstream}/check-upstream-sync.mjs +12 -12
- package/{upstream-selection.json → upstream/upstream-selection.json} +9 -7
- package/UPSTREAM.md +0 -63
- package/procedures/CONTEXT-FORMAT.md +0 -60
- package/procedures/issue-tracker-github.md +0 -45
- /package/{procedures → assets}/hitl-loop.template.sh +0 -0
- /package/{procedures → assets}/template.sh +0 -0
- /package/{procedures → references}/GLOSSARY.md +0 -0
- /package/{procedures → references}/gherkin-guide.md +0 -0
- /package/{procedures → references}/mocking.md +0 -0
- /package/{procedures → references}/testing-anti-patterns.md +0 -0
- /package/{procedures → references}/tests.md +0 -0
- /package/{procedures → references}/triage-labels.md +0 -0
- /package/{procedures → references}/writing-great-skills.md +0 -0
package/procedures/research.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Use a **teammate when the teammate facility is available** to do the research, so the main conversation stays focused while it reads. Otherwise do the research in the current context.
|
|
1
|
+
Use a **teammate when the teammate facility is available** to do the research, so the main conversation stays focused while it reads. Start it with a fresh context window, not inherited parent history. Otherwise do the research in the current context.
|
|
2
2
|
|
|
3
3
|
Its job:
|
|
4
4
|
|
|
5
|
-
1. Investigate the question against **primary sources**
|
|
5
|
+
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.
|
|
6
6
|
2. Write the findings to a single Markdown file, citing each claim's source.
|
|
7
7
|
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.
|
|
8
8
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Session Retrospective
|
|
2
|
+
|
|
3
|
+
The user has asked for a **retrospective**. Review the coding session and suggest improvements to the agent's **environment**, not changes to the product code.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Follow the bundled [writing-for-agents](writing-for-agents.md) procedure for the writing style guide.
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
3. Look for candidates for improvement in these categories.
|
|
12
|
+
|
|
13
|
+
- **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.
|
|
14
|
+
- **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.
|
|
15
|
+
- **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.
|
|
16
|
+
- **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.
|
|
17
|
+
- **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.
|
|
18
|
+
- **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.
|
|
19
|
+
- **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.
|
|
20
|
+
|
|
21
|
+
4. Present these candidates to the user, in order of severity. For each one, include the observed evidence, the smallest useful change, and whether it belongs in an automated check, a coding standard, or a steering file.
|
|
22
|
+
|
|
23
|
+
Do not modify the repository while producing the retrospective; propose changes for the user to review.
|
|
24
|
+
|
|
25
|
+
## Reference
|
|
26
|
+
|
|
27
|
+
### Implementation vs Review
|
|
28
|
+
|
|
29
|
+
Remember that all work goes through two stages: implementation and review. The implementation agent has the most **context pressure**: it is responsible for exploration, writing code, and debugging failures.
|
|
30
|
+
|
|
31
|
+
The review agent has the least context pressure: it receives a diff, so no exploration is needed. It often does not need to write code or debug.
|
|
32
|
+
|
|
33
|
+
This means that the review agent should be responsible for imposing coding standards, not the implementation agent.
|
|
34
|
+
|
|
35
|
+
### Files
|
|
36
|
+
|
|
37
|
+
You have access to several files in the repo:
|
|
38
|
+
|
|
39
|
+
- `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.
|
|
40
|
+
- `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.
|
|
41
|
+
- Docs: use docs as reference files, pointed to by other files. Look for existing docs before writing new ones.
|
|
42
|
+
- Procedures: this package's Markdown procedures are the equivalent of skills. Follow the bundled [writing-for-agents](writing-for-agents.md) procedure.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Scaffold the per-repo configuration that the engineering skills assume:
|
|
4
4
|
|
|
5
|
-
- **Issue tracker
|
|
6
|
-
- **Triage labels
|
|
7
|
-
- **Domain docs
|
|
5
|
+
- **Issue tracker**: where issues live (GitHub by default; local markdown is also supported out of the box)
|
|
6
|
+
- **Triage labels**: the strings used for the five canonical triage roles
|
|
7
|
+
- **Domain docs**: where `GLOSSARY.md` and ADRs live, and the consumer rules for reading them
|
|
8
8
|
|
|
9
9
|
This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
|
|
10
10
|
|
|
@@ -14,14 +14,14 @@ This is a prompt-driven skill, not a deterministic script. Explore, present what
|
|
|
14
14
|
|
|
15
15
|
Look at the current repo to understand its starting state. Read whatever exists; don't assume:
|
|
16
16
|
|
|
17
|
-
- `git remote -v` and `.git/config
|
|
18
|
-
- `AGENTS.md` and `CLAUDE.md` at the repo root
|
|
19
|
-
- `
|
|
17
|
+
- `git remote -v` and `.git/config`: is this a GitHub repo? Which one?
|
|
18
|
+
- `AGENTS.md` and `CLAUDE.md` at the repo root: does either exist? Is there already an `## Agent skills` section in either?
|
|
19
|
+
- `GLOSSARY.md` and `GLOSSARY-MAP.md` at the repo root, and the legacy `CONTEXT.md` / `CONTEXT-MAP.md`. If a legacy file exists, offer to `git mv` it to its `GLOSSARY` name and rewrite those names in `docs/agents/domain.md`.
|
|
20
20
|
- `docs/adr/` and any `src/*/docs/adr/` directories
|
|
21
|
-
- `docs/agents
|
|
21
|
+
- `docs/agents/`: does this skill's prior output already exist?
|
|
22
22
|
- `.scratch/` — sign that a local-markdown issue tracker convention is already in use
|
|
23
23
|
- 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.
|
|
24
|
-
- Monorepo signals — a `
|
|
24
|
+
- Monorepo signals — a `workspaces` field in `package.json` (as in a bun workspace), a dedicated workspace manifest, or a populated `packages/*` with its own `src/`. Present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
|
|
25
25
|
|
|
26
26
|
### 2. Present findings and ask
|
|
27
27
|
|
|
@@ -29,30 +29,32 @@ Summarise what's present and what's missing. Then take the sections in order —
|
|
|
29
29
|
|
|
30
30
|
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).
|
|
31
31
|
|
|
32
|
-
**Section A
|
|
32
|
+
**Section A: Issue tracker.**
|
|
33
33
|
|
|
34
34
|
> Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-tickets`, `triage`, `to-spec`, and `qa` read from and write to it — they need to know whether to call `gh issue create`, write a markdown file under `.scratch/`, or follow some other workflow you describe. Pick the place you actually track work for this repo.
|
|
35
35
|
|
|
36
36
|
Default posture: these skills were designed for GitHub. If a `git remote` points at GitHub, propose that. If a `git remote` points at GitLab (`gitlab.com` or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), ask directly in the conversation and wait for the reply. Offer:
|
|
37
37
|
|
|
38
|
-
- **GitHub
|
|
39
|
-
- **GitLab
|
|
40
|
-
- **Local markdown
|
|
38
|
+
- **GitHub**: issues live in the repo's GitHub Issues (uses the `gh` CLI)
|
|
39
|
+
- **GitLab**: issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
|
|
40
|
+
- **Local markdown**: issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
|
|
41
41
|
- **Another tracker** (Jira, Linear, etc.) — the user describes the workflow in one paragraph; record it as freeform prose
|
|
42
42
|
|
|
43
43
|
Record the choice in `docs/agents/issue-tracker.md`. The GitHub and GitLab templates carry a "PRs as a request surface" flag, defaulted **off** — leave it off and don't raise it; a user who wants external PRs in the triage queue can flip the flag in the file later.
|
|
44
44
|
|
|
45
|
+
A GitHub or GitLab tracker needs a reachable repo. When the user picks one and no `git remote` points at that host, ask for the repo URL and confirm before changing git config, then wire it up (`git init` if needed, `git remote add origin <url>`). Done when `gh repo view` / `glab repo view` prints the project from inside this directory; if it can't, stop and tell the user what's missing.
|
|
46
|
+
|
|
45
47
|
**Section B — Triage label vocabulary.** Skip this section entirely if the `triage` skill isn't installed (exploration told you) — an uninstalled skill needs no labels.
|
|
46
48
|
|
|
47
49
|
If it is installed, ask exactly one question directly in the conversation and wait for the reply:
|
|
48
50
|
|
|
49
51
|
> "Do you want to keep the default triage labels?" — keep the defaults (Recommended) / use my own label names
|
|
50
52
|
|
|
51
|
-
The defaults are the five canonical roles, each label string equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`. On **yes**, write them as-is. Only if the user says no
|
|
53
|
+
The defaults are the five canonical roles, each label string equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`. On **yes**, write them as-is. Only if the user says no, usually because their tracker already uses other names (e.g. `bug:triage` for `needs-triage`), collect the overrides so `triage` applies existing labels instead of creating duplicates.
|
|
52
54
|
|
|
53
|
-
**Section C
|
|
55
|
+
**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.
|
|
54
56
|
|
|
55
|
-
Offer **multi-context** — a root `
|
|
57
|
+
Offer **multi-context** — a root `GLOSSARY-MAP.md` pointing to per-context `GLOSSARY.md` files — only when exploration found monorepo signals. Then ask directly in the conversation which layout they want and wait for the reply.
|
|
56
58
|
|
|
57
59
|
### 3. Confirm and edit
|
|
58
60
|
|
|
@@ -90,18 +92,20 @@ The block:
|
|
|
90
92
|
|
|
91
93
|
### Domain docs
|
|
92
94
|
|
|
93
|
-
[one-line summary of layout
|
|
95
|
+
[one-line summary of layout: "single-context" or "multi-context"]. See `docs/agents/domain.md`.
|
|
94
96
|
```
|
|
95
97
|
|
|
96
98
|
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.
|
|
97
99
|
|
|
100
|
+
When Section B ran on GitHub or GitLab, create each configured label the tracker lacks (`gh label create`, `glab label create`).
|
|
101
|
+
|
|
98
102
|
Then write the docs files using the seed templates in this skill folder as a starting point:
|
|
99
103
|
|
|
100
|
-
- [issue-tracker-github.md](
|
|
101
|
-
- [issue-tracker-gitlab.md](
|
|
102
|
-
- [issue-tracker-local.md](
|
|
103
|
-
- [triage-labels.md](
|
|
104
|
-
- [domain.md](
|
|
104
|
+
- [issue-tracker-github.md](../references/issue-tracker-github.md): GitHub issue tracker
|
|
105
|
+
- [issue-tracker-gitlab.md](../references/issue-tracker-gitlab.md): GitLab issue tracker
|
|
106
|
+
- [issue-tracker-local.md](../references/issue-tracker-local.md): local-markdown issue tracker
|
|
107
|
+
- [triage-labels.md](../references/triage-labels.md): label mapping (only if `triage` is installed)
|
|
108
|
+
- [domain.md](../references/domain.md): domain doc consumer rules + layout
|
|
105
109
|
|
|
106
110
|
For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
|
|
107
111
|
|
|
@@ -111,4 +115,4 @@ This is prompt-driven: present findings, ask directly in the conversation sectio
|
|
|
111
115
|
|
|
112
116
|
### 5. Done
|
|
113
117
|
|
|
114
|
-
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
|
|
118
|
+
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.
|
package/procedures/tdd.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# BDD-Driven TDD (Automation)
|
|
2
2
|
|
|
3
|
-
BDD cycles through three phases: **Discovery** (conversations → examples), **Formulation** (Gherkin scenarios), **Automation** (red-green-refactor, driven by BDD). This procedure is the **BDD-driven Automation** reference — the how of test implementation, once [bdd](bdd.md) has defined the what.
|
|
3
|
+
BDD cycles through three phases: **Discovery** (conversations → examples), **Formulation** (Gherkin scenarios), **Automation** (red-green-refactor, driven by BDD). This procedure is the **BDD-driven Automation** reference — the how of test implementation, once [bdd](../references/bdd.md) has defined the what.
|
|
4
4
|
|
|
5
|
-
When invoked during [implement](implement.md) or [bdd](bdd.md), use this procedure as the test-writing authority. The bundled [bdd](bdd.md) procedure governs the scenario design and Iron Law; this procedure governs the test code quality under BDD discipline.
|
|
5
|
+
When invoked during [implement](implement.md) or [bdd](../references/bdd.md), use this procedure as the test-writing authority. The bundled [bdd](../references/bdd.md) procedure governs the scenario design and Iron Law; this procedure governs the test code quality under BDD discipline.
|
|
6
6
|
|
|
7
7
|
## CRITICAL: BDD scenarios come first
|
|
8
8
|
|
|
9
|
-
If you reached this procedure directly (not via [bdd](bdd.md) or [implement](implement.md)), inspect the repository and conversation for Gherkin scenarios first.
|
|
9
|
+
If you reached this procedure directly (not via [bdd](../references/bdd.md) or [implement](implement.md)), inspect the repository and conversation for Gherkin scenarios first.
|
|
10
10
|
|
|
11
|
-
- If scenarios are absent → follow the bundled [bdd](bdd.md) to define them, then return here for Automation.
|
|
11
|
+
- If scenarios are absent → follow the bundled [bdd](../references/bdd.md) to define them, then return here for Automation.
|
|
12
12
|
- If scenarios exist in `.feature` files or equivalent → proceed with the red-green loop below.
|
|
13
13
|
- Ask the user only if the behavior itself is genuinely unresolved; do not ask for confirmation of facts that repository exploration can establish.
|
|
14
14
|
|
|
@@ -16,34 +16,36 @@ If you reached this procedure directly (not via [bdd](bdd.md) or [implement](imp
|
|
|
16
16
|
|
|
17
17
|
Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.
|
|
18
18
|
|
|
19
|
-
See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
|
|
19
|
+
See [tests.md](../references/tests.md) for examples and [mocking.md](../references/mocking.md) for mocking guidelines.
|
|
20
20
|
|
|
21
|
-
## Seams
|
|
21
|
+
## Seams: where tests go
|
|
22
22
|
|
|
23
23
|
A **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
|
|
24
24
|
|
|
25
|
-
**Test at the highest established seam.** Record the public boundary under test and select the highest existing seam that expresses the confirmed behavior. Not everything can be tested — choosing the critical public seam deliberately is how effort lands on complex behavior instead of every edge case. Ask only when the public contract is genuinely ambiguous.
|
|
25
|
+
**Test at the highest established seam.** Record the public boundary under test and select the highest existing seam that expresses the confirmed behavior. Not everything can be tested — choosing the critical public seam deliberately is how effort lands on complex behavior instead of every edge case. Ask only when the public contract is genuinely ambiguous. Give each proposed seam a one-line note on what it catches and what it misses.
|
|
26
26
|
|
|
27
27
|
When the shape of that interface is itself in question — how deep the module is, where the seam belongs, what the interface should expose — load the [codebase-design](codebase-design.md) reference with `matt_pocock_active` (`action: "load"`, from available references) 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.
|
|
28
28
|
|
|
29
29
|
## Anti-patterns
|
|
30
30
|
|
|
31
|
-
- **Implementation-coupled
|
|
32
|
-
- **Tautological
|
|
33
|
-
- **Horizontal slicing
|
|
31
|
+
- **Implementation-coupled**: mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.
|
|
32
|
+
- **Tautological**: the assertion recomputes the expected value the way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec.
|
|
33
|
+
- **Horizontal slicing**: writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in **vertical slices** instead: one test → one implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you.
|
|
34
34
|
|
|
35
35
|
## Rules of the loop
|
|
36
36
|
|
|
37
|
+
- **Preserve the public contract.** Keep exports and supported input semantics unchanged unless the agreed scenario changes them. Probe adjacent boundaries, including empty inputs, names resembling special path segments, identity and equality rules, before accepting an optimization. Keep new helpers private. Required fields remain required; do not invent fallback values or optional-field policies merely to make checks green.
|
|
38
|
+
- **Report observed evidence.** Read the actual test diagnostics. Record executed test failures and measured operation counts; label source-based predictions separately. If diagnostics are unavailable, say so rather than inventing assertion counts or measurements.
|
|
37
39
|
- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
|
|
38
40
|
- **One slice at a time.** One seam, one test, one minimal implementation per cycle.
|
|
39
41
|
- **Refactoring is not part of the loop.** It belongs to the review stage (see [code-review](code-review.md)), not the red → green implementation cycle.
|
|
40
42
|
|
|
41
43
|
## CRITICAL: BDD-Driven — not standalone TDD
|
|
42
44
|
|
|
43
|
-
This procedure is the **Automation** phase of the BDD lifecycle. It always runs under [bdd](bdd.md) or [implement](implement.md) as **BDD-driven TDD**. If invoked directly, see the CRITICAL check at the top of this file — confirm scenarios exist before writing test code.
|
|
45
|
+
This procedure is the **Automation** phase of the BDD lifecycle. It always runs under [bdd](../references/bdd.md) or [implement](implement.md) as **BDD-driven TDD**. If invoked directly, see the CRITICAL check at the top of this file — confirm scenarios exist before writing test code.
|
|
44
46
|
|
|
45
|
-
1. **Discovery** (what behavior matters) — owned by [bdd](bdd.md) via Gherkin scenarios
|
|
46
|
-
2. **Formulation** (scenario as specification) — owned by [bdd](bdd.md) via `.feature` files
|
|
47
|
+
1. **Discovery** (what behavior matters) — owned by [bdd](../references/bdd.md) via Gherkin scenarios
|
|
48
|
+
2. **Formulation** (scenario as specification) — owned by [bdd](../references/bdd.md) via `.feature` files
|
|
47
49
|
3. **Automation** (this procedure) — the red-green loop that makes the scenario pass
|
|
48
50
|
|
|
49
51
|
## When to invoke
|
|
@@ -55,6 +57,6 @@ Load this capability (`matt_pocock_workflow`, `mode: "capability"`) explicitly w
|
|
|
55
57
|
- The user asks about mocking strategy at system boundaries
|
|
56
58
|
- The user is unsure whether a test is good or tautological
|
|
57
59
|
|
|
58
|
-
When invoked directly, first check if Gherkin scenarios exist (see the CRITICAL check at the top). If not, follow the bundled [bdd](bdd.md) before proceeding with Automation.
|
|
60
|
+
When invoked directly, first check if Gherkin scenarios exist (see the CRITICAL check at the top). If not, follow the bundled [bdd](../references/bdd.md) before proceeding with Automation.
|
|
59
61
|
|
|
60
|
-
The [implement](implement.md) procedure bundles this automatically as a required dependency during the Automation phase — you do not need to invoke it separately in that flow. From [bdd](bdd.md), load this capability (`matt_pocock_workflow`, `mode: "capability"`) when Automation begins.
|
|
62
|
+
The [implement](implement.md) procedure bundles this automatically as a required dependency during the Automation phase — you do not need to invoke it separately in that flow. From [bdd](../references/bdd.md), load this capability (`matt_pocock_workflow`, `mode: "capability"`) when Automation begins.
|
package/procedures/teach.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.
|
|
2
2
|
|
|
3
|
+
## Preserve the application used as a learning example
|
|
4
|
+
|
|
5
|
+
When this directory is an existing application, do not modify application source or implementation tests as part of teaching. Inspect defects as examples and explain them; fixing them requires a separate implementation request. Teaching artifacts belong in the learning paths below. If the learner's mission or level is unknown, ask the mission question and wait before authoring a lesson or attempting a repair.
|
|
6
|
+
|
|
3
7
|
## Teaching Workspace
|
|
4
8
|
|
|
5
|
-
Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:
|
|
9
|
+
Treat the current directory as a teaching workspace. Workspace paths (`./lessons/` and the rest) resolve from the directory this procedure was run in; only the `*-FORMAT.md` links resolve from this package's folder. The state of their learning is captured in this directory in several files:
|
|
6
10
|
|
|
7
|
-
- `MISSION.md`: A document capturing the _reason_ the user is interested in the topic. This should be used to ground all teaching. Use the format in [MISSION-FORMAT.md](
|
|
11
|
+
- `MISSION.md`: A document capturing the _reason_ the user is interested in the topic. This should be used to ground all teaching. Use the format in [MISSION-FORMAT.md](../references/MISSION-FORMAT.md).
|
|
8
12
|
- `./reference/*.html`: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
|
|
9
|
-
- `RESOURCES.md`: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in [RESOURCES-FORMAT.md](
|
|
10
|
-
- `./learning-records/*.md`: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled `0001-<dash-case-name>.md`, where the number increments each time. Use the format in [LEARNING-RECORD-FORMAT.md](
|
|
13
|
+
- `RESOURCES.md`: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in [RESOURCES-FORMAT.md](../references/RESOURCES-FORMAT.md).
|
|
14
|
+
- `./learning-records/*.md`: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled `0001-<dash-case-name>.md`, where the number increments each time. Use the format in [LEARNING-RECORD-FORMAT.md](../references/LEARNING-RECORD-FORMAT.md).
|
|
11
15
|
- `./lessons/*.html`: A directory of lessons. A **lesson** is a single, self-contained HTML output that teaches one tightly-scoped thing tied to the mission. This is the primary unit of teaching in this workspace.
|
|
12
16
|
- `./assets/*`: Reusable **components** shared across lessons. See [Assets](#assets).
|
|
13
17
|
- `NOTES.md`: A scratchpad for you to jot down user preferences, or working notes.
|
|
@@ -39,7 +43,7 @@ Fluency can give the user an illusory sense of mastery, but storage strength is
|
|
|
39
43
|
|
|
40
44
|
## Lessons
|
|
41
45
|
|
|
42
|
-
A lesson is the main thing you produce
|
|
46
|
+
A lesson is the main thing you produce: the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to `./lessons/` and titled `0001-<dash-case-name>.html` where the number increments each time.
|
|
43
47
|
|
|
44
48
|
A lesson should be **beautiful** — clean, readable typography and layout — since the user will return to these later to review. Think Tufte.
|
|
45
49
|
|
|
@@ -57,7 +61,7 @@ Each lesson should contain a reminder to ask followup questions to the agent. Th
|
|
|
57
61
|
|
|
58
62
|
Lessons are built from reusable **components**, stored in `./assets/`: stylesheets, quiz widgets, simulators, diagram helpers — anything a second lesson could reuse.
|
|
59
63
|
|
|
60
|
-
Reuse is the default, not the exception. Before authoring a lesson, read `./assets/` and build from the components already there. When a lesson needs something new and reusable, write it as a component in `./assets/` and link to it
|
|
64
|
+
Reuse is the default, not the exception. Before authoring a lesson, read `./assets/` and build from the components already there. When a lesson needs something new and reusable, write it as a component in `./assets/` and link to it; never inline code a future lesson would duplicate.
|
|
61
65
|
|
|
62
66
|
A shared stylesheet is the first component every workspace earns: every lesson links it, so the lessons look like one consistent course rather than a pile of one-offs. As the workspace grows, so should the component library.
|
|
63
67
|
|
|
@@ -104,7 +108,7 @@ For skill acquisition, difficulty is the tool. Effortful retrieval is what build
|
|
|
104
108
|
|
|
105
109
|
Each of these should be based on a **feedback loop**, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.
|
|
106
110
|
|
|
107
|
-
For quizzes, each answer should be exactly the same number of words (and characters, if possible). Don't give the user any clues about the answer through formatting.
|
|
111
|
+
For quizzes, each answer should be exactly the same number of words (and characters, if possible). Vary which position holds the correct answer across questions. Don't give the user any clues about the answer through formatting or order.
|
|
108
112
|
|
|
109
113
|
## Acquiring Wisdom
|
|
110
114
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Turn something the user can't answer alone into a **questionnaire
|
|
1
|
+
Turn something the user can't answer alone into a **questionnaire**: a Markdown document they hand to one person to fill in async, or fill out together over a meeting. The recipient holds knowledge the user lacks; the questionnaire pulls it out of them.
|
|
2
2
|
|
|
3
3
|
**Grill the send, not the subject.** Interview the user only about the _send_, which they can always answer: who it goes to, and what they need back. The questions in the document then target the **gap** between what the recipient knows and what the user needs.
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ Turn something the user can't answer alone into a **questionnaire** — a Markdo
|
|
|
6
6
|
|
|
7
7
|
2. **What do you need back?** Ask, in one exchange, the specific decisions or facts the user can't resolve alone and needs from this person. Done when you have a concrete list of what the user must walk away able to do or decide.
|
|
8
8
|
|
|
9
|
-
3. **Write the questionnaire.** Draft questions aimed at the gap from steps 1–2, following the Document structure below. Write it to `to-questionnaire-<slug>.md` in the current directory (slug from the topic)
|
|
9
|
+
3. **Write the questionnaire.** Draft questions aimed at the gap from steps 1–2, following the Document structure below. Write it to the path the task names; when the task names none, write `to-questionnaire-<slug>.md` in the current directory (slug from the topic). The file is the deliverable: do not end the turn before it exists. Report the path. Done when the file exists and every item the user named in step 2 is covered by a question.
|
|
10
10
|
|
|
11
11
|
## Document structure
|
|
12
12
|
|
|
@@ -18,19 +18,21 @@ Frame the document as a **discovery questionnaire**: the user lacks context, the
|
|
|
18
18
|
|
|
19
19
|
**Purpose:** why this questionnaire exists and the decision riding on it.
|
|
20
20
|
|
|
21
|
-
**From:** <the user
|
|
21
|
+
**From:** <the user>, **To:** <the recipient>, **How your answers will be used:** <where they go>
|
|
22
22
|
|
|
23
23
|
## Context
|
|
24
24
|
|
|
25
25
|
One paragraph orienting a recipient who wasn't in the user's head. Enough to answer well, not a page.
|
|
26
26
|
|
|
27
|
+
Before writing Context, separate observed current behavior, target behavior, and each unresolved decision. Call something current or "today" only when the primary source verifies it; never invent an unverified current behavior or present a target requirement as present-day fact.
|
|
28
|
+
|
|
27
29
|
## How to answer
|
|
28
30
|
|
|
29
|
-
Deadline and rough effort. Partial answers and "I don't know" are useful
|
|
31
|
+
Deadline and rough effort. Partial answers and "I don't know" are useful: flag anything you're unsure of rather than skipping it.
|
|
30
32
|
|
|
31
33
|
## <Theme heading>
|
|
32
34
|
|
|
33
|
-
One `##` section per theme. Under each, its questions, most-important-first. Every question
|
|
35
|
+
One `##` section per theme. Under each, its questions, most-important-first. Every question asks for one independent decision — do not combine two fields or policies in one question — with an answer stub directly beneath, and a one-line _why this matters_ only where the question could be misread or invite a throwaway answer.
|
|
34
36
|
|
|
35
37
|
<question-example>
|
|
36
38
|
### What load is the system expected to handle at launch?
|
package/procedures/to-spec.md
CHANGED
|
@@ -40,7 +40,7 @@ This list of user stories should be extremely extensive and cover all aspects of
|
|
|
40
40
|
|
|
41
41
|
## Scenarios
|
|
42
42
|
|
|
43
|
-
Executable scenarios derived from the user stories above, written as Gherkin (Given/When/Then). Each scenario pins one behavior; collectively they are the executable specification the implementation is verified against. See [bdd](bdd.md) for the scenario authoring guide and the `.feature` storage convention.
|
|
43
|
+
Executable scenarios derived from the user stories above, written as Gherkin (Given/When/Then). Each scenario pins one behavior; collectively they are the executable specification the implementation is verified against. See [bdd](../references/bdd.md) for the scenario authoring guide and the `.feature` storage convention.
|
|
44
44
|
|
|
45
45
|
## Implementation Decisions
|
|
46
46
|
|
|
@@ -56,7 +56,7 @@ A list of implementation decisions that were made. This can include:
|
|
|
56
56
|
|
|
57
57
|
Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
|
|
58
58
|
|
|
59
|
-
Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts
|
|
59
|
+
Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
|
|
60
60
|
|
|
61
61
|
## Testing Decisions
|
|
62
62
|
|
package/procedures/to-tickets.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# To Tickets
|
|
2
2
|
|
|
3
|
-
Break a plan, spec, or conversation into a set of **tickets** — tracer-bullet vertical slices, each declaring the tickets that **block** it. If the spec contains Gherkin scenarios (from [bdd](bdd.md)), each ticket should map to one or more scenarios; the scenarios are the authoritative acceptance criteria.
|
|
3
|
+
Break a plan, spec, or conversation into a set of **tickets** — tracer-bullet vertical slices, each declaring the tickets that **block** it. If the spec contains Gherkin scenarios (from [bdd](../references/bdd.md)), each ticket should map to one or more scenarios; the scenarios are the authoritative acceptance criteria.
|
|
4
4
|
|
|
5
5
|
The issue tracker and triage label vocabulary should have been provided to you — load [setup-matt-pocock-skills](setup-matt-pocock-skills.md) with `matt_pocock_active` (`action: "load"`, from available references) if not. It is a package procedure, not a Pi skill.
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ Break the work into **tracer bullet** tickets.
|
|
|
22
22
|
|
|
23
23
|
<vertical-slice-rules>
|
|
24
24
|
|
|
25
|
-
- Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests)
|
|
25
|
+
- Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests): vertical, NOT a horizontal slice of one layer
|
|
26
26
|
- A completed slice is demoable or verifiable on its own
|
|
27
27
|
- Each slice is sized to fit in a single fresh context window
|
|
28
28
|
- Any prefactoring should be done first
|
|
@@ -33,9 +33,9 @@ Break the work into **tracer bullet** tickets.
|
|
|
33
33
|
|
|
34
34
|
Each ticket cuts a narrow but COMPLETE path through every layer — schema, API, UI, tests — sized to fit one fresh context window, and demoable on its own. A wide refactor is the exception: sequence it as expand–contract, never force it into a tracer bullet.
|
|
35
35
|
|
|
36
|
-
Give each ticket its **blocking edges
|
|
36
|
+
Give each ticket its **blocking edges**: the other tickets that must complete before it can start. A ticket with no blockers can start immediately.
|
|
37
37
|
|
|
38
|
-
**Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change
|
|
38
|
+
**Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change (rename a column, retype a shared symbol) whose **blast radius** fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket; green is promised only there.
|
|
39
39
|
|
|
40
40
|
### 4. Quiz the user
|
|
41
41
|
|
|
@@ -45,13 +45,13 @@ Present the proposed breakdown as a numbered list. For each ticket, show:
|
|
|
45
45
|
- **Blocked by**: which other tickets (if any) must complete first
|
|
46
46
|
- **What it delivers**: the end-to-end behaviour this ticket makes work
|
|
47
47
|
|
|
48
|
-
Use `matt_pocock_ask` to ask the user for the genuinely user-owned design decision in one structured exchange: whether the breakdown and blocking edges are acceptable, and any required merge or split. Wait only for that answer; then apply it and continue directly to publication. Do not ask a separate permission-to-proceed question after approval.
|
|
48
|
+
Use `matt_pocock_ask` to ask the user for the genuinely user-owned design decision in one structured exchange: whether the breakdown and blocking edges are acceptable, and any required merge or split. Recommend accepting the breakdown, because the deadline adopts the recommendation when the user does not answer. Wait only for that answer; then apply it and continue directly to publication. Do not ask a separate permission-to-proceed question after approval.
|
|
49
49
|
|
|
50
50
|
### 5. Publish the tickets to the configured tracker
|
|
51
51
|
|
|
52
52
|
Publish the approved tickets. **How** depends on the tracker [setup-matt-pocock-skills](setup-matt-pocock-skills.md) configured — the tickets are the same either way, only the shape of the blocking edges changes:
|
|
53
53
|
|
|
54
|
-
- **Local files** → write one file per ticket under `.scratch/<feature-slug>/issues/<NN>-<slug>.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
|
|
54
|
+
- **Local files** → write one file per ticket under `.scratch/<feature-slug>/issues/<NN>-<slug>.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.
|
|
55
55
|
- **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.
|
|
56
56
|
|
|
57
57
|
Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom. Once tickets are published, immediately claim and execute the next unblocked AFK ticket; after each closure, re-query the frontier and continue through newly unblocked AFK work. Do not wait for the user simply because ticket publication or an earlier ticket completed.
|
|
@@ -60,11 +60,11 @@ Do NOT close or modify any parent issue.
|
|
|
60
60
|
|
|
61
61
|
<local-ticket-template>
|
|
62
62
|
|
|
63
|
-
# <NN
|
|
63
|
+
# <NN>: <Ticket title>
|
|
64
64
|
|
|
65
|
-
**What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective
|
|
65
|
+
**What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective, not a layer-by-layer implementation list.
|
|
66
66
|
|
|
67
|
-
**Blocked by:** the numbers/titles of the tickets that gate this one, or "None — can start immediately".
|
|
67
|
+
**Blocked by:** the numbers/titles of the tickets that gate this one, or "None — can start immediately". Omit this section when blockers were set as native edges.
|
|
68
68
|
|
|
69
69
|
**Status:** ready-for-agent
|
|
70
70
|
|
|
@@ -81,7 +81,7 @@ A reference to the parent issue on the tracker (if the source was an existing is
|
|
|
81
81
|
|
|
82
82
|
## What to build
|
|
83
83
|
|
|
84
|
-
The end-to-end behaviour this ticket makes work, from the user's perspective
|
|
84
|
+
The end-to-end behaviour this ticket makes work, from the user's perspective, not layer-by-layer implementation.
|
|
85
85
|
|
|
86
86
|
## Acceptance criteria
|
|
87
87
|
|
|
@@ -90,8 +90,8 @@ The end-to-end behaviour this ticket makes work, from the user's perspective —
|
|
|
90
90
|
|
|
91
91
|
## Blocked by
|
|
92
92
|
|
|
93
|
-
- A reference to each blocking ticket, or "None
|
|
93
|
+
- A reference to each blocking ticket, or "None (can start immediately)". Omit this section when blockers were set as native edges.
|
|
94
94
|
|
|
95
95
|
</issue-template>
|
|
96
96
|
|
|
97
|
-
In either form, avoid specific file paths or code snippets
|
|
97
|
+
In either form, avoid specific file paths or code snippets: they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
|
package/procedures/triage.md
CHANGED
|
@@ -16,23 +16,23 @@ Every comment or issue posted to the issue tracker during triage must start with
|
|
|
16
16
|
|
|
17
17
|
## Reference docs
|
|
18
18
|
|
|
19
|
-
- [AGENT-BRIEF.md](AGENT-BRIEF.md)
|
|
20
|
-
- [OUT-OF-SCOPE.md](OUT-OF-SCOPE.md)
|
|
19
|
+
- [AGENT-BRIEF.md](../references/AGENT-BRIEF.md): how to write durable agent briefs
|
|
20
|
+
- [OUT-OF-SCOPE.md](../references/OUT-OF-SCOPE.md): how the `.out-of-scope/` knowledge base works
|
|
21
21
|
|
|
22
22
|
## Roles
|
|
23
23
|
|
|
24
24
|
Two **category** roles:
|
|
25
25
|
|
|
26
|
-
- `bug
|
|
27
|
-
- `enhancement
|
|
26
|
+
- `bug`: something is broken
|
|
27
|
+
- `enhancement`: new feature or improvement
|
|
28
28
|
|
|
29
29
|
Five **state** roles:
|
|
30
30
|
|
|
31
|
-
- `needs-triage
|
|
32
|
-
- `needs-info
|
|
33
|
-
- `ready-for-agent
|
|
34
|
-
- `ready-for-human
|
|
35
|
-
- `wontfix
|
|
31
|
+
- `needs-triage`: maintainer needs to evaluate
|
|
32
|
+
- `needs-info`: waiting on reporter for more information
|
|
33
|
+
- `ready-for-agent`: fully specified, ready for an AFK agent
|
|
34
|
+
- `ready-for-human`: needs human implementation
|
|
35
|
+
- `wontfix`: will not be actioned
|
|
36
36
|
|
|
37
37
|
For a PR, the same states read against the attached code: `ready-for-agent` means a brief is attached and an agent should take the next step on the diff; `ready-for-human` means it's ready for a human to merge.
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ Every triaged issue should carry exactly one category role and one state role. I
|
|
|
40
40
|
|
|
41
41
|
These are canonical role names — the actual label strings used in the issue tracker may differ. The mapping should have been provided to you - load [setup-matt-pocock-skills](setup-matt-pocock-skills.md) with `matt_pocock_active` (`action: "load"`, from available references) if not. It is a package procedure, not a Pi skill.
|
|
42
42
|
|
|
43
|
-
State transitions: an unlabeled issue normally goes to `needs-triage` first; from there it moves to `needs-info`, `ready-for-agent`, `ready-for-human`, or `wontfix`. `needs-info` returns to `needs-triage` once the reporter replies. The maintainer can override at any time
|
|
43
|
+
State transitions: an unlabeled issue normally goes to `needs-triage` first; from there it moves to `needs-info`, `ready-for-agent`, `ready-for-human`, or `wontfix`. `needs-info` returns to `needs-triage` once the reporter replies. The maintainer can override at any time; flag transitions that look unusual and ask before proceeding.
|
|
44
44
|
|
|
45
45
|
## Invocation
|
|
46
46
|
|
|
@@ -55,9 +55,9 @@ The maintainer invokes [triage](triage.md) and describes what they want in natur
|
|
|
55
55
|
|
|
56
56
|
Query the issue tracker and present three buckets, oldest first:
|
|
57
57
|
|
|
58
|
-
1. **Unlabeled
|
|
59
|
-
2. **`needs-triage
|
|
60
|
-
3. **`needs-info` with reporter activity since the last triage notes
|
|
58
|
+
1. **Unlabeled**: never triaged.
|
|
59
|
+
2. **`needs-triage`**: evaluation in progress.
|
|
60
|
+
3. **`needs-info` with reporter activity since the last triage notes**: needs re-evaluation.
|
|
61
61
|
|
|
62
62
|
When PRs are in scope, include external PRs in these buckets and tag each line `[PR]` or `[issue]`. Discovery surfaces only *external* PRs (the tracker config defines who counts as external) — a collaborator's in-flight PR is not triage work. This filter is discovery-only; an explicitly named PR is always triaged regardless of author.
|
|
63
63
|
|
|
@@ -65,23 +65,23 @@ Show counts and a one-line summary per item. Let the maintainer pick.
|
|
|
65
65
|
|
|
66
66
|
## Triage a specific issue or PR
|
|
67
67
|
|
|
68
|
-
1. **Gather context.** Read the full issue or PR (body, comments, labels, author, dates; for a PR, the diff too). Parse any prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's domain glossary, respecting ADRs in the area. Run two checks against the codebase: (a) **redundancy
|
|
68
|
+
1. **Gather context.** Read the full issue or PR (body, comments, labels, author, dates; for a PR, the diff too). Parse any prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's domain glossary, respecting ADRs in the area. Run two checks against the codebase: (a) **redundancy**: search for an existing implementation of the requested behavior by domain concept (not just the request's wording), and report where you looked. If found, it's an already-implemented `wontfix` (step 5). (b) **prior rejection**: read `.out-of-scope/*.md` and surface any that resembles this request.
|
|
69
69
|
|
|
70
70
|
2. **Classify and continue.** State the category recommendation with reasoning and a brief codebase summary relevant to the request — including whether it is already implemented. Then verify the claim and apply the outcome directly when the classification follows from the evidence. Pause only where the choice is genuinely the maintainer's (for example, whether to reject a viable enhancement); never ask merely for permission to perform the next triage step.
|
|
71
71
|
|
|
72
|
-
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
|
|
72
|
+
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.
|
|
73
73
|
|
|
74
|
-
4. **Grill (if needed).** If the request needs fleshing out, follow the bundled [grilling](grilling.md) and [domain-modeling](domain-modeling.md) procedures together — grill it into shape one question at a time, sharpening domain terms and updating `
|
|
74
|
+
4. **Grill (if needed).** If the request needs fleshing out, follow the bundled [grilling](grilling.md) and [domain-modeling](domain-modeling.md) procedures together — grill it into shape one question at a time, sharpening domain terms and updating `GLOSSARY.md`/ADRs inline as decisions land.
|
|
75
75
|
|
|
76
76
|
5. **Apply the outcome:**
|
|
77
|
-
- `ready-for-agent
|
|
78
|
-
- `ready-for-human
|
|
79
|
-
- `needs-info
|
|
77
|
+
- `ready-for-agent`: post an agent brief comment ([AGENT-BRIEF.md](../references/AGENT-BRIEF.md)).
|
|
78
|
+
- `ready-for-human`: same structure as an agent brief, but note why it can't be delegated (judgment calls, external access, design decisions, manual testing).
|
|
79
|
+
- `needs-info`: post triage notes (template below).
|
|
80
80
|
- `wontfix` — close, with the comment depending on *why*:
|
|
81
|
-
- **Already implemented
|
|
81
|
+
- **Already implemented**: the change already exists in the codebase. Point to where it lives; do **not** write to `.out-of-scope/` (that KB is for *rejected* requests, not built ones).
|
|
82
82
|
- **Rejected (bug)** — polite explanation, then close.
|
|
83
|
-
- **Rejected (enhancement)
|
|
84
|
-
- `needs-triage
|
|
83
|
+
- **Rejected (enhancement)**: write to `.out-of-scope/`, link to it from a comment, then close ([OUT-OF-SCOPE.md](../references/OUT-OF-SCOPE.md)).
|
|
84
|
+
- `needs-triage`: apply the role. Optional comment if there's partial progress.
|
|
85
85
|
|
|
86
86
|
## Quick state override
|
|
87
87
|
|
package/procedures/wait-what.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Wait
|
|
1
|
+
Wait, I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `GLOSSARY.md` (follow `GLOSSARY-MAP.md` to the right one if the repo has more than one).
|