oficina / docs Public

Sharing is specified in §8.2 and not built: private, granted, team, and a read-only link open

Taking this unless somebody is already on it — say so and I will drop it.

The gap

Docs' spec §8.2 describes sharing: team members see team documents, outside guests are granted a specific document and become guest members, link shares are a per-document capability, viewer or commenter, never editor.

None of it is built. The whole route set today is /signin, /auth/*, /documents, /documents/search, /d/{sqid} with stream, updates and the two exports, and /static/*. There is no /share, no /link, no grants table and no share template anywhere in the repo. §14's deliberately-not-built list does not mention sharing, so this is not a deferral — it is a specified feature with no implementation.

Sheets has its equivalent: grants, /share, /link, last-owner protection.

I checked the branches before filing: import-documents, formatting-and-export, search, mobile-chrome, reflow-320, plan7-r3, tighten-chrome, docs-finish, land-impeccable, agents-config-lock. None of them is sharing.

What I intend to build

The four states the product needs, which are suite ruling 15 and which §8.2 already anticipates:

| State | Rung | Who reaches it | |---|---|---| | Private | private | the author | | Shared with named people | granted | members and guests holding a grant | | Shared with the team | team | anyone with team standing | | Anyone with the link can read | a read-only capability on any rung | whoever holds the URL |

A link is not a rung. It is a capability that any rung may carry, and it is read-only — view, or comment where Docs grows that role. An "anyone with the link can edit" share is a link to sign-in that mints a guest grant, so the writer is always a named actor and version history never carries an anonymous row. That is Sheets ruling 12, adopted suite-wide as ruling 15.

Only the team rung is team-visible, which is what a same-team sibling may hold a copy of. A document that is private, granted, or reachable only by link is never team-visible — so making a link team-visible would turn "whoever I sent this URL to" into "everyone on the team, findable through memoria's search", which is a different grant than the one the sharer made.

Scriptless throughout, per §11's floor.

Order

  1. The rung on a document, and authorization deciding from it. No UI yet.
  2. Named grants, and the share page that makes them.
  3. Read-only links: mint, revoke, and the anonymous read path.
  4. The guest sign-in flow a grant implies.

Slice 1 is the one that matters, because every other slice is a way of writing to it.

Related

The suite doctrine (oficina/suite, revision 4) is what settles the model, and suite-amendment on this repo is the spec half of adopting it — it closes discussion 33 and adds §14a. That branch is spec only and changes no code. This thread is the code.