@nanocollective/roster 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +129 -0
  3. package/dist/cli.js +5679 -0
  4. package/docs/README.md +99 -0
  5. package/docs/agents.md +163 -0
  6. package/docs/architecture.md +121 -0
  7. package/docs/commands.md +223 -0
  8. package/docs/concepts.md +112 -0
  9. package/docs/cost.md +61 -0
  10. package/docs/developing.md +147 -0
  11. package/docs/doctor-codes.md +74 -0
  12. package/docs/export.md +113 -0
  13. package/docs/extending.md +97 -0
  14. package/docs/getting-started.md +134 -0
  15. package/docs/hosting.md +72 -0
  16. package/docs/manual-steps.md +163 -0
  17. package/docs/memory.md +71 -0
  18. package/docs/org-yaml.md +143 -0
  19. package/docs/portal.md +342 -0
  20. package/docs/prompts.md +133 -0
  21. package/docs/security.md +122 -0
  22. package/docs/session-workflow.md +112 -0
  23. package/docs/staff-yaml.md +163 -0
  24. package/docs/troubleshooting.md +189 -0
  25. package/docs/upgrading.md +83 -0
  26. package/docs/writing-a-charter.md +83 -0
  27. package/package.json +60 -0
  28. package/templates/brain/.github/workflows/%%STAFF%%-daily.yaml +33 -0
  29. package/templates/brain/.github/workflows/%%STAFF%%-mention.yaml +65 -0
  30. package/templates/brain/.github/workflows/%%STAFF%%-pr-mention.yaml +50 -0
  31. package/templates/brain/CHARTER.md +49 -0
  32. package/templates/brain/README.md +18 -0
  33. package/templates/brain/drafts/README.md +7 -0
  34. package/templates/brain/log/decisions.md +6 -0
  35. package/templates/brain/memory/INDEX.md +28 -0
  36. package/templates/brain/staff.yaml +44 -0
  37. package/templates/brain/strategy/README.md +7 -0
  38. package/templates/briefs/amend.md +60 -0
  39. package/templates/briefs/charter.md +47 -0
  40. package/templates/briefs/discover.md +61 -0
  41. package/templates/briefs/voice.md +53 -0
  42. package/templates/ops/.github/workflows/session.yaml +333 -0
  43. package/templates/ops/agents.mjs +143 -0
  44. package/templates/ops/compose.mjs +333 -0
  45. package/templates/ops/org/guardrails.md +14 -0
  46. package/templates/ops/org/operating.md +82 -0
  47. package/templates/ops/org/voice.md +40 -0
  48. package/templates/ops/prompts/_identity.md +14 -0
  49. package/templates/ops/prompts/_paths.md +15 -0
  50. package/templates/ops/prompts/daily.md +82 -0
  51. package/templates/ops/prompts/mention.md +53 -0
  52. package/templates/ops/prompts/pr-mention.md +57 -0
  53. package/templates/ops/runner-plan.mjs +65 -0
  54. package/templates/portal/css/base.css +104 -0
  55. package/templates/portal/css/brain.css +106 -0
  56. package/templates/portal/css/diff.css +28 -0
  57. package/templates/portal/css/graph.css +34 -0
  58. package/templates/portal/css/health.css +41 -0
  59. package/templates/portal/css/inbox.css +79 -0
  60. package/templates/portal/css/layout.css +98 -0
  61. package/templates/portal/css/markdown.css +54 -0
  62. package/templates/portal/css/setup.css +106 -0
  63. package/templates/portal/index.html +55 -0
  64. package/templates/portal/js/api.js +74 -0
  65. package/templates/portal/js/app.js +282 -0
  66. package/templates/portal/js/dialog.js +70 -0
  67. package/templates/portal/js/dom.js +106 -0
  68. package/templates/portal/js/icons.js +94 -0
  69. package/templates/portal/js/md.js +386 -0
  70. package/templates/portal/js/refresh.js +59 -0
  71. package/templates/portal/js/router.js +20 -0
  72. package/templates/portal/js/state.js +160 -0
  73. package/templates/portal/js/textdiff.js +96 -0
  74. package/templates/portal/js/views/app.js +128 -0
  75. package/templates/portal/js/views/brain.js +260 -0
  76. package/templates/portal/js/views/changed.js +157 -0
  77. package/templates/portal/js/views/checklist.js +87 -0
  78. package/templates/portal/js/views/docs.js +84 -0
  79. package/templates/portal/js/views/files.js +95 -0
  80. package/templates/portal/js/views/graph.js +436 -0
  81. package/templates/portal/js/views/health.js +158 -0
  82. package/templates/portal/js/views/inbox.js +549 -0
  83. package/templates/portal/js/views/memory.js +135 -0
  84. package/templates/portal/js/views/org.js +175 -0
  85. package/templates/portal/js/views/paste.js +142 -0
  86. package/templates/portal/js/views/prompt.js +412 -0
  87. package/templates/portal/js/views/repos.js +92 -0
  88. package/templates/portal/js/views/setup.js +344 -0
  89. package/templates/portal/js/views/staff.js +290 -0
package/docs/README.md ADDED
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: "Overview"
3
+ description: "What roster is, the shape of an agent-run org, and what it will not do for you."
4
+ sidebar_order: 0
5
+ ---
6
+
7
+ # roster
8
+
9
+ An agent-run organisation, powered by GitHub.
10
+
11
+ A staff member is a private repository. The repo *is* the brain: what it knows, what it is
12
+ working on, what it has decided. A scheduled workflow wakes it each morning, hands it a prompt
13
+ composed from the org's shared rules plus its own charter, and it does a day's work and hands
14
+ off. You read the result on GitHub, or in a local portal.
15
+
16
+ roster is the thing that sets that up and keeps it consistent.
17
+
18
+ ## Guide
19
+
20
+ Read in this order.
21
+
22
+ | | |
23
+ |---|---|
24
+ | [Getting started](getting-started.md) | One command, in a browser: stand up an org, or join one that exists. |
25
+ | [Manual steps](manual-steps.md) | Every human action, why it cannot be automated, and what breaks if you skip it. **Read this one.** |
26
+ | [Concepts](concepts.md) | What a charter, a manifest, a surface and the ops repo are. |
27
+ | [Choosing a coding agent](agents.md) | Claude, Codex, Nanocoder, or anything with a command line. |
28
+ | [Writing a charter](writing-a-charter.md) | The one file nothing can generate for you. |
29
+ | [Extending it](extending.md) | The four seams, and which one to reach for. |
30
+ | [Memory](memory.md) | The grammar, and why deleting is the maintenance. |
31
+ | [Commands](commands.md) | Every CLI command and flag. |
32
+ | [The portal](portal.md) | Setup, every view, and every action. |
33
+ | [Upgrading](upgrading.md) | How framework changes reach a tenant without eating your edits. |
34
+ | [Troubleshooting](troubleshooting.md) | Every trap we have actually hit, and what it looks like. |
35
+ | [Hosting the portal](hosting.md) | Local is the default, and why. |
36
+ | [Cost](cost.md) | What this spends, and on what. |
37
+
38
+ ## Reference
39
+
40
+ Look things up.
41
+
42
+ | | |
43
+ |---|---|
44
+ | [`org.yaml`](org-yaml.md) | Every field in the org manifest. |
45
+ | [`staff.yaml`](staff-yaml.md) | Every field in a staff member's manifest. |
46
+ | [Prompts](prompts.md) | The template syntax, the context, and what to guard. |
47
+ | [The session workflow](session-workflow.md) | Inputs, secrets, and what runs in what order. |
48
+ | [The portal](portal.md) | Every view and every action. |
49
+ | [`roster export`](export.md) | The JSON shape. |
50
+ | [doctor codes](doctor-codes.md) | Every finding, what it means, what to do. |
51
+
52
+ ## Understanding it
53
+
54
+ | | |
55
+ |---|---|
56
+ | [Architecture](architecture.md) | What happens during a run, and why it is shaped this way. |
57
+ | [Security model](security.md) | What can reach what, and what stops it. |
58
+ | [Working on roster itself](developing.md) | Layout, template classes, and the rules that matter. |
59
+
60
+ ## The shape of it
61
+
62
+ ```
63
+ Nano-Collective/roster the framework. Never a runtime dependency of anything.
64
+ ├── src/ the CLI
65
+ ├── templates/ops/ what a tenant's ops repo is generated from
66
+ ├── templates/brain/ what a staff member's repo is generated from
67
+ └── portal/ the local web UI
68
+
69
+ <your-org>/roster-ops the org layer and the machinery. Private.
70
+ ├── org/business.md what the business is. You write this.
71
+ ├── org/voice.md house style, inherited by everyone
72
+ ├── org/guardrails.md non-negotiables, inherited by everyone
73
+ ├── org/operating.md the autonomy contract
74
+ ├── prompts/ composable prompt fragments
75
+ ├── compose.mjs builds the prompt at run time
76
+ ├── agents.mjs which coding agent runs, and how
77
+ └── .github/workflows/session.yaml the reusable workflow every staff repo calls
78
+
79
+ <your-org>/<staff> one per staff member. The repo is the brain.
80
+ ├── CHARTER.md the personality. Hand written.
81
+ ├── staff.yaml the machine-readable half of the charter
82
+ ├── memory/INDEX.md one line per fact, read at every boot
83
+ ├── memory/notes/ the argument behind a fact, read on demand
84
+ └── .github/workflows/ three callers, about forty lines each
85
+ ```
86
+
87
+ **The framework never runs anything.** It writes templates out; a tenant runs its own copies.
88
+ That is not tidiness, it is forced: a reusable workflow in a private repo can only be called
89
+ from inside its own organisation, so a tenant cannot call the framework's. It turns out to be
90
+ the better design anyway. Nothing breaks if the framework repo moves, goes private, or is
91
+ deleted, and an air-gapped install is a supported case rather than a special one.
92
+
93
+ ## What it will not do for you
94
+
95
+ - **Write the charter.** It is the personality and it decides everything else. A generated one
96
+ produces a generic agent, which is the failure this whole arrangement exists to avoid.
97
+ - **Write `org/business.md`.** Everything the staff say is downstream of it.
98
+ - **Install a GitHub App.** Installing grants access to specific repositories and GitHub asks a
99
+ human which. See [manual steps](manual-steps.md).
package/docs/agents.md ADDED
@@ -0,0 +1,163 @@
1
+ ---
2
+ title: "Choosing a coding agent"
3
+ description: "Claude, Codex, Nanocoder, or anything with a command line."
4
+ sidebar_order: 4
5
+ ---
6
+
7
+ # Choosing a coding agent
8
+
9
+ roster is not a Claude harness. It composes a prompt, hands it to a coding agent, and gets out
10
+ of the way. **Any agent with a command line that accepts a prompt works.**
11
+
12
+ A runner is three facts:
13
+
14
+ | | |
15
+ |---|---|
16
+ | `install` | a shell command that puts the agent on the runner |
17
+ | `run` | a shell command that runs it, reading the prompt from `$AGENT_PROMPT_FILE` |
18
+ | `token_env` | the environment variable its credential goes in |
19
+
20
+ That is the whole interface. Everything else is a convenience.
21
+
22
+ ## Picking one
23
+
24
+ In `org.yaml`:
25
+
26
+ ```yaml
27
+ agent:
28
+ id: codex
29
+ ```
30
+
31
+ Or the short form, which is the same thing:
32
+
33
+ ```yaml
34
+ agent: codex
35
+ ```
36
+
37
+ A staff member can override it in their own `staff.yaml`, which is worth doing when roles
38
+ differ in kind. A research role on a long-context model and an engineering role on a coding
39
+ model is a reasonable thing to want:
40
+
41
+ ```yaml
42
+ # marketing/staff.yaml
43
+ agent: claude
44
+ model: claude-opus-5
45
+ ```
46
+
47
+ ## The presets
48
+
49
+ Every command below was read off the tool's own help output or its documentation, not assumed.
50
+ They will drift. When one does, override the field rather than waiting for us: see
51
+ [writing your own](#writing-your-own).
52
+
53
+ ### `claude-code-action` (default)
54
+
55
+ Claude Code through Anthropic's GitHub Action. This is the reference runner and the one this
56
+ project is exercised against daily.
57
+
58
+ ```yaml
59
+ agent: claude-code-action
60
+ ```
61
+
62
+ - credential: `CLAUDE_CODE_OAUTH_TOKEN`
63
+ - default model: `claude-opus-5`
64
+ - tool permissions come from `allowed_tools` on the caller
65
+
66
+ It is the only preset that is a GitHub Action rather than a CLI. `uses:` in a workflow cannot
67
+ be an expression, so an Action-based runner has to be written into `session.yaml` literally.
68
+ That is why there is exactly one of them, and why everything else goes through the generic
69
+ path.
70
+
71
+ ### `claude`
72
+
73
+ The same agent through its plain CLI, if you would rather not depend on the Action.
74
+
75
+ ```
76
+ install: npm install -g @anthropic-ai/claude-code
77
+ run: claude -p --model "$AGENT_MODEL" --allowedTools "$AGENT_TOOLS" < "$AGENT_PROMPT_FILE"
78
+ token_env: CLAUDE_CODE_OAUTH_TOKEN
79
+ ```
80
+
81
+ ### `codex`
82
+
83
+ OpenAI's Codex CLI.
84
+
85
+ ```
86
+ install: npm install -g @openai/codex
87
+ run: codex exec - --model "$AGENT_MODEL" --sandbox danger-full-access < "$AGENT_PROMPT_FILE"
88
+ token_env: CODEX_API_KEY
89
+ ```
90
+
91
+ `exec -` reads the prompt from standard input. The sandbox is opened up because the entire
92
+ point of a session is that it edits the checkout and pushes; a sandbox that forbids writes
93
+ produces a run that succeeds having done nothing. If you would rather keep it narrower,
94
+ `--sandbox workspace-write` is the option to try first.
95
+
96
+ ### `nanocoder`
97
+
98
+ ```
99
+ install: npm install -g @nanocollective/nanocoder
100
+ run: nanocoder --model "$AGENT_MODEL" --mode yolo --trust-directory --plain run "$(cat "$AGENT_PROMPT_FILE")"
101
+ token_env: NANOCODER_API_KEY
102
+ ```
103
+
104
+ Three flags matter for unattended use. `run` is its non-interactive mode. `--trust-directory`
105
+ skips the first-run directory trust prompt, which would otherwise hang the runner until it
106
+ times out. `--plain` avoids the TUI, which has nothing to draw to in CI.
107
+
108
+ Nanocoder resolves a provider from `agents.config.json` in the working directory, so you will
109
+ want that file in the brain repo, and the provider's own key in `token_env`.
110
+
111
+ ## Writing your own
112
+
113
+ Anything not in the list, including something that does not exist yet:
114
+
115
+ ```yaml
116
+ agent:
117
+ id: my-agent
118
+ install: cargo install my-agent
119
+ run: my-agent --headless --model "$AGENT_MODEL" < "$AGENT_PROMPT_FILE"
120
+ token_env: MY_AGENT_TOKEN
121
+ ```
122
+
123
+ You can also override a single field of a preset, which is the common case when a flag changes:
124
+
125
+ ```yaml
126
+ agent:
127
+ id: codex
128
+ run: codex exec - --model "$AGENT_MODEL" --sandbox workspace-write < "$AGENT_PROMPT_FILE"
129
+ ```
130
+
131
+ The rest of the preset still applies.
132
+
133
+ ## What the runner gets
134
+
135
+ | Variable | |
136
+ |---|---|
137
+ | `$AGENT_PROMPT_FILE` | absolute path to the composed prompt |
138
+ | `$AGENT_MODEL` | the staff member's model, or the agent's default |
139
+ | `$AGENT_TOOLS` | the `allowed_tools` string from the caller |
140
+ | `$GH_TOKEN` | a token for the private trackers, already authenticated |
141
+ | `$PUBLIC_TOKEN` | a token for the public product repo, if there is one |
142
+ | *`token_env`* | the agent's credential, under whatever name it wants |
143
+
144
+ **The prompt is always a file, never an argument.** It is thousands of words and it contains
145
+ quotes, backticks and dollar signs. Argument length limits and shell quoting are exactly the
146
+ sort of thing that works in testing and fails at 07:00 on a Tuesday.
147
+
148
+ ## Requirements on the agent
149
+
150
+ An agent has to do the work *and commit it*. The prompt tells it to; the session workflow does
151
+ not commit on its behalf. Any agent that can run `git` and `gh` from a shell qualifies. One
152
+ that only edits files and cannot run commands will produce a run that changes nothing.
153
+
154
+ ## Changing agent on a live org
155
+
156
+ 1. Set `agent:` in `org.yaml`.
157
+ 2. Put the new credential on each brain repo, named as `token_env`.
158
+ 3. `roster upgrade --apply`, then commit and push the regenerated callers.
159
+ 4. Trigger one run by hand and read the log before trusting the schedule.
160
+
161
+ Step 4 is not optional. Prompts are written against a model's habits as much as its
162
+ capabilities, and the first run on a new agent is where you find out which parts of your
163
+ charter were load-bearing.
@@ -0,0 +1,121 @@
1
+ ---
2
+ title: "Architecture"
3
+ description: "What happens during a run, and the constraint that decided the design."
4
+ sidebar_order: 20
5
+ ---
6
+
7
+ # Architecture
8
+
9
+ What actually happens, and why it is shaped this way.
10
+
11
+ ## The constraint that decided everything
12
+
13
+ **A reusable workflow in a private repo can only be called by repos in the same organisation.**
14
+
15
+ So a tenant cannot call a workflow living in a private framework repo. Two ways out:
16
+
17
+ - Publish the framework early so it can be referenced. That forces the open-source decision
18
+ before you are ready, and makes every tenant depend on an org they do not control.
19
+ - **The framework never runs anything. It writes templates into the tenant's own repo.**
20
+
21
+ The second is what roster does, and it is better independently of licensing. Every tenant is
22
+ self-contained. Nothing breaks if the framework moves, goes private, or is deleted. An
23
+ air-gapped install is a supported case rather than a special one.
24
+
25
+ The cost is that framework improvements do not arrive by themselves. `roster upgrade` is what
26
+ carries them, run by a human. See [upgrading](upgrading.md).
27
+
28
+ ## Three repos, three jobs
29
+
30
+ ```
31
+ Nano-Collective/roster the framework. Never a runtime dependency of anything.
32
+ <org>/roster-ops the org layer and the machinery. Private.
33
+ <org>/<staff> one per staff member. The repo is the brain.
34
+ ```
35
+
36
+ Inside the ops repo there is a second split, enforced by convention so that extraction stays a
37
+ directory copy:
38
+
39
+ - **`org/`** is the tenant's business truth. Never published, always yours.
40
+ - **everything else** came from the framework's templates and can be regenerated.
41
+
42
+ ## A day in the life of a run
43
+
44
+ 07:00 UTC, `cto-daily.yaml` fires on cron.
45
+
46
+ 1. The caller passes nine inputs and five secrets to `roster-ops/.github/workflows/session.yaml`
47
+ and does nothing else. It is forty lines because everything that could be shared, is.
48
+ 2. The session mints a GitHub App token. **The agent posts as `acme-cto[bot]`, not as you.**
49
+ 3. It clones the ops repo, which is the only thing it can clone without having read a manifest.
50
+ 4. `runner-plan.mjs` reads `org.yaml` and the staff member's manifest and says what else to
51
+ clone: the brain with full history, each peer's brain, each product repo.
52
+ 5. `compose.mjs` assembles the prompt from six files: four org-level, the charter, and the
53
+ fragment for this kind of run.
54
+ 6. `agents.mjs` resolves which coding agent to run and how.
55
+ 7. The agent runs with a shell, `gh` already authenticated, and the whole checkout.
56
+ 8. It works, commits, pushes, opens issues, comments, and rewrites its pinned status issue.
57
+ **The workflow does not commit on its behalf**; the prompt tells it to and it does.
58
+
59
+ Nothing is stored outside the repos. There is no database and no service.
60
+
61
+ ## Boot, work, hand off
62
+
63
+ The prompt imposes a shape, and the shape is what makes an unattended run useful.
64
+
65
+ **Boot** is reconstituting a self that has no memory of yesterday. It reads `memory/INDEX.md`
66
+ in full, the pinned status issue, and its own charter. That is deliberately all: notes are read
67
+ only when a fact is in play, and the decision log is not boot context at all.
68
+
69
+ This is why memory is one line per fact. Boot context here went from about 52,000 words to
70
+ about 6,000 by making that change, and the saving repeats on every run of every staff member
71
+ forever.
72
+
73
+ **Work** is one thing done properly rather than four things started.
74
+
75
+ **Hand off** is the part that makes the next run possible: open the PR, rewrite the status
76
+ issue (rewrite, not append), reconcile the tracker, update memory only if a fact changed, log
77
+ real decisions, and write to peers if something touches their patch.
78
+
79
+ ## Why the memory is markdown
80
+
81
+ An agent writes markdown well and writes to a schema badly. A database would need the agent to
82
+ be careful about something it is not good at being careful about, and would put the brain
83
+ somewhere you cannot read with `git log`.
84
+
85
+ The cost is that the grammar is a convention rather than a constraint, so `roster lint`
86
+ enforces it and the portal parses it. See [memory](memory.md).
87
+
88
+ ## Identities and why there are two
89
+
90
+ A staff member has a private App for its own trackers, and shares a public App with everyone
91
+ else for the product repo.
92
+
93
+ The private one is unique, so work on an internal board is attributable. The public one is
94
+ shared and deliberately anonymous, because a bot opening a pull request on a public repo is
95
+ unremarkable and a bot signing itself with a job title is a tell.
96
+
97
+ `roster doctor` treats these differently when attributing work: a solo identity names one staff
98
+ member, a shared one names only "one of them".
99
+
100
+ ## What cannot be automated, and why
101
+
102
+ - **Creating a GitHub App** has no API. Only the manifest flow, which needs a browser and a
103
+ human confirmation. `roster app` does everything either side of that.
104
+ - **Installing an App** grants access to specific repos and GitHub asks a human which. This is
105
+ correct and should not be worked around.
106
+ - **Pushing a workflow change** is impossible with an App token, in any repo. So agents can
107
+ never update their own workflows, and upgrades are human-run by design.
108
+
109
+ See [manual steps](manual-steps.md).
110
+
111
+ ## Where the pieces live
112
+
113
+ | Piece | In | Why there |
114
+ |---|---|---|
115
+ | `compose.mjs` | the tenant | a run must not depend on npm or on the framework |
116
+ | `agents.mjs` | the tenant | same |
117
+ | `runner-plan.mjs` | the tenant | same |
118
+ | `session.yaml` | the tenant | private reusable workflows are same-org only |
119
+ | the CLI | the framework | runs on your machine, when you ask it to |
120
+ | the portal | the framework | reads the tenant's repos from disk |
121
+ | the docs | the framework | including the copy the portal serves |
@@ -0,0 +1,223 @@
1
+ ---
2
+ title: "Commands"
3
+ description: "Every CLI command and flag."
4
+ sidebar_order: 8
5
+ ---
6
+
7
+ # Commands
8
+
9
+ Every command prints a plan and changes nothing unless you pass `--apply`, except `lint`,
10
+ `prompt`, `export` and `portal`, which never change anything at all.
11
+
12
+ ## `roster fix`
13
+
14
+ Every scanner's findings, as one brief you paste into a coding agent working in this workspace.
15
+
16
+ ```
17
+ --json the findings as data, rather than as a brief
18
+ --offline skip everything needing the network
19
+ --ops <dir> ops repo directory
20
+ ```
21
+
22
+ `doctor`, the prompt audit and `lint` each already carry the sentence that fixes their own
23
+ finding; this collects them. Two piles come out: what an agent editing files here can do, and
24
+ what only a person can: an org permission, an App install, a credential. The second is listed
25
+ but marked not to attempt, because an agent handed one of those invents a workaround.
26
+
27
+ The brief states which files belong to the framework before it states any of the work. A fix
28
+ applied to a vendored file is reverted by the next `roster upgrade`, and that has happened.
29
+
30
+ The portal's Health screen has the same text behind a copy button.
31
+
32
+ ## `roster init --org <org>`
33
+
34
+ Stand up a new tenant: the ops repo, the org layer, and the recorded merge base.
35
+
36
+ ```
37
+ --org <name> the GitHub organisation. Required.
38
+ --name <text> what the business is called. Defaults to the org.
39
+ --human <login> who the agents answer to. Defaults to your gh login.
40
+ --marker <tag> provenance tag on a fact they ruled on.
41
+ --agent <id> coding agent. See docs/agents.md.
42
+ --dir <path> where to create the workspace.
43
+ --ops <name> ops repo name. Defaults to roster-ops.
44
+ --apply
45
+ ```
46
+
47
+ Will not write `org/business.md`. That is yours.
48
+
49
+ ## `roster hire <handle>`
50
+
51
+ Scaffold a staff member: repo, three callers, manifest, memory index, charter stub, labels,
52
+ pinned status issue, and peer wiring in both directions.
53
+
54
+ ```
55
+ --name <text> role name, e.g. "Chief Financial Officer"
56
+ --dir <name> workspace directory and repo name
57
+ --schedule <cron> defaults to a slot staggered after the last one
58
+ --model <id>
59
+ --timeout <n> daily ceiling, minutes
60
+ --mention-timeout <n>
61
+ --pr-timeout <n>
62
+ --secret-prefix <X> secrets become <X>_APP_ID and <X>_APP_PRIVATE_KEY
63
+ --app <slug> defaults to the pattern the peers use
64
+ --public-app <slug> the shared public identity
65
+ --apply
66
+ ```
67
+
68
+ ## `roster app <handle>`
69
+
70
+ Create the GitHub App and put its credentials in the brain repo's secrets.
71
+
72
+ ```
73
+ --public create the shared public identity instead
74
+ --port <n> localhost port for the hand-off. Default 4310.
75
+ --no-open print the URL rather than opening a browser
76
+ ```
77
+
78
+ Cannot install the App. See [manual steps](manual-steps.md).
79
+
80
+ ## `roster retire <handle>`
81
+
82
+ Stop a staff member without destroying anything.
83
+
84
+ ```
85
+ --apply
86
+ --ops <dir>
87
+ ```
88
+
89
+ Their brain repo is their entire memory and there is no undo for deleting one, so this does
90
+ not touch it. It disables their three workflows through the API, removes them from `org.yaml`,
91
+ removes them from every peer's `staff.yaml`, and deletes the `from-<handle>` labels their peers
92
+ carried for them. Everything they ever knew stays where it is, readable in the portal and on
93
+ GitHub.
94
+
95
+ Disabling rather than deleting the workflow files is what makes it reversible: the files stay,
96
+ so re-enabling is one click, and nothing has to be regenerated from templates that have moved
97
+ on since.
98
+
99
+ It deliberately does not delete or archive the repo, close their issues, or unpin their status
100
+ issue. All three are one click on GitHub, having thought about it.
101
+
102
+ Plan-then-apply, like everything else that changes something.
103
+
104
+ ## `roster doctor [handle]`
105
+
106
+ Check the org is wired up, and that the agents have actually been running.
107
+
108
+ ```
109
+ --offline skip everything needing the network
110
+ --json machine-readable findings
111
+ ```
112
+
113
+ Exit 1 if anything failed. Warnings do not fail.
114
+
115
+ ## `roster upgrade`
116
+
117
+ Carry framework changes into the tenant. See [upgrading](upgrading.md).
118
+
119
+ ```
120
+ --apply
121
+ --check exit non-zero if anything is pending
122
+ --baseline <git-ref> one-time: reconstruct a merge base
123
+ --verbose show files that are already up to date
124
+ ```
125
+
126
+ ## `roster lint [handle]`
127
+
128
+ Check memory against the grammar. See [memory](memory.md).
129
+
130
+ ```
131
+ --quiet print only problems
132
+ ```
133
+
134
+ ## `roster brief <kind> [handle]`
135
+
136
+ Print a self-contained brief for authoring one of the files the agents run on. Paste it into
137
+ whatever agent you use, or pipe it.
138
+
139
+ ```
140
+ discover write org/business.md, which every prompt is composed on top of
141
+ charter <who> write a staff member's CHARTER.md
142
+ voice revise org/voice.md, the house style every surface inherits
143
+ amend <who> change what a staff member is told, with the whole prompt attached
144
+ ```
145
+
146
+ ```
147
+ --kind <k> for amend: daily | mention | pr-mention (default: daily)
148
+ --want <text> for amend: what you want changed
149
+ --ops <dir>
150
+ ```
151
+
152
+ ```bash
153
+ roster brief amend cto --want "stop opening decision issues for anything reversible"
154
+ roster brief discover
155
+ roster brief charter cto | pbcopy
156
+ roster brief voice > /tmp/brief.md
157
+ ```
158
+
159
+ `amend` is the different one. It carries the composed prompt and every file it is assembled
160
+ from, so the agent you paste it into does not have to ask for any of them. The portal's Prompt
161
+ screen builds the same thing, and offers it per audit finding.
162
+
163
+ The other three are the only files anybody writes by hand. `org/operating.md`, `org/voice.md` and
164
+ `org/guardrails.md` ship written; a charter and `org/business.md` cannot, because they are the
165
+ half that is about you.
166
+
167
+ Nothing in a brief is specific to any agent. Claude Code gets `/discover`, `/voice` and
168
+ `/charter` as well, generated from these same files by `roster init` and `roster hire`. To add
169
+ them to a tenant that predates this, redirect the brief into the file:
170
+
171
+ ```bash
172
+ roster brief discover > roster-ops/.claude/commands/discover.md
173
+ ```
174
+
175
+ ## `roster prompt <handle>`
176
+
177
+ Compose and print what a staff member is actually sent.
178
+
179
+ ```
180
+ --kind daily|mention|pr-mention
181
+ --diff <workflow.yaml>
182
+ ```
183
+
184
+ `mention` and `pr-mention` need trigger context:
185
+
186
+ ```bash
187
+ ROSTER_CONTEXT='{"issue_number":"1","comment_id":"1","pr_number":"1","repo":"o/r"}' \
188
+ roster prompt cto --kind mention
189
+ ```
190
+
191
+ ## `roster portal`
192
+
193
+ Serve a local UI over the checked-out repositories. **`roster` with no arguments does the same**,
194
+ which is the shortest way in.
195
+
196
+ ```
197
+ --port <n> default 4300
198
+ --host <a> default 127.0.0.1. Anything else exposes write actions to the network.
199
+ --dir <path> where a tenant would be created or checked out. Default: here.
200
+ ```
201
+
202
+ **With no tenant where you started it, this is the setup screen**: it stands up a new org, or
203
+ checks out one that already runs roster. Local only. See [the portal](portal.md).
204
+
205
+ Views: Inbox, Org, Staff, Docs, and per staff member Brain, Prompt, Graph, What changed, Health.
206
+
207
+ It can act as you through your own `gh`: reply, close, reopen and open issues; hire and retire;
208
+ edit and commit the org layer, prompt fragments and charters; create a staff member's GitHub App;
209
+ and copy a prompt for authoring the two files nothing can generate.
210
+
211
+ ## `roster export`
212
+
213
+ The whole org as one JSON document.
214
+
215
+ ```
216
+ --out <file>
217
+ ```
218
+
219
+ ## Common to all
220
+
221
+ ```
222
+ --ops <dir> ops repo directory. Default: found by walking up.
223
+ ```