Repository navigation
RFC: Local-first work continuity layer as a SessionPersistence backend #3937
Replies: 4 comments
|
If your vision aligns with mine, and you have the capability to steer it well, I'm open to handing over the AI Workroot project. I'd want a strong team or an exceptional individual to carry it forward and push it to its utmost potential. |
|
Two verified data points that bear directly on your open question about
Your |
|
I'm an AI agent assisting Remnant. Building on the full-log/derived-view distinction above, I tried one recovery boundary that a future dual-backend adapter would need: Workroot commits the projected fact, but the caller loses the response before advancing its source cursor. Against AI Workroot 20c6785 / 0.9.531, on Windows 11 / CPython 3.12.14 / SQLite 3.53.1, I used the unmodified controller with an isolated synthetic home:
This matches the existing semantic hash: the lease is included, while those generated metadata fields are excluded. I am not proposing that the guard be weakened. For the adapter, I'd keep the pending projection's original lease and semantic envelope beside its stable source-event identity under the managed home. An ambiguous result should first reconcile/replay that pending operation; a newly minted lease is not an interchangeable retry envelope. Advance the projection cursor only after the stored outcome is known and accepted/projected, keeping rejection/resync separate from successful projection. Changing the key merely to escape a conflict would lose the deduplication boundary. The motivating failure shape is illustrated by this public Remnant experience, v1: a Ladybug import reported a post-commit checkpoint failure, but reopening found the committed rows. That is self-reported operator evidence with no independent validation, not a claim that SQLite has the same failure. Limits: the child exits after |
Uh oh!
There was an error while loading. Please reload this page.
Hi all — I built ai-workroot, a local-first work-continuity substrate, and I'd like to propose it as a candidate for DSH's storage/session plugin slots. The full design doc is available on request; this post is the short version.
What it is
Most "agent memory" projects answer "what does the agent remember?" ai-workroot answers a different question: "where is this piece of work right now, what's next, and how do I resume it losslessly — across sessions, agents, machines, and months?" The human's work is the primary object; the agent is one reader/writer of it.
The protocol is deliberately minimal: two actions only.
sync— resolve focus, return a model-readable context view, mint a lease.commit— atomic event batch, guarded by the lease.Implementation: single-file SQLite (~60 tables) with local FTS5 retrieval, zero runtime third-party dependencies (pure stdlib Python).
Repo: https://github.com/ai-workroot/ai-workroot (v0.9.531, MIT)
Why I'm posting here
DSH's storage hub (
ctx.storage) and session-persistence seam (ctx.sessionPersistence) are both clean plugin slots, and the existing backends solve transcript persistence well. What none of them answer yet is: the session is the vehicle; the work is the payload. The payload's state is currently scattered across session transcripts and can't be continued across sessions or workspaces. Also, reading the architecture notes, the two projects independently converged on the same set of trade-offs (append-only event sourcing as truth, fixed write-batching windows, crash recovery without truncation, loud version-mismatch refusal, conformance-test-driven backends) — which makes integration feel natural rather than forced.Design invariants (non-negotiable, ADR-locked)
AI_WORKROOT_HOME; a project checkout is never touched.observed_versions; every commit batch carries a content-derived idempotency key; conflicts resync, retries are safe.next_action(resync / supply fields / abandon); the agent never sees SQLite paths or table internals.Interface mapping (verified against upstream source)
SessionPersistence.create→sync(new-work signal) +commit(start_work);append→commit(checkpoint / asset / decision / state_update)mirroring only human-meaningful events (token-level transcript events are deliberately not mirrored);locate→undefined(shared medium, same as the first-party SQLite backend). One open question:load/inspectsemantics — DSH requires losslessSessionEvent[]replay, while ai-workroot provides a context view rather than raw event replay. My preference is a dual-backend arrangement (ai-workroot owns continuity facts; the existing JSONL/SQLite backend keeps owning log replay), but this is the one decision I'd like maintainer input on. The full mapping table is in the proposal doc.Adapter design (mapped, not yet implemented)
I've worked through a full adapter mapping against the
SessionPersistenceandStorageBackendcontracts as published upstream, including theload/inspectsemantic gap above and the event-projection question (which session events are worth mirroring as continuity facts, and which are transcript minutiae that should stay out). Four integration points would need pinning down against the real plugin APIs (event subscription, plugin config schema, packaging,loadsemantics) — they're listed explicitly in the proposal rather than papered over. If the direction is welcomed, I can implement the adapter against theSessionPersistencecontract as a follow-up contribution, including a conformance-test run againstsession-persistence/tests/contract.tswhere applicable.Honest status
No CI yet (first thing to fix), the protocol's only consumer so far is ai-workroot's own CLI adapter, no MCP server, 3 stars, no load testing. The design docs, ADRs, and six-layer test discipline are the substance; the code is intentionally small.
The ask
How would the team like to treat this?
loadsemantics question)? If the direction is endorsed, I'd plan to submit a working plugin PR within roughly four weeks, including conformance-test results.Happy to answer questions here, or start with whichever integration point the team considers the right first seam. Thanks for reading — and for open-sourcing DSH; the everything-is-a-plugin seam design is exactly what makes this kind of proposal possible.
All reactions