Add Markitect bridge and activation quality

This commit is contained in:
2026-05-18 20:04:40 +02:00
parent 8089a7c8fa
commit 1efb7d4c13
19 changed files with 871 additions and 43 deletions

View File

@@ -4,7 +4,7 @@ type: workplan
title: "Retrieval, Activation Quality, And Evaluation"
domain: markitect
repo: phase-memory
status: proposed
status: finished
owner: phase-memory
topic_slug: activation-quality
planning_priority: P2
@@ -51,11 +51,37 @@ activation-memory intent.
- Do not own benchmark dashboards that belong in `infospace-bench`.
- Do not optimize for a single application domain.
## Implementation Update - 2026-05-18
The retrieval, activation quality, and evaluation slice is complete.
Implemented outputs:
- `phase_memory.retrieval` adds deterministic graph-neighborhood retrieval,
candidate scoring, event-path selection, pluggable token estimator protocol,
neighborhood activation planning, and activation quality reports.
- Retrieval supports max hops, edge-kind filters, direction filters, phase
filters, and memory kind filters.
- Event-path activation selects bounded event windows from structured
`MemoryPath` records and treats inactive paths as opt-in.
- Ranking signals include explicit priority, graph distance, phase, lifecycle
state, confidence, source-backed status, freshness, and policy allowance.
- `WordCountTokenEstimator` provides deterministic local budget accounting.
- `activation_quality_report` emits selected expected nodes, omitted required
nodes, policy-denied required nodes, token budget utilization, stale item
count, provenance coverage, source span coverage, and explanation coverage.
- `docs/activation-quality.md` documents retrieval, event paths, scoring,
estimator boundaries, and evaluation metrics.
Validation:
- `python3 -m pytest` -> 46 passed.
## T01 - Add deterministic graph-neighborhood retrieval
```task
id: PMEM-WP-0006-T01
status: todo
status: done
priority: high
state_hub_task_id: "8ed0909f-9e8e-4d49-9312-dca267df29f5"
```
@@ -75,7 +101,7 @@ Output: retrieval planner and tests for stable graph-neighborhood selection.
```task
id: PMEM-WP-0006-T02
status: todo
status: done
priority: high
state_hub_task_id: "5d48ba91-fef0-4d4f-a560-836abed1c527"
```
@@ -90,7 +116,7 @@ active, abandoned, and merged paths.
```task
id: PMEM-WP-0006-T03
status: todo
status: done
priority: high
state_hub_task_id: "0f6340ef-f7bd-408b-b98e-6d90188c5969"
```
@@ -113,7 +139,7 @@ Output: scoring model, per-item selection reason, and omitted-item reason.
```task
id: PMEM-WP-0006-T04
status: todo
status: done
priority: medium
state_hub_task_id: "12d83382-a767-45a8-b7cc-8c3f6f3f4c37"
```
@@ -128,7 +154,7 @@ package budget pressure.
```task
id: PMEM-WP-0006-T05
status: todo
status: done
priority: medium
state_hub_task_id: "509e9417-3aa7-4899-aed5-20749372fe00"
```
@@ -148,7 +174,7 @@ Output: fixture set and expected activation plans.
```task
id: PMEM-WP-0006-T06
status: todo
status: done
priority: medium
state_hub_task_id: "477a896a-8013-42a5-b965-b1ccd2577fec"
```
@@ -170,7 +196,7 @@ Output: metrics helper and JSON report fixture.
```task
id: PMEM-WP-0006-T07
status: todo
status: done
priority: medium
state_hub_task_id: "551432e4-2551-49fa-b17b-f762853a6a50"
```
@@ -187,3 +213,26 @@ Output: activation planning guide and scorecard update.
- Every selected and omitted item has a machine-readable reason.
- Evaluation fixtures produce deterministic activation quality reports.
- Optional semantic indexes remain behind the `SemanticIndex` port.
## Closure Review - 2026-05-18
**Outcome:** All tasks completed.
### Completed
- PMEM-WP-0006-T01 - Add deterministic graph-neighborhood retrieval
- PMEM-WP-0006-T02 - Add event-path activation
- PMEM-WP-0006-T03 - Add ranking signals and explanations
- PMEM-WP-0006-T04 - Improve token and budget accounting
- PMEM-WP-0006-T05 - Add evaluation fixture scenarios
- PMEM-WP-0006-T06 - Add maturity metrics for activation quality
- PMEM-WP-0006-T07 - Document retrieval and evaluation behavior
### Cancelled
None.
### Carried Forward
Service contracts, runtime configuration, health diagnostics, and external
adapter conformance remain in PMEM-WP-0007.