@nanocollective/roster 0.1.0-alpha.2 → 0.1.0-alpha.20

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 (96) hide show
  1. package/README.md +65 -84
  2. package/dist/cli.js +4733 -2490
  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/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 +90 -11
  10. package/docs/concepts.md +64 -12
  11. package/docs/cost.md +39 -3
  12. package/docs/developing.md +16 -21
  13. package/docs/doctor-codes.md +21 -6
  14. package/docs/export.md +2 -1
  15. package/docs/extending.md +13 -4
  16. package/docs/getting-started.md +118 -80
  17. package/docs/images/brain.jpg +0 -0
  18. package/docs/images/org.jpg +0 -0
  19. package/docs/images/prompt.jpg +0 -0
  20. package/docs/images/setup-org.jpg +0 -0
  21. package/docs/images/setup-plan.jpg +0 -0
  22. package/docs/images/staff.jpg +0 -0
  23. package/docs/manual-steps.md +94 -101
  24. package/docs/memory.md +29 -8
  25. package/docs/org-yaml.md +76 -11
  26. package/docs/portal.md +261 -47
  27. package/docs/prompts.md +77 -11
  28. package/docs/security.md +51 -7
  29. package/docs/session-workflow.md +51 -21
  30. package/docs/staff-yaml.md +16 -7
  31. package/docs/troubleshooting.md +23 -20
  32. package/docs/upgrading.md +6 -0
  33. package/docs/writing-a-charter.md +33 -17
  34. package/package.json +1 -1
  35. package/templates/brain/.github/workflows/%%STAFF%%-daily.yaml +7 -0
  36. package/templates/brain/.github/workflows/%%STAFF%%-mention.yaml +16 -4
  37. package/templates/brain/CHARTER.md +3 -3
  38. package/templates/brain/README.md +1 -0
  39. package/templates/brain/log/decisions.md +3 -0
  40. package/templates/brain/staff.yaml +0 -1
  41. package/templates/brain/strategy/ideas.md +7 -0
  42. package/templates/ops/.github/workflows/session.yaml +117 -40
  43. package/templates/ops/agents.mjs +127 -8
  44. package/templates/ops/compose.mjs +77 -7
  45. package/templates/ops/inflight.mjs +157 -0
  46. package/templates/ops/org/operating.md +21 -7
  47. package/templates/ops/org/voice.md +9 -0
  48. package/templates/ops/prompts/_identity.md +8 -1
  49. package/templates/ops/prompts/_inflight.md +14 -0
  50. package/templates/ops/prompts/_paths.md +2 -1
  51. package/templates/ops/prompts/daily.md +16 -7
  52. package/templates/ops/prompts/mention.md +18 -2
  53. package/templates/ops/run-record.mjs +144 -0
  54. package/templates/portal/css/base.css +238 -64
  55. package/templates/portal/css/brain.css +30 -20
  56. package/templates/portal/css/diff.css +15 -10
  57. package/templates/portal/css/graph.css +12 -7
  58. package/templates/portal/css/health.css +32 -11
  59. package/templates/portal/css/inbox.css +117 -14
  60. package/templates/portal/css/layout.css +93 -41
  61. package/templates/portal/css/markdown.css +57 -15
  62. package/templates/portal/css/runs.css +13 -0
  63. package/templates/portal/css/setup.css +83 -39
  64. package/templates/portal/index.html +24 -3
  65. package/templates/portal/js/api.js +65 -4
  66. package/templates/portal/js/app.js +112 -12
  67. package/templates/portal/js/dialog.js +94 -4
  68. package/templates/portal/js/dom.js +25 -0
  69. package/templates/portal/js/icons.js +8 -1
  70. package/templates/portal/js/lightbox.js +273 -0
  71. package/templates/portal/js/md.js +23 -6
  72. package/templates/portal/js/mdedit.js +84 -0
  73. package/templates/portal/js/mention.js +264 -0
  74. package/templates/portal/js/refresh.js +136 -6
  75. package/templates/portal/js/state.js +55 -8
  76. package/templates/portal/js/views/app.js +23 -5
  77. package/templates/portal/js/views/checklist.js +29 -10
  78. package/templates/portal/js/views/credential.js +98 -0
  79. package/templates/portal/js/views/docs.js +94 -4
  80. package/templates/portal/js/views/files.js +58 -14
  81. package/templates/portal/js/views/graph.js +1 -1
  82. package/templates/portal/js/views/health.js +178 -37
  83. package/templates/portal/js/views/inbox.js +938 -98
  84. package/templates/portal/js/views/memory.js +16 -1
  85. package/templates/portal/js/views/org.js +124 -104
  86. package/templates/portal/js/views/orgedit.js +213 -0
  87. package/templates/portal/js/views/paste.js +33 -7
  88. package/templates/portal/js/views/prompt.js +61 -67
  89. package/templates/portal/js/views/repos.js +20 -15
  90. package/templates/portal/js/views/runonce.js +94 -0
  91. package/templates/portal/js/views/runs.js +165 -0
  92. package/templates/portal/js/views/setup.js +311 -83
  93. package/templates/portal/js/views/staff.js +143 -22
  94. package/templates/portal/js/yaml.js +134 -0
  95. package/templates/brain/.github/workflows/%%STAFF%%-pr-mention.yaml +0 -50
  96. 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,163 @@ 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:
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.
55
60
 
56
- ```bash
57
- roster brief discover # paste into whatever agent you use
58
- ```
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).
59
65
 
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.
62
-
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 → 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.
74
77
 
75
- For the first hire in a new org there is nobody to copy an identity from, so name them:
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.
76
82
 
77
- ```bash
78
- roster hire cto --name "Chief Technology Officer" --dir technology \
79
- --app acme-cto --public-app acme-robot --apply
80
- ```
83
+ Product repos come from `org.yaml`. Mark one on the setup screen, or later with **Org → Add a
84
+ product repo**.
81
85
 
82
- Later hires infer both from whoever is already there.
86
+ ## 4. Create the App, and confirm the install
83
87
 
84
- ## 4. Give them an identity
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.
85
90
 
86
- ```bash
87
- roster app cto
88
- ```
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.
89
95
 
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.
96
+ ## 5. Store the agent credential, once
92
97
 
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).
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.
96
102
 
97
- ## 5. Write the charter
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.
98
105
 
99
- ```bash
100
- roster brief charter cto # paste into whatever agent you use
101
- ```
106
+ ## 6. Write the charter
102
107
 
103
- Or, in Claude Code, `cd technology && claude` then `/charter`. Same brief either way.
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.
104
113
 
105
- This is the file that decides everything else. [Writing a charter](writing-a-charter.md).
114
+ ## 7. Run it once
106
115
 
107
- ## 6. Check, then run one by hand
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
- ```bash
110
- roster doctor cto
111
- ```
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.
125
+
126
+ ## 8. Now look at what you built
112
127
 
113
- Fix what it says. Then trigger the daily workflow once from the Actions tab and read the log.
128
+ ![A staff member's brain: memory sections, the facts in them, and the files](images/brain.jpg)
114
129
 
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.
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.
118
132
 
119
- ## 7. Look at it
133
+ ![The Prompt screen: the composed text, and the layers behind it](images/prompt.jpg)
134
+
135
+ Those two answer the question people ask hardest in the first week, which is *why did it do
136
+ that*. The answer is always in one of those files.
137
+
138
+ ![The Org screen, with org.yaml and every layer every staff member inherits](images/org.jpg)
139
+
140
+ **Org** is the layer everybody inherits. Change `org/voice.md` once and it reaches every staff
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`.
120
146
 
121
147
  ```bash
122
- roster portal
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
123
155
  ```
124
156
 
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.
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.
128
163
 
129
164
  ## Where things go from here
130
165
 
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).
166
+ - **A second staff member**: Staff → Hire someone, then GitHub App, the charter and one run. The
167
+ credential is already there.
168
+ - **Answering your agents**: [the Inbox](portal.md#inbox) is everything open across the org, and
169
+ the reply goes out as you. Work they finished sits in [Pending work](portal.md#pending-work).
170
+ - **A framework update**: `roster upgrade`, or the same from the portal. See
171
+ [upgrading](upgrading.md).
172
+ - **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,156 @@
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, each
49
+ peer's tracker, and the product repos. Check the list and confirm.
43
50
 
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.
51
+ **Why not automated:** installing is a grant of access to specific repositories, and GitHub asks
52
+ a person to confirm it. That is correct and should not be worked around.
47
53
 
48
- **If you skip it:** the run fails at the token-minting step with a message about the app not
49
- existing.
54
+ The pre-selection uses `suggested_target_id` and `repository_ids[]` on the install page. GitHub's
55
+ own links use them, but they are not in GitHub's documentation. If the ids cannot be read, or
56
+ GitHub stops honouring them, the link is the plain install page and you tick the repos yourself;
57
+ the portal and `roster app` both list which.
50
58
 
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.
59
+ **If you under-grant it:** this is the trap that costs the most time, because the API reports an
60
+ App's **declaration** separately from an installation's **grant**. `GET /apps/<slug>` will say
61
+ the App exists and has `contents: write` without saying whether it is installed on the repo you
62
+ care about. So **do not verify an installation by reading the API**. Run it once (item 5).
55
63
 
56
64
  ---
57
65
 
58
- ## 3. Install the App, and grant it the right repositories
66
+ ## 4. Get the agent's credential
59
67
 
60
- **Do:** open the URL the portal shows, or that `roster app` prints. Choose repositories.
68
+ **Do:** get a credential for your coding agent (`claude setup-token` for Claude Code; the others
69
+ are in [choosing a coding agent](agents.md#1-the-credential-exists-and-you-have-it)) and paste it
70
+ into **Agent credential**, or pipe it to `roster credential --apply`. It is stored once, as an
71
+ organisation secret shared with the brain repos, and each hire adds its repo to it.
61
72
 
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.
73
+ **Why not automated:** it is your account's credential and roster has no way to obtain one.
71
74
 
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.
75
+ Where an org secret would not arrive, it goes on each brain repo instead and says why. On GitHub
76
+ Free, org secrets do not reach private repos, and only an org owner can set one. Setting an org
77
+ secret also needs the `admin:org` scope on your `gh` token; if it is missing, the credential goes
78
+ on each repo and the output gives the command that adds the scope.
76
79
 
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.
80
+ **If you skip it:** the run fails immediately with `the caller passed no agent credential`.
81
81
 
82
- **Check:** `roster doctor <handle>`, then trigger one run and look again.
82
+ **Check:** Health, or `roster doctor`, lists the secrets each caller references and whether they
83
+ exist, on the repo or shared from the org.
83
84
 
84
85
  ---
85
86
 
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).
87
+ ## 5. Watch the first run
91
88
 
92
- **Why not automated:** it is your account's credential and roster has no way to obtain one.
89
+ **Do:** **Run once now** on the staff card or on Health, or `roster run <handle> --apply`. It
90
+ starts the daily workflow, follows it, and reports how it ended, with the log.
93
91
 
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.
92
+ **Why it is yours:** it is a real run. It does a day's work and costs what one does, so it is a
93
+ button you press rather than something setup does behind your back.
97
94
 
98
- **Check:** `roster doctor` lists the secrets each caller references and whether they exist.
95
+ **Why it matters:** the only thing that proves the whole chain (App created, installed, granted,
96
+ secrets right, ops repo callable) is a run that finished. `roster doctor` reports a workflow
97
+ that has never run as **unproven** rather than fine, and one finished run clears it.
99
98
 
100
99
  ---
101
100
 
102
- ## 5. Write `org/business.md`
101
+ ## 6. Write `org/business.md` and `org/priorities.md`
103
102
 
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.
103
+ **Do:** on the setup screen, **Copy the prompt** puts a brief on your clipboard with every file
104
+ it refers to inside it; paste the reply back and you get a diff and a save button. `roster brief
105
+ discover` prints the same brief. Then write `org/priorities.md`: a few ranked lines on what
106
+ matters this month.
107
107
 
108
- `roster doctor` reports `business.stub` while it is still the questions.
108
+ Health reports `business.stub` and `priorities.stub` while either is still the stub.
109
109
 
110
110
  **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.
111
+ and generic. That is worse than no work, because it takes longer to notice.
113
112
 
114
- **If you skip it:** nothing errors. That is the problem. You get competent-looking output about
115
- a business that does not exist.
113
+ **If you skip it:** nothing errors. That is the problem.
116
114
 
117
115
  ---
118
116
 
119
- ## 6. Write each staff member's `CHARTER.md`
117
+ ## 7. Write each staff member's `CHARTER.md`
120
118
 
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.
119
+ **Do:** **Write the charter** on that staff member's card, the same round trip as item 6. The
120
+ brief carries the org layer, `business.md`, the peers' charters, and where the role matches one,
121
+ a [worked example](writing-a-charter.md#worked-examples) to model the shape on. `roster brief
122
+ charter <handle>` prints the same brief.
124
123
 
125
- **Why not automated:** same reason, one level down. The charter is what makes a staff member
126
- different from the others.
124
+ **Why not automated:** the charter is what makes a staff member different from the others, and
125
+ a generated one is the generic agent this arrangement exists to avoid.
127
126
 
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.
127
+ **If you skip it:** `charter.stub` says nobody has answered it, and the agent produces whatever
128
+ the shared layer implies.
131
129
 
132
130
  ---
133
131
 
134
- ## 7. Commit and push what roster wrote into other repos
132
+ ## 8. Commit what `roster upgrade` wrote
135
133
 
136
- **Do:** `roster hire` and `roster upgrade` write into brain repos on disk. Review, commit, push.
134
+ **Do:** review, commit and push what `roster upgrade --apply` changed in the brain repos.
137
135
 
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.
136
+ **Why not automated:** **App tokens cannot push a change under `.github/workflows/`**, in any
137
+ repository. That is a GitHub restriction, and it is why agents never update their own workflows
138
+ and upgrades are run by a person. Hiring commits its own changes as you, and lists them first.
142
139
 
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.
140
+ **If you skip it:** the change exists locally and nowhere else, and `roster upgrade` reports it as
141
+ pending next time.
145
142
 
146
143
  ---
147
144
 
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:
145
+ ## What roster does for you
153
146
 
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
- ```
147
+ Each of these is a step of a command, listed in its plan before it happens, and each falls back
148
+ to telling you exactly what to click if GitHub refuses.
161
149
 
162
- Then trigger one run by hand before trusting the schedule. A workflow that has never run has
163
- proved nothing.
150
+ | | |
151
+ |---|---|
152
+ | 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". |
153
+ | 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. |
154
+ | Giving each new brain the credential | `roster hire --apply` adds the repo to the org secret. |
155
+ | Choosing repos on the install page | pre-selected, as above. |
156
+ | The review gate on product repos | `roster hire --apply` adds it where there is none. See [security](security.md#the-review-gate). |
package/docs/memory.md CHANGED
@@ -16,8 +16,8 @@ memory/INDEX.md one line per fact. Read in full at every boot.
16
16
  memory/notes/*.md the argument behind a fact. Read only when that fact is in play.
17
17
  ```
18
18
 
19
- That split is the whole design. Boot context here went from about 52,000 words to about 6,000
20
- by making it, and the saving repeats on every run forever.
19
+ That split is the whole design. Boot context here went from about 52,000 words to about 10,000
20
+ today by making it, and the saving repeats on every run forever.
21
21
 
22
22
  ## The grammar
23
23
 
@@ -48,10 +48,27 @@ rumour.
48
48
  Rule 5 is the one that gets skipped and the one that matters. Everything else degrades slowly;
49
49
  this one degrades the boot cost of every future run.
50
50
 
51
+ ## Budgets
52
+
53
+ Prose is advice, and an index nobody prunes grows past what a run can usefully read. So
54
+ `roster lint` warns past three budgets:
55
+
56
+ | Budget | Default | Rule |
57
+ |---|---|---|
58
+ | One fact's line | 400 characters | `too-long`, naming the fact |
59
+ | `memory/INDEX.md` | 24KB | `index-too-big`, naming the three longest facts |
60
+ | `log/decisions.md` | 24KB | `decisions-too-big`: roll older entries into `log/decisions/<YYYY-MM>.md` |
61
+
62
+ Change them under `memory:` in [org.yaml](org-yaml.md#memory), or per staff member in
63
+ [staff.yaml](staff-yaml.md#memory). The daily prompt tells a staff member to check its sizes at
64
+ hand-off and make pruning that run's job when it is over.
65
+
51
66
  ## What does not go in memory
52
67
 
53
68
  - **Why something was decided.** That is `log/decisions.md`, and it is not boot context.
54
69
  - **How a thing works.** That is a draft or a strategy document.
70
+ - **An idea not yet acted on.** That is one line in `strategy/ideas.md`, and it becomes an issue
71
+ only when it needs a ruling.
55
72
  - **What is outstanding.** That is the pinned status issue.
56
73
 
57
74
  Nothing is copied between them. Four places, four jobs, and a fact that appears in two of them
@@ -59,13 +76,17 @@ will disagree with itself within a month.
59
76
 
60
77
  ## Checking it
61
78
 
79
+ **Health**, per staff member, has a **Memory problems** section. Each finding has a button that
80
+ opens an issue in that staff member's own repository asking them to fix it, which is usually the
81
+ right move: they wrote it, and an issue on their tracker is a thing that wakes them.
82
+
83
+ It catches: a missing `So:`, a duplicate slug, a note nothing links to, a link to a note that
84
+ does not exist, an over-long line, a `[measured]` fact with no `n`, an "updated:" chain, and an
85
+ index or decision log over its budget.
86
+
87
+ The same checks, for a terminal or for CI:
88
+
62
89
  ```bash
63
90
  roster lint # everyone
64
91
  roster lint cto # one staff member
65
92
  ```
66
-
67
- Lint catches: a missing `So:`, a duplicate slug, a note nothing links to, a link to a note that
68
- does not exist, an over-long line, a `[measured]` fact with no `n`, and an "updated:" chain.
69
-
70
- The portal's **Health** screen shows the same findings and will open an issue in the staff
71
- member's own repository asking them to fix it, which is usually the right move: they wrote it.