A public, sanitized template of the raw → compiled knowledge loop we implemented internally for OpenClaw operations.
Inspired by ideas shared by @karpathy (original tweet). Thank you for pushing practical, corpus-first workflows into the mainstream.
Most teams lose context because notes are fragmented and synthesis is inconsistent. This template turns that into a repeatable system:
- Capture source evidence in
raw/ - Compile reusable operational knowledge in
compiled/ - Preserve lineage links (what synthesis came from which sources)
- Query corpus first before inventing context from scratch
- Run periodic health checks for drift, staleness, and contradictions
research/knowledge-system/
├── README.md
├── index.md
├── raw/
│ └── {stream}/{YYYY-MM-DD}/
│ ├── SOURCES.md
│ └── snapshots...
└── compiled/
└── {stream}/
├── overview.md
└── runs/{YYYY-MM-DD}.md
scripts/
└── knowledge-compile.sh
- Redaction policy with practical before/after examples
- Quality gates for metadata, contradiction checks, freshness, and lineage
- Maturity model (L1→L5) to stage adoption
- Operational workflows (daily/weekly)
- Lightweight ROI metrics
- Anti-pattern catalog
- Weekly synthesis template + example artifact
Pick 1-3 streams (examples):
productcustomer-supportplatform-ops
Create:
research/knowledge-system/raw/<stream>/<date>/SOURCES.mdwith metadata (source,captured_at,tags,confidence)
Run:
bash scripts/knowledge-compile.sh 2026-04-04This creates deterministic run notes with lineage anchors in compiled/*/runs/.
Before planning/execution asks, check compiled pages first, then raw evidence if needed.
Recommended cadence:
- Daily: ingest + compile for active streams
- Tue/Fri: stale pages, broken links, conflicting facts, missing next actions
Create one weekly artifact using templates/weekly-synthesis.md to capture:
- changed assumptions
- risks
- decisions
- unknowns
- next actions + lineage links
Use this when wiring the repo into an agentic loop.
git clone https://github.com/BradGroux/openclaw-knowledge-system-template.git
cd openclaw-knowledge-system-templateCreate stream folders under:
research/knowledge-system/raw/<stream>/research/knowledge-system/compiled/<stream>/
Start with 1–3 streams for signal quality.
For each active stream/date:
- Add snapshots (notes, decisions, task exports, etc.)
- Update
SOURCES.mdwith required metadata:sourcecaptured_attagsconfidence
bash scripts/knowledge-compile.sh "$(date +%F)"Before answering non-trivial requests:
- Read
compiled/<stream>/overview.md - Read latest
compiled/<stream>/runs/<date>.md - Trace to raw
SOURCES.mdwhen confidence is low or conflicts appear - Only then synthesize response or plan
- Run Tue/Fri health checks (
docs/quality-gates.md) - Publish one weekly synthesis from
templates/weekly-synthesis.md - Track metrics in
docs/metrics.md
Before publishing or syncing outside your org:
bash scripts/sanitize-scan.sh .Then complete docs/sanitization-checklist.md and docs/public-redaction-policy.md review.
This repo is designed for public sharing. Keep it safe:
- No personal emails, phone numbers, IDs, or tokens
- No private org names unless already public
- No local machine paths (
/Users/...,/home/...) - No internal hostnames, ports, or private URLs
- No customer data, credentials, secrets, or proprietary prompts
See docs/sanitization-checklist.md for a pre-publish checklist.
research/knowledge-system/README.md– loop and cadenceresearch/knowledge-system/index.md– stream index and health checklistscripts/knowledge-compile.sh– sample ingestion/compile script (sanitized)scripts/sanitize-scan.sh– pre-publish quick sensitive-pattern scannerdocs/public-redaction-policy.md– what to strip/replace before publishingdocs/quality-gates.md– metadata, contradiction, freshness, lineage gatesdocs/maturity-model.md– L1→L5 adoption pathdocs/workflows.md– practical daily/weekly command flowsdocs/metrics.md– measurable ROI indicatorsdocs/anti-patterns.md– common failure modestemplates/weekly-synthesis.md– reusable weekly digest templateexamples/– sample raw, compiled, and weekly synthesis files
MIT (see LICENSE).
- Conceptual inspiration: Andrej Karpathy
- OpenClaw ecosystem and community: openclaw
- Peter Steinberger: @steipete
- Operational adaptation and template packaging: Digital Meld / OpenClaw workflow patterns