Frame Codex
Frame Codex at frame.dev - The best and most optimized collection of humanity's knowledge and research, designed for both AI consumption and human exploration.
The OS for humans, the codex of humanity.
Browse • Documentation • Contributing • Changelog • Security • Discord
AI Infrastructure for Superintelligence.
Overview
Frame Codex is a data-only knowledge repository designed as the canonical source of structured information for AI systems and humans alike. At frame.dev/codex, Frame Codex offers the best and most optimized collection of humanity's knowledge and research - curated for both AI consumption (LLM ingestion, semantic search) and human exploration (beautiful UI, discovery).
This repository contains:
- Pure content - Weaves (top-level directories), looms (any folder inside a weave), threads (markdown files), tags, and schemas
- Markdown-only - The primary source of truth (OpenQuarry ingests any file type and serializes to markdown)
- No UI - The viewer interface lives at frame.dev/codex
- LLM-optimized - Structured for knowledge graph ingestion by OpenQuarry and other AI systems
- AI + Human Friendly - YAML frontmatter, semantic embeddings, and beautiful rendering for optimal consumption by both machines and people
📚 Browse the knowledge weaves: All content is organized in the /weaves directory.
Frame Codex and OpenQuarry
- Frame Codex: Public markdown knowledge repository (this repo) - read-only, curated, version-controlled
- OpenQuarry: the open format these notes follow, with schemas for weaves, looms and threads in schema/; the Quarry app at quarry.space reads and writes it
Schema: Frame Codex follows the OpenQuarry format for weaves, looms, and threads. Looms are now inferred from folders (no looms/ or strands/ prefixes required) and threads are any markdown files within a weave.
Thread frontmatter now supports both extractiveSummary (deterministic NLP) and aiSummary (LLM) fields, plus a notes array for short bullet annotations that surface inside the Frame.dev viewer.
🔄 Automated Indexing Workflow
Frame Codex uses a hybrid NLP + LLM approach with smart caching and manual override options:
Static NLP Tools (Always On, No API Keys Required)
- TF-IDF Analysis - Extracts keywords based on term frequency and inverse document frequency
- N-gram Extraction - Identifies multi-word phrases and technical terms
- Vocabulary Matching - Auto-tags content using controlled vocabulary from
tags/index.yaml
- Schema Validation - Ensures compliance with OpenQuarry schema (weave/loom/strand structure with organic folders)
- Duplicate Detection - Catches near-duplicate content using fuzzy matching
- Content Quality - Minimum length, forbidden patterns (lorem ipsum, TODO)
Optional LLM Enhancement (API Key Required)
No workflow calls a model on a PR unless someone labels it ai-enhance. With a model key set, one runs in these places:
- Block Tags and Summaries -
ai-enhance-blocks.yml refines the block tags and summaries in weaves/, by hand (one PR from ci/ai-enhance-blocks) or on a PR from this repository's own branch labelled ai-enhance, and stops when its spend reaches its max_cost input (5.00 US dollars when left out)
- Inbox Categorization -
auto-categorize-inbox.yml asks a model first (ANTHROPIC_API_KEY, then OPENAI_API_KEY) where to file each note pushed to master under weaves/inbox/, with no cost cap, and uses static NLP when neither key is set
- Quality Analysis -
npm run ai-enhance -- --files "<file>" (scripts/ai-enhance.js) runs on your machine with OPENAI_API_KEY or ANTHROPIC_API_KEY: a quality score and completeness, and suggested metadata, tags, difficulty and structure; AI_PROVIDER=disabled skips the model
GitHub Actions Workflows
graph TD
A[PR into master] --> B[Test Suite and rename-guard]
B -->|Fail| C[Cannot merge]
B -->|Pass| D[Review comments read, answered and resolved]
D --> E[Labelled landing]
E --> F[Merged into master]
F -->|weaves/, scripts/ or schema/ changed| G[Build and Publish Codex Index]
G --> H[PR from ci/codex-index]
H -->|Its checks pass| E
Workflows:
.github/workflows/auto-index.yml - Builds the index (static NLP) when a push changes weaves/, scripts/ or schema/, and on master opens or updates one PR from ci/codex-index with it, opened with FRAMERS_BUMP_TOKEN so its checks run; master is protected, so nothing pushes the index there
.github/workflows/auto-categorize-inbox.yml - Moves inbox files to their suggested place in a PR, labelled landing at 70 percent confidence or more
.github/workflows/landing-follows-the-base.yml - Takes the landing label off a PR whose base changes, since its guards ran against the old base
.github/workflows/changelog.yml - Weekly history of the commits and of the issues and PRs (git + GitHub API) in codex-history/, through one PR from ci/changelog opened with FRAMERS_BUMP_TOKEN so its checks run
.github/workflows/ai-enhance-blocks.yml - Refines block tags with a model, by hand (one PR from ci/ai-enhance-blocks) or on a PR labelled ai-enhance (one commit pushed to that PR), both with FRAMERS_BUMP_TOKEN so the checks run
.github/workflows/test.yml - Runs validation suite (no API keys)
.github/workflows/bump-framers-deps.yml - Weekly pull request that moves the @framers/* dependencies to their newest npm versions, opened with FRAMERS_BUMP_TOKEN so its checks run
.github/workflows/landing-follows-the-bump-checks.yml - Labels the PRs the bump, the index publish, the changelog and the AI block enhancement open landing once a PR's Test Suite and rename-guard pass on its head, and keeps the label off a head they have not passed
Manual Overrides & Controls
You have full control over automation:
# In the environment of the scripts you run; no workflow reads these
SQL_CACHE_DISABLED=true # Force full re-index (bypass cache)
AI_PROVIDER=disabled # Call no model
No workflow merges a pull request or turns on GitHub's auto-merge: a PR is merged after its reviews and comments are read, fixed or answered and its threads resolved. A workflow whose checks and guards pass adds the landing label and one comment instead. The re-catalog script does the same for its PR when AUTO_CATALOG_LAND=true is in its environment (see docs/RECATALOG_GUIDE.md).
Per-file overrides (in frontmatter):
---
skip_ai: true # Exclude this file from AI analysis
skip_index: true # Don't include in search index
manual_tags: true # Don't auto-suggest tags
---
Gitignore patterns: Add paths to .gitignore or scripts/auto-index.js → IGNORED_PATTERNS array.
🏷️ Block Tagging
Frame Codex supports block-level tagging for granular content discovery. Every paragraph, heading, code block, and list can have associated tags.
Inline Tags (Recommended)
Add tags directly in your markdown using #hashtag syntax:
This section covers React hooks for state management. #react #hooks #frontend
## Custom Hooks #advanced
Building reusable hooks is essential for #clean-code and #maintainability.
Rules:
- Must start with a letter:
#react ✓, #123 ✗
- Can contain letters, numbers, hyphens, underscores, slashes:
#web/javascript ✓
- Case-insensitive (normalized to lowercase):
#React → react
- Reserved patterns skipped:
#h1 - #h6 (markdown headings)
Inline tags get 100% confidence and always appear in the final index.
Automatic NLP Tags
In addition to inline tags, the Codex pipeline automatically suggests tags using:
- Vocabulary Matching - From
tags/index.yaml controlled vocabulary
- TF-IDF Extraction - Statistically significant terms
- Document Propagation - Inherits relevant tags from document metadata
Suggested tags with ≥50% confidence are auto-confirmed during index build.
Tag Sources & Colors
| Source |
Confidence |
Color |
Description |
inline |
100% |
Blue |
Explicit #hashtag in content |
user |
100% |
Emerald |
Manually confirmed by contributor |
nlp |
30-85% |
Cyan |
Vocabulary + TF-IDF extraction |
llm |
50-95% |
Violet |
AI-suggested (optional) |
existing |
35-75% |
Emerald |
Propagated from document tags |
CLI Commands
# Process blocks and calculate worthiness
node scripts/block-processor.js --all
# Build the blocks index (includes auto-confirm)
npm run build:index
# View block stats
cat codex-blocks.json | jq '.stats'
See HYBRID_TAGGING_DATAFLOW.md for complete architecture.
Architecture
The Codex uses the OpenQuarry four-tier knowledge hierarchy:
- Fabric - Collection of weaves (Frame Codex itself is a fabric containing multiple knowledge universes)
- Weave - Complete knowledge universe with no cross-weave dependencies (e.g.,
weaves/technology/, weaves/science/)
- Loom - Any subdirectory inside a weave, curated collection of related threads (topic/module, auto-detected from folder structure)
- Thread - Atomic knowledge unit (individual markdown file at any depth within its weave)
SQL Cache Layer
Frame Codex uses @framers/sql-storage-adapter for intelligent caching:
CI/GitHub Actions (better-sqlite3):
- Stores file metadata, SHA hashes, and analysis results in
.cache/codex.db
- Only re-processes files that have changed (SHA comparison)
- Reduces indexing time from ~30s to ~2-5s on typical PRs (85-95% speedup)
- Cache persists across workflow runs via GitHub Actions cache
Browser (IndexedDB via Frame.dev Codex UI):
- Caches fetched Codex threads locally for faster reloads
- SQL-backed cache lives entirely in your browser (IndexedDB/sql.js), never on Frame.dev servers
- No secrets or tokens are ever stored in this cache—only public markdown content
- Quota: 50MB–1GB+ depending on browser
Performance:
- First run: ~30s (full analysis, populates cache)
- Subsequent runs: ~2-5s (diff only, 85-95% cache hit rate)
- Storage: ~500KB-2MB for 100 files
Configuration:
SQL_CACHE_DISABLED=true # Disable SQL caching (falls back to full indexing)
Search Data (BM25 + Semantic Embeddings)
After building the main index, generate the search artifacts consumed by frame.dev/codex:
npm run index # builds codex-index.json
npm run build:search # builds codex-search.json (BM25 + MiniLM embeddings)
codex-search.json contains:
- BM25 postings for every token of each thread's whole text, read from its file (term frequency per thread)
- Document metadata (path, title, summary, weave/loom, doc length)
- Packed Float32 embeddings (MiniLM-L6-v2, mean pooled, normalized) stored as base64
These assets are completely static, so they can be hosted on GitHub Pages or any CDN. Frame.dev downloads them once and performs all ranking + semantic re-ranking in the browser (no server calls, no API keys).
Repository Structure