Tool-operator-only (like
UPGRADE.md— never installed into a target). This file is the declarative target state thatENABLE.mdconverges a repo to (v4.35.0): every artifact the tool installs, as one row — target path, canonical source in this checkout, and the policy that governs it. The runnable reconcile helper (scripts/reconcile.py/scripts/reconcile.mjs) parses this file, diffs a target against it, and applies the mechanical policies; an agent without script execution can walk the tables by hand — each row is a complete instruction. Judgment work (analysis, seeding, migration, conflict arbitration) stays inENABLE.md; version-gated data migrations live in Semantic steps below.Machine-format contract: the reconcile scripts parse the three sections below by their headings and table/list shapes. Keep the column order, keep cells free of
|and backticks, and keep version cells as bare semver. Update this file in the same commit as any change totemplates/,agent-skills/built-ins,.githooks/, the root protocol docs, or a rung that adds a non-mechanical step — then runpython3 scripts/reconcile.py --check-manifest(release checklist,UPGRADE.md).
- verbatim — the target file is a tool-owned, byte-identical copy of its source.
Missing → copy; differs → re-copy on apply (drift is listed first in the dry-run —
the warn-before-clobber arbitration in
ENABLE.md§5i applies to a customized copy). - verbatim-dir — like verbatim, applied to every file under the source directory (the tool-managed built-in skills). Extra target-side files are reported, never deleted.
- seed-copy — installed verbatim only if absent; an existing copy is never touched (it may carry user content — waivers, a team's own PR template, their CI root).
- sentinel-merge — managed blocks inside a user-owned file: add-only, de-duplicated
against the whole file, never remove or reorder existing entries (
ENABLE.mdStep 7/7b). - seed-generate — generated by the agent at enable (placeholders + judgment);
never touched when present. The reconcile report points each at its
ENABLE.mdstep. - stamp —
.agent/version.md: written by the agent as the closing step, after any semantic steps (never by the script — an early stamp would mask an unfinished upgrade).
Forge column: all, github, gitlab, or azdo (per ENABLE.md Step 4 detection).
Unknown forge → the github + gitlab rows apply; azdo installs only on positive
detection (its pipeline needs one-time activation — blind installs would just add noise).
Attrs: exec = must be executable (mode 755); step:N = the ENABLE.md step that
generates it; wire = when the file pre-exists, the agent wires it per ENABLE.md Step 6
(add-only include + stage check — never scripted); renorm = a merge here is followed by
git add --renormalize . (agent-run; check the staged diff stays within agent-memory
files on a CRLF repo); fork-ok = a byte-drifted copy is still converged when it matches
the sanctioned contributor/consumer fork structure (v4.38.0 — see the AGENTS.md row note);
- = none.
| Target | Source | Policy | Forge | Attrs |
|---|---|---|---|---|
| DECAY.md | DECAY.md | verbatim | all | - |
| REVIEW.md | REVIEW.md | verbatim | all | - |
| SKILLS.md | SKILLS.md | verbatim | all | - |
| MERGE.md | MERGE.md | verbatim | all | - |
| memory/PROTOCOL.md | templates/memory/PROTOCOL.md | seed-copy | all | - |
| AGENTS.md | templates/AGENTS.md | verbatim | all | fork-ok |
| .agent/schema.md | templates/.agent/schema.md | verbatim | all | - |
| .cursorrules | templates/.cursorrules | verbatim | all | - |
| .windsurfrules | templates/.windsurfrules | verbatim | all | - |
| .github/copilot-instructions.md | templates/.github/copilot-instructions.md | verbatim | all | - |
| .githooks/pre-commit | .githooks/pre-commit | verbatim | all | exec |
| .githooks/pre-commit.d/50-agent-memory-secret-guard | .githooks/pre-commit.d/50-agent-memory-secret-guard | verbatim | all | exec |
| .githooks/post-commit | .githooks/post-commit | verbatim | all | exec |
| .githooks/post-commit.d/50-agent-memory-ritual-capture | .githooks/post-commit.d/50-agent-memory-ritual-capture | verbatim | all | exec |
| .githooks/init.sh | .githooks/init.sh | verbatim | all | exec |
| .githooks/README.md | .githooks/README.md | verbatim | all | - |
| agent-skills/memory-lint/ | agent-skills/memory-lint/ | verbatim-dir | all | - |
| agent-skills/second-opinion/ | agent-skills/second-opinion/ | verbatim-dir | all | - |
| agent-skills/apply-critique/ | agent-skills/apply-critique/ | verbatim-dir | all | - |
| agent-skills/sync-adapters/ | agent-skills/sync-adapters/ | verbatim-dir | all | - |
| agent-skills/harvest-knowledge/ | agent-skills/harvest-knowledge/ | verbatim-dir | all | - |
| agent-skills/archive-fact/ | agent-skills/archive-fact/ | verbatim-dir | all | - |
| agent-skills/refresh-metadata/ | agent-skills/refresh-metadata/ | verbatim-dir | all | - |
| .github/workflows/agent-memory.yml | .github/workflows/agent-memory.yml | verbatim | github | - |
| .gitlab/agent-memory-ci.yml | templates/.gitlab/agent-memory-ci.yml | verbatim | gitlab | - |
| .azuredevops/agent-memory-ci.yml | templates/.azuredevops/agent-memory-ci.yml | verbatim | azdo | - |
| .agent/secret-scan-ignore | templates/.agent/secret-scan-ignore | seed-copy | all | - |
| memory/archive/INDEX.md | templates/memory/archive/INDEX.md | seed-copy | all | - |
| .github/pull_request_template.md | templates/.github/pull_request_template.md | seed-copy | github | - |
| .gitlab/merge_request_templates/Default.md | templates/.gitlab/merge_request_templates/Default.md | seed-copy | gitlab | - |
| .azuredevops/pull_request_template.md | templates/.azuredevops/pull_request_template.md | seed-copy | azdo | - |
| .gitlab-ci.yml | templates/.gitlab-ci.yml | seed-copy | gitlab | wire |
| .gitignore | templates/.gitignore | sentinel-merge | all | - |
| .gitattributes | templates/.gitattributes | sentinel-merge | all | renorm |
| CLAUDE.md | templates/CLAUDE.md | seed-generate | all | step:6 |
| GEMINI.md | templates/GEMINI.md | seed-generate | all | step:6 |
| memory/instructions.md | templates/memory/instructions.md | seed-generate | all | step:5a |
| memory/continuity.md | templates/memory/continuity.md | seed-generate | all | step:5b |
| memory/sessions/ | templates/memory/sessions/.gitkeep | seed-generate | all | step:5c |
| memory/open-threads/ | templates/memory/open-threads/.gitkeep | seed-generate | all | step:5b |
| memory/decay-policy.md | templates/memory/decay-policy.md | seed-generate | all | step:5e |
| memory/smoke-test.md | templates/memory/smoke-test.md | seed-generate | all | step:5f |
| memory/vision.md | templates/memory/vision.md | seed-generate | all | step:5g |
| .agent/version.md | templates/.agent/version.md | stamp | all | - |
Row notes (the table stays machine-lean; nuance lives here):
- AGENTS.md + memory/PROTOCOL.md — the root shim always comes from
templates/AGENTS.md, never the tool root. The target-only protocol is seeded fromtemplates/memory/PROTOCOL.md; because it may hold repository-specific instructions, reconcile never overwrites an existing copy. Fresh enable completes the protocol before installing the shim; the v4.37.0 pre-apply semantic step safely relocates older roots.seed-copyhere is a chosen cost, and it has a named propagation mechanism. The policy is deliberate: the v4.37.0 rung merges the old root's local directives into this file, so a mechanical re-copy could silently drop team-authored steering — the one file where that loss is unrecoverable, since the old root is gone by then. The cost is that protocol-text edits do not reach installed targets on their own. So every release that editstemplates/memory/PROTOCOL.mdmust add a Semantic steps row for it — re-copy when the target's protocol is still byte-identical to the previous release's template, arbitrate perENABLE.md§5i when it carries local content. This is a standing release obligation, not a one-off (see the manifest-lockstep rule inUPGRADE.md): a release that changes the protocol and ships no such row leaves every target on the old text. - AGENTS.md accepts exactly two sanctioned forms (v4.38.0, from the mercury-composable
field report: enabled repos that are also consumable products route consumers away from
contributor memory). Form 1 is the stock one-line shim (byte-identical to
templates/AGENTS.md). Form 2 is the contributor/consumer fork: first non-empty line = an optional short bold lead-in plus the canonical read-imperative, followed by a consumer paragraph containing at least one repo-local markdown link (no URLs, no absolute paths, no..), the whole file ≤ 16 non-empty lines and ≤ 2 KB (sized to the live field artifact — an 11-line fork with a disambiguation paragraph — plus headroom) — a routing stub, never an instruction file. The reconcile structure-checks Form 2 (fork-ok) and reports it converged; anything else stays ordinary drift (recopy + the PRE-APPLY hard stop).ENABLE.mdStep 6 carries the fork literal block, emitted when the repo declares a consumer entry point. - memory/sessions/ — "present" means the directory exists with at least one file; the
first enable session log (Step 5c) is what normally satisfies it (
.gitkeeponly as a fallback when no log is written). - memory/open-threads/ — one Open Thread per
thread-<id>.mdfile (v4.39.0, the merge-scale layout). "Present" means the directory exists with at least one file; the threads Step 5b seeds (at minimum the(vision-bootstrap)gate thread) normally satisfy it,.gitkeeponly as a fallback. Thread bodies never live incontinuity.md. - .gitlab-ci.yml — seed-copy installs the canonical root file (include + the
workflow:rulesguard) only when the target has none. A pre-existing root file is never edited mechanically: thewireattr sends the agent toENABLE.mdStep 6 (add-onlyinclude:entry, mandatory stage check, never touchworkflow:rules, state coverage). - Drift on verbatim rows is expected on an older target (staleness, resolved by
re-copy) but can also be a local customization — the dry-run lists every drifted file
before apply so the agent can arbitrate (
ENABLE.md§5i warn-before-clobber; a genuine fix should be upstreamed).
Version-gated migrations a file-sync cannot perform — the judgment half of the ladder,
distilled. A step applies when the target's installed version is below the Below
version (fresh enables skip this table — there is nothing to migrate). Full detail lives
in the named UPGRADE.md rung. Mode B = reconcile + the applicable rows + stamp.
| Below | Rung | Step |
|---|---|---|
| 3.0.0 | 2.x -> 3.0.0 | Backfill fact metadata in memory/continuity.md: give every existing fact a kebab id + footer (created/last_used = today, uses: 1, tier: working; open threads pinned); add an Architectural Invariants section (core); add a last_review line to Project State. |
| 3.4.0 | 3.3.0 -> 3.4.0 | Add last_invariant_check to Project State (below last_review); ensure verify_invariants_every exists in memory/decay-policy.md (default 40; preserve a tuned value). |
| 4.0.0 | 3.7.0 -> 4.0.0 | When memory/vision.md is first generated (seed row above, Step 5g): fill only the current-state context, keep the DRAFT banner, raise the (vision-bootstrap) gate thread, and derive no Blueprint until the human confirms the target. Never fabricate the Vision. |
| 4.1.1 | 4.1.0 -> 4.1.1 | If a top-level skills/ directory from the original 4.1.0 exists, rename it to agent-skills/ (git mv if tracked). |
| 4.16.0 | 4.15.0 -> 4.16.0 | If docs/ADR.md exists, move it to docs/arch-decisions/ADR.md (create the subdirectory; preserve content; fix path-based cross-links in prose). |
| 4.22.0 | 4.21.0 -> 4.22.0 | Optional: if the continuity status line has accreted a per-version changelog, rewrite it to a short current-state descriptor (history lives in session logs). Read fully, then write - never a truncate-first one-liner. |
| 4.22.3 | 4.22.2 -> 4.22.3 | If the team set AGENT_MEMORY_SESSION_WINDOW_HOURS (old hook knob), switch to AGENT_MEMORY_SESSION_WINDOW_MINUTES (x 60). |
| 4.24.0 | 4.23.2 -> 4.24.0 | Merge memory/decay-policy.md knobs additively: add continuity_max_facts: 30 if absent; bump only untuned old defaults (continuity_max_lines 300 -> 600, verify_invariants_every 20 -> 40); preserve custom-tuned values. |
| 4.29.0 | 4.28.4 -> 4.29.0 | Merge each vendor's literal import block (ENABLE.md Step 6) into the target's ours-CLAUDE.md / ours-GEMINI.md, preserving the project name/one-liner and repo-specific lines - merge, never overwrite; skip files the target does not have. |
| 4.30.0 | 4.29.1 -> 4.30.0 | If the detected stack's build-output paths are not ignored, append the missing entries under the build-output sentinel (ENABLE.md Step 7 table); greenfield: ensure the greenfield Open Thread carries the seed-when-the-stack-lands action. |
| 4.32.1 | 4.32.0 -> 4.32.1 | If continuity still reads last_session: (none yet) but memory/sessions/ is non-empty, point the field at the newest session log (date, agent, filename stem). |
| 4.33.0 | 4.32.1 -> 4.33.0 | Run memory-lint and triage every [secret-material] finding now: redact to (REDACTED); rotate anything live (a committed secret is exposed - redaction is not un-leaking); waive only deliberately quoted, non-live examples (lint:allow-secret-material). |
| 4.34.0 | 4.33.4 -> 4.34.0 | Tell the team the pre-commit secret guard now blocks staged secrets by default (opt down with the AGENT_MEMORY_SECRET_GUARD env knob set to advisory, or bypass once with git commit --no-verify). |
| 4.34.2 | 4.34.1 -> 4.34.2 | Drop lint:allow-secret-material waivers added solely for since-fixed false-positive classes (ALL-CAPS enum constants, their backticked form, the guard's own opt-down knob); leave all other waivers alone. |
| 4.36.0 | 4.35.0 -> 4.36.0 | PRE-APPLY: If a hook entrypoint carries locally owned behavior (not the stock agent-memory monolith), move it into a differently named executable fragment (00- to 49- before agent-memory, 51- to 99- after) before accepting the dispatcher re-copy; never overwrite a differently named fragment; if local and agent-memory logic are interleaved, stop for a human decision. |
| 4.37.0 | 4.36.0 -> 4.37.0 | PRE-APPLY: Before any reconcile apply, prove recovery of the existing AGENTS.md, merge its local directives and any existing protocol into the target-only memory/PROTOCOL.md with provenance and authority checks, revalidate source hashes, then install the exact one-line shim. Stop before every write on an unsafe merge. |
| 4.38.0 | 4.37.0 -> 4.38.0 | Protocol text changed (consumer step-0, terse close records, optional ready-to-work checkpoint): re-copy a target memory/PROTOCOL.md that is still byte-identical to the 4.37.0 template; arbitrate a customized one per ENABLE.md 5i (add the new sections, never drop local directives). Optionally add closed_narrative_max_lines: 150 to memory/decay-policy.md (lint falls back to the default when absent). |
| 4.39.0 | 4.38.1 -> 4.39.0 | Thread migration (merge-scale layout): create memory/open-threads/ and move every Open Thread block out of memory/continuity.md into its own thread-.md (verbatim cut-paste, checkbox + body + footer intact; mint a kebab id + footer first for a legacy thread that lacks one); replace continuity's Open Threads section body with the template's pointer note; delete the last_session line from Project State (derivable from the newest session log). Run memory-lint after - [thread-file]/[duplicate-id] gate the migration. |
| 4.39.0 | 4.38.1 -> 4.39.0 | Protocol text changed (open-threads read/create steps, last_session derivation): re-copy a target memory/PROTOCOL.md still byte-identical to the 4.38.0 template; arbitrate a customized one per ENABLE.md 5i (add the new wording, never drop local directives). |
Everything in this checkout that is not a source in the table above stays operator-side. In particular:
- ENABLE.md, MIGRATE.md, UPGRADE.md, MANIFEST.md, VERSION, README.md, CHANGELOG.md, LICENSE
- scripts/ (the reconcile helper + its tests)
- tests/ + .github/workflows/tests.yml (the tool's own test suites and their CI runner)
- the root AGENTS.md, CLAUDE.md, GEMINI.md and root bootstrap dotfiles (this repo's own)
- agent-skills/hello-world/ (the tool's own skills-layer demo)
- memory/ (this repo's own dogfooded memory layer)
- docs/, examples/, mkdocs.yml, .github/workflows/docs.yml (docs site + design records)
--check-manifest verifies the complement: every file under templates/, .githooks/,
and the seven built-in skill directories is reachable as a row source (or listed here),
and every row's source exists.