Repository navigation
Open
Description
Kin: what to take from SPACES and Inkwell
Two of our earlier projects overlap with Kin:
- SPACES (GLDRoger/spaces) is a fork of Docmost with agents added as workspace members.
- Inkwell (GLDRoger/inkwell) is the hackathon notebook where agents write into live pages.
This issue proposes which of their ideas Kin should build, and asks @GLDRoger to confirm the list before any build work starts. Each item was checked against origin/kin at d3ce100d97.
Recommendation: rebuild the features in Kin, don't merge the repos
- Neither repo can be dropped into Kin. SPACES runs on NestJS, Postgres, Redis/BullMQ and Mantine. Inkwell is a single Hono process with in-memory locks and events, web only, and built around Meta's API. Kin uses Effect, SQLite and T3's own components on web, desktop and mobile. Merging either repo would leave a third stack to maintain.
- Licensing:
- Inkwell is MIT, so we can lift its code freely.
- SPACES is AGPL-3.0 (Docmost). Every commit since the fork began on 2026-10-14 is Nishchay's, so his own standalone files can be relicensed as MIT if he agrees in writing. Two things stay out of Kin either way:
- anything that imports or derives from Docmost code, such as
collaboration/services/page-timeline.service.ts; packages/base-formula, which is still under the Docmost Enterprise license.
- anything that imports or derives from Docmost code, such as
Kin already covers most of what these repos did
These need no import:
- Docs: section-hash agent edits, per-version attribution, diff and restore (
kin/work/docs.ts,docBody.ts). - Agent behaviour evals:
evals/mcp-tool-use/cases/kin.ndjsonandkin-owed.ndjson, 178 cases in all;- replay recorders for every provider (
apps/server/scripts/record-*-replay-fixture.ts,dev-replay-agent.ts).
- Budget:
- lead, worker and teammate units (
KinBudget.ts); - one daily figure per org, kept by owner decision (PLAN W1-3).
- lead, worker and teammate units (
- Cards that update themselves: task cards follow the worker thread (
TaskCardUpdater.ts), andKinRefreshHub.tsbatches bursts of changes. - "What changed" for leads: a lead's prompt carries only what changed since it last spoke (
work/workPrompt.ts). - Voice and routing: voice is W6-4, and routing to the right agent is W6-3.
Proposed: build these
Each one fills a real gap and is something the team would use every day.
| # | Feature | Gap in Kin today | Source to learn from | Fits |
|---|---|---|---|---|
| 1 | Replay real lead turns in CI. Record a real lead wake-up once with T3's existing recorder, then replay it through kin/lead in tests with no paid calls. |
The eval cases test tool choice. Nothing replays a whole lead turn: prompt, tools, memory writes and reply. | Inkwell server/demo/ shows the pattern: swap only the transport and keep the real runtime. Use T3's recorders, not Inkwell's code. |
Testing for every Kin PR. Cuts the cost of later paid eval runs. |
| 2 | Undo this wake-up. One tap reverts everything a single wake-up changed, across memory, docs and Work. It refuses, and says why, when someone changed the same item after the lead did. | The owner can undo memory items one at a time (KinMemoryChangeCard, MemoryWriter.ts:221) and restore docs one at a time. Nothing undoes a whole turn. |
SPACES spaces/undo/preservation-proof.ts, safe-undo.service.ts, and their test cases. Read for the design; copy the code only if it is relicensed. |
Extend KinMemoryChangeCard. Daily trust in leads. |
| 3 | Pinned live cards. A card pinned to a chat header shows a value computed on every read, for example a project's open and done Work entries, or the time left to a due date or deferral. | Cards update only for tasks. Nothing can be pinned, and charts are snapshots. DESIGN §7 promises pinned live widgets. | Inkwell server/widgets.ts, for the idea: derived values, recomputed when sources change. Kin computes them on read instead, the same way it computes project health. |
Native card registry and chat header. No Money totals in groups: amounts are owner-only and sensitive. |
| 4 | Since you last looked. Opening a doc, project or Work entry shows one line, such as "Tech lead edited 2 sections, closed W-14", which expands into diffs. | Leads get this already (workPrompt.ts). People get unread counts in chats, but no "last seen" for docs or Work. |
Inkwell src/client/map/greeting.ts |
An add-on to W6-2 (digests). Uses kinDocChanges.ts and pulse/. |
Suggested order: 1 → 2 → 3 → 4. Item 1 is small and makes the other three safer to change. Item 2 is the one owners will feel most. None of them should jump ahead of W0–W5 (the milestone where the owner and the first teammate use Kin daily). Each item becomes its own task, with a done-when line, once it is placed in the PLAN.
References for planned work
- Gated exits. SPACES
spaces/policy/model-exit.service.tsrecords intent before each outbound call and never retries an unknown outcome. Reference for W7-4 and the secrets gateway in DESIGN §13. - Hostile-member trials. SPACES
spaces/qualification/is an acceptance harness for trials. Reference for the W5-5 checklist. - Friction reports. SPACES
core/friction/lets an agent record what got in its way, and the reports are rolled up. This could feed dreams and the weekly brief. Small, but not in the PLAN. - Photo to Work. Inkwell
media/photo.tsandboxes.tsturn a photo of a whiteboard or sticky notes into separate notes. In Kin it would make draft Work entries the owner confirms. Belongs with W6-4 (images).
Proposed: skip
- The map, footprints, walkers, pen gestures and lenses.
- They're canvas-first and animate continuously, against T3's "no repainting animations" rule.
- They don't work on a phone.
- SPACES' own reviews made the map optional.
kin_visualand the Work screen already answer "show me where things stand".
- Live co-editing of pages with Yjs and Tiptap, unless question 2 says otherwise. It's the core of both repos and a large surface on every client. Kin docs are written by agents and edited by section; people read, diff and restore them.
- "Keep a doc updated" on a schedule (SPACES
spaces/maintenance/). SPACES never turned it on (STEP1_RELEASE_BLOCK), and W4-3 delivers documents as PRs. Revisit after W4-3. - Docmost's wiki features, bring-your-own-key in the browser, Meta's model layer, and Muse Image covers. Kin's orgs, chats and the host's keys cover these, and image generation stays a §13 idea.
Questions for @GLDRoger
- Where do items 1–4 go? Place them in W5 and W6, or keep them out of the PLAN for now?
- Should people edit docs in Kin? Today they read, diff and restore. If W4-3 deliverables (launch plans, marketing copy) should be edited in Kin rather than through a PR, co-editing moves up from "skip". SPACES' rule was "edits land freely; history makes them safe".
- Should each lead have its own spend cap? W1-3 keeps one daily figure per org. SPACES reserved the cost of every model call against org, agent and page caps (
spaces/admission/spend-reservation.service.ts). Revisit it with the teammate-cost decision due before W5-5, or leave it? - Will you relicense your own SPACES files under MIT? That lets us copy
preservation-proof.tsandpublished-price.tsinstead of rewriting them. After that, should SPACES be archived?
Metadata
Metadata
Assignees
Labels
No labels
Activity
GLDRoger commentedon Nov 16, 2026
Ein commenting on Nishchay’s behalf.
@Surajsm60720 Nishchay and I have now aligned on the intended scope. This proposal misses the main reason for bringing Spaces/Inkwell into Kin: the spatial workspace itself is the core feature, not something to skip.
What to bring into Kin
How to approach it
Please use Inkwell interactively before revising the plan: move around the canvas, open pages, inspect its widgets, and return to its change/attention surfaces. Compare the corresponding Spaces experience as well. The goal is to preserve the useful product experience, not necessarily its current implementation.
A wholesale repository merge is not required. Adapting or rebuilding the selected features on Kin’s stack is fine. Phone usability and performance constraints should shape controls, rendering and presentation, not be used to remove the core canvas experience. An interaction-driven pan/zoom surface is not the same requirement as continuous ambient animation.
CI replay and whole-wake undo may be useful supporting work, but they are not the requested outcome and should not displace it. Please revise this issue’s scope and priorities around canvas → live widgets → return/attention experience, with clear acceptance criteria and any actual design tradeoffs called out. Keep unrelated imports and optional visual flourishes separate.
Surajsm60720 commentedon Nov 16, 2026
@GLDRoger, Ein: agreed, and thanks. The canvas is the feature. I've now used the live Inkwell app (the recorded demo plus my own notebook, on desktop and at phone width) and read SPACES' architecture. Below is what I learned and the scope I'd revise this issue to. I'd like your go-ahead on it before the issue body is rewritten.
Nothing was built or changed. I sent no agent requests to the live app, so no API spend.
What Inkwell gets right
The canvas isn't a picture of the work. It's where you delegate the work and watch it get done. Every agent action leaves a visible mark on a place you can return to.
/?focus=<id>).How this maps onto Kin
TaskCardUpdateralready tracks workers)KinRefreshHubWhat SPACES' architecture contributes
We reuse its designs, not its code. Most of its guarantees live in Postgres (triggers, repeatable-read snapshots, advisory locks), BullMQ and Redis, and Nest. It's also AGPL. Even files only Nishchay wrote import Docmost code (for example
space-map.repo.ts→PagePermissionRepo). Inkwell's map code is the better source for the canvas itself.Worth adopting:
core/space-map/space-map.service.ts,space-map.repo.ts). Kin needs the same: one canvas read filtered by Kin's viewer rules, so a member never sees a money or private card or its edges.by/wakeupId/chatIdper version, so "what agents changed" and "since you last looked" come from versions newer than the person's cursor, grouped by actor. That's cheap, and it needs no Yjs update log.spaces/inbox/). Each has one primary action, links to the exact card, run or revision, and clears itself when its condition clears. Dismiss and snooze are per person. It would build on Kin's Waiting on you and pulse, keyed to cards so the canvas can highlight them.agent-run-access.service.ts). This is Kin's provenance ceiling, applied to each canvas write.space-map/model.ts: buckets, glow, trails). It shows where agents went without a stored animation.Not worth adopting:
Proposed scope: canvas → live widgets → return and attention
1. Canvas (web, desktop and mobile)
2. Live, source-linked widgets
3. Return and attention, plus agent activity
Kept separate: CI replay, undo for a whole wake-up, photo to Work, covers, pen link and strike gestures, and walkers and footprints.
Design trade-offs to decide
packages/client-runtime.canvastopic onKinRefreshHubfor card changes, plus a separate short-lived presence stream for agent position, so nothing is polled and it works over Tailscale and the tunnel.If this scope works for you, I'll rewrite the issue body to match.
Surajsm60720 commentedon Nov 18, 2026
The canvas from this scope is up for review in #496. It covers the first three steps we agreed:
I tested it in an isolated seeded Kin, on web as the owner, co-owner and members, and on the iOS simulator. Screenshots are in the PR. @GLDRoger, Ein: a review when you have time.
🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 23, 2026
@GLDRoger, Ein: an update on the canvas, after talking it through with Nishchay. It is narrower than the 16 Nov scope, on purpose, and #496 now holds this version.
What we agreed: the canvas is a calm, well-designed view of what's being worked on, the way Inkwell shows its pages. Zooming into a doc opens it inside Kin. It doesn't get its own page in the tab bar, because the iOS tab bar is already full.
What it is now: a second view of Docs, List | Map. On web, List | Map sits in the Docs header. On the phone, it's a Map button in the Docs toolbar. There's no sixth tab, server code, stream or migration.
Taken from Inkwell
KinRecord.working) is marked on its card and its area.Left out from the 16 Nov scope
SPACES
Nothing from SPACES is in this change. The SPACES items in the issue body (agents as workspace members, docs) stand as written.
Nishchay's three questions on #496
The #496 findings
A fresh review model also went over the rework. It found eight problems; seven are fixed and the eighth checked out in the browser. Among the fixes: switching views blanked the map, a failed read showed nothing, the phone read every doc body at the closest zoom, and the Map sent reads for screens the viewer can't open.
If this narrower scope matches what you both want, I'll rewrite the issue body to match.
🤖 Generated with Claude Code