axiom-coding-agent-setup 1.2.0 → 1.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.
Files changed (36) hide show
  1. package/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
  2. package/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  3. package/.agents/skills/domain-modeling/SKILL.md +74 -0
  4. package/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
  5. package/.agents/skills/grill-with-docs/SKILL.md +7 -0
  6. package/.agents/skills/grill-with-docs/agents/openai.yaml +5 -0
  7. package/.agents/skills/grilling/SKILL.md +28 -0
  8. package/.agents/skills/grilling/agents/openai.yaml +3 -0
  9. package/.agents/skills/huggingface-deployment/SKILL.md +12 -11
  10. package/.agents/skills/implement/SKILL.md +15 -0
  11. package/.agents/skills/implement/agents/openai.yaml +5 -0
  12. package/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
  13. package/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  14. package/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
  15. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
  16. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
  17. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
  18. package/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  19. package/.agents/skills/tdd/SKILL.md +38 -0
  20. package/.agents/skills/tdd/agents/openai.yaml +3 -0
  21. package/.agents/skills/tdd/mocking.md +59 -0
  22. package/.agents/skills/tdd/tests.md +77 -0
  23. package/.agents/skills/to-spec/SKILL.md +75 -0
  24. package/.agents/skills/to-spec/agents/openai.yaml +5 -0
  25. package/.agents/skills/to-tickets/SKILL.md +105 -0
  26. package/.agents/skills/to-tickets/agents/openai.yaml +5 -0
  27. package/.agents/skills/triage/AGENT-BRIEF.md +207 -0
  28. package/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
  29. package/.agents/skills/triage/SKILL.md +112 -0
  30. package/.agents/skills/triage/agents/openai.yaml +5 -0
  31. package/.agents/skills/wayfinder/SKILL.md +128 -0
  32. package/.agents/skills/wayfinder/agents/openai.yaml +5 -0
  33. package/README.md +10 -1
  34. package/bin/cli.js +21 -0
  35. package/package.json +1 -1
  36. package/skills-lock.json +117 -57
@@ -0,0 +1,47 @@
1
+ # ADR Format
2
+
3
+ ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.
4
+
5
+ Create the `docs/adr/` directory lazily: only when the first ADR is needed.
6
+
7
+ ## Template
8
+
9
+ ```md
10
+ # {Short title of the decision}
11
+
12
+ {1-3 sentences: what's the context, what did we decide, and why.}
13
+ ```
14
+
15
+ That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why*, not in filling out sections.
16
+
17
+ ## Optional sections
18
+
19
+ Only include these when they add genuine value. Most ADRs won't need them.
20
+
21
+ - **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`): useful when decisions are revisited
22
+ - **Considered Options**: only when the rejected alternatives are worth remembering
23
+ - **Consequences**: only when non-obvious downstream effects need to be called out
24
+
25
+ ## Numbering
26
+
27
+ Scan `docs/adr/` for the highest existing number and increment by one.
28
+
29
+ ## When to offer an ADR
30
+
31
+ All three of these must be true:
32
+
33
+ 1. **Hard to reverse**: the cost of changing your mind later is meaningful
34
+ 2. **Surprising without context**: a future reader will look at the code and wonder "why on earth did they do it this way?"
35
+ 3. **The result of a real trade-off**: there were genuine alternatives and you picked one for specific reasons
36
+
37
+ If a decision is easy to reverse, skip it: you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."
38
+
39
+ ### What qualifies
40
+
41
+ - **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
42
+ - **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
43
+ - **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library: just the ones that would take a quarter to swap out.
44
+ - **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
45
+ - **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
46
+ - **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
47
+ - **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it; otherwise someone will suggest GraphQL again in six months.
@@ -0,0 +1,60 @@
1
+ # CONTEXT.md Format
2
+
3
+ ## Structure
4
+
5
+ ```md
6
+ # {Context Name}
7
+
8
+ {One or two sentence description of what this context is and why it exists.}
9
+
10
+ ## Language
11
+
12
+ **Order**:
13
+ {A one or two sentence description of the term}
14
+ _Avoid_: Purchase, transaction
15
+
16
+ **Invoice**:
17
+ A request for payment sent to a customer after delivery.
18
+ _Avoid_: Bill, payment request
19
+
20
+ **Customer**:
21
+ A person or organization that places orders.
22
+ _Avoid_: Client, buyer, account
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
28
+ - **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
29
+ - **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
30
+ - **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
31
+
32
+ ## Single vs multi-context repos
33
+
34
+ **Single context (most repos):** One `CONTEXT.md` at the repo root.
35
+
36
+ **Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
37
+
38
+ ```md
39
+ # Context Map
40
+
41
+ ## Contexts
42
+
43
+ - [Ordering](./src/ordering/CONTEXT.md): receives and tracks customer orders
44
+ - [Billing](./src/billing/CONTEXT.md): generates invoices and processes payments
45
+ - [Fulfillment](./src/fulfillment/CONTEXT.md): manages warehouse picking and shipping
46
+
47
+ ## Relationships
48
+
49
+ - **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
50
+ - **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
51
+ - **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
52
+ ```
53
+
54
+ The skill infers which structure applies:
55
+
56
+ - If `CONTEXT-MAP.md` exists, read it to find contexts
57
+ - If only a root `CONTEXT.md` exists, single context
58
+ - If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
59
+
60
+ When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: domain-modeling
3
+ description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a CONTEXT.md, or recording or editing an ADR.
4
+ ---
5
+
6
+ # Domain Modeling
7
+
8
+ Actively build and sharpen the project's domain model as you design. This is the *active* discipline: challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `CONTEXT.md` for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
9
+
10
+ ## File structure
11
+
12
+ Most repos have a single context:
13
+
14
+ ```
15
+ /
16
+ ├── CONTEXT.md
17
+ ├── docs/
18
+ │ └── adr/
19
+ │ ├── 0001-event-sourced-orders.md
20
+ │ └── 0002-postgres-for-write-model.md
21
+ └── src/
22
+ ```
23
+
24
+ If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
25
+
26
+ ```
27
+ /
28
+ ├── CONTEXT-MAP.md
29
+ ├── docs/
30
+ │ └── adr/ ← system-wide decisions
31
+ ├── src/
32
+ │ ├── ordering/
33
+ │ │ ├── CONTEXT.md
34
+ │ │ └── docs/adr/ ← context-specific decisions
35
+ │ └── billing/
36
+ │ ├── CONTEXT.md
37
+ │ └── docs/adr/
38
+ ```
39
+
40
+ Create files lazily: only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
41
+
42
+ ## During the session
43
+
44
+ ### Challenge against the glossary
45
+
46
+ When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
47
+
48
+ ### Sharpen fuzzy language
49
+
50
+ When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account': do you mean the Customer or the User? Those are different things."
51
+
52
+ ### Discuss concrete scenarios
53
+
54
+ When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
55
+
56
+ ### Cross-reference with code
57
+
58
+ When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"
59
+
60
+ ### Update CONTEXT.md inline
61
+
62
+ When a term is resolved, update `CONTEXT.md` right there. Don't batch these up: capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md).
63
+
64
+ `CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
65
+
66
+ ### Offer ADRs sparingly
67
+
68
+ Only offer to create an ADR when all three are true:
69
+
70
+ 1. **Hard to reverse**: the cost of changing your mind later is meaningful
71
+ 2. **Surprising without context**: a future reader will wonder "why did they do it this way?"
72
+ 3. **The result of a real trade-off**: there were genuine alternatives and you picked one for specific reasons
73
+
74
+ If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Domain Modeling"
3
+ short_description: "Build and sharpen a domain model"
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: grill-with-docs
3
+ description: A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Call the Skill tool twice, for "grilling" and "domain-modeling".
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Grill with Docs"
3
+ short_description: "Grill a design and write its docs"
4
+ policy:
5
+ allow_implicit_invocation: false
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: grilling
3
+ description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
4
+ ---
5
+
6
+ Interview the user relentlessly until you reach a shared understanding. Map this as a **design tree**: every decision branches into the decisions that hang off it.
7
+
8
+ Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled: the questions you can ask _now_ without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
9
+
10
+ Format a round like so:
11
+
12
+ ```
13
+ ❓ **Q1** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
14
+
15
+ ➡️ <your recommended answer>
16
+
17
+ ---
18
+
19
+ ❓ **Q2** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
20
+
21
+ ➡️ <your recommended answer>
22
+ ```
23
+
24
+ Each round the user answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a _later_ round, not this one.
25
+
26
+ Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait.
27
+
28
+ The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Grilling"
3
+ short_description: "Stress-test thinking a round of questions at a time"
@@ -11,12 +11,12 @@ How to deploy a project to a Hugging Face Space automatically whenever a GitHub
11
11
 
12
12
  Core deployment strategies (in order of preference):
13
13
 
14
- | Strategy | How | Pros | Cons |
15
- |---|---|---|---|
16
- | **`git push space`** (recommended) | CI pushes git history directly to the Space's git remote | 1 commit per push; incremental; native deletions; no SDK | Pushes all git-tracked files; needs LFS tracked properly |
17
- | **Official `huggingface/hub-sync` action** | GitHub Action that mirrors files via the `hf` CLI | Zero-config; auto-excludes `.github/` + `.git/`; handles deletions | Mirror-based (not git-to-git); still commit-per-hook under the hood for large folders |
18
- | **`hf upload` / `upload_folder` script** | Python API bulk upload with `ignore_patterns` | Full control over ignore list | Easy to trip commit rate limits if implemented as delete-per-file + upload |
19
- | ~~Wipe-everything-then-upload~~ | `delete_file()` loop + `upload_folder` | (none — anti-pattern) | Burns ~1 commit **per deleted file**; a mid-run failure leaves the Space half-emptied |
14
+ | Strategy | How | Pros | Cons |
15
+ | ------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
16
+ | **`git push space`** (recommended) | CI pushes git history directly to the Space's git remote | 1 commit per push; incremental; native deletions; no SDK | Pushes all git-tracked files; needs LFS tracked properly |
17
+ | **Official `huggingface/hub-sync` action** | GitHub Action that mirrors files via the `hf` CLI | Zero-config; auto-excludes `.github/` + `.git/`; handles deletions | Mirror-based (not git-to-git); still commit-per-hook under the hood for large folders |
18
+ | **`hf upload` / `upload_folder` script** | Python API bulk upload with `ignore_patterns` | Full control over ignore list | Easy to trip commit rate limits if implemented as delete-per-file + upload |
19
+ | ~~Wipe-everything-then-upload~~ | `delete_file()` loop + `upload_folder` | (none — anti-pattern) | Burns ~1 commit **per deleted file**; a mid-run failure leaves the Space half-emptied |
20
20
 
21
21
  ---
22
22
 
@@ -32,7 +32,7 @@ Core deployment strategies (in order of preference):
32
32
 
33
33
  ## Prerequisites (What a Working Space Needs)
34
34
 
35
- 1. **`README.md` with YAML front matter at the very top** — this *is* the Space's build config. Without it HF shows:
35
+ 1. **`README.md` with YAML front matter at the very top** — this _is_ the Space's build config. Without it HF shows:
36
36
 
37
37
  ```
38
38
  configuration error
@@ -73,7 +73,7 @@ name: Deploy to Hugging Face Space
73
73
  on:
74
74
  push:
75
75
  branches: [main]
76
- workflow_dispatch: # manual re-run after rate-limit recovery
76
+ workflow_dispatch: # manual re-run after rate-limit recovery
77
77
 
78
78
  jobs:
79
79
  deploy-to-hf:
@@ -82,8 +82,8 @@ jobs:
82
82
  - name: Checkout repository
83
83
  uses: actions/checkout@v4
84
84
  with:
85
- fetch-depth: 0 # full history — HF's pre-receive hook scans every pushed commit
86
- lfs: true # required whenever any tracked file matches .gitattributes LFS patterns
85
+ fetch-depth: 0 # full history — HF's pre-receive hook scans every pushed commit
86
+ lfs: true # required whenever any tracked file matches .gitattributes LFS patterns
87
87
 
88
88
  - name: Push to HF Space
89
89
  env:
@@ -149,6 +149,7 @@ Key facts:
149
149
  - Three deploys in one hour ≈ far over budget → mid-upload 429 → Space left empty → rebuild error.
150
150
 
151
151
  Recovery from a 429:
152
+
152
153
  1. Wait for the window to reset (the error message states the cooldown, usually ~1 hour).
153
154
  2. Re-run the workflow via `workflow_dispatch` (Actions tab → Run workflow) — no new commit needed if `main` is already correct.
154
155
  3. Local runs (running the same script locally with the HF token) hit the **same account-level** quota.
@@ -212,7 +213,7 @@ Check: file tree is complete (`tree/main` shows expected set), README front matt
212
213
  ## Gotchas
213
214
 
214
215
  - **Rate limit is per account/token across everything**, so a local test run and a CI run share the same budget.
215
- - The Hub's pre-receive hook scans **every commit in the push**, not just the tip — a binary blob that exists anywhere in history can break pushes around it. If that bites, push a single **orphan commit** of the current tree instead of raw history.
216
+ - The Hub's pre-receive hook scans **every commit in the push**, not just the tip — and since the move to Xet storage it **rejects raw binary files** not stored via Xet/LFS anywhere in that history, even if the current tree is clean (symptom: `remote: Your push was rejected because it contains binary files` + `Offending files:` list). If that bites, push a single **orphan commit** of the current tree minus raw binaries instead of raw history. Historic binaries committed before an LFS rule was added to `.gitattributes` stay raw in ancestors — adding the LFS rule only changes future commits.
216
217
  - **LFS pointer vs file content**: if the runner checks out with `lfs: true`, files in the working copy are real content; pushing to the Space via `git push` uploads the real LFS objects over the remote's LFS endpoint. Without LFS checkout, the Space receives pointer files → 404 on the asset.
217
218
  - `upload_folder` failures mid-run are **not transactional** — partial state persists (this is what emptied a real Space down to one directory).
218
219
  - Deleting LFS files only frees guardrail-level storage after history is rewritten (`super_squash_history`), but for Spaces the OPPOSITE pattern is fine: force-push resets history, so old Storage-deleted files aren't a top concern.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: implement
3
+ description: "Implement a piece of work based on a spec or set of tickets."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Implement the work described by the user in the spec or tickets.
8
+
9
+ Use /tdd where possible, at pre-agreed seams.
10
+
11
+ Run typechecking regularly, single test files regularly, and the full test suite once at the end.
12
+
13
+ Once done, use /code-review to review the work.
14
+
15
+ Commit your work to the current branch.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Implement"
3
+ short_description: "Build work from a spec or tickets"
4
+ policy:
5
+ allow_implicit_invocation: false
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: setup-matt-pocock-skills
3
+ description: "Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Setup Matt Pocock's Skills
8
+
9
+ Scaffold the per-repo configuration that the engineering skills assume:
10
+
11
+ - **Issue tracker**: where issues live (GitHub by default; local markdown is also supported out of the box)
12
+ - **Triage labels**: the strings used for the five canonical triage roles
13
+ - **Domain docs**: where `CONTEXT.md` and ADRs live, and the consumer rules for reading them
14
+
15
+ This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
16
+
17
+ ## Process
18
+
19
+ ### 1. Explore
20
+
21
+ Look at the current repo to understand its starting state. Read whatever exists; don't assume:
22
+
23
+ - `git remote -v` and `.git/config`: is this a GitHub repo? Which one?
24
+ - `AGENTS.md` and `CLAUDE.md` at the repo root: does either exist? Is there already an `## Agent skills` section in either?
25
+ - `CONTEXT.md` and `CONTEXT-MAP.md` at the repo root
26
+ - `docs/adr/` and any `src/*/docs/adr/` directories
27
+ - `docs/agents/`: does this skill's prior output already exist?
28
+ - `.scratch/`: a sign that a local-markdown issue tracker convention is already in use
29
+ - 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.
30
+ - Monorepo signals: a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, or a populated `packages/*` with its own `src/`. These are present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
31
+
32
+ ### 2. Present findings and ask
33
+
34
+ Summarise what's present and what's missing. Then take the sections in order. One section, one answer, then the next.
35
+
36
+ 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).
37
+
38
+ **Section A: Issue tracker.**
39
+
40
+ > Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-tickets`, `triage`, and `to-spec` 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.
41
+
42
+ 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), offer:
43
+
44
+ - **GitHub**: issues live in the repo's GitHub Issues (uses the `gh` CLI)
45
+ - **GitLab**: issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
46
+ - **Local markdown**: issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
47
+ - **Other** (Jira, Linear, etc.): ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
48
+
49
+ 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.
50
+
51
+ **Section B: Triage label vocabulary.** Skip this section entirely if the `triage` skill isn't installed (exploration told you), since an uninstalled skill needs no labels.
52
+
53
+ If it is installed, ask exactly one question:
54
+
55
+ > Do you want to keep the default triage labels? (recommended: **yes**)
56
+
57
+ 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.
58
+
59
+ **Section C: Domain docs.** Default to **single-context** (one `CONTEXT.md` + `docs/adr/` at the repo root). This fits almost every repo; write it without asking.
60
+
61
+ Offer **multi-context** (a root `CONTEXT-MAP.md` pointing to per-context `CONTEXT.md` files) only when exploration found monorepo signals. Then confirm which layout they want.
62
+
63
+ ### 3. Confirm and edit
64
+
65
+ Show the user a draft of:
66
+
67
+ - The `## Agent skills` block to add to whichever of `CLAUDE.md` / `AGENTS.md` is being edited (see step 4 for selection rules)
68
+ - The contents of `docs/agents/issue-tracker.md`, `docs/agents/domain.md`, and `docs/agents/triage-labels.md` (the last only when `triage` is installed)
69
+
70
+ Let them edit before writing.
71
+
72
+ ### 4. Write
73
+
74
+ **Pick the file to edit:**
75
+
76
+ - If `CLAUDE.md` exists, edit it.
77
+ - Else if `AGENTS.md` exists, edit it.
78
+ - If neither exists, ask the user which one to create; don't pick for them.
79
+
80
+ Never create `AGENTS.md` when `CLAUDE.md` already exists (or vice versa); always edit the one that's already there.
81
+
82
+ If an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
83
+
84
+ The block:
85
+
86
+ ```markdown
87
+ ## Agent skills
88
+
89
+ ### Issue tracker
90
+
91
+ [one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
92
+
93
+ ### Triage labels
94
+
95
+ [one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
96
+
97
+ ### Domain docs
98
+
99
+ [one-line summary of layout: "single-context" or "multi-context"]. See `docs/agents/domain.md`.
100
+ ```
101
+
102
+ 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.
103
+
104
+ Then write the docs files using the seed templates in this skill folder as a starting point:
105
+
106
+ - [issue-tracker-github.md](./issue-tracker-github.md): GitHub issue tracker
107
+ - [issue-tracker-gitlab.md](./issue-tracker-gitlab.md): GitLab issue tracker
108
+ - [issue-tracker-local.md](./issue-tracker-local.md): local-markdown issue tracker
109
+ - [triage-labels.md](./triage-labels.md): label mapping (only if `triage` is installed)
110
+ - [domain.md](./domain.md): domain doc consumer rules + layout
111
+
112
+ For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
113
+
114
+ ### 5. Done
115
+
116
+ 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.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Setup Matt Pocock Skills"
3
+ short_description: "Configure a repo for the skills"
4
+ policy:
5
+ allow_implicit_invocation: false
@@ -0,0 +1,51 @@
1
+ # Domain Docs
2
+
3
+ How the engineering skills should consume this repo's domain documentation when exploring the codebase.
4
+
5
+ ## Before exploring, read these
6
+
7
+ - **`CONTEXT.md`** at the repo root, or
8
+ - **`CONTEXT-MAP.md`** at the repo root if it exists: it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
9
+ - **`docs/adr/`**: read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
10
+
11
+ If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
12
+
13
+ ## File structure
14
+
15
+ Single-context repo (most repos):
16
+
17
+ ```
18
+ /
19
+ ├── CONTEXT.md
20
+ ├── docs/adr/
21
+ │ ├── 0001-event-sourced-orders.md
22
+ │ └── 0002-postgres-for-write-model.md
23
+ └── src/
24
+ ```
25
+
26
+ Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
27
+
28
+ ```
29
+ /
30
+ ├── CONTEXT-MAP.md
31
+ ├── docs/adr/ ← system-wide decisions
32
+ └── src/
33
+ ├── ordering/
34
+ │ ├── CONTEXT.md
35
+ │ └── docs/adr/ ← context-specific decisions
36
+ └── billing/
37
+ ├── CONTEXT.md
38
+ └── docs/adr/
39
+ ```
40
+
41
+ ## Use the glossary's vocabulary
42
+
43
+ When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
44
+
45
+ If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
46
+
47
+ ## Flag ADR conflicts
48
+
49
+ If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
50
+
51
+ > _Contradicts ADR-0007 (event-sourced orders), but worth reopening because…_
@@ -0,0 +1,45 @@
1
+ # Issue tracker: GitHub
2
+
3
+ Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
4
+
5
+ ## Conventions
6
+
7
+ - **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
8
+ - **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
9
+ - **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
10
+ - **Comment on an issue**: `gh issue comment <number> --body "..."`
11
+ - **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
12
+ - **Close**: `gh issue close <number> --comment "..."`
13
+
14
+ Infer the repo from `git remote -v`; `gh` does this automatically when run inside a clone.
15
+
16
+ ## Pull requests as a triage surface
17
+
18
+ **PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_
19
+
20
+ When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:
21
+
22
+ - **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
23
+ - **List external PRs for triage**: `gh pr list --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE` (drop `OWNER`/`MEMBER`/`COLLABORATOR`).
24
+ - **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
25
+
26
+ GitHub shares one number space across issues and PRs, so a bare `#42` may be either: resolve with `gh pr view 42` and fall back to `gh issue view 42`.
27
+
28
+ ## When a skill says "publish to the issue tracker"
29
+
30
+ Create a GitHub issue.
31
+
32
+ ## When a skill says "fetch the relevant ticket"
33
+
34
+ Run `gh issue view <number> --comments`.
35
+
36
+ ## Wayfinding operations
37
+
38
+ Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
39
+
40
+ - **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
41
+ - **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
42
+ - **Blocking**: GitHub's **native issue dependencies**, the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only, the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
43
+ - **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
44
+ - **Claim**: `gh issue edit <n> --add-assignee @me`, the session's first write.
45
+ - **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
@@ -0,0 +1,46 @@
1
+ # Issue tracker: GitLab
2
+
3
+ Issues and specs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
4
+
5
+ ## Conventions
6
+
7
+ - **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
8
+ - **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
9
+ - **List issues**: `glab issue list -F json` with appropriate `--label` filters.
10
+ - **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
11
+ - **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
12
+ - **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
13
+ - **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc., the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
14
+
15
+ Infer the repo from `git remote -v`; `glab` does this automatically when run inside a clone.
16
+
17
+ ## Merge requests as a triage surface
18
+
19
+ **MRs as a request surface: no.** _(Set to `yes` if this repo treats external merge requests as feature requests; `/triage` reads this flag.)_
20
+
21
+ When set to `yes`, MRs run through the same labels and states as issues, using the `glab mr` equivalents:
22
+
23
+ - **Read an MR**: `glab mr view <number> --comments` and `glab mr diff <number>` for the diff.
24
+ - **List external MRs for triage**: `glab mr list -F json`, then keep only MRs whose author is not a project member/owner (a contributor's MR, not a maintainer's in-flight work).
25
+ - **Comment / label / close**: `glab mr note`, `glab mr update --label`/`--unlabel`, `glab mr close`.
26
+
27
+ Unlike GitHub, GitLab numbers issues and MRs separately, so `#42` is unambiguous once you know which surface the maintainer means.
28
+
29
+ ## When a skill says "publish to the issue tracker"
30
+
31
+ Create a GitLab issue.
32
+
33
+ ## When a skill says "fetch the relevant ticket"
34
+
35
+ Run `glab issue view <number> --comments`.
36
+
37
+ ## Wayfinding operations
38
+
39
+ Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
40
+
41
+ - **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `glab issue create --label wayfinder:map`. (On GitLab tiers with native epics, an epic may hold the map instead; a labelled issue works everywhere.)
42
+ - **Child ticket**: an issue carrying `Part of #<map>` at the top of its description and labels `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
43
+ - **Blocking**: GitLab's **native blocking link**, the canonical, UI-visible representation. Add it with the `/blocked_by #<n>` quick action, posted as a note (`glab issue note <child> --message "/blocked_by #<blocker>"`). Native blocking links are a Premium/Ultimate feature; on the free tier (or where unavailable) fall back to a `Blocked by: #<n>, #<n>` line at the top of the description. A ticket is unblocked when every blocker is closed.
44
+ - **Frontier query**: `glab issue list -F json` scoped to the map's children, drop any with an open blocker: a native `blocked_by` link to an open issue (`glab api projects/:id/issues/:iid/links`), or an open issue in the `Blocked by` line, or an assignee; first in map order wins.
45
+ - **Claim**: `glab issue update <n> --assignee @me`, the session's first write.
46
+ - **Resolve**: `glab issue note <n> --message "<answer>"`, then `glab issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
@@ -0,0 +1,30 @@
1
+ # Issue tracker: Local Markdown
2
+
3
+ Issues and specs for this repo live as markdown files in `.scratch/`.
4
+
5
+ ## Conventions
6
+
7
+ - One feature per directory: `.scratch/<feature-slug>/`
8
+ - The spec is `.scratch/<feature-slug>/spec.md`
9
+ - Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01`, never a single combined tickets file
10
+ - Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
11
+ - Comments and conversation history append to the bottom of the file under a `## Comments` heading
12
+
13
+ ## When a skill says "publish to the issue tracker"
14
+
15
+ Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
16
+
17
+ ## When a skill says "fetch the relevant ticket"
18
+
19
+ Read the file at the referenced path. The user will normally pass the path or the issue number directly.
20
+
21
+ ## Wayfinding operations
22
+
23
+ Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.
24
+
25
+ - **Map**: `.scratch/<effort>/map.md` (the Notes / Decisions-so-far / Fog body).
26
+ - **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.
27
+ - **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.
28
+ - **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.
29
+ - **Claim**: set `Status: claimed` and save before any work.
30
+ - **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.