Dashboard › opencode › Distillation
5d4fc238-4d99-43d4-ba01-22dc0d460a33["lore_tm_v1_1hu2Rts0JjzORIH6QXPNTpKWPChbQkH0Nr2850H7lq8","lore_tm_v1_4uSiwRlczy6QwUvu5cs6TS29Myf__ukQrJZXhZ0292Y","lore_tm_v1_BZSGcf-1b_fZAx8T2CcMu3IyF_7W6lqSd6Lur5OJ9K4","lore_tm_v1_DvFYftEkD05M5fueadKhXFrk8TiOpfBY4rhZsEyL8Cw","lore_tm_v1_dWURJ_33WLwn2apR2TVaMMY3DODamSzhA8saM9nAEts","lore_tm_v1_M-Kog4g6O0KZgiDmZ1gGRkMAeoR12a_seEsW44wZ2AI","lore_tm_v1_Yi7xyiwrAgu57DUorhO_kwjUkaa1lhBpIE4hS2qCTCY","lore_tm_v1_JAXwdfKSSBbvXRdtMRyUSwBQHYBMiFMPLFt7C2iu3C8","lore_tm_v1_HAKSgiKsYBkwk7dxIQg60-h-RZ3NzLDhaGYlgZZz6T4","lore_tm_v1_8sgb5wBeKyH23wopivrlQesU0tqTUgxCuh2_eUjmex4","lore_tm_v1_hlNrjWqsg2FSTFwHtMc8dZbFSQcAeE7FOhgp8F56nbI"]
Date: September 9, 2026
/home/byk/Code/opencode-lore/AGENTS.md defines Lore as a three-tier memory architecture for AI coding agents, running on Node.js >= 22.5 and TypeScript with pnpm workspaces, using SQLite in WAL mode with FTS5 at ~/.local/share/lore/lore.db.@loreai/core at packages/core/, @loreai/gateway at packages/gateway/, @loreai/opencode at packages/opencode/, and @loreai/pi at packages/pi/. @loreai/core is shared by gateway, OpenCode, and Pi; gateway bundles core into one CJS file via esbuild, while the OpenCode package ships raw TypeScript.@loreai/opencode hooks into OpenCode through @opencode-ai/plugin.packages/core/src/temporal.ts; Tier 2 distillation in packages/core/src/distillation.ts, with segments capped at 16K tokens and meta-distillation after the gen-0 count exceeds 20; and Tier 3 gradient context management in packages/core/src/gradient.ts, using Layer 0 full passthrough, Layer 1 distilled prefix plus compressed raw content, Layer 2 aggressive tool-output stripping, and Layer 3 emergency compression.packages/core/src/ltm.ts uses categories decision, pattern, preference, architecture, and gotcha; fields are id (UUIDv7), project_id, category, title, content (maximum 1200 characters), confidence (0.0β1.0), and cross_project.packages/core/src/curator.ts; 2. regex-based Pattern Extraction in packages/core/src/pattern-extract.ts; 3. File Import in packages/core/src/agents-file.ts; 4. consolidate() in curator.ts when entry count exceeds maxEntries of 25..lore.md behavior uses <!-- lore:UUID --> markers; entries are sorted alphabetically by title within category; exportLoreFile() skips writes when the content hash is unchanged; importLoreFile() updates changed known UUIDs and creates unknown UUIDs; shouldImportLoreFile() performs an mtime check followed by content-hash comparison.packages/core/test/setup.ts and never the production DB.CHANGELOG.md; Sentry Craft handles both automatically through GitHub Actions.gh workflow run release.yml -f version=auto for conventional-commit-derived semver or gh workflow run release.yml -f version=0.23.0 for an explicit version.scripts/bump-version.sh updates all package.json versions; 2. generate the changelog from conventional commits; 3. create and push release/X.Y.Z; 4. CI tests and builds npm tarballs, standalone binaries, and delta patches; 5. Craft opens a publish issue and the Publish workflow runs once labeled accepted; 6. publish npm packages through OIDC trusted publishing and create the GitHub Release with binaries and patches.SYNCED_TABLES β packages/core/test/sync-registry-contract.test.ts; MIGRATIONS β the db.test.ts schema-version assertion plus migration-specific tests; AGENTS β agents.test.ts, requiring name, displayName, binary, and detect(), with binary as a constant placeholder string.enable/disable/push/pull boundaries.syncedColumns PRAGMA cache should be frozen so accidental mutation raises a TypeError in strict mode rather than silently corrupting cache state.db().query monkeypatches are shadowed by the tracing Proxy; SQL-counting tests must use log.registerSink({ withDbSpan }).pnpm test, pnpm run typecheck, pnpm run lint, and pnpm run format:check, checking exit codes; property tests must run Γ10; the working tree must finish unmodified and hash-verified; findings require per-point PASS / FAIL / CONCERN / MUST-FIX verdicts with file:line evidence and an overall MERGE / DO-NOT-MERGE verdict./home/byk/Code/opencode-lore contains both .jj/ and .git/, making it a colocated Jujutsu repository where mutations must use jj, not git.-i and --interactive, require -m "msg" for commit descriptions, require verification with jj st and jj log after mutations, prefer stable change IDs over commit IDs, and prohibit rebasing or describing immutable commits.jj never fails on conflict: conflicts are recorded in the resulting commit and must be detected with jj st and resolved by manually editing files, not by using interactive jj resolve.jj undo reverses the last operation, jj op log shows operation history, and jj op restore <op-id> rewinds repository state..lore.md; working-copy change ID ptswrqrr, commit 79e212d6, with no description; parent change ID uutomtup, commit 42911412, on main, described as fix(gateway): preserve large recall continuations (#1730).