@jesdi/skills 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -3
- package/package.json +1 -1
- package/skills/backlog/SKILL.md +12 -6
- package/skills/backlog/references/graphql.md +2 -1
- package/skills/crap-gate/SKILL.md +38 -11
- package/skills/crap-gate/crap.py +13 -1
- package/skills/crap-gate/run.sh +87 -0
- package/skills/crap-gate/test_launcher.py +116 -0
- package/skills/prototype/LICENSE +21 -0
- package/skills/prototype/LOGIC.md +67 -0
- package/skills/prototype/SKILL.md +39 -0
- package/skills/prototype/UI.md +99 -0
- package/skills/to-spec/LICENSE +21 -0
- package/skills/to-spec/SKILL.md +119 -0
- package/skills/to-tickets/LICENSE +21 -0
- package/skills/to-tickets/SKILL.md +95 -0
- package/skills/wizard/LICENSE +21 -0
- package/skills/wizard/SKILL.md +65 -0
- package/skills/wizard/template.sh +229 -0
- package/skills-manifest.json +30 -6
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# UI Prototype
|
|
2
|
+
|
|
3
|
+
Generate **several radically different UI variations** inside one self-contained HTML file, switchable from a floating bottom bar. The user flips between variants in the page, picks one (or steals bits from each), then throws the rest away.
|
|
4
|
+
|
|
5
|
+
If the question is about logic/state rather than what something looks like, this is the wrong branch. Use [LOGIC.md](LOGIC.md).
|
|
6
|
+
|
|
7
|
+
## When this is the right shape
|
|
8
|
+
|
|
9
|
+
- "What should this page look like?"
|
|
10
|
+
- "I want to see a few options for this dashboard before committing."
|
|
11
|
+
- "Try a different layout for the settings screen."
|
|
12
|
+
- Any time the user would otherwise spend a day picking between three vague mockups in their head.
|
|
13
|
+
|
|
14
|
+
## Why one file and not routes in the app
|
|
15
|
+
|
|
16
|
+
A prototype mounted in the running application is easier to judge because it sits among the real header, sidebar and data, but it needs a dev server and a browser on the machine that built it. The reviewer here may be looking at a file served from a machine with neither, on a phone. So the page recreates enough of the surrounding app to judge the variant against (a header strip, a sidebar outline, realistic density of sample data) and nothing more. Every variant lives in the same file, so what is being compared is the structure, not the chrome.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. State the question and pick N
|
|
21
|
+
|
|
22
|
+
Default to **3 variants**. More than 5 stops being radically different and starts being noise, so cap there.
|
|
23
|
+
|
|
24
|
+
Write down the plan in one line at the top of the file, visible on the page:
|
|
25
|
+
|
|
26
|
+
> "Three variants of the settings page. Use the bar at the bottom or ←/→ to switch."
|
|
27
|
+
|
|
28
|
+
### 2. Generate radically different variants
|
|
29
|
+
|
|
30
|
+
Draft each variant. Hold each one to:
|
|
31
|
+
|
|
32
|
+
- The page's purpose and the data it has access to. Inline realistic sample data once and let every variant render it.
|
|
33
|
+
- The project's look: copy its colours, fonts, spacing and border radii into the page's `<style>` so a variant does not look foreign. Do not import the real component library; approximate it in plain CSS.
|
|
34
|
+
- A clear name, e.g. `A (Sidebar layout)`, `B (Cards)`, `C (Single column)`.
|
|
35
|
+
|
|
36
|
+
Variants must be **structurally different**: different layout, different information hierarchy, different primary affordance, not just different colours. Three slightly-tweaked card grids isn't a UI prototype, it's wallpaper. If two drafts come out too similar, redo one with explicit "do not use a card grid" guidance.
|
|
37
|
+
|
|
38
|
+
### 3. Wire them together
|
|
39
|
+
|
|
40
|
+
Each variant is one `<section data-variant="A">` (B, C, …) in the file. Only the section for the current variant is displayed. The current variant is stored in the URL hash (`#variant=B`) so a specific one can be linked and survives reload:
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<!-- pseudo-code, adapt freely -->
|
|
44
|
+
<section data-variant="A"> … </section>
|
|
45
|
+
<section data-variant="B"> … </section>
|
|
46
|
+
<section data-variant="C"> … </section>
|
|
47
|
+
<div id="switcher"><button data-dir="-1">←</button><span id="label"></span><button data-dir="1">→</button></div>
|
|
48
|
+
<script>
|
|
49
|
+
const variants = [...document.querySelectorAll('[data-variant]')];
|
|
50
|
+
const names = { A: 'Sidebar layout', B: 'Cards', C: 'Single column' };
|
|
51
|
+
function current() { return (location.hash.match(/variant=(\w)/) || [, variants[0].dataset.variant])[1]; }
|
|
52
|
+
function show(key) {
|
|
53
|
+
variants.forEach(s => s.hidden = s.dataset.variant !== key);
|
|
54
|
+
label.textContent = `${key} (${names[key]})`;
|
|
55
|
+
if (current() !== key) location.hash = `variant=${key}`;
|
|
56
|
+
}
|
|
57
|
+
function cycle(dir) {
|
|
58
|
+
const keys = variants.map(s => s.dataset.variant);
|
|
59
|
+
show(keys[(keys.indexOf(current()) + dir + keys.length) % keys.length]);
|
|
60
|
+
}
|
|
61
|
+
document.querySelectorAll('#switcher button').forEach(b => b.onclick = () => cycle(+b.dataset.dir));
|
|
62
|
+
addEventListener('keydown', e => {
|
|
63
|
+
if (e.target.matches('input, textarea, [contenteditable]')) return;
|
|
64
|
+
if (e.key === 'ArrowLeft') cycle(-1); if (e.key === 'ArrowRight') cycle(1);
|
|
65
|
+
});
|
|
66
|
+
addEventListener('hashchange', () => show(current()));
|
|
67
|
+
show(current());
|
|
68
|
+
</script>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 4. Build the floating switcher
|
|
72
|
+
|
|
73
|
+
A small fixed-position bar at the bottom-centre of the screen with three pieces:
|
|
74
|
+
|
|
75
|
+
- **Left arrow**: cycles to the previous variant (wraps around).
|
|
76
|
+
- **Variant label**: shows the current variant key and its name, e.g. `B (Cards)`.
|
|
77
|
+
- **Right arrow**: cycles forward (wraps around).
|
|
78
|
+
|
|
79
|
+
Behaviour:
|
|
80
|
+
|
|
81
|
+
- Clicking an arrow updates the URL hash so the variant is shareable and reload-stable.
|
|
82
|
+
- Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.
|
|
83
|
+
- Touch: the arrows are at least 44px tall so the bar works on a phone.
|
|
84
|
+
- Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.
|
|
85
|
+
|
|
86
|
+
### 5. Hand it over
|
|
87
|
+
|
|
88
|
+
Say where the file is and list the variant keys with their `#variant=` links. The user will flip through whenever they get to it. The interesting feedback is usually **"I want the header from B with the sidebar from C"**, which is the actual design they want.
|
|
89
|
+
|
|
90
|
+
### 6. Capture the answer and clean up
|
|
91
|
+
|
|
92
|
+
Once a variant has won, record the verdict the way [SKILL.md](SKILL.md) rule 6 describes: an issue comment naming the winner and why, and any parts borrowed from the others. Rebuild the winner properly in the real code with the project's real components; nothing is copied out of the prototype file. The file itself never lands on `main`.
|
|
93
|
+
|
|
94
|
+
## Anti-patterns
|
|
95
|
+
|
|
96
|
+
- **Variants that differ only in colour or copy.** That's a tweak, not a prototype. Real variants disagree about structure.
|
|
97
|
+
- **Sharing too much markup between variants.** A shared header strip is fine; a shared layout defeats the point. Each variant should be free to throw out the layout.
|
|
98
|
+
- **Loading anything from the network.** No CDN scripts, no web fonts, no images by URL. The file must render from disk with no connection.
|
|
99
|
+
- **Promoting the prototype directly to production.** The variant markup was written under prototype constraints (no components, no tests, no accessibility pass). Rebuild it properly when you fold it in.
|
|
@@ -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,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-spec
|
|
3
|
+
description: "Turn the current conversation into a design spec and write it where the next stage reads it: a GitHub issue body labelled spec-ready (after a grilling session), or a dated design file on the current branch (an unattended spec stage). No interview, just synthesis of what you've already discussed."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!--
|
|
7
|
+
Modified copy of https://github.com/mattpocock/skills/tree/3cca18b368ae95cdbdebbff572ccafa662551015/skills/engineering/to-spec
|
|
8
|
+
(mattpocock-skills v1.2.3). Copyright (c) 2026 Matt Pocock, MIT — see LICENSE.
|
|
9
|
+
Changes: publishes to an issue body or a design file instead of an issue tracker;
|
|
10
|
+
seams are stated rather than confirmed when unattended; the document must pass the
|
|
11
|
+
agent-ops mechanical spec check; Testing Decisions must name the seams; the
|
|
12
|
+
`ready-for-agent` label became `spec-ready`; model invocation is allowed.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
## Destination
|
|
18
|
+
|
|
19
|
+
Decide where the spec goes before writing it. There are exactly two destinations:
|
|
20
|
+
|
|
21
|
+
- **Issue body.** Use this when a human settled the design with you interactively (a grilling session) and the unattended pipeline will pick the work up later. Create a GitHub issue in the current repo whose body is the spec, labelled `spec-ready`. If the conversation started from an existing issue, replace that issue's body and add the label instead of creating a new issue. The spec's H1 becomes the issue title and is omitted from the body.
|
|
22
|
+
- **Design file.** Use this when the invoking prompt names a file path, or when you are running unattended on a task branch. Write the spec to that path; with no path given, use `docs/specs/<YYYY-MM-DD>-<slug>-design.md`. Keep the H1 as the first line. Commit it to the current branch with a `docs:` message.
|
|
23
|
+
|
|
24
|
+
If neither is clear, ask once: "Issue body or design file?". Never publish anywhere else.
|
|
25
|
+
|
|
26
|
+
## Process
|
|
27
|
+
|
|
28
|
+
1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.
|
|
29
|
+
|
|
30
|
+
2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.
|
|
31
|
+
|
|
32
|
+
With a human present, check that these seams match their expectations. Unattended, state your choice in the Testing Decisions section instead: a later implement session treats that section as the seams already agreed and cannot stop to ask.
|
|
33
|
+
|
|
34
|
+
3. Write the spec using the template below, then deliver it to the destination.
|
|
35
|
+
|
|
36
|
+
## Mechanical requirements
|
|
37
|
+
|
|
38
|
+
The unattended pipeline rejects a spec that fails a format check, so every spec must have:
|
|
39
|
+
|
|
40
|
+
- One `# <title>` H1 as the first line (file destination) or as the issue title (issue destination).
|
|
41
|
+
- At least two `## ` sections. Use every section of the template; write "None." rather than dropping one.
|
|
42
|
+
- A **Testing Decisions** section that names each seam explicitly: the module, function, command or endpoint the tests drive through, and whether it exists today or is new.
|
|
43
|
+
|
|
44
|
+
## Delivery commands
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Issue body (new issue). Write the body to a temp file first.
|
|
48
|
+
gh issue create --repo <owner/repo> --title "<H1 text>" --label spec-ready --body-file /tmp/spec.md
|
|
49
|
+
|
|
50
|
+
# Issue body (existing issue)
|
|
51
|
+
gh issue edit <number> --repo <owner/repo> --body-file /tmp/spec.md --add-label spec-ready
|
|
52
|
+
|
|
53
|
+
# If the label does not exist yet (the backlog skill's setup normally provisions it)
|
|
54
|
+
gh label create spec-ready --repo <owner/repo> --description "Issue body carries a settled design; the pipeline skips its interview" --color 006B75 --force
|
|
55
|
+
|
|
56
|
+
# Design file
|
|
57
|
+
git add docs/specs/<date>-<slug>-design.md && git commit -m "docs: spec for <slug>"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Read `<owner/repo>` from `gh repo view --json nameWithOwner -q .nameWithOwner`.
|
|
61
|
+
|
|
62
|
+
<spec-template>
|
|
63
|
+
|
|
64
|
+
# <Feature title>
|
|
65
|
+
|
|
66
|
+
## Problem Statement
|
|
67
|
+
|
|
68
|
+
The problem that the user is facing, from the user's perspective.
|
|
69
|
+
|
|
70
|
+
## Solution
|
|
71
|
+
|
|
72
|
+
The solution to the problem, from the user's perspective.
|
|
73
|
+
|
|
74
|
+
## User Stories
|
|
75
|
+
|
|
76
|
+
A LONG, numbered list of user stories. Each user story should be in the format of:
|
|
77
|
+
|
|
78
|
+
1. As an <actor>, I want a <feature>, so that <benefit>
|
|
79
|
+
|
|
80
|
+
<user-story-example>
|
|
81
|
+
1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
|
|
82
|
+
</user-story-example>
|
|
83
|
+
|
|
84
|
+
This list of user stories should be extremely extensive and cover all aspects of the feature.
|
|
85
|
+
|
|
86
|
+
## Implementation Decisions
|
|
87
|
+
|
|
88
|
+
A list of implementation decisions that were made. This can include:
|
|
89
|
+
|
|
90
|
+
- The modules that will be built/modified
|
|
91
|
+
- The interfaces of those modules that will be modified
|
|
92
|
+
- Technical clarifications from the developer
|
|
93
|
+
- Architectural decisions
|
|
94
|
+
- Schema changes
|
|
95
|
+
- API contracts
|
|
96
|
+
- Specific interactions
|
|
97
|
+
|
|
98
|
+
Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
|
|
99
|
+
|
|
100
|
+
Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
|
|
101
|
+
|
|
102
|
+
## Testing Decisions
|
|
103
|
+
|
|
104
|
+
A list of testing decisions that were made. Include:
|
|
105
|
+
|
|
106
|
+
- A description of what makes a good test (only test external behavior, not implementation details)
|
|
107
|
+
- **The seams**: every interface the tests drive through, named (module, function, command or endpoint), each marked existing or new. This list is the agreement a later implement session works from.
|
|
108
|
+
- Which modules will be tested
|
|
109
|
+
- Prior art for the tests (i.e. similar types of tests in the codebase)
|
|
110
|
+
|
|
111
|
+
## Out of Scope
|
|
112
|
+
|
|
113
|
+
A description of the things that are out of scope for this spec.
|
|
114
|
+
|
|
115
|
+
## Further Notes
|
|
116
|
+
|
|
117
|
+
Any further notes about the feature.
|
|
118
|
+
|
|
119
|
+
</spec-template>
|
|
@@ -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,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-tickets
|
|
3
|
+
description: Break a spec, plan, or the current conversation into numbered tracer-bullet ticket files under .agent/tickets/, each declaring its blocking edges and acceptance criteria phrased as observable behavior. Use after a spec is approved and before implementation starts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!--
|
|
7
|
+
Modified copy of https://github.com/mattpocock/skills/tree/3cca18b368ae95cdbdebbff572ccafa662551015/skills/engineering/to-tickets
|
|
8
|
+
(mattpocock-skills v1.2.3). Copyright (c) 2026 Matt Pocock, MIT — see LICENSE.
|
|
9
|
+
Changes: tickets always go to `.agent/tickets/<NN>-<slug>.md` (no tracker path);
|
|
10
|
+
numbering is contiguous from 01 in dependency order; acceptance criteria must state
|
|
11
|
+
observable behavior; the approval quiz is skipped when unattended; model
|
|
12
|
+
invocation is allowed.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# To Tickets
|
|
16
|
+
|
|
17
|
+
Break a plan, spec, or conversation into a set of **tickets**: tracer-bullet vertical slices, each declaring the tickets that **block** it.
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
### 1. Gather context
|
|
22
|
+
|
|
23
|
+
Work from whatever is already in the conversation context. If the user passes a reference (a spec path, an issue number or URL) as an argument, fetch it and read its full body and comments.
|
|
24
|
+
|
|
25
|
+
### 2. Explore the codebase (optional)
|
|
26
|
+
|
|
27
|
+
If you have not already explored the codebase, do so to understand the current state of the code. Ticket titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.
|
|
28
|
+
|
|
29
|
+
Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."
|
|
30
|
+
|
|
31
|
+
### 3. Draft vertical slices
|
|
32
|
+
|
|
33
|
+
Break the work into **tracer bullet** tickets.
|
|
34
|
+
|
|
35
|
+
<vertical-slice-rules>
|
|
36
|
+
|
|
37
|
+
- Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests): vertical, NOT a horizontal slice of one layer
|
|
38
|
+
- A completed slice is demoable or verifiable on its own
|
|
39
|
+
- Each slice is sized to fit in a single fresh context window
|
|
40
|
+
- Any prefactoring should be done first
|
|
41
|
+
|
|
42
|
+
</vertical-slice-rules>
|
|
43
|
+
|
|
44
|
+
Give each ticket its **blocking edges**: the other tickets that must complete before it can start. A ticket with no blockers can start immediately.
|
|
45
|
+
|
|
46
|
+
**Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change (rename a column, retype a shared symbol) whose **blast radius** fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket; green is promised only there.
|
|
47
|
+
|
|
48
|
+
### 4. Quiz the user (attended only)
|
|
49
|
+
|
|
50
|
+
When a human is in the loop, present the proposed breakdown as a numbered list. For each ticket, show:
|
|
51
|
+
|
|
52
|
+
- **Title**: short descriptive name
|
|
53
|
+
- **Blocked by**: which other tickets (if any) must complete first
|
|
54
|
+
- **What it delivers**: the end-to-end behaviour this ticket makes work
|
|
55
|
+
|
|
56
|
+
Ask the user:
|
|
57
|
+
|
|
58
|
+
- Does the granularity feel right? (too coarse / too fine)
|
|
59
|
+
- Are the blocking edges correct: does each ticket only depend on tickets that genuinely gate it?
|
|
60
|
+
- Should any tickets be merged or split further?
|
|
61
|
+
|
|
62
|
+
Iterate until the user approves the breakdown.
|
|
63
|
+
|
|
64
|
+
Running unattended (no human to answer), skip this step: the approved spec and the plan stage's own reviewers are the checkpoints. Write the tickets directly.
|
|
65
|
+
|
|
66
|
+
### 5. Write the ticket files
|
|
67
|
+
|
|
68
|
+
Write one file per ticket under `.agent/tickets/<NN>-<slug>.md`. `NN` is a two-digit number starting at `01`, assigned in dependency order (blockers first) with no gaps and no duplicates: a reader executes them in numeric order and the sequence must never stop early. Delete any stale files in that directory first so the set is exactly the tickets you drafted. Use the template below: one ticket per file, never a single combined file.
|
|
69
|
+
|
|
70
|
+
`.agent/` is working state, not source. It is never committed; check it is gitignored before committing anything else.
|
|
71
|
+
|
|
72
|
+
Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.
|
|
73
|
+
|
|
74
|
+
Do NOT close or modify any parent issue.
|
|
75
|
+
|
|
76
|
+
<ticket-template>
|
|
77
|
+
|
|
78
|
+
# <NN>: <Ticket title>
|
|
79
|
+
|
|
80
|
+
**What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective, not a layer-by-layer implementation list.
|
|
81
|
+
|
|
82
|
+
**Blocked by:** the numbers/titles of the tickets that gate this one, or "None (can start immediately)".
|
|
83
|
+
|
|
84
|
+
- [ ] Acceptance criterion 1
|
|
85
|
+
- [ ] Acceptance criterion 2
|
|
86
|
+
|
|
87
|
+
</ticket-template>
|
|
88
|
+
|
|
89
|
+
<acceptance-criteria-rule>
|
|
90
|
+
|
|
91
|
+
Every acceptance criterion states **observable behavior**: something a reviewer can check by running the product, a command, or a test, without reading the implementation. "Running `make test` passes with the new endpoint covered" and "A user with an expired token sees the login page" are criteria. "Add a `TokenExpiry` class" and "Refactor the auth module" are implementation steps and do not belong here.
|
|
92
|
+
|
|
93
|
+
</acceptance-criteria-rule>
|
|
94
|
+
|
|
95
|
+
Avoid specific file paths or code snippets: they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
|
|
@@ -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,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wizard
|
|
3
|
+
description: Generate an interactive bash wizard that walks a human through steps only they can perform, and that says for every captured value whether it ends up in CI, on the agent-ops box (1Password), or local only. 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
|
+
<!--
|
|
7
|
+
Modified copy of https://github.com/mattpocock/skills/tree/3cca18b368ae95cdbdebbff572ccafa662551015/skills/engineering/wizard
|
|
8
|
+
(mattpocock-skills v1.2.3). Copyright (c) 2026 Matt Pocock, MIT — see LICENSE.
|
|
9
|
+
Changes: every captured value declares a destination (ci, box, local); box values
|
|
10
|
+
are recorded with `box_ref` and the closing summary prints the exact 1Password
|
|
11
|
+
reference lines for the box's env template plus the not-live-until-converged
|
|
12
|
+
warning.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# Wizard
|
|
16
|
+
|
|
17
|
+
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, 1Password for the box), 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.
|
|
18
|
+
|
|
19
|
+
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, box credential references, 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.
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
## Destinations
|
|
24
|
+
|
|
25
|
+
Every captured value has exactly one of three destinations, decided in step 1 and visible in the script:
|
|
26
|
+
|
|
27
|
+
| Destination | Meaning | Helper |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `ci` | GitHub Actions reads it | `set_secret` / `set_var` |
|
|
30
|
+
| `box` | The agent-ops box reads it from 1Password through its env template | `box_ref KEY "op://agent-ops/<item>/<FIELD>"` after the human stores it |
|
|
31
|
+
| `local` | Only this machine's `.env` needs it | `write_env` alone |
|
|
32
|
+
|
|
33
|
+
A value can also be written to `.env` for local development on top of `ci` or `box`. The box is the one that silently fails: a wizard that captures a value the box needs but stops at the laptop finishes green while the box still cannot see it. `box_ref` is what makes that visible.
|
|
34
|
+
|
|
35
|
+
## Process
|
|
36
|
+
|
|
37
|
+
### 1. Scope the procedure
|
|
38
|
+
|
|
39
|
+
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:
|
|
40
|
+
|
|
41
|
+
- 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). For anything the box runs, also the env template in agent-ops (`provision/op.env.tpl`): every key there is a `box` value.
|
|
42
|
+
- For a migration or transition: the current state, the target state, and the irreversible actions between them.
|
|
43
|
+
|
|
44
|
+
Then show the user the ordered list of stages and the values each produces, and confirm: they may add, drop, or reorder.
|
|
45
|
+
|
|
46
|
+
**Done when:** every stage is named in order, and for each captured value you know (a) where the human gets it, (b) its destination (`ci`, `box` or `local`) plus whether `.env` also gets it, and (c) whether it's secret (hidden entry) or public.
|
|
47
|
+
|
|
48
|
+
### 2. Map each stage's journey
|
|
49
|
+
|
|
50
|
+
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". For a `box` value the journey continues into 1Password: which vault, item and field the human stores it under, which is exactly the `op://` reference the box will read. 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.
|
|
51
|
+
|
|
52
|
+
**Done when:** every stage traces to concrete instructions a stranger could follow.
|
|
53
|
+
|
|
54
|
+
### 3. Author the wizard
|
|
55
|
+
|
|
56
|
+
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`, `box_ref`, `pause`/`confirm`. Set `TOTAL_STAGES` to the number of stages you wrote.
|
|
57
|
+
|
|
58
|
+
Hold the bar the template sets: open the URL before asking for its value, use `ask_secret` for anything secret, `write_env` every value local development needs, `set_secret` only the values CI actually needs, `box_ref` every value the box needs (after a `step` telling the human where to store it in 1Password and a `pause`), 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.
|
|
59
|
+
|
|
60
|
+
### 4. Verify and hand off
|
|
61
|
+
|
|
62
|
+
- `bash -n <script>`; run `shellcheck` if available.
|
|
63
|
+
- `chmod +x <script>`.
|
|
64
|
+
- 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, every `set_secret` name exactly matches a `secrets.*` reference in CI, and every `box_ref` key matches a key the box's env template has or will get.
|
|
65
|
+
- Tell the user how to run it, and repeat what the closing summary will say: box values are not live until the env template change is merged in agent-ops and the box has converged. 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.
|