Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ CHANGELOG entry.

- **spec/24 line 436 `TemplateProfileBackend` reservation removed** ([#62](https://github.com/dep0we/atomic-agents-stack/issues/62) PR 4, D5 cross-spec propagation). PR 1's spec/33 RFC documented the retirement (templates are PersonaBackend's domain because they are persona-centric: operators bring their own model and tools to a persona); PR 4 propagates the change to spec/24 itself by deleting the `TemplateProfileBackend` entry from §"Reserved future capabilities". `PersonaCapabilities.supports_templates` is the canonical home for the capability; a future persona-template marketplace (`pip install atomic-personas-starters` or a curated GitHub registry) registers a backend with `supports_templates=True` without forking the framework.

- **Framework status flipped from "ten of twelve" to "eleven of twelve backend protocols shipped"** ([#65](https://github.com/dep0we/atomic-agents-stack/issues/65), CorpusBackend arc **PR 4 of 4**, closes the arc). Only `MCPServerRegistryBackend` ([#201](https://github.com/dep0we/atomic-agents-stack/issues/201)) remains for v1.0 close. Operators can pin SQLite for indexed FTS5 query at GB scale via one env var (`ATOMIC_AGENTS_CORPUS_BACKEND=sqlite`), fall back to filesystem keyword scan with a doctor WARN that names the remedy at the 1000-page cliff, and trust that no existing `AtomicAgent(...)` construction site changed behavior (IRON RULE byte-identity pinned by 5 explicit regression assertions across 166 sites). The 4-PR arc shipped: Protocol scaffolding + `FilesystemCorpusBackend` (PR 1 / [#297](https://github.com/dep0we/atomic-agents-stack/pull/297), ~67 tests), `SQLiteCorpusBackend` with FTS5 (PR 2 / [#298](https://github.com/dep0we/atomic-agents-stack/pull/298), ~46 tests through 3 rounds of Opus adversarial), wiring + per-runner kwargs + `delegate.py` explicit-only threading + doctor + IRON RULE regression suite (PR 3 / [#304](https://github.com/dep0we/atomic-agents-stack/pull/304), ~35 tests through 3 rounds of Opus adversarial converging at Round 3 LOW), spec/34 LOCK + status flip + doc-release sweep (this PR). Arc total: ~150 net new tests; test suite 2691 to 2937 collected (2889 passing + 48 skipped). CLAUDE.md adds the canonical 11th CorpusBackend lock-paragraph mirroring the 10 prior shipped-protocol bullets, flips the ASCII architecture diagram (`Corpus 🟡` to `Corpus ✅ (locked at #65 PR 4)`), and bumps the spec-doc count from "30 locked + 2 RFCs" to "31 locked + 2 RFCs". README.md backend-protocols table row flips to "✅ Shipped". Both ROADMAPs refreshed (repo-root + vault). Ten follow-up issues filed inline during prep ([#305](https://github.com/dep0we/atomic-agents-stack/issues/305) OSError data-loss fallback, [#306](https://github.com/dep0we/atomic-agents-stack/issues/306) SQLite connection leak on schema-init failure, [#307](https://github.com/dep0we/atomic-agents-stack/issues/307) cascade-layout `corpus_backend._agent_root` divergence gap, [#308](https://github.com/dep0we/atomic-agents-stack/issues/308) CLI integration tests, [#309](https://github.com/dep0we/atomic-agents-stack/issues/309) title-derivation DRY refactor, [#310](https://github.com/dep0we/atomic-agents-stack/issues/310) `read_version` DRY refactor, [#311](https://github.com/dep0we/atomic-agents-stack/issues/311) idempotent no-op lock-hoist optimization, [#312](https://github.com/dep0we/atomic-agents-stack/issues/312) redundant `CorpusInvalidName` re-raise tuple, [#313](https://github.com/dep0we/atomic-agents-stack/issues/313) `UnicodeDecodeError` partial-content test gap, [#314](https://github.com/dep0we/atomic-agents-stack/issues/314) `bundle.py:_source_paths` v1.1 Protocol-aware staleness tracking).

- **spec/24 Decision 7 addendum: `CorpusBackend` named as the source of truth for `wiki/` and `raw/`** ([#65](https://github.com/dep0we/atomic-agents-stack/issues/65) PR 4 cross-spec propagation). spec/24's existing Decision 7 "Why" paragraph previously said `MemoryBackend` owned `wiki/`, `memory/`, and `journal/`. With CorpusBackend locked, the addendum clarifies: `MemoryBackend` retains exclusive ownership of `memory/` and `journal/`; `CorpusBackend`, when registered, owns `wiki/` and `raw/`. The two backends compose at prompt assembly (`agent.py:_load_indexes()` reads from both). Closes the cross-spec ownership ambiguity that surfaced during PR 3 wiring review.

#### BREAKING

- **`ATOMIC_AGENTS_POLICY_ENFORCE_NONCAP` env-var default flipped from `false` to `true`** ([#89](https://github.com/dep0we/atomic-agents-stack/issues/89) — PolicyBackend arc **PR 4 of 4**, closes the arc; spec/32 LOCKED). Operators authoring `policy.md` with tool / MCP-server / model surfaces now see those surfaces **enforce by default**: denied tools produce a synthesized `policy_blocked` `ToolCallResult` (no handler execution); denied MCP servers are filtered before `MCPClientPool` construction (no subprocess spawn); Policy's `get_effective_model()` return replaces the pre-Policy effective model for the LLM call. Cost caps were already enforcing (PR 3a) and are unaffected.
Expand Down Expand Up @@ -121,6 +125,8 @@ CHANGELOG entry.

- **Consolidated doc-debt sweep: spec/27 doctor catalogue extended, per-PR markers scrubbed across 6 locked specs, Protocol exception catalog added to disaster-recovery, methodology arc-table refreshed, README spec list backfilled.** Closes accumulated documentation drift across the 10 shipped protocol arcs. **spec/27-doctor.md** gains 6 new scope-scoped backend-check entries (`lock-backend`, `log-backend`, `agent-profile-backend`, `tool-registry-backend`, `mandate-backend`, `policy-backend`) following the canonical `persona-backend` template added in PR 4 of [#62](https://github.com/dep0we/atomic-agents-stack/issues/62). Each entry documents the PASS/WARN/FAIL ladder, capability snapshot detail, URL credential redaction shape, and the production failure mode the check prevents. The `mandate-backend` entry carries an "Implementation status" disclaimer pointing at [#235](https://github.com/dep0we/atomic-agents-stack/issues/235) because `check_mandate_backend` was never implemented during the #124 arc despite being documented in CLAUDE.md as shipping. **Per-PR temporal markers scrubbed** across `spec/22-log-backend.md` (26 to 4 markers), `spec/24-agent-profile-backend.md` (32 to 14), `spec/25-tool-registry-backend.md` (32 to 21), `spec/28-judge-layer.md` (23 to 1), `spec/29-mandates.md` (22 to 15), and `spec/32-policy-backend.md` (5 to 0). The decision rule applied: top-of-file metadata (LOCKED banner + canonical "Shipping plan across the #ARC arc" line + cross-links) preserved verbatim; Decision-anchored / Risk-anchored / plan-subagent-anchored historical references preserved as load-bearing provenance; forward-pointing "PR N ships X" / "lands in PR M" / "shipped in PR Y" prose rewritten to present tense or dropped; §"Out of scope" sections cleaned of bullets describing work that has now shipped (spec/32 dropped two bullets describing AtomicAgent wiring + consumption logic that landed across PR 2-3 of #89). **`docs/methodology.md`** "Recent arcs" table gains 3 new rows for #124 MandateBackend (13 SEVERE + 9 HIGH across 5 prep passes; PR 3b second-pass amendments caught Step 8 vs Step 9 precedence inversion + cache leak on BLOCK paths), #89 PolicyBackend (PR 4 BREAKING default flip; #273 dedup invariant; #274 model_from_per_call_override audit field), and #62 PersonaBackend (PR 4 Round 1 phantom test file + MUST #8 timezone-wording drift; Round 2 public repo-root ROADMAP drift; doc-release subagent miscount). Line 12-16 prose list updated to "Ten of twelve backend protocols shipped" with PersonaBackend appended. **`docs/deployment/disaster-recovery.md`** gains a new "Protocol-backend exception catalog" section covering all 7 shipped Protocols using the verified exception inventory from `atomic_agents/exceptions.py` + `atomic_agents/mandate/types.py` + `atomic_agents/policy/types.py` (the verification step caught the pre-impl-prep observation that `MandateExpired`, `MandateConstraintViolation`, `PolicyDenied`, `PolicySnapshotNotFound`, and `LogBackendError` do not exist as classes; the catalog uses the actual `MandateError` / `MandateInvalid` / `MandateNotFound` / `MandateStateSchemaUnsupported` + audit-event family `mandate_cap_exceeded_block` for Mandate, the actual `PolicyError` / `PolicyInvalid` + audit-event family `policy_decision` with `decision_kind: deny` for Policy, and documents LogBackend's stdlib-exception failure shapes honestly). The catalog sits after the doctor-failure table (which gains 7 Protocol-backend rows matching spec/27's new entries) and before the cross-references block. Line 22's "Doctor runs nine checks (env, python, ...)" replaced with a cross-reference to spec/27 so the file stays current as the doctor catalogue grows; line 198's "All nine checks should pass" relaxed to "All checks should pass". **`README.md`** spec list at lines 156-182 backfilled with 9 previously-missing locked specs (21, 22, 24, 25, 28, 29, 30 marked DRAFT, 31, 32). spec/23 deliberately skipped (does not exist; the numbering jumps from 22 to 24 because spec/23 was historically renumbered). Line 207's "remaining three protocols ship" drift fixed to "remaining two protocols" (same lesson the post-merge sweep of PR 4 of #62 caught for ROADMAP). All 10 modified files compose to a single bisectable PR; full test suite (`uv run pytest`) remains at 2686 passing + 48 skipped, zero regressions, because the sweep does not touch any code path. **Track record extended: 22 SEVERE + 23 HIGH across 10 prep passes** (pre-impl prep on this PR caught 2 SEVERE + 2 HIGH that would have shipped wrong exception names and deleted load-bearing historical record). Codex skipped per standing project rule; Opus adversarial subagent ran the prep + review rounds.

- **spec/34 LOCKED + doc-release sweep landed** ([#65](https://github.com/dep0we/atomic-agents-stack/issues/65) PR 4, closes the arc). `docs/spec/34-corpus-backend.md` flips from RFC to LOCKED. The RFC banner and 4-PR shipping-plan provenance block at the top are replaced with a single locked-status line. Per-PR temporal markers throughout the spec body (capability declarations, `Per-runner kwargs (PR 3 -- implemented)` subheaders, `SQLite hybrid layout (PR 2)` headers, `Call-site migration reference (PR 3 -- implemented in #65 PR 3 of 4)` section title, `Follow-up issue filed at PR 4` deferral markers) consolidated to present-tense lock prose. §"PR 4 documentation-update checklist" deleted (self-referential scaffolding has no place in a locked spec). §"Implementer contract for corpus backends" finalizes at 9 normative MUSTs (mirroring PersonaBackend spec/33's shape exactly, with one extra MUST for the `query()` capability precedence rule that CorpusBackend has via the FTS5 / semantic / substring fallback ladder): page name and corpus charset validation at API boundary, side-effect-free construction, capability honesty including `embedding_provider=None` invariant, `query()` capability precedence rule, `write_page()` 4-case behavior table (fresh / idempotent no-op / CAS / collision), URL credential redaction across all operator-facing error paths, cross-corpus isolation at storage layer, snapshot id determinism + cross-page isolation, `backend_id` property stability + `close()` idempotency. spec/24 Decision 7 receives the CorpusBackend ownership addendum. spec/26 (cascade bundle, DRAFT) cross-references updated from future-tense ("when CorpusBackend ships") to present-tense ("now that CorpusBackend has shipped, locked at #65 PR 4"). spec/01 (anatomy), spec/02 (atomic memory), spec/04 (runtime assembly step [7]), and spec/31 (LLMBackend) gain CorpusBackend cross-references. Per-PR temporal markers scrubbed from `atomic_agents/corpus/__init__.py` + `atomic_agents/corpus/types.py` + `atomic_agents/corpus/backend.py` + `tests/test_corpus_sqlite_backend.py` docstrings (completes the per-PR-marker consolidation sweep across spec body, reference impls, tests, and strategic docs). `docs/deployment/programmatic.md`, `docs/methodology.md`, and `CONTRIBUTING.md` test counts and shipped-backend counts refreshed.

### Added

- **PersonaBackend Protocol scaffolding** ([#62](https://github.com/dep0we/atomic-agents-stack/issues/62) — PersonaBackend protocol arc **PR 1 of 4**). New `atomic_agents/persona/` module ships the `PersonaBackend` `@runtime_checkable` Protocol surface (9 methods: `load_persona`, `save_persona`, `list_personas`, `exists`, `clone`, `snapshot`, `restore`, `list_snapshots`, `capabilities` + `backend_id` class attribute), the `FilesystemPersonaBackend(personas_root)` reference impl, the registry primitives (`register_persona_backend`, `get_persona_backend`, `list_persona_backends`, `unregister_persona_backend` per D9 fold #3 fixture hygiene, `get_default_persona_backend(scope_root)` honoring `ATOMIC_AGENTS_PERSONA_BACKEND` + optional `ATOMIC_AGENTS_PERSONA_BACKEND_URL` env vars), the `make_filesystem_persona_backend_from_url("filesystem:///path")` URL factory with credential redaction across all `ValueError` sites, and the three frozen dataclasses (`Persona`, `PersonaSnapshot`, `PersonaCapabilities`). Storage layout `<personas_root>/<persona_id>/{IDENTITY,SOUL,USER}.md` plus `metadata.json` sidecar (`schema_version: 1`, version, label, created_at). `persona_id` charset `[a-zA-Z0-9_.+@-]+` enforced at API boundary with path-traversal / control-char / newline / leading-dot / empty-string refusal. Side-effect-free construction (no filesystem walk in `__init__`; lazy read on first method call) so the 166 existing `AtomicAgent(...)` construction sites stay byte-identical when no `persona.link.md` exists. Six persona exceptions in `atomic_agents/exceptions.py` per D-PI-1 (NOT in `persona/types.py`): `PersonaError`, `PersonaNotFound`, `PersonaExists`, `PersonaCorrupted`, `PersonaSnapshotNotFound`, `PersonaOwnershipConflict`, `PersonaLinkInvalid`. Cross-module placement matches the `AgentProfileNotFound` / `ToolNotInRegistry` convention because `PersonaOwnershipConflict` is raised by profile backends (PR 2 wiring) and `PersonaLinkInvalid` by the `persona_link_md.py` parser (PR 2 per D-ER-3).
Expand Down
Loading