@agentshouse/kit 0.2.1-cbabe8ad337ff → 0.2.1-cc719fffeec71
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 +30 -29
- package/dist/acp.js +34 -14
- package/dist/agents.js +109 -22
- package/dist/api.js +6 -2
- package/dist/app-git.js +10 -26
- package/dist/bootstrap.json +4 -4
- package/dist/bridge.js +10 -24
- package/dist/chatgpt.js +32 -0
- package/dist/clis.js +51 -9
- package/dist/conversations.js +140 -70
- package/dist/copies.js +195 -119
- package/dist/end.js +18 -3
- package/dist/enrol-main.js +7 -1
- package/dist/events.js +4 -0
- package/dist/files.js +8 -2
- package/dist/git.js +10 -8
- package/dist/home.js +96 -7
- package/dist/house-cli.js +291 -0
- package/dist/house-main.js +7 -177
- package/dist/inputs.js +37 -0
- package/dist/instructions.js +10 -32
- package/dist/kit-cli.js +68 -0
- package/dist/kit-main.js +8 -22
- package/dist/login.js +112 -22
- package/dist/logout.js +0 -2
- package/dist/parts.js +34 -16
- package/dist/placement.js +30 -0
- package/dist/relay.js +12 -2
- package/dist/resident.js +82 -26
- package/dist/service-main.js +9 -0
- package/dist/service.js +55 -0
- package/dist/sign-in.js +5 -23
- package/dist/skills.js +81 -12
- package/dist/stream.js +68 -17
- package/dist/transcription.js +3 -3
- package/dist/update.js +48 -29
- package/dist/wire.js +6 -0
- package/dist/work.js +3 -5
- package/how-we-work.md +13 -3
- package/package.json +3 -2
- package/skills/ask-matt/SKILL.md +17 -11
- package/skills/ask-matt/agents/openai.yaml +1 -0
- package/skills/code-review/SKILL.md +5 -5
- package/skills/codebase-design/DESIGN-IT-TWICE.md +1 -1
- package/skills/codebase-design/SKILL.md +0 -2
- package/skills/diagnosing-bugs/SKILL.md +2 -4
- package/skills/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +10 -10
- package/skills/domain-modeling/SKILL.md +12 -14
- package/skills/grill-me/SKILL.md +1 -2
- package/skills/grill-me/agents/openai.yaml +1 -0
- package/skills/grill-with-docs/SKILL.md +1 -2
- package/skills/grill-with-docs/agents/openai.yaml +1 -0
- package/skills/grilling/SKILL.md +2 -2
- package/skills/handoff/SKILL.md +2 -3
- package/skills/handoff/agents/openai.yaml +1 -0
- package/skills/implement/SKILL.md +5 -4
- package/skills/implement/agents/openai.yaml +1 -0
- package/skills/implement-spec/SKILL.md +40 -0
- package/skills/implement-spec/agents/openai.yaml +5 -0
- package/skills/improve-codebase-architecture/SKILL.md +6 -7
- package/skills/improve-codebase-architecture/agents/openai.yaml +1 -0
- package/skills/pr/CREDITS.md +3 -0
- package/skills/pr/LICENSE +21 -0
- package/skills/pr/SKILL.md +170 -0
- package/skills/pr/agents/openai.yaml +3 -0
- package/skills/prototype/SKILL.md +0 -2
- package/skills/research/SKILL.md +0 -2
- package/skills/retro/LICENSE +21 -0
- package/skills/retro/SKILL.md +44 -0
- package/skills/retro/agents/openai.yaml +5 -0
- package/skills/tdd/SKILL.md +2 -4
- package/skills/teach/SKILL.md +3 -4
- package/skills/teach/agents/openai.yaml +1 -0
- package/skills/to-questionnaire/SKILL.md +1 -2
- package/skills/to-questionnaire/agents/openai.yaml +1 -0
- package/skills/to-spec/SKILL.md +1 -2
- package/skills/to-spec/agents/openai.yaml +1 -0
- package/skills/to-tickets/SKILL.md +3 -4
- package/skills/to-tickets/agents/openai.yaml +1 -0
- package/skills/triage/AGENT-BRIEF.md +207 -0
- package/skills/triage/LICENSE +21 -0
- package/skills/triage/OUT-OF-SCOPE.md +105 -0
- package/skills/triage/SKILL.md +112 -0
- package/skills/triage/agents/openai.yaml +5 -0
- package/skills/wait-what/SKILL.md +2 -3
- package/skills/wait-what/agents/openai.yaml +1 -0
- package/skills/wayfinder/SKILL.md +5 -6
- package/skills/wayfinder/agents/openai.yaml +1 -0
- package/skills/wizard/LICENSE +21 -0
- package/skills/wizard/SKILL.md +44 -0
- package/skills/wizard/agents/openai.yaml +3 -0
- package/skills/wizard/template.sh +223 -0
- package/skills/writing-for-agents/SKILL.md +0 -2
- package/skills/resolving-merge-conflicts/SKILL.md +0 -16
- package/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
- /package/skills/{resolving-merge-conflicts → implement-spec}/LICENSE +0 -0
|
@@ -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.
|
|
File without changes
|