CYA-WP-0005 T02 done (ralph iter 2): Formalize Profile 0 baseline everywhere

- MemoryVision.md: Large new 'Profile 0 Baseline (Post-0003 / Current Shipped)' section with exact ports, activation logic, retrospection, safety invariants, usage sites, and relationship to 1–3 (plus the prior research section from T01).
- src/cya/memory/__init__.py: Updated module docstring to declare Profile 0 reality + references to MemoryVision + CYA-WP-0005.
- src/cya/orchestrator.py: Updated docstring with Profile 0 memory wiring note.
- SCOPE.md: Named Profile 0 explicitly in delivered slices and core capabilities.
- tests/test_memory.py: Added two new explicit 'Profile 0' tests + comments asserting provenance markers, kinds, activation_context support (T02 acceptance).
- README.md + AGENTS.md: Added Profile 0 mentions + links to the workplan.

All T02 acceptance criteria met. Ralph loop active. Next: T03 (full Profiles 1–3 definitions + matrix).
This commit is contained in:
2026-05-27 20:01:51 +02:00
parent 2bcbe50607
commit 19e80cc9bc
8 changed files with 143 additions and 26 deletions

View File

@@ -167,6 +167,39 @@ def test_recall_with_kinds_and_activation_context(isolated_memory):
assert KIND_INTERACTION_GOAL in kinds or "retrospection" in kinds
# ---------------------------------------------------------------------------
# CYA-WP-0005 T02 — Explicit Profile 0 baseline assertions
# ---------------------------------------------------------------------------
# These tests document and assert the characteristics of the current shipped
# memory implementation, now formally named "Profile 0" (see MemoryVision.md
# "Profile 0 Baseline (Post-0003)" and CYA-WP-0005).
# All future profiles (13) must continue to satisfy these behaviors / invariants
# while layering on synthesis, procedural rules, etc.
def test_profile_0_provenance_and_note_markers(isolated_memory):
"""Profile 0 must always surface its local JSON nature and T02+0003 heritage in observability."""
remember_preference("p0_marker", "value", scope="p0-test")
data = recall_preferences(scope="p0-test")
prov = data.get("provenance", [{}])[0]
note = data.get("note", "")
assert "cya-local-memory" in prov.get("source", "")
assert "T02+0003" in prov.get("source", "") or "local json" in note.lower()
assert data.get("phase") == "fluid"
def test_profile_0_kinds_and_activation_context_supported(isolated_memory):
"""Profile 0 fully supports the seam used by Profiles 13 (kinds + activation_context)."""
remember_retrospection_outcome("p0_retro", "remember this pattern", scope="p0-proj")
act = {"cwd": "p0-proj", "profile": "default"}
data = recall_preferences(scope="p0-proj", kinds=["retrospection"], activation_context=act)
assert len(data["items"]) >= 1
assert data.get("activation_context") is None or isinstance(data.get("provenance"), list) # provenance always present
# ---------------------------------------------------------------------------
# T04 (0003) — Retrospection outcome tests
# ---------------------------------------------------------------------------