Skip to main content

Retrieval is evidence

Status: Ready

Article ID: 007

Truth label: Limited

Audience: System designer

Reader outcome: Keep searched documents and project history from gaining instruction authority.

Related articles: 071, 073, 074

Target week: 04

Last verified: 2026-09-13

Technical reviewer: Codex source audit

Editorial reviewer: Codex editorial audit

Search relevance is not authority​

A retrieval system answers “what text looks useful?” It does not answer “what text is allowed to control the agent?”

This distinction matters because retrieved sources can contain stale rules, superseded decisions, accidental commands, or hostile prompt text. A highly relevant passage can still be unsafe as an instruction.

AGENTASIAN separates trusted instructions from untrusted evidence.

Trusted instruction layers​

Trusted layers are selected through reviewed control paths:

  • code-owned system instructions
  • current repository controls read directly from the target project
  • active operator rules
  • reviewed personas and skills
  • pack-defined reasoning lenses and voice registers
  • approved voice examples used only for style

These sources can guide behavior because their authority is explicit.

Untrusted evidence layers​

Evidence can inform an answer without changing the instruction hierarchy:

  • canonical project memory
  • stored notes and knowledge
  • past task learnings
  • conversation history
  • ingested PDF, EPUB, or Markdown passages
  • previous task results

The execution prompt places this material inside bounded reference sections and tells the agent to treat it as evidence.

Current controls stay direct​

Canonical Project Memory indexes changelogs, tasks, decisions, FAQs, and control files. Ordinary historical retrieval excludes control files and superseded decisions from prompt injection. The worker loads current agent instructions, global rules, voice rules, and related controls directly from the target repository.

That prevents an old indexed copy of a rule from silently outranking the current file.

Exact and semantic search have different jobs​

CPMI uses SQLite FTS5 for exact terms such as task ids, error codes, route names, and filenames. A vector projection adds concept-level recall. If the embedding provider is offline, exact-text search continues and the response reports the semantic error instead of pretending both paths ran.

Every selected record should retain provenance: source project, path, record type, line location, source hash, and search scores. Provenance lets the reader or reviewer return to the current source.

Voice examples are not facts​

Approved writing examples are a separate case. They can demonstrate sentence shape and delivery style, but the prompt explicitly forbids copying their facts or recommendations. Local-only examples must not enter a cloud-provider prompt.

Current limit​

Client scope filtering is under active hardening. Some scoped search paths are enforced, but the complete retrieval and direct-read surface has not passed the end-to-end multi-client security gate. Do not use retrieval labels as proof of confidential tenant isolation. The current build remains limited to one confidentiality domain.

Design rule to reuse​

For every new retrieval source, answer three questions before adding it:

  1. Who is allowed to retrieve this record?
  2. Does it enter the prompt as instruction, style, or evidence?
  3. Which provenance allows a reviewer to verify the current source?

Next lesson​

Continue with Trace every run.

Derivative map​

  • Weekly package: WEEK-04
  • Long video: VIDEO-W04-LONG
  • Shorts: SHORT-W04-PROBLEM, SHORT-W04-MECHANISM, SHORT-W04-WARNING
  • Email: EMAIL-W04
  • LinkedIn: LI-W04-A, LI-W04-B
  • X: X-W04-A, X-W04-B
  • Visual: VISUAL-W04

Review record​

  • Technical claims checked against the current canonical sources.
  • Truth label and nearby limitations reviewed.
  • Examples checked for secrets, client material, and private paths.
  • Editorial structure, internal links, and repository voice reviewed.

Review completed: 2026-09-03

Re-audited against the running product: 2026-09-13