Skip to content

Propose a bounded multi-pass query loop for the turn's query phase - #2

Closed
vbergeron wants to merge 1 commit into
mainfrom
claude/multi-pass-agent-kb-jpr1d3
Closed

vbergeron wants to merge 1 commit into
mainfrom
claude/multi-pass-agent-kb-jpr1d3

Conversation

@vbergeron

Copy link
Copy Markdown
Owner

The turn loop's query phase (Manifold.Turn.query/4) is one pass: one
generation yields up to three goals, run once, blind to each other's
results. That rules out anything needing a result to phrase the next
goal (multi-hop lookups, self-correction on an unknown predicate,
adaptive stopping).

docs/design/multi-pass-query.md proposes a bounded reason -> act ->
observe loop confined to the query phase only -- gate/extract/assert/
check and the sealed loop's ordering rules are untouched, the wire
protocol needs no version bump, and the control flow is designed as a
pure, effects-injected module so the round bookkeeping is unit
testable per CLAUDE.md's tiering rule, with an integration test
covering the one thing a pure test cannot: a goal that depends on the
real binding a prior round got back from swipl.

Not implemented yet -- this is the design for review.

The turn loop's query phase (Manifold.Turn.query/4) is one pass: one
generation yields up to three goals, run once, blind to each other's
results. That rules out anything needing a result to phrase the next
goal (multi-hop lookups, self-correction on an unknown predicate,
adaptive stopping).

docs/design/multi-pass-query.md proposes a bounded reason -> act ->
observe loop confined to the query phase only -- gate/extract/assert/
check and the sealed loop's ordering rules are untouched, the wire
protocol needs no version bump, and the control flow is designed as a
pure, effects-injected module so the round bookkeeping is unit
testable per CLAUDE.md's tiering rule, with an integration test
covering the one thing a pure test cannot: a goal that depends on the
real binding a prior round got back from swipl.

Not implemented yet -- this is the design for review.
@vbergeron vbergeron closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants