Context Forge
Knowledge packs for AI agents — with proof of freshness
The problem
RAG systems rarely fail because of the model. They fail because of the context: thousands of documents where many are duplicates, outdated or contradict each other, so the agent quotes a 2023 price list or the wrong clause. I wanted a step before the AI that cleans, dates and signs the knowledge — and refuses what is too old or too sensitive.
The solution
Context Forge is the input side of RAG: instead of pouring documents into a vector store and hoping, it first removes duplicates, flags contradictions for a human, measures how old each fact is, and blocks anything that is past its time-to-live or contains personal data.
The output is a knowledge pack where every chunk carries its provenance — source file, owner, date and a SHA-256 signature — so an answer can be traced back to the exact document it came from. Policy lives in policy.json as data, not buried in code, so a company can tune it without touching the program.
It runs with zero dependencies and no internet, which is what makes it usable inside a company that will not send its contracts to a cloud service. The whole flow on a sample corpus takes 0.15 s.
Verifiable proof
Each item is checkable — a command, a public URL, or a number measured on the live system.
- Open source on GitHub: github.com/dejanswat-sketch/context-forge (public, MIT)
- 50/50 tests green (npm test)
- 0 dependencies — Node built-ins only, no internet needed
- Runs air-gapped: no network calls at all, so no data leaves the machine
- Demo runs in 0.15 s (node examples/pack.js): 5 sources → 2 chunks, 3 rejected (expired price list, PII)
- Every chunk carries source, owner, date and SHA-256 signature
- Honest limitations section in the README — what it does not do yet