Skip to content

Performance: acceleration headroom within the local+direct architecture — query latency, look-up round-trips, dev flow; subagent/haiku delegation hypothesis #56

Description

@kiki830621

Problem / Request

Original text (verbatim, from the maintainer):
「在這格架構下還有沒有可能加速」

Clarified scope (verbatim, follow-up answer):
「1,2,3都是,我在想有些東西是不是可以靠subagent或者workflows(似乎派haiku是夠的?)」

Interpretation: within LiveDocs' architecture boundary — local tool, direct to primary source, no central content cache (the anti-positioning line in docs/positioning.md is a hard constraint, not a preference) — explore acceleration on all three surfaces, with one cross-cutting hypothesis: delegate mechanical work to subagents / Workflows running a cheap model (haiku).

Type

feature (performance exploration — expect diagnosis to decompose into measured sub-issues)

The three surfaces (from clarification)

  1. Product query latency (engine) — live fetch is structurally slower than a pre-built index; headroom candidates inside the boundary: concurrent probing of discovery-chain candidates (llms.txt path variants + registry in parallel rather than sequential), persisting the ETag cache across sessions (disk-backed, still local — the boundary forbids shared/central content, not local caching), connection reuse / HTTP2, registry-first short-circuit for pure version queries. Note: this is Swift-engine concurrency work — subagents don't apply inside the MCP server.
  2. look-up skill round-trips (agent side) — each question can cost multiple main-loop MCP round-trips (resolve → fetch → reconcile), each paying main-model latency+tokens. This is where the subagent/haiku hypothesis bites: a cheap subagent could run the mechanical resolve→fetch→extract chain and return a distilled answer, freeing the main context. Counter-consideration to measure, not assert: subagent spawn overhead may exceed the saved time for single-shot queries; delegation likely pays off only for multi-fetch/summarize-heavy lookups.
  3. Dev flow / CI — swift test ~2min is the CI ceiling (GitHub-side; model choice irrelevant there), but the verify/IDD side already has prior art for the hypothesis: the Workflow fan-out doctrine pins cheap models (sonnet/haiku) for wide fan-outs. Candidates: cheaper-model lenses for mechanical verify stages, parallel dev tasks via worktree-isolated agents.

Expected

A diagnosis that profiles before optimizing — the project's measured-not-asserted rule applies to performance claims exactly as it does to competitive claims:

  • Where does wall-clock actually go on a typical look-up query (engine fetch vs MCP round-trip vs main-model thinking)?
  • Which of the three surfaces has the largest measured headroom per unit of effort?
  • For the haiku-delegation hypothesis: a measured spawn-overhead vs saved-latency comparison, not a vibe.
  • Then decompose into concrete, individually-verifiable sub-issues (likely per surface).

Actual

  • Engine: discovery-chain probing is (believed) largely sequential; ETag cache is in-memory per process — no cross-session persistence.
  • Skill: look-up runs entirely in the main agent loop; no delegation path exists.
  • Dev flow: verify ensembles run opus lenses uniformly; no cheap-model tiering by lens difficulty.
    (All three "Actual" claims are to be verified during diagnosis — stated here as the starting belief, not as measured fact.)

Impact

  • Latency is the one structural axis the vs-context7 positioning concedes by silence — a pre-built index answers faster per query. Acceleration inside the boundary strengthens "fresh AND fast enough" without becoming context7 (docs/positioning.md anti-positioning: speed must come from local revalidation, never a shared content cache).
  • Cheap-model delegation also cuts token cost, not just latency.

Constraints (architecture boundary — non-negotiable)

  • No central/shared content cache (anti-positioning).
  • Local caching / revalidation / concurrency are all fair game.
  • Any competitive speed claim that comes out of this must be measured (dated capture, à la the freshness harness) — never asserted.

Clarification (added during filing)

The scope question (which of the 3 surfaces) was resolved interactively before filing — answer quoted verbatim above; no deferred clarity rows.


Do NOT add a close trailer — /idd-close after merge.

Children (measured decomposition, 2026-07-06 profile)

Current Status

Phase: closed (merged via PR #60 + verified; see Closing Summary)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions