Skip to content

Version Reconciliation

che cheng edited this page Jul 1, 2026 · 6 revisions

English | 繁體中文

Version Reconciliation — the auto-detect update flow

For a target that has both a web-latest and a locally installed version, LiveDocs detects the gap and offers an upgrade. The governing rule:

Every branch ends by answering from your LOCAL installed version. The web-latest is used only to (a) detect you're behind and (b) offer the upgrade — never as the answer itself.

flowchart TD
    Q["Docs query"] --> C{"Classify per-question:<br/>is there a local,<br/>version-matched source?"}
    C -->|"web-only<br/>(Claude Code, SaaS, hosted docs)"| W["Fetch web-latest<br/>(no reconciliation,<br/>no upgrade prompt)"]
    C -->|"has-local<br/>(installed package / CLI)"| T{"Context-aware trigger?<br/>in a consuming project, OR<br/>version / upgrade / debug question"}
    T -->|"no"| W
    T -->|"yes"| L["introspect: installed version<br/>(READ-ONLY, cwd-scoped)"]
    L --> V["latest_version: web-latest"]
    V --> CMP{"installed vs latest"}
    CMP -->|"equal"| LOCAL["Answer from LOCAL<br/>installed docs"]
    CMP -->|"web newer"| U{"Upgrade?<br/>(explicit user confirm)"}
    U -->|"decline"| LOCAL
    U -->|"confirm"| INS["skill runs the install<br/>(MCP stays read-only)"]
    INS --> LOCAL
Loading

Notes

  • Per-question classification — the same tool can be both: "how do I configure Claude Code" is web-only; "what flags does the installed claude take" is has-local.
  • Context-aware trigger — reconciliation only fires when it's warranted (inside a consuming project, or a version/upgrade/debug-shaped question), to bound latency.
  • Installed resolution is cwd-scoped — npm node_modules, Python venv, R .libPaths() of the current project; never a misleading global assumption.
  • Install is a confirmed mutation — run by the skill after explicit confirmation; the MCP itself stays read-only (it introspects, it never installs).

See also the boundary: Primary-source spectrum.

Clone this wiki locally