Skip to content

docs: organizations, an entry point for operators and people, and a manual that matches the code - #2908

Merged
AbirAbbas merged 9 commits into
org/mainfrom
org/docs
Nov 25, 2026
Merged

AbirAbbas merged 9 commits into
org/mainfrom
org/docs

Conversation

@AbirAbbas

@AbirAbbas AbirAbbas commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Documentation for the organization feature, for two readers: the operator who self-hosts one, and a person who joins one. Draft, into org/main; nothing goes to dev.

What changed

  • docs/organizations.md (new): the entry point. What an organization is, what runs where (text diagram), the trust model, sharing and verbs, bots, the hosting policy, the limits that are still open, and a ten-minute path (Compose up, claim, invite, first hosted chat). Linked from README.md and docs/README.md.
  • deploy/org/README.md: made correct end to end against compose.yaml, the scripts and the code (services table with the sessionhost and gitstub profiles, six volumes, two networks, loopback trust on a team server, Invite someone, sessionhost idle and user-number settings, published image not found, .env is not git-ignored, owner stop and delete, Railway service count, --no-build advice). Adds a Contents list.
  • Manual (internal/manual/chat/): sentences that became false are fixed (see the second commit message), and new ## sections answer "can my admin read my chats", "who pays for a shared chat", "how do I join my company's codeaf", "does the organization's window run on my laptop", the server-down case, a teammate sending messages while the owner has the chat open, and "how do I host one". Seventeen probes in internal/manual/chat_test.go keep those questions reaching those pages.
  • Change entry under docs/changes/unreleased/.

False claims removed

  • A chat moved into a shared workstream no longer "appears in the workstream's list": it stays as private as it was.
  • "A thing marked private: shares and grants on it give nothing" is true only of a workstream or canvas; a grant on a private chat, Afi's pane or a hosted chat reaches the people it names.
  • Stop and delete of a hosted chat need the manage verb (full holds it), not ownership alone. The refusal sentence said otherwise (Only the owner of this chat can stop or delete it.), so it is reworded in code, test and manual to Only this chat's owner, or someone it is shared with in full, can stop or delete it. (hosted_access.go, hosted_p2_test.go).
  • A bot starts hosted chats only where the policy lets agents create, and only reads My space and the lists.
  • The operator sees a private chat only when the policy says it sees private things; removing a person stops their bots.
  • A chat's task on an organization's server does not start by itself; Afi's pane can be shared read only; an organization's runner starts without GitHub.
  • deploy/org/README.md: "five named volumes" (six), "nothing long-lived runs as root" (the sessionhost does), "only the owner drives" (guests, below it), "seven services" on Railway (six).

Validation contract

  • A reader can stand up an organization from docs/organizations.md and deploy/org/README.md and know what each piece does.
  • Every claim in a changed or new page was checked against code at org/main; claims that could not be settled are listed in the open questions, not written as fact.
  • No secret, claim link, Railway domain, internal host or localhost address presented as a real address.
  • The probe table in chat_test.go fails if a new question stops reaching its page.

Open questions (code and decisions disagree, or cannot be settled from code)

  1. "In an org window everything is hosted" holds when the organization offers hosted chats. Otherwise the desktop keeps the My space and workstream server chats (no shell, not sandboxed) and shows no Agents place. The docs say this.
  2. Change entry 2900 said stopping a hosted chat stays the owner's whatever the role; the code lets a manage holder stop and delete (org gaps: ignore deploy/org/.env, Compose builds codeaf from source, chats.move_by policy, entry 2900 wording #2910's entry says so too). The docs follow the code.
  3. (Resolved by org gaps: ignore deploy/org/.env, Compose builds codeaf from source, chats.move_by policy, entry 2900 wording #2910: chats.move_by. The docs say "by default only the owner".)
  4. There is no terminal sign-in command; codeaf factory token add mints the host's access token. A non-operator on a password-only organization has no documented way to a --org token.
  5. (Resolved by org gaps: ignore deploy/org/.env, Compose builds codeaf from source, chats.move_by policy, entry 2900 wording #2910: deploy/org/.gitignore ignores .env. The README says so.)
  6. loopback_trust cannot be set in the Compose stack: scripts/serve.sh rewrites the host config on every start.
  7. Published images are not on Docker Hub yet. Compose builds codeaf from this checkout by default (org gaps: ignore deploy/org/.env, Compose builds codeaf from source, chats.move_by policy, entry 2900 wording #2910), which has codeaf sessionhost; the pinned release fetch downloads does not.
  8. No Docker daemon was available here, so the Compose commands in the docs were read against compose.yaml, not run.

Merge with org/main

org/main at #2910 was merged in (a merge commit, one README conflict). The README, docs/organizations.md and the sharing page now agree with it: Compose builds codeaf from source by default (fetch is opt-in), .env is git-ignored, and chats.move_by is owner by default.

Gates

make test-focus PKGS=./internal/manual RUN=. green; tui3 and session RUN=Manual green; make changelog-check. Run niced under the wave lock.

🤖 Generated with Claude Code

AbirAbbas and others added 5 commits November 24, 2026 22:07
docs/organizations.md says what an organization is (a separate account whose
chats are hosted on its server, private until shared), what runs where, who can
see what, how sharing and verbs work, bots, the hosting policy, the limits that
are still open, and a ten-minute path: Compose up, claim, invite, first hosted
chat. The top-level README and the documentation map link to it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The services table now lists the sessionhost and gitstub profiles, the six
volumes and the two networks. Adds a Contents list, loopback trust on a team
server (and that this stack cannot turn it on), Invite someone, the idle and
user-number settings of the sessionhost, what to do when a published image is
not found, and that .env is not git-ignored. Corrects "only the owner drives"
against the guest sections, the owner's stop and delete, the no-build advice
after building only the codeaf image, and the Railway service count.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e app door

A chat moved into a workstream stays as private as it was and is listed only to
people it is shared with, not to the workstream; a grant on a private chat,
Afi's pane or a hosted chat reaches the people it names and nobody else; stopping
or deleting a hosted chat needs the manage permission, not only ownership; a bot
starts hosted chats only where the policy lets agents create, and only reads My
space and the lists; the operator sees a private chat only when the policy says
so; removing a person stops their bots; a hosted chat is shared by a grant, not
by moving it, and its spend lands in My space under the owner's own key too; a
chat's task on an organization's server does not start by itself; Afi's pane can
be shared read only; an organization's runner starts without GitHub; the
AgentField examples name the node swe-planner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hat" and "how do I join"

New sections in a person's own words: what the operator, a company's IT and
whoever runs the machine can see; switching between Personal and the
organization and what each window shows; what happens when the server is down
(one sentence, never run locally); a teammate sending messages while the owner
has the chat open; joining a company's organization by invite link; and hosting
one (Docker Compose, Railway, the operator's guide). Two headings take the
words people use for them ("shared chat", "sandbox"). Seventeen probes in
chat_test.go keep these questions reaching those pages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…guide and manual sections

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AbirAbbas and others added 4 commits November 24, 2026 22:34
The worker law bans the swe worker from every manual page, and its pattern
(\bswe\b) cannot tell the AgentField reasoner swe-planner or the SWE-AF agent
from the removed worker. factory-agentfield.md goes back to the base spelling of
the two example targets (planner.build_issue), and organization-start.md
describes the Compose stack's agents by what they do instead of by name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The one conflict was the hosted-chats start step in deploy/org/README.md: org/main
builds codeaf from this checkout by default now, so its wording stands, and the rest
of the README (the smoke test paragraph, the pins and the Secrets paragraph) now
agrees with it and says that .env is ignored by git.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
hostedOwnerManage said only the owner can stop or delete a hosted chat, but the
check is the manage verb, which a guest shared in full holds too, so the sentence
was false for them. It now reads "Only this chat's owner, or someone it is shared
with in full, can stop or delete it." The test and the manual page that quote it
follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The sharing page and docs/organizations.md say that by default only the owner moves
a chat and that chats.move_by lets people with manage do it too, and the start step
says Compose builds codeaf from this checkout. The change entry drops the two claims
org/main's own entry now covers and records the reworded stop and delete sentence.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@AbirAbbas
AbirAbbas merged commit 63f30e1 into org/main Nov 25, 2026
7 checks passed
@AbirAbbas
AbirAbbas deleted the org/docs branch November 25, 2026 04:28
AbirAbbas added a commit that referenced this pull request Nov 25, 2026
…ack (#2903)

The hosted organisation line: a team-mode org server deciding every request through one access model (verbs, roles, grants and policy in SQLite), hosted chats run by the sessionhost under a per-chat uid inside a Landlock fence with minted model bearers, sealed keys and a git helper, shared chats acting through verbs, bots owned by their creator, the Hosting and chats policy settings, and a self-hosting stack (deploy/org Docker Compose, published images behind a leak gate, a Railway path).

Consolidates #2894 #2895 #2896 #2898 #2899 #2900 and the follow-ups #2904 #2905 #2907 #2908 #2910 #2911 #2912 #2913 #2915 #2916 #2918 #2927 #2936 #2944. Proven by the full suite, a keyless Compose smoke, a hostile wire client, sandbox escape probes, a real-model run and a production-style install from the published images.

Co-Authored-By: Santosh kumar <29346072+santoshkumarradha@users.noreply.github.com>
Co-Authored-By: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant