feat: add bounded iterative cognitive retrieval

This commit is contained in:
m
2026-08-30 20:46:52 +03:00
parent 74f326f11a
commit 901d5e011d
11 changed files with 341 additions and 62 deletions
@@ -0,0 +1,14 @@
# GEN2-EVOLVE-002 — Iterative Retrieval & Cognitive Memory Continuation
- Task/revision: `GEN2-EVOLVE-002 r2`; base `850fe92`.
- Continuation path: Core initial Context Compiler -> Cognitive Gateway advisory -> typed retrieval intent -> Core-bound inherited scope/policy -> existing Interaction/Epistemics retrieval -> existing Context Compiler -> one final advisory.
- Initiator: the cognitive strategy may emit a strict typed lane intent. Gateway validates it; Core, not the model, binds Principal, ContextScope, Focus, task label, freshness policy and local-only data policy.
- Limits: one continuation round, two excerpts, 1024 added bytes, 1.5 second local retrieval window, lane-qualified duplicate suppression. The second advisory has continuation disabled.
- No result returns a private `no additional evidence` excerpt for the final reasoning round. Negative experience and contradiction are separate lanes; scope is hard-filtered before ranking.
- No new owner, schema, provider selector, direct cognitive-worker storage access, V1 retirement or UI change.
## Verification
MILESTONE gate: targeted `go test` and `go vet` for `contracts/cognitive`, `cmd/cognitive-worker`, and `cmd/core-runtime`; `devctl preflight`, `check-diff`, `independent`, `check-architecture`, and `git diff --check`.
Focused tests cover the second retrieval round, Company A/B isolation, negative and contradiction lanes, duplicate suppression, byte/round limits, and no-additional-evidence behavior. Continuation state is request-scoped; durable restart/resume remains with the existing Work/Investigation owner.