P376 · Context management

Version-Grounded Documentation Retrieval

Resolve the exact library and requested version before using retrieved API guidance.

Editorially reviewed

These examples and illustrative results are independently authored teaching materials, not measured model results.

Use case

Integrate middleware while remembering an example from another major version. The teaching lockfile resolves fictional example-web 2.4, and the user requires staying on 2.x. Documentation lists 1.x and 2.x. Similar names or high ranking do not replace version checks.

Mechanism

Establish resolved dependency and target version, then identify the library/version entry and task-specific section. Use explicitly supported interfaces with source references. Preserve critical gaps at the agreed query budget rather than inventing APIs from older memory. Versions are fictional teaching values.

Bad example

Copy a remembered example-web 1.x middleware pattern from search results, ignoring resolved 2.4 and the 2.x requirement.

Good example

Verify example-web 2.4 in the teaching lockfile and the user target 2.x. Select authoritative documentation for that library and version, inspect middleware registration and record supported interfaces/version. Implement against the current project. If 2.x guidance is unavailable or uncertain, report the gap rather than guessing 1.x names or upgrading dependencies without authorization.

Why the change matters

Memory/search may return an older API for a similar library. Binding identity, resolved version and relevant documentation explains applicability instead of trusting familiarity across a real dependency boundary.

Observable expectation

An illustrative record shows resolved 2.4, target 2.x and the selected section/interface evidence. Inspect implementation/tests for supported names.

If only 1.x material exists, preserve the gap rather than claiming 2.x confirmation. A retrieved candidate does not mean its contents were inspected.

Limits

Docs may lag or cover only some versions, and lockfiles need to match actual resolution. Query limits do not permit fabrication. Frozen tool names/limits are source instances, not a requirement to install one documentation tool everywhere.

Sources and evidence

Read the editorial criteria