# Changelog All notable changes to anamnesis are recorded here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); the project follows semver from v1.0 forward. Before v1.0, minor version bumps could include breaking changes. ## [Unreleased] ### Added - Added the initial `task_harness` capability with a base `context-continuity` fixture rendered to `.anamnesis/task-harnesses/` across Claude Code, Codex, and Cursor adapters. - Added `task-harness` entries to `anamnesis context index/query` so harness contracts are retrievable without injecting every harness body at session startup. - Added preview-only `anamnesis gc --dry-run` task-harness lifecycle reporting for stale current harnesses, deprecated/superseded reusable harnesses, count-budget pressure, disk-budget pressure, and managed vs user-authored cleanup recommendations. - Added v1.7 behavior metrics to `anamnesis benchmark task`, `task-compare`, `task-series`, and `prompt-gate` for source citations, managed-region edit attempts, bootstrap edit attempts, handoff refresh success, matched harness reads, and non-matched harness reads. ### Documentation - Recorded the first public-safe v1.7 full-vs-compact behavior benchmark pair, including source-citation, protected-edit, matched-harness, token, and graph evidence. ## [1.6.0] — 2026-06-25 ### Added - Added optional retrieval metrics to `anamnesis benchmark task`, including compact/full session context mode, required source reads, missed invariants, hallucinated facts, unnecessary context reads, task success, and token usage. - Added `anamnesis benchmark task-compare` for paired full-vs-compact model-dependent task runs, including delta markdown and `agent-task-benchmark-compare` runtime evidence. - Added `anamnesis benchmark task-compare --template` to generate matched full/compact task inputs before observed run metrics are filled in. - Added `anamnesis benchmark task-series --write` to aggregate repeated full/compact compare evidence into average, standard deviation, min/max, and SVG chart artifacts. - Added `anamnesis context index` and `anamnesis context query` as the first v1.6 local JSONL context index prototype. - Added `anamnesis context diagnose` to report stale handoff pointers, duplicate ontology IDs, conflicting relationship claims, superseded entries, explicit docs-vs-bootstrap fact conflicts, invalid evidence lines, and missing evidence artifacts. - Added context diagnostic surfacing to `anamnesis status` and `doctor`: `status` prints a short warning/info summary, while `doctor` includes the detailed advisory issues. - Added `anamnesis context resume` to print or write a compact resume bundle with active handoff pointers, latest archive, touched files, latest evidence, diagnostics, and bundle size metrics. ### Changed - Changed `anamnesis benchmark prompt-gate` to consume deterministic session-context benchmark JSON plus retrieval-aware task and task-compare evidence before recommending any prompt-time context delta. - Hardened `anamnesis context index` and `context query` with stricter JSONL entry validation, repo-relative JSON output, broader source fixtures, malformed index-line tolerance, and diagnostic source-pointer coverage. ### Documentation - Recorded the first public-safe Codex full-vs-compact retrieval diagnostic pair for the v1.5 `benchmark task-compare` workflow, keeping it separate from deterministic README claims. - Updated the v1.6 context index design and roadmap notes for the JSONL prototype. - Recorded the npmjs.org post-publish smoke for `@mcprotein/anamnesis@1.5.0`, including published compact SessionStart hook output from Claude Code and Codex native wrappers. ## [1.5.0] — 2026-06-19 ### Added - Added `anamnesis benchmark session-context`, a deterministic full-vs-compact SessionStart benchmark with public-safe fixtures, JSON/Markdown output, and dependency-free SVG charts for token deltas, payload composition, fixture growth, and cap/success status. ### Changed - Changed Claude Code and Codex SessionStart continuity hooks to emit compact invariant digests, active handoff summaries, source pointers, and retrieval instructions by default. Full file-body injection remains available through `ANAMNESIS_SESSION_CONTEXT_MODE=full` for compatibility/debugging. ### Documentation - Updated release docs and roadmap notes to reflect that the `v1.4.4` tag-triggered GitHub Actions workflow successfully published through npm Trusted Publishing/OIDC; manual npm publish is now an incident fallback, not the expected release path. ## [1.4.4] — 2026-05-19 ### Added - Added opt-in project documentation scaffolding for `init`: `--scaffold-docs` creates missing `README.md` and `docs/PROJECT-CONTEXT.md` starter docs, while `--enhance-docs` adds or refreshes managed context-review regions in existing docs without replacing user-authored content. - Added the `anamnesis-init` agent skill so agents ask a multiple-choice README/docs question before choosing `init` documentation flags on the user's behalf. ### Changed - Changed first-run project context bootstrap so `init` now writes a conservative `system_graph.yaml` draft even when no safe local project signals exist. Zero-context drafts contain only the project name, safety invariants, and open questions instead of inventing ontology facts or skipping the context file. ### Fixed - Deduped Stop-hook handoff reminders by dirty git fingerprint, so repeated Stop invocations warn once for unchanged worktree state and warn again only after the git changes differ. ## [1.4.3] — 2026-05-19 ### Fixed - Fixed the Codex native SessionStart wrapper so a project-root `system_graph.yaml` symlink is followed and injected as user-managed ontology context. - Changed Claude Code and Codex SessionStart ontology injection to emit the user-managed `system_graph.yaml` before generated ontology slices, so project-specific context survives tighter hook-output displays. ## [1.4.2] — 2026-05-11 ### Security - Removed private validation identifiers from public docs, benchmark evidence, and rewritten git history. Public evidence now uses self-checks and sanitized fixture names only. ## [1.4.1] — 2026-05-11 ### Fixed - Updated generated Codex hook config from deprecated `[features].codex_hooks = true` to current `[features].hooks = true`, and made update/diagnostics remove the legacy flag so Codex no longer shows the deprecation warning during hook review. ## [1.4.0] — 2026-05-11 ### Added - Added first-run project context bootstrap: `init` now creates a conservative `system_graph.yaml` draft from safe local project signals when the file is absent. - Added existing `load-context` surface preservation so project-specific Claude skills can be moved aside before the managed anamnesis `load-context` skill is installed. ### Changed - `init` and `update` evidence now record context-bootstrap and preserved surface-conflict outcomes. ## [1.3.0] — 2026-05-08 ### Added - Added fragment dependency resolution for `requires` entries with optional minimum integer versions, including dependency auto-inclusion during `init`/`update` and dependency diagnostics in `status`/`doctor`. - Added local `fragment-lifecycle` runtime evidence for fragment installs, updates, pinned update blocks, and yanked/invalid library references. ### Documentation - Planned v1.3 around fragment dependency resolution and local fragment update event hooks, while parking project templates and WebUI work outside the accepted roadmap. - Recorded a sanitized before/after benchmark comparison after applying the current fragments and generating Layer A/B ontology files. ## [1.2.1] — 2026-05-08 ### Fixed - Fixed the published README status badges for the v1.2 line and recorded the v1.2.0 post-publish smoke in tracked docs. ## [1.2.0] — 2026-05-08 ### Added - Added benchmark scorecard v2 metrics to `anamnesis benchmark report`, including ready layers, continuity checks, ontology gaps, doctor issues, Codex hook warnings, adapter surfaces, and runtime evidence freshness in markdown, JSON, CLI output, and evidence records. - Added `anamnesis benchmark compare --baseline --after ` for before/after scorecard deltas, with markdown, JSON, append, and runtime evidence output. - Added `anamnesis benchmark gallery --write|--validate` to generate and verify the evidence-backed `docs/BENCHMARK-GALLERY.md` region and README claim candidates from runtime evidence. - Added sanitized public-shape benchmark evidence for a fresh Next.js frontend, a NestJS/Kubernetes backend, an existing Python/uv repo, and before/after adoption paths. - Added `anamnesis benchmark task --template|--input` for explicitly model-dependent agent task benchmark runs, stored separately from deterministic context-quality scorecards. - Added `anamnesis benchmark prompt-gate` to keep Codex prompt-time context delta injection behind evidence checks for continuity gaps, token overhead, duplicate-context risk, and model-dependent task friction. - Added `anamnesis benchmark trace --append` to roll up benchmark trace logs from `.anamnesis/logs/benchmark-traces.jsonl` and store `benchmark-trace-rollup` runtime evidence. - Added `anamnesis doctor --append` and a `doctor:check` release script so install integrity diagnostics can be stored as `doctor-check` runtime evidence instead of living only in terminal output. - Added kind-level runtime evidence freshness to `anamnesis status`, including per-kind record counts, latest timestamps, age, and stale flags in CLI/JSON output. - Added automatic `update-apply` runtime evidence for `anamnesis update --apply`; dry-runs remain read-only and do not write evidence. - Added automatic `init-install` runtime evidence for `anamnesis init`; `init --dry-run` remains read-only and does not write evidence. - Added `anamnesis hooks summary --append` to summarize hook runtime logs from `.anamnesis/logs/hooks.jsonl` and store `hook-log-summary` evidence. ## [1.1.1] — 2026-05-07 ### Fixed - Fixed CLI and ontology bootstrap generator version metadata so `anamnesis --version` and generated bootstrap headers read the package version from `package.json` instead of a hard-coded release string. ## [1.1.0] — 2026-05-07 ### Added - Added Codex native SessionStart continuity for the base ontology and handoff path. When executable adapters are allowed, anamnesis installs `.anamnesis/codex-native-hooks/session-start.mjs`, enables `.codex/config.toml` `codex_hooks = true`, and merges `.codex/hooks.json` without dropping user hook entries. - Added Codex native lifecycle shell-hook wrappers for supported non-SessionStart events. Fragment shell hooks can now be adapted through `.anamnesis/codex-native-hooks/*.mjs` and registered in `.codex/hooks.json` for Codex-supported events such as `UserPromptSubmit`, `PreToolUse`, `PermissionRequest`, `PostToolUse`, and `Stop`, while keeping AGENTS.md and git pre-commit fallbacks. - Added shared Codex hook ownership diagnostics. `status` now summarizes `.codex/hooks.json` entries by anamnesis, OMX, plugin, user, and invalid ownership, and `doctor` warns about duplicated commands, malformed entries, and older relative anamnesis-managed hook commands. - Added Codex hook warning counts to automated dogfood self-check records so version-to-version continuity reports capture hook ownership health. - Added dogfood native-hook evidence for Codex. The default self-check now runs a synthetic Codex JSON dispatch over generated SessionStart, PostToolUse, and Stop wrappers, while `ANAMNESIS_REAL_CODEX_SMOKE=1` enables opt-in real Codex CLI SessionStart smokes for both isolated `CODEX_HOME/hooks.json` and trusted project-local `.codex/hooks.json`, plus a real `UserPromptSubmit` additional-context output smoke. - Added an authenticated Codex tool-turn dogfood smoke gated by `ANAMNESIS_REAL_CODEX_TOOL_SMOKE=1`; it verifies a real Bash tool turn invokes both `PreToolUse` and `PostToolUse` hooks. - Added a runtime evidence JSONL store at `.anamnesis/evidence/events.jsonl`. `dogfood check --append` and `benchmark report --append` now record machine-readable evidence alongside the markdown reports, and `status` reports the latest evidence record. ### Changed - Updated `status` / `doctor` continuity checks and adapter parity docs so Codex SessionStart is no longer documented as fallback-only. - Updated adapter parity docs and tests so the v1.1 Codex executable-hook surface explicitly covers `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PermissionRequest`, `PostToolUse`, and `Stop`. - Updated the base fragment to v10 so Codex installs native dirty-work and handoff reminder hooks when executable adapters are allowed. ### Documentation - Recorded the npmjs.org post-publish smoke for `@mcprotein/anamnesis@1.0.0` and marked v1.0 as shipped in the README and roadmap. - Added post-v1.0 roadmap items from reviewing `openai/codex` and `oh-my-codex`: Codex native hook surface refresh, prompt/stop-time continuity, shared hook ownership diagnostics, real native-hook smokes, Codex plugin packaging research, and OMX-compatible runtime evidence boundaries. - Added `docs/CODEX-PLUGIN-PACKAGING.md`, documenting the v1.1 decision to keep required Codex lifecycle hooks in config-layer `.codex/hooks.json` and defer optional plugin bundle emission until plugin-local hook execution has real Codex CLI smoke evidence. ## [1.0.0] — 2026-05-04 ### Added - Added `docs/AGENTFILE-V1-FREEZE.md`, the v1.0 Agentfile freeze record for reserved fields, ownership hints, registry/source exclusions, sync exclusions, migration impact, and post-v1 evolution rules. - Added `docs/REGISTRY-V1-DECISION.md`, the v1.0 decision record that defers remote registry/signing implementation post-v1.0 while preserving built-in and local-library fragment safety. - Added `docs/DOCS-V1-AUDIT.md`, the v1.0 public documentation coverage map for install, lifecycle, parity, ontology, handoff, monorepo, release, fragment authoring, troubleshooting, and limitations. - Added `docs/README-CLAIMS.md`, the v1.0 evidence ledger that maps README claims to dogfood records, switching fixtures, tests, and benchmark reports. ### Changed - Tightened Agentfile parsing so unknown v1 fields are rejected instead of silently stripped. Fragment `params` remain open-ended for fragment-specific command-layer validation. - Promoted `anamnesis migrate agentfile` from pre-freeze skeleton to v1.0 availability surface by documenting its no-built-in-migration behavior and reporting the next recommended command in human and JSON output. - Clarified the v1.0 public TypeScript API stability contract and added an exports-map test to keep deep imports outside the supported surface. - Updated registry, signing, and remote-sync docs so v1.0 does not imply a shipped remote fragment registry or broad sync command. - Recorded v1.0 candidate upgrade smoke proving published v0.7.0, v0.8.0, and v0.9.0 managed fixtures can update while preserving user-authored `AGENTS.md` prose. ## [0.9.0] — 2026-05-04 ### Documentation - Added `docs/FRAGMENT-REGISTRY.md`, the v0.9 design for registry metadata, discovery, version selection, cache layout, and trust boundaries before implementing remote fragment installation. - Added `docs/FRAGMENT-SIGNING.md`, the v0.9 design for remote fragment checksums, signed release manifests, trust-store policy, unsigned local fragment migration behavior, and rejection diagnostics. - Added `docs/FRAGMENT-AUTHORING.md`, a public fragment authoring guide with capability examples, rulebook guidance, executable-hook safety rules, versioning expectations, tests, review checklist, and compatibility rules. - Added `docs/DOCS-SITE-PLAN.md`, the v0.9 decision to stay GitHub-first through v1.0 while defining the future docs-site information architecture and trigger criteria. - Added `docs/BENCHMARK-GALLERY.md`, a public-safe benchmark evidence surface with claim policy, current headline-safe entries, supporting evidence, and next collection targets. - Added `docs/REMOTE-SYNC-STRATEGY.md`, the v0.9 decision to defer a broad `anamnesis sync` command and keep registry refresh, fragment discovery, and project update/apply as explicit separate operations. - Updated the architecture docs to keep fragment trigger ownership aligned with the current `rulebook.md` model. ## [0.8.0] — 2026-05-04 ### Added - Added the `anamnesis migrate agentfile` skeleton: dry-run by default, optional `--apply`, JSON output, backup-on-write, idempotent migration planning, and tests with an injected fixture migration. No built-in schema transformations ship yet. - Added a small public TypeScript API boundary at `@mcprotein/anamnesis` for Agentfile parse/stringify/read/write utilities and blocked unsupported deep imports with a package `exports` map. ### Documentation - Recorded the published-package v0.7.0 smoke test in `docs/DOGFOOD.md`, covering a fresh sanitized NestJS/Prisma fixture through `npm exec @mcprotein/anamnesis@0.7.0`. - Replanned the post-v0.7 roadmap into v0.8 schema/API/migration stabilization, v0.9 registry/signing/docs readiness, and v1.0 surface freeze criteria. - Added `docs/AGENTFILE-SCHEMA-AUDIT.md` and compatibility fixture tests for historical Claude Code-only, current all-adapter single-scope, and multi-scope pinned Agentfile shapes. - Added `docs/AGENTFILE-MIGRATIONS.md` to define the planned `anamnesis migrate agentfile` command contract before implementation. - Clarified `specs/agentfile.md` validation rules by separating parser-level hard errors from library/project-aware diagnostics. - Clarified v0.8 Agentfile field decisions: `overrides.*.locked` are ownership hints rather than hard update locks, `commit_on_apply` is future-reserved / a deprecated candidate, and `declined_at` remains a parser-level string with ISO 8601 recommended. - Documented the public API boundary in `docs/API.md`. - Added `docs/REPAIR.md`, a playbook for user-modified managed files, missing hook registrations, partial adapter installs, stale pinned versions, stale handoff state, and ontology gaps. - Added the recurring post-publish npmjs.org smoke gate to `docs/RELEASING.md`, including forced npmjs.org registry commands and a fresh-fixture `npm exec @mcprotein/anamnesis@X.Y.Z` check. ### Fixed - `Agentfile` parsing now accepts partial `fragment.adapters` overrides such as `cursor: false` without requiring every supported adapter key. - `update` and `doctor` now honor `fragment.adapters` as a per-fragment render gate for both root fragments and scope `fragments_add` entries. ## [0.7.0] — 2026-05-03 ### Added - Added a test-backed adapter parity matrix for v0.7. The canonical fixture records native vs fallback surfaces for `project_memory`, `ontology`, `executable_hook`, `skill`, and `slash_command` across Claude Code, Codex, and Cursor, and `docs/ADAPTER-PARITY.md` is locked to that fixture by tests. - Added a test-backed 3x3 switching-agent scenario matrix. Claude Code, Codex, and Cursor are each tested as source and target agents, including same-agent restarts, with current active handoff and stale handoff diagnostics verified for every ordered pair. - Added `anamnesis init --tools ` so first-time setup can install Claude Code, Codex, and Cursor surfaces without requiring a manual `Agentfile.tools` edit followed by `update`. - Added `anamnesis benchmark report`, a deterministic context-quality report for static ontology, Layer A bootstrap facts, Layer B enrichment, continuity readiness, and adapter surface readiness. - Added `docs/AGENT-SWITCHING-GUIDE.md`, a public user journey for installing all agent surfaces, preparing a handoff, resuming in Claude Code/Codex/Cursor, verifying continuity, and understanding native-vs-fallback limits. - Added the first v0.7 sanitized benchmark comparison in `docs/BENCHMARKS.md`, showing ready layers improving from `1/5` to `5/5` after all-adapter install, Layer A bootstrap, and Layer B enrichment. ### Changed - Included `docs/` in the npm package so README links to the roadmap, dogfood log, adapter parity matrix, switching scenarios, and release docs resolve from packaged installs. - Dogfood handoff simulations now use the first-install all-adapter init path instead of editing `Agentfile.tools` and running `update` as a workaround. - `update --apply` now enforces `settings.backup_retention` after creating a new backup. The default keeps the newest 10 backup directories; `0` keeps backups unlimited. - `status` now marks `declined` entries as active or stale, and `doctor` warns when a declined fragment no longer matches the current rulebook. - `benchmark report --append --output ` now reports the absolute appended path when the target is outside the benchmarked project, avoiding confusing `../../..` paths during cross-repo benchmark collection. ## [0.6.0] — 2026-05-03 Ontology-generation release: makes project ontology generation repeatable, bounded, and agent-assisted. The CLI now produces clearer deterministic Layer A facts, reports ontology gaps and drift, and routes the active agent toward append-safe Layer B enrichment instead of making users hand-author semantic YAML. ### Added - Added generation-boundary CLI guidance to `init`, `status`, `doctor`, and `ontology bootstrap` output so users can tell which context and ontology files were generated deterministically and which require an active agent. - Added a Claude Code `CLAUDE.md` entrypoint managed region. Projects with Claude Code enabled now get a Claude-specific pointer back to canonical `AGENTS.md`, managed ontology, and handoff state while preserving user prose outside the managed region. - Added ontology gap reporting to `status` and `doctor`. `status` now reports missing static slices, missing `.bootstrap.yaml` facts, missing `.enriched.yaml` semantics, fragments without deterministic Layer A introspectors, and introspectors that are not applicable in a scope; `doctor` turns actionable gaps into repair warnings. - Added the base v7 Layer B enrichment lifecycle contract. `/ontology-enrich` now tells every supported adapter to merge existing `.enriched.yaml` content by stable IDs, append new facts, use `supersedes` for replaced designs, and put weak inferences under `open_questions`. - Added bootstrap ontology drift detection. `status` now compares existing `.bootstrap.yaml` files against the current deterministic introspector output and reports stale facts; `doctor` turns stale bootstrap output into an actionable repair warning. - Added ontology schema version conventions. `.bootstrap.yaml` output now includes deterministic `schema_version`, `generator`, and `facts` fields; base v8 requires `.enriched.yaml` files to use `schema_version: anamnesis.enriched.v1`. - Added agent-assisted enrichment guidance to ontology diagnostics. `status` and `doctor` now connect missing or stale Layer A facts to the follow-up `/ontology-enrich` step, and `ontology bootstrap` prints semantic follow-up targets for matching `.enriched.yaml` files. - Added NestJS `@Sse()` route extraction. The NestJS Layer A introspector now records Server-Sent Events routes as deterministic route facts instead of leaving them only to Layer B enrichment. ### Documentation - Updated the v0.6 roadmap to start with generation-boundary guidance: command output and docs should distinguish deterministic CLI-generated context/ontology from agent-required semantic enrichment and handoff documents. - Documented the generation boundary in the README. - Updated README, design notes, dogfood notes, and the Agentfile spec to describe the managed Claude Code entrypoint. - Documented the ontology gap report in the README and ontology bootstrap design notes. - Documented the Layer B enrichment re-run policy in the ontology bootstrap design notes. - Documented bootstrap drift detection in the ontology bootstrap design notes. - Documented the bootstrap and enriched ontology schema conventions. - Re-centered the v0.6 roadmap and ontology bootstrap docs on bounded deterministic Layer A baselines plus agent-assisted Layer B enrichment, rather than broad framework introspector expansion. - Clarified in the README that Layer A extracts provable facts while Layer B carries project-specific relationships, flows, intent, invariants, and open questions for future agents. - Documented that bootstrap output should lead directly into agent-assisted enrichment instead of leaving users to hand-author semantic ontology YAML. - Added the first v0.6 sanitized ontology before/after dogfood record, showing static-only ontology versus bootstrap plus agent-enriched ontology on a NestJS/Prisma backend fixture. - Added a v0.7 roadmap item for a repeatable benchmark/report command so future README claims can be backed by measured before/after context quality, not just anecdotal dogfood notes. - Documented the Layer A introspector change gate and recorded a sanitized follow-up showing NestJS route facts increasing after `@Sse()` support. ## [0.5.0] — 2026-04-30 Context-continuity release: validates the main product promise across Claude Code, Codex, and Cursor with dogfood automation, active-handoff simulation, stale-handoff diagnostics, and repair guidance. ### Documentation - Re-centered the roadmap on anamnesis' product purpose: always inject current context/ontology and let users switch agents without re-briefing. - Clarified the roadmap after v0.4: v0.5 proves context continuity across real agent switches, v0.6 deepens ontology automation from dogfood gaps, and v0.7 hardens multi-agent UX/lifecycle scale. - Documented the current npm Trusted Publishing/OIDC status and the manual npmjs.org publish fallback. - Aligned README, design notes, monorepo docs, fragment docs, and the Agentfile spec with the current context-continuity model. ### Tests - Added a cross-agent continuity acceptance fixture for the base fragment. It verifies that Claude Code, Codex, and Cursor render the shared context/ontology contract, handoff startup instructions, operational guardrails, and command/skill surfaces needed for agent switching. ### Changed - Dogfooded anamnesis on itself with all three supported adapters enabled: Claude Code, Codex, and Cursor. - Added [`docs/DOGFOOD.md`](docs/DOGFOOD.md), a recurring self-check log for tracking whether new versions improve context continuity, ontology availability, adapter parity, diagnostics, and verification strength. - Added `anamnesis dogfood check --append` plus npm `dogfood` / `release:check` scripts so version bumps can record the self-check before publish. - `anamnesis status` now reports first-class continuity readiness for project memory, ontology, handoff startup, enabled adapter surfaces, and managed drift. `anamnesis doctor` surfaces the same failures as continuity-specific warnings, and dogfood scoring reuses the status continuity result instead of duplicating adapter checks. - Dogfood verification now runs an active handoff switch simulation: it installs all supported adapter surfaces in a temporary project, writes an `active.md` handoff index plus archive, executes the Claude Code handoff injection hook, and verifies Codex/Cursor fallback instructions are present. - `status` / `doctor` now diagnose stale active handoff state separately from handoff startup instructions. Missing archive references, active tasks pointing away from the newest archive, and completed/superseded entries in open handoff sections are reported before a fresh agent trusts stale state. - Added the first sanitized dogfood matrix for v0.5, covering a managed NestJS+Prisma fixture, a fresh Next.js fixture, and a fresh NestJS+k8s fixture. The matrix records continuity, doctor, ontology bootstrap, and handoff injection evidence without publishing private source identifiers. - Adapter-surface continuity failures now target only the missing or drifted surfaces, keeping `doctor` output actionable on real existing projects. - `doctor` issues now include repair guidance for user-modified managed files, adapter-surface continuity failures, invalid settings, missing hook registrations, and stale active handoff state. - Reviewed the current introspector API as part of the v0.5 scope and kept framework expansion deferred; v0.6 owns deeper ontology schema and refresh lifecycle work. ### Coverage 419 tests across 35 files. ## [0.4.4] — 2026-04-30 Release automation verification after npm Trusted Publishing was configured for the GitHub Actions workflow. ### Changed - Bumped the package to validate whether the tag-triggered publish workflow can publish via npm OIDC without a local owner-token fallback. The workflow reached `npm publish`, but npmjs.org rejected the OIDC publish with E404; `0.4.4` was not published to npmjs.org. ### Coverage 405 tests across 33 files. ## [0.4.3] — 2026-04-30 Packaging recovery for npm publish after the `v0.4.2` tag workflow reached the registry step but could not complete the release. ### Fixed - Normalized the CLI `bin` path so npm 11 does not auto-correct the package metadata during publish. - Publish workflow now checks whether the package version already exists on npmjs.org before running `npm publish`, keeping tag workflows idempotent after a manual owner-token recovery publish. ### Coverage 405 tests across 33 files. ## [0.4.2] — 2026-04-30 Operational polish for agent continuity, pinned fragment updates, release automation, and broader stack detection. ### Added - **`anamnesis doctor`** — read-only installation integrity diagnostics. Reports manifest parse/missing errors, tracked file or region drift, missing library fragments, fragment updates, adapter renderer gaps, invalid `.claude/settings.json`, and installed Claude hooks missing from settings registration. - **`anamnesis status --json`** — prints the existing structured status result as stable JSON for CI and other tools. - **base v6 handoff continuity** — `/handoff-prepare` now writes both a timestamped archive and `.anamnesis/handoff/active.md` multi-task index. `inject-handoff.sh` injects the active index plus the latest archived handoff, and the new Claude Code `Stop` hook `handoff-reminder.sh` reminds agents when uncommitted work is newer than the latest handoff. - **full fragment pinning** — `update` now renders `pinned: true` fragments from `base/.versions//` or `fragments//.versions//` instead of library-current. `update --bump-pinned` explicitly moves pinned entries to the current library version while keeping them pinned. - **Trusted Publishing workflow** — GitHub Actions release workflow for npm Trusted Publishing via OIDC, plus release docs with the npmjs.com trusted publisher fields required for `@mcprotein/anamnesis`. - **fragment catalog expansion** — added project memory + ontology fragments and rulebook triggers for Rails, Django, Go, Rust, SvelteKit, Remix, and Nuxt. - **Codex hook auto-wiring** — Codex `executable_hook` rendering now installs a best-effort Git `pre-commit` bridge in Git repos while keeping the AGENTS.md fallback. Prisma and k8s fragments move to v2 to opt into Codex hook support, with v1 archives preserved for pinned installs. ### Coverage 405 tests across 33 files. ## [0.4.1] — 2026-04-30 Ontology bootstrap expansion for common web/backend stacks and monorepo scope-local bootstrap output. ### Added - **nextjs introspector** (`cli/src/introspectors/nextjs.ts`) — finds App Router `page` / `route` files, Pages Router pages and `pages/api` routes, exported HTTP methods on route handlers, and middleware files. Output is stable-sorted. - **nestjs introspector** (`cli/src/introspectors/nestjs.ts`) — scans source files for `@Controller()` classes and HTTP method decorators (`@Get`, `@Post`, `@Put`, `@Patch`, `@Delete`, `@All`, etc.), producing controller prefixes plus stable-sorted route facts without adding TypeScript parser dependencies. - **fastapi introspector** (`cli/src/introspectors/fastapi.ts`) — scans Python source for `FastAPI()` apps, `APIRouter()` routers, path operation decorators (`@app.get`, `@router.post`, `@router.api_route`, etc.), and `include_router` calls. Route facts stay separate from include prefixes so Layer A avoids cross-file inference. - **multi-scope ontology bootstrap** — `anamnesis ontology bootstrap` now resolves `project.scopes`, runs fragment introspectors from each scope root, and writes scope-local `/.anamnesis/ontology/.bootstrap.yaml` files. The `--scope` and `--fragment` filters work across scopes. ### Coverage 389 tests across 32 files. ## [0.4.0] — 2026-04-29 Hybrid ontology bootstrap. New projects no longer start with an empty ontology slice — `anamnesis init` now auto-populates `.anamnesis/ontology/.bootstrap.yaml` from project files via fragment-specific introspectors (Layer A), and the new `ontology-enrich` skill instructs the active agent (any tool) to add the semantic layer parsers can't infer (Layer B). See [`docs/ONTOLOGY-BOOTSTRAP.md`](docs/ONTOLOGY-BOOTSTRAP.md) for the two-layer design. ### Added - **`Introspector` interface + `IntrospectorRegistry`** (`cli/src/core/introspector.ts`). Each fragment that wants bootstrap support registers an Introspector keyed by its fragment id with two hooks: `appliesTo(ctx)` (cheap pre-flight) and `introspect(ctx)` (returns plain JS object → YAML). - **`anamnesis ontology bootstrap`** command (`cli/src/commands/ontology.ts`) — Layer A entrypoint. Walks the Agentfile, looks up an introspector for each installed fragment, runs it, writes `.anamnesis/ontology/.bootstrap.yaml` with a deterministic header. Flags: `--fragment `, `--dry-run`, `--project-root`. Outcomes: `written` / `unchanged` / `skipped-no-introspector` / `skipped-not-applicable`. - **k8s introspector** (`cli/src/introspectors/k8s.ts`) — walks project YAML files, multi-doc aware, extracts `namespaces`, `services` (name/ns/type/ports/selector), `ingresses` (host/paths/ backend), `workloads` (Deployment / StatefulSet / DaemonSet / Job / CronJob with images + replicas). Stable sort by (namespace, name). Verified on a sanitized Kubernetes fixture: namespaces, ingresses, services, and workloads render as structured output. - **prisma introspector** (`cli/src/introspectors/prisma.ts`) — finds `**/schema.prisma`, regex-based block parser, extracts `datasources`, `generators`, `models` (with field-level type + attributes like `@id` / `@default` / `@relation`), `enums` (with values). Multi-file schema layouts supported. Verified on a sanitized Prisma fixture with datasource, generator, enum, model, and attribute extraction. - **`ontology-enrich` skill** — Layer B. Shipped as a new `skill` capability of the base fragment (v4 → v5). Tool-agnostic via the existing skill renderer pipeline: CC gets a native SKILL.md, Codex gets an AGENTS.md `codex-skill-ontology-enrich` region, Cursor gets a `.cursor/rules/ontology-enrich.mdc` with `agentRequested: true`. Instructs the active agent to read the bootstrap output + project manifests and write `.enriched.yaml` files containing relationships / flows / operational_notes that parsers cannot extract. - **`anamnesis init` auto-bootstrap** — after fragment install, init runs `ontology bootstrap` automatically. Fragments without a registered introspector are silently skipped. Bootstrap failures do not fail init; the message is surfaced in the CLI report. Opt out with `--no-bootstrap`. ### Coverage 356 tests across 29 files (was 329 at 0.3.0 ship). New: 5 k8s introspector, 8 prisma introspector, 8 bootstrap command, 3 init auto-bootstrap. ### Originally targeted for 0.4.x patches - nextjs / nestjs / fastapi introspectors and multi-scope bootstrap shipped in 0.4.1. - introspector author SDK docs moved to v0.5. --- ## [0.3.0] — 2026-04-28 Three-tool parity + agent handoff. anamnesis now renders all 5 capabilities for Claude Code, Codex, and Cursor; ships a tool-agnostic agent-handoff workflow; auto-detects monorepo workspaces; and groups `status` output by scope. ### Added - **Cursor adapter** — full 5/5 capability coverage. `executable_hook`, `skill`, `slash_command` emit `.cursor/rules/.mdc` files with `agentRequested: true` so Cursor's agent applies the rule when the situation matches `description`. `project_memory` and `ontology` reuse the Claude Code outputs (Cursor reads AGENTS.md natively). New prefix `.cursor/rules/` added to `EXEC_ADAPTER_PREFIXES` so Cursor exec-adapter files are gated behind `--allow-exec-adapters` for supply-chain consistency. `scoped_rule` (Cursor-native glob scoping) deferred. - **Codex adapter completion** — `executable_hook`, `skill`, `slash_command` now have Codex renderers that emit AGENTS.md region fallbacks (`codex-hook-` / `codex-skill-` / `codex-cmd-`) carrying the script body / skill body / command body inline. Codex agents honor the intent manually since Codex has no native hook system. Git pre-commit auto-wiring deferred to v0.4. - **`init --monorepo`** — detects `package.json` `workspaces` field, expands `/*` patterns and exact paths, runs the rulebook in each sub-project, and generates a multi-scope Agentfile with one `extends: '.'` scope per matched workspace. Sub-scopes skip fragments already at root to avoid duplicate installs. Empty workspaces (no rule match) reported separately. pnpm-workspace.yaml / lerna / nx / conventional-dir detection + interactive prompt remain follow-up. - **`status` per-scope grouping** — multi-scope projects group fragments and drift entries under each scope. Single-scope output unchanged. Each entry is bucketed to its longest-matching scope path; exec-adapter files always belong to root (CC `settings.json` is read only at root). - **Agent handoff MVP** — base fragment v3 + v4 ship `/handoff-prepare` slash command + `inject-handoff.sh` SessionStart hook + tool-agnostic AGENTS.md "session start: handoff 자동 확인" instruction. Departing agents write `.anamnesis/handoff/.md` capturing goal / done / in-flight / decisions / open questions / next steps; arriving agents (Claude Code via hook, Codex/Cursor via AGENTS.md instruction) read the latest handoff and resume from where the previous session stopped. - **Multi-scope rendering** — `init` and `update` iterate over `effectiveScopes(agentfile)` and emit per-scope render targets. `dedupeActions` collapses duplicate AGENTS.md region writes when CC + Codex + Cursor all emit the same project_memory or ontology slice. ### Tests 329 passing across 27 test files (was 299 in v0.2). New coverage: Cursor MDC rendering, Codex region fallbacks, monorepo detection, multi-scope status grouping. ### Targeted for v0.4 - **Hybrid ontology bootstrap** — two-layer auto-generation. Layer A (deterministic CLI introspectors): `anamnesis ontology bootstrap` runs per-fragment parsers (k8s manifests → namespace/service/port, prisma schema → model/relation, nextjs → routes, fastapi/nestjs → routers). Layer B (agent-driven): `/ontology-enrich` skill fills in semantic relationships, flows, and operational notes parsers can't extract. Companion `Introspector` SDK so community fragments ship their own parsers. - **Full version pinning** — fragment version cache + `.versions/` storage. Moved from v0.3 (low value while user base is small). - **`anamnesis update --bump-pinned`** — companion to full pinning. - **Handoff auto-trigger** + multi-task tracking + recovery. - **`anamnesis doctor`** — installation integrity check. - **Codex hook auto-wiring** — git pre-commit installer. - **Trusted Publishing** — GitHub Actions + OIDC for npm releases. - **Fragment catalog expansion** — Rails, Django, Go, Rust, sveltekit, etc. - **`anamnesis status --json`** — structured output for CI. Full breakdown in [`docs/ROADMAP.md`](docs/ROADMAP.md). --- ## [0.2.0] — 2026-04-27 Multi-tool, multi-scope. anamnesis now produces context for both Claude Code and Codex, supports monorepo layouts, ships a `status` reporter, and rounds out the fragment catalog. ### Added - **`status` command** — read-only project state report. Lists installed fragments (`in-sync` / `update-available` / `pinned` / `library-missing`), per-region and per-file drift (`clean` / `user-modified` / `missing`), suggested rulebook matches, declined entries. - **Codex adapter** (minimum scope) — `project_memory` + `ontology` capabilities. Codex reads AGENTS.md natively; the same content rendered for Claude Code is emitted when `codex` is listed in `Agentfile.tools`. Concurrent CC + Codex emissions are deduped by target identity. Hook / skill / slash-command fallbacks remain v0.3. - **Monorepo `scopes` support** — multi-scope `Agentfile.project.scopes` layouts with `extends` chains and `overrides.{tools, fragments_add, fragments_remove}`. project_memory + ontology write to scope-relative paths; exec adapters stay at project root (Claude Code reads `settings.json` only at root). - **`promote` supports `project_memory`** — promote a markdown file or extract a named region from AGENTS.md into a new fragment via `--type=project_memory [--region=]`. - **`nextjs` + `docker-compose` fragments** shipped. All 8 rulebook rules now resolve to a real fragment. - **`.claude/settings.json` auto-registration** — `executable_hook` capabilities install the hook script AND register it in settings.json with idempotent JSON-structural merge. Older anamnesis installs self-heal on the next `update --apply`. Indent style of the existing settings.json file is detected and preserved (2-space / 4-space / tab). - **`scope.ts` core module** — `effectiveScopes(agentfile)` resolves multi-scope inheritance and overrides into per-scope effective configs. v0.1 single-scope and `[- path: .]` Agentfiles map to a single root scope (back-compat). - **base fragment v2** — `inject-ontology.sh` SessionStart hook now walks `**/.anamnesis/ontology/*.yaml` recursively for monorepo awareness. `load-context` skill and slash command updated to mention scoped ontology directories. ### Tests 299 passing across 22 test files (was 229 in v0.1). ### Targeted for v0.3 - ~~**Cursor adapter**~~ — *shipped (5/5 capabilities)* — · project_memory + ontology: same outputs as CC (Cursor reads AGENTS.md natively). · executable_hook / skill / slash_command: emit `.cursor/rules/.mdc` with `agentRequested: true` so Cursor's agent applies the rule when the situation matches `description`. · `.cursor/rules/` added to `EXEC_ADAPTER_PREFIXES` (gated behind `--allow-exec-adapters` for supply-chain consistency). · CC + Codex + Cursor co-existence: each adapter targets its own files; region/file dedup applies for shared targets (AGENTS.md region, ontology slice). · `scoped_rule` capability (Cursor-native glob scoping) deferred to a follow-up patch — current MDC output uses `agentRequested` only. - ~~**Codex adapter completion**~~ — *shipped (AGENTS.md region path)* — `executable_hook`, `skill`, `slash_command` now have Codex renderers that emit region-based fallbacks (script body / skill body / command body) into AGENTS.md so Codex agents can honor the intent manually. CC + Codex co-existence: CC installs native files; Codex reads region instructions from AGENTS.md. Git pre-commit auto-wiring for hooks remains v0.4 polish (low value compared to the AGENTS.md path). - ~~**Monorepo init UX**~~ — *partial: `init --monorepo` shipped* — detects `package.json` `workspaces` field, expands `/*` patterns, runs the rulebook in each sub-project, and generates a multi-scope Agentfile with one `extends: '.'` scope per matched workspace. Reports empty workspaces (no rule match) separately. Interactive prompt + pnpm-workspace.yaml / lerna / nx / conventional-dir detection remain follow-up. - ~~**`status` per-scope grouping**~~ — *shipped* — multi-scope projects group fragments and drift entries under each scope. Single-scope output unchanged. Each entry is bucketed to its longest-matching scope path (exec-adapter files always belong to root since CC `settings.json` is read only at root). - ~~**Agent handoff MVP**~~ — *shipped in base v3 + v4* — `/handoff-prepare` slash command + `inject-handoff.sh` SessionStart hook + base v3 capability bundling for Claude Code (settings.json auto-registered). Base v4 added a tool-agnostic "session start: handoff 자동 확인" instruction in AGENTS.md so Codex/Cursor agents read `.anamnesis/handoff/.md` manually at session start. ### Targeted for v0.4 - **Hybrid ontology bootstrap** — two-layer auto-generation of `.anamnesis/ontology/.yaml`. Layer A: `anamnesis ontology bootstrap` runs deterministic per-fragment introspectors (k8s manifests, prisma schema, nextjs routes, fastapi/nestjs routers) to extract namespace, port, model, route facts without an LLM. Layer B: `/ontology-enrich` skill instructs the active agent (any tool) to fill in semantic relationships, flows, and operational notes parsers can't extract. Fragment-author SDK exposes an `Introspector` interface so community fragments can ship their own parsers. - **Full version pinning** — fragment version cache so `pinned: true` renders the pinned version, not library-current. Library stores past versions under `fragments//.versions/`. (Moved from v0.3 — low value while user base is small.) - **`anamnesis update --bump-pinned`** — companion to full pinning. - **Handoff auto-trigger** + multi-task tracking + recovery. - **`anamnesis doctor`** — installation integrity check. - **Codex hook auto-wiring** — git pre-commit installer for `executable_hook` (deferred from v0.3). Currently Codex agents read region instructions manually. - **Trusted Publishing** — GitHub Actions + OIDC for npm releases. - **Fragment catalog expansion** — Rails, Django, Go, Rust, sveltekit, etc. - **`anamnesis status --json`** — structured output for CI. Full breakdown in [`docs/ROADMAP.md`](../docs/ROADMAP.md). --- ## [0.1.0] — 2026-04-26 First daily-use release. Validated on 4 repositories (anamnesis itself plus 3 user projects across infra / ML / NestJS stacks). ### Added #### Core - `Agentfile` (v1 schema) — declarative project manifest. - `.anamnesis/manifest.json` — region/file hash tracking with 6-field entries (`base_rendered_hash`, `last_applied_hash`, `current_user_hash`, fragment id/version, template version, params). - Region anchor parser (``): parse, render, upsert, remove, byte-perfect roundtrip. - Fragment loader with topological sort (`requires`) and conflict detection. - `triggers.ts`: TriggerExpr DSL (`package_json_has`, `pyproject_has`, `file_exists`, `dir_exists`, `any_yaml_contains` + `any` / `all`). - `rulebook.ts`: markdown rulebook parser with code-fence skipping. - `applier.ts`: planning + applying with 5 statuses (`create`, `update`, `noop`, `user-modified`, `blocked`). - Backup-before-apply to `.anamnesis/backups//`. #### Adapters - Claude Code adapter for all 5 capabilities (`project_memory`, `ontology`, `executable_hook`, `skill`, `slash_command`). - `RendererRegistry` — adapter-scoped, isolation-friendly. #### Commands - `init`: rulebook → suggestions → install. Auto-includes `base`. - `update`: dry-run by default; `--apply` writes. Reports `suggested` rulebook matches without auto-installing. Auto-bumps fragment versions in Agentfile on apply. - `promote`: lift a project-local file into the library as a fragment capability (executable_hook / slash_command / skill / ontology; project_memory added in v0.2). #### Fragments (library) - `base`, `prisma`, `k8s`, `nestjs`, `python-uv`, `fastapi`. #### Safety - `--allow-exec-adapters` flag gates `.claude/{hooks,commands,skills}/` writes (supply-chain protection). - Files on disk without manifest entries are classified as `user-modified` and never overwritten. - `update` is dry-run by default. ### Coverage 229 tests across 18 test files. ### Repository policy The repository is public. All committed fragments and tests use synthetic data. Personal data (IPs, hostnames, user paths, internal identifiers) does not appear in any committed file.