@agentshouse/kit 0.2.1-cf110d15f69c8 → 0.2.1-cfb7b543f2af6

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 (84) hide show
  1. package/README.md +11 -10
  2. package/dist/agents.js +72 -6
  3. package/dist/api.js +5 -1
  4. package/dist/bootstrap.json +4 -4
  5. package/dist/chatgpt.js +32 -0
  6. package/dist/clis.js +10 -3
  7. package/dist/conversations.js +11 -1
  8. package/dist/copies.js +18 -8
  9. package/dist/end.js +4 -0
  10. package/dist/files.js +7 -1
  11. package/dist/git.js +11 -8
  12. package/dist/home.js +41 -4
  13. package/dist/house-cli.js +291 -0
  14. package/dist/house-main.js +7 -206
  15. package/dist/instructions.js +2 -27
  16. package/dist/kit-cli.js +68 -0
  17. package/dist/kit-main.js +8 -22
  18. package/dist/login.js +36 -27
  19. package/dist/placement.js +48 -0
  20. package/dist/relay.js +1 -1
  21. package/dist/resident.js +8 -4
  22. package/dist/skills.js +81 -12
  23. package/dist/stream.js +62 -13
  24. package/dist/transcription.js +3 -3
  25. package/dist/update.js +28 -6
  26. package/dist/wire.js +6 -0
  27. package/how-we-work.md +13 -3
  28. package/package.json +2 -1
  29. package/skills/ask-matt/SKILL.md +17 -11
  30. package/skills/ask-matt/agents/openai.yaml +1 -0
  31. package/skills/code-review/SKILL.md +5 -5
  32. package/skills/codebase-design/DESIGN-IT-TWICE.md +1 -1
  33. package/skills/codebase-design/SKILL.md +0 -2
  34. package/skills/diagnosing-bugs/SKILL.md +2 -4
  35. package/skills/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +10 -10
  36. package/skills/domain-modeling/SKILL.md +12 -14
  37. package/skills/grill-me/SKILL.md +1 -2
  38. package/skills/grill-me/agents/openai.yaml +1 -0
  39. package/skills/grill-with-docs/SKILL.md +1 -2
  40. package/skills/grill-with-docs/agents/openai.yaml +1 -0
  41. package/skills/grilling/SKILL.md +2 -2
  42. package/skills/handoff/SKILL.md +2 -3
  43. package/skills/handoff/agents/openai.yaml +1 -0
  44. package/skills/implement/SKILL.md +5 -4
  45. package/skills/implement/agents/openai.yaml +1 -0
  46. package/skills/implement-spec/SKILL.md +40 -0
  47. package/skills/implement-spec/agents/openai.yaml +5 -0
  48. package/skills/improve-codebase-architecture/SKILL.md +6 -7
  49. package/skills/improve-codebase-architecture/agents/openai.yaml +1 -0
  50. package/skills/pr/CREDITS.md +3 -0
  51. package/skills/pr/LICENSE +21 -0
  52. package/skills/pr/SKILL.md +170 -0
  53. package/skills/pr/agents/openai.yaml +3 -0
  54. package/skills/prototype/SKILL.md +0 -2
  55. package/skills/research/SKILL.md +0 -2
  56. package/skills/retro/LICENSE +21 -0
  57. package/skills/retro/SKILL.md +44 -0
  58. package/skills/retro/agents/openai.yaml +5 -0
  59. package/skills/tdd/SKILL.md +2 -4
  60. package/skills/teach/SKILL.md +3 -4
  61. package/skills/teach/agents/openai.yaml +1 -0
  62. package/skills/to-questionnaire/SKILL.md +1 -2
  63. package/skills/to-questionnaire/agents/openai.yaml +1 -0
  64. package/skills/to-spec/SKILL.md +1 -2
  65. package/skills/to-spec/agents/openai.yaml +1 -0
  66. package/skills/to-tickets/SKILL.md +3 -4
  67. package/skills/to-tickets/agents/openai.yaml +1 -0
  68. package/skills/triage/AGENT-BRIEF.md +207 -0
  69. package/skills/triage/LICENSE +21 -0
  70. package/skills/triage/OUT-OF-SCOPE.md +105 -0
  71. package/skills/triage/SKILL.md +112 -0
  72. package/skills/triage/agents/openai.yaml +5 -0
  73. package/skills/wait-what/SKILL.md +2 -3
  74. package/skills/wait-what/agents/openai.yaml +1 -0
  75. package/skills/wayfinder/SKILL.md +5 -6
  76. package/skills/wayfinder/agents/openai.yaml +1 -0
  77. package/skills/wizard/LICENSE +21 -0
  78. package/skills/wizard/SKILL.md +44 -0
  79. package/skills/wizard/agents/openai.yaml +3 -0
  80. package/skills/wizard/template.sh +223 -0
  81. package/skills/writing-for-agents/SKILL.md +0 -2
  82. package/skills/resolving-merge-conflicts/SKILL.md +0 -16
  83. package/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
  84. /package/skills/{resolving-merge-conflicts → implement-spec}/LICENSE +0 -0
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: pr
3
+ description: "Use when writing a PR body."
4
+ metadata:
5
+ credits:
6
+ skill: show-me
7
+ author: Dex Horthy
8
+ organisation: Humanlayer
9
+ url: "https://github.com/humanlayer/skills/blob/main/plugins/show-me/skills/show-me/SKILL.md"
10
+ ---
11
+
12
+ Use this template for writing the PR body:
13
+
14
+ ```markdown
15
+ ## Summary
16
+
17
+ <diagram, diff-sketch, or tree>
18
+
19
+ ## Evidence
20
+
21
+ - **Before:** <screenshot/output/failing test run>
22
+ **After:** <screenshot/output/passing test run>
23
+
24
+ ## Merge Danger
25
+
26
+ **Door:** <one-way or two-way>
27
+
28
+ <optional: description>
29
+
30
+ **Blast Radius:** <one-word description>
31
+
32
+ <optional: potential ramifications of merge>
33
+ ```
34
+
35
+ ## Sections
36
+
37
+ Skip all preambles and keep prose brief. Use the user's domain language from `GLOSSARY.md`.
38
+
39
+ ### Summary
40
+
41
+ Pick the smallest view that makes the key point clear.
42
+
43
+ - Show logic or an algorithm as pseudocode:
44
+
45
+ ```text
46
+ on(save)
47
+ if content is unchanged
48
+ return cached result
49
+ write new content
50
+ return fresh result
51
+ ```
52
+
53
+ - Show runtime control flow as a call tree:
54
+
55
+ ```text
56
+ submitForm
57
+ createSession
58
+ persistPrompt
59
+ launchAgent
60
+ navigateToSession
61
+ ```
62
+
63
+ - Show UI structure as a component tree, including state and module boundaries that matter:
64
+
65
+ ```text
66
+ <SessionPage> (apps/example/src/routes/session.tsx)
67
+ useSessionEvents()
68
+ <SessionToolbar>
69
+ <RunSkillButton> (packages/ui)
70
+ ```
71
+
72
+ - Show file responsibility or a broad refactor as a shallow file tree:
73
+
74
+ ```text
75
+ src/
76
+ ├── commands/ # parses user actions
77
+ ├── sessions/ # owns session state
78
+ └── transport/ # sends API requests
79
+ ```
80
+
81
+ - Show component interaction, control flow, or data flow with Mermaid:
82
+
83
+ ```mermaid
84
+ sequenceDiagram
85
+ participant User
86
+ participant UI
87
+ participant Daemon
88
+ User->>UI: choose command
89
+ UI->>Daemon: send expanded prompt
90
+ Daemon-->>UI: stream result
91
+ ```
92
+
93
+ - Use `diff` when the point is what changes and the surrounding shape already exists. Match the diff shape to the topic.
94
+
95
+ For a component change:
96
+
97
+ ```diff
98
+ <SessionPage>
99
+ useSessionEvents()
100
+ <SessionToolbar>
101
+ + <RunSkillButton />
102
+ <SessionTimeline>
103
+ + <SkillResultCard />
104
+ ```
105
+
106
+ For a file-layout change:
107
+
108
+ ```diff
109
+ src/
110
+ ├── commands/
111
+ +│ └── show-me.ts # expands the slash command
112
+ ├── sessions/
113
+ -└── transport.ts
114
+ +└── transport/
115
+ + ├── client.ts
116
+ + └── stream.ts
117
+ ```
118
+
119
+ For a call-tree or call-stack change:
120
+
121
+ ```diff
122
+ submitForm
123
+ createSession
124
+ persistPrompt
125
+ + expandSkillMention
126
+ launchAgent
127
+ - navigateToSession
128
+ + navigateToSession
129
+ + subscribeToEvents
130
+ ```
131
+
132
+ For a state or control-flow change:
133
+
134
+ ```diff
135
+ on(save)
136
+ - write content
137
+ + if content is unchanged
138
+ + return cached result
139
+ + write new content
140
+ + invalidate cache
141
+ ```
142
+
143
+ - Show the whole block when most of it is new, when omitted context would hide ownership or order, or when the user needs a copyable target shape:
144
+
145
+ ```ts
146
+ function expandSkill(command: string): string {
147
+ const skillName = command.slice(1);
148
+ return `use the ${skillName} skill`;
149
+ }
150
+ ```
151
+
152
+ #### Guidance
153
+
154
+ Place each visual next to the short text it supports. Keep only the calls, files, props, states, and boundaries needed to answer the user's current question or the options to resolve the current discussion point.
155
+
156
+ You may use one of these, you may use several, it is unlikely you will use all of them. Use your judgement and don't overwhelm the user.
157
+
158
+ ### Evidence
159
+
160
+ Concrete evidence that the change works. Show a before and after.
161
+
162
+ Screenshots are S-tier - when the environment is set up for it and the change is visual.
163
+
164
+ Execution-based evidence is A-tier. Test results, console output. Show the exact test that now fails and passes, using pseudocode.
165
+
166
+ ### Merge Danger
167
+
168
+ Describe whether it's a one-way or two-way door. You can walk back through two-way doors, but not one-way doors. A PR that is cheap to roll back is lower risk. Changes that involve destructive actions or hard-to-reverse decisions are one-way doors.
169
+
170
+ The blast radius is the potential impact or scope of the changes introduced by this PR. Consider all possibilities. Examples are layout shift, breakages for consumers, mobile responsiveness, etc.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "PR"
3
+ short_description: "Write a PR body that's fast to review"
@@ -3,8 +3,6 @@ name: prototype
3
3
  description: Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
4
4
  ---
5
5
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/prototype). MIT licensed — see LICENSE in this directory. -->
7
-
8
6
  # Prototype
9
7
 
10
8
  A prototype is **throwaway code that answers a question**. The question decides the shape.
@@ -3,8 +3,6 @@ name: research
3
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
4
  ---
5
5
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/research). MIT licensed — see LICENSE in this directory. -->
7
-
8
6
  Spin up a **background agent** to do the research, so you keep working while it reads.
9
7
 
10
8
  Its job:
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Matt Pocock
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: retro
3
+ description: "Conduct a retrospective on a coding session."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ The user has asked for a **retrospective**. You are suggesting improvements to the coding agent's **environment** to improve future runs.
8
+
9
+ ## Steps
10
+
11
+ 1. Call the Skill tool with `writing-for-agents` for the writing style guide.
12
+
13
+ 2. Read the primary sources for the session the user specifies. This may mean searching through session logs on this machine. If the user doesn't specify a session, default to the current one.
14
+
15
+ 3. Look for candidates for improvement in these categories.
16
+
17
+ - **Navigation**: how easy was it for the agent to find the right files? Are there hidden dependencies between files? Would a **navigation pointer** make it easier? _Use when_ the session took a long time to find a piece of information.
18
+ - **Automated checks**: are there automated checks that could catch errors the agent made? Linting, typing, tests, filesystem linters? Read the repo's own check command first (its `package.json`/build-tool `lint`/`check` scripts, its CI workflow), so a check that already exists but sits unwired or silently broken is the finding, not a reinvention. A repo with no **guardrail** (no pre-commit hook and no CI job running its lint/typecheck/test command) is itself a finding: an un-linted repo is a standing missed opportunity, not a neutral default. _Use when_ the agent made a mistake an automated check could have caught, or the repo has no guardrail at all.
19
+ - **Coding standards**: should the **reviewer agent** be given a new rule to enforce? Should an existing rule be removed or clarified? Classify the violation first: a **mechanical** one (a fixed syntactic pattern, a banned API, an import shape, a file-location rule) gets a deterministic check, full stop: a custom rule in the repo's own linter, a new pre-commit hook, or a new CI job, whichever the repo's language and existing guardrail make cheapest. Default to building the check over writing the rule. Reserve `CODING_STANDARDS.md` for genuine **judgement calls** (cross-file consistency, "matches the surrounding style," anything no guardrail could ever substitute for). _Use when_ the reviewer agent failed to catch a mistake.
20
+ - **Global AGENTS.md**: are there any steering instructions that should be moved to coding standards (or automated checks) instead? _Use when_ the AGENTS.md file is particularly large - in the repo OR the user's global scope.
21
+ - **Tool economy**: did the agent make expensive tool calls that could be streamlined? Is there any custom tooling (CLI's, MCP's) that is particularly token-inefficient? _Use when_ the agent made an expensive tool call.
22
+ - **No-ops**: look for instructions in steering files that don't modify the agent's behavior. _Use when_ the steering files are large and unwieldy.
23
+ - **Information access**: look for opportunities to increase the agent's access to information. Teeing dev server logs, readonly access to third-party services. _Use when_ a crucial piece of information was not available to the agent.
24
+
25
+ 4. Present these candidates to the user, in order of severity.
26
+
27
+ ## Reference
28
+
29
+ ### Implementation vs Review
30
+
31
+ Remember that all work goes through two stages: implementation and review. The implementation agent has the most **context pressure**. They are responsible for exploration, writing code, and debugging failures.
32
+
33
+ The review agent has the least context pressure - it receives a diff, so no exploration needed. It often does not need to write code or debug.
34
+
35
+ This means that the review agent should be responsible for imposing coding standards, not the implementation agent.
36
+
37
+ ### Files
38
+
39
+ You have access to several files in the repo:
40
+
41
+ - `CLAUDE.md`/`AGENTS.md`: these files are pushed to the context window of any agent working in this repo. They should be used incredibly sparingly, usually only for **navigation pointers** to other files.
42
+ - `CODING_STANDARDS.md`: this file is read during review, not implementation. Add **navigation pointers** to docs folders if the standards file gets more than 1,000 lines long.
43
+ - Docs: use docs as references files, pointed to by other files. Look for existing docs before writing new ones.
44
+ - Skills: use skills for docs (since their description goes into the agent's context window), or for user-invoked commands. Follow the advice in the `writing-for-agents` skill.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Retro"
3
+ short_description: "Conduct a retrospective on a coding session."
4
+ policy:
5
+ allow_implicit_invocation: false
@@ -3,13 +3,11 @@ name: tdd
3
3
  description: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
4
4
  ---
5
5
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/tdd). MIT licensed — see LICENSE in this directory. -->
7
-
8
6
  # Test-Driven Development
9
7
 
10
8
  TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle: consult them before and during the loop, not after.
11
9
 
12
- When exploring the codebase, read `CONTEXT.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
10
+ When exploring the codebase, read `GLOSSARY.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
13
11
 
14
12
  ## What a good test is
15
13
 
@@ -23,7 +21,7 @@ A **seam** is the public boundary you test at: the interface where you observe b
23
21
 
24
22
  **Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.
25
23
 
26
- Ask: "What's the public interface, and which seams should we test?"
24
+ Ask: "What's the public interface, and which seams should we test?" Give each proposed seam a one-line note on what it catches and what it misses.
27
25
 
28
26
  When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), call the Skill tool with "codebase-design" for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run.
29
27
 
@@ -1,16 +1,15 @@
1
1
  ---
2
2
  name: teach
3
3
  description: Teach the user a new skill or concept, within this workspace.
4
+ disable-model-invocation: true
4
5
  argument-hint: "What would you like to learn about?"
5
6
  ---
6
7
 
7
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/productivity/teach). MIT licensed — see LICENSE in this directory. -->
8
-
9
8
  The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.
10
9
 
11
10
  ## Teaching Workspace
12
11
 
13
- Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:
12
+ Treat the current directory as a teaching workspace. Workspace paths (`./lessons/` and the rest) resolve from the directory `/teach` was run in; only the `*-FORMAT.md` links resolve from this skill's folder. The state of their learning is captured in this directory in several files:
14
13
 
15
14
  - `MISSION.md`: A document capturing the _reason_ the user is interested in the topic. This should be used to ground all teaching. Use the format in [MISSION-FORMAT.md](./MISSION-FORMAT.md).
16
15
  - `./reference/*.html`: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
@@ -108,7 +107,7 @@ For skill acquisition, difficulty is the tool. Effortful retrieval is what build
108
107
 
109
108
  Each of these should be based on a **feedback loop**, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.
110
109
 
111
- For quizzes, each answer should be exactly the same number of words (and characters, if possible). Don't give the user any clues about the answer through formatting.
110
+ For quizzes, each answer should be exactly the same number of words (and characters, if possible). Vary which position holds the correct answer across questions. Don't give the user any clues about the answer through formatting or order.
112
111
 
113
112
  ## Acquiring Wisdom
114
113
 
@@ -2,3 +2,4 @@ interface:
2
2
  display_name: "Teach"
3
3
  short_description: "Learn a concept in a guided workspace"
4
4
  policy:
5
+ allow_implicit_invocation: false
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  name: to-questionnaire
3
3
  description: Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/productivity/to-questionnaire). MIT licensed — see LICENSE in this directory. -->
7
-
8
7
  Turn something the user can't answer alone into a **questionnaire**: a Markdown document they hand to one person to fill in async, or fill out together over a meeting. The recipient holds knowledge the user lacks; the questionnaire pulls it out of them.
9
8
 
10
9
  **Grill the send, not the subject.** Interview the user only about the _send_, which they can always answer: who it goes to, and what they need back. The questions in the document then target the **gap** between what the recipient knows and what the user needs.
@@ -2,3 +2,4 @@ interface:
2
2
  display_name: "To Questionnaire"
3
3
  short_description: "Front-load questions into a doc for someone to answer"
4
4
  policy:
5
+ allow_implicit_invocation: false
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  name: to-spec
3
3
  description: "Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed."
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/to-spec). MIT licensed — see LICENSE in this directory. -->
7
-
8
7
  This skill takes the current conversation context and codebase understanding and produces a spec. Do NOT interview the user; just synthesize what you already know.
9
8
 
10
9
  The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
@@ -2,3 +2,4 @@ interface:
2
2
  display_name: "To Spec"
3
3
  short_description: "Turn a conversation into a spec"
4
4
  policy:
5
+ allow_implicit_invocation: false
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  name: to-tickets
3
3
  description: Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/to-tickets). MIT licensed — see LICENSE in this directory. -->
7
-
8
7
  # To Tickets
9
8
 
10
9
  Break a plan, spec, or conversation into a set of **tickets**: tracer-bullet vertical slices, each declaring the tickets that **block** it.
@@ -61,7 +60,7 @@ Iterate until the user approves the breakdown.
61
60
  Publish the approved tickets. **How** depends on the tracker `/setup-matt-pocock-skills` configured; the tickets are the same either way, only the shape of the blocking edges changes:
62
61
 
63
62
  - **Local files** → write one file per ticket under `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` in dependency order (blockers first). Each file's "Blocked by" lists the numbers/titles it depends on. Use the per-ticket file template below: one ticket per file, never a single combined file.
64
- - **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking / sub-issue relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. Apply the `ready-for-agent` triage label unless instructed otherwise; the tickets are agent-grabbable by construction.
63
+ - **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. If the source was an existing issue, make each ticket its sub-issue (tracker doc's operation). Apply the `ready-for-agent` triage label unless instructed otherwise; the tickets are agent-grabbable by construction.
65
64
 
66
65
  Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.
67
66
 
@@ -99,7 +98,7 @@ The end-to-end behaviour this ticket makes work, from the user's perspective, no
99
98
 
100
99
  ## Blocked by
101
100
 
102
- - A reference to each blocking ticket, or "None (can start immediately)".
101
+ - A reference to each blocking ticket, or "None (can start immediately)". Omit this section when blockers were set as native edges.
103
102
 
104
103
  </issue-template>
105
104
 
@@ -2,3 +2,4 @@ interface:
2
2
  display_name: "To Tickets"
3
3
  short_description: "Split a plan into tracer-bullet tickets"
4
4
  policy:
5
+ allow_implicit_invocation: false
@@ -0,0 +1,207 @@
1
+ # Writing Agent Briefs
2
+
3
+ An agent brief is a structured comment posted on a GitHub issue or PR when it moves to `ready-for-agent`. It is the authoritative specification that an AFK agent will work from. The original body and discussion are context: the agent brief is the contract.
4
+
5
+ The brief states **what the agent should do**, which stretches to both surfaces: for an issue, that's building the change from nothing; for a PR, it's what's left to do *to the existing diff*: finish it, close gaps, address review points. Same principles either way; the PR example below shows the difference.
6
+
7
+ ## Principles
8
+
9
+ ### Durability over precision
10
+
11
+ The issue may sit in `ready-for-agent` for days or weeks. The codebase will change in the meantime. Write the brief so it stays useful even as files are renamed, moved, or refactored.
12
+
13
+ - **Do** describe interfaces, types, and behavioral contracts
14
+ - **Do** name specific types, function signatures, or config shapes that the agent should look for or modify
15
+ - **Don't** reference file paths: they go stale
16
+ - **Don't** reference line numbers
17
+ - **Don't** assume the current implementation structure will remain the same
18
+
19
+ ### Behavioral, not procedural
20
+
21
+ Describe **what** the system should do, not **how** to implement it. The agent will explore the codebase fresh and make its own implementation decisions.
22
+
23
+ - **Good:** "The `SkillConfig` type should accept an optional `schedule` field of type `CronExpression`"
24
+ - **Bad:** "Open src/types/skill.ts and add a schedule field on line 42"
25
+ - **Good:** "When a user runs `/triage` with no arguments, they should see a summary of issues needing attention"
26
+ - **Bad:** "Add a switch statement in the main handler function"
27
+
28
+ ### Complete acceptance criteria
29
+
30
+ The agent needs to know when it's done. Every agent brief must have concrete, testable acceptance criteria. Each criterion should be independently verifiable.
31
+
32
+ - **Good:** "Running `gh issue list --label needs-triage` returns issues that have been through initial classification"
33
+ - **Bad:** "Triage should work correctly"
34
+
35
+ ### Explicit scope boundaries
36
+
37
+ State what is out of scope. This prevents the agent from gold-plating or making assumptions about adjacent features.
38
+
39
+ ## Template
40
+
41
+ ```markdown
42
+ ## Agent Brief
43
+
44
+ **Category:** bug / enhancement
45
+ **Summary:** one-line description of what needs to happen
46
+
47
+ **Current behavior:**
48
+ Describe what happens now. For bugs, this is the broken behavior.
49
+ For enhancements, this is the status quo the feature builds on.
50
+
51
+ **Desired behavior:**
52
+ Describe what should happen after the agent's work is complete.
53
+ Be specific about edge cases and error conditions.
54
+
55
+ **Key interfaces:**
56
+ - `TypeName`: what needs to change and why
57
+ - `functionName()` return type: what it currently returns vs what it should return
58
+ - Config shape: any new configuration options needed
59
+
60
+ **Acceptance criteria:**
61
+ - [ ] Specific, testable criterion 1
62
+ - [ ] Specific, testable criterion 2
63
+ - [ ] Specific, testable criterion 3
64
+
65
+ **Out of scope:**
66
+ - Thing that should NOT be changed or addressed in this issue
67
+ - Adjacent feature that might seem related but is separate
68
+ ```
69
+
70
+ ## Examples
71
+
72
+ ### Good agent brief (bug)
73
+
74
+ ```markdown
75
+ ## Agent Brief
76
+
77
+ **Category:** bug
78
+ **Summary:** Skill description truncation drops mid-word, producing broken output
79
+
80
+ **Current behavior:**
81
+ When a skill description exceeds 1024 characters, it is truncated at exactly
82
+ 1024 characters regardless of word boundaries. This produces descriptions
83
+ that end mid-word (e.g. "Use when the user wants to confi").
84
+
85
+ **Desired behavior:**
86
+ Truncation should break at the last word boundary before 1024 characters
87
+ and append "..." to indicate truncation.
88
+
89
+ **Key interfaces:**
90
+ - The `SkillMetadata` type's `description` field: no type change needed,
91
+ but the validation/processing logic that populates it needs to respect
92
+ word boundaries
93
+ - Any function that reads SKILL.md frontmatter and extracts the description
94
+
95
+ **Acceptance criteria:**
96
+ - [ ] Descriptions under 1024 chars are unchanged
97
+ - [ ] Descriptions over 1024 chars are truncated at the last word boundary
98
+ before 1024 chars
99
+ - [ ] Truncated descriptions end with "..."
100
+ - [ ] The total length including "..." does not exceed 1024 chars
101
+
102
+ **Out of scope:**
103
+ - Changing the 1024 char limit itself
104
+ - Multi-line description support
105
+ ```
106
+
107
+ ### Good agent brief (enhancement)
108
+
109
+ ```markdown
110
+ ## Agent Brief
111
+
112
+ **Category:** enhancement
113
+ **Summary:** Add `.out-of-scope/` directory support for tracking rejected feature requests
114
+
115
+ **Current behavior:**
116
+ When a feature request is rejected, the issue is closed with a `wontfix` label
117
+ and a comment. There is no persistent record of the decision or reasoning.
118
+ Future similar requests require the maintainer to recall or search for the
119
+ prior discussion.
120
+
121
+ **Desired behavior:**
122
+ Rejected feature requests should be documented in `.out-of-scope/<concept>.md`
123
+ files that capture the decision, reasoning, and links to all issues that
124
+ requested the feature. When triaging new issues, these files should be
125
+ checked for matches.
126
+
127
+ **Key interfaces:**
128
+ - Markdown file format in `.out-of-scope/`: each file should have a
129
+ `# Concept Name` heading, a `**Decision:**` line, a `**Reason:**` line,
130
+ and a `**Prior requests:**` list with issue links
131
+ - The triage workflow should read all `.out-of-scope/*.md` files early
132
+ and match incoming issues against them by concept similarity
133
+
134
+ **Acceptance criteria:**
135
+ - [ ] Closing a feature as wontfix creates/updates a file in `.out-of-scope/`
136
+ - [ ] The file includes the decision, reasoning, and link to the closed issue
137
+ - [ ] If a matching `.out-of-scope/` file already exists, the new issue is
138
+ appended to its "Prior requests" list rather than creating a duplicate
139
+ - [ ] During triage, existing `.out-of-scope/` files are checked and surfaced
140
+ when a new issue matches a prior rejection
141
+
142
+ **Out of scope:**
143
+ - Automated matching (human confirms the match)
144
+ - Reopening previously rejected features
145
+ - Bug reports (only enhancement rejections go to `.out-of-scope/`)
146
+ ```
147
+
148
+ ### Good agent brief (PR)
149
+
150
+ For a PR, "Current behavior" describes the state of the diff, and the brief asks the agent to finish or fix it rather than build from scratch.
151
+
152
+ ```markdown
153
+ ## Agent Brief
154
+
155
+ **Category:** enhancement
156
+ **Summary:** Finish the contributor's `--json` output flag for `triage list`
157
+
158
+ **Current behavior:**
159
+ The PR adds a `--json` flag that serializes the issue list to JSON. The happy
160
+ path works and the diff matches the project's command structure. Two gaps
161
+ remain: errors are still printed as human text (not JSON), and the new flag has
162
+ no test coverage.
163
+
164
+ **Desired behavior:**
165
+ With `--json`, all output (including errors) is well-formed JSON on stdout,
166
+ and the command's exit codes are unchanged. The existing human-readable output
167
+ is untouched when the flag is absent.
168
+
169
+ **Key interfaces:**
170
+ - The command's error path should emit `{ "error": string }` under `--json`
171
+ instead of the plain-text error
172
+ - Reuse the existing serializer the PR already added; don't introduce a second
173
+
174
+ **Acceptance criteria:**
175
+ - [ ] `triage list --json` emits valid JSON for both success and error cases
176
+ - [ ] Exit codes match the non-JSON command
177
+ - [ ] A test covers the `--json` success output and one error case
178
+ - [ ] Default (non-JSON) output is byte-for-byte unchanged
179
+
180
+ **Out of scope:**
181
+ - Adding `--json` to any other command
182
+ - Changing the JSON shape of the success payload the PR already defined
183
+ ```
184
+
185
+ ### Bad agent brief
186
+
187
+ ```markdown
188
+ ## Agent Brief
189
+
190
+ **Summary:** Fix the triage bug
191
+
192
+ **What to do:**
193
+ The triage thing is broken. Look at the main file and fix it.
194
+ The function around line 150 has the issue.
195
+
196
+ **Files to change:**
197
+ - src/triage/handler.ts (line 150)
198
+ - src/types.ts (line 42)
199
+ ```
200
+
201
+ This is bad because:
202
+ - No category
203
+ - Vague description ("the triage thing is broken")
204
+ - References file paths and line numbers that will go stale
205
+ - No acceptance criteria
206
+ - No scope boundaries
207
+ - No description of current vs desired behavior
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Matt Pocock
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.