skilledagent 1.0.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 (72) hide show
  1. package/.agents/AGENTS.MD +44 -0
  2. package/.agents/AGENTS_README.md +125 -0
  3. package/.agents/CONTEXT.md +19 -0
  4. package/.agents/skills/ask-matt/SKILL.md +76 -0
  5. package/.agents/skills/claude-handoff/SKILL.md +18 -0
  6. package/.agents/skills/code-review/SKILL.md +89 -0
  7. package/.agents/skills/codebase-design/DEEPENING.md +37 -0
  8. package/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  9. package/.agents/skills/codebase-design/SKILL.md +114 -0
  10. package/.agents/skills/design-an-interface/SKILL.md +94 -0
  11. package/.agents/skills/diagnosing-bugs/SKILL.md +134 -0
  12. package/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  13. package/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
  14. package/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  15. package/.agents/skills/domain-modeling/SKILL.md +74 -0
  16. package/.agents/skills/edit-article/SKILL.md +15 -0
  17. package/.agents/skills/git-guardrails-claude-code/SKILL.md +95 -0
  18. package/.agents/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
  19. package/.agents/skills/grill-me/SKILL.md +7 -0
  20. package/.agents/skills/grill-with-docs/SKILL.md +7 -0
  21. package/.agents/skills/grilling/SKILL.md +12 -0
  22. package/.agents/skills/handoff/SKILL.md +16 -0
  23. package/.agents/skills/implement/SKILL.md +15 -0
  24. package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  25. package/.agents/skills/improve-codebase-architecture/SKILL.md +66 -0
  26. package/.agents/skills/loop-me/SKILL.md +32 -0
  27. package/.agents/skills/migrate-to-shoehorn/SKILL.md +118 -0
  28. package/.agents/skills/obsidian-vault/SKILL.md +59 -0
  29. package/.agents/skills/prototype/LOGIC.md +79 -0
  30. package/.agents/skills/prototype/SKILL.md +26 -0
  31. package/.agents/skills/prototype/UI.md +112 -0
  32. package/.agents/skills/qa/SKILL.md +130 -0
  33. package/.agents/skills/request-refactor-plan/SKILL.md +68 -0
  34. package/.agents/skills/research/SKILL.md +12 -0
  35. package/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
  36. package/.agents/skills/scaffold-exercises/SKILL.md +106 -0
  37. package/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
  38. package/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
  39. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
  40. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
  41. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
  42. package/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  43. package/.agents/skills/setup-pre-commit/SKILL.md +91 -0
  44. package/.agents/skills/setup-ts-deep-modules/SKILL.md +102 -0
  45. package/.agents/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +95 -0
  46. package/.agents/skills/tdd/SKILL.md +36 -0
  47. package/.agents/skills/tdd/mocking.md +59 -0
  48. package/.agents/skills/tdd/tests.md +77 -0
  49. package/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
  50. package/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  51. package/.agents/skills/teach/MISSION-FORMAT.md +31 -0
  52. package/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
  53. package/.agents/skills/teach/SKILL.md +140 -0
  54. package/.agents/skills/to-spec/SKILL.md +75 -0
  55. package/.agents/skills/to-tickets/SKILL.md +107 -0
  56. package/.agents/skills/triage/AGENT-BRIEF.md +207 -0
  57. package/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
  58. package/.agents/skills/triage/SKILL.md +112 -0
  59. package/.agents/skills/ubiquitous-language/SKILL.md +93 -0
  60. package/.agents/skills/wayfinder/SKILL.md +127 -0
  61. package/.agents/skills/wizard/SKILL.md +45 -0
  62. package/.agents/skills/wizard/template.sh +211 -0
  63. package/.agents/skills/writing-beats/SKILL.md +67 -0
  64. package/.agents/skills/writing-fragments/SKILL.md +79 -0
  65. package/.agents/skills/writing-great-skills/GLOSSARY.md +201 -0
  66. package/.agents/skills/writing-great-skills/SKILL.md +83 -0
  67. package/.agents/skills/writing-shape/SKILL.md +79 -0
  68. package/.agents/skills-lock.json +233 -0
  69. package/.agents/workflows/kickoff.md +211 -0
  70. package/README.md +63 -0
  71. package/bin/cli.js +24 -0
  72. package/package.json +28 -0
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: qa
3
+ description: Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions "QA session".
4
+ ---
5
+
6
+ # QA Session
7
+
8
+ Run an interactive QA session. The user describes problems they're encountering. You clarify, explore the codebase for context, and file GitHub issues that are durable, user-focused, and use the project's domain language.
9
+
10
+ ## For each issue the user raises
11
+
12
+ ### 1. Listen and lightly clarify
13
+
14
+ Let the user describe the problem in their own words. Ask **at most 2-3 short clarifying questions** focused on:
15
+
16
+ - What they expected vs what actually happened
17
+ - Steps to reproduce (if not obvious)
18
+ - Whether it's consistent or intermittent
19
+
20
+ Do NOT over-interview. If the description is clear enough to file, move on.
21
+
22
+ ### 2. Explore the codebase in the background
23
+
24
+ While talking to the user, kick off an Agent (subagent_type=Explore) in the background to understand the relevant area. The goal is NOT to find a fix — it's to:
25
+
26
+ - Learn the domain language used in that area (check UBIQUITOUS_LANGUAGE.md)
27
+ - Understand what the feature is supposed to do
28
+ - Identify the user-facing behavior boundary
29
+
30
+ This context helps you write a better issue — but the issue itself should NOT reference specific files, line numbers, or internal implementation details.
31
+
32
+ ### 3. Assess scope: single issue or breakdown?
33
+
34
+ Before filing, decide whether this is a **single issue** or needs to be **broken down** into multiple issues.
35
+
36
+ Break down when:
37
+
38
+ - The fix spans multiple independent areas (e.g. "the form validation is wrong AND the success message is missing AND the redirect is broken")
39
+ - There are clearly separable concerns that different people could work on in parallel
40
+ - The user describes something that has multiple distinct failure modes or symptoms
41
+
42
+ Keep as a single issue when:
43
+
44
+ - It's one behavior that's wrong in one place
45
+ - The symptoms are all caused by the same root behavior
46
+
47
+ ### 4. File the GitHub issue(s)
48
+
49
+ Create issues with `gh issue create`. Do NOT ask the user to review first — just file and share URLs.
50
+
51
+ Issues must be **durable** — they should still make sense after major refactors. Write from the user's perspective.
52
+
53
+ #### For a single issue
54
+
55
+ Use this template:
56
+
57
+ ```
58
+ ## What happened
59
+
60
+ [Describe the actual behavior the user experienced, in plain language]
61
+
62
+ ## What I expected
63
+
64
+ [Describe the expected behavior]
65
+
66
+ ## Steps to reproduce
67
+
68
+ 1. [Concrete, numbered steps a developer can follow]
69
+ 2. [Use domain terms from the codebase, not internal module names]
70
+ 3. [Include relevant inputs, flags, or configuration]
71
+
72
+ ## Additional context
73
+
74
+ [Any extra observations from the user or from codebase exploration that help frame the issue — e.g. "this only happens when using the Docker layer, not the filesystem layer" — use domain language but don't cite files]
75
+ ```
76
+
77
+ #### For a breakdown (multiple issues)
78
+
79
+ Create issues in dependency order (blockers first) so you can reference real issue numbers.
80
+
81
+ Use this template for each sub-issue:
82
+
83
+ ```
84
+ ## Parent issue
85
+
86
+ #<parent-issue-number> (if you created a tracking issue) or "Reported during QA session"
87
+
88
+ ## What's wrong
89
+
90
+ [Describe this specific behavior problem — just this slice, not the whole report]
91
+
92
+ ## What I expected
93
+
94
+ [Expected behavior for this specific slice]
95
+
96
+ ## Steps to reproduce
97
+
98
+ 1. [Steps specific to THIS issue]
99
+
100
+ ## Blocked by
101
+
102
+ - #<issue-number> (if this issue can't be fixed until another is resolved)
103
+
104
+ Or "None — can start immediately" if no blockers.
105
+
106
+ ## Additional context
107
+
108
+ [Any extra observations relevant to this slice]
109
+ ```
110
+
111
+ When creating a breakdown:
112
+
113
+ - **Prefer many thin issues over few thick ones** — each should be independently fixable and verifiable
114
+ - **Mark blocking relationships honestly** — if issue B genuinely can't be tested until issue A is fixed, say so. If they're independent, mark both as "None — can start immediately"
115
+ - **Create issues in dependency order** so you can reference real issue numbers in "Blocked by"
116
+ - **Maximize parallelism** — the goal is that multiple people (or agents) can grab different issues simultaneously
117
+
118
+ #### Rules for all issue bodies
119
+
120
+ - **No file paths or line numbers** — these go stale
121
+ - **Use the project's domain language** (check UBIQUITOUS_LANGUAGE.md if it exists)
122
+ - **Describe behaviors, not code** — "the sync service fails to apply the patch" not "applyPatch() throws on line 42"
123
+ - **Reproduction steps are mandatory** — if you can't determine them, ask the user
124
+ - **Keep it concise** — a developer should be able to read the issue in 30 seconds
125
+
126
+ After filing, print all issue URLs (with blocking relationships summarized) and ask: "Next issue, or are we done?"
127
+
128
+ ### 5. Continue the session
129
+
130
+ Keep going until the user says they're done. Each issue is independent — don't batch them.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: request-refactor-plan
3
+ description: Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.
4
+ ---
5
+
6
+ This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.
7
+
8
+ 1. Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions.
9
+
10
+ 2. Explore the repo to verify their assertions and understand the current state of the codebase.
11
+
12
+ 3. Ask whether they have considered other options, and present other options to them.
13
+
14
+ 4. Interview the user about the implementation. Be extremely detailed and thorough.
15
+
16
+ 5. Hammer out the exact scope of the implementation. Work out what you plan to change and what you plan not to change.
17
+
18
+ 6. Look in the codebase to check for test coverage of this area of the codebase. If there is insufficient test coverage, ask the user what their plans for testing are.
19
+
20
+ 7. Break the implementation into a plan of tiny commits. Remember Martin Fowler's advice to "make each refactoring step as small as possible, so that you can always see the program working."
21
+
22
+ 8. Create a GitHub issue with the refactor plan. Use the following template for the issue description:
23
+
24
+ <refactor-plan-template>
25
+
26
+ ## Problem Statement
27
+
28
+ The problem that the developer is facing, from the developer's perspective.
29
+
30
+ ## Solution
31
+
32
+ The solution to the problem, from the developer's perspective.
33
+
34
+ ## Commits
35
+
36
+ A LONG, detailed implementation plan. Write the plan in plain English, breaking down the implementation into the tiniest commits possible. Each commit should leave the codebase in a working state.
37
+
38
+ ## Decision Document
39
+
40
+ A list of implementation decisions that were made. This can include:
41
+
42
+ - The modules that will be built/modified
43
+ - The interfaces of those modules that will be modified
44
+ - Technical clarifications from the developer
45
+ - Architectural decisions
46
+ - Schema changes
47
+ - API contracts
48
+ - Specific interactions
49
+
50
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
51
+
52
+ ## Testing Decisions
53
+
54
+ A list of testing decisions that were made. Include:
55
+
56
+ - A description of what makes a good test (only test external behavior, not implementation details)
57
+ - Which modules will be tested
58
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
59
+
60
+ ## Out of Scope
61
+
62
+ A description of the things that are out of scope for this refactor.
63
+
64
+ ## Further Notes (optional)
65
+
66
+ Any further notes about the refactor.
67
+
68
+ </refactor-plan-template>
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: research
3
+ description: Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.
4
+ ---
5
+
6
+ Spin up a **background agent** to do the research, so you keep working while it reads.
7
+
8
+ Its job:
9
+
10
+ 1. Investigate the question against **primary sources** — official docs, source code, specs, first-party APIs — not a secondary write-up of them. Follow every claim back to the source that owns it.
11
+ 2. Write the findings to a single Markdown file, citing each claim's source.
12
+ 3. Save it where the repo already keeps such notes; match the existing convention, and if there is none, put it somewhere sensible and say where.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: resolving-merge-conflicts
3
+ description: "Use when you need to resolve an in-progress git merge/rebase conflict."
4
+ ---
5
+
6
+ 1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.
7
+
8
+ 2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.
9
+
10
+ 3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`.
11
+
12
+ 4. Discover the project's **automated checks** and run them — typically typecheck, then tests, then format. Fix anything the merge broke.
13
+
14
+ 5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: scaffold-exercises
3
+ description: Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
4
+ ---
5
+
6
+ # Scaffold Exercises
7
+
8
+ Create exercise directory structures that pass `pnpm ai-hero-cli internal lint`, then commit with `git commit`.
9
+
10
+ ## Directory naming
11
+
12
+ - **Sections**: `XX-section-name/` inside `exercises/` (e.g., `01-retrieval-skill-building`)
13
+ - **Exercises**: `XX.YY-exercise-name/` inside a section (e.g., `01.03-retrieval-with-bm25`)
14
+ - Section number = `XX`, exercise number = `XX.YY`
15
+ - Names are dash-case (lowercase, hyphens)
16
+
17
+ ## Exercise variants
18
+
19
+ Each exercise needs at least one of these subfolders:
20
+
21
+ - `problem/` - student workspace with TODOs
22
+ - `solution/` - reference implementation
23
+ - `explainer/` - conceptual material, no TODOs
24
+
25
+ When stubbing, default to `explainer/` unless the plan specifies otherwise.
26
+
27
+ ## Required files
28
+
29
+ Each subfolder (`problem/`, `solution/`, `explainer/`) needs a `readme.md` that:
30
+
31
+ - Is **not empty** (must have real content, even a single title line works)
32
+ - Has no broken links
33
+
34
+ When stubbing, create a minimal readme with a title and a description:
35
+
36
+ ```md
37
+ # Exercise Title
38
+
39
+ Description here
40
+ ```
41
+
42
+ If the subfolder has code, it also needs a `main.ts` (>1 line). But for stubs, a readme-only exercise is fine.
43
+
44
+ ## Workflow
45
+
46
+ 1. **Parse the plan** - extract section names, exercise names, and variant types
47
+ 2. **Create directories** - `mkdir -p` for each path
48
+ 3. **Create stub readmes** - one `readme.md` per variant folder with a title
49
+ 4. **Run lint** - `pnpm ai-hero-cli internal lint` to validate
50
+ 5. **Fix any errors** - iterate until lint passes
51
+
52
+ ## Lint rules summary
53
+
54
+ The linter (`pnpm ai-hero-cli internal lint`) checks:
55
+
56
+ - Each exercise has subfolders (`problem/`, `solution/`, `explainer/`)
57
+ - At least one of `problem/`, `explainer/`, or `explainer.1/` exists
58
+ - `readme.md` exists and is non-empty in the primary subfolder
59
+ - No `.gitkeep` files
60
+ - No `speaker-notes.md` files
61
+ - No broken links in readmes
62
+ - No `pnpm run exercise` commands in readmes
63
+ - `main.ts` required per subfolder unless it's readme-only
64
+
65
+ ## Moving/renaming exercises
66
+
67
+ When renumbering or moving exercises:
68
+
69
+ 1. Use `git mv` (not `mv`) to rename directories - preserves git history
70
+ 2. Update the numeric prefix to maintain order
71
+ 3. Re-run lint after moves
72
+
73
+ Example:
74
+
75
+ ```bash
76
+ git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings
77
+ ```
78
+
79
+ ## Example: stubbing from a plan
80
+
81
+ Given a plan like:
82
+
83
+ ```
84
+ Section 05: Memory Skill Building
85
+ - 05.01 Introduction to Memory
86
+ - 05.02 Short-term Memory (explainer + problem + solution)
87
+ - 05.03 Long-term Memory
88
+ ```
89
+
90
+ Create:
91
+
92
+ ```bash
93
+ mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
94
+ mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
95
+ mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer
96
+ ```
97
+
98
+ Then create readme stubs:
99
+
100
+ ```
101
+ exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
102
+ exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
103
+ exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
104
+ exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
105
+ exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"
106
+ ```
@@ -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/` — 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/`. 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`, `to-spec`, and `qa` read from and write to it — they need to know whether to call `gh issue create`, write a markdown file under `.scratch/`, or follow some other workflow you describe. Pick the place you actually track work for this repo.
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) — 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,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 PRDs 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 PRDs 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 (you may know a spec as a PRD) 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`.
@@ -0,0 +1,15 @@
1
+ # Triage Labels
2
+
3
+ The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
+
5
+ | Label in mattpocock/skills | Label in our tracker | Meaning |
6
+ | -------------------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
+
13
+ When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
+
15
+ Edit the right-hand column to match whatever vocabulary you actually use.