codemuster 0.2.9 → 0.3.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/CHANGELOG.md ADDED
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ User-visible changes by released version. Add upcoming changes under Unreleased;
4
+ move them to a dated version heading before publishing. Historical entries below
5
+ start with 0.2.8.
6
+
7
+ ## 0.3.0 - 2026-09-19
8
+
9
+ - Show the intervening release notes after `codemuster update`.
10
+ - Check for a newer version on every normal command and report the result without
11
+ changing command output or stopping work when the registry is unavailable.
12
+ - Include this changelog in the launcher and every platform package.
13
+ - Preview the worker limit, provider, model and thinking level before `run`, `verify`
14
+ or `fix`. Interactive terminals wait ten seconds; Enter starts immediately and
15
+ Escape or Ctrl+C cancels. CI and redirected commands start without waiting.
16
+ - Add `intelligent-config` to inspect repository context with an AI agent and apply
17
+ validated exclusions, scoped lenses and detected test setup. Preserve existing
18
+ custom settings and keep an exact backup before replacing the config.
19
+
20
+ Upgrade from 0.2.9 or earlier with `npm install -g codemuster@0.3.0` to
21
+ install the new launcher. Older launchers update only the native binary, so their
22
+ `codemuster update` cannot add release-note or per-command update notices.
23
+
24
+ ## 0.2.9 - 2026-09-19
25
+
26
+ - Exclude non-code documents, data, configuration and database files from AI review,
27
+ including Markdown, text, JSON, YAML, XML, CSV, Office documents and SQLite files.
28
+ Mapper metadata and ecosystem dependency audits retain their required inputs.
29
+ - Mark oversized packs as skipped once and continue other work. Skips retain a
30
+ reason, consume no agent attempts or retries, and never count as reviewed.
31
+ - Show skipped work in status and reports. Rescan or use `run --force` to retry it.
32
+ - Upgrade the ledger to schema 7 while preserving audit history. Older CLIs cannot
33
+ open this schema. Run `codemuster scan` after upgrading to refresh exclusions.
34
+
35
+ ## 0.2.8 - 2026-09-15
36
+
37
+ - Add settings-driven proactive plugin workflows for Claude and Codex, with shared
38
+ setup, skills and hooks.
39
+ - Isolate fix workers, enforce repair scope, preserve dirty work through explicit
40
+ stash handling, and validate fixes before recording success.
41
+ - Add opt-in static usage assessments and browser-backed user-experience reviews.
42
+ - Prevent dead-code scans from failing on wall-clock regex timeouts.
43
+ - Support exact CLI version pins and separate update caches by OS and architecture.
package/README.md CHANGED
@@ -78,6 +78,23 @@ With the CLI installed, run `codemuster skill install --for codex`. The installe
78
78
  `claude`, `codex`, `gemini`, and `opencode`; add `--global` for all repositories. Use either
79
79
  the plugin or a standalone skill copy in a given agent scope to avoid duplicate entries.
80
80
 
81
+ ## Tailor the configuration with AI
82
+
83
+ After `init`, run:
84
+
85
+ ```sh
86
+ codemuster intelligent-config
87
+ # Or choose the agent and model:
88
+ codemuster intelligent-config --agent codex --model <model-id> --effort high
89
+ ```
90
+
91
+ The command uses one read-only AI call to inspect tracked paths, manifest samples and source
92
+ samples. It applies validated exclusions and focused lenses for particular file types, and
93
+ selects a detected .NET solution or npm test command when none is configured. Existing custom
94
+ settings and test commands are preserved. It reports each applied change and keeps the exact
95
+ previous config in `.codemuster/config.backup-*.json`. Run `codemuster scan` afterward.
96
+ It does not run the configured tests, install dependencies, or start an audit or repair.
97
+
81
98
  ## Drive an audit yourself
82
99
 
83
100
  ```sh
@@ -88,6 +105,12 @@ codemuster status
88
105
  codemuster report --out audit.md
89
106
  ```
90
107
 
108
+ Before `run`, `verify`, `fix`, or `intelligent-config` starts agents, a preview shows the worker limit, provider,
109
+ model and thinking level. Interactive terminals wait ten seconds: press Enter to start now,
110
+ or Escape/Ctrl+C to cancel and change your options. CI and redirected commands do not wait.
111
+ Unset model/effort values are labeled provider defaults; pass `--model` and `--effort` to
112
+ choose them explicitly.
113
+
91
114
  `scan` maps entry-point call paths and unreached code by default. Use `scan --mode file` for one
92
115
  unit per included file. `estimate` approximates pending input tokens. `run` analyzes pending
93
116
  units and processes verification work when enabled. Repeat `run` to resume unfinished work.
@@ -149,10 +172,15 @@ codemuster --version
149
172
  - [Decisions](https://github.com/TSCarterJr/CodeMuster/blob/main/DECISIONS.md) and [implementation checklist](https://github.com/TSCarterJr/CodeMuster/blob/main/MVP-Checklist.md).
150
173
 
151
174
  These documents describe the repository source; an older installed release may have fewer
152
- options. The npm launcher checks for updates at most once a day and uses a downloaded update on
153
- a later invocation. Set `CI` or `CODEMUSTER_NO_UPDATE` to disable automatic checks.
175
+ options. The npm launcher checks availability on every normal command and prints the result to
176
+ stderr, with a two-second timeout. Registry failures do not stop your command. Available updates
177
+ still install in the background at most daily and take effect on a later invocation. Set `CI`,
178
+ `CODEMUSTER_NO_UPDATE`, or an exact version pin to disable automatic checks and installation.
154
179
  `codemuster update --check` checks availability without installing; `codemuster update` installs
155
- an available update. The 0.2.7 launcher supports `CODEMUSTER_VERSION=0.2.0` to select that exact binary, including when a newer build is cached. Unset the variable to resume normal selection; explicit updates are refused while pinned. Install the current launcher first to obtain pin support. Run `skill install` again to refresh an installed skill copy. See the user guide for rollback and ledger precautions.
180
+ an available update and displays all intervening entries from the packaged changelog. Version
181
+ history is maintained in [CHANGELOG.md](https://github.com/TSCarterJr/CodeMuster/blob/main/CHANGELOG.md).
182
+ Use `npm install -g codemuster` to upgrade the launcher itself and obtain these new notices;
183
+ `codemuster update` upgrades the platform binary. The 0.2.7 launcher supports `CODEMUSTER_VERSION=0.2.0` to select that exact binary, including when a newer build is cached. Unset the variable to resume normal selection; explicit updates are refused while pinned. Install the current launcher first to obtain pin support. Run `skill install` again to refresh an installed skill copy. See the user guide for rollback and ledger precautions.
156
184
 
157
185
  ## License
158
186
 
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ function releases(text) {
4
+ return text.replace(/\r\n/g, '\n').split(/^## /m).slice(1).flatMap((section) => {
5
+ const match = /^(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)(?: - [^\n]+)?\n([\s\S]*)$/.exec(section);
6
+ return match && match[2].trim() ? [{ version: match[1], body: match[2].trim() }] : [];
7
+ });
8
+ }
9
+
10
+ module.exports = { releases };
package/lib/launcher.js CHANGED
@@ -5,6 +5,7 @@ const crypto = require('node:crypto');
5
5
  const fs = require('node:fs');
6
6
  const os = require('node:os');
7
7
  const path = require('node:path');
8
+ const { releases } = require('./changelog');
8
9
 
9
10
  const REGISTRY = 'https://registry.npmjs.org';
10
11
  const DAY = 24 * 60 * 60 * 1000;
@@ -112,8 +113,8 @@ function tar(args) {
112
113
  childProcess.execFileSync(command, args, { stdio: 'pipe' });
113
114
  }
114
115
 
115
- async function getJson(url) {
116
- const response = await fetch(url, { signal: AbortSignal.timeout(60000), headers: { accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8' } });
116
+ async function getJson(url, timeoutMs = 60000) {
117
+ const response = await fetch(url, { signal: AbortSignal.timeout(timeoutMs), headers: { accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8' } });
117
118
  if (!response.ok) {
118
119
  throw new Error(`GET ${url} returned ${response.status}`);
119
120
  }
@@ -121,6 +122,42 @@ async function getJson(url) {
121
122
  return response.json();
122
123
  }
123
124
 
125
+ async function checkForUpdate({ currentVersion, registry = REGISTRY, timeoutMs = 2000, out = process.stderr }) {
126
+ try {
127
+ const packument = await getJson(`${registry}/codemuster`, timeoutMs);
128
+ const latest = packument['dist-tags']?.latest;
129
+ if (typeof latest !== 'string' || !VERSION.test(latest)) throw new Error('the registry named no valid latest version');
130
+ const comparison = compareVersions(latest, currentVersion);
131
+ if (comparison > 0) {
132
+ out.write(`codemuster ${latest} is available; running ${currentVersion}. Run codemuster update to install it.\n`);
133
+ } else if (comparison === 0) {
134
+ out.write(`codemuster ${currentVersion} is up to date\n`);
135
+ } else {
136
+ out.write(`codemuster ${currentVersion} is newer than the latest published version (${latest})\n`);
137
+ }
138
+ return latest;
139
+ } catch {
140
+ out.write(`codemuster: update check unavailable; continuing with ${currentVersion}\n`);
141
+ return null;
142
+ }
143
+ }
144
+
145
+ function showChanges(dir, currentVersion, latest, out) {
146
+ let entries = [];
147
+ try {
148
+ entries = releases(fs.readFileSync(path.join(dir, 'CHANGELOG.md'), 'utf8'))
149
+ .filter((entry) => compareVersions(entry.version, currentVersion) > 0 && compareVersions(entry.version, latest) <= 0)
150
+ .sort((a, b) => compareVersions(b.version, a.version));
151
+ } catch {
152
+ }
153
+ if (entries.length === 0) {
154
+ out.write('Release notes were not included in this package.\n');
155
+ return;
156
+ }
157
+ out.write(`\nWhat's changed since ${currentVersion}:\n\n`);
158
+ for (const entry of entries) out.write(`${entry.version}\n${entry.body}\n\n`);
159
+ }
160
+
124
161
  async function installVersion({ registry, version, versionsDir, platform, arch }) {
125
162
  if (!VERSION.test(version)) throw new Error(`invalid version: ${version}`);
126
163
  const pkg = platformPackage(platform, arch);
@@ -250,8 +287,9 @@ async function updateNow({ args, stateDir, platform, arch, currentVersion, regis
250
287
 
251
288
  out.write(`updating codemuster ${currentVersion} to ${latest}\n`);
252
289
  const versionsDir = versionsDirectory(stateDir, platform, arch);
290
+ let installedDir;
253
291
  try {
254
- await installVersion({ registry, version: latest, versionsDir, platform, arch });
292
+ installedDir = await installVersion({ registry, version: latest, versionsDir, platform, arch });
255
293
  } catch (error) {
256
294
  out.write(`codemuster: ${latest} could not be installed: ${error.message}\n`);
257
295
  return 1;
@@ -260,13 +298,14 @@ async function updateNow({ args, stateDir, platform, arch, currentVersion, regis
260
298
  fs.mkdirSync(stateDir, { recursive: true });
261
299
  fs.writeFileSync(path.join(stateDir, 'last-update-check'), String(Date.now()));
262
300
  out.write(`codemuster ${latest} is ready; the next command uses it\n`);
301
+ showChanges(installedDir, currentVersion, latest, out);
263
302
  return 0;
264
303
  }
265
304
 
266
305
  async function main(args, env = process.env) {
267
306
  if ((args[0] === 'update' && args.slice(1).some((arg) => arg === '--help' || arg === '-h'))
268
307
  || (args.length === 2 && args[0] === 'help' && args[1] === 'update')) {
269
- process.stdout.write('usage: codemuster update [--check]\n\nUpdate CodeMuster itself through the npm launcher.\n --check Show the available version without installing it\n\nAutomatic background checks can be disabled with CI or CODEMUSTER_NO_UPDATE.\n');
308
+ process.stdout.write('usage: codemuster update [--check]\n\nUpdate CodeMuster itself and show the intervening release notes.\n --check Show the available version without installing it\n\nNormal commands check availability with a two-second timeout.\nAutomatic checks and background updates can be disabled with CI or CODEMUSTER_NO_UPDATE.\n');
270
309
  return 0;
271
310
  }
272
311
 
@@ -292,10 +331,18 @@ async function main(args, env = process.env) {
292
331
  return updateNow({ args: args.slice(1), stateDir, platform, arch, currentVersion: build.version });
293
332
  }
294
333
 
295
- if (shouldCheckForUpdate({ env, now: Date.now(), lastCheck: readLastCheck(stateDir) })) {
296
- childProcess
297
- .spawn(process.execPath, [path.join(__dirname, 'update.js'), stateDir, build.version], { detached: true, stdio: 'ignore', windowsHide: true })
298
- .unref();
334
+ if (!env.CI && !env.CODEMUSTER_NO_UPDATE && !pinnedVersion) {
335
+ const latest = await checkForUpdate({ currentVersion: build.version });
336
+ if (latest && compareVersions(latest, build.version) > 0
337
+ && shouldCheckForUpdate({ env, now: Date.now(), lastCheck: readLastCheck(stateDir) })) {
338
+ try {
339
+ childProcess
340
+ .spawn(process.execPath, [path.join(__dirname, 'update.js'), stateDir, build.version], { detached: true, stdio: 'ignore', windowsHide: true })
341
+ .on('error', () => {})
342
+ .unref();
343
+ } catch {
344
+ }
345
+ }
299
346
  }
300
347
 
301
348
  return runBuild(build.binary, args);
@@ -306,6 +353,7 @@ module.exports = {
306
353
  versionsDirectory,
307
354
  binaryName,
308
355
  compareVersions,
356
+ checkForUpdate,
309
357
  installVersion,
310
358
  main,
311
359
  newestBuild,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemuster",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "CodeMuster: full-coverage codebase audits with a coverage number, driven by your coding agent through one skill.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Tim Carter",
@@ -27,7 +27,8 @@
27
27
  "files": [
28
28
  "bin",
29
29
  "lib",
30
- "README.md"
30
+ "README.md",
31
+ "CHANGELOG.md"
31
32
  ],
32
33
  "engines": {
33
34
  "node": ">=22"
@@ -36,11 +37,11 @@
36
37
  "test": "node --test test/launcher.test.js test/plugin.test.js test/release.test.js"
37
38
  },
38
39
  "optionalDependencies": {
39
- "@codemuster/darwin-arm64": "0.2.9",
40
- "@codemuster/darwin-x64": "0.2.9",
41
- "@codemuster/linux-arm64": "0.2.9",
42
- "@codemuster/linux-x64": "0.2.9",
43
- "@codemuster/win32-arm64": "0.2.9",
44
- "@codemuster/win32-x64": "0.2.9"
40
+ "@codemuster/darwin-arm64": "0.3.0",
41
+ "@codemuster/darwin-x64": "0.3.0",
42
+ "@codemuster/linux-arm64": "0.3.0",
43
+ "@codemuster/linux-x64": "0.3.0",
44
+ "@codemuster/win32-arm64": "0.3.0",
45
+ "@codemuster/win32-x64": "0.3.0"
45
46
  }
46
47
  }