@nanocollective/roster 0.1.0-beta.10 → 0.1.0-beta.12
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.
- package/dist/cli.js +6 -2
- package/dist/worker/assets/assets/css/home.css +6 -0
- package/dist/worker/assets/assets/js/homesort.js +4 -21
- package/dist/worker/assets/assets/js/views/home.js +40 -16
- package/dist/worker/index.js +16 -19
- package/docs/architecture.md +8 -8
- package/docs/hosting.md +2 -2
- package/docs/portal.md +4 -4
- package/package.json +1 -1
- package/templates/ops/org/voice.md +2 -3
- package/templates/ops/prompts/daily.md +15 -24
- package/templates/ops/prompts/mention.md +5 -4
- package/templates/portal/css/home.css +6 -0
- package/templates/portal/js/homesort.js +4 -21
- package/templates/portal/js/views/home.js +40 -16
package/docs/architecture.md
CHANGED
|
@@ -58,8 +58,8 @@ directory copy:
|
|
|
58
58
|
fragment for this kind of run.
|
|
59
59
|
7. `agents.mjs` resolves which coding agent to run and how.
|
|
60
60
|
8. The agent runs with a shell, `gh` already authenticated, and the whole checkout.
|
|
61
|
-
9. It works, commits, pushes, opens issues, comments, rewrites `STATE.md` and the body of
|
|
62
|
-
status issue,
|
|
61
|
+
9. It works, commits, pushes, opens issues, comments, and rewrites `STATE.md` and the body of
|
|
62
|
+
its status issue, which is its report.
|
|
63
63
|
**The workflow does not commit on its behalf**; the prompt tells it to and it does.
|
|
64
64
|
10. `run-record.mjs` writes down what the run was: outcome, duration, and turns and cost where
|
|
65
65
|
the agent reports them. It goes in the job summary and a `roster-run` artifact, which is
|
|
@@ -84,15 +84,15 @@ forever.
|
|
|
84
84
|
|
|
85
85
|
## The week's status issue
|
|
86
86
|
|
|
87
|
-
Each staff member has one status issue a week, pinned on their tracker. Its body is
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
Each staff member has one status issue a week, pinned on their tracker. Its body is their
|
|
88
|
+
report, written for you and rewritten by every run: when it was updated, where each priority
|
|
89
|
+
stands, what is on you, what they do next. Nobody comments on it, so there is never a thread to
|
|
90
|
+
scroll; it is one report of where things are.
|
|
91
91
|
|
|
92
92
|
The first daily run of a week (Monday, UTC) opens the new one before the prompt is composed:
|
|
93
93
|
`status-week.mjs` opens it with last week's body, pins it, unpins the old one, takes `keep-open`
|
|
94
|
-
off it, and moves `status_issue:` in `staff.yaml` on and commits that. The run then
|
|
95
|
-
week's
|
|
94
|
+
off it, and moves `status_issue:` in `staff.yaml` on and commits that. The run then rewrites last
|
|
95
|
+
week's body as the week in five lines, and closes it. A week whose summary never got written is offered to
|
|
96
96
|
the next run again. The closed issues, labelled `status`, are the history.
|
|
97
97
|
|
|
98
98
|
What the next run needs from this one lives in `STATE.md` in the brain, not in the issue, so
|
package/docs/hosting.md
CHANGED
|
@@ -60,11 +60,11 @@ CMO to draft this week's post". The tools:
|
|
|
60
60
|
|
|
61
61
|
| Tool | Does |
|
|
62
62
|
|---|---|
|
|
63
|
-
| `brief` |
|
|
63
|
+
| `brief` | Each staff member's report, what needs you (with each decision's default), your requests, what was closed today |
|
|
64
64
|
| `read_thread` | One issue or pull request with every reply |
|
|
65
65
|
| `reply` | A reply as you, optionally closing the issue |
|
|
66
66
|
| `ask_staff` | A new issue on a staff member's tracker with their mention, which starts them |
|
|
67
|
-
| `ask_for_report` | Asks a staff member
|
|
67
|
+
| `ask_for_report` | Asks a staff member to bring their report up to date now |
|
|
68
68
|
| `read_brain` | `STATE.md`, `CHARTER.md`, `memory/INDEX.md`, `log/decisions.md` or `staff.yaml` |
|
|
69
69
|
|
|
70
70
|
It cannot merge, approve, hire, or change the org: those stay on Home, where you see the diff
|
package/docs/portal.md
CHANGED
|
@@ -100,10 +100,10 @@ Where the portal opens. An Ask box at the top, then these, in order.
|
|
|
100
100
|
|
|
101
101
|
- **Ask.** Pick a staff member, type what you want, **Send**. It opens an issue on their
|
|
102
102
|
tracker with their `@handle` in front, which wakes them in about a minute.
|
|
103
|
-
- **Latest reports.** Each staff member's
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
- **Latest reports.** Each staff member's report: the body of their status issue, which every
|
|
104
|
+
run rewrites, with the issues and pull requests it names as links. Click it to open the issue.
|
|
105
|
+
**Ask for a report** asks them, with their `@handle`, to bring it up to date now, which takes a
|
|
106
|
+
few minutes.
|
|
107
107
|
- **Needs you.** Every ask a staff member has put on you, and every pull request ready to
|
|
108
108
|
merge, oldest first. Each card has one action on its right:
|
|
109
109
|
- a `decision` has **Reply**, and **Go with the default** when it carries one. The default
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ about it, then nothing. **Being concise is imperative: say what needs saying in
|
|
|
5
5
|
takes, and stop.** Long is not thorough, it is expensive.
|
|
6
6
|
|
|
7
7
|
This governs every surface they see: issues you open, replies and comments on issues and PRs, PR
|
|
8
|
-
bodies,
|
|
8
|
+
bodies, your status report, briefs to other staff, and how you talk to them in a session.
|
|
9
9
|
|
|
10
10
|
- **The first sentence is the point.** The recommendation or the ask, before any context. If they
|
|
11
11
|
read only that line, they should be able to rule.
|
|
@@ -16,8 +16,7 @@ bodies, run reports, briefs to other staff, and how you talk to them in a sessio
|
|
|
16
16
|
|
|
17
17
|
- **A comment or reply: 100 words.** Most need three lines.
|
|
18
18
|
- **An issue or PR body: 200 words.**
|
|
19
|
-
- **The status issue's body: 200 words**, readable on one phone screen.
|
|
20
|
-
- **A run report: three lines.**
|
|
19
|
+
- **The status issue's body, your report: 200 words**, readable on one phone screen.
|
|
21
20
|
|
|
22
21
|
Past the ceiling, the detail goes in a file in your brain and the comment links to it in one
|
|
23
22
|
line. A status {{human.name}} has to rewrite before they can use it has cost more than it saved.
|
|
@@ -15,9 +15,9 @@ Boot as usual; `{{staff.dir}}/STATE.md` says what it is.
|
|
|
15
15
|
|
|
16
16
|
{{#if event.previous_status_issue}}
|
|
17
17
|
**A new week.** #{{staff.status_issue}} is this week's status issue, opened for you with last
|
|
18
|
-
week's body. Before you work,
|
|
19
|
-
the week in at most five lines
|
|
20
|
-
is still on {{human.name}}. Then close it
|
|
18
|
+
week's body. Before you work, rewrite the body of last week's ({{event.previous_status_issue}}) as
|
|
19
|
+
the week in at most five lines: what moved on each priority, with the numbers; what shipped; what
|
|
20
|
+
is still on {{human.name}}. Then close it, with no comment.
|
|
21
21
|
{{/if}}
|
|
22
22
|
|
|
23
23
|
## Do this now, in order
|
|
@@ -71,9 +71,12 @@ writing a plan for {{human.name}} to approve.
|
|
|
71
71
|
2. **Rewrite `{{staff.dir}}/STATE.md`**, your handover to the next run: the situation in a line,
|
|
72
72
|
what the next run picks up in priority order, and anything parked. Commands and notes to
|
|
73
73
|
yourself go here. Rewrite it, do not append, and cut anything the next run can find for itself.
|
|
74
|
-
**Then rewrite the body of #{{staff.status_issue}}
|
|
75
|
-
where
|
|
76
|
-
|
|
74
|
+
**Then rewrite the body of #{{staff.status_issue}}. It is your report**, the one place
|
|
75
|
+
{{human.name}} reads where things are, so it is for them, not for you. It opens with
|
|
76
|
+
`Updated <date> <HH:MM> UTC.`, then: where each priority stands, with the numbers, and the
|
|
77
|
+
result of this run where it moved one (what changed for people, not "opened a PR"); what is on
|
|
78
|
+
them, oldest first, by issue number; what you do next. Nothing they need to scroll past, and
|
|
79
|
+
no notes to yourself. **Never comment on it**: they want one report, not a thread to scroll.
|
|
77
80
|
3. **Reconcile the tracker.** Open issues for anything new needing {{human.name}}: the
|
|
78
81
|
`{{human.marker}}` label plus one of `decision`, `review` or `chore`, assigned to
|
|
79
82
|
`{{human.github}}`. Sweep **every** open issue on your tracker, whoever opened it: close what is
|
|
@@ -98,29 +101,17 @@ writing a plan for {{human.name}} to approve.
|
|
|
98
101
|
{{/if}}
|
|
99
102
|
7. **Commit and push** `{{staff.dir}}/`. Stage explicit paths in anyone else's repo - never
|
|
100
103
|
`git add -A` there.
|
|
101
|
-
8. **
|
|
102
|
-
`@{{human.github}}`. **At most three lines:**
|
|
103
|
-
- **The result**, not the activity: what changed for the priority, with the number or link that
|
|
104
|
-
shows it. "Opened a PR" is not a result; what the PR changes for people is.
|
|
105
|
-
- **What is new on them since your last report**: issue numbers and the ask. Not the standing
|
|
106
|
-
list, which is in the body, and not another staff member's asks, which are theirs to report.
|
|
107
|
-
Leave the line out when nothing is new.
|
|
108
|
-
- **What you do next.**
|
|
109
|
-
|
|
110
|
-
No preamble, no closing line, no headers. **When the run moved nothing and nothing new is on
|
|
111
|
-
them, post nothing**: the body is enough, and a report that repeats yesterday's teaches them to
|
|
112
|
-
skip them all.
|
|
113
|
-
9. **Start the next run now, if the next step is ready.** When it serves the priorities and waits on
|
|
104
|
+
8. **Start the next run now, if the next step is ready.** When it serves the priorities and waits on
|
|
114
105
|
nobody (not on {{human.name}}, not on a review, not on a peer), write one line saying what it is:
|
|
115
106
|
`mkdir -p "$GITHUB_WORKSPACE/.roster-run" && echo "<the step>" > "$GITHUB_WORKSPACE/.roster-run/continue"`.
|
|
116
107
|
Another run starts when this one ends, up to {{staff.max_runs_per_day}} a day that nobody asked
|
|
117
108
|
for. Leave it out when there is nothing that cannot wait until tomorrow.
|
|
118
109
|
{{#if staff.drafts_priorities}}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
9. **In the last three days of a month, draft next month's priorities.** If there is no open pull
|
|
111
|
+
request on `{{ops.dir}}` changing `org/priorities.md` already, open one from a branch: at
|
|
112
|
+
most three ranked priorities and what is out of scope, built from this month's, what shipped,
|
|
113
|
+
and the other staff's status issues. The body says what changed from this month and why, in a
|
|
114
|
+
few lines. {{human.name}} edits and merges it; until then this month's stand.
|
|
124
115
|
{{/if}}
|
|
125
116
|
|
|
126
117
|
{{> org/guardrails.md}}
|
|
@@ -13,7 +13,7 @@ or in your status issue for your next daily run.
|
|
|
13
13
|
{{/if}}
|
|
14
14
|
|
|
15
15
|
**This is not a session.** No boot ritual, no handoff, no rewriting `STATE.md` or
|
|
16
|
-
#{{staff.status_issue}}. Answer the question or do the small thing asked, reply, stop.
|
|
16
|
+
#{{staff.status_issue}} unless you are asked for a report. Answer the question or do the small thing asked, reply, stop.
|
|
17
17
|
|
|
18
18
|
{{> prompts/_paths.md}}
|
|
19
19
|
|
|
@@ -55,9 +55,10 @@ An issue opened this way often carries a pull request somewhere else, and says w
|
|
|
55
55
|
- **Do only what was asked.** Fixing something else you noticed on the way makes the change
|
|
56
56
|
unreviewable and costs a second review. If you spot something real and separate, say so in your
|
|
57
57
|
reply and leave it alone.
|
|
58
|
-
- **Asked for a report?** Read `{{staff.dir}}/STATE.md
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
- **Asked for a report?** Read `{{staff.dir}}/STATE.md` and your open issues, then bring the
|
|
59
|
+
body of #{{staff.status_issue}} up to date: it is the report, in the shape it always has, opening
|
|
60
|
+
with `Updated <date> <HH:MM> UTC.` Reply with one line, `Updated: <link to the issue>`, and
|
|
61
|
+
nothing else. Change nothing else.
|
|
61
62
|
- **Only touch `memory/INDEX.md` if a durable fact or watch-out changed**, and then it is one line
|
|
62
63
|
saying what it changes. Commit and push it.
|
|
63
64
|
|
|
@@ -90,6 +90,12 @@
|
|
|
90
90
|
.homereportwho .meta{padding-left:21px}
|
|
91
91
|
.homereportask{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-left:21px;margin-top:6px}
|
|
92
92
|
.homereportask .meta{padding-left:0}
|
|
93
|
+
/* A few lines of the report, fading out; the row opens it in full. */
|
|
94
|
+
.homereportbody{min-width:0;max-height:6em;overflow:hidden;
|
|
95
|
+
-webkit-mask-image:linear-gradient(#000 55%,transparent);mask-image:linear-gradient(#000 55%,transparent)}
|
|
96
|
+
.homereport.full .homereportbody{max-height:none;-webkit-mask-image:none;mask-image:none}
|
|
97
|
+
.homereportissue{border:0;background:none;padding:0;font:inherit;color:var(--accent);cursor:pointer}
|
|
98
|
+
.homereportissue:hover{text-decoration:underline}
|
|
93
99
|
.homereportbody p{margin:0 0 4px;color:var(--ink-dim);font-size:13px;line-height:1.5}
|
|
94
100
|
.homereportbody p:first-child{color:var(--ink)}
|
|
95
101
|
.homereportbody a{color:var(--accent)}
|
|
@@ -20,17 +20,6 @@ const CHORE_WORDS = ["setup", "submit", "data", "blocked"];
|
|
|
20
20
|
|
|
21
21
|
const lower = (s) => String(s ?? "").toLowerCase();
|
|
22
22
|
|
|
23
|
-
/** How old a run report can be and still be this morning's. */
|
|
24
|
-
const REPORT_HOURS = 20;
|
|
25
|
-
|
|
26
|
-
/** A run report as lines, without the @mention it opens with. */
|
|
27
|
-
function reportLines(body) {
|
|
28
|
-
return String(body ?? "")
|
|
29
|
-
.split("\n")
|
|
30
|
-
.map((l) => l.replace(/^\s*(@[\w-]+\s*)+/, "").replace(/^[-*]\s+/, "").trim())
|
|
31
|
-
.filter(Boolean)
|
|
32
|
-
.slice(0, 5);
|
|
33
|
-
}
|
|
34
23
|
|
|
35
24
|
/**
|
|
36
25
|
* @param items the inbox list: open and recently closed issues and pull requests
|
|
@@ -76,16 +65,10 @@ export function sortHome(items, staff, humans, live = [], now = new Date()) {
|
|
|
76
65
|
continue;
|
|
77
66
|
}
|
|
78
67
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (
|
|
82
|
-
owner
|
|
83
|
-
item.number === owner.statusIssue &&
|
|
84
|
-
c &&
|
|
85
|
-
!people.has(lower(c.author)) &&
|
|
86
|
-
now - new Date(c.createdAt) < REPORT_HOURS * 3_600_000
|
|
87
|
-
) {
|
|
88
|
-
out.reports.push({ staff: owner, item, at: c.createdAt, lines: reportLines(c.body) });
|
|
68
|
+
/* The report: the body of a staff member's status issue, which every run rewrites. Not its
|
|
69
|
+
comments, which used to be the reports and grew into a thread nobody wanted to scroll. */
|
|
70
|
+
if (owner && item.number === owner.statusIssue && String(item.body ?? "").trim()) {
|
|
71
|
+
out.reports.push({ staff: owner, item, at: item.updatedAt, body: String(item.body).trim() });
|
|
89
72
|
}
|
|
90
73
|
|
|
91
74
|
const place = placeOf(item, owner, people, markers);
|
|
@@ -93,10 +93,13 @@ export function viewHome(m) {
|
|
|
93
93
|
|
|
94
94
|
/* ------------------------------- reports -------------------------------- */
|
|
95
95
|
|
|
96
|
+
/** Whose reports are open in full. Kept here, since Home repaints on every poll. */
|
|
97
|
+
const openReports = new Set();
|
|
98
|
+
|
|
96
99
|
/**
|
|
97
|
-
* One staff member's
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
+
* One staff member's report: the body of their status issue, which every run rewrites, with a
|
|
101
|
+
* button that asks them to bring it up to date now. It is markdown they wrote, with links to the
|
|
102
|
+
* work it names. It shows its first few lines; the row opens it in full, and closes it again.
|
|
100
103
|
*/
|
|
101
104
|
function reportRow(s, reports) {
|
|
102
105
|
const r = reports.find((x) => x.staff.handle === s.handle);
|
|
@@ -115,7 +118,7 @@ function reportRow(s, reports) {
|
|
|
115
118
|
body: `${s.mention ?? "@" + s.handle} Report, please.`,
|
|
116
119
|
});
|
|
117
120
|
ask.remove();
|
|
118
|
-
note.textContent = `Asked. ${s.name}
|
|
121
|
+
note.textContent = `Asked. ${s.name} updates it in a few minutes.`;
|
|
119
122
|
refreshSoon();
|
|
120
123
|
} catch (e) {
|
|
121
124
|
note.textContent = String(e.message || e);
|
|
@@ -124,23 +127,44 @@ function reportRow(s, reports) {
|
|
|
124
127
|
}
|
|
125
128
|
};
|
|
126
129
|
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
?
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
const issue = el("button", { className: "homereportissue", textContent: "#" + item.number });
|
|
131
|
+
issue.onclick = () => openThread(item);
|
|
132
|
+
const full = openReports.has(s.handle);
|
|
133
|
+
const row = el(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
className: "homereport" + (r ? " homeclick" : "") + (full ? " full" : ""),
|
|
137
|
+
...(r ? { tabIndex: 0, role: "button", ariaExpanded: String(full) } : {}),
|
|
138
|
+
},
|
|
139
|
+
[
|
|
140
|
+
el("div", { className: "homereportwho" }, [
|
|
141
|
+
el("span", { className: "homewho2" }, [icon(staffIcon(s), "ic"), el("b", { textContent: s.name })]),
|
|
142
|
+
el("span", { className: "meta" }, [
|
|
143
|
+
document.createTextNode((r ? "Updated " + ago(r.at) : "No report yet") + " · "),
|
|
144
|
+
issue,
|
|
145
|
+
]),
|
|
146
|
+
el("div", { className: "homereportask" }, [ask, note]),
|
|
147
|
+
]),
|
|
148
|
+
r
|
|
149
|
+
? el("div", { className: "md homereportbody", innerHTML: mdlite(r.body, { repo: s.brain }) })
|
|
150
|
+
: el("div"),
|
|
151
|
+
],
|
|
152
|
+
);
|
|
153
|
+
if (!r) return row;
|
|
154
|
+
const toggle = () => {
|
|
155
|
+
if (openReports.has(s.handle)) openReports.delete(s.handle);
|
|
156
|
+
else openReports.add(s.handle);
|
|
157
|
+
const now = openReports.has(s.handle);
|
|
158
|
+
row.classList.toggle("full", now);
|
|
159
|
+
row.setAttribute("aria-expanded", String(now));
|
|
160
|
+
};
|
|
137
161
|
row.onclick = (ev) => {
|
|
138
|
-
if (!ev.target.closest("a, button"))
|
|
162
|
+
if (!ev.target.closest("a, button")) toggle();
|
|
139
163
|
};
|
|
140
164
|
row.onkeydown = (ev) => {
|
|
141
165
|
if (ev.target === row && (ev.key === "Enter" || ev.key === " ")) {
|
|
142
166
|
ev.preventDefault();
|
|
143
|
-
|
|
167
|
+
toggle();
|
|
144
168
|
}
|
|
145
169
|
};
|
|
146
170
|
return row;
|