@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,105 @@
1
+ # Out-of-Scope Knowledge Base
2
+
3
+ The `.out-of-scope/` directory in a repo stores persistent records of rejected feature requests. It serves two purposes:
4
+
5
+ 1. **Institutional memory**: why a feature was rejected, so the reasoning isn't lost when the issue is closed
6
+ 2. **Deduplication**: when a new issue comes in that matches a prior rejection, the skill can surface the previous decision instead of re-litigating it
7
+
8
+ ## Directory structure
9
+
10
+ ```
11
+ .out-of-scope/
12
+ ├── dark-mode.md
13
+ ├── plugin-system.md
14
+ └── graphql-api.md
15
+ ```
16
+
17
+ One file per **concept**, not per issue. Multiple issues requesting the same thing are grouped under one file.
18
+
19
+ ## File format
20
+
21
+ The file should be written in a relaxed, readable style, more like a short design document than a database entry. Use paragraphs, code samples, and examples to make the reasoning clear and useful to someone encountering it for the first time.
22
+
23
+ ```markdown
24
+ # Dark Mode
25
+
26
+ This project does not support dark mode or user-facing theming.
27
+
28
+ ## Why this is out of scope
29
+
30
+ The rendering pipeline assumes a single color palette defined in
31
+ `ThemeConfig`. Supporting multiple themes would require:
32
+
33
+ - A theme context provider wrapping the entire component tree
34
+ - Per-component theme-aware style resolution
35
+ - A persistence layer for user theme preferences
36
+
37
+ This is a significant architectural change that doesn't align with the
38
+ project's focus on content authoring. Theming is a concern for downstream
39
+ consumers who embed or redistribute the output.
40
+
41
+ ```ts
42
+ // The current ThemeConfig interface is not designed for runtime switching:
43
+ interface ThemeConfig {
44
+ colors: ColorPalette; // single palette, resolved at build time
45
+ fonts: FontStack;
46
+ }
47
+ ```
48
+
49
+ ## Prior requests
50
+
51
+ - #42: "Add dark mode support"
52
+ - #87: "Night theme for accessibility"
53
+ - #134: "Dark theme option"
54
+ ```
55
+
56
+ ### Naming the file
57
+
58
+ Use a short, descriptive kebab-case name for the concept: `dark-mode.md`, `plugin-system.md`, `graphql-api.md`. The name should be recognizable enough that someone browsing the directory understands what was rejected without opening the file.
59
+
60
+ ### Writing the reason
61
+
62
+ The reason should be substantive: not "we don't want this" but why. Good reasons reference:
63
+
64
+ - Project scope or philosophy ("This project focuses on X; theming is a downstream concern")
65
+ - Technical constraints ("Supporting this would require Y, which conflicts with our Z architecture")
66
+ - Strategic decisions ("We chose to use A instead of B because...")
67
+
68
+ The reason should be durable. Avoid referencing temporary circumstances ("we're too busy right now"); those aren't real rejections, they're deferrals.
69
+
70
+ ## When to check `.out-of-scope/`
71
+
72
+ During triage (Step 1: Gather context), read all files in `.out-of-scope/`. When evaluating a new issue:
73
+
74
+ - Check if the request matches an existing out-of-scope concept
75
+ - Matching is by concept similarity, not keyword: "night theme" matches `dark-mode.md`
76
+ - If there's a match, surface it to the maintainer: "This is similar to `.out-of-scope/dark-mode.md`. We rejected this before because [reason]. Do you still feel the same way?"
77
+
78
+ The maintainer may:
79
+
80
+ - **Confirm**: the new issue gets added to the existing file's "Prior requests" list, then closed
81
+ - **Reconsider**: the out-of-scope file gets deleted or updated, and the issue proceeds through normal triage
82
+ - **Disagree**: the issues are related but distinct, proceed with normal triage
83
+
84
+ ## When to write to `.out-of-scope/`
85
+
86
+ Only when an **enhancement** (not a bug) is *rejected* as `wontfix`. This applies to enhancement PRs exactly as it does to issues: a rejected PR is recorded here so the same request doesn't return as fresh code.
87
+
88
+ Do **not** write here when something is closed as `wontfix` because it's **already implemented**. That's a built feature, not a rejected one; recording it would poison the dedup checks with false rejections. Instead, the closing comment points to where the feature already lives.
89
+
90
+ The flow:
91
+
92
+ 1. Maintainer decides a feature request is out of scope
93
+ 2. Check if a matching `.out-of-scope/` file already exists
94
+ 3. If yes: append the new issue to the "Prior requests" list
95
+ 4. If no: create a new file with the concept name, decision, reason, and first prior request
96
+ 5. Post a comment on the issue explaining the decision and mentioning the `.out-of-scope/` file
97
+ 6. Close the issue with the `wontfix` label
98
+
99
+ ## Updating or removing out-of-scope files
100
+
101
+ If the maintainer changes their mind about a previously rejected concept:
102
+
103
+ - Delete the `.out-of-scope/` file
104
+ - The skill does not need to reopen old issues; they're historical records
105
+ - The new issue that triggered the reconsideration proceeds through normal triage
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: triage
3
+ description: Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Triage
8
+
9
+ Move issues on the project issue tracker through a small state machine of triage roles.
10
+
11
+ If this repo treats external pull requests as a request surface (see the issue-tracker config), triage covers them too: **a PR is an issue with attached code**, using the same roles, same states, and same machine, with a few deltas marked "for a PR" below. Resolve a bare `#42` to an issue or PR per the tracker config.
12
+
13
+ Every comment or issue posted to the issue tracker during triage **must** start with this disclaimer:
14
+
15
+ ```
16
+ > *This was generated by AI during triage.*
17
+ ```
18
+
19
+ ## Reference docs
20
+
21
+ - [AGENT-BRIEF.md](AGENT-BRIEF.md): how to write durable agent briefs
22
+ - [OUT-OF-SCOPE.md](OUT-OF-SCOPE.md): how the `.out-of-scope/` knowledge base works
23
+
24
+ ## Roles
25
+
26
+ Two **category** roles:
27
+
28
+ - `bug`: something is broken
29
+ - `enhancement`: new feature or improvement
30
+
31
+ Five **state** roles:
32
+
33
+ - `needs-triage`: maintainer needs to evaluate
34
+ - `needs-info`: waiting on reporter for more information
35
+ - `ready-for-agent`: fully specified, ready for an AFK agent
36
+ - `ready-for-human`: needs human implementation
37
+ - `wontfix`: will not be actioned
38
+
39
+ For a PR, the same states read against the attached code: `ready-for-agent` means a brief is attached and an agent should take the next step on the diff; `ready-for-human` means it's ready for a human to merge.
40
+
41
+ Every triaged issue should carry exactly one category role and one state role. If state roles conflict, flag it and ask the maintainer before doing anything else.
42
+
43
+ These are canonical role names. The actual label strings used in the issue tracker may differ. The mapping should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
44
+
45
+ State transitions: an unlabeled issue normally goes to `needs-triage` first; from there it moves to `needs-info`, `ready-for-agent`, `ready-for-human`, or `wontfix`. `needs-info` returns to `needs-triage` once the reporter replies. The maintainer can override at any time; flag transitions that look unusual and ask before proceeding.
46
+
47
+ ## Invocation
48
+
49
+ The maintainer invokes `/triage` and describes what they want in natural language. Interpret the request and act. Examples:
50
+
51
+ - "Show me anything that needs my attention"
52
+ - "Let's look at #42" (issue or PR)
53
+ - "Move #42 to ready-for-agent"
54
+ - "What's ready for agents to pick up?"
55
+
56
+ ## Show what needs attention
57
+
58
+ Query the issue tracker and present three buckets, oldest first:
59
+
60
+ 1. **Unlabeled**: never triaged.
61
+ 2. **`needs-triage`**: evaluation in progress.
62
+ 3. **`needs-info` with reporter activity since the last triage notes**: needs re-evaluation.
63
+
64
+ When PRs are in scope, include external PRs in these buckets and tag each line `[PR]` or `[issue]`. Discovery surfaces only *external* PRs (the tracker config defines who counts as external), so a collaborator's in-flight PR is not triage work. This filter is discovery-only; an explicitly named PR is always triaged regardless of author.
65
+
66
+ Show counts and a one-line summary per item. Let the maintainer pick.
67
+
68
+ ## Triage a specific issue or PR
69
+
70
+ 1. **Gather context.** Read the full issue or PR (body, comments, labels, author, dates; for a PR, the diff too). Parse any prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's domain glossary, respecting ADRs in the area. Run two checks against the codebase: (a) **redundancy**: search for an existing implementation of the requested behavior by domain concept (not just the request's wording), and report where you looked. If found, it's an already-implemented `wontfix` (step 5). (b) **prior rejection**: read `.out-of-scope/*.md` and surface any that resembles this request.
71
+
72
+ 2. **Recommend.** Tell the maintainer your category and state recommendation with reasoning, plus a brief codebase summary relevant to the request (including whether it's already implemented). Wait for direction.
73
+
74
+ 3. **Verify the claim.** Before any grilling, check that the claim holds up. For a bug, reproduce it from the reporter's steps. For a PR, confirm the diff does what it claims: check it out, run the relevant tests or commands. Report what happened: confirmed (with code path), failed, or insufficient detail (a strong `needs-info` signal). A confirmed verification makes a much stronger agent brief.
75
+
76
+ 4. **Grill (if needed).** If the request needs fleshing out, call the Skill tool twice, for "grilling" and "domain-modeling", and grill it into shape a round of questions at a time, sharpening domain terms and updating `GLOSSARY.md`/ADRs inline as decisions land.
77
+
78
+ 5. **Apply the outcome:**
79
+ - `ready-for-agent`: post an agent brief comment ([AGENT-BRIEF.md](AGENT-BRIEF.md)).
80
+ - `ready-for-human`: same structure as an agent brief, but note why it can't be delegated (judgment calls, external access, design decisions, manual testing).
81
+ - `needs-info`: post triage notes (template below).
82
+ - For `wontfix`, close the issue, with the comment depending on *why*:
83
+ - **Already implemented**: the change already exists in the codebase. Point to where it lives; do **not** write to `.out-of-scope/` (that KB is for *rejected* requests, not built ones).
84
+ - **Rejected (bug)**: give a polite explanation, then close.
85
+ - **Rejected (enhancement)**: write to `.out-of-scope/`, link to it from a comment, then close ([OUT-OF-SCOPE.md](OUT-OF-SCOPE.md)).
86
+ - `needs-triage`: apply the role. Optional comment if there's partial progress.
87
+
88
+ ## Quick state override
89
+
90
+ If the maintainer says "move #42 to ready-for-agent", trust them and apply the role directly. Confirm what you're about to do (role changes, comment, close), then act. Skip grilling. If moving to `ready-for-agent` without a grilling session, ask whether they want to write an agent brief.
91
+
92
+ ## Needs-info template
93
+
94
+ ```markdown
95
+ ## Triage Notes
96
+
97
+ **What we've established so far:**
98
+
99
+ - point 1
100
+ - point 2
101
+
102
+ **What we still need from you (@reporter):**
103
+
104
+ - question 1
105
+ - question 2
106
+ ```
107
+
108
+ Capture everything resolved during grilling under "established so far" so the work isn't lost. Questions must be specific and actionable, not "please provide more info".
109
+
110
+ ## Resuming a previous session
111
+
112
+ If prior triage notes exist on the issue or PR, read them, check whether the reporter has answered any outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Triage"
3
+ short_description: "Move issues through triage roles"
4
+ policy:
5
+ allow_implicit_invocation: false
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  name: wait-what
3
3
  description: "Stop. That last message did not land: re-pitch it."
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/productivity/wait-what). MIT licensed — see LICENSE in this directory. -->
7
-
8
- Wait, I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `CONTEXT.md` (follow `CONTEXT-MAP.md` to the right one if the repo has more than one).
7
+ Wait, I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `GLOSSARY.md` (follow `GLOSSARY-MAP.md` to the right one if the repo has more than one).
@@ -2,3 +2,4 @@ interface:
2
2
  display_name: "Wait What"
3
3
  short_description: "Re-pitch that: simpler, with the context I'm missing"
4
4
  policy:
5
+ allow_implicit_invocation: false
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  name: wayfinder
3
3
  description: Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/wayfinder). MIT licensed — see LICENSE in this directory. -->
7
-
8
7
  A loose idea has arrived, too big for one agent session, and wrapped in fog: the way from here to the **destination** isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a **shared map** on the repo's issue tracker, then works its **decision tickets** (questions whose resolution is a decision, not slices of a build to execute) one at a time until the route is clear.
9
8
 
10
9
  The destination varies per effort, and naming it is the first act of charting: it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic: engineering work, course content, whatever fits the shape.
@@ -63,7 +62,7 @@ Each ticket is a **child issue** of the map; the tracker's issue id is its ident
63
62
  <the decision or investigation this ticket resolves>
64
63
  ```
65
64
 
66
- Each ticket carries a `wayfinder:<type>` label, one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)).
65
+ Each ticket carries a `wayfinder:<type>` label, one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)). `wayfinder:` labels are the only labels a map and its tickets carry, never a triage label like `ready-for-agent`: they are decisions, not implementation work.
67
66
 
68
67
  A session **claims** a ticket by assigning it to the dev driving the map, **first**, before any work, so concurrent sessions skip it. That assignee _is_ the claim: an open, unassigned ticket is unclaimed.
69
68
 
@@ -112,8 +111,8 @@ User invokes with a loose idea.
112
111
  1. **Name the destination.** Call the Skill tool twice, for "grilling" and "domain-modeling", to pin down what this map is finding its way to: the spec, decision, or change. The destination fixes the scope, so it's settled first.
113
112
  2. **Map the frontier.** Grill again, **breadth-first** this time: fan out across the whole space rather than deep on any one thread, surfacing the open decisions and the first steps takeable now. **If this surfaces no fog** (the way to the destination is already clear, the whole journey small enough for one session), you don't need a map. Stop and ask the user how they'd like to proceed.
114
113
  3. **Create the map** (label `wayfinder:map`): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into **Not yet specified**.
115
- 4. **Create the tickets you can specify now** as child issues of the map, then wire blocking edges in a **second pass** (issues need ids before they can reference each other). Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog: the **Not yet specified** section.
116
- 5. **Fire the research subagents.** For each `research` ticket you just created, spin up a subagent that calls the Skill tool with "research" to resolve it in parallel, capturing its findings on a throwaway `research/<name>` branch with a context pointer from the ticket.
114
+ 4. **Create the tickets you can specify now** as child issues of the map, then wire blocking edges in a **second pass** (issues need ids before they can reference each other). Write cross-references in that pass too, with real ids: a placeholder `#<n>` auto-links to an unrelated issue. Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog: the **Not yet specified** section.
115
+ 5. **Fire the research subagents.** For each `research` ticket you just created, spin up a subagent that calls the Skill tool with "research" to resolve it in parallel, capturing its findings on a throwaway `research/<name>` branch with a context pointer from the ticket. Push the branch but open no PR: it is never merged.
117
116
  6. Stop: charting is one session's work; it hand-resolves nothing.
118
117
 
119
118
  ### Work through the map
@@ -122,7 +121,7 @@ User invokes with a map (URL or number). A ticket is **optional**: without one,
122
121
 
123
122
  1. Load the **map**: the low-res view, not every ticket body.
124
123
  2. Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order. **Claim it**: assign it to yourself before any work.
125
- 3. Resolve it. **Zoom as needed**: fetch the full body of any related or closed ticket on demand; call the Skill tool for whichever skills the `## Notes` block names. If in doubt, call the Skill tool twice, for "grilling" and "domain-modeling".
124
+ 3. Resolve it as the type its `wayfinder:<type>` label names (see [Ticket Types](#ticket-types)). Read the label, not just the body: the body never states the type. **Zoom as needed**: fetch the full body of any related or closed ticket on demand; call the Skill tool for whichever skills the `## Notes` block names. If in doubt, call the Skill tool twice, for "grilling" and "domain-modeling".
126
125
  4. Record the resolution: post the answer as a **resolution comment**, **close** the issue, and **append a context pointer** to the map's Decisions-so-far.
127
126
  5. Add newly-surfaced tickets (create-then-wire); graduate any fog the answer has made specifiable, clearing each graduated patch from **Not yet specified** so it lives only as its new ticket. If the answer reveals that a ticket (this one or another) sits beyond the destination, **rule it out of scope** rather than resolving it on the route. If the decision invalidates other parts of the map, update or delete those tickets.
128
127
 
@@ -2,3 +2,4 @@ interface:
2
2
  display_name: "Wayfinder"
3
3
  short_description: "Map a large effort as decision tickets"
4
4
  policy:
5
+ allow_implicit_invocation: false
@@ -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: wizard
3
+ description: Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
4
+ ---
5
+
6
+ # Wizard
7
+
8
+ A **wizard** is a bash script that walks a human, step by step, through a manual procedure that's tedious to do by hand and tedious to re-explain to an AI every time. It opens each URL, says exactly what to click and copy, captures the values, writes them where they belong (`.env`, GitHub secrets), confirms at every stage, and shows how many stages are left. It might configure third-party services, run a one-off migration, or move the project from one state to another.
9
+
10
+ The delightful UX is already solved by [template.sh](template.sh): stage-by-stage progress, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent `.env` upserts, `gh secret`/`gh variable` writes, and a closing summary. **Your job is only to scope the procedure and author its stages.** The library above the `STAGES` marker is identical in every wizard; that consistency is the point: never hand-edit it.
11
+
12
+ A wizard is ephemeral by default: built for one run, saved to a scratch or `scripts/` path, deleted when the job's done. Commit it only when the user wants a repeatable setup path that should live in the repo.
13
+
14
+ ## Process
15
+
16
+ ### 1. Scope the procedure
17
+
18
+ Work out every manual step the human must take and every value that gets captured along the way. Read the repo first, don't ask cold:
19
+
20
+ - For setup: `.env`, `.env.example`, `.env.*`, `README`, `docker-compose*`, framework config, and `.github/workflows/*` (every `secrets.*` / `vars.*` reference is a value the wizard must produce).
21
+ - For a migration or transition: the current state, the target state, and the irreversible actions between them.
22
+
23
+ Then show the user the ordered list of stages and the values each produces, and confirm: they may add, drop, or reorder.
24
+
25
+ **Done when:** every stage is named in order, and for each captured value you know (a) where the human gets it, (b) where it's written (`.env`, a GitHub secret, both, or nowhere; some stages are pure actions), and (c) whether it's secret (hidden entry) or public.
26
+
27
+ ### 2. Map each stage's journey
28
+
29
+ For each stage, write the precise path a human follows: which URL to open, what to do there, where a value is shown, which variable it fills: e.g. "Dashboard → Developers → API keys → Reveal test key → copy". Where you don't actually know the current UI or the exact command, say so and ask the user or check the docs: never invent steps that may not exist.
30
+
31
+ **Done when:** every stage traces to concrete instructions a stranger could follow.
32
+
33
+ ### 3. Author the wizard
34
+
35
+ Copy `template.sh` to the target path. Replace the example stage with one `stage` per step, in dependency order. Use the library helpers: `stage`, `say`/`step`, `open_url`, `ask`/`ask_secret`, `write_env`, `set_secret`/`set_var`, `pause`/`confirm`. Set `TOTAL_STAGES` to the number of stages you wrote.
36
+
37
+ Hold the bar the template sets: open the URL before asking for its value, use `ask_secret` for anything secret, `write_env` every persisted value, `set_secret` only the values CI actually needs, and `confirm` before any irreversible action. Each `stage` clears the screen so only the current step is visible: keep a stage to one focused task so nothing the human needs scrolls away. Don't touch the library above the marker.
38
+
39
+ ### 4. Verify and hand off
40
+
41
+ - `bash -n <script>`; run `shellcheck` if available.
42
+ - `chmod +x <script>`.
43
+ - Don't run it end-to-end yourself: it opens browsers and blocks on human input. Trace it statically instead: every value from step 1 is captured and lands where step 1 said, and every `set_secret` name exactly matches a `secrets.*` reference in CI.
44
+ - Tell the user how to run it. If it's a repeatable setup path, commit it and link it from the README so the next person runs the script instead of asking an AI.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Wizard"
3
+ short_description: "Generate an interactive setup wizard"
@@ -0,0 +1,223 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # A wizard walks a human through a manual procedure, step by step.
4
+ # Generated by the /wizard skill.
5
+ #
6
+ # Everything above the "STAGES" marker is the wizard library: do not hand-edit
7
+ # it. Author the per-step stages below the marker.
8
+
9
+ set -euo pipefail
10
+
11
+ # ──────────────────────────────────────────────────────────────────────────
12
+ # Wizard library: delightful, consistent UX, identical across every wizard.
13
+ # ──────────────────────────────────────────────────────────────────────────
14
+
15
+ if [[ -t 1 ]] && command -v tput >/dev/null 2>&1 && [[ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]]; then
16
+ BOLD=$(tput bold); DIM=$(tput dim); RESET=$(tput sgr0)
17
+ BLUE=$(tput setaf 4); GREEN=$(tput setaf 2); YELLOW=$(tput setaf 3)
18
+ else
19
+ BOLD=""; DIM=""; RESET=""; BLUE=""; GREEN=""; YELLOW=""
20
+ fi
21
+
22
+ # Author sets this at the top of the stages section.
23
+ TOTAL_STAGES=0
24
+
25
+ _STAGE_INDEX=0
26
+ ENV_FILE="${ENV_FILE:-.env}"
27
+ WRITTEN_ENV=() # KEYs written to ENV_FILE this run
28
+ WRITTEN_SECRET=() # secret NAMEs set this run
29
+ SKIPPED=() # things we couldn't do (e.g. gh missing)
30
+
31
+ # _clear wipes the terminal so only the current step is on screen. No-op when
32
+ # output isn't a terminal, so piped logs stay readable.
33
+ _clear() {
34
+ [[ -t 1 ]] || return 0
35
+ if command -v tput >/dev/null 2>&1 && tput clear 2>/dev/null; then return 0; fi
36
+ printf '\033[2J\033[3J\033[H'
37
+ }
38
+
39
+ # banner "Title" shows the opening frame: what this wizard does.
40
+ banner() {
41
+ _clear
42
+ printf '\n%s%s %s%s\n' "$BOLD" "$BLUE" "$1" "$RESET"
43
+ printf '%s %s stages%s\n\n' "$DIM" "$TOTAL_STAGES" "$RESET"
44
+ printf '%s You drive the browser; this wizard tells you exactly what to do and\n' "$DIM"
45
+ printf ' captures the values you copy back. Stop any time with Ctrl-C and re-run\n'
46
+ printf ' later, since it remembers values already saved.%s\n' "$RESET"
47
+ pause "Ready to start?"
48
+ }
49
+
50
+ # stage "Name" clears the screen, then announces a stage and shows progress.
51
+ # Clearing keeps only the current step on screen.
52
+ stage() {
53
+ _clear
54
+ _STAGE_INDEX=$((_STAGE_INDEX + 1))
55
+ printf '\n%s%s▸ Stage %s/%s · %s%s\n' \
56
+ "$BOLD" "$BLUE" "$_STAGE_INDEX" "$TOTAL_STAGES" "$1" "$RESET"
57
+ }
58
+
59
+ # say "..." prints a plain instruction line.
60
+ say() { printf ' %s\n' "$1"; }
61
+ # step "..." is a numbered-feeling action the human takes in the browser.
62
+ step() { printf ' %s•%s %s\n' "$BLUE" "$RESET" "$1"; }
63
+ note() { printf ' %s%s%s\n' "$DIM" "$1" "$RESET"; }
64
+ warn() { printf ' %s⚠ %s%s\n' "$YELLOW" "$1" "$RESET"; }
65
+
66
+ # open_url URL opens it in the human's browser, cross-platform incl. WSL.
67
+ open_url() {
68
+ local url="$1"
69
+ printf ' %s↗ opening%s %s\n' "$GREEN" "$RESET" "$url"
70
+ { if command -v wslview >/dev/null 2>&1; then wslview "$url"
71
+ elif command -v explorer.exe >/dev/null 2>&1; then explorer.exe "$url"
72
+ elif command -v xdg-open >/dev/null 2>&1; then xdg-open "$url"
73
+ elif command -v open >/dev/null 2>&1; then open "$url"
74
+ else false; fi
75
+ } >/dev/null 2>&1 || warn "couldn't open a browser, so visit it manually: $url"
76
+ }
77
+
78
+ # pause "msg" waits for the human to confirm they've done the manual part.
79
+ pause() {
80
+ printf ' %s%s%s ' "$DIM" "${1:-Press Enter to continue}" "$RESET"
81
+ read -r _ || true
82
+ }
83
+
84
+ # confirm "question" is a y/N gate; returns success on yes.
85
+ confirm() {
86
+ local reply=""
87
+ printf ' %s? %s [y/N] ' "$YELLOW" "$1"
88
+ read -r reply || true
89
+ [[ "$reply" =~ ^[Yy] ]]
90
+ }
91
+
92
+ # _existing KEY: current value of KEY in ENV_FILE, if any, with write_env's single
93
+ # quotes or a plain dotenv double-quoted value undone.
94
+ _existing() {
95
+ [[ -f "$ENV_FILE" ]] || return 1
96
+ local line value sq="'\\''"; line=$(grep -E "^${1}=" "$ENV_FILE" | tail -n1) || return 1
97
+ value="${line#*=}"
98
+ if [[ "$value" == \'*\' ]]; then value="${value:1:${#value}-2}"; value="${value//"$sq"/\'}"
99
+ elif [[ "$value" == \"*\" ]]; then
100
+ value="${value:1:${#value}-2}"
101
+ [[ "$value" == *[\\\$\"]* ]] && return 1 # escapes, $ or ": can't decode safely; ask again
102
+ fi
103
+ printf '%s' "$value"
104
+ }
105
+
106
+ # ask KEY "Prompt" reads a value into $KEY. Offers the existing .env value as
107
+ # a default on re-runs (Enter keeps it). Visible input (non-secret), edited
108
+ # with Readline. Fails at EOF with no input.
109
+ ask() {
110
+ local key="$1" prompt="$2" current input s=$'\001' e=$'\002' p rc=0
111
+ current=$(_existing "$key" || true)
112
+ # Readline needs the colour codes wrapped in \001..\002 to place the cursor.
113
+ p=" $s$BOLD$e$prompt$s$RESET$e "
114
+ [[ -n "$current" ]] && p+="$s$DIM$e[Enter keeps current]$s$RESET$e "
115
+ read -e -r -p "$p" input || rc=1
116
+ if (( rc )) && [[ -z "$input" ]]; then return 1; fi
117
+ [[ -z "$input" && -n "$current" ]] && input="$current"
118
+ printf -v "$key" '%s' "$input"
119
+ }
120
+
121
+ # ask_secret KEY "Prompt" is like ask, but input is hidden.
122
+ ask_secret() {
123
+ local key="$1" prompt="$2" current input rc=0
124
+ current=$(_existing "$key" || true)
125
+ if [[ -n "$current" ]]; then
126
+ printf ' %s%s%s %s[Enter keeps current]%s ' "$BOLD" "$prompt" "$RESET" "$DIM" "$RESET"
127
+ else
128
+ printf ' %s%s%s ' "$BOLD" "$prompt" "$RESET"
129
+ fi
130
+ read -rs input || rc=1
131
+ printf '\n'
132
+ if (( rc )) && [[ -z "$input" ]]; then return 1; fi
133
+ [[ -z "$input" && -n "$current" ]] && input="$current"
134
+ printf -v "$key" '%s' "$input"
135
+ }
136
+
137
+ # write_env KEY VALUE upserts KEY='VALUE' into ENV_FILE (replaces any existing
138
+ # line) and sets $KEY. Idempotent. Creates ENV_FILE at mode 0600; writes through
139
+ # a symlink and keeps an existing file's mode.
140
+ write_env() {
141
+ local key="$1" value="$2" tmp sq="'\\''"
142
+ [[ -e "$ENV_FILE" ]] || (umask 077 && : > "$ENV_FILE")
143
+ tmp=$(mktemp)
144
+ grep -vE "^${key}=" "$ENV_FILE" > "$tmp" || true
145
+ printf "%s='%s'\n" "$key" "${value//\'/$sq}" >> "$tmp"
146
+ cat "$tmp" > "$ENV_FILE"
147
+ rm -f "$tmp"
148
+ printf -v "$key" '%s' "$value"
149
+ WRITTEN_ENV+=("$key")
150
+ printf ' %s✓ wrote%s %s → %s\n' "$GREEN" "$RESET" "$key" "$ENV_FILE"
151
+ }
152
+
153
+ # set_secret NAME VALUE sets a GitHub Actions repo secret via gh. Falls back
154
+ # to a warning (and records it) if gh is unavailable or unauthenticated.
155
+ set_secret() {
156
+ local name="$1" value="$2"
157
+ if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then
158
+ if printf '%s' "$value" | gh secret set "$name" >/dev/null 2>&1; then
159
+ WRITTEN_SECRET+=("$name")
160
+ printf ' %s✓ set%s GitHub secret %s\n' "$GREEN" "$RESET" "$name"
161
+ return
162
+ fi
163
+ fi
164
+ SKIPPED+=("GitHub secret $name (set it manually: gh secret set $name)")
165
+ warn "skipped GitHub secret $name: gh not ready; set it later"
166
+ }
167
+
168
+ # set_var NAME VALUE sets a GitHub Actions repo variable (non-secret).
169
+ set_var() {
170
+ local name="$1" value="$2"
171
+ if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then
172
+ if gh variable set "$name" --body "$value" >/dev/null 2>&1; then
173
+ printf ' %s✓ set%s GitHub variable %s\n' "$GREEN" "$RESET" "$name"
174
+ return
175
+ fi
176
+ fi
177
+ SKIPPED+=("GitHub variable $name")
178
+ warn "skipped GitHub variable $name, gh not ready; set it later"
179
+ }
180
+
181
+ # finish clears, then shows a closing summary of everything configured.
182
+ finish() {
183
+ _clear
184
+ printf '\n%s%s ✓ Setup complete%s\n' "$BOLD" "$GREEN" "$RESET"
185
+ (( ${#WRITTEN_ENV[@]} )) && note "wrote ${#WRITTEN_ENV[@]} value(s) to $ENV_FILE: ${WRITTEN_ENV[*]}"
186
+ (( ${#WRITTEN_SECRET[@]} )) && note "set ${#WRITTEN_SECRET[@]} GitHub secret(s): ${WRITTEN_SECRET[*]}"
187
+ if (( ${#SKIPPED[@]} )); then
188
+ printf '\n'; warn "still to do by hand:"
189
+ for s in "${SKIPPED[@]}"; do note " - $s"; done
190
+ fi
191
+ printf '\n'
192
+ }
193
+
194
+ # ──────────────────────────────────────────────────────────────────────────
195
+ # STAGES: author this section. One stage() per step the human takes.
196
+ # Replace the example below. Set TOTAL_STAGES to match the stages you write.
197
+ # Keep every stage inside run_wizard and the last line as is: bash then parses
198
+ # the whole file before the first prompt, so an edit mid-run can't break it.
199
+ # ──────────────────────────────────────────────────────────────────────────
200
+
201
+ run_wizard() {
202
+
203
+ TOTAL_STAGES=1
204
+
205
+ banner "Stripe setup"
206
+
207
+ # ── Example stage: replace with your real steps ───────────────────────────
208
+ stage "Stripe: API keys"
209
+ say "We'll grab your Stripe test keys and store them for local dev + CI."
210
+ open_url "https://dashboard.stripe.com/test/apikeys"
211
+ step "On the API keys page, copy the Publishable key (starts pk_test_)."
212
+ ask STRIPE_PUBLISHABLE_KEY "Paste the publishable key:"
213
+ step "Click 'Reveal test key' on the Secret key row, then copy it."
214
+ ask_secret STRIPE_SECRET_KEY "Paste the secret key:"
215
+ write_env STRIPE_PUBLISHABLE_KEY "$STRIPE_PUBLISHABLE_KEY"
216
+ write_env STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY"
217
+ set_secret STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY" # CI needs this one
218
+ # ──────────────────────────────────────────────────────────────────────────
219
+
220
+ finish
221
+ }
222
+
223
+ run_wizard "$@"; exit
@@ -3,8 +3,6 @@ name: writing-for-agents
3
3
  description: Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
4
4
  ---
5
5
 
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/productivity/writing-for-agents). MIT licensed — see LICENSE in this directory. -->
7
-
8
6
  Reference for writing any document an agent consumes: a skill, an `AGENTS.md` / `CLAUDE.md`, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable, since the agent takes the same _process_ every run rather than producing the same output.
9
7
 
10
8
  When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md) for frontmatter, invocation choice, and router skills.
@@ -1,16 +0,0 @@
1
- ---
2
- name: resolving-merge-conflicts
3
- description: "Use when you need to resolve an in-progress git merge/rebase conflict."
4
- ---
5
-
6
- <!-- Vendored from mattpocock/skills at commit c55ee46073ed923f86ce59a5eb3b6d895095d1b7 (skills/engineering/resolving-merge-conflicts). MIT licensed — see LICENSE in this directory. -->
7
-
8
- 1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.
9
-
10
- 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.
11
-
12
- 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`.
13
-
14
- 4. Discover the project's **automated checks** and run them, typically typecheck, then tests, then format. Fix anything the merge broke.
15
-
16
- 5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
@@ -1,3 +0,0 @@
1
- interface:
2
- display_name: "Resolving Merge Conflicts"
3
- short_description: "Resolve merge and rebase conflicts"