AGENTS.md
packages/core/AGENTS.mdAGENTS.md
Quality
62/100
Scores the file, not the repository.Length
228 words
6 headings · 1 code blocksRepository
0
— · pushed 32 days agoLast changed
3 days ago
First indexed 3 days ago.1# @second-brain/core — Agent Instructions23Knowledge graph engine. SQLite + Drizzle ORM + FTS5 + sqlite-vec.45## Entry Point67`src/brain.ts` → `Brain` class — the single facade for all operations.89## Key Classes1011| Class | File | Responsibility |12|-------|------|---------------|13| `Brain` | `src/brain.ts` | Top-level facade wrapping all managers |14| `EntityManager` | `src/storage/` | CRUD for entities (ULID generation) |15| `RelationManager` | `src/storage/` | CRUD for relations (ULID generation) |16| `GraphTraversal` | `src/graph/` | Path-finding, neighborhoods, connected components |17| `SearchEngine` | `src/search/` | FTS5 full-text + sqlite-vec vector search |18| `BitemporalQueries` | `src/temporal/` | Point-in-time and history queries |19| `DecayEngine` | `src/temporal/` | Confidence decay (read-side only) |20| `ContradictionDetector` | `src/temporal/` | Finds contradicting observations |21| `EmbeddingStore` | `src/embeddings/` | Optional vector storage |2223## Schema2425Drizzle schema: `src/schema/entities.ts`26SQLite initializer: `src/storage/schema-init.ts`2728## Architecture Decisions2930- **Confidence decay is read-side only** — never mutate stored values31- **FTS5 triggers auto-maintain `entities_fts`** — never write to it directly32- **Relations have unique constraint** on `(sourceId, targetId, type)`33- **`batchUpsert`** merges observations/tags on conflict34- **Vector search is opt-in** — pass `embeddingDimensions` to Brain constructor35- **Sync never touches `'personal'` namespace**36- **Session namespaces** use `'session:<id>'` prefix3738## Testing3940```bash41pnpm test # Run all core tests42```4344Tests use in-memory SQLite (`:memory:`). Instantiate `Brain` directly — no HTTP layer.45
Also in thangaram611/second-brain
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| thangaram611/second-brain.clinerules/01-project.md · 0 | Cline rules | setuptestmonorepodo-not | 65/100 | 3 days ago | |
| thangaram611/second-brain.clinerules/02-conventions.md · 0 | Cline rules | teststyledo-not | 40/100 | 3 days ago | |
| thangaram611/second-brain.clinerules/03-backend.md · 0 | Cline rules | styledatabase | 37/100 | 3 days ago | |
| thangaram611/second-brain.clinerules/04-frontend.md · 0 | Cline rules | style | 28/100 | 3 days ago | |
| thangaram611/second-brain.clinerules/05-testing.md · 0 | Cline rules | testdo-not | 35/100 | 3 days ago | |
| thangaram611/second-brain.clinerules/06-data-model.md · 0 | Cline rules | types | 25/100 | 3 days ago | |
| thangaram611/second-brain.cursor/rules/backend.mdc · 0 | Cursor rules | do-not | 31/100 | 3 days ago | |
| thangaram611/second-brain.cursor/rules/data-model.mdc · 0 | Cursor rules | types | 30/100 | 3 days ago | |
| thangaram611/second-brain.cursor/rules/frontend.mdc · 0 | Cursor rules | do-not | 31/100 | 3 days ago | |
| thangaram611/second-brain.cursor/rules/project.mdc · 0 | Cursor rules | testdo-notagent-behaviour | 50/100 | 3 days ago | |
| thangaram611/second-brain.cursor/rules/testing.mdc · 0 | Cursor rules | testdo-not | 27/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago | |
| thangaram611/second-brain.windsurfrules · 0 | Windsurf rules | setupteststylearch+4 | 75/100 | 3 days ago | |
| thangaram611/second-brainAGENTS.md · 0 | AGENTS.md | setupteststyletypes+3 | 74/100 | 3 days ago | |
| thangaram611/second-brainCLAUDE.md · 0 | CLAUDE.md | agent-behaviour | 16/100 | 3 days ago | |
| thangaram611/second-brainapps/relay/AGENTS.md · 0 | AGENTS.md | monorepoagent-behaviour | 33/100 | 3 days ago | |
| thangaram611/second-brainapps/server/AGENTS.md · 0 | AGENTS.md | styleapimonorepoagent-behaviour | 56/100 | 3 days ago | |
| thangaram611/second-brainapps/ui/AGENTS.md · 0 | AGENTS.md | styleuimonorepoagent-behaviour | 56/100 | 3 days ago | |
| thangaram611/second-brainpackages/collectors/AGENTS.md · 0 | AGENTS.md | agent-behaviour | 52/100 | 3 days ago | |
| thangaram611/second-brainpackages/ingestion/AGENTS.md · 0 | AGENTS.md | styleagent-behaviour | 48/100 | 3 days ago |
Diff against .clinerules/01-project.md Diff against .clinerules/02-conventions.md Diff against .clinerules/03-backend.md Diff against .clinerules/04-frontend.md Diff against .clinerules/05-testing.md Diff against .clinerules/06-data-model.md Diff against .cursor/rules/backend.mdc Diff against .cursor/rules/data-model.mdc Diff against .cursor/rules/frontend.mdc Diff against .cursor/rules/project.mdc Diff against .cursor/rules/testing.mdc Diff against .github/copilot-instructions.md Diff against .windsurfrules Diff against AGENTS.md Diff against CLAUDE.md Diff against apps/relay/AGENTS.md Diff against apps/server/AGENTS.md Diff against apps/ui/AGENTS.md Diff against packages/collectors/AGENTS.md Diff against packages/ingestion/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago |
