Files
agentic-resources/workplans/AGENTIC-WP-0007-session-memory-phase3.md
tegwick 59632e94db session-memory: distribute entrypoint + live verify (WP-0007 T05)
python -m session_memory.distribute: reads approved catalog patterns, builds
targets from repo->domain map x flavors, renders scoped per-flavor proposals
(HITL) + active registry. Live verify against the real catalog: 12 renders
across 5 repos, idempotent, provisional skipped. proposals/ gitignored
(regenerated); active_patterns.json committed. README documents detect->curate->
distribute. Phase 3 finished; suite 126/126.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:25:20 +02:00

3.4 KiB
Raw Blame History

id, type, title, domain, repo, status, owner, topic_slug, created, updated, state_hub_workstream_id
id type title domain repo status owner topic_slug created updated state_hub_workstream_id
AGENTIC-WP-0007 workplan Coding Session Memory — Phase 3 (Distribute: per-flavor artifacts, HITL) helix_forge agentic-resources finished codex helix-forge 2026-06-07 2026-06-07 766c9089-d5de-472a-8c0f-85529028cfb9

Coding Session Memory — Phase 3 (Distribute)

Implements Distribute (PRD §6.4, FR-X1FR-X4), continuing AGENTIC-WP-0004 (Curate). Distributor adapters render the approved / distribution_ready SolutionPatterns from the Pattern Catalog into per-flavor artifacts, using the rendering_hints produced in Phase 2. Mirror image of the collector design: agnostic core, thin adapters at the edges (FR-A2) — adding a flavor = one collector + one distributor.

Key boundary (FR-X3): output is proposed, not auto-applied — artifacts are written as reviewable proposals (HITL), scoped by repo/domain (FR-X2), with an active-pattern registry tracking which patterns are live where (FR-X4).

Distributor Adapter Interface + Artifact Base

id: AGENTIC-WP-0007-T01
status: done
priority: high
state_hub_task_id: "ff618fa6-a78b-4b80-846b-8cde7ad65451"

Define a Distributor protocol and an Artifact dataclass (flavor, target_path, content, pattern_id) in session_memory/distribute/. render(pattern, scope) reads the agnostic SolutionPattern plus its per-flavor rendering_hints; base helpers handle idempotent snippet markers. Agnostic core; flavor logic only in adapters. Unit-tested.

Claude Distributor (CLAUDE.md snippet)

id: AGENTIC-WP-0007-T02
status: done
priority: high
state_hub_task_id: "64f50bd4-1fdf-452e-ae14-890253ab9f33"

distribute/claude.py: render an approved pattern into a CLAUDE.md snippet block (or skill stub) with stable BEGIN/END markers so re-distribution updates in place rather than duplicating. Uses rendering_hints["claude"]. Unit-tested.

Codex + Grok Distributors

id: AGENTIC-WP-0007-T03
status: done
priority: high
state_hub_task_id: "382790f5-1fb4-4394-b039-1649cbf3b20a"

distribute/codex.py (AGENTS.md snippet) and distribute/grok.py (native instruction format), each rendering the same agnostic pattern via its rendering_hints. Confirms FR-A3: a pattern discovered via one flavor is expressible for all. Unit-tested.

Scoping + Proposed-Not-Applied Output + Active-Pattern Registry

id: AGENTIC-WP-0007-T04
status: done
priority: high
state_hub_task_id: "2c690f29-2aee-460a-b9cd-3566018f6b3c"

Filter patterns by Scope (repos/domains/flavors) so a pattern only lands where it applies (FR-X2). Write artifacts as proposals under a proposals/ dir, never auto-applied (FR-X3, HITL). Track which patterns are active in which environments in an active-pattern registry (FR-X4). Unit-tested.

Distribute Entrypoint + Tests + Verify

id: AGENTIC-WP-0007-T05
status: done
priority: medium
state_hub_task_id: "f9e24c13-7049-4c1c-a2d6-3a4dc4e752fd"

python -m session_memory.distribute: read approved catalog patterns, render per-flavor proposals scoped by repo/domain, emit a proposal summary + JSON. Document in session_memory/README.md. Verify end-to-end against the real catalog. After workplan updates, notify the operator to run from ~/state-hub:

make fix-consistency REPO=agentic-resources