skilledagent 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/AGENTS.MD +44 -0
- package/.agents/AGENTS_README.md +125 -0
- package/.agents/CONTEXT.md +19 -0
- package/.agents/skills/ask-matt/SKILL.md +76 -0
- package/.agents/skills/claude-handoff/SKILL.md +18 -0
- package/.agents/skills/code-review/SKILL.md +89 -0
- package/.agents/skills/codebase-design/DEEPENING.md +37 -0
- package/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/.agents/skills/codebase-design/SKILL.md +114 -0
- package/.agents/skills/design-an-interface/SKILL.md +94 -0
- package/.agents/skills/diagnosing-bugs/SKILL.md +134 -0
- package/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/domain-modeling/SKILL.md +74 -0
- package/.agents/skills/edit-article/SKILL.md +15 -0
- package/.agents/skills/git-guardrails-claude-code/SKILL.md +95 -0
- package/.agents/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
- package/.agents/skills/grill-me/SKILL.md +7 -0
- package/.agents/skills/grill-with-docs/SKILL.md +7 -0
- package/.agents/skills/grilling/SKILL.md +12 -0
- package/.agents/skills/handoff/SKILL.md +16 -0
- package/.agents/skills/implement/SKILL.md +15 -0
- package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/.agents/skills/improve-codebase-architecture/SKILL.md +66 -0
- package/.agents/skills/loop-me/SKILL.md +32 -0
- package/.agents/skills/migrate-to-shoehorn/SKILL.md +118 -0
- package/.agents/skills/obsidian-vault/SKILL.md +59 -0
- package/.agents/skills/prototype/LOGIC.md +79 -0
- package/.agents/skills/prototype/SKILL.md +26 -0
- package/.agents/skills/prototype/UI.md +112 -0
- package/.agents/skills/qa/SKILL.md +130 -0
- package/.agents/skills/request-refactor-plan/SKILL.md +68 -0
- package/.agents/skills/research/SKILL.md +12 -0
- package/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/.agents/skills/scaffold-exercises/SKILL.md +106 -0
- package/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
- package/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
- package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
- package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
- package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
- package/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/.agents/skills/setup-pre-commit/SKILL.md +91 -0
- package/.agents/skills/setup-ts-deep-modules/SKILL.md +102 -0
- package/.agents/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +95 -0
- package/.agents/skills/tdd/SKILL.md +36 -0
- package/.agents/skills/tdd/mocking.md +59 -0
- package/.agents/skills/tdd/tests.md +77 -0
- package/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/.agents/skills/teach/MISSION-FORMAT.md +31 -0
- package/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/.agents/skills/teach/SKILL.md +140 -0
- package/.agents/skills/to-spec/SKILL.md +75 -0
- package/.agents/skills/to-tickets/SKILL.md +107 -0
- package/.agents/skills/triage/AGENT-BRIEF.md +207 -0
- package/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/.agents/skills/triage/SKILL.md +112 -0
- package/.agents/skills/ubiquitous-language/SKILL.md +93 -0
- package/.agents/skills/wayfinder/SKILL.md +127 -0
- package/.agents/skills/wizard/SKILL.md +45 -0
- package/.agents/skills/wizard/template.sh +211 -0
- package/.agents/skills/writing-beats/SKILL.md +67 -0
- package/.agents/skills/writing-fragments/SKILL.md +79 -0
- package/.agents/skills/writing-great-skills/GLOSSARY.md +201 -0
- package/.agents/skills/writing-great-skills/SKILL.md +83 -0
- package/.agents/skills/writing-shape/SKILL.md +79 -0
- package/.agents/skills-lock.json +233 -0
- package/.agents/workflows/kickoff.md +211 -0
- package/README.md +63 -0
- package/bin/cli.js +24 -0
- package/package.json +28 -0
|
@@ -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** — same roles, same states, 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 - run `/setup-matt-pocock-skills` if not.
|
|
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) — 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, run the `/grilling` and `/domain-modeling` skills together — grill it into shape one question at a time, sharpening domain terms and updating `CONTEXT.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
|
+
- `wontfix` — close, 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)** — 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,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ubiquitous-language
|
|
3
|
+
description: Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Ubiquitous Language
|
|
8
|
+
|
|
9
|
+
Extract and formalize domain terminology from the current conversation into a consistent glossary, saved to a local file.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. **Scan the conversation** for domain-relevant nouns, verbs, and concepts
|
|
14
|
+
2. **Identify problems**:
|
|
15
|
+
- Same word used for different concepts (ambiguity)
|
|
16
|
+
- Different words used for the same concept (synonyms)
|
|
17
|
+
- Vague or overloaded terms
|
|
18
|
+
3. **Propose a canonical glossary** with opinionated term choices
|
|
19
|
+
4. **Write to `UBIQUITOUS_LANGUAGE.md`** in the working directory using the format below
|
|
20
|
+
5. **Output a summary** inline in the conversation
|
|
21
|
+
|
|
22
|
+
## Output Format
|
|
23
|
+
|
|
24
|
+
Write a `UBIQUITOUS_LANGUAGE.md` file with this structure:
|
|
25
|
+
|
|
26
|
+
```md
|
|
27
|
+
# Ubiquitous Language
|
|
28
|
+
|
|
29
|
+
## Order lifecycle
|
|
30
|
+
|
|
31
|
+
| Term | Definition | Aliases to avoid |
|
|
32
|
+
| ----------- | ------------------------------------------------------- | --------------------- |
|
|
33
|
+
| **Order** | A customer's request to purchase one or more items | Purchase, transaction |
|
|
34
|
+
| **Invoice** | A request for payment sent to a customer after delivery | Bill, payment request |
|
|
35
|
+
|
|
36
|
+
## People
|
|
37
|
+
|
|
38
|
+
| Term | Definition | Aliases to avoid |
|
|
39
|
+
| ------------ | ------------------------------------------- | ---------------------- |
|
|
40
|
+
| **Customer** | A person or organization that places orders | Client, buyer, account |
|
|
41
|
+
| **User** | An authentication identity in the system | Login, account |
|
|
42
|
+
|
|
43
|
+
## Relationships
|
|
44
|
+
|
|
45
|
+
- An **Invoice** belongs to exactly one **Customer**
|
|
46
|
+
- An **Order** produces one or more **Invoices**
|
|
47
|
+
|
|
48
|
+
## Example dialogue
|
|
49
|
+
|
|
50
|
+
> **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
|
|
51
|
+
> **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed. A single **Order** can produce multiple **Invoices** if items ship in separate **Shipments**."
|
|
52
|
+
> **Dev:** "So if a **Shipment** is cancelled before dispatch, no **Invoice** exists for it?"
|
|
53
|
+
> **Domain expert:** "Exactly. The **Invoice** lifecycle is tied to the **Fulfillment**, not the **Order**."
|
|
54
|
+
|
|
55
|
+
## Flagged ambiguities
|
|
56
|
+
|
|
57
|
+
- "account" was used to mean both **Customer** and **User** — these are distinct concepts: a **Customer** places orders, while a **User** is an authentication identity that may or may not represent a **Customer**.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
|
|
62
|
+
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
|
|
63
|
+
- **Flag conflicts explicitly.** If a term is used ambiguously in the conversation, call it out in the "Flagged ambiguities" section with a clear recommendation.
|
|
64
|
+
- **Only include terms relevant for domain experts.** Skip the names of modules or classes unless they have meaning in the domain language.
|
|
65
|
+
- **Keep definitions tight.** One sentence max. Define what it IS, not what it does.
|
|
66
|
+
- **Show relationships.** Use bold term names and express cardinality where obvious.
|
|
67
|
+
- **Only include domain terms.** Skip generic programming concepts (array, function, endpoint) unless they have domain-specific meaning.
|
|
68
|
+
- **Group terms into multiple tables** when natural clusters emerge (e.g. by subdomain, lifecycle, or actor). Each group gets its own heading and table. If all terms belong to a single cohesive domain, one table is fine — don't force groupings.
|
|
69
|
+
- **Write an example dialogue.** A short conversation (3-5 exchanges) between a dev and a domain expert that demonstrates how the terms interact naturally. The dialogue should clarify boundaries between related concepts and show terms being used precisely.
|
|
70
|
+
|
|
71
|
+
<example>
|
|
72
|
+
|
|
73
|
+
## Example dialogue
|
|
74
|
+
|
|
75
|
+
> **Dev:** "How do I test the **sync service** without Docker?"
|
|
76
|
+
|
|
77
|
+
> **Domain expert:** "Provide the **filesystem layer** instead of the **Docker layer**. It implements the same **Sandbox service** interface but uses a local directory as the **sandbox**."
|
|
78
|
+
|
|
79
|
+
> **Dev:** "So **sync-in** still creates a **bundle** and unpacks it?"
|
|
80
|
+
|
|
81
|
+
> **Domain expert:** "Exactly. The **sync service** doesn't know which layer it's talking to. It calls `exec` and `copyIn` — the **filesystem layer** just runs those as local shell commands."
|
|
82
|
+
|
|
83
|
+
</example>
|
|
84
|
+
|
|
85
|
+
## Re-running
|
|
86
|
+
|
|
87
|
+
When invoked again in the same conversation:
|
|
88
|
+
|
|
89
|
+
1. Read the existing `UBIQUITOUS_LANGUAGE.md`
|
|
90
|
+
2. Incorporate any new terms from subsequent discussion
|
|
91
|
+
3. Update definitions if understanding has evolved
|
|
92
|
+
4. Re-flag any new ambiguities
|
|
93
|
+
5. Rewrite the example dialogue to incorporate new terms
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wayfinder
|
|
3
|
+
description: Plan a huge chunk of work — more than one agent session can hold — as a shared map of investigation 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
|
|
5
|
+
---
|
|
6
|
+
|
|
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 tickets one at a time until the route is clear.
|
|
8
|
+
|
|
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.
|
|
10
|
+
|
|
11
|
+
## Plan, don't do
|
|
12
|
+
|
|
13
|
+
Wayfinder is **planning** by default: each ticket resolves a decision, and the map is done when the way is clear — nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its **Notes** — carrying execution into the map itself — but absent that, produce decisions, not deliverables.
|
|
14
|
+
|
|
15
|
+
## Refer by name
|
|
16
|
+
|
|
17
|
+
Every map and ticket is an issue, so it has a **name** — its title. In everything the human reads — narration, the map's Decisions-so-far — refer to it by that name, never by a bare id, number, or slug. A wall of `#42, #43, #44` is illegible; names read at a glance. The id and URL don't vanish — a name wraps its link — but they ride *inside* the name, never stand in for it.
|
|
18
|
+
|
|
19
|
+
## The Map
|
|
20
|
+
|
|
21
|
+
The map is a single issue on this repo's issue tracker, labelled `wayfinder:map` — the canonical artifact. Its tickets are child issues of the map.
|
|
22
|
+
|
|
23
|
+
The map is an **index**, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links.
|
|
24
|
+
|
|
25
|
+
**Where the map, its child tickets, blocking, and frontier queries physically live is tracker-specific.** The issue tracker should have been provided to you — run `/setup-matt-pocock-skills` if not. Consult the tracker doc's "Wayfinding operations" section for how _this_ repo expresses them. If no tracker has been provided, default to the local-markdown tracker.
|
|
26
|
+
|
|
27
|
+
### The map body
|
|
28
|
+
|
|
29
|
+
The whole map at low resolution, loaded once per session. Open tickets are **not** listed — they are open child issues, found by query.
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## Destination
|
|
33
|
+
|
|
34
|
+
<what reaching the end of this map looks like — the spec, decision, or change this effort is finding its way to. One or two lines; every session orients to it before choosing a ticket.>
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
<domain; skills every session should consult; standing preferences for this effort>
|
|
39
|
+
|
|
40
|
+
## Decisions so far
|
|
41
|
+
|
|
42
|
+
<!-- the index — one line per closed ticket: enough to judge relevance, then zoom the link for the detail the ticket holds -->
|
|
43
|
+
|
|
44
|
+
- [<closed ticket title>](link) — <one-line gist of the answer>
|
|
45
|
+
|
|
46
|
+
## Not yet specified
|
|
47
|
+
|
|
48
|
+
<!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->
|
|
49
|
+
|
|
50
|
+
## Out of scope
|
|
51
|
+
|
|
52
|
+
<!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Tickets
|
|
56
|
+
|
|
57
|
+
Each ticket is a **child issue** of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
## Question
|
|
61
|
+
|
|
62
|
+
<the decision or investigation this ticket resolves>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Each ticket carries a `wayfinder:<type>` label — one of `research`, `prototype`, `grilling`, `task` (see [Ticket Types](#ticket-types)).
|
|
66
|
+
|
|
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.
|
|
68
|
+
|
|
69
|
+
Blocking uses the tracker's **native** dependency relationship — essential because it renders the frontier _visually_ in the tracker's own UI, so the human sees what's takeable without opening the map. Only a tracker that lacks native blocking falls back to a body convention. A ticket is **unblocked** when every ticket blocking it is closed; the **frontier** is the open, unblocked, unclaimed children — the edge of the known.
|
|
70
|
+
|
|
71
|
+
The answer isn't part of the body — it's recorded on resolution (see [Work through the map](#work-through-the-map)). Assets created while resolving a ticket are linked from the issue, not pasted in.
|
|
72
|
+
|
|
73
|
+
## Ticket Types
|
|
74
|
+
|
|
75
|
+
Every ticket is either **HITL** — human in the loop, worked *with* a human who speaks for themselves — or **AFK**, driven by the agent alone. A HITL ticket only resolves through that live exchange; the agent never stands in for the human's side of it (a grilling agent that answers its own questions has broken this).
|
|
76
|
+
|
|
77
|
+
- **Research** (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases. Creates a markdown summary as a linked asset. Use when knowledge outside the current working directory is required.
|
|
78
|
+
- **Prototype** (HITL): Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI/logic code via the /prototype skill. Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question.
|
|
79
|
+
- **Grilling** (HITL): Conversation via the /grilling and /domain-modeling skills, one question at a time. The default case.
|
|
80
|
+
- **Task** (HITL or AFK): Manual work that must happen before a *decision* can be made — nothing to decide, prototype, or research, but the discussion is blocked until it's done. Signing up for a service so its API can be judged, provisioning access, moving data so its shape can be seen. This is the one type that *does* rather than decides — and it earns its place by unblocking a decision, not by delivering the destination. The agent drives it alone where it can (AFK); otherwise it hands the human a precise checklist (HITL). Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on.
|
|
81
|
+
|
|
82
|
+
## Fog of war
|
|
83
|
+
|
|
84
|
+
The map is _deliberately_ incomplete: don't chart what you can't yet see. Beyond the live tickets lies the **fog of war** — the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets — one at a time, until the way to the destination is clear and no tickets remain.
|
|
85
|
+
|
|
86
|
+
The map's **Not yet specified** section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier _toward_ the destination — everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed.
|
|
87
|
+
|
|
88
|
+
**Fog or ticket?** The test is whether you can state the question precisely now — _not_ whether you can answer it now.
|
|
89
|
+
|
|
90
|
+
- **Ticket when** the question is already sharp — even if it's blocked and you can't act on it yet.
|
|
91
|
+
- **Not yet specified when** you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it.
|
|
92
|
+
|
|
93
|
+
**Not yet specified** excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section).
|
|
94
|
+
|
|
95
|
+
## Out of scope
|
|
96
|
+
|
|
97
|
+
Fog only ever gathers _toward_ the destination. The destination fixes the scope, so work beyond it is **out of scope** — it isn't fog, and it doesn't belong in **Not yet specified**. It gets its own **Out of scope** section on the map: work you've consciously ruled out of _this_ effort. Scope, not sharpness, lands it here.
|
|
98
|
+
|
|
99
|
+
Out-of-scope work never graduates — the frontier stops at the destination — so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption.
|
|
100
|
+
|
|
101
|
+
Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination — mis-scoped in while charting, or exposed by a resolution — **close it** (a closed ticket is unambiguously off the frontier) and leave one line in the **Out of scope** section: the gist plus why it's out of scope, linking the closed ticket. It stays out of **Decisions so far**, which records the route actually walked — a scope boundary isn't a step on it.
|
|
102
|
+
|
|
103
|
+
## Invocation
|
|
104
|
+
|
|
105
|
+
Two modes. Either way, **never resolve more than one ticket per session.**
|
|
106
|
+
|
|
107
|
+
### Chart the map
|
|
108
|
+
|
|
109
|
+
User invokes with a loose idea.
|
|
110
|
+
|
|
111
|
+
1. **Name the destination.** Run a `/grilling` and `/domain-modeling` session 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.
|
|
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.
|
|
113
|
+
3. **Create the map** (label `wayfinder:map`): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into **Not yet specified**.
|
|
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). 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. Stop — charting the map is one session's work; do not also resolve tickets.
|
|
116
|
+
|
|
117
|
+
### Work through the map
|
|
118
|
+
|
|
119
|
+
User invokes with a map (URL or number). A ticket is **optional** — without one, you pick the next decision, not the user.
|
|
120
|
+
|
|
121
|
+
1. Load the **map** — the low-res view, not every ticket body.
|
|
122
|
+
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.
|
|
123
|
+
3. Resolve it — **zoom as needed**: fetch the full body of any related or closed ticket on demand; invoke the skills the `## Notes` block names. If in doubt, use `/grilling` and `/domain-modeling`.
|
|
124
|
+
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.
|
|
125
|
+
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 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.
|
|
126
|
+
|
|
127
|
+
The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wizard
|
|
3
|
+
description: Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, a one-off migration, an A→B state transition — opening URLs, capturing values, confirming each step, and writing .env files and GitHub Actions secrets.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Wizard
|
|
8
|
+
|
|
9
|
+
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 much is left. It might configure third-party services, run a one-off migration, or move the project from one state to another.
|
|
10
|
+
|
|
11
|
+
The delightful UX is already solved by [template.sh](template.sh) — progress with time-remaining, 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.
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
### 1. Scope the procedure
|
|
18
|
+
|
|
19
|
+
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:
|
|
20
|
+
|
|
21
|
+
- 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).
|
|
22
|
+
- For a migration or transition: the current state, the target state, and the irreversible actions between them.
|
|
23
|
+
|
|
24
|
+
Then show the user the ordered list of stages and the values each produces, and confirm — they may add, drop, or reorder.
|
|
25
|
+
|
|
26
|
+
**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.
|
|
27
|
+
|
|
28
|
+
### 2. Map each stage's journey
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
**Done when:** every stage traces to concrete instructions a stranger could follow.
|
|
33
|
+
|
|
34
|
+
### 3. Author the wizard
|
|
35
|
+
|
|
36
|
+
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` — and set `TOTAL_STAGES` and `TOTAL_MINUTES` to honest estimates (this drives the time-remaining display).
|
|
37
|
+
|
|
38
|
+
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.
|
|
39
|
+
|
|
40
|
+
### 4. Verify and hand off
|
|
41
|
+
|
|
42
|
+
- `bash -n <script>`; run `shellcheck` if available.
|
|
43
|
+
- `chmod +x <script>`.
|
|
44
|
+
- 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.
|
|
45
|
+
- 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,211 @@
|
|
|
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); RED=$(tput setaf 1)
|
|
18
|
+
else
|
|
19
|
+
BOLD=""; DIM=""; RESET=""; BLUE=""; GREEN=""; YELLOW=""; RED=""
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Author sets these two at the top of the stages section.
|
|
23
|
+
TOTAL_STAGES=0
|
|
24
|
+
TOTAL_MINUTES=0
|
|
25
|
+
|
|
26
|
+
_STAGE_INDEX=0
|
|
27
|
+
_MINUTES_ELAPSED=0
|
|
28
|
+
ENV_FILE="${ENV_FILE:-.env}"
|
|
29
|
+
WRITTEN_ENV=() # KEYs written to ENV_FILE this run
|
|
30
|
+
WRITTEN_SECRET=() # secret NAMEs set this run
|
|
31
|
+
SKIPPED=() # things we couldn't do (e.g. gh missing)
|
|
32
|
+
|
|
33
|
+
# _clear — wipe the terminal so only the current step is on screen. No-op when
|
|
34
|
+
# output isn't a terminal, so piped logs stay readable.
|
|
35
|
+
_clear() {
|
|
36
|
+
[[ -t 1 ]] || return 0
|
|
37
|
+
if command -v tput >/dev/null 2>&1; then tput clear; else printf '\033[2J\033[3J\033[H'; fi
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# banner "Title" — opening frame: what this wizard does and how long it takes.
|
|
41
|
+
banner() {
|
|
42
|
+
_clear
|
|
43
|
+
printf '\n%s%s %s%s\n' "$BOLD" "$BLUE" "$1" "$RESET"
|
|
44
|
+
printf '%s %s stages · about %s minutes%s\n\n' \
|
|
45
|
+
"$DIM" "$TOTAL_STAGES" "$TOTAL_MINUTES" "$RESET"
|
|
46
|
+
printf '%s You drive the browser; this wizard tells you exactly what to do and\n' "$DIM"
|
|
47
|
+
printf ' captures the values you copy back. Stop any time with Ctrl-C and re-run\n'
|
|
48
|
+
printf ' later — it remembers values already saved.%s\n' "$RESET"
|
|
49
|
+
pause "Ready to start?"
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# stage "Name" <minutes> — clear the screen, then announce a stage and show
|
|
53
|
+
# progress + time remaining. Clearing keeps only the current step on screen.
|
|
54
|
+
stage() {
|
|
55
|
+
_clear
|
|
56
|
+
_STAGE_INDEX=$((_STAGE_INDEX + 1))
|
|
57
|
+
local remaining=$((TOTAL_MINUTES - _MINUTES_ELAPSED))
|
|
58
|
+
(( remaining < 0 )) && remaining=0
|
|
59
|
+
_MINUTES_ELAPSED=$((_MINUTES_ELAPSED + ${2:-0}))
|
|
60
|
+
printf '\n%s%s▸ Stage %s/%s · %s%s %s(~%s min left)%s\n' \
|
|
61
|
+
"$BOLD" "$BLUE" "$_STAGE_INDEX" "$TOTAL_STAGES" "$1" "$RESET" "$DIM" "$remaining" "$RESET"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# say "..." — a plain instruction line.
|
|
65
|
+
say() { printf ' %s\n' "$1"; }
|
|
66
|
+
# step "..." — a numbered-feeling action the human takes in the browser.
|
|
67
|
+
step() { printf ' %s•%s %s\n' "$BLUE" "$RESET" "$1"; }
|
|
68
|
+
note() { printf ' %s%s%s\n' "$DIM" "$1" "$RESET"; }
|
|
69
|
+
warn() { printf ' %s⚠ %s%s\n' "$YELLOW" "$1" "$RESET"; }
|
|
70
|
+
|
|
71
|
+
# open_url URL — open in the human's browser, cross-platform incl. WSL.
|
|
72
|
+
open_url() {
|
|
73
|
+
local url="$1"
|
|
74
|
+
printf ' %s↗ opening%s %s\n' "$GREEN" "$RESET" "$url"
|
|
75
|
+
{ if command -v wslview >/dev/null 2>&1; then wslview "$url"
|
|
76
|
+
elif command -v explorer.exe >/dev/null 2>&1; then explorer.exe "$url"
|
|
77
|
+
elif command -v xdg-open >/dev/null 2>&1; then xdg-open "$url"
|
|
78
|
+
elif command -v open >/dev/null 2>&1; then open "$url"
|
|
79
|
+
else warn "couldn't open a browser — visit it manually: $url"; fi
|
|
80
|
+
} >/dev/null 2>&1 || warn "couldn't open a browser — visit it manually: $url"
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# pause "msg" — wait for the human to confirm they've done the manual part.
|
|
84
|
+
pause() {
|
|
85
|
+
printf ' %s%s%s ' "$DIM" "${1:-Press Enter to continue}" "$RESET"
|
|
86
|
+
read -r _ || true
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
# confirm "question" — y/N gate; returns success on yes.
|
|
90
|
+
confirm() {
|
|
91
|
+
local reply=""
|
|
92
|
+
printf ' %s? %s [y/N] ' "$YELLOW" "$1"
|
|
93
|
+
read -r reply || true
|
|
94
|
+
[[ "$reply" =~ ^[Yy] ]]
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
# _existing KEY — current value of KEY in ENV_FILE, if any.
|
|
98
|
+
_existing() {
|
|
99
|
+
[[ -f "$ENV_FILE" ]] || return 1
|
|
100
|
+
local line; line=$(grep -E "^${1}=" "$ENV_FILE" | tail -n1) || return 1
|
|
101
|
+
printf '%s' "${line#*=}"
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# ask KEY "Prompt" — read a value into $KEY. Offers the existing .env value as
|
|
105
|
+
# a default on re-runs (Enter keeps it). Visible input (non-secret).
|
|
106
|
+
ask() {
|
|
107
|
+
local key="$1" prompt="$2" current input
|
|
108
|
+
current=$(_existing "$key" || true)
|
|
109
|
+
if [[ -n "$current" ]]; then
|
|
110
|
+
printf ' %s%s%s %s[Enter keeps current]%s ' "$BOLD" "$prompt" "$RESET" "$DIM" "$RESET"
|
|
111
|
+
else
|
|
112
|
+
printf ' %s%s%s ' "$BOLD" "$prompt" "$RESET"
|
|
113
|
+
fi
|
|
114
|
+
read -r input || true
|
|
115
|
+
[[ -z "$input" && -n "$current" ]] && input="$current"
|
|
116
|
+
printf -v "$key" '%s' "$input"
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
# ask_secret KEY "Prompt" — like ask, but input is hidden.
|
|
120
|
+
ask_secret() {
|
|
121
|
+
local key="$1" prompt="$2" current input
|
|
122
|
+
current=$(_existing "$key" || true)
|
|
123
|
+
if [[ -n "$current" ]]; then
|
|
124
|
+
printf ' %s%s%s %s[Enter keeps current]%s ' "$BOLD" "$prompt" "$RESET" "$DIM" "$RESET"
|
|
125
|
+
else
|
|
126
|
+
printf ' %s%s%s ' "$BOLD" "$prompt" "$RESET"
|
|
127
|
+
fi
|
|
128
|
+
read -rs input || true
|
|
129
|
+
printf '\n'
|
|
130
|
+
[[ -z "$input" && -n "$current" ]] && input="$current"
|
|
131
|
+
printf -v "$key" '%s' "$input"
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
# write_env KEY VALUE — upsert KEY=VALUE into ENV_FILE (creates it; replaces
|
|
135
|
+
# any existing line). Idempotent.
|
|
136
|
+
write_env() {
|
|
137
|
+
local key="$1" value="$2" tmp
|
|
138
|
+
touch "$ENV_FILE"
|
|
139
|
+
tmp=$(mktemp)
|
|
140
|
+
grep -vE "^${key}=" "$ENV_FILE" > "$tmp" || true
|
|
141
|
+
printf '%s=%s\n' "$key" "$value" >> "$tmp"
|
|
142
|
+
mv "$tmp" "$ENV_FILE"
|
|
143
|
+
WRITTEN_ENV+=("$key")
|
|
144
|
+
printf ' %s✓ wrote%s %s → %s\n' "$GREEN" "$RESET" "$key" "$ENV_FILE"
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
# set_secret NAME VALUE — set a GitHub Actions repo secret via gh. Falls back
|
|
148
|
+
# to a warning (and records it) if gh is unavailable or unauthenticated.
|
|
149
|
+
set_secret() {
|
|
150
|
+
local name="$1" value="$2"
|
|
151
|
+
if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then
|
|
152
|
+
if printf '%s' "$value" | gh secret set "$name" >/dev/null 2>&1; then
|
|
153
|
+
WRITTEN_SECRET+=("$name")
|
|
154
|
+
printf ' %s✓ set%s GitHub secret %s\n' "$GREEN" "$RESET" "$name"
|
|
155
|
+
return
|
|
156
|
+
fi
|
|
157
|
+
fi
|
|
158
|
+
SKIPPED+=("GitHub secret $name (set it manually: gh secret set $name)")
|
|
159
|
+
warn "skipped GitHub secret $name — gh not ready; set it later"
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
# set_var NAME VALUE — set a GitHub Actions repo variable (non-secret).
|
|
163
|
+
set_var() {
|
|
164
|
+
local name="$1" value="$2"
|
|
165
|
+
if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then
|
|
166
|
+
if gh variable set "$name" --body "$value" >/dev/null 2>&1; then
|
|
167
|
+
printf ' %s✓ set%s GitHub variable %s\n' "$GREEN" "$RESET" "$name"
|
|
168
|
+
return
|
|
169
|
+
fi
|
|
170
|
+
fi
|
|
171
|
+
SKIPPED+=("GitHub variable $name")
|
|
172
|
+
warn "skipped GitHub variable $name — gh not ready; set it later"
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
# finish — clear, then a closing summary of everything configured.
|
|
176
|
+
finish() {
|
|
177
|
+
_clear
|
|
178
|
+
printf '\n%s%s ✓ Setup complete%s\n' "$BOLD" "$GREEN" "$RESET"
|
|
179
|
+
(( ${#WRITTEN_ENV[@]} )) && note "wrote ${#WRITTEN_ENV[@]} value(s) to $ENV_FILE: ${WRITTEN_ENV[*]}"
|
|
180
|
+
(( ${#WRITTEN_SECRET[@]} )) && note "set ${#WRITTEN_SECRET[@]} GitHub secret(s): ${WRITTEN_SECRET[*]}"
|
|
181
|
+
if (( ${#SKIPPED[@]} )); then
|
|
182
|
+
printf '\n'; warn "still to do by hand:"
|
|
183
|
+
for s in "${SKIPPED[@]}"; do note " - $s"; done
|
|
184
|
+
fi
|
|
185
|
+
printf '\n'
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
189
|
+
# STAGES — author this section. One stage() per step the human takes.
|
|
190
|
+
# Replace the example below. Set the two totals to match the stages you write.
|
|
191
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
192
|
+
|
|
193
|
+
TOTAL_STAGES=1
|
|
194
|
+
TOTAL_MINUTES=5
|
|
195
|
+
|
|
196
|
+
banner "Stripe setup"
|
|
197
|
+
|
|
198
|
+
# ── Example stage: replace with your real steps ───────────────────────────
|
|
199
|
+
stage "Stripe — API keys" 5
|
|
200
|
+
say "We'll grab your Stripe test keys and store them for local dev + CI."
|
|
201
|
+
open_url "https://dashboard.stripe.com/test/apikeys"
|
|
202
|
+
step "On the API keys page, copy the Publishable key (starts pk_test_)."
|
|
203
|
+
ask STRIPE_PUBLISHABLE_KEY "Paste the publishable key:"
|
|
204
|
+
step "Click 'Reveal test key' on the Secret key row, then copy it."
|
|
205
|
+
ask_secret STRIPE_SECRET_KEY "Paste the secret key:"
|
|
206
|
+
write_env STRIPE_PUBLISHABLE_KEY "$STRIPE_PUBLISHABLE_KEY"
|
|
207
|
+
write_env STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY"
|
|
208
|
+
set_secret STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY" # CI needs this one
|
|
209
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
210
|
+
|
|
211
|
+
finish
|