@nanocollective/roster 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (63) hide show
  1. package/README.md +65 -84
  2. package/dist/cli.js +4187 -2709
  3. package/docs/README.md +9 -6
  4. package/docs/agents.md +24 -20
  5. package/docs/architecture.md +13 -5
  6. package/docs/charters/cmo.md +69 -0
  7. package/docs/charters/cto.md +71 -0
  8. package/docs/charters/support.md +60 -0
  9. package/docs/commands.md +81 -5
  10. package/docs/concepts.md +48 -14
  11. package/docs/cost.md +36 -1
  12. package/docs/developing.md +16 -21
  13. package/docs/doctor-codes.md +8 -2
  14. package/docs/extending.md +2 -2
  15. package/docs/getting-started.md +110 -77
  16. package/docs/manual-steps.md +93 -123
  17. package/docs/memory.md +21 -3
  18. package/docs/org-yaml.md +37 -2
  19. package/docs/portal.md +83 -35
  20. package/docs/prompts.md +25 -4
  21. package/docs/security.md +29 -5
  22. package/docs/session-workflow.md +49 -17
  23. package/docs/staff-yaml.md +13 -2
  24. package/docs/troubleshooting.md +8 -8
  25. package/docs/upgrading.md +6 -0
  26. package/docs/writing-a-charter.md +15 -0
  27. package/package.json +1 -1
  28. package/templates/brain/.github/workflows/%%STAFF%%-daily.yaml +6 -0
  29. package/templates/brain/.github/workflows/%%STAFF%%-mention.yaml +6 -0
  30. package/templates/brain/CHARTER.md +3 -3
  31. package/templates/brain/README.md +1 -0
  32. package/templates/brain/log/decisions.md +3 -0
  33. package/templates/brain/strategy/ideas.md +7 -0
  34. package/templates/ops/.github/workflows/session.yaml +108 -14
  35. package/templates/ops/agents.mjs +7 -3
  36. package/templates/ops/compose.mjs +16 -3
  37. package/templates/ops/inflight.mjs +157 -0
  38. package/templates/ops/org/operating.md +21 -1
  39. package/templates/ops/org/voice.md +9 -0
  40. package/templates/ops/prompts/_inflight.md +14 -0
  41. package/templates/ops/prompts/_paths.md +2 -1
  42. package/templates/ops/prompts/daily.md +16 -7
  43. package/templates/ops/prompts/mention.md +2 -0
  44. package/templates/ops/run-record.mjs +144 -0
  45. package/templates/portal/css/runs.css +13 -0
  46. package/templates/portal/css/setup.css +2 -0
  47. package/templates/portal/index.html +12 -1
  48. package/templates/portal/js/api.js +32 -4
  49. package/templates/portal/js/app.js +42 -8
  50. package/templates/portal/js/dialog.js +47 -0
  51. package/templates/portal/js/state.js +3 -1
  52. package/templates/portal/js/views/app.js +23 -5
  53. package/templates/portal/js/views/credential.js +93 -0
  54. package/templates/portal/js/views/health.js +17 -4
  55. package/templates/portal/js/views/inbox.js +6 -2
  56. package/templates/portal/js/views/org.js +23 -3
  57. package/templates/portal/js/views/paste.js +29 -0
  58. package/templates/portal/js/views/prompt.js +7 -3
  59. package/templates/portal/js/views/repos.js +12 -7
  60. package/templates/portal/js/views/runonce.js +94 -0
  61. package/templates/portal/js/views/runs.js +165 -0
  62. package/templates/portal/js/views/setup.js +267 -45
  63. package/templates/portal/js/views/staff.js +81 -20
package/docs/concepts.md CHANGED
@@ -6,24 +6,64 @@ sidebar_order: 3
6
6
 
7
7
  # Concepts
8
8
 
9
+ ## The six things you need to know
10
+
11
+ Enough to set up an org and read what it does. Everything after this section is detail you
12
+ can learn when you need it.
13
+
14
+ 1. **The org layer.** One private repo, `<org>/roster-ops`, holds what every staff member
15
+ shares: what the business is (`org/business.md`), what matters this month
16
+ (`org/priorities.md`), the house voice and the guardrails. Change it once and every staff
17
+ member has it on their next run. [More](#the-ops-repo).
18
+ 2. **A staff member is a repo.** Each one has a private repo, its *brain*: what it knows, what
19
+ it is working on, and what it has decided. There is no database and no server; the portal
20
+ reads the repos. [More](#the-brain).
21
+ 3. **The charter.** `CHARTER.md` in the brain says who this staff member is and what it
22
+ decides alone. You write it, with a brief that interviews you; roster never generates one,
23
+ because a generated charter makes a generic agent. [More](#charter-and-manifest).
24
+ 4. **Memory.** `memory/INDEX.md` is one line per fact, read at the start of every run. The
25
+ agent writes it and deletes from it; you can read and correct it in the portal. That is how
26
+ a staff member remembers yesterday. [More](memory.md).
27
+ 5. **The daily run.** A scheduled GitHub Actions workflow in each brain wakes the staff member,
28
+ hands it a prompt built from the org layer plus its charter and memory, and it does one piece
29
+ of work and writes down what happened. [More](#kinds-of-run).
30
+ 6. **Mentions.** Write `@handle` in an issue or comment on a staff member's own tracker and it
31
+ runs to answer that, between daily runs. Nothing on a product repo wakes anybody; you ask
32
+ them on their tracker. [More](#kinds-of-run).
33
+
34
+ Everything below, and the rest of the docs, is detail: identities, peers, surfaces, the
35
+ prompt's layers, upgrading. None of it is needed to get a first run.
36
+
9
37
  ## The ops repo
10
38
 
11
39
  `<org>/roster-ops` holds two different kinds of thing, and the split matters.
12
40
 
13
- **`org/` is yours.** `business.md`, `voice.md`, `guardrails.md`, `operating.md`. This is the
14
- business truth and the shared half of every staff member's instructions. Edit it freely: the
41
+ **`org/` is yours.** `business.md`, `priorities.md`, `voice.md`, `guardrails.md`,
42
+ `operating.md`. This is the business truth and the shared half of every staff member's
43
+ instructions. Edit it freely: the
15
44
  [Org screen](portal.md#org) lists every one of these off disk with an Edit button, and saving
16
45
  commits and pushes. A change here reaches everybody on their next run, which is the point: a
17
- concision rule that used to mean editing twelve files is now one file.
46
+ rule every staff member should follow is one edit, not one per repo.
18
47
 
19
48
  **Everything else is machinery** and belongs to the framework: `compose.mjs`, `agents.mjs`,
20
- `runner-plan.mjs`, `.github/workflows/session.yaml`. Editing these works right up until the
49
+ `runner-plan.mjs`, `inflight.mjs`, `run-record.mjs`, `.github/workflows/session.yaml`. Editing these works right up until the
21
50
  framework changes the same file, at which point your change is a conflict at best and silently
22
51
  reverted at worst. Fix machinery in the framework, then `roster upgrade`.
23
52
 
24
53
  `roster upgrade` enforces this distinction. It reports an edit to a framework-owned file even
25
54
  when nothing has collided yet, because "not broken yet" is the state a lost fix sits in.
26
55
 
56
+ ## Priorities
57
+
58
+ `org/priorities.md` is the one direction every staff member shares: what matters this month,
59
+ ranked, and what is out of scope. It is composed into every daily run, a run picks work that
60
+ serves it, and a PR names the priority it serves. Keep it to three priorities or fewer, and
61
+ rewrite it when the month turns.
62
+
63
+ Without it each staff member picks its own work from its own charter, and they drift. `roster
64
+ init` writes a stub; `roster doctor` warns while it is missing or still the stub. An org that
65
+ predates it just adds the file.
66
+
27
67
  ## The brain
28
68
 
29
69
  A staff member's repository *is* their memory. There is no database.
@@ -65,7 +105,7 @@ exports declares `gallery` and `table`; nothing in the portal knows what a CMO i
65
105
 
66
106
  ```
67
107
  org/operating.md + org/guardrails.md + org/voice.md + org/business.md
68
- + <staff>/CHARTER.md + prompts/<kind>.md
108
+ + org/priorities.md + <staff>/CHARTER.md + prompts/<kind>.md
69
109
  ```
70
110
 
71
111
  Built at run time by `compose.mjs` in the tenant's own repo. See it for yourself on the
@@ -90,21 +130,15 @@ control.
90
130
  A `mention` prompt refuses to compose without trigger context, because it is written for the
91
131
  comment that woke it. That is correct behaviour, not a bug.
92
132
 
93
- There used to be a third, `pr-mention`: a review comment on the public product repo, forwarded
94
- into the brain by a workflow in that repo. It was removed. Two repos, a dispatch, a forwarder
95
- with its own author gate and a second reaction path bought one thing: asking for a change
96
- without leaving the diff. It cost more than that was worth, in explaining and in debugging.
97
-
98
- What replaced it is the reply box. A pull request is on the product repo, and **nothing in a
99
- product repo wakes anybody**: a staff member's caller workflow is in their own brain repo and
133
+ **Nothing in a product repo wakes anybody.** A pull request is on the product repo, and a staff member's caller workflow is in their own brain repo and
100
134
  gates on their `@handle` appearing *there*. So naming somebody in a reply where a comment will
101
135
  not reach them offers, under the box, to open the request on their tracker as well. One press
102
136
  posts your words on the thread and sends them the pull request, the branch, the hunk you were
103
137
  looking at if you started from a file, and an instruction to answer on the pull request rather
104
138
  than in the tracker it arrived in.
105
139
 
106
- It is two `gh` calls as you, rather than a workflow, a dispatch and a second gate, which is the
107
- difference that got the forwarder deleted. See [the portal](portal.md#asking-for-a-change).
140
+ It is two `gh` calls as you, rather than a workflow in the product repo with its own gate and
141
+ its own credential. See [the portal](portal.md#asking-for-a-change).
108
142
 
109
143
  ## Identities
110
144
 
package/docs/cost.md CHANGED
@@ -12,19 +12,54 @@ Three separate bills, and they behave differently.
12
12
 
13
13
  The largest by far, and the one that scales with how much work you ask for.
14
14
 
15
+ On a Claude subscription, through a Claude Code OAuth token, it is a flat subscription rather
16
+ than spend per token, and what grows with a session is how much of its usage you take. That is
17
+ how Pip's staff run.
18
+
15
19
  A session's cost is roughly its length. Ours run 11 to 55 minutes of wall clock, and a longer
16
20
  session is a bigger bill as well as a slower one. The lever that matters is not the model
17
21
  setting, it is how much you ask a staff member to do each morning and how much context it has
18
22
  to read to start.
19
23
 
20
24
  That is why the memory system is shaped the way it is. Boot context here went from about 52,000
21
- words to about 6,000 by moving from a narrative status file to one line per fact. That is a
25
+ words to about 10,000 today by moving from a narrative status file to one line per fact. That is a
22
26
  direct, repeated saving on every run of every staff member.
23
27
 
24
28
  **Watch for sessions growing into their ceiling.** A run that gets killed at
25
29
  `timeout_minutes` has been paid for and produced nothing. Health, and `roster doctor`, report
26
30
  the ratio.
27
31
 
32
+ ## What each run cost
33
+
34
+ Every session writes down what it was, after the agent finishes or fails: staff, kind, outcome,
35
+ duration, and turns, cost and tokens where the agent reports them. It goes in the job summary,
36
+ and into an artifact called `roster-run` holding one `run.json`.
37
+
38
+ Which agents report what:
39
+
40
+ | Agent | Turns, cost, tokens |
41
+ |---|---|
42
+ | `claude-code-action` | yes, from the Action's execution file |
43
+ | `claude` | yes, from `--output-format json` |
44
+ | anything else | only if its `run` writes the agent's result JSON to `$AGENT_RESULT_FILE` |
45
+
46
+ What is not reported is recorded as unknown, never as zero. A total built from guesses is worse
47
+ than none, so every total says how many runs it could price. The cost is the agent's own figure:
48
+ on a subscription it is what the tokens would have cost, not what you were billed.
49
+
50
+ The portal's [Runs](portal.md#runs) screen lists them per staff member, with a link to each log
51
+ and a 30-day total.
52
+
53
+ ## Budgets
54
+
55
+ An optional [`budget`](org-yaml.md#budget) in `org.yaml`, in dollars over any trailing 30 days,
56
+ for the org or for one staff member. Past it, `roster doctor` warns (`budget`) and the Runs
57
+ screen marks the total.
58
+
59
+ It is a warning and never a cap. Stopping a session mid-run fails it after the work is done and
60
+ committed, which is also why there is no `--max-turns`. Use the warning to go and
61
+ look at which runs cost most and why; the levers are below.
62
+
28
63
  ## GitHub Actions minutes
29
64
 
30
65
  Real on private repositories, and easy to forget because it is metered per minute of runner
@@ -34,10 +34,8 @@ test/ one file per area
34
34
  module per screen under `js/views/`. `roster portal` serves them from `/assets`, reading each
35
35
  file per request. Editing a stylesheet and reloading the page is the whole edit loop.
36
36
 
37
- It was one 2,100-line HTML file until the CSS and the seven screens grew past the point where
38
- any of them could be found in it. Splitting it needed no bundler, because the browser resolves
39
- the module graph itself, and a bundler would have been a build step in a tool whose selling
40
- point is that it does not have one.
37
+ No bundler, because the browser resolves the module graph itself, and a bundler would be a
38
+ build step in a tool whose selling point is that it does not have one.
41
39
 
42
40
  ```
43
41
  templates/portal/
@@ -64,13 +62,12 @@ registers into at boot.
64
62
 
65
63
  ## The rule that matters
66
64
 
67
- **Never fix a generated file in a tenant.** `compose.mjs`, `agents.mjs`, `runner-plan.mjs` and
68
- `session.yaml` live in `templates/ops/`. Fix them there and run `roster upgrade`.
65
+ **Never fix a generated file in a tenant.** `compose.mjs`, `agents.mjs`, `runner-plan.mjs`,
66
+ `inflight.mjs`, `run-record.mjs` and `session.yaml` live in `templates/ops/`. Fix them there and run `roster upgrade`.
69
67
 
70
- This has gone wrong once already. A fix went into `roster-ops/.github/workflows/session.yaml`
71
- instead of the template and nothing noticed, because the framework had not touched that file
72
- yet. `roster upgrade` now reports an edit to a framework-owned file whether or not anything has
73
- collided, and `roster upgrade --check` fails on it.
68
+ A fix made in the tenant's copy goes unnoticed until the framework next touches that file, and
69
+ then it is a conflict. So `roster upgrade` reports an edit to a framework-owned file whether or
70
+ not anything has collided, and `roster upgrade --check` fails on it.
74
71
 
75
72
  ## Template classes
76
73
 
@@ -101,21 +98,19 @@ marker, or the leftover line is stranded.
101
98
 
102
99
  ## How the tests are meant to work
103
100
 
104
- Three habits, each of which came from a test that was passing vacuously.
101
+ Three habits, each of which guards against a test that passes without testing anything.
105
102
 
106
- **Test the harness, not just the code.** The portal tests set a property on a dead object for
107
- several rounds, because the state they were driving was a top-level `let` in a classic script
108
- and not reachable as a global. The state is now an exported object, so the tests import the
109
- real modules under a DOM shim and there is nothing to get wrong.
103
+ **Test the harness, not just the code.** The portal's state is an exported object, so the tests
104
+ import the real modules under a DOM shim and drive the same state the page does. A test that
105
+ sets a property on something the code never reads cannot fail.
110
106
 
111
- **Run it against reality.** The portal and doctor tests build from the live workspace rather
112
- than a fixture, so they break when real data grows a shape the code cannot handle. That is how
113
- the brain-comparison bug was found: every live workflow reported as absent, because filenames
114
- are templated and the comparison did not render them.
107
+ **Run it against reality when you can.** The suite builds a temporary tenant by default, so it
108
+ runs for anybody who clones the repo. Set `ROSTER_TEST_WORKSPACE=<dir>` to run the portal and
109
+ doctor tests against a real workspace instead, which is how you catch real data growing a shape
110
+ the code cannot handle: templated filenames, for instance, that a comparison forgot to render.
115
111
 
116
112
  **Mutation-test the invariants.** For anything asserting "this behaviour must not regress",
117
- break it deliberately and check the test fails. The workflow-template tests were verified this
118
- way, one mutation each.
113
+ break it deliberately and check the test fails. If it does not, the assertion is decoration.
119
114
 
120
115
  ## Adding a command
121
116
 
@@ -33,7 +33,13 @@ ran at all.
33
33
  | `agent.config` | **fail.** The agent needs a config file of its own and it is missing, or still has a `FILL IN` in it. Nanocoder is the one preset that does: it is a client rather than a model, so without a provider it starts, finds nothing to call, and exits. |
34
34
  | `business` | **fail** if `org/business.md` is missing. Every prompt is composed on top of it. |
35
35
  | `business.stub` | `org/business.md` is still the questions it shipped with. Nothing errors; the agents just write competent work about a business that does not exist. |
36
- | `actions-access` | **fail** unless the ops repo is callable from the whole organisation. This is the "workflow not found" trap. See [manual steps](manual-steps.md#1-allow-the-ops-repos-workflow-to-be-called). |
36
+ | `priorities` | No `org/priorities.md`. Nothing breaks; each staff member just picks its own direction. See [concepts](concepts.md#priorities). |
37
+ | `priorities.stub` | `org/priorities.md` is still the stub `roster init` wrote. |
38
+ | `actions-access` | **fail** unless the ops repo is callable from the whole organisation. This is the "workflow not found" trap. See [manual steps](manual-steps.md#what-roster-does-for-you). |
39
+ | `workflows` | No workflow in the repo is failing run after run. Reported for the ops repo here, and for each brain repo under its staff member. |
40
+ | `workflows.failing` | **fail.** A workflow that is not one of roster's callers has failed at least its last two runs, with the date it started. Skipped and cancelled runs are stepped over. This is the canary that goes red and stays red, because whatever would have said so broke with it. |
41
+ | `budget` | Trailing 30-day spend against a `budget` in `org.yaml`, for the org here and for a staff member under their name. A warning when it is past, never a failure, and only read when a budget is set. Cost comes from each run's record, so it says how many runs it could price. See [cost](cost.md#budgets). |
42
+ | `review-gate` | One per product repo. **fail** when nothing requires a pull request on its default branch, or a staff App can bypass the rule; a warning when a PR is required with no approving review, or the settings cannot be read. See [security](security.md#the-review-gate). |
37
43
  | `upgrade` | The tenant is in sync with the framework. |
38
44
  | `upgrade.stale` | Generated files are behind. `roster upgrade --apply`. |
39
45
  | `upgrade.owned` | **fail.** A framework-owned file was edited in the tenant. Move the change upstream or the next upgrade reverts it. |
@@ -55,7 +61,7 @@ ran at all.
55
61
  | `callers.uses` | **fail.** A caller references no reusable workflow, or one in a different organisation. A private reusable workflow is only callable inside its own org. |
56
62
  | `callers.target` | **fail.** A caller points at a workflow file that is not in the ops repo. Fails at run time as "workflow not found". |
57
63
  | `surfaces` | A surface declared in `staff.yaml` is not on disk. The portal renders nothing for it. |
58
- | `secrets` | Every secret the callers reference exists on the brain repo. Derived from the callers themselves, not a fixed list. |
64
+ | `secrets` | Every secret the callers reference exists on the brain repo, or is an organisation secret shared with it. Derived from the callers themselves, not a fixed list. |
59
65
  | `labels` | Every label declared in `staff.yaml` exists. An agent applying a label that does not exist gets an API error mid-run. |
60
66
  | `peer-labels` | The `from-<handle>` label exists on the *peer's* tracker, which is where this staff member's asks land. |
61
67
  | `status-issue` | The declared status issue is actually pinned. If not, the place you look is not the place the agent maintains. |
package/docs/extending.md CHANGED
@@ -24,8 +24,8 @@ there too.
24
24
  | `guardrails.md` | non-negotiables. What nobody may do, regardless of charter. |
25
25
  | `operating.md` | the autonomy contract: the boot ritual, the hand-off, decision rights. |
26
26
 
27
- This is the seam that pays. A concision rule here used to mean editing twelve files across two
28
- repositories; now it is one file, and the next morning everybody has it.
27
+ This is the seam that pays. A rule written here is one file, and the next morning everybody
28
+ has it.
29
29
 
30
30
  Keep the split honest. If a rule would be true of every staff member you will ever hire, it
31
31
  belongs here. If it is about one role, it belongs in that role's charter.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Getting started"
3
- description: "Stand up an org and a first staff member, from the portal."
3
+ description: "From nothing to a first staff member's first finished run, in the portal."
4
4
  sidebar_order: 1
5
5
  ---
6
6
 
@@ -10,113 +10,125 @@ sidebar_order: 1
10
10
  npx @nanocollective/roster
11
11
  ```
12
12
 
13
- Run that in an empty directory. There is nothing else to install and nothing to configure
14
- first: the page that opens is the setup screen, and it is the whole of setup.
13
+ Run that in an empty directory. The page that opens is the setup screen, and it is the whole of
14
+ setup. Every step below is also a command, listed at the end; they do the same work on the same
15
+ files.
15
16
 
16
- You need two things before you start. `gh` [authenticated](https://cli.github.com), and a
17
- credential for whichever [coding agent](agents.md) you want to run. A GitHub organisation too,
18
- if you do not already have one: GitHub has no API for creating one, so that part happens on
19
- github.com.
17
+ **How long it takes:** about an hour and a half to two hours to a first staff member's first
18
+ finished run. Most of that is writing: what the business is, and the staff member's charter,
19
+ each a conversation of twenty to thirty minutes with your own AI. The rest is about a dozen
20
+ clicks and waiting for the run. Those two files are what make the staff worth running, so that
21
+ hour is the part not to rush.
20
22
 
21
- Everything below is also a command, and the commands are in [the CLI
22
- reference](commands.md). They do the same work on the same files. This page is the portal
23
- because that is the shorter road, not because the terminal is second class.
23
+ ## Before you start
24
24
 
25
- ## 1. Say which organisation
25
+ - **`gh`, [signed in](https://cli.github.com)**, as someone who owns the organisation. roster
26
+ does everything through your own `gh` and holds no token of its own.
27
+ - **A GitHub organisation.** GitHub has no API for creating one, so if you need one, make it on
28
+ github.com first. Brains are private repos; on GitHub Free that works, with one difference in
29
+ step 5.
30
+ - **A credential for your [coding agent](agents.md).** For Claude Code, run
31
+ `claude setup-token` and keep the token it prints for step 5.
26
32
 
27
- ![The setup screen, asking which organisation and who runs it](images/setup-org.jpg)
33
+ You only need [the six things in Concepts](concepts.md#the-six-things-you-need-to-know) to follow
34
+ this. Everything else can wait.
28
35
 
29
- **It works out which of two things this is, and you do not have to know.** An organisation
30
- that does not run roster yet gets one stood up. One that already does gets *checked out* here
31
- instead, ops repo and every staff repo side by side, which is the shape the CI runner uses.
32
- That second case is how somebody joins an org a colleague set up, and offering both is how an
33
- org ends up with two `roster-ops` repos.
36
+ ## 1. Say which organisation, then read the plan
34
37
 
35
- The rest of the card is three answers: what the business is called, which GitHub login the
36
- agents answer to, and which coding agent runs a session. The agent is the one that is awkward
37
- to change later, because it decides which credential the repos need.
38
+ ![The setup screen, asking which organisation and who runs it](images/setup-org.jpg)
38
39
 
39
- ## 2. Read the plan before anything exists
40
+ Pick the organisation, say what the business is called and which coding agent runs a session.
41
+ If the organisation already runs roster, the page offers to check it out here instead, which is
42
+ how a second person joins.
40
43
 
41
44
  ![The plan: sixteen files and one private repo, listed before anything is written](images/setup-plan.jpg)
42
45
 
43
- Nothing has been created yet. **Show me the plan** lists every file and every repo it would
44
- make, and *Create it* is a separate button. This is the pattern everywhere in roster: the plan
45
- first, then the apply, and the same `initFiles` behind both the browser and the terminal so
46
- they cannot disagree about what a new tenant contains.
46
+ **Show me the plan** lists every file and repo it would make; *Create it* is a separate button.
47
+ That is the pattern everywhere in roster: the plan first, then the apply.
47
48
 
48
- After it applies you have `acme/roster-ops`: the org layer, the runner machinery, and a
49
- recorded merge base so later [upgrades](upgrading.md) are merges rather than copies.
49
+ Creating it makes `<org>/roster-ops` and **sets its Actions access** so every repo in the org
50
+ can call its workflow. Without that every run fails with "workflow not found". If GitHub refuses
51
+ (it needs admin on the repo), the page says why and links to the setting to click instead.
50
52
 
51
- ## 3. The Actions setting
53
+ The rest of the steps stay on the same page. Reload it and the portal opens on **Getting
54
+ started**, which keeps them in the sidebar until they are done, with hiring first.
52
55
 
53
- The page asks for this next and deep-links to the exact settings page, because it is the one
54
- step whose failure is unrecognisable.
56
+ ## 2. Say what the business is
55
57
 
56
- **Settings → Actions → General on `roster-ops`, set access to "accessible from repositories in
57
- the organisation".** Skip it and every workflow later fails with "workflow not found", which
58
- reads like a typo and is not one.
58
+ `org/business.md` ships as questions, and it is composed into the top of every prompt. An agent
59
+ that cannot answer them writes plausible work about a business that does not exist.
59
60
 
60
- It is on [manual steps](manual-steps.md) with the others roster cannot do for you, and
61
- [Health](#7-health-then-one-run-by-hand) keeps asking until it is done.
61
+ **Copy the prompt** puts a brief on your clipboard with every file it refers to inside it. Paste
62
+ it into Claude, ChatGPT or anything else; it interviews you and hands back the file. Paste the
63
+ reply into the box and you get a diff and a save button. See
64
+ [the portal](portal.md#copy-a-prompt-paste-the-answer-back).
62
65
 
63
- ## 4. Say what the business is
66
+ Then `org/priorities.md`: what matters this month, ranked, and what is out of scope. A few
67
+ lines, only you can write it, so it opens in place on the setup screen and saves the same way.
68
+ See [concepts](concepts.md#priorities).
64
69
 
65
- `org/business.md` ships as questions, and it is composed into the top of every prompt. An agent
66
- that cannot answer them writes plausible work about a business that does not exist, so this
67
- comes before hiring anybody.
70
+ ## 3. Hire someone
68
71
 
69
- roster holds no model credential and cannot write it for you. What the portal does instead is
70
- both halves of the round trip: **Copy the prompt** puts a self-contained brief on your
71
- clipboard, and **paste the answer back** turns the reply into a file, with a diff and a button
72
- rather than a silent save. See [the portal](portal.md#copy-a-prompt-paste-the-answer-back).
72
+ ![The Staff screen, with a card per staff member and Hire someone underneath](images/staff.jpg)
73
73
 
74
- ## 5. Hire someone
74
+ **Staff → Hire someone.** Only the handle is required. The plan shows the repo it creates, the
75
+ schedule it chose, and the commits it will make **as you** in repos that already exist: each
76
+ peer's `staff.yaml`, and `org.yaml`. Nothing is left uncommitted on disk.
75
77
 
76
- ![The Staff screen, with a card per staff member and Hire someone underneath](images/staff.jpg)
78
+ For the first hire there is nobody to copy an App name from, so the form asks for two: this
79
+ staff member's App, and the shared public App. Names are unique across GitHub, so prefix them
80
+ with the org. The public one only matters if a product repo is public; leave it empty when they
81
+ are all private.
82
+
83
+ Product repos come from `org.yaml`. Mark one on the setup screen, or later with **Org → Add a
84
+ product repo**.
85
+
86
+ ## 4. Create the App, and confirm the install
77
87
 
78
- **Staff → Hire someone.** Only the handle is required; everything else is copied from whoever
79
- is already here. You get the plan first: every file, every label, the schedule it chose and
80
- why, the peer wiring in both directions, and the steps it cannot do for you.
88
+ **GitHub App**, on the new card. GitHub has no API that creates an App, so a tab opens and you
89
+ confirm. The App's id and private key go straight into the repo's secrets and never touch disk.
81
90
 
82
- For the first hire in a new org there is nobody to copy an identity from, so the App names are
83
- asked for rather than guessed at. Later hires infer both.
91
+ Then **Install it**. The install page opens with the organisation and every repo this staff
92
+ member needs already ticked: its brain, the trackers of its peers, and the product repos. Check
93
+ the list and confirm. That confirmation is yours by design: installing grants access, and GitHub
94
+ asks a person.
84
95
 
85
- ## 6. Give them an identity, and install it
96
+ ## 5. Store the agent credential, once
86
97
 
87
- **GitHub App**, on the same card. There is no API that creates a GitHub App, so this runs the
88
- manifest flow: a manifest is posted to a settings page, you confirm, and GitHub hands back a
89
- one-time code. The private key is held in memory and written straight to a repository secret
90
- without ever touching disk.
98
+ **Agent credential**, on the card or on the setup screen. Paste the token from `claude
99
+ setup-token` (or your agent's key; the box says where to get one). It is stored as one
100
+ organisation secret, shared with the brain repos, and each later hire is added to it. It is not
101
+ asked for again.
91
102
 
92
- **What it cannot do is install the App.** That is a grant of access to specific repositories
93
- and GitHub asks a human to choose them, which is correct. Grant it every tracker the staff
94
- member writes to, not only their own. This is the step that most often looks done and is not.
103
+ On GitHub Free an org secret does not reach private repos, so there it goes on each brain repo
104
+ instead, and the page says so. It is still one paste now; a later hire needs it once more.
95
105
 
96
- Then **Write the charter**, which is the same copy-a-prompt loop as `business.md`, aimed at
97
- `CHARTER.md`. `hire` deliberately does not generate one: a generated charter produces exactly
98
- the generic agent this whole arrangement exists to avoid. It is the file that decides
99
- everything else, so it is worth the time. [Writing a charter](writing-a-charter.md).
106
+ ## 6. Write the charter
100
107
 
101
- ## 7. Health, then one run by hand
108
+ **Write the charter**, on the card. The same copy-a-prompt loop as step 2, aimed at
109
+ `CHARTER.md`, carrying the org layer, the peers' charters and, where the role matches one, a
110
+ [worked example](writing-a-charter.md#worked-examples) to model the shape on. The brief
111
+ interviews you; the charter is yours. roster never generates one, because a generated charter
112
+ makes exactly the generic agent this whole arrangement exists to avoid.
102
113
 
103
- **Health** is `roster doctor` on the page, every finding carrying the sentence that fixes it,
104
- split into what an agent can do and what only a person can. Work through it until the ids are
105
- gone.
114
+ ## 7. Run it once
106
115
 
107
- Then trigger the daily workflow once from the Actions tab and read the log.
116
+ **Run once now**, on the card or on **Health**. It starts the daily workflow, follows it, and
117
+ tells you how it ended, with the log.
108
118
 
109
- **A workflow that has never run has proved nothing.** Not that the App is installed, not that
110
- the grant took, not that the secrets are right. `doctor` says `unproven` rather than `fine` for
111
- exactly this reason.
119
+ **A workflow that has never run has proved nothing**: not that the App is installed on the right
120
+ repos, not that the secrets are right. Doctor reports it as `unproven` until one run has
121
+ finished, and this is that run. If it fails, the result names the step, and
122
+ [troubleshooting](troubleshooting.md) has what each failure usually means.
123
+
124
+ Health is `roster doctor` on the page. Every finding carries the sentence that fixes it.
112
125
 
113
126
  ## 8. Now look at what you built
114
127
 
115
128
  ![A staff member's brain: memory sections, the facts in them, and the files](images/brain.jpg)
116
129
 
117
- **Brain** is that staff member's memory and files together, because they were always the same
118
- thing. **Prompt** is the text they are actually sent, composed by your own `compose.mjs`, with
119
- every layer it was made of and which repo each came from.
130
+ **Brain** is that staff member's memory and files together. **Prompt** is the text they are
131
+ actually sent, with every layer it was made of and which repo each came from.
120
132
 
121
133
  ![The Prompt screen: the composed text, and the layers behind it](images/prompt.jpg)
122
134
 
@@ -126,14 +138,35 @@ that*. The answer is always in one of those files.
126
138
  ![The Org screen, with org.yaml and every layer every staff member inherits](images/org.jpg)
127
139
 
128
140
  **Org** is the layer everybody inherits. Change `org/voice.md` once and it reaches every staff
129
- member on their next run, without regenerating anything.
141
+ member on their next run.
142
+
143
+ ## From a terminal
144
+
145
+ The same road, command by command. Each prints its plan and changes nothing without `--apply`.
146
+
147
+ ```bash
148
+ roster init --org acme --apply # the ops repo, and its Actions access
149
+ roster brief discover # a brief for org/business.md; write priorities.md too
150
+ roster hire cto --apply # the brain, the wiring, the commits as you
151
+ roster app cto --apply # the App, its secrets, and a pre-ticked install link
152
+ roster credential --apply # the agent credential, once for the org
153
+ roster brief charter cto # the charter brief, with the CTO example
154
+ roster run cto --apply # one run, followed to the end
155
+ ```
156
+
157
+ ## What is still yours to do
158
+
159
+ Five things, each because GitHub or the job itself needs a person: creating the organisation,
160
+ confirming the App, confirming its install, getting the agent credential, and writing
161
+ `business.md`, `priorities.md` and each charter. [Manual steps](manual-steps.md) has why for
162
+ each.
130
163
 
131
164
  ## Where things go from here
132
165
 
133
- - **A second staff member**: Staff → Hire someone, then the App. Peer wiring happens both ways.
166
+ - **A second staff member**: Staff → Hire someone, then GitHub App, the charter and one run. The
167
+ credential is already there.
134
168
  - **Answering your agents**: [the Inbox](portal.md#inbox) is everything open across the org, and
135
- the reply goes out as you. Work they finished sits in [Pending work](portal.md#pending-work);
136
- asking for a change to it is [one button](portal.md#asking-for-a-change).
169
+ the reply goes out as you. Work they finished sits in [Pending work](portal.md#pending-work).
137
170
  - **A framework update**: `roster upgrade`, or the same from the portal. See
138
171
  [upgrading](upgrading.md).
139
172
  - **The whole portal**, screen by screen: [the portal](portal.md).