@nanocollective/roster 0.1.0-alpha.3 → 0.1.0-alpha.30

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 (108) hide show
  1. package/README.md +70 -84
  2. package/dist/cli.js +4817 -2374
  3. package/docs/README.md +19 -11
  4. package/docs/agents.md +328 -13
  5. package/docs/architecture.md +13 -5
  6. package/docs/charters/analyst.md +65 -0
  7. package/docs/charters/cmo.md +69 -0
  8. package/docs/charters/community.md +63 -0
  9. package/docs/charters/cto.md +71 -0
  10. package/docs/charters/designer.md +65 -0
  11. package/docs/charters/devops.md +65 -0
  12. package/docs/charters/pm.md +70 -0
  13. package/docs/charters/qa.md +65 -0
  14. package/docs/charters/support.md +60 -0
  15. package/docs/charters/writer.md +63 -0
  16. package/docs/commands.md +95 -11
  17. package/docs/concepts.md +64 -12
  18. package/docs/cost.md +39 -3
  19. package/docs/developing.md +16 -21
  20. package/docs/doctor-codes.md +21 -6
  21. package/docs/export.md +4 -1
  22. package/docs/extending.md +13 -4
  23. package/docs/getting-started.md +133 -79
  24. package/docs/images/brain.jpg +0 -0
  25. package/docs/images/org.jpg +0 -0
  26. package/docs/images/prompt.jpg +0 -0
  27. package/docs/images/setup-org.jpg +0 -0
  28. package/docs/images/setup-plan.jpg +0 -0
  29. package/docs/images/staff.jpg +0 -0
  30. package/docs/manual-steps.md +95 -101
  31. package/docs/memory.md +29 -8
  32. package/docs/org-yaml.md +76 -11
  33. package/docs/portal.md +290 -49
  34. package/docs/prompts.md +77 -11
  35. package/docs/security.md +51 -7
  36. package/docs/session-workflow.md +51 -21
  37. package/docs/staff-yaml.md +17 -7
  38. package/docs/troubleshooting.md +23 -20
  39. package/docs/upgrading.md +9 -3
  40. package/docs/writing-a-charter.md +46 -17
  41. package/package.json +1 -1
  42. package/templates/brain/.github/workflows/%%STAFF%%-daily.yaml +7 -0
  43. package/templates/brain/.github/workflows/%%STAFF%%-mention.yaml +16 -4
  44. package/templates/brain/CHARTER.md +3 -3
  45. package/templates/brain/README.md +1 -0
  46. package/templates/brain/log/decisions.md +3 -0
  47. package/templates/brain/staff.yaml +0 -1
  48. package/templates/brain/strategy/ideas.md +7 -0
  49. package/templates/briefs/priorities.md +46 -0
  50. package/templates/ops/.github/workflows/session.yaml +117 -40
  51. package/templates/ops/agents.mjs +127 -8
  52. package/templates/ops/compose.mjs +77 -7
  53. package/templates/ops/inflight.mjs +157 -0
  54. package/templates/ops/org/operating.md +21 -7
  55. package/templates/ops/org/voice.md +9 -0
  56. package/templates/ops/prompts/_identity.md +8 -1
  57. package/templates/ops/prompts/_inflight.md +14 -0
  58. package/templates/ops/prompts/_paths.md +2 -1
  59. package/templates/ops/prompts/daily.md +16 -7
  60. package/templates/ops/prompts/mention.md +18 -2
  61. package/templates/ops/run-record.mjs +144 -0
  62. package/templates/portal/css/base.css +245 -64
  63. package/templates/portal/css/brain.css +30 -20
  64. package/templates/portal/css/diff.css +15 -10
  65. package/templates/portal/css/graph.css +12 -7
  66. package/templates/portal/css/health.css +32 -11
  67. package/templates/portal/css/inbox.css +117 -14
  68. package/templates/portal/css/layout.css +114 -41
  69. package/templates/portal/css/markdown.css +57 -15
  70. package/templates/portal/css/runs.css +13 -0
  71. package/templates/portal/css/setup.css +126 -39
  72. package/templates/portal/index.html +25 -3
  73. package/templates/portal/js/api.js +74 -4
  74. package/templates/portal/js/app.js +156 -14
  75. package/templates/portal/js/dialog.js +129 -4
  76. package/templates/portal/js/dom.js +25 -0
  77. package/templates/portal/js/icons.js +45 -1
  78. package/templates/portal/js/inflight.js +18 -0
  79. package/templates/portal/js/lightbox.js +273 -0
  80. package/templates/portal/js/md.js +23 -6
  81. package/templates/portal/js/mdedit.js +84 -0
  82. package/templates/portal/js/mention.js +264 -0
  83. package/templates/portal/js/readiness.js +35 -0
  84. package/templates/portal/js/refresh.js +136 -6
  85. package/templates/portal/js/state.js +59 -8
  86. package/templates/portal/js/views/app.js +24 -7
  87. package/templates/portal/js/views/checklist.js +29 -10
  88. package/templates/portal/js/views/credential.js +84 -0
  89. package/templates/portal/js/views/docs.js +94 -4
  90. package/templates/portal/js/views/files.js +58 -14
  91. package/templates/portal/js/views/graph.js +1 -1
  92. package/templates/portal/js/views/health.js +178 -37
  93. package/templates/portal/js/views/hire.js +583 -0
  94. package/templates/portal/js/views/inbox.js +957 -126
  95. package/templates/portal/js/views/memory.js +16 -1
  96. package/templates/portal/js/views/org.js +124 -104
  97. package/templates/portal/js/views/orgedit.js +234 -0
  98. package/templates/portal/js/views/paste.js +87 -21
  99. package/templates/portal/js/views/prompt.js +61 -67
  100. package/templates/portal/js/views/repos.js +20 -15
  101. package/templates/portal/js/views/runonce.js +94 -0
  102. package/templates/portal/js/views/runs.js +165 -0
  103. package/templates/portal/js/views/setup.js +257 -75
  104. package/templates/portal/js/views/staff.js +157 -182
  105. package/templates/portal/js/views/todo.js +62 -0
  106. package/templates/portal/js/yaml.js +134 -0
  107. package/templates/brain/.github/workflows/%%STAFF%%-pr-mention.yaml +0 -50
  108. package/templates/ops/prompts/pr-mention.md +0 -57
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Getting started"
3
- description: "Stand up an org and a first staff member, in seven steps."
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,125 +10,179 @@ sidebar_order: 1
10
10
  npx @nanocollective/roster
11
11
  ```
12
12
 
13
- Run that in an empty directory. It opens a portal in your browser and walks the whole setup:
14
- it checks `gh`, lists the organisations you can see, and asks which one.
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
- **Two answers, and it works out which you need.** An organisation that does not run roster yet
17
- gets one stood up. One that already does gets checked out here instead, ops repo and every
18
- staff repo side by side, which is the shape the CI runner uses. That is how a second person on
19
- a team joins an org somebody else set up.
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
- From there the page carries the rest: the Actions setting that has to be clicked, the repos
22
- your staff work in, hiring, each GitHub App, and a prompt you paste into your own AI to write
23
- `org/business.md` and the charters.
23
+ ## Before you start
24
24
 
25
- You need `gh` authenticated, and a credential for whichever [coding agent](agents.md) you want
26
- to run.
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.
27
32
 
28
- ---
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.
29
35
 
30
- The rest of this page is the same setup from a terminal. Everything the portal does, these do;
31
- nothing writes without `--apply`.
36
+ ## 1. Say which organisation, then read the plan
32
37
 
33
- ## 1. Stand up the org
38
+ ![The setup screen, asking which organisation and who runs it](images/setup-org.jpg)
34
39
 
35
- ```bash
36
- roster init --org acme --name "Acme Robotics"
37
- ```
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.
38
43
 
39
- That prints the plan. Read it, then:
44
+ ![The plan: sixteen files and one private repo, listed before anything is written](images/setup-plan.jpg)
40
45
 
41
- ```bash
42
- roster init --org acme --name "Acme Robotics" --apply
43
- ```
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.
44
48
 
45
- You now have `acme/roster-ops`: the org layer, the runner machinery, and a recorded merge base
46
- so later upgrades 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.
47
52
 
48
- Then do the one thing that cannot wait: **Settings -> Actions -> General on `roster-ops`, set
49
- access to "accessible from repositories in the organisation".** Skip it and every workflow
50
- later fails with "workflow not found", which reads like a typo and is not one.
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.
51
55
 
52
56
  ## 2. Say what the business is
53
57
 
54
- Open `roster-ops/org/business.md`. It ships as questions. Answer them, or:
55
-
56
- ```bash
57
- roster brief discover # paste into whatever agent you use
58
- ```
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
- Or, in Claude Code, `cd roster-ops && claude` then `/discover`. Both print the same brief:
61
- `roster init` generates the slash command from it.
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
- Do this before hiring anyone. It is composed into the top of every prompt, and an agent that
64
- cannot answer these questions writes plausible work about a business that does not exist.
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).
65
69
 
66
70
  ## 3. Hire someone
67
71
 
68
- ```bash
69
- roster hire cto --name "Chief Technology Officer" --dir technology
70
- ```
72
+ ![The Staff screen, with a card per staff member and Hire someone underneath](images/staff.jpg)
71
73
 
72
- Read the plan. It lists every file, every label, the peer wiring in both directions, and the
73
- things it cannot do for you. Then `--apply`.
74
+ **Staff**, then pick a role: CTO, CMO, Support, or **Something else** with a name and a sentence
75
+ about what they do. With nobody hired yet the Staff screen opens on the picker. The role fills
76
+ in the handle, name and repo; they are under **Advanced** if you want to change them.
74
77
 
75
- For the first hire in a new org there is nobody to copy an identity from, so name them:
78
+ The role opens a numbered list: hire, create their GitHub App, write their charter, add your
79
+ agent credential, run once now. The steps after the hire say *Hire first* until it is done.
76
80
 
77
- ```bash
78
- roster hire cto --name "Chief Technology Officer" --dir technology \
79
- --app acme-cto --public-app acme-robot --apply
80
- ```
81
+ Step 1 says in one sentence what the hire creates and when they run. **Show details** has the
82
+ full plan: the repo, the schedule and why, and the commits it will make **as you** in repos that
83
+ already exist: each peer's `staff.yaml`, and `org.yaml`. Nothing is left uncommitted on disk.
81
84
 
82
- Later hires infer both from whoever is already there.
85
+ For the first hire there is nobody to copy an App name from, so **Advanced** also has two:
86
+ this staff member's App, and the shared public App, filled in as `<org>-<handle>` and
87
+ `<org>-robot`. Names are unique across GitHub, so keep the org prefix. The public one only
88
+ matters if a product repo is public.
83
89
 
84
- ## 4. Give them an identity
90
+ Product repos come from `org.yaml`. Mark one on the setup screen, or later with **Org → Add a
91
+ product repo**.
85
92
 
86
- ```bash
87
- roster app cto
88
- ```
93
+ After **Hire** the list stays on the same staff member, now on step 2. Leave and come back later
94
+ with **Finish setting up** on their card.
95
+
96
+ ## 4. Create the App, and confirm the install
89
97
 
90
- A browser opens, GitHub asks you to confirm, and the App's id and private key go straight into
91
- the repository's secrets. The key never touches disk.
98
+ **Create the App**, in step 2. GitHub has no API that creates an App, so a tab opens and you
99
+ confirm. The App's id and private key go straight into the repo's secrets and never touch disk.
100
+ The public App is offered too when a product repo is public.
92
101
 
93
- Then **install it**, using the URL that command prints, granting it every tracker the staff
94
- member writes to. This is the step that most often looks done and is not. See
95
- [manual steps](manual-steps.md#3-install-the-app-and-grant-it-the-right-repositories).
102
+ Then **Install it**. The install page opens with the organisation and every repo this staff
103
+ member needs already ticked: its brain, the trackers of its peers, and the product repos. Check
104
+ the list and confirm. That confirmation is yours by design: installing grants access, and GitHub
105
+ asks a person.
96
106
 
97
107
  ## 5. Write the charter
98
108
 
99
- ```bash
100
- roster brief charter cto # paste into whatever agent you use
101
- ```
109
+ Step 3. **Let an AI interview you** is the same copy-a-prompt loop as step 2 of this guide, aimed
110
+ at `CHARTER.md`, carrying the org layer, the peers' charters and, where the role matches one, a
111
+ [worked example](writing-a-charter.md#worked-examples) to model the shape on. **Start from the
112
+ template** opens that example in an editor with your business's name in it; edit it so it fits
113
+ before saving. **Edit the file** is the file as it is. roster never generates a charter, because
114
+ a generated one makes exactly the generic agent this whole arrangement exists to avoid.
102
115
 
103
- Or, in Claude Code, `cd technology && claude` then `/charter`. Same brief either way.
116
+ ## 6. Store the agent credential, once
104
117
 
105
- This is the file that decides everything else. [Writing a charter](writing-a-charter.md).
118
+ Step 4, shown only while no credential is stored. It is also on the card and on the setup
119
+ screen. Paste the token from `claude setup-token` (or your agent's key; the box says where to
120
+ get one). It is stored as one organisation secret, shared with the brain repos, and each later
121
+ hire is added to it. It is not asked for again.
106
122
 
107
- ## 6. Check, then run one by hand
123
+ On GitHub Free an org secret does not reach private repos, so there it goes on each brain repo
124
+ instead, and the page says so. It is still one paste now; a later hire needs it once more.
108
125
 
109
- ```bash
110
- roster doctor cto
111
- ```
126
+ ## 7. Run it once
127
+
128
+ **Run once now**, step 5, also on the card and on **Health**. It starts the daily workflow, follows it, and
129
+ tells you how it ended, with the log.
130
+
131
+ **A workflow that has never run has proved nothing**: not that the App is installed on the right
132
+ repos, not that the secrets are right. Doctor reports it as `unproven` until one run has
133
+ finished, and this is that run. If it fails, the result names the step, and
134
+ [troubleshooting](troubleshooting.md) has what each failure usually means.
135
+
136
+ Health is `roster doctor` on the page. Every finding carries the sentence that fixes it.
137
+
138
+ ## 8. Now look at what you built
112
139
 
113
- Fix what it says. Then trigger the daily workflow once from the Actions tab and read the log.
140
+ ![A staff member's brain: memory sections, the facts in them, and the files](images/brain.jpg)
114
141
 
115
- **A workflow that has never run has proved nothing.** Not that the App is installed, not that
116
- the grant took, not that the secrets are right. `doctor` says `unproven` rather than `fine` for
117
- exactly this reason.
142
+ **Brain** is that staff member's memory and files together. **Prompt** is the text they are
143
+ actually sent, with every layer it was made of and which repo each came from.
118
144
 
119
- ## 7. Look at it
145
+ ![The Prompt screen: the composed text, and the layers behind it](images/prompt.jpg)
146
+
147
+ Those two answer the question people ask hardest in the first week, which is *why did it do
148
+ that*. The answer is always in one of those files.
149
+
150
+ ![The Org screen, with org.yaml and every layer every staff member inherits](images/org.jpg)
151
+
152
+ **Org** is the layer everybody inherits. Change `org/voice.md` once and it reaches every staff
153
+ member on their next run.
154
+
155
+ ## From a terminal
156
+
157
+ The same road, command by command. Each prints its plan and changes nothing without `--apply`.
158
+
159
+ `roster` below means `npx @nanocollective/roster@latest`, unless you have installed it with
160
+ `npm install -g @nanocollective/roster`.
120
161
 
121
162
  ```bash
122
- roster portal
163
+ roster init --org acme --apply # the ops repo, and its Actions access
164
+ roster brief discover # a brief for org/business.md
165
+ roster brief priorities # a brief for org/priorities.md
166
+ roster hire cto --apply # the brain, the wiring, the commits as you
167
+ roster app cto --apply # the App, its secrets, and a pre-ticked install link
168
+ roster credential --apply # the agent credential, once for the org
169
+ roster brief charter cto # the charter brief, with the CTO example
170
+ roster run cto --apply # one run, followed to the end
123
171
  ```
124
172
 
125
- Everything open across the org, every staff member's memory, what changed since yesterday, and
126
- whether anything is unhealthy. Reads the repositories on disk, so keep them checked out
127
- alongside each other.
173
+ ## What is still yours to do
174
+
175
+ Five things, each because GitHub or the job itself needs a person: creating the organisation,
176
+ confirming the App, confirming its install, getting the agent credential, and writing
177
+ `business.md`, `priorities.md` and each charter. [Manual steps](manual-steps.md) has why for
178
+ each.
128
179
 
129
180
  ## Where things go from here
130
181
 
131
- - A second staff member: `roster hire`, then `roster app`. Peer wiring happens both ways.
132
- - A change to how everyone writes: edit `org/voice.md` once. It reaches everybody on their next
133
- run.
134
- - A framework update: `roster upgrade`. See [upgrading](upgrading.md).
182
+ - **A second staff member**: Staff → Hire someone, then GitHub App, the charter and one run. The
183
+ credential is already there.
184
+ - **Answering your agents**: [the Inbox](portal.md#inbox) is everything open across the org, and
185
+ the reply goes out as you. Work they finished sits in [Pending work](portal.md#pending-work).
186
+ - **A framework update**: `roster upgrade`, or the same from the portal. See
187
+ [upgrading](upgrading.md).
188
+ - **The whole portal**, screen by screen: [the portal](portal.md).
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,163 +1,157 @@
1
1
  ---
2
2
  title: "Manual steps"
3
- description: "Every human action, why it cannot be automated, and what breaks if you skip it."
3
+ description: "What only a person can do, why, and what breaks if it is skipped."
4
4
  sidebar_order: 2
5
5
  ---
6
6
 
7
7
  # Manual steps
8
8
 
9
- Everything a human has to do, why it cannot be automated, and what it looks like when you skip
10
- it. This page exists because every item on it has cost somebody real time.
9
+ What roster cannot do for you, why, and what it looks like when one is skipped. The
10
+ [getting started](getting-started.md) path walks through each of these in order; this page is
11
+ what to read when one of them bites.
11
12
 
12
- **The portal walks you through most of this now.** `roster` with no arguments opens a setup screen
13
- that deep-links item 1, runs items 2 and 3 for you as far as GitHub allows, and hands you a prompt
14
- for items 5 and 6. This page is still the *why*: it is what to read when one of them bites, and
15
- what to check when the page says something is not done.
13
+ **Health**, or `roster doctor`, checks each one it can, and every finding carries the sentence
14
+ that fixes it.
16
15
 
17
- `roster doctor` checks most of these. Run it after each one.
16
+ ---
17
+
18
+ ## 1. Create the organisation
19
+
20
+ **Do:** make it on github.com, if you do not have one.
21
+
22
+ **Why not automated:** GitHub has no API for creating an organisation.
18
23
 
19
24
  ---
20
25
 
21
- ## 1. Allow the ops repo's workflow to be called
26
+ ## 2. Confirm the GitHub App
22
27
 
23
- **Do:** `<org>/roster-ops` -> Settings -> Actions -> General -> *Access* -> **Accessible from
24
- repositories in the organisation**. The setup screen links straight to that page.
28
+ **Do:** press **GitHub App** on a staff card, or run `roster app <handle> --apply`. A tab
29
+ opens; confirm on GitHub. The App's id and private key go straight into the brain repo's
30
+ secrets.
25
31
 
26
- **Why not automated:** it is an organisation permission on a repository, and the API for it
27
- needs admin rights that a token created for a different purpose should not have. roster reads
28
- it and tells you, but setting it is one click and it is yours.
32
+ **Why not automated:** there is no API that creates a GitHub App. The only route is the App
33
+ Manifest flow, where a person confirms on a GitHub page. roster does everything either side of
34
+ that.
29
35
 
30
- **If you skip it:** every caller fails with **"workflow not found"**. That reads like a typo in
31
- a path, or a missing file, or a bad branch reference. You will check all three. It is none of
32
- them, it is this.
36
+ **If you skip it:** the run fails at the token-minting step, saying the App does not exist.
33
37
 
34
- **Check:** `roster doctor` reports `roster-ops is callable from the whole org`.
38
+ The private key is handed to `gh` on standard input. It is never written to a file, never on a
39
+ command line, and never in the process table. If the secret write fails after the App is
40
+ created, the key is gone: generate a new one from the App's settings page and set the secret by
41
+ hand. roster says so if it happens.
35
42
 
36
43
  ---
37
44
 
38
- ## 2. Create the GitHub App
45
+ ## 3. Confirm the App's install
39
46
 
40
- **Do:** the **GitHub App** button on a staff card in the portal, or `roster app <handle>` in a
41
- terminal. Either opens a browser, GitHub asks you to confirm, and you come back. Credentials go
42
- straight into the repository's secrets.
47
+ **Do:** press **Install it** in the portal, or open the link `roster app` prints. The page opens
48
+ with the organisation and the repos this staff member needs already selected: its brain, the
49
+ ops repo (every run checks it out first), each peer's tracker, and the product repos. Check the
50
+ list and confirm. Choosing **All repositories** instead also works.
43
51
 
44
- **Why not fully automated:** there is no API that creates a GitHub App. The only route is the
45
- App Manifest flow: POST a manifest to a settings page, a human confirms, GitHub returns a
46
- one-time code. roster does everything either side of that confirmation.
52
+ **Why not automated:** installing is a grant of access to specific repositories, and GitHub asks
53
+ a person to confirm it. That is correct and should not be worked around.
47
54
 
48
- **If you skip it:** the run fails at the token-minting step with a message about the app not
49
- existing.
55
+ The pre-selection uses `suggested_target_id` and `repository_ids[]` on the install page. GitHub's
56
+ own links use them, but they are not in GitHub's documentation. If the ids cannot be read, or
57
+ GitHub stops honouring them, the link is the plain install page and you tick the repos yourself;
58
+ the portal and `roster app` both list which.
50
59
 
51
- **Note:** the private key is handed to `gh` on standard input. It is never written to a file,
52
- never passed on a command line, and never appears in the process table. If the secret write
53
- fails after the App is created, the key is gone: generate a new one from the App's settings
54
- page and set the secret by hand. roster tells you this if it happens.
60
+ **If you under-grant it:** this is the trap that costs the most time, because the API reports an
61
+ App's **declaration** separately from an installation's **grant**. `GET /apps/<slug>` will say
62
+ the App exists and has `contents: write` without saying whether it is installed on the repo you
63
+ care about. So **do not verify an installation by reading the API**. Run it once (item 5).
55
64
 
56
65
  ---
57
66
 
58
- ## 3. Install the App, and grant it the right repositories
67
+ ## 4. Get the agent's credential
59
68
 
60
- **Do:** open the URL the portal shows, or that `roster app` prints. Choose repositories.
69
+ **Do:** get a credential for your coding agent (`claude setup-token` for Claude Code; the others
70
+ are in [choosing a coding agent](agents.md#1-the-credential-exists-and-you-have-it)) and paste it
71
+ into **Agent credential**, or pipe it to `roster credential --apply`. It is stored once, as an
72
+ organisation secret shared with the brain repos, and each hire adds its repo to it.
61
73
 
62
- **Why not automated:** installing is a grant of access to specific repositories, and GitHub
63
- requires a human to choose them. This is the correct behaviour and should not be worked around.
64
-
65
- **Grant it on every tracker the staff member writes to**, not just their own. The token is
66
- minted organisation-wide, and a peer's board is where a brief lands. Both the portal and
67
- `roster app` say so.
68
-
69
- **If you skip it, or under-grant it:** this is the trap that costs the most time, because of
70
- how it fails.
74
+ **Why not automated:** it is your account's credential and roster has no way to obtain one.
71
75
 
72
- > The API reports an App's **declaration** separately from an installation's **grant**.
73
- > `GET /apps/<slug>` will happily tell you the App exists and has `contents: write`. That says
74
- > nothing about whether it has been installed on the repository you care about. Two of our
75
- > Apps declare permissions they were never granted.
76
+ Where an org secret would not arrive, it goes on each brain repo instead and says why. On GitHub
77
+ Free, org secrets do not reach private repos, and only an org owner can set one. Setting an org
78
+ secret also needs the `admin:org` scope on your `gh` token; if it is missing, the credential goes
79
+ on each repo and the output gives the command that adds the scope.
76
80
 
77
- So: **do not verify an installation by reading the API.** The only thing that proves the whole
78
- chain (App created, installed, granted, secrets right, workflow reachable) is a run that
79
- finished. `roster doctor` reads a window of recent runs for exactly this reason, and reports a
80
- workflow that has never run as **unproven** rather than as fine.
81
+ **If you skip it:** the run fails immediately with `the caller passed no agent credential`.
81
82
 
82
- **Check:** `roster doctor <handle>`, then trigger one run and look again.
83
+ **Check:** Health, or `roster doctor`, lists the secrets each caller references and whether they
84
+ exist, on the repo or shared from the org.
83
85
 
84
86
  ---
85
87
 
86
- ## 4. Set the agent's credential
87
-
88
- **Do:** put the coding agent's credential on each brain repo as a secret. The name follows the
89
- credential: `CLAUDE_CODE_OAUTH_TOKEN`, `CODEX_API_KEY`, and so on. See
90
- [choosing a coding agent](agents.md).
88
+ ## 5. Watch the first run
91
89
 
92
- **Why not automated:** it is your account's credential and roster has no way to obtain one.
90
+ **Do:** **Run once now** on the staff card or on Health, or `roster run <handle> --apply`. It
91
+ starts the daily workflow, follows it, and reports how it ended, with the log.
93
92
 
94
- **If you skip it:** the run fails immediately with `the caller passed no agent credential`.
95
- That check exists so it fails there rather than forty lines later inside the agent, after the
96
- checkouts have already happened.
93
+ **Why it is yours:** it is a real run. It does a day's work and costs what one does, so it is a
94
+ button you press rather than something setup does behind your back.
97
95
 
98
- **Check:** `roster doctor` lists the secrets each caller references and whether they exist.
96
+ **Why it matters:** the only thing that proves the whole chain (App created, installed, granted,
97
+ secrets right, ops repo callable) is a run that finished. `roster doctor` reports a workflow
98
+ that has never run as **unproven** rather than fine, and one finished run clears it.
99
99
 
100
100
  ---
101
101
 
102
- ## 5. Write `org/business.md`
102
+ ## 6. Write `org/business.md` and `org/priorities.md`
103
103
 
104
- **Do:** answer the questions `roster init` leaves in it. The setup screen has a **Copy the
105
- prompt** button that carries every file it refers to, and a box to paste the answer back into;
106
- `roster brief discover` prints the same brief for a terminal.
104
+ **Do:** on the setup screen, **Copy the prompt** puts a brief on your clipboard with every file
105
+ it refers to inside it; paste the reply back and you get a diff and a save button. `roster brief
106
+ discover` prints the same brief. Then write `org/priorities.md`: a few ranked lines on what
107
+ matters this month.
107
108
 
108
- `roster doctor` reports `business.stub` while it is still the questions.
109
+ Health reports `business.stub` and `priorities.stub` while either is still the stub.
109
110
 
110
111
  **Why not automated:** an agent that does not know the business writes work that is plausible
111
- and generic. That is worse than no work, because it takes longer to notice. This file is
112
- composed into the top of every prompt, every run.
112
+ and generic. That is worse than no work, because it takes longer to notice.
113
113
 
114
- **If you skip it:** nothing errors. That is the problem. You get competent-looking output about
115
- a business that does not exist.
114
+ **If you skip it:** nothing errors. That is the problem.
116
115
 
117
116
  ---
118
117
 
119
- ## 6. Write each staff member's `CHARTER.md`
118
+ ## 7. Write each staff member's `CHARTER.md`
120
119
 
121
- **Do:** **Write the charter** on that staff member's card in the portal, or
122
- `roster brief charter <handle>` and paste it into your agent. Or write it by hand;
123
- [writing a charter](writing-a-charter.md) has the shape.
120
+ **Do:** **Write the charter** on that staff member's card, the same round trip as item 6. The
121
+ brief carries the org layer, `business.md`, the peers' charters, and where the role matches one,
122
+ a [worked example](writing-a-charter.md#worked-examples) to model the shape on. `roster brief
123
+ charter <handle>` prints the same brief.
124
124
 
125
- **Why not automated:** same reason, one level down. The charter is what makes a staff member
126
- different from the others.
125
+ **Why not automated:** the charter is what makes a staff member different from the others, and
126
+ a generated one is the generic agent this arrangement exists to avoid.
127
127
 
128
- **If you skip it:** `charter` reports it as present, because the stub is a file. `charter.stub`
129
- is the finding that says nobody has answered it. The agent has no personality and produces
130
- whatever the shared layer implies.
128
+ **If you skip it:** `charter.stub` says nobody has answered it, and the agent produces whatever
129
+ the shared layer implies.
131
130
 
132
131
  ---
133
132
 
134
- ## 7. Commit and push what roster wrote into other repos
133
+ ## 8. Commit what `roster upgrade` wrote
135
134
 
136
- **Do:** `roster hire` and `roster upgrade` write into brain repos on disk. Review, commit, push.
135
+ **Do:** review, commit and push what `roster upgrade --apply` changed in the brain repos.
137
136
 
138
- **Why not automated:** roster does not commit on your behalf into repositories it did not
139
- create in that command. And **App tokens cannot push a change under `.github/workflows/` in any
140
- repository**, which is a GitHub restriction and not a configuration mistake. That is also why
141
- agents can never update their own workflows, and why upgrades are human-run by design.
137
+ **Why not automated:** **App tokens cannot push a change under `.github/workflows/`**, in any
138
+ repository. That is a GitHub restriction, and it is why agents never update their own workflows
139
+ and upgrades are run by a person. Hiring commits its own changes as you, and lists them first.
142
140
 
143
- **If you skip it:** the change exists locally and nowhere else. `roster upgrade` will report it
144
- as still pending next time, which is the intended behaviour.
141
+ **If you skip it:** the change exists locally and nowhere else, and `roster upgrade` reports it as
142
+ pending next time.
145
143
 
146
144
  ---
147
145
 
148
- ## Order
149
-
150
- For a new organisation:
151
-
152
- In the portal, this order is the screen you are looking at. From a terminal:
146
+ ## What roster does for you
153
147
 
154
- ```
155
- roster init --org <org> --apply # 1 applies here
156
- roster hire <handle> --apply # then 7
157
- roster app <handle> # 2, then 3
158
- # 4, 5, 6
159
- roster doctor <handle>
160
- ```
148
+ Each of these is a step of a command, listed in its plan before it happens, and each falls back
149
+ to telling you exactly what to click if GitHub refuses.
161
150
 
162
- Then trigger one run by hand before trusting the schedule. A workflow that has never run has
163
- proved nothing.
151
+ | | |
152
+ |---|---|
153
+ | The ops repo's Actions access | `roster init --apply`, or **Set it for me** on the setup screen. Needs admin on the ops repo. Skipped, every caller fails with "workflow not found". |
154
+ | Committing peer wiring | `roster hire --apply` commits and pushes each peer's `staff.yaml` and `org.yaml` as you. A push that fails is reported and left for you. |
155
+ | Giving each new brain the credential | `roster hire --apply` adds the repo to the org secret. |
156
+ | Choosing repos on the install page | pre-selected, as above. |
157
+ | The review gate on product repos | `roster hire --apply` adds it where there is none. See [security](security.md#the-review-gate). |