baldart 3.7.0 → 3.7.1

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
@@ -5,6 +5,20 @@ All notable changes to BALDART will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.7.1] - 2026-05-22
9
+
10
+ `baldart update` now actively migrates pre-v3.7.0 configs to the new multi-tool layout instead of silently leaving them on `[claude]` only.
11
+
12
+ ### Fixed
13
+
14
+ - **`src/commands/update.js` legacy-config migration** — after the subtree pull, if `baldart.config.yml` exists but `tools.enabled` is missing/empty, the CLI now:
15
+ 1. Detects the legacy state.
16
+ 2. Surfaces the new capability and shows the autodetected tool list (Claude always, plus Codex if `~/.codex/` exists).
17
+ 3. Asks: *"Backfill `tools.enabled: [claude, codex]` into baldart.config.yml?"*.
18
+ 4. On accept: writes the array into the config AND re-runs `mergeSkills` for the new tools so `.agents/skills/` is populated immediately — not deferred to the next update.
19
+
20
+ Without this, a pre-v3.7.0 install upgrading to v3.7.x would never get the Codex skill dir populated, because the per-tool dispatch falls back to `['claude']` when `tools.enabled` is absent.
21
+
8
22
  ## [3.7.0] - 2026-05-22
9
23
 
10
24
  BALDART is now AI-tool agnostic. Every framework skill is installed into both Claude Code (`.claude/skills/`) AND OpenAI Codex CLI (`.agents/skills/`) when both are enabled — same source, two symlinks, zero duplication. Codex skill format is structurally identical to Claude's (`SKILL.md` with `name` + `description` frontmatter + optional `scripts/`/`references/`/`assets/`), so the same file works for both runtimes.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.7.0
1
+ 3.7.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baldart",
3
- "version": "3.7.0",
3
+ "version": "3.7.1",
4
4
  "description": "Claude Agent Framework - Reusable framework for coordinating AI agents and humans in software projects",
5
5
  "bin": {
6
6
  "baldart": "./bin/baldart.js"
@@ -370,17 +370,47 @@ async function update(options = {}) {
370
370
  await configureCmd();
371
371
  }
372
372
  } else {
373
- // Optional: detect schema drift by comparing template vs existing.
373
+ // Schema migration: backfill `tools.enabled` for configs created
374
+ // before v3.7.0 (the multi-tool release). Without this, a legacy
375
+ // install that has Codex on the machine would never get .agents/skills/
376
+ // populated, because update would keep defaulting to ['claude'].
374
377
  const yaml = require('js-yaml');
378
+ let needsRewrite = false;
379
+ let cur = {};
380
+ try { cur = yaml.load(fs.readFileSync(configPath, 'utf8')) || {}; } catch (_) { cur = null; }
381
+
382
+ if (cur && (!cur.tools || !Array.isArray(cur.tools.enabled) || cur.tools.enabled.length === 0)) {
383
+ const toolAdapters = require('../utils/tool-adapters');
384
+ const suggested = toolAdapters.defaultEnabled();
385
+ UI.newline();
386
+ UI.warning('Pre-v3.7.0 config detected — `tools.enabled` is missing.');
387
+ UI.info(`From v3.7.0, BALDART can install framework skills for multiple AI tools (Claude Code, OpenAI Codex CLI, …) from the same source.`);
388
+ UI.info(`Autodetected on this machine: ${suggested.join(', ')}`);
389
+ const ok = await UI.confirm(`Backfill \`tools.enabled: [${suggested.join(', ')}]\` into baldart.config.yml?`, true);
390
+ if (ok) {
391
+ cur.tools = cur.tools || {};
392
+ cur.tools.enabled = suggested;
393
+ fs.writeFileSync(configPath, yaml.dump(cur, { lineWidth: 100, noRefs: true }));
394
+ UI.success('Backfilled tools.enabled. Re-running the symlink reconcile to install per-tool skill dirs…');
395
+ // Re-run merge so the just-backfilled tools get their skill dirs populated now.
396
+ try { symlinks.mergeSkills({ tools: suggested }); }
397
+ catch (err) { UI.warning(`Skill merge for new tools failed: ${err.message}`); }
398
+ needsRewrite = true;
399
+ } else {
400
+ UI.info('Skipped. You can add it manually under `tools:` in baldart.config.yml or rerun `npx baldart configure`.');
401
+ }
402
+ }
403
+
404
+ // Detect schema drift on other keys (features.*, paths.*).
375
405
  const templatePath = path.join('.framework', 'framework', 'templates', 'baldart.config.template.yml');
376
406
  if (fs.existsSync(templatePath)) {
377
407
  try {
378
408
  const tpl = yaml.load(fs.readFileSync(templatePath, 'utf8')) || {};
379
- const cur = yaml.load(fs.readFileSync(configPath, 'utf8')) || {};
409
+ const cur2 = needsRewrite ? cur : (yaml.load(fs.readFileSync(configPath, 'utf8')) || {});
380
410
  const missingFeatures = Object.keys(tpl.features || {})
381
- .filter((k) => !(k in (cur.features || {})));
411
+ .filter((k) => !(k in (cur2.features || {})));
382
412
  const missingPaths = Object.keys(tpl.paths || {})
383
- .filter((k) => !(k in (cur.paths || {})));
413
+ .filter((k) => !(k in (cur2.paths || {})));
384
414
  if (missingFeatures.length || missingPaths.length) {
385
415
  UI.newline();
386
416
  UI.warning(