Org
An org is a long-lived team: one root session and a stable set of members, reused across runs.
Use teamwork first when the workspace constitution is not ready.
Use postmortem-improve after missions or repeated failures to capture lessons and route durable org improvements.
Choose the procedure
| Need | Procedure |
| --- | --- |
| Create the org, spawn or reuse members, resume through the root | Workflow below |
| The org exists and roles or constitution files must change (add, layoff, merge roles; agents.md / MISSION.md updates; retire members) | org-restructure.md |
| The org must keep working on a recurring tick: the root acts as PM and hands board items to members | orch-loop.md |
Do not restructure during bootstrap; create the org first. Start an orch loop only after the board and roles exist.
Workflow
- Confirm org is the right substrate.
- Use org when the user wants org visibility, durable org identity, coordinator/specialist lineage, or root-session resume behavior.
- If the real need is app-wide recurring or cron-like automation, stop and use
schedule. - If the user only wants a clock delay or reminder inside the current conversation, stop and use
loop. - If they want to resume when a process or ticket completes, stop and use
call-me-back. - If the governing root session has not prepared the teamwork artifact directory yet, stop and use
teamworkto callagent__prepareTeamworkWorkspace()first.
- Read
.libragent/teamwork.jsonbefore acting.
- Confirm
executionSubstrate.modeis"org"andexecutionSubstrate.orgLineage.intendedistrue. - If the manifest says a different substrate, reconcile before proceeding.
- Keep one shared workspace.
- Treat the app-local teamwork artifact directory as the SSOT for orchestration files.
- The governing root session and org-visible children should keep the normal parent/override workspace inheritance model.
- Create the org once from the root session.
- Use
agent__createOrg(name="...")from the governing root session. - Record the returned
orgIdandorgNameincoordination/DECISIONS.md(the backend automatically updates.libragent/teamwork.jsonwith these details). - The session that calls
agent__createOrgbecomes the org root. Do not callagent__createOrgagain.
- Spawn org-visible members explicitly.
- Before creating a member for new work, inspect
agent__listAgents(type="sessions")for an Idle org child with the same assistant ID and compatible workspace, then useagent__messageToSession(sessionId, complexity, message, reset=true)when reuse is safe. Always passcomplexity(low|normal|high). - Use
agent__spawnSession(configId, complexity, task)for org-visible children only when no suitable member exists, a different role/workspace is needed, or additional parallel capacity is required. Always passcomplexity(low|normal|high). If the current session already belongs to the org, inheritance is automatic. - To keep a child out of Org view, spawn it from a session that is not part of an explicit org.
- Resume through the org root.
- The org root session is the canonical entry point. Org view should resume the root, not whichever child was last active.
- If you need to identify the root, read
executionSubstrate.orgLineage.rootSessionIdfrom.libragent/teamwork.json.
- Keep work anchored in the workspace constitution.
- Read
agents.md,MISSION.md,ROLES.md, and the coordination files before directing members. - Org context refines execution; it does not replace the shared workspace contract.
Guardrails
- Do not invent a separate org-only workspace. Org members should inherit the parent effective workspace unless a task explicitly needs a different
workspaceOverride. - Do not treat arbitrary child-session resume as org resume. The org root is the entry point.
- Do not infer org membership from parent/child lineage alone — membership requires explicit org inheritance at session creation. Under an explicit org root that inheritance is automatic.
- After
agent__createOrg, verify.libragent/teamwork.jsoncontains the updatedorgIdandrootSessionId(written automatically by the backend).
References
- Org patterns and tool call examples
- Org restructure — impact analysis, layoff, merge, constitution update
- Orch loop (scheduled org tick)
- After-action learning / continuous improvement: use bundled skill
postmortem-improve