baldart 4.89.1 → 4.89.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
@@ -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
+ ## [4.89.2] - 2026-07-01
9
+
10
+ **`baldart update` auto-commit now covers the FULL payload — Codex artifacts included.** A consumer reported that `baldart update` "never commits anything" even when authorized, and that other clones keep seeing the same files untracked. Root cause: `postUpdateAutoCommit` (`src/commands/update.js`) auto-commits only paths matching `BALDART_MANAGED_PATTERNS`; everything else is classified `userOwned` and left in the tree forever. The allowlist had drifted behind the payloads BALDART actually writes — it was missing every Codex-native artifact (`.codex/agents/*.toml` transpiled agents v4.80.0, `.codex/hooks.json` v4.88.0, `.agents/skills/*` skill symlinks v3.7.0), `.claude/output-styles/` (v4.50.0), and the i18n gate files (`eslint.i18n.config.mjs` / `.eslintrc.i18n.json` / the `paths.i18n_registry` directory, v4.52.0). On a Codex-enabled consumer the 32 `.toml` files are regenerated as real files on every update, classified `userOwned`, never committed → churn in every other clone.
11
+
12
+ **PATCH** — bugfix, no install-layout or command-surface change; existing consumers get correct auto-commit on their next `update`. **No new `baldart.config.yml` key** (the i18n directory is *derived from* the existing `paths.i18n_registry`) → the schema-change propagation rule does NOT apply.
13
+
14
+ **Codex parity: adapter-generated / N/A** — the fix is precisely the parity closure (the Codex-written payloads are now committed exactly like the Claude ones); the single classifier serves both runtimes.
15
+
16
+ ### Fixed
17
+
18
+ - **`BALDART_MANAGED_PATTERNS` extended** to the full written payload: `.codex/` (agents + hooks), `.agents/skills/`, `.claude/output-styles/`, `eslint.i18n.config.mjs`, `.eslintrc.i18n.json`. A prominent INVARIANT comment now warns that any new written payload MUST add its pattern here in the same change (parity twin of the schema-change propagation rule).
19
+ - **New `i18nRegistryPatterns(cwd)`** derives the i18n context-registry file + its containing directory from `paths.i18n_registry` (fallback `docs/i18n/registry.yml`), so the configurable path is auto-committed without hardcoding. `isBaldartManagedPath(p, extra)` now accepts these config-derived patterns.
20
+ - **`.claude/settings.local.json` stays excluded** by design (personal, gitignored — the output-style activation target), so widening the `.claude/*` group to `output-styles` does not sweep in personal settings.
21
+
8
22
  ## [4.89.1] - 2026-07-01
9
23
 
10
24
  **`/new` tracker-write economy — remove the phase-entry write prompts.** An audit (mayo FEAT-0064) measured **20 orchestrator turns whose only tool call was a tracker `Edit`** (~5-11M tokens of pure `cache_read` replay, ~3-6% of the run). The § "Context economy" rule already forbids lone tracker-`Edit` turns (and the metric is trending down: 38 → 28 → 20), so this is a compliance gap, not a missing rule. The non-redundant fix: the per-phase reference modules carried ~9 numbered `**Update tracker**: phase = "X"` **phase-entry** steps (no data) that actively prompt a standalone write, contradicting the global co-emit rule. Removing that prompt at the source is more effective than more prose.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 4.89.1
1
+ 4.89.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baldart",
3
- "version": "4.89.1",
3
+ "version": "4.89.2",
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"
@@ -120,22 +120,67 @@ function scaffoldOverlaysForCommits(commits) {
120
120
 
121
121
  // Path prefixes BALDART itself writes during install/update. Anything outside
122
122
  // these patterns is treated as user-owned and never auto-staged.
123
+ //
124
+ // INVARIANT (do not let this list drift again): this allowlist MUST cover the
125
+ // FULL set of payloads BALDART writes to a consumer's tree — every runtime, not
126
+ // just Claude. A path BALDART generates but that is absent here is classified
127
+ // `userOwned`, never auto-committed, and resurfaces as an untracked/modified
128
+ // file in every other clone of the repo (the exact "commit never happens →
129
+ // other terminals see churn" bug). When you add ANY new written payload — a new
130
+ // `.claude/*` payload kind, a Codex artifact under `.codex/` or `.agents/`, a
131
+ // root file, an i18n/toolchain config — add its pattern here in the SAME change
132
+ // (parity twin of the schema-change propagation rule). See CHANGELOG v4.89.2.
123
133
  const BALDART_MANAGED_PATTERNS = [
124
134
  /^\.framework(\/|$)/,
125
135
  /^AGENTS\.md$/,
126
136
  /^CLAUDE\.md$/,
127
137
  /^agents(\.backup)?(\/|$)/,
128
- /^\.claude\/(agents|commands|skills|workflows|hooks|routines|settings\.json)(\/|$)/,
138
+ // Claude payload kinds (incl. output-styles, v4.50.0).
139
+ /^\.claude\/(agents|commands|skills|workflows|hooks|routines|output-styles|settings\.json)(\/|$)/,
140
+ // Codex-native payloads: skill symlinks (v3.7.0), transpiled agents (v4.80.0),
141
+ // native hooks (v4.88.0). Only exist when `tools.enabled ∋ codex`, so listing
142
+ // them unconditionally is safe — absent means never dirty.
143
+ /^\.agents\/skills(\/|$)/,
144
+ /^\.codex(\/|$)/,
129
145
  /^\.baldart(\/|$)/,
130
146
  /^baldart\.config\.yml$/,
131
147
  /^docs\/references\/(ui-guidelines\.template\.md|brand-guidelines\.md)$/,
132
148
  /^templates(\/|$)/,
133
149
  /^\.github\/workflows\/baldart-/,
134
- /^scripts\/routines(\/|$)/
150
+ /^scripts\/routines(\/|$)/,
151
+ // i18n gate configs written by src/utils/i18n-gate.js (flat + legacy).
152
+ /^eslint\.i18n\.config\.mjs$/,
153
+ /^\.eslintrc\.i18n\.json$/
135
154
  ];
136
155
 
137
- function isBaldartManagedPath(p) {
138
- return BALDART_MANAGED_PATTERNS.some((rx) => rx.test(p));
156
+ // The i18n context registry path is consumer-configurable (paths.i18n_registry),
157
+ // so its containing directory can't be a static literal — derive it from config
158
+ // so the registry file BALDART writes is auto-committed like every other managed
159
+ // payload. Falls back to the template default (docs/i18n/) when unset/unreadable.
160
+ function i18nRegistryPatterns(cwd = process.cwd()) {
161
+ let rel = 'docs/i18n/registry.yml';
162
+ try {
163
+ const fs = require('fs');
164
+ const path = require('path');
165
+ const yaml = require('js-yaml');
166
+ const cfgPath = path.join(cwd, 'baldart.config.yml');
167
+ if (fs.existsSync(cfgPath)) {
168
+ const cfg = yaml.load(fs.readFileSync(cfgPath, 'utf8'));
169
+ const v = cfg && cfg.paths && cfg.paths.i18n_registry;
170
+ if (typeof v === 'string' && v.trim()) rel = v.trim();
171
+ }
172
+ } catch (_) { /* fall back to the template default */ }
173
+ const norm = rel.replace(/\\/g, '/');
174
+ const out = [new RegExp('^' + norm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '$')];
175
+ const dir = norm.replace(/\/[^/]*$/, '');
176
+ if (dir && dir !== norm) {
177
+ out.push(new RegExp('^' + dir.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '(\\/|$)'));
178
+ }
179
+ return out;
180
+ }
181
+
182
+ function isBaldartManagedPath(p, extra = []) {
183
+ return BALDART_MANAGED_PATTERNS.some((rx) => rx.test(p)) || extra.some((rx) => rx.test(p));
139
184
  }
140
185
 
141
186
  // Re-generate the root primitives (AGENTS.md + CLAUDE.md) from the versioned
@@ -206,10 +251,11 @@ async function postUpdateAutoCommit(git, newVersion, options) {
206
251
  const seen = new Set();
207
252
  const managed = [];
208
253
  const userOwned = [];
254
+ const extraPatterns = i18nRegistryPatterns();
209
255
  for (const p of allDirty) {
210
256
  if (!p || seen.has(p)) continue;
211
257
  seen.add(p);
212
- (isBaldartManagedPath(p) ? managed : userOwned).push(p);
258
+ (isBaldartManagedPath(p, extraPatterns) ? managed : userOwned).push(p);
213
259
  }
214
260
  if (managed.length === 0) {
215
261
  return;