baldart 5.1.0 → 5.2.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 +115 -0
- package/README.md +3 -3
- package/VERSION +1 -1
- package/framework/.claude/agents/CHANGELOG.md +45 -0
- package/framework/.claude/agents/REGISTRY.md +2 -2
- package/framework/.claude/agents/coder.md +3 -3
- package/framework/.claude/agents/remotion-animator-orchestrator.md +4 -3
- package/framework/.claude/agents/ui-expert.md +4 -10
- package/framework/.claude/agents/ui-quality-critic.md +27 -11
- package/framework/.claude/skills/design-system-init/CHANGELOG.md +5 -0
- package/framework/.claude/skills/design-system-init/SKILL.md +2 -2
- package/framework/.claude/skills/e2e-review/CHANGELOG.md +5 -0
- package/framework/.claude/skills/e2e-review/SKILL.md +2 -2
- package/framework/.claude/skills/frontend-design/CHANGELOG.md +20 -0
- package/framework/.claude/skills/frontend-design/SKILL.md +39 -216
- package/framework/.claude/skills/gamification-design/CHANGELOG.md +5 -0
- package/framework/.claude/skills/gamification-design/SKILL.md +2 -2
- package/framework/.claude/skills/ui-design/CHANGELOG.md +60 -1
- package/framework/.claude/skills/ui-design/SKILL.md +127 -75
- package/framework/.claude/skills/ui-design/references/anti-slop.md +106 -0
- package/framework/.claude/skills/ui-design/references/craft-standards.md +259 -0
- package/framework/.claude/skills/ui-design/references/design-brief.md +92 -0
- package/framework/.claude/skills/ui-design/references/design-directions.md +188 -0
- package/framework/.claude/skills/ui-design/references/evaluation.md +125 -165
- package/framework/.claude/skills/ui-design/references/generation.md +125 -92
- package/framework/.claude/skills/ui-design/references/inventory.md +9 -2
- package/framework/.claude/skills/ui-design/scripts/craft-check.mjs +248 -0
- package/framework/.claude/skills/worktree-manager/CHANGELOG.md +19 -0
- package/framework/.claude/skills/worktree-manager/SKILL.md +29 -8
- package/framework/.claude/skills/worktree-manager/scripts/merge-worktree.sh +25 -3
- package/framework/agents/component-manifest-schema.md +1 -1
- package/framework/agents/design-system-protocol.md +6 -6
- package/framework/agents/index.md +1 -0
- package/framework/agents/skills-mapping.md +25 -23
- package/framework/docs/PROJECT-CONFIGURATION.md +5 -5
- package/package.json +1 -1
- package/src/commands/configure.js +1 -1
- package/src/utils/__tests__/classify-divergence.test.js +42 -0
- package/src/utils/git.js +45 -9
package/src/utils/git.js
CHANGED
|
@@ -209,10 +209,13 @@ class GitUtils {
|
|
|
209
209
|
// - subtree-merge: `git subtree pull --squash` merge commits
|
|
210
210
|
// - subtree-squash: the squash payload commits themselves
|
|
211
211
|
// - chore-wrapper: CLI-generated [CHORE]/chore(baldart): commits
|
|
212
|
-
// - absorbed: a would-be custom commit whose touched .framework/
|
|
213
|
-
// are now byte-identical to upstream (FETCH_HEAD) — the
|
|
214
|
-
// has been absorbed into upstream (or reset away), so a
|
|
215
|
-
// re-sync loses nothing.
|
|
212
|
+
// - absorbed: a would-be custom commit whose touched .framework/ PAYLOAD
|
|
213
|
+
// files are now byte-identical to upstream (FETCH_HEAD) — the
|
|
214
|
+
// edit has been absorbed into upstream (or reset away), so a
|
|
215
|
+
// re-sync loses nothing. Consumer files (outside .framework/)
|
|
216
|
+
// and subtree bookkeeping (VERSION/CHANGELOG/README) are not
|
|
217
|
+
// counted (see absorbablePayloadSubset). Pure history, not
|
|
218
|
+
// live drift → noise.
|
|
216
219
|
// - custom-overlay-able: user edited a framework agent/skill/command
|
|
217
220
|
// → should migrate to .baldart/overlays/
|
|
218
221
|
// - custom-other: anything else (src/, CHANGELOG, ad-hoc fixes)
|
|
@@ -297,18 +300,51 @@ class GitUtils {
|
|
|
297
300
|
});
|
|
298
301
|
}
|
|
299
302
|
|
|
300
|
-
//
|
|
303
|
+
// The subset of a commit's touched paths whose byte-content must match
|
|
304
|
+
// upstream for the commit to count as "absorbed". Two classes of path are
|
|
305
|
+
// EXCLUDED because they can never conflict in a `.framework/` subtree sync:
|
|
306
|
+
// 1. Anything outside `.framework/` — the consumer's OWN files. A mixed
|
|
307
|
+
// commit that edits both a framework doc and app code (e.g. a FEAT that
|
|
308
|
+
// also tweaks a protocol module) is common; the subtree merge never
|
|
309
|
+
// touches the app files, so they are irrelevant to whether the commit's
|
|
310
|
+
// framework portion is absorbed. (Pre-v5.1.1 the check bailed to
|
|
311
|
+
// not-absorbed on the FIRST such path → mixed commits falsely blocked
|
|
312
|
+
// the update even when their `.framework/` payload matched upstream.)
|
|
313
|
+
// 2. Subtree bookkeeping (`.framework/{VERSION,CHANGELOG.md,README.md}`) —
|
|
314
|
+
// framework-owned metadata the merge reconciles wholesale, which ALWAYS
|
|
315
|
+
// differs across versions (VERSION bumps, CHANGELOG grows). Counting it
|
|
316
|
+
// meant any commit touching it (e.g. an add-then-revert pair) could
|
|
317
|
+
// never be absorbed. It is never consumer content, so dropping it is
|
|
318
|
+
// safe: a hand-edit to it SHOULD be overwritten by upstream anyway.
|
|
319
|
+
// Pure (no fs / no git) so it stays unit-testable.
|
|
320
|
+
static absorbablePayloadSubset(touched) {
|
|
321
|
+
const prefix = `${FRAMEWORK_DIR}/`;
|
|
322
|
+
const META = new Set([
|
|
323
|
+
`${prefix}VERSION`,
|
|
324
|
+
`${prefix}CHANGELOG.md`,
|
|
325
|
+
`${prefix}README.md`,
|
|
326
|
+
]);
|
|
327
|
+
return (touched || []).filter((p) => p.startsWith(prefix) && !META.has(p));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// True when EVERY `.framework/` PAYLOAD file touched by the commit is already
|
|
301
331
|
// byte-identical to the upstream (FETCH_HEAD) blob — i.e. the commit's edit
|
|
302
332
|
// has been fully absorbed into upstream (or reset away) and a re-sync would
|
|
303
333
|
// lose nothing. Compares blob SHAs (cheap, exact). The subtree prefix
|
|
304
334
|
// `.framework/` is stripped to reach the upstream path (FETCH_HEAD has no
|
|
305
|
-
// `.framework/` prefix).
|
|
306
|
-
//
|
|
335
|
+
// `.framework/` prefix). The comparison runs over `absorbablePayloadSubset`
|
|
336
|
+
// ONLY (consumer files + subtree bookkeeping excluded — see there). A commit
|
|
337
|
+
// whose payload subset is EMPTY (it touched `.framework/` only via bookkeeping
|
|
338
|
+
// and/or only touched consumer files) carries no subtree drift → absorbed.
|
|
339
|
+
// Conservative on the payload itself: a file missing at HEAD (deleted) or
|
|
340
|
+
// missing upstream (net-new), or whose SHA differs → not absorbed (real
|
|
341
|
+
// drift, keep flagging).
|
|
307
342
|
async isAbsorbedAgainstUpstream(touched) {
|
|
308
343
|
if (!touched || !touched.length) return false;
|
|
309
344
|
const prefix = `${FRAMEWORK_DIR}/`;
|
|
310
|
-
|
|
311
|
-
|
|
345
|
+
const payload = GitUtils.absorbablePayloadSubset(touched);
|
|
346
|
+
if (!payload.length) return true;
|
|
347
|
+
for (const p of payload) {
|
|
312
348
|
const upstreamPath = p.slice(prefix.length);
|
|
313
349
|
let headSha;
|
|
314
350
|
let upSha;
|