@codewizard-dt/bootstrap 2.17.0 → 2.18.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/lib/hooks/README.md +94 -3
- package/lib/hooks/absolute-path-guard.js +5 -0
- package/lib/hooks/claude-settings-guard.js +5 -0
- package/lib/hooks/env-content-read-guard.js +13 -3
- package/lib/hooks/env-file-guard.js +42 -0
- package/lib/hooks/interpreter-indirection-guard.js +7 -0
- package/lib/hooks/lib/command-parse.js +8 -0
- package/lib/hooks/lib/serena-languages.js +94 -1
- package/lib/hooks/lib/serena.js +228 -0
- package/lib/hooks/mv-absolute-path-block.js +84 -3
- package/lib/hooks/package-install-consent.js +11 -0
- package/lib/hooks/protected-write-guard.js +7 -0
- package/lib/hooks/serena-bash-grep-block.js +507 -44
- package/lib/hooks/serena-first-glob-guard.js +65 -20
- package/lib/hooks/serena-first-guard.js +98 -2
- package/lib/hooks/serena-first-read-guard.js +92 -2
- package/lib/hooks/serena-pre-delegation.js +123 -0
- package/lib/hooks/serena-write-guard.js +56 -3
- package/lib/scripts/README.md +296 -1
- package/lib/scripts/bootstrap-prefs.js +734 -0
- package/lib/scripts/install-global.sh +147 -18
- package/lib/scripts/install-mcps.sh +102 -14
- package/lib/scripts/lib.sh +581 -11
- package/lib/scripts/merge-gitignore.sh +201 -15
- package/lib/scripts/sync-wiki-scaffold.sh +33 -4
- package/lib/scripts/templates/CLAUDE-wiki.md +1 -1
- package/lib/scripts/templates/bootstrap-prefs-schema.json +175 -0
- package/lib/scripts/update-project.sh +42 -9
- package/lib/skills/README.md +2 -1
- package/lib/skills/bootstrap-config/SKILL.md +154 -0
- package/lib/skills/git-commit/SKILL.md +54 -1
- package/lib/skills/research/SKILL.md +34 -3
- package/lib/skills/simplify/SKILL.md +1 -1
- package/lib/skills/uat-auto/SKILL.md +9 -4
- package/lib/skills/uat-auto-plus/SKILL.md +6 -6
- package/lib/skills/uat-generate/SKILL.md +30 -3
- package/lib/skills/uat-walk/UAT-CORE.md +41 -6
- package/lib/skills/wiki-query/SKILL.md +48 -8
- package/package.json +1 -1
|
@@ -36,8 +36,8 @@ PROJECT_DIR="$(resolve_project_dir "$1")" || exit 1
|
|
|
36
36
|
TARGET="$PROJECT_DIR/.gitignore"
|
|
37
37
|
|
|
38
38
|
# Interactive-only: without a tty there is nobody to ask, and we never add
|
|
39
|
-
# .gitignore entries without asking.
|
|
40
|
-
if [ "$INTERACTIVE" = false ] ||
|
|
39
|
+
# .gitignore entries without asking. has_tty (lib.sh) is the tty seam — it also honours BOOTSTRAP_ASSUME_TTY=1.
|
|
40
|
+
if [ "$INTERACTIVE" = false ] || ! has_tty; then
|
|
41
41
|
echo ".gitignore: skipped (interactive only — run 'npx @codewizard-dt/bootstrap update' in a terminal to be offered the sections)."
|
|
42
42
|
exit 0
|
|
43
43
|
fi
|
|
@@ -147,13 +147,35 @@ done
|
|
|
147
147
|
# section loop ONLY — the .git/info/exclude block below is a different mechanism
|
|
148
148
|
# (machine-local, never committed) and keeps its own prompt, so declining here
|
|
149
149
|
# still lets the sentinel repair run.
|
|
150
|
+
#
|
|
151
|
+
# The remembered answer is read with `prefs_get` rather than `prompt_yn_sticky`
|
|
152
|
+
# because this key is `scope: either`: it must resolve project → global →
|
|
153
|
+
# default. `prompt_yn_sticky` is single-selector by design (see the banner at
|
|
154
|
+
# lib.sh:226-232), which is correct only for `global`/`project` keys.
|
|
150
155
|
review_sections=0
|
|
151
156
|
if [ "$total_missing" -eq 0 ]; then
|
|
152
157
|
echo ".gitignore: already has everything the template offers in $PROJECT_DIR"
|
|
153
|
-
elif prompt_yn " Review .gitignore updates? ($total_missing line(s) across $sections_offered section(s)) [y/N]: "; then
|
|
154
|
-
review_sections=1
|
|
155
158
|
else
|
|
156
|
-
|
|
159
|
+
case "$(prefs_get gitignore.offerSectionUpdates "$PROJECT_DIR")" in
|
|
160
|
+
false)
|
|
161
|
+
echo ".gitignore: skipped entirely — no sections offered. (remembered answer gitignore.offerSectionUpdates=false — change with /bootstrap-config)"
|
|
162
|
+
;;
|
|
163
|
+
true)
|
|
164
|
+
# Schema default. The opening gate is dropped, but every section is still
|
|
165
|
+
# offered by title below, so nothing is ever appended silently.
|
|
166
|
+
review_sections=1
|
|
167
|
+
echo ".gitignore: opening gate off (remembered answer gitignore.offerSectionUpdates=true — change with /bootstrap-config); each section is still offered by title."
|
|
168
|
+
;;
|
|
169
|
+
*)
|
|
170
|
+
# `ask`, `unset`, or an unrecognized value — today's behavior.
|
|
171
|
+
if prompt_yn " Review .gitignore updates? ($total_missing line(s) across $sections_offered section(s)) [y/N]: "; then
|
|
172
|
+
review_sections=1
|
|
173
|
+
else
|
|
174
|
+
prefs_set gitignore.offerSectionUpdates "$PROJECT_DIR" false
|
|
175
|
+
echo ".gitignore: skipped entirely — no sections offered."
|
|
176
|
+
fi
|
|
177
|
+
;;
|
|
178
|
+
esac
|
|
157
179
|
fi
|
|
158
180
|
|
|
159
181
|
if [ "$review_sections" -eq 1 ]; then
|
|
@@ -164,15 +186,47 @@ if [ "$review_sections" -eq 1 ]; then
|
|
|
164
186
|
[ -f "$WORK_DIR/title.$i" ] && TITLE="$(cat "$WORK_DIR/title.$i")"
|
|
165
187
|
missing="$(section_missing_count "$SEC")"
|
|
166
188
|
if [ "$missing" -gt 0 ]; then
|
|
167
|
-
#
|
|
168
|
-
#
|
|
169
|
-
#
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
189
|
+
# The title -> key slug is computed by bootstrap-prefs.js, NOT here. One
|
|
190
|
+
# banner title contains an em dash (U+2014): "Claude Code — machine-local
|
|
191
|
+
# MCP registration (...)". A byte-wise awk/sed `[^a-z0-9]` slugifier sees
|
|
192
|
+
# that character as three UTF-8 bytes and emits three dashes; the helper's
|
|
193
|
+
# JS regex carries the `u` flag and emits one. Keeping a single Unicode-
|
|
194
|
+
# aware implementation of the rule is the whole reason for the subshell.
|
|
195
|
+
#
|
|
196
|
+
# Guarded so a key we cannot compute never silently suppresses a section:
|
|
197
|
+
# --section-key exits 1 when a title slugifies to empty, node may be absent
|
|
198
|
+
# entirely, and this script runs under `set -euo pipefail`. On any failure
|
|
199
|
+
# SECTION_KEY stays empty and we fall back to the unconditional prompt.
|
|
200
|
+
SECTION_KEY=""
|
|
201
|
+
if [ -f "$BOOTSTRAP_PREFS_JS" ] && command -v node >/dev/null 2>&1; then
|
|
202
|
+
SECTION_KEY="$(node "$BOOTSTRAP_PREFS_JS" --section-key "$TITLE" 2>/dev/null)" || SECTION_KEY=""
|
|
203
|
+
fi
|
|
204
|
+
if [ -z "$SECTION_KEY" ]; then
|
|
205
|
+
echo " Warning: could not compute a preference key for .gitignore section '$TITLE' — asking every time." >&2
|
|
206
|
+
fi
|
|
207
|
+
|
|
208
|
+
if [ -n "$SECTION_KEY" ] && [ "$(prefs_get "$SECTION_KEY" "$PROJECT_DIR")" = "false" ]; then
|
|
209
|
+
# Remembered decline: skip BEFORE the preview. Re-listing lines the user
|
|
210
|
+
# already refused is the noise the remembered answer exists to remove.
|
|
211
|
+
echo " .gitignore section '$TITLE': skipped (remembered answer $SECTION_KEY=false — change with /bootstrap-config)."
|
|
174
212
|
else
|
|
175
|
-
|
|
213
|
+
# Show the actual lines before asking. Comment/blank lines are omitted:
|
|
214
|
+
# they are only written as headers when a real entry follows, so listing
|
|
215
|
+
# them would misrepresent what the "y" adds.
|
|
216
|
+
echo " .gitignore section '$TITLE' would add $missing line(s):"
|
|
217
|
+
section_missing_lines "$SEC"
|
|
218
|
+
if prompt_yn " Add these to .gitignore? [y/N]: "; then
|
|
219
|
+
# Deliberately records NOTHING on accept. A remembered `true` would
|
|
220
|
+
# append on the next run without asking and break the promise at the
|
|
221
|
+
# top of this file; the schema's one-value grammar (values: "false")
|
|
222
|
+
# already rejects it, so there is no second copy of the rule here.
|
|
223
|
+
merge_section "$SEC"
|
|
224
|
+
else
|
|
225
|
+
if [ -n "$SECTION_KEY" ]; then
|
|
226
|
+
prefs_set "$SECTION_KEY" "$PROJECT_DIR" false
|
|
227
|
+
fi
|
|
228
|
+
echo " .gitignore section '$TITLE': skipped."
|
|
229
|
+
fi
|
|
176
230
|
fi
|
|
177
231
|
fi
|
|
178
232
|
i=$((i + 1))
|
|
@@ -310,17 +364,149 @@ if [ -d "$PROJECT_DIR/.git" ]; then
|
|
|
310
364
|
: # already canonical — leave the file byte-identical
|
|
311
365
|
elif [ "$exclude_missing" -gt 0 ]; then
|
|
312
366
|
# Accepting newly hides paths from git, so this stays a consent prompt.
|
|
313
|
-
|
|
367
|
+
#
|
|
368
|
+
# `gitignore.infoExclude` is declines-only: a decline records `false` and
|
|
369
|
+
# suppresses the re-offer, an accept records NOTHING, because accepting
|
|
370
|
+
# changes the world and `exclude_is_canonical` above already makes it
|
|
371
|
+
# sticky. Keep this key distinct from `gitignore.offerSectionUpdates` (the
|
|
372
|
+
# .gitignore section pass) and `prefs.gitTracking` (the preference files
|
|
373
|
+
# themselves) — declining one must never disable another.
|
|
374
|
+
if [ "$(prefs_get gitignore.infoExclude "$PROJECT_DIR")" = "false" ]; then
|
|
375
|
+
echo " .git/info/exclude: skipped (remembered answer gitignore.infoExclude=false — change with /bootstrap-config)."
|
|
376
|
+
elif prompt_yn " Keep .serena/, raw/, wiki/ out of git on THIS machine (.git/info/exclude — not shared with the team; visible to Serena; @-autocomplete restored via the installed fileSuggestion script)? [y/N]: "; then
|
|
314
377
|
if exclude_apply; then
|
|
315
378
|
printf '%s' "$exclude_added"
|
|
316
379
|
echo " Note: this protects only this clone — teammates opt in by running 'npx @codewizard-dt/bootstrap update' themselves."
|
|
317
380
|
fi
|
|
381
|
+
else
|
|
382
|
+
prefs_set gitignore.infoExclude "$PROJECT_DIR" false
|
|
318
383
|
fi
|
|
319
384
|
else
|
|
320
385
|
# All three are already excluded somewhere in the file: git's behaviour does
|
|
321
|
-
# not change, only the picker's view of it. A pure repair, so no prompt
|
|
386
|
+
# not change, only the picker's view of it. A pure repair, so no prompt —
|
|
387
|
+
# deliberately regardless of the stored `gitignore.infoExclude` value, since
|
|
388
|
+
# a decline refuses newly hiding paths, not repairing a sentinel.
|
|
322
389
|
if exclude_apply; then
|
|
323
390
|
echo " .git/info/exclude: reordered .serena/, raw/, wiki/ under the bootstrap sentinel (git unchanged; restores @-autocomplete)"
|
|
324
391
|
fi
|
|
325
392
|
fi
|
|
326
393
|
fi
|
|
394
|
+
|
|
395
|
+
# ---------------------------------------------------------------------------
|
|
396
|
+
# How should git treat the preference files themselves?
|
|
397
|
+
#
|
|
398
|
+
# Asked LAST, after both passes above, so that any answer recorded earlier in
|
|
399
|
+
# this run has already created <project>/.claude/bootstrap-prefs.json and its
|
|
400
|
+
# generated companion .claude/bootstrap-prefs.README.md. The paths being offered
|
|
401
|
+
# therefore actually exist, and the user can open them before deciding.
|
|
402
|
+
#
|
|
403
|
+
# Chicken-and-egg, and it needs no special handling: the answer to this question
|
|
404
|
+
# lives in the very file the question governs. The values file is created by the
|
|
405
|
+
# first recorded answer and the question is asked afterwards, so the file is
|
|
406
|
+
# always there by the time we get here. `[3] neither` is a pure no-op that
|
|
407
|
+
# leaves prior state untouched, and `[1]` writes to .gitignore while the user is
|
|
408
|
+
# being asked, explicitly, right then — so the promise in this file's header
|
|
409
|
+
# comment (nothing reaches a project's .gitignore unasked) holds for that
|
|
410
|
+
# branch too.
|
|
411
|
+
#
|
|
412
|
+
# `prefs.gitTracking` is the ONE key in this script recorded in ALL THREE
|
|
413
|
+
# directions. The declines-only rule that governs gitignore.offerSectionUpdates
|
|
414
|
+
# and gitignore.infoExclude deliberately does NOT apply: this is a choice among
|
|
415
|
+
# three outcomes, not a yes/no on adding lines, so every answer is a real
|
|
416
|
+
# decision worth remembering. prompt_choice_sticky does that recording itself —
|
|
417
|
+
# do NOT also call prefs_set. One answer governs BOTH files; they live in the
|
|
418
|
+
# same directory precisely so a single question can cover them.
|
|
419
|
+
#
|
|
420
|
+
# The `has_tty` guard is belt-and-braces — the tty check at :40 already exits
|
|
421
|
+
# before this point on a non-interactive run. It stays because it is the seam a
|
|
422
|
+
# rework of that guard hangs off, and because reaching prompt_choice_sticky
|
|
423
|
+
# without a tty would resolve to the default without anyone being asked.
|
|
424
|
+
# ---------------------------------------------------------------------------
|
|
425
|
+
if has_tty; then
|
|
426
|
+
# The two governed paths, defined once.
|
|
427
|
+
PREFS_VALUES_PATH=".claude/bootstrap-prefs.json"
|
|
428
|
+
PREFS_README_PATH=".claude/bootstrap-prefs.README.md"
|
|
429
|
+
|
|
430
|
+
echo " How should .claude/bootstrap-prefs.json be treated by git?"
|
|
431
|
+
echo " [1] .gitignore — ignored for everyone who clones this repo (shared decision)"
|
|
432
|
+
echo " [2] .git/info/exclude — ignored on this machine only, teammates unaffected (default)"
|
|
433
|
+
echo " [3] neither — commit it, so the whole team shares these answers"
|
|
434
|
+
# Resolution is POSITIONAL: the trailing name list must stay in the printed
|
|
435
|
+
# menu order above, or a typed digit silently resolves to the wrong outcome.
|
|
436
|
+
answer="$(prompt_choice_sticky prefs.gitTracking "$PROJECT_DIR" exclude " How should we proceed? [1/2/3]: " gitignore exclude neither)"
|
|
437
|
+
|
|
438
|
+
case "$answer" in
|
|
439
|
+
gitignore)
|
|
440
|
+
prefs_written=0
|
|
441
|
+
for p in "$PREFS_VALUES_PATH" "$PREFS_README_PATH"; do
|
|
442
|
+
if [ -f "$TARGET" ] && grep -qFx -- "$p" "$TARGET"; then
|
|
443
|
+
continue
|
|
444
|
+
fi
|
|
445
|
+
if [ "$prefs_written" -eq 0 ]; then
|
|
446
|
+
if [ -s "$TARGET" ]; then
|
|
447
|
+
# Same idiom as merge_section: $() strips a trailing newline, so a
|
|
448
|
+
# non-empty result means the file does not end in one.
|
|
449
|
+
if [ -n "$(tail -c1 "$TARGET")" ]; then printf '\n' >> "$TARGET"; fi
|
|
450
|
+
printf '\n' >> "$TARGET"
|
|
451
|
+
fi
|
|
452
|
+
printf '# bootstrap preferences (remembered installer answers)\n' >> "$TARGET"
|
|
453
|
+
fi
|
|
454
|
+
printf '%s\n' "$p" >> "$TARGET"
|
|
455
|
+
echo " + $p"
|
|
456
|
+
prefs_written=$((prefs_written + 1))
|
|
457
|
+
done
|
|
458
|
+
if [ "$prefs_written" -eq 0 ]; then
|
|
459
|
+
echo " .gitignore: already ignores the bootstrap preference files."
|
|
460
|
+
else
|
|
461
|
+
echo " .gitignore: bootstrap preference files ignored for everyone who clones this repo."
|
|
462
|
+
fi
|
|
463
|
+
;;
|
|
464
|
+
exclude)
|
|
465
|
+
if [ ! -d "$PROJECT_DIR/.git" ]; then
|
|
466
|
+
echo " .git/info/exclude: $PROJECT_DIR is not a git repository — nothing to exclude; the preference files stay visible to git."
|
|
467
|
+
else
|
|
468
|
+
prefs_written=0
|
|
469
|
+
for p in "$PREFS_VALUES_PATH" "$PREFS_README_PATH"; do
|
|
470
|
+
if [ -f "$GIT_EXCLUDE" ] && grep -qFx -- "$p" "$GIT_EXCLUDE"; then
|
|
471
|
+
continue
|
|
472
|
+
fi
|
|
473
|
+
if [ "$prefs_written" -eq 0 ]; then
|
|
474
|
+
mkdir -p "$(dirname "$GIT_EXCLUDE")"
|
|
475
|
+
if [ -s "$GIT_EXCLUDE" ] && [ -n "$(tail -c1 "$GIT_EXCLUDE")" ]; then
|
|
476
|
+
printf '\n' >> "$GIT_EXCLUDE"
|
|
477
|
+
fi
|
|
478
|
+
# Their OWN "#" header, never bare. Two things depend on it: the
|
|
479
|
+
# block above may already have normalized the sentinel block to the
|
|
480
|
+
# bottom of this file, and a "#" line directly after wiki/ is exactly
|
|
481
|
+
# what exclude_is_canonical accepts as the block terminator; and
|
|
482
|
+
# exclude_stranded stops scanning at the first "#", so our entries
|
|
483
|
+
# are never reported as stranded inside the bootstrap block.
|
|
484
|
+
printf '# bootstrap preferences (machine-local)\n' >> "$GIT_EXCLUDE"
|
|
485
|
+
fi
|
|
486
|
+
printf '%s\n' "$p" >> "$GIT_EXCLUDE"
|
|
487
|
+
echo " + $p (.git/info/exclude)"
|
|
488
|
+
prefs_written=$((prefs_written + 1))
|
|
489
|
+
done
|
|
490
|
+
if [ "$prefs_written" -eq 0 ]; then
|
|
491
|
+
echo " .git/info/exclude: already excludes the bootstrap preference files."
|
|
492
|
+
else
|
|
493
|
+
echo " Note: this hides them on THIS machine only — teammates are unaffected."
|
|
494
|
+
fi
|
|
495
|
+
# Verify rather than trust: a file left non-canonical is silently
|
|
496
|
+
# rewritten by exclude_normalize on every future run. Repair ONLY when
|
|
497
|
+
# the sentinel is already present — exclude_apply would otherwise create
|
|
498
|
+
# the block and hide .serena/, raw/, wiki/ from a user who just declined
|
|
499
|
+
# exactly that above. A later normalize pass leaves our lines intact,
|
|
500
|
+
# because its scrub only removes the sentinel and those three paths.
|
|
501
|
+
if [ -f "$GIT_EXCLUDE" ] \
|
|
502
|
+
&& grep -qFx -- "$EXCLUDE_SENTINEL" "$GIT_EXCLUDE" \
|
|
503
|
+
&& ! exclude_is_canonical "$GIT_EXCLUDE"; then
|
|
504
|
+
exclude_apply || true
|
|
505
|
+
fi
|
|
506
|
+
fi
|
|
507
|
+
;;
|
|
508
|
+
neither|*)
|
|
509
|
+
echo " .claude/bootstrap-prefs.json and .claude/bootstrap-prefs.README.md stay visible to git — commit them so the whole team shares these answers."
|
|
510
|
+
;;
|
|
511
|
+
esac
|
|
512
|
+
fi
|
|
@@ -97,11 +97,40 @@ for guide in $OPTIONAL_GUIDES; do
|
|
|
97
97
|
if [ -e "$GUIDES_DST/$guide" ] || [ -e "$LEGACY_GUIDES/$guide" ]; then
|
|
98
98
|
deliver_guide "$guide"
|
|
99
99
|
echo " $guide: refreshed (already present — previously opted in)."
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
# Presence on disk deliberately wins over any stored answer: the file being
|
|
101
|
+
# there is the stronger signal (the user can opt out by deleting it), so we
|
|
102
|
+
# never even consult the preference store on this branch.
|
|
103
|
+
continue
|
|
104
104
|
fi
|
|
105
|
+
# The store is read HERE, ahead of the `INTERACTIVE` guard below — not behind
|
|
106
|
+
# it. The schema for guides.* says a stored `true` delivers the guide into
|
|
107
|
+
# wiki/guides/ on EVERY run, including headless ones. If this lookup lived
|
|
108
|
+
# inside the interactive branch, a stored `true` would be silently ignored on
|
|
109
|
+
# every non-interactive run (CI, `bootstrap update` piped from a script), and
|
|
110
|
+
# the answer the user recorded once would only take effect when they were
|
|
111
|
+
# sitting at a tty — exactly the case where they would have been asked anyway.
|
|
112
|
+
# Only the unanswered/`ask` case needs a tty, and that is what the guard below
|
|
113
|
+
# covers. prefs_get always exits 0 and echoes `unset` when it has no value, so
|
|
114
|
+
# this command substitution is safe under `set -euo pipefail`.
|
|
115
|
+
case "$(prefs_get "guides.$guide" "$PROJECT_DIR")" in
|
|
116
|
+
true)
|
|
117
|
+
deliver_guide "$guide"
|
|
118
|
+
echo " $guide: delivered (remembered answer guides.$guide=true — change with /bootstrap-config)."
|
|
119
|
+
;;
|
|
120
|
+
false)
|
|
121
|
+
# No "Opt in any time" nudge here: the question has been answered, and
|
|
122
|
+
# telling the user to re-run and answer yes would be misleading.
|
|
123
|
+
echo " $guide: skipped (remembered answer guides.$guide=false — change with /bootstrap-config)."
|
|
124
|
+
;;
|
|
125
|
+
*)
|
|
126
|
+
# `ask`, `unset`, or an unrecognized value — today's behavior.
|
|
127
|
+
if [ "$INTERACTIVE" = true ] && prompt_yn_sticky "guides.$guide" "$PROJECT_DIR" " Install optional guide '$guide'? [y/N]: "; then
|
|
128
|
+
deliver_guide "$guide"
|
|
129
|
+
else
|
|
130
|
+
echo " $guide: skipped. Opt in any time: re-run 'npx @codewizard-dt/bootstrap update' and answer yes."
|
|
131
|
+
fi
|
|
132
|
+
;;
|
|
133
|
+
esac
|
|
105
134
|
done
|
|
106
135
|
|
|
107
136
|
# 4b. LEGACY MIGRATION: guides used to live in .docs/guides/. Every
|
|
@@ -46,7 +46,7 @@ Keep the two from duplicating or contradicting each other: project-specific stat
|
|
|
46
46
|
| Command | Purpose |
|
|
47
47
|
|---------|---------|
|
|
48
48
|
| `/wiki-ingest <raw-file>` | Process a source from `raw/` into the wiki — summary page, entity/concept updates, index + log entries |
|
|
49
|
-
| `/wiki-query <question>` | Answer from the wiki with citations; offer to file valuable synthesis back as a new page |
|
|
49
|
+
| `/wiki-query <question>` | Answer from the wiki with citations; auto-ingest relevant un-ingested `raw/` sources when coverage is missing; offer to file valuable synthesis back as a new page |
|
|
50
50
|
| `/wiki-lint` | Health-check — contradictions, orphan pages, stale claims, index drift, never-ingested raw sources |
|
|
51
51
|
| `/wiki-archive [family]` | Batch-move terminal work items into `<family>/archive/`; update `archive/index.md` and log the operation |
|
|
52
52
|
| `/wiki-rotate-log` | Rotate `wiki/log.md` to a timestamped archive file when it exceeds ~500 lines; create a fresh `log.md` with an archive pointer |
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcp.serenaMigrate": {
|
|
3
|
+
"scope": "project",
|
|
4
|
+
"consumer": "installer",
|
|
5
|
+
"summary": "Move a project-scope Serena registration out of this repo's .mcp.json",
|
|
6
|
+
"detail": "Asked by install-mcps.sh:328 when this project's .mcp.json already registers 'serena' (written by an earlier bootstrap, carrying a machine-specific absolute --project path). true runs 'claude mcp remove serena -s project' so the entry can be re-added at local scope in ~/.claude.json; false leaves the existing .mcp.json entry in place and working, and the prompt returns on the next run. .mcp.json may be committed team config, which is why the removal is offered rather than forced.",
|
|
7
|
+
"values": "true | false",
|
|
8
|
+
"default": null,
|
|
9
|
+
"askedBy": "install-mcps.sh"
|
|
10
|
+
},
|
|
11
|
+
"mcp.serena": {
|
|
12
|
+
"scope": "project",
|
|
13
|
+
"consumer": "installer",
|
|
14
|
+
"summary": "Register Serena at local scope for this project",
|
|
15
|
+
"detail": "Asked by install-mcps.sh:341 when no Serena registration exists for this project. true runs 'claude mcp add --scope local serena ...' with this project's absolute path, storing the entry in ~/.claude.json under this project's key — per-project, machine-local, never written to the repo's shareable .mcp.json. false leaves the project without Serena; code navigation falls back to Grep/Glob.",
|
|
16
|
+
"values": "true | false",
|
|
17
|
+
"default": null,
|
|
18
|
+
"askedBy": "install-mcps.sh"
|
|
19
|
+
},
|
|
20
|
+
"mcp.playwrightConflict": {
|
|
21
|
+
"scope": "project",
|
|
22
|
+
"consumer": "installer",
|
|
23
|
+
"summary": "How to resolve a committed .mcp.json that already registers its own playwright server",
|
|
24
|
+
"detail": "The three-way conflict menu at install-mcps.sh:501, reached only when this project's git-tracked .mcp.json registers 'playwright' (team-owned, so bootstrap never modifies it). 'shared' registers the bootstrap server as 'playwright-shared' and disables the project entry on this machine only via disabledMcpjsonServers in .claude/settings.local.json. 'alongside' registers 'playwright-shared' and leaves the project entry active, so browser tools appear twice. 'skip' changes nothing. This is the prompt that re-asks on every run even after being answered: 'shared' and 'alongside' both leave a registered 'playwright-shared' plus a live project 'playwright', and the gating condition cannot tell those two end states apart — remembering the answer is what fixes it. Values are stored by name, never as the raw menu digits 1/2/3, so the meaning survives a menu reorder.",
|
|
25
|
+
"values": "shared | alongside | skip",
|
|
26
|
+
"default": null,
|
|
27
|
+
"askedBy": "install-mcps.sh"
|
|
28
|
+
},
|
|
29
|
+
"mcp.playwrightReplace": {
|
|
30
|
+
"scope": "project",
|
|
31
|
+
"consumer": "installer",
|
|
32
|
+
"summary": "Replace an existing machine-local Playwright registration with the bootstrap shared server",
|
|
33
|
+
"detail": "Asked by install-mcps.sh:522 when a 'playwright' registration exists at local scope, or at project scope in an untracked .mcp.json — machine-local either way, so it is safe to modify with consent. true removes that entry and registers the bootstrap shared server under the canonical name 'playwright'. false keeps the existing entry and registers the bootstrap server alongside it as 'playwright-shared'.",
|
|
34
|
+
"values": "true | false",
|
|
35
|
+
"default": null,
|
|
36
|
+
"askedBy": "install-mcps.sh"
|
|
37
|
+
},
|
|
38
|
+
"update.legacyDocsAck": {
|
|
39
|
+
"scope": "project",
|
|
40
|
+
"consumer": "installer",
|
|
41
|
+
"summary": "Continue 'update' even though a legacy .docs/ directory was detected",
|
|
42
|
+
"detail": "Asked by update-project.sh:76 when the project still holds .docs/ artifact content from the pre-wiki layout. true continues the update, which scaffolds wiki/ but never touches the .docs/ files. false aborts with exit 0 so the user can run 'npx @codewizard-dt/bootstrap migrate' first. Answering true does not migrate anything — it only stops the warning from blocking every subsequent update.",
|
|
43
|
+
"values": "true | false",
|
|
44
|
+
"default": null,
|
|
45
|
+
"askedBy": "update-project.sh"
|
|
46
|
+
},
|
|
47
|
+
"gitignore.infoExclude": {
|
|
48
|
+
"scope": "project",
|
|
49
|
+
"consumer": "installer",
|
|
50
|
+
"summary": "Keep .serena/, raw/, and wiki/ out of git on this machine via .git/info/exclude",
|
|
51
|
+
"detail": "Asked by merge-gitignore.sh:376 when one or more of .serena/, raw/, wiki/ are not yet excluded. true writes them under the bootstrap sentinel in .git/info/exclude — machine-local, never committed, and unlike .gitignore it does not blind Serena or ripgrep-class walkers; the installed fileSuggestion script restores @-autocomplete for those paths. false leaves git tracking them here; teammates opt in separately by running update themselves. This is INDEPENDENT of the .gitignore section pass governed by gitignore.offerSectionUpdates: declining or disabling sections never disables the info/exclude mechanism, and a pure sentinel repair (all three already excluded elsewhere in the file) runs with no prompt at all regardless of this key. See also prefs.gitTracking, which decides how git treats the preferences file itself — a different question from these three directories.",
|
|
52
|
+
"values": "true | false",
|
|
53
|
+
"default": null,
|
|
54
|
+
"askedBy": "merge-gitignore.sh"
|
|
55
|
+
},
|
|
56
|
+
"prefs.gitTracking": {
|
|
57
|
+
"scope": "project",
|
|
58
|
+
"consumer": "installer",
|
|
59
|
+
"summary": "How git should treat .claude/bootstrap-prefs.json and bootstrap-prefs.README.md",
|
|
60
|
+
"detail": "New prompt owned by merge-gitignore.sh. Covers both files together: the values file .claude/bootstrap-prefs.json and its generated companion .claude/bootstrap-prefs.README.md. 'gitignore' adds both to the project's .gitignore so the whole team shares that decision. 'exclude' adds both to .git/info/exclude, keeping them untracked on this machine only. 'neither' leaves them visible to git so they can be committed and shared. Unlike the add/skip gates elsewhere in this schema, the declines-only rule does NOT apply here: this is a choice among three outcomes, not a yes/no on adding lines, so the answer is recorded in all three directions and the prompt is genuinely asked once. Related but separate: gitignore.infoExclude covers .serena/, raw/, and wiki/, not these two files.",
|
|
61
|
+
"values": "gitignore | exclude | neither",
|
|
62
|
+
"default": null,
|
|
63
|
+
"askedBy": "merge-gitignore.sh"
|
|
64
|
+
},
|
|
65
|
+
"guides.*": {
|
|
66
|
+
"scope": "project",
|
|
67
|
+
"consumer": "installer",
|
|
68
|
+
"summary": "Install a specific optional guide into wiki/guides/",
|
|
69
|
+
"detail": "One key per entry in sync-wiki-scaffold.sh's OPTIONAL_GUIDES list (sync-wiki-scaffold.sh:81), keyed by the exact entry text including any extension — today that is guides.evals-framework.md and guides.type-checking-templates. true delivers the guide into wiki/guides/ on every run; false keeps it out and suppresses the per-run prompt. A guide already present in wiki/guides/ (or in the legacy .docs/guides/) is refreshed regardless of this key — existing opt-in wins, because the file on disk is the stronger signal than a stored answer. The required guide tier is never gated by these keys.",
|
|
70
|
+
"values": "true | false",
|
|
71
|
+
"default": null,
|
|
72
|
+
"askedBy": "sync-wiki-scaffold.sh",
|
|
73
|
+
"dynamic": true
|
|
74
|
+
},
|
|
75
|
+
"gitignore.section.*": {
|
|
76
|
+
"scope": "project",
|
|
77
|
+
"consumer": "installer",
|
|
78
|
+
"summary": "Permanently decline one titled .gitignore template section",
|
|
79
|
+
"detail": "One key per titled section of lib/scripts/templates/gitignore, slugified from the section's banner title: lowercase it, replace every run of non-alphanumeric characters with a single '-', then strip leading and trailing '-' (so 'Node / TypeScript / JavaScript' becomes gitignore.section.node-typescript-javascript). The grammar is deliberately false-only: false remembers a decline and stops that section being offered again. There is intentionally no 'true' value, because a remembered yes would silently append lines to a project's .gitignore on a later run and break merge-gitignore.sh's stated invariant, 'NOTHING is ever added to a project's .gitignore without asking' (merge-gitignore.sh:11). An accepted section is therefore never recorded, so a section that gains new lines in a later template version is still offered by title on the next run rather than appended silently. The one-value grammar is the design, not a typo — do not widen it.",
|
|
80
|
+
"values": "false",
|
|
81
|
+
"default": null,
|
|
82
|
+
"askedBy": "merge-gitignore.sh",
|
|
83
|
+
"dynamic": true
|
|
84
|
+
},
|
|
85
|
+
"mcp.braveSearch": {
|
|
86
|
+
"scope": "global",
|
|
87
|
+
"consumer": "installer",
|
|
88
|
+
"summary": "Install the Brave Search MCP globally for web research",
|
|
89
|
+
"detail": "Prerequisites: a Brave Search API key and a working Docker daemon — the server runs as a shared local container serving HTTP, registered at user scope. true installs and keeps it updated on every run. false means the installer stops offering it: the prompt is never shown again on this machine until the key is changed or removed. The API key itself is never stored in this file or anywhere in the preferences schema.",
|
|
90
|
+
"values": "true | false",
|
|
91
|
+
"default": null,
|
|
92
|
+
"askedBy": "install-mcps.sh"
|
|
93
|
+
},
|
|
94
|
+
"mcp.context7": {
|
|
95
|
+
"scope": "global",
|
|
96
|
+
"consumer": "installer",
|
|
97
|
+
"summary": "Install the Context7 MCP for library documentation lookups",
|
|
98
|
+
"detail": "No prerequisites — no API key and no Docker required. true installs it at the scope chosen by mcp.context7Scope. false means the installer stops offering it: the prompt is never shown again on this machine until the key is changed or removed. Any optional API key prompt is handled outside this schema and is never stored here.",
|
|
99
|
+
"values": "true | false",
|
|
100
|
+
"default": null,
|
|
101
|
+
"askedBy": "install-mcps.sh"
|
|
102
|
+
},
|
|
103
|
+
"mcp.context7Scope": {
|
|
104
|
+
"scope": "global",
|
|
105
|
+
"consumer": "installer",
|
|
106
|
+
"summary": "Registration scope for the Context7 MCP",
|
|
107
|
+
"detail": "Asked by prompt_scope in lib.sh:387 ('Scope for context7 — [u]ser (default) or [p]roject?'). prompt_scope emits exactly two answers, 'user' and 'project' — it has no local-scope branch, and any reply that does not begin with p or P falls through to user. 'user' registers Context7 once for every project on this machine; 'project' writes the registration into the current project's shareable .mcp.json.",
|
|
108
|
+
"values": "user | project",
|
|
109
|
+
"default": null,
|
|
110
|
+
"askedBy": "lib.sh"
|
|
111
|
+
},
|
|
112
|
+
"mcp.playwright": {
|
|
113
|
+
"scope": "global",
|
|
114
|
+
"consumer": "installer",
|
|
115
|
+
"summary": "Install the Playwright MCP for browser automation and UI testing",
|
|
116
|
+
"detail": "Prerequisite on macOS: a launchd LaunchAgent (com.bootstrap-claude.playwright-mcp) runs the shared HTTP server in the GUI session so headed browsers work; other platforms get a per-session stdio server via npx. true installs it at user scope under the canonical name 'playwright'. false means the installer stops offering it: the fresh-install prompt is never shown again on this machine until the key is changed or removed. This key covers the fresh-install path only — the conflict paths are mcp.playwrightConflict and mcp.playwrightReplace.",
|
|
117
|
+
"values": "true | false",
|
|
118
|
+
"default": null,
|
|
119
|
+
"askedBy": "install-mcps.sh"
|
|
120
|
+
},
|
|
121
|
+
"skills.pruneOrphans": {
|
|
122
|
+
"scope": "global",
|
|
123
|
+
"consumer": "installer",
|
|
124
|
+
"summary": "Delete stale skill folders in ~/.claude/skills/ left by the wiki rename",
|
|
125
|
+
"detail": "Asked by install-global.sh:70 when any renamed-away skill folder (the adr-* and prd-* families) is still present in ~/.claude/skills/. true removes those folders with rm -rf; false keeps them, and they continue to appear as duplicate slash commands alongside their renamed replacements. The list of orphan names is fixed in the script — this key does not decide which folders qualify, only whether the deletion runs.",
|
|
126
|
+
"values": "true | false",
|
|
127
|
+
"default": null,
|
|
128
|
+
"askedBy": "install-global.sh"
|
|
129
|
+
},
|
|
130
|
+
"gitCommit.versionBump": {
|
|
131
|
+
"scope": "either",
|
|
132
|
+
"consumer": "skill",
|
|
133
|
+
"summary": "How /git-commit handles the version bump before committing",
|
|
134
|
+
"detail": "'auto' is today's behavior: the skill picks a bump level and applies it to every version manifest it finds, without confirmation. 'confirm' prints the suggested bump and asks before editing any manifest — 'confirm' IS this key's ask state, so there is deliberately no separate 'ask' value in the grammar. 'never' touches no version file at all but STILL prefixes the commit subject with [patch], [minor], or [major], because downstream release tooling reads that prefix. This is a choice among three behaviors, not an add/skip gate, so the declines-only rule does not apply — the answer is recorded in all three directions.",
|
|
135
|
+
"values": "auto | confirm | never",
|
|
136
|
+
"default": "auto",
|
|
137
|
+
"askedBy": "install-global.sh"
|
|
138
|
+
},
|
|
139
|
+
"gitCommit.autoPush": {
|
|
140
|
+
"scope": "either",
|
|
141
|
+
"consumer": "skill",
|
|
142
|
+
"summary": "Whether /git-commit pushes after a successful commit",
|
|
143
|
+
"detail": "true pushes the current branch after committing; false commits only; 'ask' prompts each time. The default is false because today's behavior is to never push, and defaulting an unanswered key to an outward-facing action that publishes code would break the compatibility guarantee that an absent preferences file changes nothing. The separate rule that /git-commit never creates a branch is unaffected by this key: pushing an existing branch is all that is on offer.",
|
|
144
|
+
"values": "true | false | ask",
|
|
145
|
+
"default": false,
|
|
146
|
+
"askedBy": "install-global.sh"
|
|
147
|
+
},
|
|
148
|
+
"research.persistToRaw": {
|
|
149
|
+
"scope": "either",
|
|
150
|
+
"consumer": "skill",
|
|
151
|
+
"summary": "Whether /research writes its report and sources to raw/research/",
|
|
152
|
+
"detail": "Governs the Phase 5 file write only. Findings are always synthesized into the response no matter what this key says — false suppresses the on-disk report under raw/research/<slug>/, it does not suppress the research. 'ask' prompts before writing. Note that a per-run override exists even when this is true, so a single invocation can still decline the write; the stored preference and the per-run override are different mechanisms and both must keep working.",
|
|
153
|
+
"values": "true | false | ask",
|
|
154
|
+
"default": true,
|
|
155
|
+
"askedBy": "install-global.sh"
|
|
156
|
+
},
|
|
157
|
+
"uatGenerate.promoteTests": {
|
|
158
|
+
"scope": "either",
|
|
159
|
+
"consumer": "skill",
|
|
160
|
+
"summary": "Whether /uat-generate promotes UAT checks into repeatable tests under test/",
|
|
161
|
+
"detail": "true is today's behavior: alongside the UAT file in wiki/work/uat/, the skill writes repeatable assertions into the project's test/ directory so the checks survive as regression coverage. false generates the UAT file only and adds nothing to test/. 'ask' prompts per invocation. This affects what lands on disk, not how the UAT itself is judged.",
|
|
162
|
+
"values": "true | false | ask",
|
|
163
|
+
"default": true,
|
|
164
|
+
"askedBy": "install-global.sh"
|
|
165
|
+
},
|
|
166
|
+
"gitignore.offerSectionUpdates": {
|
|
167
|
+
"scope": "either",
|
|
168
|
+
"consumer": "skill",
|
|
169
|
+
"summary": "Master gate for the .gitignore template section review pass",
|
|
170
|
+
"detail": "Controls the single opening gate at merge-gitignore.sh:171 ('Review .gitignore updates? (N line(s) across M section(s))'). This is a full three-state key: 'ask' is today's behavior, true runs the section pass without the opening question (each individual section is still offered by title, so nothing is appended silently), and false skips the whole pass with no prompt at all. The key itself never appends a line to any .gitignore — it only decides whether the pass runs. The .git/info/exclude block is OUTSIDE this gate entirely and keeps its own consent prompt: see gitignore.infoExclude. Individual section declines are remembered separately under gitignore.section.*.",
|
|
171
|
+
"values": "true | false | ask",
|
|
172
|
+
"default": true,
|
|
173
|
+
"askedBy": "install-global.sh"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -42,15 +42,48 @@ if [ ${#LEGACY_FOUND[@]} -gt 0 ]; then
|
|
|
42
42
|
echo ""
|
|
43
43
|
echo " npx @codewizard-dt/bootstrap migrate"
|
|
44
44
|
echo ""
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
# --- update.legacyDocsAck ------------------------------------------------
|
|
46
|
+
# Sticky by hand rather than via prompt_yn_sticky, because this key must
|
|
47
|
+
# never persist `false` from THIS prompt. Two reasons:
|
|
48
|
+
#
|
|
49
|
+
# 1. A recorded `false` would abort every future `update` at the exit 0
|
|
50
|
+
# below — silently, with no prompt left to change your mind with.
|
|
51
|
+
# 2. The key is an ACKNOWLEDGEMENT ("I know about the legacy .docs/, stop
|
|
52
|
+
# warning me"), not a policy. Answering yes migrates nothing; it only
|
|
53
|
+
# stops this warning from blocking every subsequent update.
|
|
54
|
+
#
|
|
55
|
+
# `false` is still honoured on READ: /bootstrap-config can set it
|
|
56
|
+
# deliberately, and "always stop me on this project" must keep working. It
|
|
57
|
+
# is only never WRITTEN here — the decline path below records nothing.
|
|
58
|
+
#
|
|
59
|
+
# The non-interactive branch CONTINUES (as it always has). prompt_yn_sticky
|
|
60
|
+
# answers no when there is no tty, so dropping it in wholesale would abort
|
|
61
|
+
# every headless update on a legacy project.
|
|
62
|
+
LEGACY_ACK="$(prefs_get "update.legacyDocsAck" "$PROJECT_DIR")"
|
|
63
|
+
case "$LEGACY_ACK" in
|
|
64
|
+
true)
|
|
65
|
+
echo " update.legacyDocsAck: using remembered answer (yes) — change with /bootstrap-config"
|
|
66
|
+
;;
|
|
67
|
+
false)
|
|
68
|
+
echo " update.legacyDocsAck: honouring recorded answer (no) — change with /bootstrap-config"
|
|
69
|
+
echo "Aborted."
|
|
70
|
+
exit 0
|
|
71
|
+
;;
|
|
72
|
+
*)
|
|
73
|
+
if has_tty; then
|
|
74
|
+
# Used as an if-condition, never bare: a `no` returns 1 and would abort
|
|
75
|
+
# this script under `set -euo pipefail`.
|
|
76
|
+
if prompt_yn "Continue with update anyway? [y/N]: "; then
|
|
77
|
+
prefs_set "update.legacyDocsAck" "$PROJECT_DIR" true
|
|
78
|
+
else
|
|
79
|
+
echo "Aborted."
|
|
80
|
+
exit 0
|
|
81
|
+
fi
|
|
82
|
+
else
|
|
83
|
+
echo " Non-interactive mode: continuing with update."
|
|
84
|
+
fi
|
|
85
|
+
;;
|
|
86
|
+
esac
|
|
54
87
|
echo ""
|
|
55
88
|
fi
|
|
56
89
|
|
package/lib/skills/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Most skills operate on the LLM Wiki (`wiki/`, `raw/`) described in the root `CLA
|
|
|
9
9
|
| Skill | Purpose |
|
|
10
10
|
|-------|---------|
|
|
11
11
|
| `wiki-ingest` | Process a source from `raw/` into the wiki — summary page, entity/concept updates, index + log entry |
|
|
12
|
-
| `wiki-query` | Answer a question from the wiki with citations; offer to file the answer back as a new page |
|
|
12
|
+
| `wiki-query` | Answer a question from the wiki with citations; auto-ingest relevant un-ingested `raw/` sources when coverage is missing; offer to file the answer back as a new page |
|
|
13
13
|
| `wiki-lint` | Health-check the wiki — contradictions, stale claims, orphan pages, missing concept pages, missing cross-references, never-ingested raw sources |
|
|
14
14
|
| `wiki-archive` | Batch-move terminal work items into `<family>/archive/`, update `archive/index.md`, log the operation |
|
|
15
15
|
| `wiki-rotate-log` | Rotate `wiki/log.md` into a timestamped archive file once it exceeds ~500 lines |
|
|
@@ -134,6 +134,7 @@ Most skills operate on the LLM Wiki (`wiki/`, `raw/`) described in the root `CLA
|
|
|
134
134
|
| `git-commit` | Stage all changes and commit with an auto-generated message |
|
|
135
135
|
| `primer` | Refresh codebase context via Serena memories |
|
|
136
136
|
| `serena-config` | Interactively configure Serena language servers in `.serena/project.yml` |
|
|
137
|
+
| `bootstrap-config` | View, edit, and reset the stored bootstrap preferences that decide which installer prompts are asked and how consent-gated skills behave |
|
|
137
138
|
| `anti-slop` | Detect and remove AI writing patterns from copy so it reads like a person, not a language model |
|
|
138
139
|
| `frontend-taste` | Wire the house-style design system (`~/code/house-style`) into the current project — tokens, Tailwind preset, component patterns, base CSS layer |
|
|
139
140
|
| `elevator-pitch` | Generate a short, punchy elevator pitch for a project |
|