mason-context 0.12.0 β 0.14.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/CHANGELOG.md +26 -1
- package/README.md +39 -513
- package/dist/mason-audit.js +92 -26
- package/dist/mason-audit.js.map +1 -1
- package/dist/mason-auto.js +2885 -548
- package/dist/mason-auto.js.map +1 -1
- package/dist/mason-drift.js +1 -1
- package/dist/mason-drift.js.map +1 -1
- package/dist/mason-hook.js +1 -1
- package/dist/mason-hook.js.map +1 -1
- package/dist/mason-mcp.js +4535 -3418
- package/dist/mason-mcp.js.map +1 -1
- package/dist/mason-review.js +1 -1
- package/dist/mason-review.js.map +1 -1
- package/dist/mason.js +4842 -15
- package/dist/mason.js.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Mason
|
|
1
|
+
# Mason
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mason-context)
|
|
4
4
|
[](https://github.com/adrianczuczka/mason/actions/workflows/ci.yml)
|
|
@@ -6,548 +6,74 @@
|
|
|
6
6
|
[](https://github.com/adrianczuczka/mason/blob/main/LICENSE)
|
|
7
7
|
[](https://github.com/adrianczuczka/mason/issues)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Your AI agent is creating tech debt.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Mason helps your coding agent catch what a patch leaves behind:** stale instructions, missed companion updates, and engineering decisions that need another look.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Works through MCP, with automatic documentation checks for **Codex** and **Claude Code**. No concept map required.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
npx -p mason-context mason-audit --dir .
|
|
17
|
-
npx -p mason-context mason-review --dir . --base origin/main
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The audit checks claims in `AGENTS.md` and `CLAUDE.md` against the repository. The review checks committed changes from the merge base to HEAD for missing historical change partners and touched decisions. Choose the base branch you normally review against. Missing context files, unavailable history, and skipped checks are reported explicitly; these commands do not certify a patch's correctness.
|
|
21
|
-
|
|
22
|
-
To capture and retrieve lessons while coding, connect Mason to your assistant:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
claude mcp add mason --scope user -- npx -p mason-context mason-mcp
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Restart Claude Code, then ask: *"Use Mason to check this project and set up decision capture."* `mason_init` returns the audit and review findings plus a short guide for adding Mason instructions to the project's existing `AGENTS.md` or `CLAUDE.md`. It does not build a map by default.
|
|
29
|
-
|
|
30
|
-
After resolving a real incident or settling a constraint, ask your assistant to record the reason with `save_decision`. On the next related task, `get_context` retrieves it as a proposal with file impact, tests, and trust evidence. Use `review_decision` when you are ready to record acceptance. Both work immediately, even without running setup.
|
|
31
|
-
|
|
32
|
-
For architecture navigation, ask: *"Build a Mason concept map."* The assistant calls `mason_init` with `mode: "map"` for the full Map-Reduce workflow.
|
|
33
|
-
|
|
34
|
-
> **0.10.1 decision fix:** Accepted constraints remain visible while their replacement revisions are proposed. Update every client sharing the decision store to `mason-context@0.10.1` and restart it; no data migration is needed. See the [release notes](CHANGELOG.md#0101--2026-09-05).
|
|
35
|
-
|
|
36
|
-
> **Upgrading from 0.9.x:** Update Mason in every client that shares decision records, then re-run `mason_init` and refresh the marker-delimited assistant instructions. New decisions are version 2 proposals; legacy records stay explicitly unreviewed until reviewed. Use `review_decision` for acceptance or reaffirmation; saving unchanged content no longer refreshes evidence. Map builds now require `mode: "map"`. See the [migration notes](CHANGELOG.md#upgrading-from-090).
|
|
37
|
-
|
|
38
|
-
> **0.4.0 note:** The previous `mason <command>` CLI was removed in v0.4.0. Setup and map editing use MCP; dedicated drift, audit, hook, and review binaries support automation. See [0.4.0 migration](#040-migration) below if you used the old CLI.
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## The pain
|
|
43
|
-
|
|
44
|
-
Agentic search keeps getting better at re-deriving what's *in* the code β but three kinds of context can't be re-derived, and today they evaporate:
|
|
45
|
-
|
|
46
|
-
- **Decisions.** "We tried retrying 401s in 2023; it locked accounts." Your assistant re-suggests it next sprint, in every teammate's session.
|
|
47
|
-
- **History.** Which files change together, which dirs are dead β knowledge that lives in thousands of commits, too expensive to mine per session.
|
|
48
|
-
- **Freshness.** Any cached understanding β a wiki, a CLAUDE.md, a map β rots silently, and a confidently wrong assistant is worse than a slow one.
|
|
49
|
-
|
|
50
|
-
## The fix
|
|
51
|
-
|
|
52
|
-
Mason is an MCP server that assembles repository knowledge per task and checks it against source and Git evidence:
|
|
53
|
-
|
|
54
|
-
- **Decision records** (`.mason/decisions/`) β lessons and constraints captured by `save_decision`, ready for normal code review and commit
|
|
55
|
-
- **Optional concept map** (`.mason/snapshot.json`) β features and flows β files, built by your assistant, spot-checked by `verify_snapshot`
|
|
56
|
-
- **Drift engine** β LLM-free evidence of what changed, per entry, with a self-maintaining refresh loop for CI
|
|
57
|
-
|
|
58
|
-
One `get_context` call retrieves matching decisions with their full rationale and trust evidence. Known file paths or matched decision anchors provide tests and impact; an available map adds relevant features and flows. An optional map looks like:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"features": {
|
|
63
|
-
"home screen": {
|
|
64
|
-
"files": ["HomeScreen.kt", "HomeViewModel.kt", "GetWeatherDataUseCase.kt"]
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"flows": {
|
|
68
|
-
"weather fetch": {
|
|
69
|
-
"chain": ["HomeViewModel.kt", "WeatherRepositoryImpl.kt", "WeatherServiceImpl.kt"]
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
The assistant jumps straight to the relevant files instead of exploring.
|
|
76
|
-
|
|
77
|
-
**Where the map comes from:** Mason doesn't parse your code. Your assistant reads the project through Mason's analysis tools and writes the map itself β capturing architectural intent, not just symbols and call edges. Setup adds a short section to your project's assistant instructions so future sessions consult the available knowledge.
|
|
78
|
-
|
|
79
|
-
## What the numbers say
|
|
80
|
-
|
|
81
|
-
Measured with real headless agent sessions in A/B arms (baseline always has a populated CLAUDE.md β beating a context-free agent is not a result). Full harness, pinned commits, and losses included: [bench/harness/](bench/harness/).
|
|
82
|
-
|
|
83
|
-
These measurements concern read-only answers. The new [patch benchmark](bench/harness/patches/README.md) grades actual code changes, companion updates, and constraint preservation. Its offline checks validate the harness; improved patch outcomes and an acceptable false-positive rate have not yet been established.
|
|
84
|
-
|
|
85
|
-
- **Where Mason wins β knowledge that isn't in the code.** On tasks whose correct answer hinges on a recorded engineering decision (seeded fairly: the baseline had the same facts in a discoverable doc), Mason averaged **9.0/10 vs 7.0/10**. The baseline missed the constraint entirely half the time, and needed ~3Γ the turns when it found it; Mason surfaced it in one `get_context` call, every time.
|
|
86
|
-
- **Stale-map safety.** Against a deliberately stale map, the drift flag + changed-file previews led the agent to verify and answer current-code truth β the "confidently wrong from a stale cache" failure did not occur.
|
|
87
|
-
- **Where it's a wash β and we say so.** On questions agents can answer by reading code, quality is parity across hono (186 files), vuejs/core (483), and nestjs/nest (1676): 8.7β8.8 both arms, with Mason slightly *behind* on nest (8.5 vs 8.8). If your only questions are "how does X work", modern agents don't need a map.
|
|
88
|
-
- **Cost of ownership, measured.** Map builds scale linearly at ~$1.20 per 100 files (Sonnet): $3.22 for hono, $5.63 for vue-core, $19.52 for nest. Incremental refreshes after drift are cents.
|
|
89
|
-
|
|
90
|
-
## Decision records
|
|
91
|
-
|
|
92
|
-
Capture a lesson with `save_decision`: what happened, why it matters, and the files or directories it applies to. Add `owner`, `sources`, and `actor` when known. None are required to capture a proposal, and missing attribution stays explicit.
|
|
93
|
-
|
|
94
|
-
| Approval | How assistants should use it |
|
|
95
|
-
|---|---|
|
|
96
|
-
| `proposed` | A suggestion that needs review; the default for new records. |
|
|
97
|
-
| `accepted` | A recorded team constraint, still subject to freshness checks. |
|
|
98
|
-
| `unreviewed` | Legacy knowledge with no recorded acceptance. Check its source before treating it as adopted. |
|
|
99
|
-
|
|
100
|
-
Acceptance is separate from lifecycle: retired and superseded records remain in history but leave active retrieval. `get_context`, `get_snapshot`, hooks, and `mason-review` expose approval and provenance alongside freshness. A hook session also receives changes in approval and withdrawals of records it previously saw.
|
|
101
|
-
|
|
102
|
-
For example, an assistant can call `save_decision` with:
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"dir": "/path/to/project",
|
|
107
|
-
"title": "Delivery retries require an idempotency key",
|
|
108
|
-
"body": "Unkeyed retries duplicated customer orders during incident 42. Retry only when the request carries an idempotency key.",
|
|
109
|
-
"category": "gotcha",
|
|
110
|
-
"files": ["src/delivery.ts"],
|
|
111
|
-
"owner": "Delivery team",
|
|
112
|
-
"sources": [{ "kind": "incident", "reference": "incidents/42" }]
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Then ask your assistant to **review that decision**. `review_decision` with its `id` returns the full record, revision and review history, changes since its evidence baseline, local edits, and bounded source/diff previews. Source references are citations to inspect; Mason does not fetch or validate their contents. Supported source kinds are `pull_request`, `issue`, `incident`, `discussion`, `document`, and `other`.
|
|
117
|
-
|
|
118
|
-
After the user or cited team review authorizes a verdict, call `review_decision` again with `action: "accept"`, the actual `reviewer`, a `note` explaining the reason, and the returned `reviewToken`. Acceptance needs an owner, at least one source, readable Git HEAD, and no uncommitted changes to the anchors. Unrelated local work can remain. If the decision or code revision changed since preparation, prepare and inspect it again.
|
|
119
|
-
|
|
120
|
-
When anchored code changes later, use the same preparation flow and `action: "reaffirm"` to record that the accepted decision still holds, or `action: "retire"` to withdraw it. Retirement preserves history and can be recorded when Git history is unavailable. A reviewer may establish a new acceptance baseline when old history is unreachable; that gap stays recorded in the review event. Anchorless knowledge retains unknown code freshness even after acceptance.
|
|
121
|
-
|
|
122
|
-
Tools preserve earlier content and review events in each `.mason/decisions/<id>.json` file. Reviews record the reviewer, reason, timestamp, revision, and code baseline. Editing content, anchors, owner, or sources creates a new proposed revision. The last accepted revision remains the operative constraint while that draft is reviewed. Context, hooks, map indexes, and diff reviews show the accepted content and a separate `pendingProposal`, each with its own anchors, attribution, and freshness. CI findings continue to associate with the accepted revision's anchors. This is derived from existing version 2 history without rewriting stored records.
|
|
123
|
-
|
|
124
|
-
Preparing a review shows the draft and its `operativeDecision`, with evidence covering both sets of anchors. Accepting the draft replaces the operative revision; retiring the record withdraws the accepted constraint and its draft together. Saving identical content is a no-op: it does not silently reaffirm or refresh the decision. A proposal cannot supersede a record that has an operative accepted revision. When creating a replacement under a different id, review it and explicitly retire the original separately.
|
|
125
|
-
|
|
126
|
-
**Existing records:** Version 1 records remain readable and explicitly unreviewed, without automatic file rewrites or invented attribution. Their first revision or review upgrades them to version 2 with an import event marking the missing earlier history. Old clients that only understand version 1 must be upgraded before consuming new records. Use the tools to revise records; inconsistent content/history is reported as invalid.
|
|
127
|
-
|
|
128
|
-
Mason records assertions of review; it does not authenticate reviewer identity, verify approval in linked systems, or commit files. Review and commit these records through your normal PR process. The history is a review trail, not a tamper-proof approval service.
|
|
129
|
-
|
|
130
|
-
## MCP tools
|
|
131
|
-
|
|
132
|
-
| Tool | Purpose |
|
|
133
|
-
|---|---|
|
|
134
|
-
| `mason_init` | Read-only audit/review findings and quickstart guide; optional `base` for review, `evidence` for local CI manifests, `mode: "map"` for an architecture build. |
|
|
135
|
-
| `mason_repair` | Prepare an audit repair baseline; verify the same original findings after edits. Reports unresolved advisories and unavailable checks. |
|
|
136
|
-
| `mason_automation` | Inspect configured hooks and observed events, or capture/resume and verify retained repair evidence across sessions. |
|
|
137
|
-
| `mason_complete_init` | Records assistant instruction setup; preserves prior settings on repeated calls. |
|
|
138
|
-
| `generate_snapshot_batch` | Map step β returns one batch of files for the assistant to summarize. |
|
|
139
|
-
| `save_partial_snapshot` | Persists the partial map for one batch. |
|
|
140
|
-
| `reduce_snapshot` | Reduce step β returns every partial + instructions to merge into a unified map. |
|
|
141
|
-
| `save_snapshot` | Persist the final unified map. Clears partials. |
|
|
142
|
-
| `mason_set_confluence` | Configure Confluence credentials β two-step: list spaces, then persist. |
|
|
143
|
-
| `export_to_confluence` | Sync the concept map to Confluence as PM-readable wiki pages. |
|
|
144
|
-
| `get_snapshot` | Architecture navigation when a map is available. Loads the concept map β feature β file lookup β in one LLM-free call. |
|
|
145
|
-
| `get_context` | Decisions with approval, provenance, file impact, tests, and trust for a task; adds features/flows when a map exists. No setup required. |
|
|
146
|
-
| `save_decision` | Capture or revise proposals with rationale, anchors, owner, sources, and history. Prior accepted revisions remain operative while drafts are reviewed. |
|
|
147
|
-
| `review_decision` | Prepare draft and operative decision evidence, then record authorized acceptance, reaffirmation, or retirement against that revision. |
|
|
148
|
-
| `mason_check_drift` | Feature-level staleness report β what changed since the snapshot, and whether to refresh incrementally or rebuild. |
|
|
149
|
-
| `verify_snapshot` | Spot-check map correctness β sampled entries + file skeletons for the assistant to judge, least-recently-verified first. |
|
|
150
|
-
| `save_verification` | Record verification verdicts β failures flag entries for re-mapping until fixed. |
|
|
151
|
-
| `get_impact` | **Call before editing a file.** Traces what's affected β co-change history + references + related tests. |
|
|
152
|
-
| `analyze_project` | Git stats β hot files, stale dirs, commit conventions. |
|
|
153
|
-
| `full_analysis` | One-shot orientation for unmapped projects: structure + samples + tests + git. |
|
|
154
|
-
| `get_code_samples` | Smart file previews selected by architectural role. |
|
|
155
|
-
|
|
156
|
-
Tools operate on the data they need; none require the initialization marker. Decision capture and impact need no concept map. Map verification and drift require a map; Confluence export requires credentials and a map.
|
|
157
|
-
|
|
158
|
-
Setup installs a short marker-delimited section in the existing `AGENTS.md`, otherwise `CLAUDE.md` or `.claude/CLAUDE.md`; if none exists, it creates `AGENTS.md`. It routes assistants to decisions and impact, with map navigation when available.
|
|
159
|
-
|
|
160
|
-
### How the concept map is built
|
|
161
|
-
|
|
162
|
-
To stay accurate on codebases of any size, Mason uses a **Map-Reduce** pattern instead of stuffing the whole codebase into one LLM call:
|
|
163
|
-
|
|
164
|
-
- **Map**: `generate_snapshot_batch` returns ~50 files at a time (skeletons of every file in the batch plus a few deeper-read bodies for grounding). Your assistant produces a partial concept map for that batch and persists it with `save_partial_snapshot`. Repeat until every file in the project has been visited.
|
|
165
|
-
- **Reduce**: `reduce_snapshot` returns all the partials plus instructions to merge them into one product-shaped catalog β combining platform variants ("home Android" + "home iOS" β "home screen"), deduplicating, and ensuring no file is dropped.
|
|
166
|
-
- **Save**: `save_snapshot` persists the unified map and cleans up the partials.
|
|
167
|
-
|
|
168
|
-
The goal is complete source coverage. Drift checking reports eligible committed source files omitted from the snapshot, including omissions from a map saved at HEAD. A 200-file project takes ~5 batches; a 1000-file monorepo takes ~20.
|
|
169
|
-
|
|
170
|
-
## Change impact
|
|
171
|
-
|
|
172
|
-
Before editing a file, Mason tells you what else might be affected. Three signals you'd normally need a dozen tool calls to gather, in one call:
|
|
173
|
-
|
|
174
|
-
- **Co-change history** β files that historically change together in commits
|
|
175
|
-
- **References** β files that import or mention the target by name
|
|
176
|
-
- **Related tests** β test files paired by naming convention
|
|
177
|
-
|
|
178
|
-
Ask your assistant *"what would be affected if I changed WeatherRepository?"* and it'll call `get_impact` for you.
|
|
179
|
-
|
|
180
|
-
## Drift detection
|
|
181
|
-
|
|
182
|
-
A concept map that silently goes stale is worse than no map β your assistant confidently jumps to files that no longer do what the map says. `mason_check_drift` compares the map against HEAD (pure git + filesystem, no LLM call) and reports drift at the **feature level**: which features are stale and which files changed under them, new source files not yet mapped, ghost files the map still references, and renames. It ends with a recommendation β `up-to-date`, `incremental` (re-map just the stale entries), or `full-rebuild` (re-run the Map-Reduce playbook).
|
|
183
|
-
|
|
184
|
-
Ask your assistant *"is the concept map still fresh?"* β and if it isn't, the same report tells it exactly which entries to regenerate. `get_snapshot` includes the same drift report whenever it detects a stale map, so the assistant can inspect and refresh affected entries.
|
|
185
|
-
|
|
186
|
-
Incremental refreshes are safe against partial updates: every entry a refresh touches is stamped with the commit it was verified against, so entries skipped in one refresh keep reporting as stale instead of silently riding along on the map's new hash. Features that disappear from the codebase can be deleted from the map with `save_snapshot`'s `removeFeatures`/`removeFlows` β renames stop leaving zombie entries behind.
|
|
187
|
-
|
|
188
|
-
When a lot of files drifted at once, the assistant runs a **scoped refresh** instead of a full rebuild: `generate_snapshot_batch` accepts a `files` list, so the Map-Reduce loop walks only the drifted files and the reduce step merges the result into the existing map. 60 drifted files in a 1000-file monorepo means ~2 batches, not 20.
|
|
189
|
-
|
|
190
|
-
### Reading trust signals
|
|
191
|
-
|
|
192
|
-
`get_context` reports `map.status` as `available`, `missing`, or `invalid`. The legacy `exists` field indicates usable map availability only: `exists: false` can still include decisions, impact, and tests. Without a usable map, map freshness is `null`, and an invalid map produces diagnostics while valid decisions remain retrievable. An empty decision match is not a clean audit. Impact covers up to three unique targets, expanding directory anchors to eligible source files; use `get_impact` for a larger explicit file list.
|
|
193
|
-
|
|
194
|
-
Freshness and correctness are separate. `get_context` returns a `trust` object for each matched entry; `get_snapshot` includes a trust index for features, flows, and decisions.
|
|
195
|
-
|
|
196
|
-
| Field | Meaning |
|
|
197
|
-
|---|---|
|
|
198
|
-
| `freshness: current` | No changes detected in the inspected anchors. This does not prove the description is correct. |
|
|
199
|
-
| `freshness: changed` | Anchored files changed, including edits in the working tree. Inspect the current code. |
|
|
200
|
-
| `freshness: unknown` | Evidence is unavailable, such as missing history or an anchorless decision. Verify before relying on it. |
|
|
201
|
-
| `verification: unverified` | No correctness verdict has been recorded. |
|
|
202
|
-
| `verification: passed` | An assistant recorded a passing verdict; check its freshness and verification point before reuse. |
|
|
203
|
-
| `verification: failed` | A known incorrect entry. The failure and its reason remain visible until corrected. |
|
|
204
|
-
|
|
205
|
-
Git commit distance is informational: unrelated commits and committing the refreshed map do not make the map stale. `mason-drift` exit codes still describe **committed map drift**; working-tree changes, decision warnings, and verification results are reported separately. A clean drift exit is not a correctness approval.
|
|
206
|
-
|
|
207
|
-
Snapshot, decision, and partial stores are validated on load and replaced atomically on save. Invalid snapshots produce errors. Invalid decision records appear in diagnostics while valid records remain available; repair the invalid records before writing more decisions.
|
|
208
|
-
|
|
209
|
-
### Drift checks in CI
|
|
210
|
-
|
|
211
|
-
Because the check is deterministic, it also ships as a tiny standalone binary β read-only and LLM-free:
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
npx -p mason-context mason-drift --dir . # exit 0 fresh Β· 1 stale Β· 2 error
|
|
215
|
-
npx -p mason-context mason-drift --json # full report as JSON
|
|
216
|
-
npx -p mason-context mason-drift --refresh-prompt # stale? print refresh instructions for any agent
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Run it on merges to main to catch a rotting map before your assistant does. Note: the diff is computed against the snapshot's base commit, so shallow CI checkouts need enough `fetch-depth` to reach it β when they don't, `mason-drift` reports stale with `full-rebuild` rather than guessing.
|
|
220
|
-
|
|
221
|
-
### The map maintains itself
|
|
222
|
-
|
|
223
|
-
Detection is free and deterministic; the fix needs an LLM β but not any particular one. `mason-drift --refresh-prompt` emits provider-neutral instructions that any coding agent with the Mason MCP server connected can execute. Pipe it to whichever headless CLI your team runs:
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
# Claude Code
|
|
227
|
-
claude -p "$(mason-drift --refresh-prompt)" --dangerously-skip-permissions \
|
|
228
|
-
--mcp-config '{"mcpServers":{"mason":{"command":"npx","args":["-y","-p","mason-context","mason-mcp"]}}}'
|
|
229
|
-
|
|
230
|
-
# OpenAI Codex CLI (mason configured in ~/.codex/config.toml)
|
|
231
|
-
codex exec --full-auto "$(mason-drift --refresh-prompt)"
|
|
232
|
-
|
|
233
|
-
# Gemini CLI (mason configured in .gemini/settings.json)
|
|
234
|
-
gemini --yolo -p "$(mason-drift --refresh-prompt)"
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
To close the loop in CI, this repo ships a reusable GitHub Actions workflow β detect on every push, refresh with your agent of choice, verify that only the snapshot changed, commit it, check freshness again, and push the updated map:
|
|
15
|
+
## Get started
|
|
238
16
|
|
|
239
|
-
|
|
240
|
-
jobs:
|
|
241
|
-
mason:
|
|
242
|
-
uses: adrianczuczka/mason/.github/workflows/mason-refresh.yml@main
|
|
243
|
-
with:
|
|
244
|
-
agent-command: >-
|
|
245
|
-
claude -p "$MASON_REFRESH_PROMPT" --dangerously-skip-permissions
|
|
246
|
-
--strict-mcp-config --mcp-config
|
|
247
|
-
'{"mcpServers":{"mason":{"command":"npx","args":["-y","-p","mason-context","mason-mcp"]}}}'
|
|
248
|
-
secrets: inherit
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Omit `agent-command` for detect-only mode: free, no credentials, fails the check when the map goes stale.
|
|
252
|
-
|
|
253
|
-
## Context-file audit
|
|
254
|
-
|
|
255
|
-
Your repo's AI context files β `CLAUDE.md`, `AGENTS.md` β are read by every agent on every task, and nobody owns them. Each merge makes them a little more wrong, and agents act on what they read: a stale claim becomes a misinformed edit. `mason-audit` keeps those files true. It finds claims that are provably out of date β deterministically, no LLM, no network β and works on any repo with a context file. No Mason setup required.
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
npx -p mason-context mason-audit --dir . # exit 0 clean Β· 1 issues Β· 2 error
|
|
259
|
-
npx -p mason-context mason-audit --json # full report as JSON (additive-only schema)
|
|
260
|
-
npx -p mason-context mason-audit --fix-prompt # issues? print a work order for any agent
|
|
261
|
-
npx -p mason-context mason-audit --checks deleted-reference,stale-count,dead-command
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
What it checks:
|
|
265
|
-
|
|
266
|
-
| Check | Flags | Confidence |
|
|
267
|
-
|---|---|---|
|
|
268
|
-
| `deleted-reference` | a referenced path that no longer exists β including paths inside ASCII directory trees; renames resolve to the new path | certain (git history proves it) / likely (never tracked) |
|
|
269
|
-
| `new-module` | a directory with source files that no context file mentions | likely |
|
|
270
|
-
| `stale-count` | "6 packages" vs what the workspace manifest actually resolves to | certain |
|
|
271
|
-
| `dead-command` | `npm run <script>` naming a script no package.json has | certain |
|
|
272
|
-
| `deps-changed` | dependency manifests committed after the doc's last commit | advisory |
|
|
273
|
-
| `decision-anchor-drift` | a decision record whose anchor files changed (only when `.mason/decisions/` exists) | advisory |
|
|
274
|
-
|
|
275
|
-
Issues drive the exit code; **advisories never do** β they're facts an agent can't close by editing the doc, so they're reported for humans instead. Every issue carries a `doc:line` anchor and git-derived evidence (the deleting commit, the rename target, the actual count and its source). A claim you want left alone β say, a deliberate reference to a removed directory β gets an ignore marker: `<!-- mason:ignore -->` on the line, or `<!-- mason:ignore-start -->` / `<!-- mason:ignore-end -->` around a block.
|
|
276
|
-
|
|
277
|
-
### The context files maintain themselves
|
|
278
|
-
|
|
279
|
-
### Track a repair through verification
|
|
280
|
-
|
|
281
|
-
Ask your assistant: *"Use Mason to prepare a repair, fix the documented issues within scope, and verify against the original findings."* The assistant calls `mason_repair` with `action: "prepare"`, makes grounded edits, and then calls it with `action: "verify"` and the returned `baselinePath`. Setup alone only installs assistant instructions; repairing existing claims needs to be part of your request.
|
|
282
|
-
|
|
283
|
-
The CLI provides the same workflow:
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
mason-audit --dir . --prepare-repair --fix-prompt
|
|
287
|
-
# After applying the work order, use the exact baseline path it returned:
|
|
288
|
-
mason-audit --dir . --verify-repair .mason/reports/repairs/<id>.json
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
Preparation saves the full original audit under `.mason/reports/repairs/`; it does not edit documentation. Ordinary audits and verification remain read-only. Add `.mason/reports/` to your ignore rules if you want these local artifacts excluded from commits. Keep the same baseline through any final documentation commit, then verify again. Do not regenerate it to clear unresolved findings. `--json` is supported for preparation and verification; use `--checks` only during preparation to select a scope.
|
|
292
|
-
|
|
293
|
-
Each original finding is **resolved** (its check no longer reports it), **unresolved**, **review-required**, or **unverified**. New findings are separate. A shifted line number does not erase the original claim, and a missing document, unavailable history, or skipped check cannot count as a fix. Inspect the edit for meaning: these deterministic checks do not establish complete documentation correctness. README files and arbitrary build commands are outside this audit's current scope.
|
|
294
|
-
|
|
295
|
-
Dependency evidence suppressed by local edits is retained in `suppressedAdvisories`, including when setup has already dirtied the document. Committing that document does not prove the dependency change was reviewed: the original advisory stays in the repair report. Record your assessment separately; this workflow does not approve advisories or decisions. Baselines are validated local evidence with a checksum to detect accidental edits, not authenticated attestations.
|
|
296
|
-
|
|
297
|
-
Ordinary audit exit codes remain **0** for no issues (advisories may exist), **1** for issues, and **2** for errors. Explicit `--verify-repair` uses **0** for verified scope, **1** for remaining/new issues, and **2** for incomplete verification, including advisories needing review or skipped checks. Incomplete verification takes precedence when both issues and unavailable evidence remain.
|
|
17
|
+
Install on macOS or Linux:
|
|
298
18
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
`--fix-prompt` emits a work order scoped to the flagged claims and the user's authorization. The reusable workflow below prepares a baseline, checks that the agent touched only context files, and verifies the original issues both before and after the documentation commit. It opens a PR only when those issues are resolved by their checks and no new issues appear. Advisories and skipped checks remain visible in the PR; their review is not a condition for proposing documentation repairs. The workflow never commits to the audited branch and skips when an audit PR is already open:
|
|
302
|
-
|
|
303
|
-
```yaml
|
|
304
|
-
name: Context audit
|
|
305
|
-
on:
|
|
306
|
-
schedule: [{ cron: "0 6 * * 1" }]
|
|
307
|
-
workflow_dispatch:
|
|
308
|
-
permissions: { contents: write, pull-requests: write }
|
|
309
|
-
jobs:
|
|
310
|
-
audit:
|
|
311
|
-
uses: adrianczuczka/mason/.github/workflows/mason-audit.yml@main
|
|
312
|
-
with:
|
|
313
|
-
agent-command: >-
|
|
314
|
-
claude -p "$MASON_AUDIT_PROMPT" --allowedTools "Read,Grep,Glob,Edit"
|
|
315
|
-
secrets: inherit
|
|
19
|
+
```sh
|
|
20
|
+
curl -fsSL https://github.com/adrianczuczka/mason/releases/latest/download/install.sh | sh
|
|
316
21
|
```
|
|
317
22
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
## Automatic documentation checks (mason-auto)
|
|
23
|
+
Windows PowerShell:
|
|
321
24
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
Available from 0.12.0. Install or upgrade the package in each project where you want automatic checks:
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
npm install -D mason-context@0.12.0
|
|
328
|
-
npx mason-auto install --host claude # Claude Code
|
|
329
|
-
npx mason-auto install --host codex # Codex; review/trust the hooks using /hooks
|
|
330
|
-
npx mason-auto status
|
|
25
|
+
```powershell
|
|
26
|
+
irm https://github.com/adrianczuczka/mason/releases/latest/download/install.ps1 | iex
|
|
331
27
|
```
|
|
332
28
|
|
|
333
|
-
|
|
29
|
+
No Node or npm required. Git is required. Follow the installer's PATH instructions. [Platform details](docs/distribution.md) Β· [npm installation](docs/setup.md#unified-project-setup)
|
|
334
30
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
`status` distinguishes configuration from observed events. Host versions, project trust, policy, and specialized tool paths can prevent hooks from running. Configuration alone is not evidence of automatic use. Codex requires review/trust of new or changed non-managed hooks. See the [Claude Code hook reference](https://code.claude.com/docs/en/hooks) and [Codex hook reference](https://learn.chatgpt.com/docs/hooks).
|
|
338
|
-
|
|
339
|
-
On session start, Mason recovers the current branch/worktree's evidence. Before and after tools, it checks for changed audit inputs and retains newly observed findings before another documentation edit can hide them. Shell and unknown tool calls are included because edits can happen outside a file-edit tool. At turn completion it verifies the retained findings. A relevant unresolved issue can request **one continuation per session**; advisories and unavailable checks never create a repair loop. Fixes remain the assistant's responsibility within the user's task scope.
|
|
340
|
-
|
|
341
|
-
Checks reuse cached results only when their dependencies match. Documentation and history, file inventory, manifests, and decision evidence have separate invalidation keys. Changes to a dirty manifest invalidate its checks even when Git's status text is unchanged. Skipped checks are retried. Cache corruption causes recomputation; invalid original baselines or active state remain errors. Concurrent events serialize writes, and interrupted local writers' locks are recovered only when their process is gone. New reports are written atomically. Unchanged tool events reuse the existing full report.
|
|
31
|
+
Run this in your Git repository:
|
|
342
32
|
|
|
343
33
|
```bash
|
|
344
|
-
|
|
345
|
-
#
|
|
346
|
-
npx mason-auto check
|
|
34
|
+
mason setup --host codex
|
|
35
|
+
# For Claude Code, use --host claude.
|
|
347
36
|
```
|
|
348
37
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
Evidence is local to the worktree and branch. Switching assistants in that worktree resumes the same repair; another worktree or branch has separate state. Detached-HEAD commits retain evidence; moving that checkout to a different history requires inspection. Hooks follow the Git worktree of the event's working directory. Reports are not automatically transferred to CI. CI can call `mason-auto check` on retained local artifacts, or `mason-audit --verify-repair <baseline>` after restoring the original artifacts at their recorded root. A fresh checkout cannot reconstruct missing pre-edit evidence. Audited instruction files remain limited to `AGENTS.md`, `CLAUDE.md`, and `.claude/CLAUDE.md`. Automation bounds inventory at 100,000 paths and retained baselines at 128; exceeding a bound reports unavailable evidence without evicting unresolved findings. Symbolic links in the inspected inventory require an explicit audit instead of cached automation. This is not proof of arbitrary repository scale or universal tool interception.
|
|
352
|
-
|
|
353
|
-
The [automation evaluation](bench/harness/automation/README.md) compares ordinary module-renaming requests and unrelated edits across hosts, with baseline, instructions, and hooks arms. Deterministic replay verifies the mechanism; live sessions measure actual activation.
|
|
38
|
+
Setup connects MCP, hooks, and project instructions. Review your host's trust settings, start a new session, and give your agent a normal task.
|
|
354
39
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
Recorded knowledge only helps if it shows up. Retrieval tools depend on the model deciding to call them β and it often doesn't. `mason-hook` removes the gamble: it's a Claude Code `PostToolUse` hook that fires when a session reads or edits a file, looks up the decision records anchored to that file (exact path or directory prefix), and injects them into the model's context. Deterministic lookup, no LLM call, ~100ms, silent when nothing matches. Each decision is injected at most once per session, and records whose anchors drifted since verification carry a verify-before-relying marker.
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
npx -p mason-context mason-hook --print-config # the settings block to add
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
Add the printed block to `.claude/settings.json` β the *committed* project settings, so every teammate's sessions get the same rail. The loop this closes: someone captures a proposal with `save_decision` and records acceptance with `review_decision` ("this screen has a v1 and v2 β new work goes in v2 behind flag X"), and from then on any session that touches those files gets told, whether or not it thought to ask.
|
|
364
|
-
|
|
365
|
-
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`.
|
|
366
|
-
|
|
367
|
-
## Diff review (mason-review)
|
|
368
|
-
|
|
369
|
-
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:
|
|
40
|
+
Check that Mason is being used:
|
|
370
41
|
|
|
371
42
|
```bash
|
|
372
|
-
|
|
43
|
+
mason status
|
|
373
44
|
```
|
|
374
45
|
|
|
375
|
-
|
|
376
|
-
- **Touched decisions** β decision records whose file or directory anchors the diff touches, including deleted paths and both sides of renames, listed with approval, owner, sources, last review, and freshness. Proposals and legacy records are distinguished from accepted constraints. Informational; never affect the exit code.
|
|
377
|
-
|
|
378
|
-
Deterministic, no LLM, one pass over git history. 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).
|
|
379
|
-
|
|
380
|
-
### Combine CI evidence with project knowledge
|
|
46
|
+
Status distinguishes installed configuration from observed use. [Setup and upgrades](docs/setup.md#unified-project-setup) Β· [Other MCP clients](docs/setup.md#other-clients)
|
|
381
47
|
|
|
382
|
-
|
|
48
|
+
### Try a check without setup
|
|
383
49
|
|
|
384
50
|
```bash
|
|
385
|
-
|
|
386
|
-
|
|
51
|
+
mason audit --dir .
|
|
52
|
+
mason review --dir . --base origin/main
|
|
387
53
|
```
|
|
388
54
|
|
|
389
|
-
The
|
|
55
|
+
The audit checks claims in `AGENTS.md` and `CLAUDE.md`. The review checks committed changes against your chosen base. Both are read-only and need no model calls.
|
|
390
56
|
|
|
391
|
-
|
|
57
|
+
## What Mason catches
|
|
392
58
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
{
|
|
400
|
-
"id": "unit-tests",
|
|
401
|
-
"kind": "tests",
|
|
402
|
-
"tool": "vitest",
|
|
403
|
-
"command": "npm test -- --reporter=json --outputFile=.mason/reports/vitest.json",
|
|
404
|
-
"commit": "0123456789abcdef0123456789abcdef01234567",
|
|
405
|
-
"workingTreeClean": true,
|
|
406
|
-
"sourceRoot": "/runner/work/project",
|
|
407
|
-
"source": "https://ci.example.com/runs/42",
|
|
408
|
-
"exitCode": 0,
|
|
409
|
-
"report": { "format": "vitest-json", "path": ".mason/reports/vitest.json" }
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"id": "security",
|
|
413
|
-
"kind": "security",
|
|
414
|
-
"tool": "your-security-scanner",
|
|
415
|
-
"command": "your scanner command",
|
|
416
|
-
"status": "skipped",
|
|
417
|
-
"reason": "Security scanning is not configured in this job."
|
|
418
|
-
}
|
|
419
|
-
]
|
|
420
|
-
}
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
For a completed analysis check, use `report.format: "sarif"`, its report path, and the same run provenance fields. Give every expected check a unique `id`; use `status: "skipped"` or `"unavailable"` with a reason when it did not run. Omitted checks cannot be detected. `status` defaults to `"completed"`. A successful SARIF invocation can supply completion evidence when an exit code is absent; Vitest imports require a recorded exit code for complete evidence.
|
|
424
|
-
|
|
425
|
-
Manifest and report paths are relative to the repository root, even when the manifest lives in a subdirectory. Absolute paths inside that root also work. `sourceRoot` maps file locations from the CI checkout to this checkout; it defaults to the local repository root. `source` is an optional CI run link or description. Artifacts must be regular files inside the repository, without symlinks, and at most 10 MiB each. Commands and links are displayed as imported provenance, never executed or fetched, and are not authenticated attestations.
|
|
426
|
-
|
|
427
|
-
Outcome and freshness are separate. A full tested commit matching the reviewed HEAD and `workingTreeClean: true` establish **current** commit evidence; a different commit is **stale**, while missing commit or dirty/unrecorded checkout state is **unknown**. Record cleanliness before and after the run, and invalidate attribution if HEAD changes during execution. A passing report for another commit cannot establish a pass for this one. Local uncommitted edits remain outside the review's committed scope.
|
|
428
|
-
|
|
429
|
-
Empty or entirely skipped test runs do not pass; partially skipped runs are incomplete. Malformed or missing artifacts stay unavailable. SARIF active `fail` results count as failures at every severity; explicitly accepted suppressions and results marked absent are retained separately. Failed analysis invocations and omitted results stay unavailable. Open/review results, unresolved locations, and unresolved suppression states preserve uncertainty. The JSON report retains overall counts even when findings are abbreviated (10 manifests, 50 checks, 200 findings per check, 5 related decisions per finding); MCP and text summaries have smaller previews and flag truncation.
|
|
430
|
-
|
|
431
|
-
Imports are advisory under the existing exit-code contract. Opt into a gate with:
|
|
432
|
-
|
|
433
|
-
```bash
|
|
434
|
-
npx -p mason-context mason-review --base origin/main \
|
|
435
|
-
--evidence .mason/reports/evidence.json --require-evidence --json
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
| Exit | With `--require-evidence` |
|
|
439
|
-
| --- | --- |
|
|
440
|
-
| 0 | All declared checks are current, complete, and passing; no missing co-change partners. |
|
|
441
|
-
| 1 | A current check failed, or co-change partners are missing. |
|
|
442
|
-
| 2 | Evidence is missing, skipped, stale, unknown, or incomplete, or the review cannot run. Current failures take precedence over incomplete evidence. |
|
|
443
|
-
|
|
444
|
-
Through MCP, pass `evidence: [".mason/reports/evidence.json"]` to `mason_init`. No map or initialization is required. A passing import only describes the supplied checks, not complete coverage or overall correctness.
|
|
445
|
-
|
|
446
|
-
Mason's own checkout produces real test artifacts with `npm run test:evidence`, using [scripts/test-evidence.mjs](scripts/test-evidence.mjs). It records the observed exit code and checkout state and invalidates previous evidence before starting a fresh run. After `npm run build`, inspect them with `node dist/mason-review.js --base HEAD --evidence .mason/reports/evidence.json`. A local run with uncommitted edits correctly has unknown commit attribution. The repository CI uses this producer and posts the combined review to its job summary. Add `.mason/reports/` to your ignore file when using that output directory; keep the decisions and map tracked.
|
|
447
|
-
|
|
448
|
-
## Confluence sync
|
|
449
|
-
|
|
450
|
-
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.
|
|
451
|
-
|
|
452
|
-
Configure this separately by asking your assistant *"set up Confluence for this project."* The assistant walks you through the Atlassian site URL, your account email, and an API token from id.atlassian.com, then lets you pick which space to use. To sync, ask *"sync the wiki to Confluence."*
|
|
453
|
-
|
|
454
|
-
> β οΈ **Token in chat history.** The API token is pasted into your assistant chat, not a terminal. It will appear in your chat history. If that's not acceptable, skip Confluence sync.
|
|
455
|
-
|
|
456
|
-
## Other clients
|
|
457
|
-
|
|
458
|
-
Mason's MCP server is client-agnostic. Pick yours:
|
|
459
|
-
|
|
460
|
-
<details>
|
|
461
|
-
<summary><strong>Cursor</strong></summary>
|
|
462
|
-
|
|
463
|
-
Add to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in your project):
|
|
464
|
-
|
|
465
|
-
```json
|
|
466
|
-
{
|
|
467
|
-
"mcpServers": {
|
|
468
|
-
"mason": {
|
|
469
|
-
"command": "npx",
|
|
470
|
-
"args": ["-p", "mason-context", "mason-mcp"]
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
```
|
|
475
|
-
</details>
|
|
476
|
-
|
|
477
|
-
<details>
|
|
478
|
-
<summary><strong>Windsurf</strong></summary>
|
|
479
|
-
|
|
480
|
-
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
481
|
-
|
|
482
|
-
```json
|
|
483
|
-
{
|
|
484
|
-
"mcpServers": {
|
|
485
|
-
"mason": {
|
|
486
|
-
"command": "npx",
|
|
487
|
-
"args": ["-p", "mason-context", "mason-mcp"]
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
```
|
|
492
|
-
</details>
|
|
493
|
-
|
|
494
|
-
<details>
|
|
495
|
-
<summary><strong>OpenAI Codex CLI</strong></summary>
|
|
496
|
-
|
|
497
|
-
Add to `~/.codex/config.toml`:
|
|
498
|
-
|
|
499
|
-
```toml
|
|
500
|
-
[mcp_servers.mason]
|
|
501
|
-
command = "npx"
|
|
502
|
-
args = ["-p", "mason-context", "mason-mcp"]
|
|
503
|
-
```
|
|
504
|
-
</details>
|
|
505
|
-
|
|
506
|
-
<details>
|
|
507
|
-
<summary><strong>VS Code</strong></summary>
|
|
508
|
-
|
|
509
|
-
Add to your VS Code settings (`settings.json`):
|
|
510
|
-
|
|
511
|
-
```json
|
|
512
|
-
{
|
|
513
|
-
"mcp": {
|
|
514
|
-
"servers": {
|
|
515
|
-
"mason": {
|
|
516
|
-
"command": "npx",
|
|
517
|
-
"args": ["-p", "mason-context", "mason-mcp"]
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
```
|
|
523
|
-
</details>
|
|
524
|
-
|
|
525
|
-
## Language support
|
|
526
|
-
|
|
527
|
-
Language-agnostic. Mason works from file naming patterns and git history rather than language-specific parsing, so it runs on any project with a git repo β TypeScript, Kotlin, Python, Go, Rust, Swift, Java, C#, Dart, and more.
|
|
528
|
-
|
|
529
|
-
## Security
|
|
530
|
-
|
|
531
|
-
- **The snapshot stores:** assistant-authored feature names, relative file paths, descriptions, and verification metadata. Review that prose before committing it; do not record secrets.
|
|
532
|
-
- **Shared file policy:** mapping, sampling, verification, impact analysis, and test discovery respect Git ignores and `.mason/config.json` exclusions. Sensitive filenames are denied, and source reads are limited to 1 MiB.
|
|
533
|
-
- **Path protection:** source reads check canonical paths and reject symlinks escaping the project root. Metadata paths reject symlinks, including parent directories.
|
|
534
|
-
- **Mapping is local:** source previews go to the connected assistant through MCP. Mason itself makes no model API calls for mapping. Optional Confluence sync uses network access and can call a configured model provider.
|
|
59
|
+
| As your project grows⦠| Mason helps by⦠|
|
|
60
|
+
|---|---|
|
|
61
|
+
| Instructions fall behind the code. | Flagging missing paths, incorrect workspace counts, and missing npm scripts. |
|
|
62
|
+
| A patch misses a related update. | Surfacing references, related tests, and files that historically change together. |
|
|
63
|
+
| Old decisions lose their context. | Retrieving recorded rationale and review status, and flagging changes to the code they apply to. |
|
|
64
|
+
| A repair gets interrupted. | Retaining the original findings and verifying them through the final documentation commit. |
|
|
535
65
|
|
|
536
|
-
|
|
66
|
+
After resolving an incident or settling a constraint, ask your agent to record the reason with Mason. Later tasks can retrieve it. Proposals and accepted decisions stay distinct.
|
|
537
67
|
|
|
538
|
-
|
|
68
|
+
Mason complements tests, linters, and code review. Findings are evidence to inspect; unavailable checks stay explicit.
|
|
539
69
|
|
|
540
|
-
|
|
541
|
-
|---|---|
|
|
542
|
-
| `mason set-llm <provider>` | Not needed β your assistant *is* the LLM. |
|
|
543
|
-
| `mason snapshot` | Ask your assistant: *"build a Mason concept map"* β `mason_init` with `mode: "map"` β the Map-Reduce workflow. |
|
|
544
|
-
| `mason generate` (CLAUDE.md) | Removed. Use your assistant directly. |
|
|
545
|
-
| `mason analyze` | Ask your assistant: *"give me git stats for this repo"* β it calls `analyze_project`. |
|
|
546
|
-
| `mason impact File.kt` | Ask your assistant: *"what would changing File.kt affect?"* β it calls `get_impact`. |
|
|
547
|
-
| `mason snapshot --install-hook` | Removed. The map auto-refreshes when the assistant detects stale state. |
|
|
70
|
+
## Evidence so far
|
|
548
71
|
|
|
549
|
-
|
|
72
|
+
Earlier read-only decision-retrieval evaluations scored **9.0/10 with Mason vs 7.0/10 without**. The initial ten-task patch comparison tied at **10/10 for both**. Improved patch outcomes remain to be demonstrated. [Results, methodology, and limitations](docs/benchmarks.md)
|
|
550
73
|
|
|
551
|
-
##
|
|
74
|
+
## Documentation
|
|
552
75
|
|
|
553
|
-
|
|
76
|
+
- [Setup, hooks, and upgrades](docs/setup.md)
|
|
77
|
+
- [Audits, repair verification, and CI evidence](docs/checks.md)
|
|
78
|
+
- [Decisions, tools, and optional architecture maps](docs/reference.md)
|
|
79
|
+
- [Roadmap](ROADMAP.md) Β· [Changelog](CHANGELOG.md) Β· [MIT license](LICENSE)
|