Skip to main content
TRW
LATTICE // SHARING

One discovery, every project smarter

A gotcha fixed in one repo should not be rediscovered in the next. TRW propagates validated learnings across your projects — so your third repo benefits from what your first two already learned.

api-service47
frontend23
infra-tf31
bg-workers18
shared-lib39
Total repos: 5Cross-validated entries: network growingShared gotchas: recalled on next session start

Depth versus breadth

MEMORY · depthSHARING · breadth

Memory compounds one project over sessions. Sharing extends that compound across every sibling project. Complementary, not the same thing.

LEDGER // PROBLEM

Knowledge scoped to one context window does not compound

By default, AI-agent memory is scoped narrowly — to a single conversation, a single user, or a single project. A gotcha you solved in one repo stays locked there. The next repo rediscovers the same Pydantic v2 migration quirk, the same SQLAlchemy session-management trap, the same timezone-offset bug. Every rediscovery burns tokens, session time, and the trust the team places in the agent.

TRW lifts validated learnings out of a single project and replicates them into every sibling project that shares the same workspace. What one repo discovers, the rest inherit.

SCOPE

Org-wide network

Cross-validated entries surface in every sibling project session-start recall.

TRIGGER

Every trw_learn()

Deduplication and cross-validation run on each store call. No manual sync.

OUTCOME

0 rediscoveries

A solved gotcha stays solved across every future repo in the workspace.

LATTICE // VALIDATION

How cross-validation works

When the same learning content is independently written in two or more projects with cosine similarity above 0.92, TRW marks both entries cross_validated: True and applies a +0.05 importance boost. High-importance cross-validated entries are surfaced in all sibling projects' session-start recall. See the trw_learn tool reference for call signature and parameters.

MECHANISM_apply_cross_project_validation()
TRIGGERevery trw_learn() store call
THRESHOLDcosine similarity ≥ 0.92 (configurable)
BOOST+0.05 importance on matched entries
SURFACEsession-start recall in all sibling projects
DEDUPnear-duplicates collapse to a canonical entry
LEDGER // trw-memory

The standalone memory engine

Cross-project sharing is powered by trw-memory — a standalone Python package built on SQLite and sqlite-vec. It handles hybrid retrieval (BM25 + dense vectors), knowledge-graph traversal, semantic deduplication, and tiered storage lifecycle. Installable and usable independently of the rest of TRW.

TERMINAL // trw-memory
pip install trw-memory

SQLite + sqlite-vec. No external infrastructure. Works fully offline.

Note: this installs only the standalone memory engine. The full TRW framework installs via install.sh — see the quickstart.

LATTICE // INTEGRATIONS
  • LangChain memory adapter
  • LlamaIndex reader/writer
  • CrewAI component
  • OpenAI-compatible endpoint
TERMINAL // trw_knowledge_sync

The knowledge-sync tool

Manual sync across workspace projects. Run periodically by the trw-lead agent during the DELIVER phase. Syncs go through semantic deduplication — the same gotcha written many times across projects gets collapsed to a single canonical entry with evidence links attached. Full call signature in the trw_knowledge_sync tool reference.

DELIVER PHASE

trw_knowledge_sync clusters learnings by tag co-occurrence, deduplicates near-duplicates across namespaces, and writes canonical topic documents back to each project's memory store.

LEDGER // MATH

The numbers add up differently

Without cross-project sharing

PROJECTS5
COMMON GOTCHAS20 per project
REDISCOVERIES100 total
TOKEN WASTE100 × avg session cost

With TRW cross-project sharing

PROJECTS5
GOTCHAS DISCOVERED20 once
REDISCOVERIES0 after session 2
TOKEN SAVINGS≥ 80 session-cost units
LEDGER // CONSTRAINTS

What sharing does not do

No cloud sync by default — sharing is filesystem-level within a local workspace. Remote sync via the TRW platform is opt-in.

No automatic sync across user account boundaries without the hosted platform.

Different embedding models across projects can confuse cosine matching. Stick to one model family per workspace for consistent deduplication.

LEDGER // FAQ

Common questions

Does cross-project sharing require the hosted platform?

No. Filesystem-level sharing within a local workspace works standalone. The platform adds team-wide sync and a unified dashboard, but both are opt-in additions.

What counts as the "same" learning?

Cosine similarity above 0.92 (configurable) between two learning embeddings triggers cross-validation marking. The threshold is set in your trw-memory config.

Can I keep projects siloed?

Yes. Disable cross-validation per namespace in your trw-memory config. Projects in separate namespaces never share entries unless you explicitly configure a shared namespace.
TERMINAL // NETWORK_EFFECT

Turn your repo collection into a learning network.

Every project you add compounds the value of every other. Local-first, no cloud required to start.