pi-matt-pocock 0.1.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/LICENSE +27 -0
- package/README.md +38 -0
- package/TODO.md +11 -0
- package/index.ts +1 -0
- package/package.json +44 -0
- package/procedures/ADR-FORMAT.md +47 -0
- package/procedures/AGENT-BRIEF.md +207 -0
- package/procedures/CONTEXT-FORMAT.md +60 -0
- package/procedures/DEEPENING.md +37 -0
- package/procedures/DESIGN-IT-TWICE.md +44 -0
- package/procedures/GLOSSARY-FORMAT.md +35 -0
- package/procedures/GLOSSARY.md +201 -0
- package/procedures/HTML-REPORT.md +123 -0
- package/procedures/LEARNING-RECORD-FORMAT.md +46 -0
- package/procedures/LOGIC.md +79 -0
- package/procedures/MISSION-FORMAT.md +31 -0
- package/procedures/OUT-OF-SCOPE.md +105 -0
- package/procedures/RESOURCES-FORMAT.md +32 -0
- package/procedures/SKILL-MECHANICS.md +22 -0
- package/procedures/UI.md +112 -0
- package/procedures/bdd-best-practices.md +68 -0
- package/procedures/bdd.md +98 -0
- package/procedures/code-review.md +111 -0
- package/procedures/codebase-design.md +113 -0
- package/procedures/diagnosing-bugs.md +139 -0
- package/procedures/domain-modeling.md +73 -0
- package/procedures/domain.md +51 -0
- package/procedures/gherkin-guide.md +109 -0
- package/procedures/grill-me.md +5 -0
- package/procedures/grill-with-docs.md +5 -0
- package/procedures/grilling.md +11 -0
- package/procedures/handoff.md +13 -0
- package/procedures/hitl-loop.template.sh +44 -0
- package/procedures/implement.md +13 -0
- package/procedures/improve-codebase-architecture.md +69 -0
- package/procedures/issue-tracker-github.md +45 -0
- package/procedures/issue-tracker-gitlab.md +46 -0
- package/procedures/issue-tracker-local.md +30 -0
- package/procedures/mocking.md +59 -0
- package/procedures/phase-boundaries.md +55 -0
- package/procedures/prototype.md +25 -0
- package/procedures/research.md +11 -0
- package/procedures/resolving-merge-conflicts.md +13 -0
- package/procedures/setup-matt-pocock-skills.md +114 -0
- package/procedures/tdd.md +60 -0
- package/procedures/teach.md +137 -0
- package/procedures/template.sh +204 -0
- package/procedures/testing-anti-patterns.md +37 -0
- package/procedures/tests.md +77 -0
- package/procedures/to-questionnaire.md +47 -0
- package/procedures/to-spec.md +77 -0
- package/procedures/to-tickets.md +97 -0
- package/procedures/triage-labels.md +15 -0
- package/procedures/triage.md +110 -0
- package/procedures/wait-what.md +1 -0
- package/procedures/wayfinder.md +127 -0
- package/procedures/wizard.md +39 -0
- package/procedures/writing-for-agents.md +76 -0
- package/procedures/writing-great-skills.md +81 -0
- package/src/index.ts +485 -0
- package/src/procedures.ts +33 -0
- package/src/workflow.ts +192 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Triage
|
|
2
|
+
|
|
3
|
+
Move issues on the project issue tracker through a small state machine of triage roles.
|
|
4
|
+
|
|
5
|
+
If this repo treats external pull requests as a request surface (see the issue-tracker config), triage covers them too: **a PR is an issue with attached code** — same roles, same states, same machine, with a few deltas marked "for a PR" below. Resolve a bare `#42` to an issue or PR per the tracker config.
|
|
6
|
+
|
|
7
|
+
Every comment or issue posted to the issue tracker during triage **must** start with this disclaimer:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
> *This was generated by AI during triage.*
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## CRITICAL: The disclaimer is not optional
|
|
14
|
+
|
|
15
|
+
Every comment or issue posted to the issue tracker during triage must start with `> *This was generated by AI during triage.*`. Each issue carries exactly one category role and one state role; if state roles conflict, flag it and ask the maintainer before doing anything else.
|
|
16
|
+
|
|
17
|
+
## Reference docs
|
|
18
|
+
|
|
19
|
+
- [AGENT-BRIEF.md](AGENT-BRIEF.md) — how to write durable agent briefs
|
|
20
|
+
- [OUT-OF-SCOPE.md](OUT-OF-SCOPE.md) — how the `.out-of-scope/` knowledge base works
|
|
21
|
+
|
|
22
|
+
## Roles
|
|
23
|
+
|
|
24
|
+
Two **category** roles:
|
|
25
|
+
|
|
26
|
+
- `bug` — something is broken
|
|
27
|
+
- `enhancement` — new feature or improvement
|
|
28
|
+
|
|
29
|
+
Five **state** roles:
|
|
30
|
+
|
|
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
|
+
|
|
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
|
+
|
|
39
|
+
Every triaged issue should carry exactly one category role and one state role. If state roles conflict, flag it and ask the maintainer before doing anything else.
|
|
40
|
+
|
|
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 - run [setup-matt-pocock-skills](setup-matt-pocock-skills.md) if not.
|
|
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 — flag transitions that look unusual and ask before proceeding.
|
|
44
|
+
|
|
45
|
+
## Invocation
|
|
46
|
+
|
|
47
|
+
The maintainer invokes [triage](triage.md) and describes what they want in natural language. Interpret the request and act. Examples:
|
|
48
|
+
|
|
49
|
+
- "Show me anything that needs my attention"
|
|
50
|
+
- "Let's look at #42" (issue or PR)
|
|
51
|
+
- "Move #42 to ready-for-agent"
|
|
52
|
+
- "What's ready for agents to pick up?"
|
|
53
|
+
|
|
54
|
+
## Show what needs attention
|
|
55
|
+
|
|
56
|
+
Query the issue tracker and present three buckets, oldest first:
|
|
57
|
+
|
|
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
|
+
|
|
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
|
+
|
|
64
|
+
Show counts and a one-line summary per item. Let the maintainer pick.
|
|
65
|
+
|
|
66
|
+
## Triage a specific issue or PR
|
|
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** — 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
|
+
|
|
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
|
+
|
|
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
|
+
|
|
74
|
+
4. **Grill (if needed).** If the request needs fleshing out, run the [grilling](grilling.md) and [domain-modeling](domain-modeling.md) skills together — grill it into shape one question at a time, sharpening domain terms and updating `CONTEXT.md`/ADRs inline as decisions land.
|
|
75
|
+
|
|
76
|
+
5. **Apply the outcome:**
|
|
77
|
+
- `ready-for-agent` — post an agent brief comment ([AGENT-BRIEF.md](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
|
+
- `wontfix` — close, with the comment depending on *why*:
|
|
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
|
+
- **Rejected (bug)** — polite explanation, then close.
|
|
83
|
+
- **Rejected (enhancement)** — write to `.out-of-scope/`, link to it from a comment, then close ([OUT-OF-SCOPE.md](OUT-OF-SCOPE.md)).
|
|
84
|
+
- `needs-triage` — apply the role. Optional comment if there's partial progress.
|
|
85
|
+
|
|
86
|
+
## Quick state override
|
|
87
|
+
|
|
88
|
+
If the maintainer says "move #42 to ready-for-agent", trust them and apply the role and agent brief directly. Skip grilling and do not request a second confirmation for the role change, comment, or next step.
|
|
89
|
+
|
|
90
|
+
## Needs-info template
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
## Triage Notes
|
|
94
|
+
|
|
95
|
+
**What we've established so far:**
|
|
96
|
+
|
|
97
|
+
- point 1
|
|
98
|
+
- point 2
|
|
99
|
+
|
|
100
|
+
**What we still need from you (@reporter):**
|
|
101
|
+
|
|
102
|
+
- question 1
|
|
103
|
+
- question 2
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Capture everything resolved during grilling under "established so far" so the work isn't lost. Questions must be specific and actionable, not "please provide more info".
|
|
107
|
+
|
|
108
|
+
## Resuming a previous session
|
|
109
|
+
|
|
110
|
+
If prior triage notes exist on the issue or PR, read them, check whether the reporter has answered any outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.
|
|
@@ -0,0 +1 @@
|
|
|
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 `CONTEXT.md`.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
A loose idea has arrived — too big for one agent session, and wrapped in fog: the way from here to the **destination** isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a **shared map** on the repo's issue tracker, then works its **decision tickets** — questions whose resolution is a decision, not slices of a build to execute — one at a time until the route is clear.
|
|
2
|
+
|
|
3
|
+
The destination varies per effort, and naming it is the first act of charting — it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic — engineering work, course content, whatever fits the shape.
|
|
4
|
+
|
|
5
|
+
## Plan, don't do
|
|
6
|
+
|
|
7
|
+
Wayfinder is **planning** by default: each ticket resolves a decision, and the map is done when the way is clear — nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its **Notes** — carrying execution into the map itself — but absent that, produce decisions, not deliverables.
|
|
8
|
+
|
|
9
|
+
## Refer by name
|
|
10
|
+
|
|
11
|
+
Every map and ticket is an issue, so it has a **name** — its title. In everything the human reads — narration, the map's Decisions-so-far — refer to it by that name, never by a bare id, number, or slug. A wall of `#42, #43, #44` is illegible; names read at a glance. The id and URL don't vanish — a name wraps its link — but they ride *inside* the name, never stand in for it.
|
|
12
|
+
|
|
13
|
+
## The Map
|
|
14
|
+
|
|
15
|
+
The map is a single issue on this repo's issue tracker, labelled `wayfinder:map` — the canonical artifact. Its tickets are child issues of the map.
|
|
16
|
+
|
|
17
|
+
The map is an **index**, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links.
|
|
18
|
+
|
|
19
|
+
**Where the map, its child tickets, blocking, and frontier queries physically live is tracker-specific.** The issue tracker should have been provided to you — run [setup-matt-pocock-skills](setup-matt-pocock-skills.md) if not. Consult the tracker doc's "Wayfinding operations" section for how _this_ repo expresses them. If no tracker has been provided, default to the local-markdown tracker.
|
|
20
|
+
|
|
21
|
+
### The map body
|
|
22
|
+
|
|
23
|
+
The whole map at low resolution, loaded once per session. Open tickets are **not** listed — they are open child issues, found by query.
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
## Destination
|
|
27
|
+
|
|
28
|
+
<what reaching the end of this map looks like — the spec, decision, or change this effort is finding its way to. One or two lines; every session orients to it before choosing a ticket.>
|
|
29
|
+
|
|
30
|
+
## Notes
|
|
31
|
+
|
|
32
|
+
<domain; skills every session should consult; standing preferences for this effort>
|
|
33
|
+
|
|
34
|
+
## Decisions so far
|
|
35
|
+
|
|
36
|
+
<!-- the index — one line per closed ticket: enough to judge relevance, then zoom the link for the detail the ticket holds -->
|
|
37
|
+
|
|
38
|
+
- [<closed ticket title>](link) — <one-line gist of the answer>
|
|
39
|
+
|
|
40
|
+
## Not yet specified
|
|
41
|
+
|
|
42
|
+
<!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->
|
|
43
|
+
|
|
44
|
+
## Out of scope
|
|
45
|
+
|
|
46
|
+
<!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Tickets
|
|
50
|
+
|
|
51
|
+
Each ticket is a **child issue** of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session:
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
## Question
|
|
55
|
+
|
|
56
|
+
<the decision or investigation this ticket resolves>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Each ticket carries a `wayfinder:<type>` label — one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)).
|
|
60
|
+
|
|
61
|
+
A session **claims** a ticket by assigning it to the dev driving the map, **first**, before any work, so concurrent sessions skip it. That assignee _is_ the claim: an open, unassigned ticket is unclaimed.
|
|
62
|
+
|
|
63
|
+
Blocking uses the tracker's **native** dependency relationship — essential because it renders the frontier _visually_ in the tracker's own UI, so the human sees what's takeable without opening the map. Only a tracker that lacks native blocking falls back to a body convention. A ticket is **unblocked** when every ticket blocking it is closed; the **frontier** is the open, unblocked, unclaimed children — the edge of the known.
|
|
64
|
+
|
|
65
|
+
The answer isn't part of the body — it's recorded on resolution (see [Work through the map](#work-through-the-map)). Assets created while resolving a ticket are linked from the issue, not pasted in.
|
|
66
|
+
|
|
67
|
+
## Ticket Types
|
|
68
|
+
|
|
69
|
+
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).
|
|
70
|
+
|
|
71
|
+
- **Research** (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases to surface a fact a decision waits on. Delegate it to a teammate when the teammate facility is available; otherwise research it sequentially. Use when knowledge outside the current working directory is required.
|
|
72
|
+
- **Prototype** (HITL): Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI/logic code via the [prototype](prototype.md) skill. Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question.
|
|
73
|
+
- **Grilling** (HITL): Conversation via the [grilling](grilling.md) and [domain-modeling](domain-modeling.md) skills, one question at a time. The default case.
|
|
74
|
+
- **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.
|
|
75
|
+
|
|
76
|
+
## Fog of war
|
|
77
|
+
|
|
78
|
+
The map is _deliberately_ incomplete: don't chart what you can't yet see. Beyond the live tickets lies the **fog of war** — the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets — one at a time, until the way to the destination is clear and no tickets remain.
|
|
79
|
+
|
|
80
|
+
The map's **Not yet specified** section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier _toward_ the destination — everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed.
|
|
81
|
+
|
|
82
|
+
**Fog or ticket?** The test is whether you can state the question precisely now — _not_ whether you can answer it now.
|
|
83
|
+
|
|
84
|
+
- **Ticket when** the question is already sharp — even if it's blocked and you can't act on it yet.
|
|
85
|
+
- **Not yet specified when** you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it.
|
|
86
|
+
|
|
87
|
+
**Not yet specified** excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section).
|
|
88
|
+
|
|
89
|
+
## Out of scope
|
|
90
|
+
|
|
91
|
+
Fog only ever gathers _toward_ the destination. The destination fixes the scope, so work beyond it is **out of scope** — it isn't fog, and it doesn't belong in **Not yet specified**. It gets its own **Out of scope** section on the map: work you've consciously ruled out of _this_ effort. Scope, not sharpness, lands it here.
|
|
92
|
+
|
|
93
|
+
Out-of-scope work never graduates — the frontier stops at the destination — so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption.
|
|
94
|
+
|
|
95
|
+
Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination — mis-scoped in while charting, or exposed by a resolution — **close it** (a closed ticket is unambiguously off the frontier) and leave one line in the **Out of scope** section: the gist plus why it's out of scope, linking the closed ticket. It stays out of **Decisions so far**, which records the route actually walked — a scope boundary isn't a step on it.
|
|
96
|
+
|
|
97
|
+
## CRITICAL: Claim before work; keep the frontier moving
|
|
98
|
+
|
|
99
|
+
Claim each ticket — assign it to yourself — **before** any work, so concurrent sessions skip it. After resolving a ticket, immediately re-query the frontier and claim the next unblocked AFK ticket. Default to producing decisions, not deliverables: when the pull to do the work appears, that is the signal to hand off.
|
|
100
|
+
|
|
101
|
+
## Invocation
|
|
102
|
+
|
|
103
|
+
Two modes. In either mode, keep resolving newly unblocked AFK tickets until the frontier requires human input or an external action.
|
|
104
|
+
|
|
105
|
+
### Chart the map
|
|
106
|
+
|
|
107
|
+
User invokes with a loose idea.
|
|
108
|
+
|
|
109
|
+
1. **Name the destination.** Run a [grilling](grilling.md) and [domain-modeling](domain-modeling.md) session to pin down what this map is finding its way to — the spec, decision, or change. The destination fixes the scope, so it's settled first.
|
|
110
|
+
2. **Map the frontier.** Grill again, **breadth-first** this time: fan out across the whole space rather than deep on any one thread, surfacing the open decisions and the first steps takeable now. **If this surfaces no fog** — the way to the destination is already clear, the whole journey small enough for one session — you don't need a map. Stop, ask directly in the conversation how the user would like to proceed (e.g., proceed without a map / chart the map anyway), and wait for the reply.
|
|
111
|
+
3. **Create the map** (label `wayfinder:map`): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into **Not yet specified**.
|
|
112
|
+
4. **Create the tickets you can specify now** as child issues of the map — then wire blocking edges in a **second pass** (issues need ids before they can reference each other). Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog — the **Not yet specified** section.
|
|
113
|
+
5. **Research the frontier.** For each `research` ticket you just created, use [research](research.md). Delegate independent tickets to teammates only when the teammate facility is available; otherwise resolve them sequentially. Capture findings on a throwaway `research/<name>` branch with a context pointer from the ticket.
|
|
114
|
+
6. Continue directly into the first unblocked AFK research or task ticket. Claim it before work, resolve it, record the resolution, and then work every newly unblocked AFK ticket in order. Stop only when the frontier requires a HITL decision, unavailable fact, or external action. Do not stop merely because charting is complete or ask the user whether to continue.
|
|
115
|
+
|
|
116
|
+
### Work through the map
|
|
117
|
+
|
|
118
|
+
User invokes with a map (URL or number). A ticket is **optional** — without one, you pick the next decision, not the user.
|
|
119
|
+
|
|
120
|
+
1. Load the **map** — the low-res view, not every ticket body.
|
|
121
|
+
2. Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order. **Claim it**: assign it to yourself before any work.
|
|
122
|
+
3. Resolve it — **zoom as needed**: fetch the full body of any related or closed ticket on demand; invoke the skills the `## Notes` block names. If in doubt, use [grilling](grilling.md) and [domain-modeling](domain-modeling.md).
|
|
123
|
+
4. Record the resolution: post the answer as a **resolution comment**, **close** the issue, and **append a context pointer** to the map's Decisions-so-far.
|
|
124
|
+
5. Add newly-surfaced tickets (create-then-wire); graduate any fog the answer has made specifiable, clearing each graduated patch from **Not yet specified** so it lives only as its new ticket. If the answer reveals a ticket — this one or another — sits beyond the destination, **rule it out of scope** rather than resolving it on the route. If the decision invalidates other parts of the map, update or delete those tickets.
|
|
125
|
+
6. Re-query the frontier and immediately claim and resolve the next unblocked AFK ticket. Continue this loop until the frontier is empty or its next ticket is HITL. A closed decision ticket is a trigger to advance the map, not a stopping point or a prompt for user confirmation.
|
|
126
|
+
|
|
127
|
+
The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Wizard
|
|
2
|
+
|
|
3
|
+
A **wizard** is a bash script that walks a human, step by step, through a manual procedure that's tedious to do by hand and tedious to re-explain to an AI every time. It opens each URL, says exactly what to click and copy, captures the values, writes them where they belong (`.env`, GitHub secrets), confirms at every stage, and shows how many stages are left. It might configure third-party services, run a one-off migration, or move the project from one state to another.
|
|
4
|
+
|
|
5
|
+
The delightful UX is already solved by [template.sh](template.sh) — stage-by-stage progress, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent `.env` upserts, `gh secret`/`gh variable` writes, and a closing summary. **Your job is only to scope the procedure and author its stages.** The library above the `STAGES` marker is identical in every wizard; that consistency is the point — never hand-edit it.
|
|
6
|
+
|
|
7
|
+
A wizard is ephemeral by default — built for one run, saved to a scratch or `scripts/` path, deleted when the job's done. When the user wants a repeatable setup path to live in the repo, use the repository's git-agent workflow to record it.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
### 1. Scope the procedure
|
|
12
|
+
|
|
13
|
+
Work out every manual step the human must take and every value that gets captured along the way. Read the repo first — don't ask cold:
|
|
14
|
+
|
|
15
|
+
- For setup: `.env`, `.env.example`, `.env.*`, `README`, `docker-compose*`, framework config, and `.github/workflows/*` (every `secrets.*` / `vars.*` reference is a value the wizard must produce).
|
|
16
|
+
- For a migration or transition: the current state, the target state, and the irreversible actions between them.
|
|
17
|
+
|
|
18
|
+
Then show the user the ordered list of stages and the values each produces, and confirm — they may add, drop, or reorder.
|
|
19
|
+
|
|
20
|
+
**Done when:** every stage is named in order, and for each captured value you know (a) where the human gets it, (b) where it's written (`.env`, a GitHub secret, both, or nowhere — some stages are pure actions), and (c) whether it's secret (hidden entry) or public.
|
|
21
|
+
|
|
22
|
+
### 2. Map each stage's journey
|
|
23
|
+
|
|
24
|
+
For each stage, write the precise path a human follows: which URL to open, what to do there, where a value is shown, which variable it fills — e.g. "Dashboard → Developers → API keys → Reveal test key → copy". Where you don't actually know the current UI or the exact command, say so and ask the user or check the docs — never invent steps that may not exist.
|
|
25
|
+
|
|
26
|
+
**Done when:** every stage traces to concrete instructions a stranger could follow.
|
|
27
|
+
|
|
28
|
+
### 3. Author the wizard
|
|
29
|
+
|
|
30
|
+
Copy `template.sh` to the target path. Replace the example stage with one `stage` per step, in dependency order. Use the library helpers — `stage`, `say`/`step`, `open_url`, `ask`/`ask_secret`, `write_env`, `set_secret`/`set_var`, `pause`/`confirm` — and set `TOTAL_STAGES` to the number of stages you wrote.
|
|
31
|
+
|
|
32
|
+
Hold the bar the template sets: open the URL before asking for its value, use `ask_secret` for anything secret, `write_env` every persisted value, `set_secret` only the values CI actually needs, and `confirm` before any irreversible action. Each `stage` clears the screen so only the current step is visible — keep a stage to one focused task so nothing the human needs scrolls away. Don't touch the library above the marker.
|
|
33
|
+
|
|
34
|
+
### 4. Verify and hand off
|
|
35
|
+
|
|
36
|
+
- `bash -n <script>`; run `shellcheck` if available.
|
|
37
|
+
- `chmod +x <script>`.
|
|
38
|
+
- Don't run it end-to-end yourself — it opens browsers and blocks on human input. Trace it statically instead: every value from step 1 is captured and lands where step 1 said, and every `set_secret` name exactly matches a `secrets.*` reference in CI.
|
|
39
|
+
- Tell the user how to run it. If it is a repeatable setup path, use the repository's git-agent workflow to record it and link it from the README so the next person runs the script instead of asking an AI.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Reference for writing any document an agent consumes — a skill, an `AGENTS.md` / `CLAUDE.md`, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable — the agent taking the same _process_ every run, not producing the same output.
|
|
2
|
+
|
|
3
|
+
When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md) for frontmatter, invocation choice, and router skills.
|
|
4
|
+
|
|
5
|
+
## Context pointers
|
|
6
|
+
|
|
7
|
+
A **context pointer** is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in `AGENTS.md` naming a doc is the same object. The pointer's _wording_, not its target, decides when the agent reaches the material — and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
|
|
8
|
+
|
|
9
|
+
A pointer does two jobs — state what the material is, and list the **branches** that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:
|
|
10
|
+
|
|
11
|
+
- **Front-load the leading word** — the pointer is where it does its triggering work.
|
|
12
|
+
- **One trigger per branch.** Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
|
|
13
|
+
- **Cut identity the body already carries.**
|
|
14
|
+
|
|
15
|
+
## The two loads
|
|
16
|
+
|
|
17
|
+
Every document and pointer you add spends one of two budgets:
|
|
18
|
+
|
|
19
|
+
- **Context load** — the cost of always-loaded material on the agent's window: an `AGENTS.md` line, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires.
|
|
20
|
+
- **Cognitive load** — the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise — it is the price of human agency; spend it where human judgement matters, remove it where it does not.
|
|
21
|
+
|
|
22
|
+
Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.
|
|
23
|
+
|
|
24
|
+
## Information hierarchy
|
|
25
|
+
|
|
26
|
+
A document is built from two content types — **steps** (the ordered actions the agent performs) and **reference** (definitions, rules, facts consulted on demand) — that mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
|
|
27
|
+
|
|
28
|
+
1. **In-file step** — the primary tier: what the agent does, in order.
|
|
29
|
+
2. **In-file reference** — consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell.
|
|
30
|
+
3. **Disclosed reference** — pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.
|
|
31
|
+
|
|
32
|
+
Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
|
|
33
|
+
|
|
34
|
+
**Progressive disclosure** is the move down the ladder — out of the main file and behind a pointer — so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one.
|
|
35
|
+
|
|
36
|
+
**Co-location** is the within-file companion: where the ladder decides _how far down_ a piece sits, co-location decides _what sits beside it_ once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent — grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)
|
|
37
|
+
|
|
38
|
+
**Sprawl** is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
|
|
39
|
+
|
|
40
|
+
## Steps and completion criteria
|
|
41
|
+
|
|
42
|
+
Every step ends on a **completion criterion** — the condition that tells the agent the work is done. Two properties make it a lever:
|
|
43
|
+
|
|
44
|
+
- **Clarity** — can the agent tell done from not-done? A vague bound ("understanding reached") invites **premature completion**: ending the step before it is genuinely done, attention slipping to _being done_. The visible steps still ahead — the **post-completion steps** — supply the pull; the criterion's clarity is the resistance. Defend in order: **sharpen the bound first** (local and cheap); only if it is irreducibly fuzzy _and_ you observe the rush, hide the later steps by splitting the sequence — and hiding only works across a real context boundary (a hand-off or teammate delegation when available; an inline call leaves the later steps in context and clears nothing).
|
|
45
|
+
- **Demand** — how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives **legwork** — the digging the agent does within the work, latent in the wording rather than written as its own step — and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.
|
|
46
|
+
|
|
47
|
+
The strongest criteria are both checkable and exhaustive.
|
|
48
|
+
|
|
49
|
+
## When to split
|
|
50
|
+
|
|
51
|
+
Splitting one document into two spends one of the two loads, so split only when the cut earns it:
|
|
52
|
+
|
|
53
|
+
- **By sequence** — split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
|
|
54
|
+
- **By invocation** — skill-specific: see [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md).
|
|
55
|
+
|
|
56
|
+
## Leading words
|
|
57
|
+
|
|
58
|
+
A **leading word** is a compact concept already living in the model's pretraining that the agent thinks with while running the document (_lesson_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free; reach for an existing word first.
|
|
59
|
+
|
|
60
|
+
It anchors twice. In the body, _execution_: the agent reaches for the same behaviour every time the word appears, and inside flat reference it focuses attention on a class of thing to look for. In a pointer, _invocation_: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the material and reaches it more reliably.
|
|
61
|
+
|
|
62
|
+
Hunt for opportunities to refactor with leading words. A triad spelled out at three sites, a pointer spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token:
|
|
63
|
+
|
|
64
|
+
- "fast, deterministic, low-overhead" → _tight_ (a _tight_ loop).
|
|
65
|
+
- "a loop you believe in" → _red_ — a fuzzy gate becomes a binary observable state (the loop goes _red_ on the bug, or it doesn't).
|
|
66
|
+
|
|
67
|
+
You win twice: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every document is carrying restatements that leading words retire — go find them.
|
|
68
|
+
|
|
69
|
+
**Negation** is the failure mode beside this lever: steering by prohibition drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; the negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Prompt the **positive** — state the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.
|
|
70
|
+
|
|
71
|
+
## Pruning
|
|
72
|
+
|
|
73
|
+
- Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit. **Duplication** — the same meaning in more than one place — costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank. (The accidental inverse of a leading word, which repeats a token on purpose, never the meaning.)
|
|
74
|
+
- The **environment** is a source of truth too — `package.json` scripts, config files, the directory layout, `--help` output — and a document that restates it is a **cache**: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
|
|
75
|
+
- Check every line for **relevance**: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live.
|
|
76
|
+
- Hunt **no-ops** sentence by sentence: an instruction the model already obeys by default pays load to say nothing. The test — does it change behaviour versus the default? — is model-relative, not reader-relative: two people disagreeing about a no-op disagree about the default, and settle it by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words from it. The test also grades leading words: a word too weak to beat the default (_be thorough_ when the agent is already thorough-ish) is a no-op, and the fix is a stronger word (_relentless_), not a different technique.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
A skill exists to wrangle determinism out of a stochastic system. **Predictability** — the agent taking the same _process_ every run, not producing the same output — is the root virtue; every lever below serves it.
|
|
2
|
+
|
|
3
|
+
**Bold terms** are defined in [`GLOSSARY.md`](GLOSSARY.md); look them up there for the full meaning.
|
|
4
|
+
|
|
5
|
+
## Invocation
|
|
6
|
+
|
|
7
|
+
Two choices, trading different costs:
|
|
8
|
+
|
|
9
|
+
- A **model-invoked** skill keeps a **description**, so the agent can fire it autonomously _and_ other skills can reach it (you can still type its name too). It contributes to **context load** — the description sits in the window every turn. Mechanics: omit `disable-model-invocation`, and write a model-facing description with rich trigger phrasing ("Use when the user wants…, mentions…").
|
|
10
|
+
- A **user-invoked** skill strips the description from the agent's reach: only you, typing its name, can invoke it — and no other skill can. Zero context load, but it spends **cognitive load**: _you_ are the index that must remember it exists. Mechanics: set `disable-model-invocation: true`; the `description` becomes human-facing — a one-line summary, trigger lists stripped.
|
|
11
|
+
|
|
12
|
+
Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.
|
|
13
|
+
|
|
14
|
+
When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a **router skill**: one user-invoked skill that names the others and when to reach for each.
|
|
15
|
+
|
|
16
|
+
## Writing the description
|
|
17
|
+
|
|
18
|
+
A model-invoked **description** does two jobs — state what the skill is, and list the **branches** that should trigger it. Every word increases **context load**, so a description earns even harder pruning than the body:
|
|
19
|
+
|
|
20
|
+
- **Front-load the skill's leading word** — the description is where it does its invocation work.
|
|
21
|
+
- **One trigger per branch.** Synonyms that rename a single branch are **duplication** — "build features using BDD … asks for test-first development" is one branch written twice. Collapse them; keep only genuinely distinct branches.
|
|
22
|
+
- **Cut identity that's already in the body.** Keep the description to triggers, plus any "when another skill needs…" reach clause.
|
|
23
|
+
|
|
24
|
+
## Information hierarchy
|
|
25
|
+
|
|
26
|
+
A skill is built from two content types — **steps** and **reference** — that mix freely: a skill can be all steps, all reference, or both. The core decision is which to use and where each sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
|
|
27
|
+
|
|
28
|
+
1. **In-skill step** — an ordered action in `SKILL.md`, the primary tier: what the agent does, in order. Each step ends on a **completion criterion**, the condition that tells the agent the work is done. Make it _checkable_ (can the agent tell done from not-done?) and, where it matters, _exhaustive_ ("every modified model accounted for", not "produce a change list") — a vague criterion invites **premature completion**.
|
|
29
|
+
2. **In-skill reference** — a definition, rule, or fact in `SKILL.md`, consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell. _This skill is all reference._
|
|
30
|
+
3. **External reference** — reference pushed out of `SKILL.md` into a separate file, reached by a **context pointer**, loaded only when the pointer fires. (Spans _disclosed_ reference — a sibling file like `GLOSSARY.md`, still part of the skill — through fully **external reference** that lives outside the skill system and any skill can point at.)
|
|
31
|
+
|
|
32
|
+
A demanding completion criterion drives thorough **legwork** — the digging the agent does within the work — whether the skill has steps or not, since "every rule applied" binds flat reference just as "every step done" binds a sequence.
|
|
33
|
+
|
|
34
|
+
Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
|
|
35
|
+
|
|
36
|
+
**Progressive disclosure** is the move down the ladder — out of `SKILL.md` into a linked file — so the top stays legible. Mechanics: a linked `.md` file in the skill folder, named for what it holds (this skill discloses its full definitions to `GLOSSARY.md`). Some skills are used in more than one way, and each distinct way is a **branch** — different runs taking different paths through the skill. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. A **context pointer**'s _wording_, not its target, decides when and how reliably the agent reaches the material.
|
|
37
|
+
|
|
38
|
+
Where the ladder decides _how far down_ a piece sits, **co-location** decides _what sits beside it_ once there: keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it.
|
|
39
|
+
|
|
40
|
+
## When to split
|
|
41
|
+
|
|
42
|
+
**Granularity** is how finely you divide skills, and each cut spends one of the two loads, so split only when the cut earns it. Two cuts:
|
|
43
|
+
|
|
44
|
+
- **By invocation** — split off a **model-invoked** skill when you have a distinct **leading word** that should trigger it on its own, or another skill must reach it. You pay **context load** for the new always-loaded **description**, so that independent reach has to be worth it.
|
|
45
|
+
- **By sequence** — split a run of **steps** when the steps still ahead (a step's **post-completion steps**) tempt the agent to rush the one in front of it (**premature completion**). Keeping them out of view encourages the agent to do more **legwork** on the current task.
|
|
46
|
+
|
|
47
|
+
## Pruning
|
|
48
|
+
|
|
49
|
+
Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit.
|
|
50
|
+
|
|
51
|
+
Check every line for **relevance**: does it still bear on what the skill does?
|
|
52
|
+
|
|
53
|
+
Then hunt **no-ops** sentence by sentence, not just line by line: run the no-op test on each sentence in isolation, and when one fails, delete the whole sentence rather than trim words from it. Be aggressive — most prose that fails should go, not be rewritten.
|
|
54
|
+
|
|
55
|
+
## CRITICAL: One meaning, one place
|
|
56
|
+
|
|
57
|
+
Keep every meaning in a single source of truth — changing the behaviour must be a one-place edit. Check every line for relevance, then run the no-op test sentence by sentence: when one fails, delete the whole sentence rather than trim words from it. Duplication inflates a meaning's prominence on the ladder; sediment is the default fate of any skill without this pruning discipline.
|
|
58
|
+
|
|
59
|
+
## Leading words
|
|
60
|
+
|
|
61
|
+
A **leading word** is a compact concept already living in the model's pretraining that the agent thinks with while running the skill (e.g. _lesson_, _fog of war_, _tracer bullets_). Repeated throughout the text (though not necessarily - a strong leading word might only be needed once), it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds.
|
|
62
|
+
|
|
63
|
+
It serves predictability twice. In the body it anchors _execution_: the agent reaches for the same behaviour every time the word appears. In the description it anchors _invocation_: when the same word lives in your prompts, docs, and code, the agent links that shared language to the skill and fires it more reliably.
|
|
64
|
+
|
|
65
|
+
Hunt for opportunities to refactor skills to use leading words. A triad spelled out at three sites (**duplication**), a description spending a sentence to gesture at one idea — each is a passage begging to **collapse** into a single token. Examples include:
|
|
66
|
+
|
|
67
|
+
- "fast, deterministic, low-overhead" -> _tight_ — one quality restated across a phase — into a single pretrained word (a _tight_ loop).
|
|
68
|
+
- "a loop you believe in" -> _red_ — converts a fuzzy gate into a binary observable state (the loop goes _red_ on the bug, or it doesn't).
|
|
69
|
+
|
|
70
|
+
You win twice over: fewer tokens, _and_ a sharper hook for the agent to hang its thinking on. Assume every skill is carrying restatements that leading words retire — go find them.
|
|
71
|
+
|
|
72
|
+
## Failure modes
|
|
73
|
+
|
|
74
|
+
Use these to diagnose issues the user may be having with the skill.
|
|
75
|
+
|
|
76
|
+
- **Premature completion** — ending a step before it's genuinely done, attention slipping to _being done_. Defence, in order: sharpen the completion criterion first (cheap, local); only if it is irreducibly fuzzy _and_ you observe the rush, hide the post-completion steps by splitting (the sequence cut).
|
|
77
|
+
- **Duplication** — the same meaning in more than one place. Costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank.
|
|
78
|
+
- **Sediment** — stale layers that settle because adding feels safe and removing feels risky. The default fate of any skill without a pruning discipline.
|
|
79
|
+
- **Sprawl** — a skill simply too long, even when every line is live and unique. Hurts readability and maintainability and wastes tokens. The cure is the ladder: disclose **reference** behind pointers, and split by **branch** or sequence so each path carries only what it needs.
|
|
80
|
+
- **No-op** — a line the model already obeys by default, so you pay load to say nothing. The test: does it change behaviour versus the default? A weak leading word (_be thorough_ when the agent is already thorough-ish) is a no-op; the fix is a stronger word (_relentless_), not a different technique.
|
|
81
|
+
- **Negation** — steering by prohibition backfires: _don't think of an elephant_ names the elephant and makes it more available, not less. Prompt the **positive** — state the target behaviour so the banned one is never spoken; keep a prohibition only as a hard guardrail you can't phrase positively, and even then pair it with what to do instead.
|