-
-
Why? follows the graph from a commitment to the change that set it and the note it came from, with every change since.
-
npm run graph opens store/kept.rl read-only: 13 nodes, 30 relationships, what waits on what, the change behind every value.
-
Waiting and owed are graph queries: a quantified path over BLOCKED_BY, and what each commitment holds up.
-
Paste a note; what it's read to say waits for review, the words it rests on highlighted. Nothing changes until you accept.
-
The private workspace is its own Relate store in the browser; a note goes to the cloud only after a preview of what is sent.
-
Lee confirmed the pricing: the proposal no longer waits, and its history shows why, read through the dependency.
Inspiration
"I'll send Dana the proposal Friday, once Lee confirms pricing." Two days later Lee's pricing slips; the next day Dana moves the date. The promise lives in three messages, and the questions that matter are about how they connect: what is due now, what is it waiting for, who is it waiting on, and which message changed it. That is a graph, not a list, and the connections are the context.
What it does
- Capture. Paste a note. A model reads it into proposals: a new commitment, a moved deadline, done, cancelled, or one commitment waiting for another. Nothing changes until you accept it. [C15]
- Connected context. Each commitment is linked to its owner, its recipient, the notes it was read from, every change ever proposed on it, and the commitments it waits for. [R6]
- Ask the graph. Five questions, answered by Cypher queries, not by a model: what do I owe by a date; which commitments are waiting on someone else; what do others owe me, and what each one holds up; what changed since we met; and why is this mine, with the full history. [R7]
- Explain itself. "Why?" shows the sentence a commitment came from with the evidence highlighted, every change since, and, read through the dependency, when the thing it waited for was done, so it no longer waits. [R7]
How it uses Relate
Mode: a single-file store in the repo, and a persistent store in the browser. [R2, R3]
| Where | Relate | Why |
|---|---|---|
| The app | @relate/relate-wasm in a dedicated worker, persisted to OPFS; one store per workspace |
Notes about real people stay in the browser; the demo and private data never share a store |
| The repo | store/kept.rl, a single-file store built by npm run seed-store through the app's own rules with @relate/relate |
Judges can open the graph without a browser |
| The tests | 219 tests against real stores, on the Node binding and on the WebAssembly build in headless Chromium | The rules are tested on the engine the app ships [R9] |
The model (docs/data-model.md): Person, Commitment, Note and Change nodes; OWES, TO, BLOCKED_BY, ON, FROM, NAMES, INVOLVES and ESTABLISHED_BY relationships. The commitment holds only accepted state; every proposal is a Change node; each current value points at the change that set it (ESTABLISHED_BY {field}). So:
- "Why is this mine?" follows
ESTABLISHED_BY {field: 'owner'}to the change and its note. - "Waiting on someone else" is a quantified path,
(c)-[:BLOCKED_BY]->+(b), that stops at done blockers. - A dependency that would loop is refused with
EXISTS { (b)-[:BLOCKED_BY]->+(c) }inside the same statement that writes it. - Rejecting a commitment others depend on is one statement: it unblocks each dependent with a change in its own history and removes the rest, so it commits whole or not at all. [R5, R8]
The graph in the repo (store/kept.rl): 13 nodes and 30 relationships, the demo scenario: Monday's promise, Wednesday's delay, Thursday's new date, one dependency between two commitments. [R4]
How we built it
- Relate WebAssembly 1.0.1 in a dedicated worker, plain JavaScript, Vite; Firebase AI Logic reads notes on the device (Gemini Nano in Chrome) or in the cloud. [R1, C5]
- Rules first: every write goes through functions in
src/model.jsthat re-check the state inside the statement, so a decision is never applied on top of state it did not see. - Running the whole suite on the WebAssembly build found one engine difference the Node binding hides: Cypher
randomUUID()traps in the browser build, because it has no clock. Ids are made in JavaScript now. [R10]
Challenges we ran into
- The browser build persists only from a dedicated worker, one handle per store. A second tab gets "storage locked"; the app says so instead of failing silently.
- Atomic multi-step changes without transactions in the browser build. The answer was to fold each decision into one Cypher statement with its guard inside.
- Models are confident when they are wrong. So the graph never takes a model's word: a reading becomes
Changenodes in stateproposed, and only the user's decision applies them.
Accomplishments that we're proud of
- The history is the graph: every answer can show the sentence, the decision and the time, including changes that follow from another commitment.
- 219 tests pass on both Relate engines. [R9]
What we learned
Putting decisions in the graph (a node per change, a pointer from each value to the change that set it) made the hard questions, "why" and "since when", into short traversals instead of bookkeeping.
What's next for Kept
Changes of owner or recipient; long notes with many commitments; matching people across workspaces.
Built With
- cypher
- firebase-ai-logic
- gemini-nano
- javascript
- node.js
- opfs
- playwright
- relate
- relate-wasm
- vite
- webassembly