Skip to content

Federated Content

Federated content is any information imported from outside this repository. This document defines how to classify, validate, and integrate external context into the Ant-Digest workflow.

AI-assisted development often pulls in external knowledge: library docs, API references, Stack Overflow answers, MCP tool outputs, or prior session context. Without classification, external claims silently become “facts” that drive implementation — leading to hallucinated APIs, outdated patterns, and untraceable decisions.

Federation makes external context explicit, classified, and auditable.

When importing external content, follow these steps:

Source TypePlaneTrust
Official library documentation (fetched live)BMedium
MCP tool output (Context7, Greptile, etc.)BMedium
Web search resultBMedium — verify recency
Prior session context / memoryCLow — re-verify
LLM general knowledgeCLow — verify before use
User-provided specificationBMedium — treat as requirements
This repo’s own filesAHigh

Every piece of federated content must carry these tags in CRUMBLOG or inline:

SOURCE:{origin}
PLANE:{A|B|C}
DATE:{when fetched}
CONF:{high|medium|low}
RISK:{description if Plane C, or "none"}
PlaneValidation Required
AAlready verified (in-repo)
BCross-reference with repo state. Does the external claim match what the code actually does?
CMust be promoted to A or B before implementation. Find the source or verify in-repo.

Once validated:

  • Use the content in planning or implementation
  • Record the source in the CRUMBLOG entry for the decision it informs
  • If the content later proves incorrect, add a correction entry with RISK:stale-external-ref

Scenario: Using a library feature you are not sure exists

Section titled “Scenario: Using a library feature you are not sure exists”
  1. Before: PLANE:C — “I think React TanStack Query supports X”
  2. Federate: Use Context7 or web search to find documentation
  3. After: PLANE:B — “TanStack Query docs confirm X” + SOURCE URL
  4. Implement: Write code using the confirmed feature
  5. Verify: npm run check + npm run build confirms it works → PLANE:A

Scenario: Adding a new SEMP event type based on research

Section titled “Scenario: Adding a new SEMP event type based on research”
  1. Before: PLANE:C — “Stigmergy literature suggests event type Z”
  2. Federate: Fetch research paper or documentation
  3. After: PLANE:B — “Paper confirms pattern Z” + SOURCE URL
  4. Verify in-repo: Check if existing signal engine supports it per server/routes.ts
  5. If compatible: Promote to PLANE:A with file references, implement

Scenario: MCP tool returns unexpected data

Section titled “Scenario: MCP tool returns unexpected data”
  1. Receive: MCP tool output tagged PLANE:B
  2. Validate: Does output match repo state? Check key claims against actual files.
  3. If mismatch: Log as RISK:mcp-mismatch in CRUMBLOG. Prefer Plane A (repo) over Plane B (tool output).

For any change that involves external context, include a source list in the /preflight scope statement:

FEDERATED SOURCES:
- [B] Context7: React TanStack Query docs (fetched 2026-02-04)
- [B] GitHub issue #42: discussion of signal decay approach (URL)
- [C] Assumption: WebSocket reconnection is handled by browser (RISK: verify behavior)

External content has a shelf life:

Source TypeConsidered Stale After
Library docs (major version match)6 months
Web search results1 month
MCP tool outputSame session only
Prior session contextAlways stale — re-verify

When using stale content, add RISK:stale-source and re-fetch if possible.