@codewizard-dt/bootstrap 3.1.0 → 3.2.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.
@@ -10,7 +10,7 @@ All scripts use `set -euo pipefail`. Every script that touches a target project
10
10
  |--------|---------------------|---------------|
11
11
  | `setup-project.sh` | `setup` | Preflight-checks `claude` and `uv` are installed, then runs the full new-project sequence: global hooks/skills/settings install first (offline-safe, via `install-global.sh --skip-mcps` — includes the deny-list and hooks-wiring merges), then the interactive MCP install (guarded — a failure warns and continues), wiki scaffold + tiered guides sync (optional guides prompted), `.gitignore` merge, and Serena `project.yml` bootstrap. Does **not** scaffold deployment — that's explicit via `deploy`. |
12
12
  | `update-project.sh` | `update` | Re-runs the same shared sequence as `setup` (global hooks/skills/settings via `install-global.sh --skip-mcps`, then the guarded interactive MCP install) and re-syncs the wiki scaffold + tiered `wiki/guides/` into an existing project. Detects legacy `.docs/`-layout families (`tasks`, `uat`, `adr`, `prd`, `bugs`, `roadmaps`) and warns without touching them — migration is a separate, explicit step (`migrate`). Never touches `.github/`. |
13
- | `install-global.sh` | `install` | Installs/updates hooks, skills, settings, and MCPs globally with **no project path** — the shared step both `setup` and `update` delegate to. Local/offline-safe steps run first: hooks rsync to `~/.claude/hooks/` (stderr warning if `lib/hooks` is missing), skills install (pruning stale skill folders from the wiki rename — `adr-*` → `decision-*`, `prd-*` → `req-*`), the canonical permission deny-list merge into `~/.claude/settings.json` via `merge-settings-deny.js`, then the hooks-wiring merge via `merge-settings-hooks.js` — registering the copied hook scripts in the settings `hooks` key, with a restart-your-session reminder when the wiring was created or changed. Then copies `templates/file-suggestion.sh` → `~/.claude/file-suggestion.sh` and registers it as the `fileSuggestion` `@`-autocomplete picker (`merge-settings-deny.js --set-key` mode) — printing a restart note on fresh registration, or leaving a pre-existing different `fileSuggestion` untouched. Then step 6 installs the preference helper — `bootstrap-prefs.js` → `~/.claude/bootstrap-prefs.js` and `templates/bootstrap-prefs-schema.json` → `~/.claude/templates/bootstrap-prefs-schema.json`, the layout that lets a skill read a preference with no `--schema` flag (see [Preference helper notes](#preference-helper-notes)); a missing helper or schema warns and continues. Step 7 then settles the five `consumer: skill` preferences that have never been answered — asked once, in a batch, at global scope, gated on a tty as a whole, so a non-interactive run prints one note and writes no answers and no preferences file. MCPs install **last** (step 8) — the only network-dependent step, guarded so a failure warns instead of aborting the local installs — and `--skip-mcps` skips them when the caller already handled MCP install interactively. |
13
+ | `install-global.sh` | `install` | Installs/updates hooks, skills, settings, and MCPs globally with **no project path** — the shared step both `setup` and `update` delegate to. Local/offline-safe steps run first: hooks rsync to `~/.claude/hooks/` (stderr warning if `lib/hooks` is missing), skills install (pruning stale skill folders from the wiki rename — `adr-*` → `decision-*`, `prd-*` → `req-*`), the canonical permission deny-list merge into `~/.claude/settings.json` via `merge-settings-deny.js`, then the hooks-wiring merge via `merge-settings-hooks.js` — registering the copied hook scripts in the settings `hooks` key, with a restart-your-session reminder when the wiring was created or changed. Then copies `templates/file-suggestion.sh` → `~/.claude/file-suggestion.sh` and registers it as the `fileSuggestion` `@`-autocomplete picker (`merge-settings-deny.js --set-key` mode) — printing a restart note on fresh registration, or leaving a pre-existing different `fileSuggestion` untouched. Then step 6 installs the preference helper — `bootstrap-prefs.js` → `~/.claude/bootstrap-prefs.js` and `templates/bootstrap-prefs-schema.json` → `~/.claude/templates/bootstrap-prefs-schema.json`, the layout that lets a skill read a preference with no `--schema` flag (see [Preference helper notes](#preference-helper-notes)); a missing helper or schema warns and continues. Step 7 then settles the seven `consumer: skill` preferences that have never been answered — asked once, in a batch, at global scope, gated on a tty as a whole, so a non-interactive run prints one note and writes no answers and no preferences file. MCPs install **last** (step 8) — the only network-dependent step, guarded so a failure warns instead of aborting the local installs — and `--skip-mcps` skips them when the caller already handled MCP install interactively. |
14
14
  | `setup-deployment.sh` | `deploy` / `deployment` | Reads `raw/guides/deployment-strategy.md` as a prompt template, copies it into the target's `wiki/guides/` (deploy-only guide tier — the wiki sync never ships it), and runs `claude` to scaffold `.github/workflows/`, `Makefile` Docker targets, and `.gitleaks.toml` into the target project. Deliberately **not** called by `setup`/`update` — CI files get hand-customized per project (Dockerfile paths, runner labels, deploy steps) and must never be created or clobbered implicitly. `security.yml` is always overwritten (generic); `build.yml`/`.gitleaks.toml` are copy-once; `Makefile` targets are merged. |
15
15
  | `migrate-project.sh` | `migrate` | Claude-driven migration of a legacy `.docs/`-layout project to the LLM Wiki structure (`wiki/knowledge/` + `wiki/work/`). Preflight requires a clean git tree; runs on a fresh `wiki-migration` branch so the whole migration is one reviewable diff. Scaffolds first via `sync-wiki-scaffold.sh --interactive`, assembles `wiki/guides/mcp-tools.md` via `build-mcp-guide.sh`, then drives the semantic conversion (frontmatter synthesis, ID renames, link rewrites, family indexes) with the prompt at `lib/prompts/migrate-wiki.md`. `git mv` before edit, so history is preserved. `--dry-run` prints the file inventory only and does not touch anything. |
16
16
  | `setup-strict-typechecks.sh` | `typechecks` | Loads `lib/prompts/setup-strict-typechecks.md`, appends an optional language list (space- or comma-separated), and runs `claude` to detect languages, research current strict-mode conventions, install toolchains, and wire `make typecheck`. |
@@ -345,10 +345,10 @@ after an older version touches it, and the user can see what was kept.
345
345
 
346
346
  ### Why every `consumer: skill` key says `install-global.sh`
347
347
 
348
- All five `consumer: skill` keys name `install-global.sh` as their `askedBy`,
348
+ All seven `consumer: skill` keys name `install-global.sh` as their `askedBy`,
349
349
  including `gitCommit.versionBump` and `gitCommit.autoPush` — which named
350
350
  `/git-commit` until this was settled. The field records the **settling** prompt:
351
- the one site that writes the answer. For all five keys that site is
351
+ the one site that writes the answer. For all seven keys that site is
352
352
  `install-global.sh`'s step 7 sync pass, which asks each unanswered key once, in a
353
353
  batch, at global scope.
354
354
 
@@ -369,7 +369,7 @@ real `lib/scripts/` file or one real `lib/skills/<name>/SKILL.md`, so
369
369
  `"install-global.sh, /git-commit"` fails the suite by construction. Where a
370
370
  run-time prompt exists, it is documented in the key's `detail`.
371
371
 
372
- ### The key registry — all 23 entries
372
+ ### The key registry — all 24 entries
373
373
 
374
374
  Every key in `templates/bootstrap-prefs-schema.json`, grouped by `consumer` —
375
375
  `installer` first, then `skill` — which is the same grouping and the same order
@@ -408,12 +408,13 @@ Unicode-aware slug rule for `gitignore.section.*` are in
408
408
  above; `gitignore.section.*`'s deliberate one-value grammar is in
409
409
  [the section after it](#gitignoresection-has-a-one-value-grammar-on-purpose).
410
410
 
411
- #### `consumer: skill` — 6 entries, read by slash commands at run time
411
+ #### `consumer: skill` — 7 entries, read by slash commands at run time
412
412
 
413
413
  | Key | Scope | Consumer | Values | Default | Asked by | What it does |
414
414
  |-----|-------|----------|--------|---------|----------|--------------|
415
415
  | `gitCommit.versionBump` | either | skill | `auto \| confirm \| never` | `auto` | `install-global.sh` | How `/git-commit` handles the version bump before committing |
416
416
  | `gitCommit.autoPush` | either | skill | `true \| false \| ask` | `false` | `install-global.sh` | Whether `/git-commit` pushes after a successful commit |
417
+ | `gitCommit.lint` | either | skill | `true \| false` | `false` | `install-global.sh` | Whether `/git-commit` runs the /lint fix-cycle before committing |
417
418
  | `research.persistToRaw` | either | skill | `true \| false \| ask` | `true` | `install-global.sh` | Whether `/research` writes its report and sources to `raw/research/` |
418
419
  | `research.autoIngest` | either | skill | `true \| false \| ask` | `false` | `install-global.sh` | Whether `/research` automatically wiki-ingests its saved report |
419
420
  | `uatGenerate.promoteTests` | either | skill | `sibling \| never \| dedicated` | `dedicated` | `install-global.sh` | Where `/uat-generate` writes the unit tests it promotes out of UAT cases |
@@ -173,7 +173,7 @@ echo ""
173
173
  # mechanism exists to remove.
174
174
  #
175
175
  # GLOBAL SCOPE. install-global.sh takes no project path, so it cannot know
176
- # which checkout the user means. All five keys are `scope: either`, so the
176
+ # which checkout the user means. All seven keys are `scope: either`, so the
177
177
  # answer recorded here is the machine-wide default and a project file can
178
178
  # still override it per checkout later.
179
179
  #
@@ -183,7 +183,7 @@ echo ""
183
183
  # One CI run must never bake a permanent answer into a user's store.
184
184
  PREFS_ASKED=0
185
185
 
186
- # <key> <question> — the yes/no/ask shape shared by four of the five keys.
186
+ # <key> <question> — the yes/no/ask shape shared by four of the seven keys.
187
187
  # `skip` is the resolved value for a bare Enter or EOF and records nothing, so
188
188
  # an accidental keystroke leaves the question open instead of settling it.
189
189
  settle_skill_pref() {
@@ -232,6 +232,18 @@ else
232
232
 
233
233
  settle_skill_pref gitCommit.autoPush \
234
234
  "Should /git-commit push the current branch after committing? (Default no — this turns a local action into a published one. It never creates a branch either way.)"
235
+ # gitCommit.lint's grammar is true|false only (no `ask`), so it can't use settle_skill_pref's generic yes/no/ask/skip shape.
236
+ if ! prefs_stored_global gitCommit.lint; then
237
+ echo ""
238
+ echo " Should /git-commit run the /lint fix-cycle before committing? (Default no — linting is opt-in, so a fresh install never lints without you saying yes.)"
239
+ LINT_ANSWER="$(prompt_letter_choice skip " [y]es / [n]o / [s]kip for now: " yes no skip)"
240
+ case "$LINT_ANSWER" in
241
+ yes) prefs_set gitCommit.lint --global true ; echo " gitCommit.lint = true" ;;
242
+ no) prefs_set gitCommit.lint --global false ; echo " gitCommit.lint = false" ;;
243
+ *) echo " gitCommit.lint left unanswered — today's behavior (no lint) is unchanged, and you will be asked again next sync." ;;
244
+ esac
245
+ PREFS_ASKED=$(( PREFS_ASKED + 1 ))
246
+ fi
235
247
  settle_skill_pref research.persistToRaw \
236
248
  "Should /research save its report and sources to raw/research/ by default? (Findings always appear in the reply; this governs the file write only, and you can still decline any single report.)"
237
249
  settle_skill_pref research.autoIngest \
@@ -172,6 +172,15 @@
172
172
  "default": false,
173
173
  "askedBy": "install-global.sh"
174
174
  },
175
+ "gitCommit.lint": {
176
+ "scope": "either",
177
+ "consumer": "skill",
178
+ "summary": "Whether /git-commit runs the /lint fix-cycle before committing",
179
+ "detail": "true runs the full /lint workflow (all cycles until clean or issues are skipped) before assessing changes; false (and unset) skip it entirely — this is an opt-in, not an opt-out, so a fresh install never lints without the user having said yes. There is deliberately no 'ask' value: /git-commit never prompts about this per run, it only reads the stored answer.",
180
+ "values": "true | false",
181
+ "default": false,
182
+ "askedBy": "install-global.sh"
183
+ },
175
184
  "research.persistToRaw": {
176
185
  "scope": "either",
177
186
  "consumer": "skill",
@@ -112,7 +112,7 @@ Skip this question entirely when a mode word was supplied as an argument — but
112
112
  5. When the chosen key has `consumer: skill`, print this heavier banner:
113
113
  > This is a **skill preference**. Changing it changes what a slash command actually does the next time it runs — not merely whether the installer asks you a question.
114
114
 
115
- Name the affected command from the entry's `askedBy` / `summary` — e.g. `gitCommit.versionBump` changes what `/git-commit` does on every commit. The `consumer: skill` population is `gitCommit.versionBump`, `gitCommit.autoPush`, `research.persistToRaw`, `research.autoIngest`, `uatGenerate.promoteTests`, and `gitignore.offerSectionUpdates`. Every other key is `consumer: installer` and gets the lighter framing: it only affects whether a setup/update script prompts you.
115
+ Name the affected command from the entry's `askedBy` / `summary` — e.g. `gitCommit.versionBump` changes what `/git-commit` does on every commit. The `consumer: skill` population is `gitCommit.versionBump`, `gitCommit.autoPush`, `gitCommit.lint`, `research.persistToRaw`, `research.autoIngest`, `uatGenerate.promoteTests`, and `gitignore.offerSectionUpdates`. Every other key is `consumer: installer` and gets the lighter framing: it only affects whether a setup/update script prompts you.
116
116
 
117
117
  ## Step E — Choose the value and the layer (edit mode)
118
118
 
@@ -10,26 +10,43 @@ user-invocable: true
10
10
 
11
11
  # git-commit
12
12
 
13
- ## Step 0: Read the two preferences that govern this skill
13
+ ## Step 0: Verify working directory, then read the three preferences that govern this skill
14
14
 
15
- Two stored preferences change what this command does. Read **both, once, before Step 1** — never mid-run, and never once per file:
15
+ ### Precondition: current directory must be the repo root
16
+
17
+ Before anything else, confirm the working directory is the repository root — every later step (`git status`/`git diff HEAD`, manifest Detection, the `--project .` preference reads below, and `git-commit`'s own `git add .`) assumes it. Running from a subdirectory would silently stage, diff, or bump only that subtree instead of the whole repo.
18
+
19
+ ```bash
20
+ cd "$(git rev-parse --show-toplevel)"
21
+ ```
22
+
23
+ If this fails (not inside a git repo at all), **STOP** and report: `/git-commit must run inside a git repository — no repo root found from the current directory.` Otherwise the working directory is now the repo root; proceed for the rest of this run without re-checking.
24
+
25
+ **Worktree-safe by construction**: `--show-toplevel` resolves to the current *worktree's own* root when run from inside a linked worktree, not the main checkout's — exactly the directory this run should operate in, so no worktree-specific branch is needed here. (Contrast with `--git-dir`/`--git-common-dir`, which resolve to the *shared* `.git` location across all worktrees — the right tool when code needs the common git directory instead, as in `file-suggestion.sh`'s worktree fix, but the wrong one here.)
26
+
27
+ ### Read the three preferences that govern this skill
28
+
29
+ Three stored preferences change what this command does. Read **all three, once, before Step 1** — never mid-run, and never once per file:
16
30
 
17
31
  ```bash
18
32
  node ~/.claude/bootstrap-prefs.js --get gitCommit.versionBump --project . 2>/dev/null || echo unset
19
33
  node ~/.claude/bootstrap-prefs.js --get gitCommit.autoPush --project . 2>/dev/null || echo unset
34
+ node ~/.claude/bootstrap-prefs.js --get gitCommit.lint --project . 2>/dev/null || echo unset
20
35
  ```
21
36
 
22
- `--project .` is required. Both keys are `scope: either`, so the answer resolves **project file → global file → schema default**; dropping the flag would read the machine-wide answer even in a repo that overrides it. If either command fails — bootstrap was never installed globally, or `node` is not on PATH — treat that answer as `unset`.
37
+ `--project .` is required. All three keys are `scope: either`, so the answer resolves **project file → global file → schema default**; dropping the flag would read the machine-wide answer even in a repo that overrides it. If any command fails — bootstrap was never installed globally, or `node` is not on PATH — treat that answer as `unset`.
23
38
 
24
- `unset` means *nobody has ever been asked*. It always keeps today's behavior; it never invents one. Mention an `unset` key **once**, in the final report, never as a mid-run interruption.
39
+ `unset` means *nobody has ever been asked*. For `gitCommit.versionBump` and `gitCommit.autoPush` this keeps today's behavior; it never invents one. `gitCommit.lint` is the deliberate exception: it is opt-in by explicit design, so `unset` (and `false`) both mean **do not lint** — a fresh install must never lint before the user has said yes. Mention an `unset` key **once**, in the final report, never as a mid-run interruption.
25
40
 
26
- ## Step 1: Run Lint Fix Cycles
41
+ ## Step 1: Run Lint Fix Cycles (gated on `gitCommit.lint`)
27
42
 
28
- Before committing, run the `/lint` workflow to catch and fix any diagnostics:
43
+ `gitCommit.lint` is `true | false`, default `false`, no `ask` value — read once in Step 0, never re-checked mid-run.
29
44
 
30
- 1. Execute the full `/lint` command (all cycles until clean or issues are skipped)
31
- 2. If any fixes were applied, they will be included in the commit automatically
32
- 3. If any issues were skipped (unfixable), warn the user before proceeding
45
+ - **`true`**: run the `/lint` workflow to catch and fix any diagnostics:
46
+ 1. Execute the full `/lint` command (all cycles until clean or issues are skipped)
47
+ 2. If any fixes were applied, they will be included in the commit automatically
48
+ 3. If any issues were skipped (unfixable), warn the user before proceeding
49
+ - **`false` or `unset`**: skip this step entirely — do not invoke `/lint`. Note once in the final report when `unset`: `gitCommit.lint is unanswered — /git-commit does not lint by default. Set it with: node ~/.claude/bootstrap-prefs.js --set gitCommit.lint --value true --global` (or `false`).
33
50
 
34
51
  ## Step 2: Condense Verbose Inline Comments
35
52
 
@@ -59,9 +76,26 @@ Run all three in parallel:
59
76
  - `git diff HEAD` — see exact diffs for ALL staged and unstaged changes
60
77
  - `git log --oneline -10` — see recent commit history for context
61
78
 
62
- ## Step 4: Summarize Changes and Recommend Semver Bump
79
+ ## Step 4: Summarize Changes, and Recommend a Semver Bump Only If It Will Be Used
80
+
81
+ `gitCommit.versionBump` was already read in Step 0 — branch on it now, **before** doing any bump classification, so a `never` project never pays for reasoning it can't use.
82
+
83
+ ### If `gitCommit.versionBump` is `never`
84
+
85
+ No manifest will be touched and no prefix will be written (Step 5 skips straight through). Determining PATCH/MINOR/MAJOR would be pure wasted effort — skip the semver table entirely and print only:
86
+
87
+ ---
88
+
89
+ **Changes being committed:**
90
+ - <bullet list of what changed and why, derived from the diff>
91
+
92
+ ---
93
+
94
+ Then go directly to Step 6 (Commit) with a bare, unprefixed subject.
95
+
96
+ ### Otherwise (`auto`, `confirm`, or `unset`)
63
97
 
64
- Before touching any files or committing, output a summary block like this:
98
+ The bump classification is actually needed — either to write the prefix (`auto`/`unset`) or to ask about it (`confirm`, in Step 5). Output the full summary block:
65
99
 
66
100
  ---
67
101
 
@@ -82,7 +116,7 @@ Use these semver rules to determine the bump:
82
116
  | **minor** | New features or capabilities that are backward-compatible; new commands, skills, config options, or APIs added without breaking existing ones |
83
117
  | **major** | Breaking changes — removed or renamed commands/APIs/config keys, changed behavior that callers must update for, deleted files that others depend on |
84
118
 
85
- Print the summary. What happens next is decided by `gitCommit.versionBump` from Step 0 — see the table in Step 5. **Do not ask for confirmation here**; the only value that asks is `confirm`, and it asks in Step 5 where the manifest list is known.
119
+ Print the summary. What happens next is decided by the same `gitCommit.versionBump` value — see the table in Step 5. **Do not ask for confirmation here**; the only value that asks is `confirm`, and it asks in Step 5 where the manifest list is known.
86
120
 
87
121
  ## Step 5: Bump Version in Project Files
88
122
 
@@ -269,5 +303,5 @@ Runs only after the commit in Step 6 succeeded. A failed commit means there is n
269
303
  One short report at the end. Include, in this order:
270
304
 
271
305
  1. The commit subject that was written.
272
- 2. Any of the once-only preference notes from Steps 5 and 7 that apply. Each appears **at most once per run**, here — not inline, and not repeated per file.
306
+ 2. Any of the once-only preference notes from Steps 1, 5, and 7 that apply. Each appears **at most once per run**, here — not inline, and not repeated per file.
273
307
  3. The push outcome (pushed / not pushed and why / push failed and how).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codewizard-dt/bootstrap",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Bootstrap Claude Code projects with an LLM Wiki, reusable skills, hooks, and MCP setup",
5
5
  "homepage": "https://github.com/codewizard-dt/bootstrap-wiki#readme",
6
6
  "bugs": {