Wire the intent slow lane behind settings flags (I2 WP3) #83

Merged
weichen merged 2 commits from feature/agent-stack-i2 into main 2026-10-07 11:23:57 +00:00
Owner

Why: I2 increments 1-2 shipped the agent-intent slow-lane ports (SemanticScorer, CommandGenerator, merged as agent-intent #9/#10); the backend had no implementation, so the slow lane could not be enabled in the product.

What:

  • internal/intentsem: EmbeddingScorer over core.EmbeddingProvider (input+examples batch, max cosine) and LightGenerator over the lightweight model route (catalog-only system prompt, strict JSON command array parse, fenced/chatty output tolerated, parse/stream errors propagate to the library fail-closed path).
  • internal/intentgate: SetSemantic/SetGenerator rebuild the recognizer; both nil restores the plain I1 recognizer. Tests cover semantic resolving ambiguous, generator producing matched+commands on fallback, and toggling back off.
  • app.go: slow lane wired behind runtime.intentSemantic / runtime.intentGenerator, both registered with default false (EffectRestart) — default behavior is byte-identical to I1. The RAG SwitchingEmbedder is reused as the embedding provider.
  • Nested agent-intent pin moves to 343b1e6 (I2 increments 1-2).

Evidence: go test ./... green on this branch (intentsem unit tests with fake embedder + scripted stream; gate integration; flag-off parity). lint-boundaries + architecture ratchet updated in the Dev PR (adapter exception for intentsem, baseline edge backend/app→backend/intentsem).

Impact: none by default; enabling runtime.intentSemantic routes ambiguous rule matches through embedding scoring, runtime.intentGenerator lets the lightweight model propose commands on fallback with fail-closed validation.

Refs: I2 increment 3 (task card .task/2026-10-07-agent-stack-i2.md in Dev)

Why: I2 increments 1-2 shipped the agent-intent slow-lane ports (SemanticScorer, CommandGenerator, merged as agent-intent #9/#10); the backend had no implementation, so the slow lane could not be enabled in the product. What: - internal/intentsem: EmbeddingScorer over core.EmbeddingProvider (input+examples batch, max cosine) and LightGenerator over the lightweight model route (catalog-only system prompt, strict JSON command array parse, fenced/chatty output tolerated, parse/stream errors propagate to the library fail-closed path). - internal/intentgate: SetSemantic/SetGenerator rebuild the recognizer; both nil restores the plain I1 recognizer. Tests cover semantic resolving ambiguous, generator producing matched+commands on fallback, and toggling back off. - app.go: slow lane wired behind runtime.intentSemantic / runtime.intentGenerator, both registered with default false (EffectRestart) — default behavior is byte-identical to I1. The RAG SwitchingEmbedder is reused as the embedding provider. - Nested agent-intent pin moves to 343b1e6 (I2 increments 1-2). Evidence: go test ./... green on this branch (intentsem unit tests with fake embedder + scripted stream; gate integration; flag-off parity). lint-boundaries + architecture ratchet updated in the Dev PR (adapter exception for intentsem, baseline edge backend/app→backend/intentsem). Impact: none by default; enabling runtime.intentSemantic routes ambiguous rule matches through embedding scoring, runtime.intentGenerator lets the lightweight model propose commands on fallback with fail-closed validation. Refs: I2 increment 3 (task card .task/2026-10-07-agent-stack-i2.md in Dev)
weichen added 1 commit 2026-10-07 11:21:01 +00:00
Wire the intent slow lane behind settings flags (I2 WP3)
ci / vet-and-test (pull_request) Failing after 34s
45b011af9f
Why: I2 increments 1-2 shipped the agent-intent ports (SemanticScorer,
CommandGenerator); the backend still had no implementation, so the slow
lane could not be enabled in the product.
Evidence: go test ./... green; lint-boundaries ok; the two new
runtime.intentSemantic / runtime.intentGenerator flags are registered
with default false and the gate defaults to the I1 recognizer when both
are off (TestIntentSlowLaneFlagsDefaultOff, TestGate*).
Impact: no behavior change by default; enabling runtime.intentSemantic
routes ambiguous rule matches through embedding cosine scoring, and
runtime.intentGenerator lets the lightweight model propose commands on
fallback with library-side fail-closed validation. Nested agent-intent
pin moves to 343b1e6 (I2 increments 1-2).
Refs: I2 increment 3
weichen added 1 commit 2026-10-07 11:23:01 +00:00
Point the nested agent-intent pin at the I2 port work
ci / vet-and-test (pull_request) Successful in 43s
3f5c0f60e4
Why: the slow-lane wiring references SemanticScorer/CommandGenerator,
which only exist on agent-intent main after #9/#10; the pin must move
for CI to build the new packages.
Evidence: deps/agent-intent now at 343b1e6 (merged main).
Impact: none by itself.
Refs: Agent-System-Backend#83, I2 increment 3
weichen merged commit 9d2937115c into main 2026-10-07 11:23:57 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#83