session-memory: distributor base + Artifact (WP-0007 T01)

distribute/base.py: Artifact dataclass + Distributor protocol + idempotent
BEGIN/END snippet markers (upsert_block replaces a pattern's block in place so
re-distribution doesn't duplicate) + agnostic markdown body rendering from
SolutionPattern fields. BaseDistributor honours per-flavor body/target hints.
8 new tests; suite 110/110.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 15:02:47 +02:00
parent 9e6f8a6e08
commit 7646cbc358
4 changed files with 213 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
"""Distribute phase (PRD §6.4) — render approved Solution Patterns into per-flavor
artifacts. Mirror of the collector design: agnostic core, thin distributor edges.
base.py Artifact + Distributor protocol + idempotent snippet markers (T01)
claude.py CLAUDE.md snippet distributor (T02)
codex.py AGENTS.md snippet distributor (T03)
grok.py native instruction distributor (T03)
__main__.py `python -m session_memory.distribute` (T05)
"""