From 374127834fed3f6228cb3368248b976c9268fcc6 Mon Sep 17 00:00:00 2001 From: SteveBot <1153461+unbraind@users.noreply.github.com> Date: Wed, 22 Jul 2026 00:18:39 +0200 Subject: [PATCH] fix: auto-wire field-aware merge driver on install + bump pm-cli to ^2026.7.21 The .gitattributes merge-driver fence adopted in PR #5 is inert without the per-clone merge..driver git config. Add a guarded `prepare` (`if command -v pm; then pm merge install; fi`) so npm install/ci wires it automatically when pm is present and skips cleanly otherwise (e.g. --omit=dev); plus a merge:install script and a README note. Bump @unbrained/pm-cli devDep to ^2026.7.21 (driver requires 2026.7.20+) and sync the lockfile. Verified: with config unset, npm ci restores merge.pm-item-toon.driver; typecheck/test/changelog:check green. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 9 +++++++++ package-lock.json | 8 ++++---- package.json | 6 ++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9b8e393..f611c70 100644 --- a/README.md +++ b/README.md @@ -200,3 +200,12 @@ MIT ## Release Automation This package is release-ready for GitHub, npm, and Bun-compatible installs. CI runs type checking, build, production dependency audit, package packing, Bun install verification, and pm-changelog validation. The daily release workflow publishes only when commits exist after the latest release tag and uses pm-changelog to generate CHANGELOG.md and GitHub release notes. + +## Multi-agent merge safety + +This repo tracks its project management in `.agents/pm/` and ships a committed `.gitattributes` +that maps those tracker artifacts to pm-cli's field-aware Git merge drivers, so concurrent-branch +tracker edits merge cleanly. The driver definitions live in per-clone Git config; `npm install` / +`npm ci` wires them automatically via the `prepare` script (`pm merge install`). To (re)run +manually: `npm run merge:install`. After merging a branch that touched `.agents/pm/`, run +`pm history-repair --all` to reconcile history verification. diff --git a/package-lock.json b/package-lock.json index 842055e..e10759f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@types/node": "^26.1.1", - "@unbrained/pm-cli": "^2026.7.20", + "@unbrained/pm-cli": "^2026.7.21", "pm-changelog": "^2026.7.18", "typescript": "^7.0.2" }, @@ -717,9 +717,9 @@ } }, "node_modules/@unbrained/pm-cli": { - "version": "2026.7.20", - "resolved": "https://registry.npmjs.org/@unbrained/pm-cli/-/pm-cli-2026.7.20.tgz", - "integrity": "sha512-PRY4X/S9wq/4cc9PU5UEDg4Be8iGUo5WFdOoNnE0Ly61FhW0rOJD+ZxfnykqnC4IJlSn9wgRgDpW9Ch++0TaNQ==", + "version": "2026.7.21", + "resolved": "https://registry.npmjs.org/@unbrained/pm-cli/-/pm-cli-2026.7.21.tgz", + "integrity": "sha512-U31SEZtw58QlR3DU/nqU5Cab6sz6DVjxqbg8JLt7lmfstdQWW3n+SW6K3xIQXDanvbQQSPOF26UjvnDzrOTaTw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 171b90c..def1eec 100644 --- a/package.json +++ b/package.json @@ -33,14 +33,16 @@ "changelog:check": "pm-changelog --pm-root .agents/pm --mode prepend --output CHANGELOG.md --release-version-from-package --since-previous-tag --until-release-tag --item-url-base https://github.com/unbraind/pm-github/blob/main/.agents/pm --check", "release:check": "npm run typecheck && npm run build && npm test && npm run audit:prod && npm run pack:dry-run && npm run changelog:check", "prepublishOnly": "npm run release:check", - "release:notes": "pm-changelog --pm-root .agents/pm --stdout --since-previous-tag --until-release-tag --release-version-from-package --item-url-base https://github.com/unbraind/pm-github/blob/main/.agents/pm --pm-bin ./node_modules/.bin/pm --github-step-summary" + "release:notes": "pm-changelog --pm-root .agents/pm --stdout --since-previous-tag --until-release-tag --release-version-from-package --item-url-base https://github.com/unbraind/pm-github/blob/main/.agents/pm --pm-bin ./node_modules/.bin/pm --github-step-summary", + "prepare": "if command -v pm >/dev/null 2>&1; then pm merge install; fi", + "merge:install": "pm merge install" }, "peerDependencies": { "@unbrained/pm-cli": ">=2026.7.20" }, "devDependencies": { "@types/node": "^26.1.1", - "@unbrained/pm-cli": "^2026.7.20", + "@unbrained/pm-cli": "^2026.7.21", "pm-changelog": "^2026.7.18", "typescript": "^7.0.2" },