mason-context 0.8.0 → 0.9.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/README.md +13 -0
- package/dist/mason-audit.js +1 -0
- package/dist/mason-audit.js.map +1 -1
- package/dist/mason-mcp.js +1 -1
- package/dist/mason-review.js +418 -0
- package/dist/mason-review.js.map +1 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -237,6 +237,19 @@ Add the printed block to `.claude/settings.json` — the *committed* project set
|
|
|
237
237
|
|
|
238
238
|
For faster fires than `npx` resolution allows, install the package (`npm i -D mason-context`) and point the command at `node_modules/.bin/mason-hook`.
|
|
239
239
|
|
|
240
|
+
## Diff review (mason-review)
|
|
241
|
+
|
|
242
|
+
A classic agent failure mode is the local edit that misses its coupled update — the serializer without the migration, the config without its consumer. The coupling is invisible to static analysis, but it's sitting in git history. `mason-review` diffs the current branch against a base ref and reports two things:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
npx -p mason-context mason-review --base origin/main
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
- **Missing co-change partners** — files that changed together with a changed file in ≥60% of its commits (≥4 shared, 1500-commit window) but are absent from this diff. Evidence-based but heuristic-grade: a missing partner is a question to ask the diff, not proof of a bug. These drive exit 1.
|
|
249
|
+
- **Touched decisions** — decision records whose anchor files the diff touches, listed as constraints to verify against. Informational; never affect the exit code.
|
|
250
|
+
|
|
251
|
+
Deterministic, no LLM, one pass over git history (~100ms). Run it locally before pushing, or wire it into CI as an advisory check (`mason-review || true` if you want the signal without the gate).
|
|
252
|
+
|
|
240
253
|
## Confluence sync
|
|
241
254
|
|
|
242
255
|
Keep a Confluence wiki in sync with the concept map, in plain product language that PMs and designers can read. Each sync rewrites the snapshot through your assistant into PM-friendly descriptions, pushes one page per feature, and posts a "what changed since last sync" entry to a changelog page. Mason owns these pages and overwrites each one on every sync, so edit the code, not the page — manual edits to a page body are replaced. Re-running a sync with no code change is a no-op: it makes no Confluence edits at all.
|
package/dist/mason-audit.js
CHANGED
|
@@ -231,6 +231,7 @@ function normalizePathToken(token) {
|
|
|
231
231
|
if (t.includes(":")) return null;
|
|
232
232
|
const normalized = t.replace(/\/+$/, "");
|
|
233
233
|
if (!normalized) return null;
|
|
234
|
+
if (normalized.split("/").some((seg) => /^\.+$/.test(seg))) return null;
|
|
234
235
|
if (normalized.includes("/")) return normalized;
|
|
235
236
|
return ROOT_FILE_NAMES.has(normalized) ? normalized : null;
|
|
236
237
|
}
|