agent-docs-bootstrap 0.4.1 → 0.4.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), versions follo
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.2] - 2026-10-27
8
+
9
+ ### Fixed
10
+ - Content hashes left out every dot file, so a user's own hidden file in a kit folder, such as `.claude/skills/docs-check/.notes.md`, did not count as a change and was deleted by an update or `--uninstall`. Only files the OS adds are left out now: `.DS_Store`, `._*`, `Thumbs.db`, `desktop.ini`. A folder without them hashes as in 0.4.0.
11
+ - `LEGACY` lacked what 0.4.0 and 0.4.1 installed for `docs-check`, so installs stuck on 0.4.0 would stop recovering once `docs-check` changed. The hash is added, and `scripts/check.mjs` now installs every release tag and fails when `LEGACY` misses anything one of them installed; CI fetches the tags for it.
12
+
7
13
  ## [0.4.1] - 2026-10-27
8
14
 
9
15
  ### Fixed
package/README.md CHANGED
@@ -17,7 +17,7 @@ You need Node.js 18+ and a git repository.
17
17
  1. From your project root, install the skills and subagents:
18
18
 
19
19
  ```bash
20
- npx agent-docs-bootstrap@0.4.1 --target claude
20
+ npx agent-docs-bootstrap@0.4.2 --target claude
21
21
  ```
22
22
 
23
23
  Replace `claude` with `codex`, `opencode`, a list such as `claude,codex`, or `all`.
@@ -103,19 +103,19 @@ All options run the same installer from your project root. Pin the version: the
103
103
  **From npm** (recommended):
104
104
 
105
105
  ```bash
106
- npx agent-docs-bootstrap@0.4.1 --target claude
106
+ npx agent-docs-bootstrap@0.4.2 --target claude
107
107
  ```
108
108
 
109
109
  **From a GitHub release tag**, when the npm registry is blocked or unavailable:
110
110
 
111
111
  ```bash
112
- npx github:TraneDev/agent-docs-bootstrap#v0.4.1 --target claude
112
+ npx github:TraneDev/agent-docs-bootstrap#v0.4.2 --target claude
113
113
  ```
114
114
 
115
115
  **From a clone**, to read or change the kit first:
116
116
 
117
117
  ```bash
118
- git clone --branch v0.4.1 https://github.com/TraneDev/agent-docs-bootstrap.git ~/agent-docs-bootstrap
118
+ git clone --branch v0.4.2 https://github.com/TraneDev/agent-docs-bootstrap.git ~/agent-docs-bootstrap
119
119
  node ~/agent-docs-bootstrap/install.mjs --target claude
120
120
  ```
121
121
 
@@ -135,7 +135,7 @@ Two skills are installed, `docs-bootstrap` and `docs-check`. The guides by other
135
135
 
136
136
  - a path that exists but is not listed is skipped with a warning;
137
137
  - a listed path whose content you changed is left in place, with a warning, and the installer exits non-zero; a changed path the kit no longer ships, for example a skill you replaced with your own version, becomes yours and drops out of the marker;
138
- - files the OS adds to the kit's folders, such as `.DS_Store`, `Thumbs.db` or `desktop.ini`, do not count as a change;
138
+ - files the OS adds to the kit's folders (`.DS_Store`, `._*`, `Thumbs.db`, `desktop.ini`) do not count as a change; a file of your own there, hidden or not, does, so it is never deleted;
139
139
  - a marker line not shaped like a path the kit installs (for example `src` or `../x`, added by a bad merge) is ignored with a warning.
140
140
 
141
141
  ### Other agents
package/install.mjs CHANGED
@@ -12,9 +12,9 @@
12
12
  // opencode skills → .agents/skills/ agents → .opencode/agents/*.md commands → .opencode/commands/*.md
13
13
  // Installed paths are listed in .agent-docs-bootstrap with a hash of what was written. A path is replaced or removed
14
14
  // only if its line has the shape of a path the kit writes (<layout folder>/<kit name>) and its content still matches
15
- // that hash or something a version of the kit wrote; OS files such as .DS_Store do not count. A changed path is left
16
- // in place and the run exits non-zero. On an update, listed paths this version no longer ships are removed under the
17
- // same rule, or left to the user if changed.
15
+ // that hash or something a version of the kit wrote. OS files such as .DS_Store do not count; a user's own file,
16
+ // hidden or not, does. A changed path is left in place and the run exits non-zero. On an update, listed paths this
17
+ // version no longer ships are removed under the same rule, or left to the user if changed.
18
18
  // No network access, no changes to harness settings, no admin rights.
19
19
 
20
20
  import fs from 'node:fs';
@@ -65,7 +65,9 @@ for (const l of read(MARKER).split('\n').map(l => l.trim()).filter(l => l && !l.
65
65
  if (isOwnedPath(r)) old.set(r, h);
66
66
  else warn(`ignored '${r}' in .agent-docs-bootstrap: not a path this kit installs`);
67
67
  }
68
- // Hashes of every path versions 0.1.0–0.3.0 installed (all targets, no model flags). Fixed: never edit.
68
+ // Hashes of every path each released version installed (all targets, no model flags), so an install whose marker
69
+ // lost its lines is still recognised after the kit changes. Every release adds the outgoing version's hashes;
70
+ // nothing is ever removed. check.mjs installs each release tag and fails, listing the missing ones.
69
71
  const LEGACY = new Set([
70
72
  '00ca80d7077c0e4b', '122ae594f7eb38bd', '185ec7d02d9cf70b', '1f5a0fe496f38dd6', '3798ad63dd954bac',
71
73
  '4c36074d70c5a88c', '562d1e8f3a090ffd', '698cadefe39cb46f', '6acf8481d4dd6a1a', '72bcff6d0e5476ba',
@@ -73,6 +75,8 @@ const LEGACY = new Set([
73
75
  '900cf27ab683e5d1', '96288a3e60126264', '9e0e5c30da22c059', 'b45162299d9aa78b', 'c5d47d8811aa61ee',
74
76
  'c87450584ed42c8b', 'cf2f8a40c91f3c45', 'dac09810ceb351f7', 'dc418221c7363caa', 'f741ba5711364c55',
75
77
  'fceff4c3b3159c80', 'fd975138dcda6b38', 'fe412d3c3c312f7a',
78
+ // 0.4.0, 0.4.1
79
+ '7f6ef4c3f161abfa',
76
80
  ]);
77
81
 
78
82
  const skills = skillDirs();
@@ -242,16 +246,16 @@ function usage(code, msg) {
242
246
  process.exit(code);
243
247
  }
244
248
  // Content hash of an installed file or folder: relative names and text with line endings normalised, so a
245
- // checkout with CRLF line endings still matches. Files the OS adds (dot files such as .DS_Store, Thumbs.db,
246
- // desktop.ini) are left out; the kit ships none (check.mjs makes sure). The format must not change: markers and
247
- // LEGACY depend on it.
249
+ // checkout with CRLF line endings still matches. Files the OS adds (.DS_Store, ._*, Thumbs.db, desktop.ini) are
250
+ // left out; the kit ships none (check.mjs makes sure). The format must not change: markers and LEGACY depend on it.
248
251
  function contentHash(p) {
249
252
  const h = createHash('sha256');
250
253
  const files = fs.lstatSync(p).isDirectory() ? listFiles(p).sort() : [''];
251
254
  for (const f of files) h.update(`${f}\0${read(path.join(p, f)).replace(/\r\n/g, '\n')}\0`);
252
255
  return h.digest('hex').slice(0, 16);
253
256
  }
254
- function isOsFile(name) { return name.startsWith('.') || /^(thumbs\.db|desktop\.ini)$/i.test(name); }
257
+ // Only files the OS adds on its own. A user's own hidden file, such as .notes.md, is content and counts as a change.
258
+ function isOsFile(name) { return /^(\.DS_Store|Thumbs\.db|desktop\.ini)$/i.test(name) || name.startsWith('._'); }
255
259
  // The same hash for text about to be written as a file.
256
260
  function textHash(text) {
257
261
  return createHash('sha256').update(`\0${text.replace(/\r\n/g, '\n')}\0`).digest('hex').slice(0, 16);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-docs-bootstrap",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Agent skills that build reference documentation for a codebase (glossary, ADRs, architecture, how-tos, AGENTS.md) through interviews with the team, with an optional check by a fresh agent. Works with any agent that runs skills; the installer sets up Claude Code, Codex and OpenCode.",
5
5
  "license": "MIT",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/TraneDev/agent-docs-bootstrap.git" },