@gavin-hu/my-pi-agent 0.19.0 → 0.20.0
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/README.md +17 -11
- package/README.zh-CN.md +13 -8
- package/docs/extensions/README.md +1 -1
- package/docs/extensions/board.md +286 -123
- package/docs/extensions/bytefly.md +381 -223
- package/docs/extensions/file-browse.md +14 -7
- package/docs/extensions/job.md +1 -2
- package/docs/extensions/plan.md +56 -11
- package/docs/extensions/session-bus.md +23 -10
- package/docs/extensions/team.md +45 -17
- package/docs/extensions/wechat.md +2 -1
- package/docs/extensions/worktree.md +30 -15
- package/extensions/board/commands.ts +23 -5
- package/extensions/board/format.ts +107 -9
- package/extensions/board/join.ts +1 -1
- package/extensions/board/page.ts +170 -94
- package/extensions/board/result.ts +9 -0
- package/extensions/board/schema.ts +22 -7
- package/extensions/board/seat.ts +9 -10
- package/extensions/board/snapshot.ts +1 -0
- package/extensions/board/tools.ts +186 -21
- package/extensions/board/transport/router.ts +27 -108
- package/extensions/board/transport/server.ts +18 -29
- package/extensions/board/types.ts +67 -0
- package/extensions/board/view/client.ts +23 -13
- package/extensions/board/view/dialog.ts +43 -0
- package/extensions/board/view/keys.ts +28 -24
- package/extensions/board/view/live.ts +5 -171
- package/extensions/board/view/names.ts +91 -0
- package/extensions/board/view/page.ts +48 -88
- package/extensions/board/view/render.ts +213 -190
- package/extensions/board/view/styles.ts +65 -48
- package/extensions/board/view/team.ts +63 -41
- package/extensions/bytefly/footer/budget.ts +6 -5
- package/extensions/bytefly/footer/collect/entries.ts +12 -4
- package/extensions/bytefly/footer/collect/snapshot.ts +8 -17
- package/extensions/bytefly/footer/config.ts +19 -8
- package/extensions/bytefly/footer/price/price.ts +30 -8
- package/extensions/bytefly/footer/register.ts +5 -5
- package/extensions/bytefly/footer/render/format.ts +18 -0
- package/extensions/bytefly/footer/render/lines.ts +23 -7
- package/extensions/bytefly/footer/render/segments.ts +117 -31
- package/extensions/bytefly/footer/types.ts +29 -5
- package/extensions/bytefly/footer/unpriced.ts +42 -17
- package/extensions/bytefly/panel/commands.ts +28 -1
- package/extensions/bytefly/panel/filter.ts +68 -0
- package/extensions/bytefly/panel/format.ts +16 -15
- package/extensions/bytefly/panel/join.ts +56 -13
- package/extensions/bytefly/panel/prices.ts +43 -0
- package/extensions/bytefly/panel/settings.ts +72 -23
- package/extensions/bytefly/panel/tui/entries.ts +26 -8
- package/extensions/bytefly/panel/tui/frame.ts +130 -93
- package/extensions/bytefly/panel/tui/keys.ts +352 -0
- package/extensions/bytefly/panel/tui/list-view.ts +25 -46
- package/extensions/bytefly/panel/tui/panes.ts +76 -0
- package/extensions/bytefly/panel/tui/section-view.ts +126 -0
- package/extensions/bytefly/panel/tui/settings-section.ts +54 -125
- package/extensions/bytefly/panel/tui/settings-view.ts +30 -131
- package/extensions/bytefly/panel/tui/side-pane.ts +224 -0
- package/extensions/bytefly/panel/tui.ts +306 -259
- package/extensions/check/commands.ts +2 -1
- package/extensions/file-browse/files/classify.ts +136 -0
- package/extensions/file-browse/files/files.ts +8 -547
- package/extensions/file-browse/files/index.ts +90 -0
- package/extensions/file-browse/files/list.ts +261 -0
- package/extensions/file-browse/files/tree.ts +101 -0
- package/extensions/file-browse/transport/router.ts +0 -2
- package/extensions/file-browse/view/emit.ts +51 -0
- package/extensions/file-browse/view/html.ts +6 -7
- package/extensions/file-browse/view/markdown.ts +11 -13
- package/extensions/file-browse/view/raw-html.ts +18 -13
- package/extensions/job/runtime.ts +4 -4
- package/extensions/plan/feedback.ts +40 -16
- package/extensions/plan/format.ts +10 -3
- package/extensions/plan/index.ts +17 -1
- package/extensions/plan/plan-files.ts +88 -0
- package/extensions/plan/plans.ts +19 -23
- package/extensions/plan/policy.ts +10 -5
- package/extensions/plan/runtime.ts +31 -2
- package/extensions/plan/todos.ts +51 -3
- package/extensions/plan/tools/exit.ts +10 -1
- package/extensions/plan/tools/todo-seed.ts +4 -2
- package/extensions/plan/tools/write.ts +12 -1
- package/extensions/plan/types.ts +15 -0
- package/extensions/plan/web-blocks.ts +89 -0
- package/extensions/plan/web-chrome.ts +3 -5
- package/extensions/plan/web-client.ts +179 -330
- package/extensions/plan/web-collab.ts +3 -3
- package/extensions/plan/web-comments.ts +18 -8
- package/extensions/plan/web-composer.ts +80 -0
- package/extensions/plan/web-draft.ts +40 -0
- package/extensions/plan/web-keys.ts +134 -0
- package/extensions/plan/web-outline.ts +192 -0
- package/extensions/plan/web-page.ts +4 -1
- package/extensions/plan/web-plan.ts +150 -0
- package/extensions/plan/web-router.ts +0 -1
- package/extensions/plan/web-settle.ts +194 -0
- package/extensions/rewind/commands/review.ts +2 -1
- package/extensions/session-bus/rows.ts +7 -3
- package/extensions/session-bus/runtime.ts +100 -38
- package/extensions/session-bus/store.ts +14 -2
- package/extensions/session-bus/tui.ts +1 -1
- package/extensions/session-bus/types.ts +10 -1
- package/extensions/subagent/commands.ts +2 -1
- package/extensions/team/commands.ts +41 -8
- package/extensions/team/format.ts +14 -0
- package/extensions/team/index.ts +2 -1
- package/extensions/team/tools.ts +30 -9
- package/extensions/team/types.ts +17 -0
- package/extensions/todo/index.ts +4 -1
- package/extensions/todo/nudge.ts +8 -2
- package/extensions/wechat/bridge.ts +43 -172
- package/extensions/wechat/intake.ts +245 -0
- package/extensions/worktree/commands.ts +24 -17
- package/extensions/worktree/exit.ts +12 -6
- package/extensions/worktree/git.ts +22 -14
- package/extensions/worktree/guard.ts +15 -285
- package/extensions/worktree/handoff.ts +10 -2
- package/extensions/worktree/index.ts +2 -1
- package/extensions/worktree/lifecycle.ts +2 -0
- package/extensions/worktree/registry.ts +20 -11
- package/extensions/worktree/root-tools.ts +13 -3
- package/extensions/worktree/runtime.ts +8 -2
- package/extensions/worktree/screen.ts +15 -8
- package/extensions/worktree/shell.ts +303 -0
- package/extensions/worktree/state.ts +1 -1
- package/extensions/worktree/status.ts +42 -9
- package/extensions/worktree/tools.ts +19 -13
- package/lib/README.md +6 -5
- package/lib/board/card.ts +192 -3
- package/lib/board/links.ts +26 -2
- package/lib/board/page-pointer.ts +86 -32
- package/lib/board/round-text.ts +11 -2
- package/lib/board/round.ts +25 -20
- package/lib/board/rules.ts +144 -11
- package/lib/board/store.ts +239 -52
- package/lib/board/view.ts +94 -10
- package/lib/format.ts +22 -0
- package/lib/http/serve.ts +3 -0
- package/lib/http/sink.ts +34 -9
- package/lib/plan-entry.ts +11 -0
- package/lib/policy.ts +14 -1
- package/lib/session-roster.ts +74 -3
- package/lib/spawn.ts +37 -3
- package/lib/stray-fields.ts +45 -0
- package/lib/tool-names.ts +13 -0
- package/lib/tui/glyphs.ts +2 -3
- package/lib/web/README.md +52 -2
- package/lib/web/client-runtime.ts +123 -0
- package/lib/web/index.ts +4 -2
- package/lib/web/markup.ts +88 -1
- package/lib/web/names.ts +42 -0
- package/package.json +1 -1
- package/extensions/board/view/actions.ts +0 -306
- package/extensions/board/writes.ts +0 -99
- package/extensions/bytefly/panel/tui/extensions-view.ts +0 -40
- package/extensions/bytefly/panel/tui/skills-view.ts +0 -50
- package/extensions/job/process.ts +0 -35
package/docs/extensions/board.md
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
# board — one shared feature board per repository
|
|
2
2
|
|
|
3
|
-
Every Pi session on a repository
|
|
4
|
-
has **one** page: the session that starts it serves it under the seat
|
|
5
|
-
every other session opens that page
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Every Pi session on a repository works the same cards through the tools, and a repository
|
|
4
|
+
has **one** page that shows them: the session that starts it serves it under the seat
|
|
5
|
+
`team-lead`, and every other session opens that same page instead of a second one. The
|
|
6
|
+
page is a **view** — it cannot change a card — so what a browser shows and what the
|
|
7
|
+
terminal holds cannot disagree. A card is one **feature**: its outcome, who holds it,
|
|
8
|
+
where the work happens, the plan it is executing, how urgent it is, what it waits for,
|
|
9
|
+
and the notes that explain how it got there.
|
|
9
10
|
|
|
10
11
|
The steps of the work are deliberately *not* on the board. They live in the
|
|
11
12
|
owner's plan and in `todo`; the board answers who is doing what, and what needs a
|
|
12
13
|
decision.
|
|
13
14
|
|
|
14
|
-
<img src="../../assets/screens/board.png" alt="The board page: a toolbar with the seat the page
|
|
15
|
+
<img src="../../assets/screens/board.png" alt="The board page: a toolbar with the seat the page is served as, a live badge, Board and Team tabs, done-of-total progress, a filter, the keys button and a theme toggle; four lane trays, each with a dot, a count and a fold control; and cards carrying an owner chip, path hints and a reason line, with no button on any of them" width="100%">
|
|
15
16
|
|
|
16
|
-
*`/board`: the four lanes, with
|
|
17
|
+
*`/board`: the four lanes, with the round one tab away and every card opened by its title.*
|
|
18
|
+
|
|
19
|
+
<img src="../../assets/screens/card-dialog.png" alt="The card dialog on one doing card: the id and title with the lane as a dot and a word, a head/value ladder reading owner, updated, in lane, last edited, plan and paths, each value on one line, then a Notes section whose sentences are attributed under them" width="100%">
|
|
20
|
+
|
|
21
|
+
*The card dialog: the record of one card — a ladder of facts, then its notes at body size
|
|
22
|
+
(`screenshot:board --dialog card`).*
|
|
17
23
|
|
|
18
24
|
## Capabilities
|
|
19
25
|
|
|
20
26
|
| Capability | How | What you get |
|
|
21
27
|
|---|---|---|
|
|
22
|
-
| A shared feature list for one repository | `board` action `list` | Every card in lane order — `todo`, `doing`, `blocked
|
|
28
|
+
| A shared feature list for one repository | `board` action `list` | Every open card in lane order — `todo`, `doing`, `blocked` — or one card, or one lane; the `done` cards are left out with a count of how many, and `status: "done"` reads them |
|
|
23
29
|
| The lead's rollup | `board` action `list` with `round: true` | Every owner with its live cards and, beside the count, what it has finished — an owner whose last card is done stays listed — then unassigned, unplanned, blocked, idle, and done |
|
|
24
30
|
| Publish a feature | `board` action `add` | A `todo` card with path hints and a first note |
|
|
25
31
|
| Take a feature | `board` action `claim` | The card is `doing` and owned by this session |
|
|
@@ -29,16 +35,19 @@ decision.
|
|
|
29
35
|
| Record the plan | `board` action `plan` | The plan file the card is executing, so "unplanned" work is visible |
|
|
30
36
|
| Fix what a card says | `board` action `edit` | A new title, path hints, priority, or the cards it waits for — by its holder, or by anyone while nobody holds it |
|
|
31
37
|
| Say how urgent it is | `board` action `add` or `edit` with `priority` | `high` sorts first inside its lane, and the card says so |
|
|
32
|
-
| Record what a card waits for | `board` action `edit` with `dependsOn` | An unfinished dependency refuses a claim and a move to `doing` or `done`, and the reason line names it |
|
|
33
|
-
| Hand a card to a teammate | `
|
|
38
|
+
| Record what a card waits for | `board` action `edit` with `dependsOn` | An unfinished dependency refuses a claim and a move to `doing` or `done`, and the reason line names it; the card it waits on answers the other half — `list` on it names the cards waiting on it, and its dialog row `waited on by` says the same |
|
|
39
|
+
| Hand a card to a teammate | `team` action `assign` | The owner is recorded **and** a handoff is sent to that session's inbox. The page cannot do this: a browser has no way to message a peer, so a page assignment that recorded an owner and told nobody is gone with the write path |
|
|
34
40
|
| Take a card back from the tool | `board` action `reclaim` | The owner clears and the card returns to To do, without the page and without `team` |
|
|
35
|
-
| Find a card without reading every lane | `board` action `list` with `query` | The cards whose title, path hint, or
|
|
41
|
+
| Find a card without reading every lane | `board` action `list` with `query` | The cards whose title, holder, path hint, plan, or note text matches — the same rule the page's filter uses, from one body (`MATCHES_QUERY_JS`) |
|
|
36
42
|
| See the work you hold | `board` action `list` with `mine` | The cards this session holds, by the same rule a claim is checked against |
|
|
37
|
-
|
|
|
43
|
+
| Set a finished card aside | `board` action `archive` | A `done` card's file moves into an `archive/` pile beside the board with its notes, plan, owner, and landed commit still readable, and the board stops reading it: the card named by `card`, or every finished card when none is named. It is a decision a person makes, never a threshold in the background, and nothing un-archives |
|
|
44
|
+
| Delete a card | `board` action `drop` | The card and its notes are gone, and its id is spent: a record of the title, the lane, who ended it, and when stays in `ended/`, so a note or a handoff that names that id cannot come to mean a different feature. A `todo` or `done` card is anyone's to drop, an archived one included, one in flight only its holder's, and one that a card waits on cannot leave at all |
|
|
38
45
|
| One page per repository | `/board` | Serves a loopback page as `team-lead` with a **Board** and a **Team** tab, following the store live; a page already served is opened instead |
|
|
39
|
-
| Watch somebody else's page | `/board` on a session that is not serving | The same page,
|
|
46
|
+
| Watch somebody else's page | `/board` on a session that is not serving | The same page, because there is one: every page is a read view, so a second session gets exactly what the first one sees instead of a writable rival. It joins the team under its own label, so a handoff can still reach it |
|
|
47
|
+
| Read a board at its real size | the `Done` fold, an empty lane's rail | `Done` starts folded at six cards or more, its count in the head, and a reader's toggle decides from then on. A lane holding no cards narrows to its head, word, and count, so the lanes carrying work keep the width |
|
|
48
|
+
| Open a card | the card's title, or `Enter` on a focused one | The title is the only door, because it is the only one needed: it opens the dialog holding the card whole — its lane, its owner, its paths, what it waits for, its plan, and every note |
|
|
40
49
|
| See the lead's round at a glance | `/board team`, or `/team` with no browser | A queue of cards that need a decision, each with the reason and its way out, then who is on the team and what they hold |
|
|
41
|
-
| Join the team | `/board`, or any card you work | Opening the page joins this session to the team — as `team-lead` when it serves the page, under its own name when it
|
|
50
|
+
| Join the team | `/board`, or any card you work | Opening the page joins this session to the team — as `team-lead` when it serves the page, under its own name when it opens one somebody else serves — and the first card a tool writes joins it too, so nothing has to be armed by hand. `/board status` says which team a `/board` in this session put you on |
|
|
42
51
|
| See who is around | `/board team` | The Teammates list: every session this repository's bus has recorded, plus every owner a card names, each stating `live`, `quiet`, `no record`, or `—` when no bus is loaded |
|
|
43
52
|
|
|
44
53
|
## Quickstart
|
|
@@ -60,11 +69,11 @@ lead: board list round: true
|
|
|
60
69
|
|
|
61
70
|
| Command | Who | Effect |
|
|
62
71
|
|---|---|---|
|
|
63
|
-
| `/board` | lead | Serves the page as `team-lead`, or opens the one another session already serves |
|
|
72
|
+
| `/board` | lead | Serves the page as `team-lead`, or opens the one another session already serves — and opens it again when it is already up, so a closed tab is one command away. The line it prints names the address |
|
|
64
73
|
| `/board team` | lead | The same, opened on the Team tab |
|
|
65
|
-
| `/board status` | both | One line: the seat, the port, how many tabs are watching, the store, and the team the last `/board` joined — or the page being watched |
|
|
66
|
-
| `/board stop` | lead | Stops the page this session serves;
|
|
67
|
-
| `/team` | both | The round in the terminal: the rollup, then who is live
|
|
74
|
+
| `/board status` | both | One line: the seat, the port, how many tabs are watching, the store, and the team the last `/board` joined — or the page being watched, and whether the note behind it still answers |
|
|
75
|
+
| `/board stop` | lead | Stops the page this session serves; a watched page that has stopped answering is dropped instead, and a watched page that is alive is its owner's to stop |
|
|
76
|
+
| `/team` | both | The round in the terminal: the rollup, the work a dead owner left behind, then who is live, who has gone quiet, and who is gone |
|
|
68
77
|
|
|
69
78
|
**Who serves the page.** The first `/board` in a repository serves it; after that the
|
|
70
79
|
page is found by the note it leaves beside the cards (`page.json`, in the board's own
|
|
@@ -72,7 +81,11 @@ directory), so a second session opens the same page rather than a rival one. Tha
|
|
|
72
81
|
while a page answers; if nobody is serving, the next `/board` serves — the seat's name
|
|
73
82
|
does not change, so a card a browser claimed is still the seat's. A note a session left
|
|
74
83
|
behind when it died is not a dead end either: `/board` says which page it named — with its
|
|
75
|
-
URL — takes the note over, and serves.
|
|
84
|
+
URL — takes the note over, and serves. A clean exit is not that case: `/board stop` and a
|
|
85
|
+
session shut down normally both take their note with them, so the note that survives is
|
|
86
|
+
one a crash left. `/board status` probes the note it is watching, and names one that
|
|
87
|
+
answers nobody; `/board stop` then drops it (a token-safe clear, so a page that came back
|
|
88
|
+
keeps its own note) instead of waiting for the next `/board` to trip over it.
|
|
76
89
|
|
|
77
90
|
**Joining.** One thing, done for you: `/board` puts this session on the team — as
|
|
78
91
|
`team-lead` when it serves the page, under its own name when it watches one — and so does
|
|
@@ -82,8 +95,10 @@ session that has neither opened the board nor touched a card is not on it. `/boa
|
|
|
82
95
|
status` reports the join `/board` made itself: a session that joined by writing a card
|
|
83
96
|
is on the team, and its status line does not say so.
|
|
84
97
|
|
|
85
|
-
The page
|
|
86
|
-
|
|
98
|
+
The page still serves as a seat: `/board status` names `team-lead`, the toolbar chip says
|
|
99
|
+
so, and a card a browser claimed **before** the page stopped writing still names
|
|
100
|
+
`board:team-lead` as its owner — `reclaim` is how a lead takes that back from the
|
|
101
|
+
terminal.
|
|
87
102
|
|
|
88
103
|
## Tool
|
|
89
104
|
|
|
@@ -92,42 +107,65 @@ claimed comes back with `reclaim` rather than a `release` from the terminal.
|
|
|
92
107
|
|
|
93
108
|
| Action | Parameters | Result |
|
|
94
109
|
|---|---|---|
|
|
95
|
-
| `list` | `status?`, `mine?`, `card?`, `query?`, `round?` | the cards in lane order, one card, or what a query or `mine` matches; `round: true` adds the rollup, which always covers the whole board |
|
|
110
|
+
| `list` | `status?`, `mine?`, `card?`, `query?`, `round?`, `archived?` | the cards in lane order, one card, or what a query or `mine` matches — a query reads a card's title, holder, path hints, plan, and the text of its notes; a listing that names no lane leaves out the `done` cards and says how many, since a finished card is history rather than work; `round: true` adds the rollup, which always covers the whole board; `archived: true` reads the archive instead of the board, with `query` and `mine` narrowing it and `status`/`round` refused |
|
|
96
111
|
| `add` | `title`, `paths?`, `priority?`, `note?` | the new `todo` card |
|
|
97
112
|
| `claim` | `card` | the card, now `doing` and owned by this session |
|
|
98
|
-
| `release` | `card` | the card, back in `todo
|
|
113
|
+
| `release` | `card` | the card, back in `todo`, keeping any block it recorded |
|
|
99
114
|
| `reclaim` | `card` | the card, back in `todo`, whoever held it |
|
|
100
|
-
| `move` | `card`, `status` | the card in its new lane |
|
|
115
|
+
| `move` | `card`, `status`, `blockedBy?` | the card in its new lane; `blockedBy` (one line, ≤200 characters) is what a block waits on, and a move to `done` records the commit `HEAD` resolved to, when the directory is a repository |
|
|
101
116
|
| `note` | `card`, `text` | the card with the note appended |
|
|
102
117
|
| `plan` | `card`, `path` | the card with its plan recorded |
|
|
103
118
|
| `edit` | `card`, `title?`, `paths?`, `priority?`, `dependsOn?` | the card with what it says corrected; an omitted field is left alone, and `dependsOn: []` removes every link |
|
|
104
|
-
| `
|
|
119
|
+
| `archive` | `card?` | the ids set aside — one finished card, or every finished card when no card is named; a card still in flight is refused |
|
|
120
|
+
| `drop` | `card` | the id that was dropped, whose number is now spent |
|
|
105
121
|
|
|
106
122
|
`card` takes `4` or `#4`. A refused call is an error result that still carries the
|
|
107
123
|
card, so the next attempt starts from the truth.
|
|
108
124
|
|
|
125
|
+
The parameters are one flat object, so a field is published to every action at once.
|
|
126
|
+
An action reads only the fields in its row above, and a call carrying one that its
|
|
127
|
+
action does not read is **refused**, naming the action that takes it — not ignored.
|
|
128
|
+
`add` with `dependsOn` used to create the card and drop the link, so a caller could
|
|
129
|
+
not tell a recorded link from an ignored one:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
add does not act on dependsOn: `edit` takes it.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
To link a new card, add it and then edit it. `ACTION_FIELDS` in `types.ts` is the
|
|
136
|
+
table that answers this, and a test holds every published parameter to an action that
|
|
137
|
+
acts on it.
|
|
138
|
+
|
|
109
139
|
## Routes
|
|
110
140
|
|
|
111
|
-
Every route but
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
141
|
+
Every route but two needs the token, and there is exactly one: 128 random bits minted
|
|
142
|
+
when the page starts, compared in constant time, in the URL the browser was opened at.
|
|
143
|
+
The two that do not are the page's own furniture — `/theme.js` and `/app.js` are the same
|
|
144
|
+
bytes to every reader and can neither read nor change a card, so refusing them to a fetch
|
|
145
|
+
that has no token would only break the page. Everything below a
|
|
146
|
+
token is a **read**: the method list is `GET` and `HEAD`, so a `POST` or a `DELETE` is
|
|
147
|
+
refused by the envelope — `405`, `Allow: GET, HEAD` — before the token is even read.
|
|
148
|
+
|
|
149
|
+
The tab's icon is not a route: the document head links the mark as an SVG data URI, so
|
|
150
|
+
a browser fetches the icon out of the page it already has, and `/favicon.ico` is one more
|
|
151
|
+
path the board does not serve.
|
|
118
152
|
|
|
119
153
|
```
|
|
120
|
-
GET /favicon.ico 204 and no body — no token
|
|
121
154
|
GET /theme.js the theme script — no token
|
|
122
155
|
GET /app.js the client script — no token
|
|
123
|
-
GET / the document (?view=board|team)
|
|
156
|
+
GET / the document (?view=board|team), whose tab reads
|
|
157
|
+
board · <store key> · <N> open
|
|
158
|
+
GET /index.html the same document, for a link that names it
|
|
159
|
+
GET /api/ping whether the page answers, and nothing else: a session
|
|
160
|
+
deciding whether to attach reads this, not the snapshot
|
|
124
161
|
GET /api/board the snapshot
|
|
125
162
|
GET /events the live frame stream
|
|
126
|
-
POST /api/cards add a card
|
|
127
|
-
POST /api/cards/:id/… claim, release, reclaim, assign, move, note, plan, edit
|
|
128
|
-
DELETE /api/cards/:id drop a card
|
|
129
163
|
```
|
|
130
164
|
|
|
165
|
+
`/api/ping` exists so a probe cannot be queued behind the page's own work: the snapshot
|
|
166
|
+
is a store read and a roster read on the same event loop, and a page that is busy
|
|
167
|
+
answering its browser would otherwise be declared dead and taken over.
|
|
168
|
+
|
|
131
169
|
## Layout
|
|
132
170
|
|
|
133
171
|
One page, two tabs, one lifecycle. The kit shell keeps the toolbar and the footer
|
|
@@ -135,29 +173,30 @@ pinned and makes the main pane the only scroll box; the page adds no second one.
|
|
|
135
173
|
|
|
136
174
|
| Band | What it holds |
|
|
137
175
|
|---|---|
|
|
138
|
-
| Toolbar | the mark, the seat the page
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
176
|
+
| Toolbar | the mark, the seat the page is served as, as a chip, a live badge (`connecting…`, `live` or `live · 3m`, `reconnecting…`), then one group: the Board\|Team switch, done-of-total progress, a filter, the keys button, and the theme toggle |
|
|
177
|
+
| Lanes | trays, not a bare list: one column per lane, sized by the work it holds — a lane with two cards is wider than one with a single card, and a lane showing nothing, because it holds no cards or because it is folded, narrows to a rail of dot, word, and count — so the lanes carrying work keep the width. Three or four across above 1180px, two at 1180px or narrower, one lane plus the lane switch at 860px or narrower — where it opens on the first lane that holds a card. Each head sticks while the pane scrolls, carries its count as a pill, and folds its cards away: `Done` starts folded at six cards or more, since finished work is history, and a reader's toggle decides from then on |
|
|
178
|
+
| Cards | the id and a two-line title (the page's loudest text and its only door), an owner chip and an age, a muted priority chip when it is not `normal`, path chips, and one reason line in one voice — what a card waits for, a blocked card's recorded reason or else its last note (or `blocked, with nothing recorded`), `no plan recorded`, `planned`, `✓ done by <owner>` with the commit it landed as, and the last note of a card that is none of those — up to two lines at the Team tab's size, with the whole sentence as its tooltip, because the reason is the reason to act on the card. A card draws **no button**: claiming, moving, editing, and annotating are the tools' work, and a face that offered them would be offering a refusal. A hovered card lifts a pixel; a finished one recedes, title and owner chip muted |
|
|
179
|
+
| Team | two panels and a strip. **Needs a decision** is one row per card — a card that is both idle and unplanned arrives once, keeping its strongest reason — laid out as two lines: the id, title and owner chip on the first, the reason on the second — a blocked card's recorded `blockedBy`, else its last note, and `offered 2h ago — nobody took it` for a card whose offer went unanswered — with the whole sentence as its tooltip, and its kind as a left edge (`--danger` blocked, `--warn` idle, `--dim` unplanned or waiting, the same `--dim` dashed for nobody's). The row is a reason to pick the card up in the terminal, and it draws no button: claiming and reclaiming are the tools' work. An unassigned card that waits on unfinished work is a row of its own kind, ranked just under a blocker. Above 1180px the queue stops at one screen's height and scrolls inside its panel, so the roster and the Done strip stay on the same page as its top. **Teammates** is one row per person — a state dot, the label, a `you` chip, a `not listening` chip on a live peer whose inbox watch is off, a mail badge, then `live · 3 held · 1 done · oldest 21m` (a quiet session reads `quiet for 2h`, because a word without an age is no reason to reclaim) — sorted you, live, quiet, no record, and an owner whose label nothing answers to keeps its row. Done is one quiet strip whose ids open their cards. Both panels honour the toolbar's filter, and their headings read `shown/total` the way a lane head does. Below 1180px the queue comes first and the roster follows |
|
|
180
|
+
| Card dialog | the record of one card, in two named sections. The head carries the id, the title, and the lane as a dot and a word. **The card** is a ladder — one fact per row, labels sized to the longest of them so the values line up: owner, priority when it is not `normal`, updated, in lane, last edited, landed, waits on, waited on by, plan, paths. `in lane` is the lane the card is in and how long it has held it, read from the card's transitions rather than from `updatedAt`, which a note or an edit moves; a card whose history does not say omits the row. The plan and each path are one line that elides, with the whole value on the hover title; what it waits for reads `#2 (doing)`, the lanes that make the id a decision. Empty rows take their labels with them. **Notes · N** is the cargo at body size on a 68ch measure, each sentence with its attribution under it and a rule between notes, and `M earlier notes dropped` when the store capped them. The body is the only scroll, so the head and `Close` stay put. Nothing in it writes, every field is a set as `textContent`, and the title underneath every card is the way in. `j`/`k` walk to the next or previous card without closing it, and an `sr-only` live region announces `card 2 of 3: <title>` — a title that changes inside an open modal is not announced on its own |
|
|
181
|
+
(feat(team): an offer leaves a record, so its age can be read)
|
|
144
182
|
|
|
145
183
|
Colour is a role: `--muted` for `todo`, `--accent` for `doing`, `--danger` for
|
|
146
184
|
`blocked` and destructive choices, `--success` for `done`. The Team tab's decision
|
|
147
185
|
rows sit on the kit's `--raised`, the one step above `--surface` that lets a block read
|
|
148
|
-
as a plane instead of an outline;
|
|
149
|
-
|
|
186
|
+
as a plane instead of an outline; every lane, `Done` included, keeps that `--surface`
|
|
187
|
+
tray, so a finished card still sits on something and history recedes through its muted
|
|
188
|
+
title and chip instead of through a hole in the row. A card takes its colour
|
|
150
189
|
from the lane it sits in — the head's dot, and the reason line's tone — rather than
|
|
151
190
|
from a bar of its own, so one card does not shout twice. The page states a lane and
|
|
152
191
|
a card with `data-status`, so a theme change repaints it without a rule of its own.
|
|
153
192
|
|
|
154
193
|
The board as a posting card — the same rules, drawn to be read at half width:
|
|
155
194
|
|
|
156
|
-
<img src="../../assets/cards/board.png" alt="One board, every session: the page's seat and live badge; four lane trays, each with a dot, a count pill and a fold; one card carrying an id, a title,
|
|
195
|
+
<img src="../../assets/cards/board.png" alt="One board, every session: the page's seat and live badge; four lane trays — To do, Doing, Blocked, Done — each with a dot, a count pill and a fold; one card carrying an id, a title, an owner chip, a priority chip, its age, a path chip and one reason line, with no action on it; and the lead's round with two owner lines and the counts unassigned, unplanned, blocked, idle and done" width="100%">
|
|
157
196
|
|
|
158
197
|
*`board`: the lanes, one card's atoms, and the lead's round — three readings of one board, drawn by `screenshot:cards board`.*
|
|
159
198
|
|
|
160
|
-
<img src="../../assets/cards/board-team.png" alt="The three team verbs as three bands: assign sends a handoff to a named peer,
|
|
199
|
+
<img src="../../assets/cards/board-team.png" alt="The three team verbs as three bands: assign sends a handoff to a named peer and writes the card as doing, owned by that peer, before the peer reads the mail; offer broadcasts an event to every other live session without recording an owner, so the first claim wins; reclaim returns the card to To do with its notes kept and no handoff sent" width="100%">
|
|
161
200
|
|
|
162
201
|
*`board-team`: `assign`, `offer`, and `reclaim` — the two that reach the bus, and the one that writes the card alone (`screenshot:cards team`).*
|
|
163
202
|
|
|
@@ -165,9 +204,8 @@ The board as a posting card — the same rules, drawn to be read at half width:
|
|
|
165
204
|
|
|
166
205
|
| Key | What it does |
|
|
167
206
|
|---|---|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
| `j` / `k` | Next or previous card |
|
|
207
|
+
| `/` | Filter the cards by title, holder, path hint, plan, or the text of a note |
|
|
208
|
+
| `j` / `k` | Next or previous card — or, with a card open, the next or previous card in the dialog |
|
|
171
209
|
| `Enter` | Open the focused card |
|
|
172
210
|
| `t` | Switch Board and Team |
|
|
173
211
|
| `Esc` | Close a dialog, or clear the filter |
|
|
@@ -175,55 +213,88 @@ The board as a posting card — the same rules, drawn to be read at half width:
|
|
|
175
213
|
|
|
176
214
|
A dialog traps `Tab`, closes on `Esc` or a backdrop click, and returns focus to
|
|
177
215
|
whatever opened it — the kit's `dialogScript`, shared with the review and browse
|
|
178
|
-
pages. A field keeps its keys:
|
|
216
|
+
pages. A field keeps its keys: `/` inside the filter box types a slash.
|
|
179
217
|
|
|
180
218
|
## Security
|
|
181
219
|
|
|
182
|
-
- The page binds loopback only, answers only its own host names, and
|
|
183
|
-
state-changing request
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
your repository, and it reads the session bus's own records read-only — labels,
|
|
192
|
-
modes, heartbeats, message counts, and whether each is listening — to draw the Teammates list.
|
|
220
|
+
- The page binds loopback only, answers only its own host names, and has no
|
|
221
|
+
state-changing request to refuse.
|
|
222
|
+
- One credential, 128 random bits minted when the page starts and compared in constant
|
|
223
|
+
time, in the URL and never a cookie, with no CORS. The note beside the cards
|
|
224
|
+
(`page.json`, owner-only) carries it, so a second session can attach — and because the
|
|
225
|
+
page cannot change a card, pasting that URL hands out nothing but a view.
|
|
226
|
+
- The page reads only: the board store under the agent directory, and the session bus's
|
|
227
|
+
own records read-only — labels, modes, heartbeats, message counts, and whether each is
|
|
228
|
+
listening — to draw the Teammates list. It never writes your repository.
|
|
193
229
|
|
|
194
230
|
## Limitations
|
|
195
231
|
|
|
196
232
|
- **Ownership is advisory.** Two sessions can still edit the same file; only
|
|
197
233
|
`session-bus`'s path claims are a lock.
|
|
234
|
+
- **A listing is bounded, the rollup is not.** Nothing prunes a finished card by itself, so
|
|
235
|
+
the cards accumulate — most of this repository's own board was finished cards — and
|
|
236
|
+
reading them on every call is a cost that grows with the history rather than with the
|
|
237
|
+
work. A `list` that names no lane therefore leaves `done` out and prints the count, which
|
|
238
|
+
is what keeps the omission from reading as a smaller board; `status: "done"` reads them,
|
|
239
|
+
and `round` counts every card, because a rollup that hid half the board would not be one.
|
|
240
|
+
The page bounds its own View the same way, folding a long `done` lane. `archive` is how a
|
|
241
|
+
board stops paying for its history at all: the card leaves the board and its read.
|
|
198
242
|
- **A finished card stays finished.** `done` is terminal for every transition — claim,
|
|
199
243
|
assign, release, move, and plan all refuse it — so a card a dependency was recorded
|
|
200
|
-
against cannot un-finish and reopen the order after the fact
|
|
201
|
-
|
|
244
|
+
against cannot un-finish and reopen the order after the fact, and `archive` does not
|
|
245
|
+
change that: it moves a `done` card's file, and never its lane. The one exception is
|
|
246
|
+
`edit`: a title, path hints, priority, or `dependsOn` can still be corrected by whoever
|
|
247
|
+
holds it, or by anyone while nobody does, because a title is what a reader reads and a
|
|
248
|
+
finished feature whose title is wrong would stay wrong for as long as the board keeps
|
|
249
|
+
history. A card finished by
|
|
250
|
+
mistake is dropped and added again: the new card takes a new number, and the dropped
|
|
251
|
+
one's title and lane stay in `ended/` under the id nothing will use again. Its notes
|
|
252
|
+
do not come with it.
|
|
253
|
+
- **A card file this build cannot read is reported, not skipped.** A file written by a
|
|
254
|
+
newer build, a half-written one, or a record moved under another name is named by
|
|
255
|
+
`list` with the reason and counted in the page's footer beside the store's size, so a
|
|
256
|
+
board that is not readable never reads as a board that is empty. `done` stays
|
|
257
|
+
terminal until a `reopen` is designed.
|
|
202
258
|
- **Links are recorded by the tool.** A link names an id, so the page shows what a
|
|
203
259
|
card waits for but does not edit it; `board edit` records it while the card is being
|
|
204
260
|
planned, and `board drop` refuses to strand one.
|
|
205
|
-
- **The board
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
- **A
|
|
222
|
-
|
|
223
|
-
- **
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
261
|
+
- **The board knows when a process is gone, not when work is stuck.** The Teammates
|
|
262
|
+
list reads the bus's records, where `live` is a heartbeat inside ten minutes,
|
|
263
|
+
`quiet` is a heartbeat that has aged, `gone` is a record whose process is no longer
|
|
264
|
+
running, and `no record` means only that the bus holds no record of that label. A
|
|
265
|
+
`gone` owner's cards join **Needs a decision** with the reason that they are free, and a
|
|
266
|
+
*hung* session reads `live`, so "idle" still means what a card can know — nobody has
|
|
267
|
+
touched it for 30 minutes — rather than that its owner is stuck. With `session-bus`
|
|
268
|
+
unloaded, or before any session has joined here, every state reads `—` and the board
|
|
269
|
+
works exactly as before.
|
|
270
|
+
- **The page is read-only, deliberately.** A browser is not an identity: every page write
|
|
271
|
+
was made as the seat, and a page `assign` had to record that no handoff was sent. Rather
|
|
272
|
+
than duplicate the card rules in the client — which had already drifted from
|
|
273
|
+
`lib/board/rules.ts` — the write path is gone. What a reader loses is editing from the
|
|
274
|
+
browser; what the product keeps is every one of those verbs as a tool. The one capability
|
|
275
|
+
with no tool-side twin is assigning **without** messaging the peer: `team`'s `assign`
|
|
276
|
+
sends a handoff, and nothing else records an owner silently.
|
|
277
|
+
- **A seat can outlive its writes.** A card claimed from the page before this change still
|
|
278
|
+
names `board:team-lead` as its owner, and `reclaim` is how a lead takes it back.
|
|
279
|
+
- **A lane history is short, and it starts when the field did.** A card keeps the last
|
|
280
|
+
eight lane transitions, dropping the oldest and counting what it dropped, so the record
|
|
281
|
+
is bounded at write time rather than by a janitor — nothing prunes a board. A card
|
|
282
|
+
written before the log existed has no `in lane` row, and `updatedAt` keeps meaning what
|
|
283
|
+
it always meant: when the card was last touched, which is not when it last changed lane.
|
|
284
|
+
- **Nothing prunes itself.** A `done` card stays until someone sets it aside or drops it,
|
|
285
|
+
an archived card stays until someone drops it, and a dropped card leaves its record
|
|
286
|
+
behind for the same reason; the page shows how many bytes the board occupies and how
|
|
287
|
+
many files it could not read, and neither it nor the round counts the archive. Setting
|
|
288
|
+
history aside is a `board` call, not a threshold nobody stated, so what a read returns
|
|
289
|
+
never depends on how much has accumulated.
|
|
290
|
+
- **A page claim is a claim nobody cleans up.** A card a page claimed before this change
|
|
291
|
+
is the seat's until a tool reclaims it; the page itself can no longer add to that pile.
|
|
292
|
+
- **The page stops a minute after its last tab leaves, or two minutes after it starts
|
|
293
|
+
with no tab at all.** Closing the tab to run a command and coming back is fine, and a
|
|
294
|
+
teammate's watching tab counts as one. The second grace covers the page a browser never
|
|
295
|
+
opened — `openInBrowser` swallows a failure, and a port held by a page nobody saw is a
|
|
296
|
+
port held for the session. Either way `/board` starts it again, on the same port, and
|
|
297
|
+
prints the address it reopened.
|
|
227
298
|
- **The port is found, or pinned.** With no setting the page prefers a free port in
|
|
228
299
|
4780–5779, falls back to whatever free port the OS gives it if that one is taken, and
|
|
229
300
|
remembers the answer for the session; `board.port` in `bytefly.json` pins it, so a
|
|
@@ -234,7 +305,9 @@ pages. A field keeps its keys: `n` inside the note input types an `n`.
|
|
|
234
305
|
the port that note names rather than serving a second one.
|
|
235
306
|
- **The note is believed only while it answers.** A page that crashed leaves its note
|
|
236
307
|
behind; the next `/board` probes it, takes it over when nothing replies, and attaches to
|
|
237
|
-
the page that won when two sessions start in the same instant. A
|
|
308
|
+
the page that won when two sessions start in the same instant. A clean exit — `/board
|
|
309
|
+
stop`, or a session shut down normally — clears its own note, so the one that survives
|
|
310
|
+
is the one a crash left. A note it cannot read at
|
|
238
311
|
all is named with its path — "another session is serving" is only said of a page that was
|
|
239
312
|
seen answering.
|
|
240
313
|
|
|
@@ -245,13 +318,16 @@ pages. A field keeps its keys: `n` inside the note input types an `n`.
|
|
|
245
318
|
`lib/session-tool.ts`, because a command context cannot call a tool and the request
|
|
246
319
|
therefore travels on `pi.events` — and reads its records otherwise, which is why the
|
|
247
320
|
page works with the bus disabled. A failed join is a clause on the `/board` line, not
|
|
248
|
-
a failed page. The seat is
|
|
249
|
-
|
|
321
|
+
a failed page. The seat is the name the page is served and reported under, and `/board
|
|
322
|
+
status` says which session is on the team through it.
|
|
250
323
|
- **`plan`**: `board plan` records a plan file's path; the plan extension owns the
|
|
251
|
-
file. The
|
|
252
|
-
|
|
324
|
+
file. The board stays available while planning, and only `list` works: the same tool
|
|
325
|
+
writes, so its read-only hint cannot say that, and plan mode reads the action in the
|
|
326
|
+
call instead — `add`, `claim`, or any other verb is refused with the exit guidance.
|
|
327
|
+
The plan is recorded **after** approval, when the writing verbs work again.
|
|
253
328
|
- **`todo`**: the approved plan's steps are seeded into `todo`. Steps never become
|
|
254
|
-
cards.
|
|
329
|
+
cards. A `list` call is a read for the lag reminder too, so reading the board never
|
|
330
|
+
forces a todo update, while `add` or `claim` counts as work like any other write.
|
|
255
331
|
- **`worktree`**: the store is keyed by the repository's common git directory, so
|
|
256
332
|
every worktree shares one board.
|
|
257
333
|
- **`bytefly`**: the page's port appears as a `board` status chip, and `doctor`
|
|
@@ -260,8 +336,26 @@ pages. A field keeps its keys: `n` inside the note input types an `n`.
|
|
|
260
336
|
|
|
261
337
|
## Design notes
|
|
262
338
|
|
|
263
|
-
- **One JSON file per card**, in `<agentDir>/board/<repo-key>/cards
|
|
264
|
-
|
|
339
|
+
- **One JSON file per card**, in `<agentDir>/board/<repo-key>/cards/`, one per ended
|
|
340
|
+
card in `ended/`, and one per archived card in `archive/`. The listing is the index, so
|
|
341
|
+
a reader needs no cache and no daemon.
|
|
342
|
+
- **An id is never reused.** The next id is the highest in `cards/`, `archive/` *or*
|
|
343
|
+
`ended/` plus one, so a number cannot be handed to a second feature — which is the only
|
|
344
|
+
thing that lets a note, a handoff, or a link name a card and still mean it. A record
|
|
345
|
+
is written before its card is removed: a crash between the two leaves a card that
|
|
346
|
+
still exists with a record explaining it, never a card that is gone unexplained.
|
|
347
|
+
- **An archive is a second pile, not a second state.** `archive` renames a finished
|
|
348
|
+
card's file into `archive/` and touches nothing inside it, so there is no new field, no
|
|
349
|
+
schema version, and no lane transition: the record is exactly what it was, and the
|
|
350
|
+
directory it lies in is the whole fact. That is why `ended/` keeps its one reason — a
|
|
351
|
+
drop still leaves a record because the card is gone, while an archived card is not gone
|
|
352
|
+
at all — and why a read by id looks in both piles: a card is where it lies. The
|
|
353
|
+
decision is explicit because nothing in this board prunes by itself, and because an
|
|
354
|
+
automatic sweep would make `status: "done"` return something different past a threshold
|
|
355
|
+
nobody could see. The board, the rollup, and the page read `cards/` alone — the only
|
|
356
|
+
look at the archive is the directory listing a lane-less `list` counts, so the omission
|
|
357
|
+
cannot pass for a deleted history — and an archive therefore lowers the board's size
|
|
358
|
+
and the cost of every read. The ids stay spent because the file name is the id.
|
|
265
359
|
- **Create is exclusive**, by hard-linking a temporary file onto the target name,
|
|
266
360
|
so two adds cannot share an id. **Update** re-reads, re-checks the operation's
|
|
267
361
|
own preconditions, then renames over the old file: an operation means "apply when
|
|
@@ -270,33 +364,100 @@ pages. A field keeps its keys: `n` inside the note input types an `n`.
|
|
|
270
364
|
only when a card's revision, or a teammate's state, mail, or listening flag, moves: a
|
|
271
365
|
heartbeat every ten seconds is not news, and a frame nobody needs costs the page a
|
|
272
366
|
parse.
|
|
367
|
+
- **A query reads what a card says, not just what it is called.** A card's reasoning lives
|
|
368
|
+
in its notes and in the plan it is executing, so leaving both out of the search made the
|
|
369
|
+
two fields that hold the argument the two a reader could not find. The order is the
|
|
370
|
+
answer's weight — title, holder, path hints, plan, notes — and it is one body spliced
|
|
371
|
+
into the page from `lib/board/card.ts`, so the filter box and `board list query:` cannot
|
|
372
|
+
disagree about which card a word names.
|
|
373
|
+
- **The record is a ladder, not a paragraph run.** A card's facts are one per row so each
|
|
374
|
+
can be read and copied alone: the meta line it replaces merged id, updated, and who into
|
|
375
|
+
one sentence, and named the last writer as though it were the author. The notes are the
|
|
376
|
+
cargo — they read at body size on a measure, with their attribution under them — and the
|
|
377
|
+
dialog's body is the only scroll, because a second scrollbar inside a 70vh panel hid most
|
|
378
|
+
of what a reader opened it for. A long plan path elides on one line with the whole value
|
|
379
|
+
on its hover title: the plan is the reason to open a card, and it used to shred across
|
|
380
|
+
three lines of `--dim`.
|
|
381
|
+
- **The walk is over the board as drawn.** `j`/`k` step through the cards the page has
|
|
382
|
+
boxes for, so a folded Done lane and a filter are both respected; opening a card does not
|
|
383
|
+
take the keyboard away, it points it at the next record. The position is announced
|
|
384
|
+
because a title that changes inside an open modal is not.
|
|
385
|
+
- **A class is a symbol, not a string.** The document and the bundle cannot import from
|
|
386
|
+
each other, so both read `view/names.ts` — the only place a `board-*` class is spelled.
|
|
387
|
+
A name assembled from a prefix is what made the old contract untestable: it passed on
|
|
388
|
+
the prefix and could not see the whole name, so a rule with nothing behind it (or a
|
|
389
|
+
name with no rule) survived until a capture showed it.
|
|
390
|
+
- **The page is given what it prints.** A card arrives with the priority it acts on and
|
|
391
|
+
the unfinished dependencies that block it (`waits`, as `#2 (doing)`), so the client
|
|
392
|
+
holds no copy of a rule `lib/board` owns — the copies it did hold had already drifted
|
|
393
|
+
from the tool's. The one body that cannot cross as data is `plural`, and it crosses as
|
|
394
|
+
source (`PLURAL_JS`), because a second wording for `1 card` is the same mistake in a
|
|
395
|
+
smaller place.
|
|
396
|
+
- **An offer is a record, not a reservation.** `team offer` broadcasts a card and then
|
|
397
|
+
writes `offeredAt` — the moment, and nothing else — because an event leaves nothing
|
|
398
|
+
behind and a card three sessions ignored read exactly like one nobody had looked at.
|
|
399
|
+
Every answer clears it: a claim, an assignment, and a release each delete the field, so
|
|
400
|
+
its presence means the offer is still open. The page reads it in two places and the
|
|
401
|
+
tool in a third — `offered 1m ago · nobody took it` under the card, `offered 1m ago —
|
|
402
|
+
nobody took it` as the Team tab's reason, `offered: 1m ago, and nobody took it` in
|
|
403
|
+
`list <card>` — and the age is `lib/format.ts`'s one rule, handed to the page's bundle
|
|
404
|
+
as source so the transcript and the page cannot say one age two ways.
|
|
405
|
+
- **`waits on` answers two questions, on purpose.** The page names the *unfinished*
|
|
406
|
+
dependencies in one line — "why can I not start" — and `board`'s result names every
|
|
407
|
+
dependency with its lane, including finished ones — "what is this card tied to". Both
|
|
408
|
+
read `links.ts`, so neither can invent a blocker; the difference is the question, not
|
|
409
|
+
a drift.
|
|
410
|
+
- **A link is stored once, and read both ways.** `dependsOn` lives on the waiting card
|
|
411
|
+
alone, so nothing on disk says what a card is holding up; `openDependentsOf` answers
|
|
412
|
+
it over the board, `list <card>` prints `waited on by N cards: #2 (todo)`, and the
|
|
413
|
+
dialog has the rung the card's own row cannot. Both skip a finished card, unlike the
|
|
414
|
+
drop refusal, which keeps every edge: "what is held up" is about work, and "would this
|
|
415
|
+
drop strand a link" is about the file.
|
|
273
416
|
- **One page is found, not configured.** A note beside the cards carries the port, the
|
|
274
|
-
seat, and
|
|
417
|
+
seat, and the token; it is created exclusively, so two sessions starting at
|
|
275
418
|
once cannot both serve, and the loser attaches to the winner. The alternative —
|
|
276
419
|
a setting that names the lead — was rejected: the role moves, the seat's name does
|
|
277
420
|
not. The port is the one thing a file may pin: `board.port` states where the page
|
|
278
421
|
listens, never who serves it.
|
|
279
|
-
- **The
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
422
|
+
- **The page is a view because a browser is not an identity.** Every page write was made
|
|
423
|
+
as the seat, so a page `assign` had to write down that nobody had been told, and the
|
|
424
|
+
client's copy of the card rules drifted from `lib/board/rules.ts` — it offered a drop
|
|
425
|
+
the server refused. The write path was deleted rather than hidden behind a flag: a
|
|
426
|
+
disabled verb is still a verb the page has to decide. Deleting it took the composer's
|
|
427
|
+
dialog, the confirm dialog, the note field, and 60-odd buttons with it.
|
|
285
428
|
- **One edge, stored once.** A link is one id in the waiting card's file and the
|
|
286
|
-
reverse edge is computed over the board, because a
|
|
287
|
-
is a copy that drifts; the cycle check and the drop rule are what
|
|
288
|
-
whole instead.
|
|
429
|
+
reverse edge is computed over the board, because a copy of the same edge on the card
|
|
430
|
+
being waited for is a copy that drifts; the cycle check and the drop rule are what
|
|
431
|
+
keep the graph whole instead.
|
|
289
432
|
- **A priority is a field, not a lane.** The four lanes are the board's vocabulary and
|
|
290
433
|
a fifth would double the counts and the heads; inside a lane, priority then age is the
|
|
291
434
|
order, and a card says its priority only when it is not the ordinary one.
|
|
292
435
|
- **`edit` leaves an omitted field alone.** It is the one action whose job is "make it
|
|
293
|
-
say this", so an absent field must mean "not this field" —
|
|
294
|
-
|
|
436
|
+
say this", so an absent field must mean "not this field" — a caller that sends only a
|
|
437
|
+
title must not clear the path hints and links it never mentioned.
|
|
438
|
+
- **A lane change is recorded where every transition ends.** `applyOp` decides each
|
|
439
|
+
transition, but `write()` in `rules.ts` is the one place all of them pass through, so
|
|
440
|
+
the log is appended there rather than from six operations that would each have to
|
|
441
|
+
remember it. A write that leaves the lane alone — a note, a plan, an edit, a claim by
|
|
442
|
+
the holder — appends nothing, because the question the log answers is "how long has
|
|
443
|
+
this been blocked", and `updatedAt` cannot answer it: filing a note against a blocked
|
|
444
|
+
card moves that stamp without moving the card.
|
|
295
445
|
- **Rejected:** steps as cards (they flood the board), a shared database (a file per
|
|
296
446
|
card needs no dependency and no lock), an index file (every write maintains it,
|
|
297
447
|
every read can find it stale), drag-and-drop (a lane change is a named `move`), a
|
|
298
|
-
priority lane (four lanes are the vocabulary),
|
|
299
|
-
|
|
448
|
+
priority lane (four lanes are the vocabulary), a reverse link field (two copies of
|
|
449
|
+
one edge), and an automatic archive past some number of finished cards (a threshold
|
|
450
|
+
nobody stated would decide what a read returns, and nothing else here prunes).
|
|
451
|
+
- **A block says why, and a finished card says with what.** `blocked` exists to ask a
|
|
452
|
+
person for a decision, so the move into it records the sentence — `blockedBy`, one
|
|
453
|
+
line — and the page draws that rather than the last note somebody wrote, which was a
|
|
454
|
+
guess. The reason survives a `release` (the decision is still pending) and is cleared
|
|
455
|
+
on the way back into `doing` or `done` (a stale sentence reads as a current one).
|
|
456
|
+
`landed` is the commit `HEAD` resolved to at the move to `done`, recorded because
|
|
457
|
+
`done` is terminal and nothing later can say which change closed the card. Both
|
|
458
|
+
fields are optional and neither is required: a card may be blocked with nothing
|
|
459
|
+
recorded, and one finished before the field, or outside a repository, has no commit
|
|
460
|
+
to record — finishing never depends on a git read.
|
|
300
461
|
|
|
301
462
|
## Files
|
|
302
463
|
|
|
@@ -305,27 +466,27 @@ pages. A field keeps its keys: `n` inside the note input types an `n`.
|
|
|
305
466
|
| `index.ts` | The factory: gate on `PI_DISABLED_EXTENSIONS`, build the runtime and the page, register both, close on shutdown |
|
|
306
467
|
| `config.ts` | The board's one setting: the port its page is pinned to, clamped, from the `bytefly.json` `board` section |
|
|
307
468
|
| `schema.ts` | The tool's parameters |
|
|
308
|
-
| `types.ts` | The shapes the tool registers and reports
|
|
469
|
+
| `types.ts` | The shapes the tool registers and reports — the actions and the fields each acts on, the card an action produced, the cards a list read, the rollup when it was asked for, and the card a refusal carries |
|
|
309
470
|
| `tools.ts` | Action dispatch and the refusal shape |
|
|
310
|
-
| `input.ts` | A card body as
|
|
471
|
+
| `input.ts` | A card body as the tool reads it: the `add` fields normalized in one place |
|
|
311
472
|
| `format.ts` | The model-facing text |
|
|
312
473
|
| `rows.ts` | The transcript row grammar |
|
|
313
474
|
| `result.ts` | The transcript block |
|
|
314
|
-
| `page.ts` | The page's lifecycle: the port it remembers or is pinned to, the chip that names it,
|
|
475
|
+
| `page.ts` | The page's lifecycle: the port it remembers or is pinned to, the chip that names it, the three closes (`/board stop`, the idle grace, and shutdown — each taking the note with it), and the probe behind `/board status` |
|
|
315
476
|
| `snapshot.ts` | The page's snapshot: the cards, the bus's records, and the store's size, handed to `buildView` |
|
|
316
|
-
| `
|
|
317
|
-
| `
|
|
318
|
-
| `seat.ts` | The seat the page serves as: one name, and an id derived from it, so the page is one actor across restarts |
|
|
477
|
+
| `commands.ts` | `/board`, its three words and their refusals, and the one line `/board status` prints |
|
|
478
|
+
| `seat.ts` | The seat the page is served as: one name, and an id derived from it. The page cannot write, so it is a label now — but the id is still what a card claimed from an older page names |
|
|
319
479
|
| `join.ts` | The board's side of the team: the one request that joins for the user, the label it lands on, and how the outcome reads on a `/board` line |
|
|
320
|
-
| `transport/router.ts` | The
|
|
480
|
+
| `transport/router.ts` | The five reads — the document, the client script, the theme script, the snapshot, and the frame stream — with the token gate and the guards in front of them |
|
|
321
481
|
| `transport/server.ts` | The loopback listener, the frame push, and the close |
|
|
322
|
-
| `view/page.ts` | The document: an inert shell the client fills |
|
|
482
|
+
| `view/page.ts` | The document: an inert shell the client fills, with no form on it |
|
|
323
483
|
| `view/styles.ts` | The page's `board-*` layout rules |
|
|
324
484
|
| `view/render.ts` | The client's snapshot → DOM renderer: toolbar, lanes, cards, the dialog's contents |
|
|
485
|
+
| `view/names.ts` | The page's class vocabulary: one table the document and the bundle both read, so what the page wears and what its stylesheet draws can be compared |
|
|
325
486
|
| `view/team.ts` | The client's round: the two tables and the Done line |
|
|
326
|
-
| `view/
|
|
327
|
-
| `view/keys.ts` | The key table, and the bindings that make it true |
|
|
328
|
-
| `view/live.ts` | The client's tabs,
|
|
487
|
+
| `view/dialog.ts` | The client's card dialog: open one card, close it, and forget it when the kit closes it |
|
|
488
|
+
| `view/keys.ts` | The key table, and the bindings that make it true — including `j`/`k` walking the open dialog through the drawn cards |
|
|
489
|
+
| `view/live.ts` | The client's tabs, filter, and frame stream |
|
|
329
490
|
| `view/client.ts` | The one script served at `/app.js` |
|
|
330
491
|
|
|
331
492
|
The store, the rules, the rollup, and the snapshot are `lib/board/` — see
|
|
@@ -338,7 +499,9 @@ The store, the rules, the rollup, and the snapshot are `lib/board/` — see
|
|
|
338
499
|
record, the dependency graph, the note a page leaves, the rollup and its text, the card's
|
|
339
500
|
transitions, the store a call opens and the identity it writes as, the files that store
|
|
340
501
|
keeps, and the snapshot, and
|
|
341
|
-
`extensions/board/{input,seat,tools,page,commands,config,extension,transport/router,view/pages}`
|
|
502
|
+
`extensions/board/{input,seat,tools,page,commands,config,extension,transport/router,view/pages,view/behaviour}`
|
|
342
503
|
for the card body, the seat, every action, the page's lifecycle over a real socket (a page
|
|
343
|
-
served, attached to, taken over, and refused
|
|
344
|
-
setting, the factory, the routes,
|
|
504
|
+
served, attached to, and taken over, and a write refused on the wire), the command, the
|
|
505
|
+
`board.port` setting, the factory, the routes, the document and client bundle, and the
|
|
506
|
+
page driven in a browser — a card opened from its title, the filter, the fold, a live
|
|
507
|
+
frame, and the dialog's ladder.
|