Inspiration
Coding agents can do hours of useful work and still forget an important project decision the next day. The usual workaround is one large memory file, but it becomes slow to load, easy to truncate, and difficult to reuse safely across projects.
I wanted developer memory to behave like a trustworthy local tool: durable, searchable, inspectable, and private by default.
## What it does
DreamBaku is an offline-first developer memory system exposed through the baku CLI.
It stores one durable fact per canonical Markdown file in project-specific and curated global tiers. It builds a replaceable local PGlite index that combines PostgreSQL full-text search, Unicode literal matching, exact slug and alias matching, and optional local BGE-M3 vector retrieval using reciprocal-rank fusion.
Users can:
- initialize an owner-bound memory workspace;
- add validated project memories;
- search project and global knowledge together;
- inspect the complete source Markdown;
- promote reusable knowledge deliberately;
- preview, approve, apply, and safely undo memory consolidation.
Markdown remains the source of truth. The database and vectors are always rebuildable.
## How we built it
DreamBaku is written in strict TypeScript for Node.js with a hexagonal architecture. Feature modules access PGlite, the filesystem, local embeddings, and optional remote consolidation through a single adapter composition root.
Codex with GPT-5.6 was the primary development environment during OpenAI Build Week. It helped plan bounded implementation stories, trace callers before edits, implement recovery paths, review changes adversarially, diagnose CI failures, and verify the exact npm package.
DreamBaku existed before Build Week. During the official submission period, it was meaningfully extended with:
- exact consolidation apply with durable crash recovery;
- conflict-safe consolidation undo;
- faster verification and reuse of valid semantic vectors;
- a smaller and more coherent public CLI surface;
- Node.js 22 and 24 CI;
- packed-install, audit, performance, and uninstall evidence;
- dependency and supply-chain hardening;
- the public
[email protected]npm release.
The eligible changes are documented here:
GPT-5.6 helped build and review the project through Codex; it is not a hidden runtime dependency. Normal keyword recall remains offline, local semantic recall uses a pinned BGE-M3 model, and optional remote consolidation requires explicit configuration and consent.
## Challenges we ran into
The hardest problem was authority rather than retrieval quality.
A database is fast, but it should not become the only copy of a user's memory. An LLM can suggest useful consolidation, but it should not receive implicit permission to rewrite durable knowledge. A multi-file edit can be recoverable, but it cannot honestly be described as atomic.
DreamBaku addresses these problems by separating:
- canonical Markdown from rebuildable indexes;
- proposal generation from mutation;
- exact approval from execution;
- apply from conflict-safe undo.
Packaging local AI was another challenge. We had to verify the actual npm artifact, native dependency scripts, model identity, consumer dependency graph, Node.js compatibility, and preservation of user data after uninstall.
## Accomplishments that we're proud of
- Published
[email protected]as a working npm package. - Preserved an offline, no-download keyword-recall path.
- Added optional verified local semantic retrieval.
- Made consolidation explicit, recoverable, and reversible.
- Kept remote egress separately configured and consent-gated.
- Built executable release evidence instead of relying on a prose checklist.
- Released the project publicly under Apache-2.0.
## What we learned
Trustworthy AI tooling needs strong boundaries around authority and evidence, not only a capable model.
Local-first does not merely mean running a model locally. It means users can inspect their durable data, rebuild derived state, understand every external transmission, and recover safely when an operation is interrupted.
Codex and GPT-5.6 were most valuable as an iterative engineering partner: planning, implementation, review, debugging, and verification remained connected instead of becoming separate handoffs.
## What's next for DreamBaku
Next releases will focus on evidence-backed improvements:
- expand the supported platform matrix after real platform testing;
- simplify installation without weakening dependency policy;
- improve local semantic acquisition where measurements justify it;
- make the CLI easier for coding agents to invoke deliberately.
Hosted memory, silent egress, and autonomous mutation will remain outside the product unless a concrete user need justifies changing those boundaries.
Built With
- bge-m3
- codex
- commander.js
- gpt-5.6
- node.js
- pglite
- pgvector
- postgresql
- rrf
- transformers.js
- typescript
- vitest
- zod
Log in or sign up for Devpost to join the conversation.