Teams: organisations that own repositories and carry grants
## Shape
Two tables in the forge OLTP beside `account` and `repo_role`:
- `org (name, created)` — the team itself. - `org_member (org, account, role)` — who is in it and at what level.
`repo` gains an owner (an account or an org), and `repo_role` resolution grows one step: a caller holds a grant if they hold it directly OR through an org that owns the repository. Everything downstream — `CanRead`, the gates, the account ops — asks the same question it asks today and needs no change.
## Surfaces
- Ops: `org.list/add/delete`, `org.member.add/remove`, mirroring the account ops that already exist. - CLI: `quarry org ...`, following `quarry accounts`. - Web: an `organizations` tab beside `repositories` and `people` on the explore surface — deliberately NOT shipped as an empty tab today, because a tab onto a blank page reads as a broken forge rather than an unbuilt feature.
## Why it is not urgent
Per-account grants already express everything a small forge needs; teams are about not re-granting the same set by hand. The cost of waiting is repetition, not capability.
Needs dmestas's decision before implementation. Teams locks in an ownership model across grants, visibility and every capability check — RFC 0008's role model assumes an account owns a grant, and a team that carries grants changes what capsFor answers about. That is a shape across components and expensive to undo, so the model is yours to pick rather than mine to infer from the ticket.
(Recorded as a comment because quarry's own tracker defines no assignee field — its schema carries title, type, status, severity, priority, subsystem and nothing else, while tcl's carries assignee, submitter, closer and closedate. Assigning here needs both halves: the field added to quarry's ticket schema, and #0eafaa19 so quarry can write any field a tracker defines rather than fossil's default list.)
Closing on measurement, build e53836294974: teams are built, under the name team rather than org, and past the shape this ticket drew.
team.list GET /api/v1/teams two live teams today (craft-design-group, dantest-crew)
team.create / team.delete / team.text
team.member / team.unmember membership carries a capability string — the grant rides on the team
team.repo.add / team.repo.remove, team.repo.offer.accept / .decline a repository moves under a team, or is offered and accepted (RFC 0008)
team.people everyone who reaches any repository under the team, and the route each holds it by
team.get, team.tickets, team.chat / .post / .render one ticket list and one room across a team's repositories
jva measured team.repo.add/remove moving a repository's namespace from jan's seat (G-52), and today's 3e4dfb04 makes the old namespace redirect after a move. The web surface is /teams (lists them) and /r/<team>/<repo>.
The decision this ticket said it needed — whether a team carries grants — was made in the building: team.member takes caps, and team.people reports reach "and the route each holds it by", which is the resolution step the ticket described (direct grant OR through a team).
Not measured: whether the explore surface grew a teams tab; the ticket itself said not to ship one empty. /teams exists as its own page. If the tab is wanted it is a one-line ask, not this ticket.