dsh-pilot-board 0.0.0-stage → 0.2.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.
Files changed (121) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +282 -2
  3. package/client.js +8427 -0
  4. package/cordis.patch.yml +11 -0
  5. package/docs/screenshots/kanban-board.png +0 -0
  6. package/docs/screenshots/master-pane.png +0 -0
  7. package/docs/screenshots/sidebar-board.png +0 -0
  8. package/docs/screenshots/task-drawer.png +0 -0
  9. package/icon.svg +10 -0
  10. package/index.mjs +336 -0
  11. package/locale/en.json +6 -0
  12. package/package.json +81 -4
  13. package/src/api.mjs +129 -0
  14. package/src/core/admission.mjs +38 -0
  15. package/src/core/agent-fields.mjs +37 -0
  16. package/src/core/atomic-write.mjs +25 -0
  17. package/src/core/config.mjs +36 -0
  18. package/src/core/dropped.mjs +17 -0
  19. package/src/core/errors.mjs +75 -0
  20. package/src/core/feedback-text.mjs +74 -0
  21. package/src/core/first-sight.mjs +31 -0
  22. package/src/core/git-commit.mjs +78 -0
  23. package/src/core/git.mjs +687 -0
  24. package/src/core/http.mjs +220 -0
  25. package/src/core/integrate.mjs +231 -0
  26. package/src/core/ledger.mjs +517 -0
  27. package/src/core/lifecycle.mjs +178 -0
  28. package/src/core/parser.mjs +566 -0
  29. package/src/core/roadmap-doc.mjs +558 -0
  30. package/src/core/roadmap-markdown.mjs +333 -0
  31. package/src/core/roadmap-text.mjs +72 -0
  32. package/src/core/routes.mjs +84 -0
  33. package/src/core/service.mjs +1212 -0
  34. package/src/core/sse.mjs +166 -0
  35. package/src/core/store.mjs +475 -0
  36. package/src/core/tool-kit.mjs +161 -0
  37. package/src/core/tools.mjs +358 -0
  38. package/src/core/view.mjs +236 -0
  39. package/src/domain.mjs +374 -0
  40. package/src/features/activity/index.mjs +2 -0
  41. package/src/features/activity/service.mjs +468 -0
  42. package/src/features/agents/directory-doc.mjs +106 -0
  43. package/src/features/agents/directory.mjs +395 -0
  44. package/src/features/agents/errors.mjs +18 -0
  45. package/src/features/agents/index.mjs +4 -0
  46. package/src/features/agents/models-port.mjs +77 -0
  47. package/src/features/agents/routes.mjs +52 -0
  48. package/src/features/agents/schema.mjs +38 -0
  49. package/src/features/agents/service.mjs +386 -0
  50. package/src/features/agents/sync.mjs +131 -0
  51. package/src/features/delegate/errors.mjs +10 -0
  52. package/src/features/delegate/index.mjs +5 -0
  53. package/src/features/delegate/model.mjs +81 -0
  54. package/src/features/delegate/registry.mjs +75 -0
  55. package/src/features/delegate/service.mjs +130 -0
  56. package/src/features/delegate/spawner.mjs +50 -0
  57. package/src/features/delegate/tools.mjs +49 -0
  58. package/src/features/index.mjs +35 -0
  59. package/src/features/integration/index.mjs +3 -0
  60. package/src/features/integration/routes.mjs +50 -0
  61. package/src/features/integration/service.mjs +162 -0
  62. package/src/features/manual-completion/guard.mjs +22 -0
  63. package/src/features/manual-completion/index.mjs +4 -0
  64. package/src/features/manual-completion/routes.mjs +17 -0
  65. package/src/features/manual-completion/service.mjs +40 -0
  66. package/src/features/master/agent-proposals.mjs +153 -0
  67. package/src/features/master/apply.mjs +141 -0
  68. package/src/features/master/db-roadmap.mjs +169 -0
  69. package/src/features/master/errors.mjs +16 -0
  70. package/src/features/master/index.mjs +5 -0
  71. package/src/features/master/prompt.mjs +37 -0
  72. package/src/features/master/proposals.mjs +50 -0
  73. package/src/features/master/propose.mjs +103 -0
  74. package/src/features/master/read.mjs +55 -0
  75. package/src/features/master/roadmap-edit.mjs +214 -0
  76. package/src/features/master/routes.mjs +25 -0
  77. package/src/features/master/schema.mjs +45 -0
  78. package/src/features/master/service.mjs +141 -0
  79. package/src/features/master/session.mjs +148 -0
  80. package/src/features/master/supervise.mjs +46 -0
  81. package/src/features/master/tools.mjs +129 -0
  82. package/src/features/milestone-feedback/errors.mjs +9 -0
  83. package/src/features/milestone-feedback/index.mjs +4 -0
  84. package/src/features/milestone-feedback/roadmap.mjs +164 -0
  85. package/src/features/milestone-feedback/routes.mjs +85 -0
  86. package/src/features/milestone-feedback/service.mjs +533 -0
  87. package/src/features/milestone-feedback/sessions.mjs +123 -0
  88. package/src/features/milestone-feedback/stored.mjs +66 -0
  89. package/src/features/pilot/cleanup.mjs +97 -0
  90. package/src/features/pilot/errors.mjs +16 -0
  91. package/src/features/pilot/git-commit.mjs +61 -0
  92. package/src/features/pilot/goal-port.mjs +38 -0
  93. package/src/features/pilot/index.mjs +5 -0
  94. package/src/features/pilot/merge.mjs +166 -0
  95. package/src/features/pilot/model.mjs +226 -0
  96. package/src/features/pilot/prompts.mjs +46 -0
  97. package/src/features/pilot/routes.mjs +67 -0
  98. package/src/features/pilot/schema.mjs +123 -0
  99. package/src/features/pilot/service.mjs +583 -0
  100. package/src/features/pilot/skills-service.mjs +83 -0
  101. package/src/features/pilot/skills.mjs +201 -0
  102. package/src/features/pilot/starter.mjs +108 -0
  103. package/src/features/pilot/tools.mjs +303 -0
  104. package/src/features/qa-reports/errors.mjs +13 -0
  105. package/src/features/qa-reports/index.mjs +6 -0
  106. package/src/features/qa-reports/model.mjs +111 -0
  107. package/src/features/qa-reports/routes.mjs +34 -0
  108. package/src/features/qa-reports/schema.mjs +59 -0
  109. package/src/features/qa-reports/service.mjs +516 -0
  110. package/src/features/qa-reports/tools.mjs +99 -0
  111. package/src/features/roadmap-store/errors.mjs +14 -0
  112. package/src/features/roadmap-store/index.mjs +6 -0
  113. package/src/features/roadmap-store/routes.mjs +180 -0
  114. package/src/features/roadmap-store/service.mjs +306 -0
  115. package/src/features/roadmap-store/tools.mjs +62 -0
  116. package/src/features/start/index.mjs +3 -0
  117. package/src/features/start/routes.mjs +22 -0
  118. package/src/features/start/service.mjs +122 -0
  119. package/src/features/types.mjs +13 -0
  120. package/src/service.mjs +26 -0
  121. package/src/tools.mjs +39 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ailuvu-art
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,283 @@
1
- # Temporary Holding Version
1
+ # dsh-pilot-board
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ One board for the milestones and tasks of a project. Agents in any git worktree claim, note, and submit tasks; you watch progress live in the right sidebar and approve or send feedback.
4
+
5
+ ## Screenshots
6
+
7
+ ### Full Kanban board
8
+
9
+ Five live columns (`Locked`, `Ready`, `Running`, `Review`, and the collapsible `Done` rail) track tasks across worktrees with live agent activity, milestone filters, Master agent chat, and one-click milestone pilots.
10
+
11
+ ![Full Kanban board](docs/screenshots/kanban-board.png)
12
+
13
+ ### Right-sidebar compact board alongside an active task session
14
+
15
+ Starting a task creates its dedicated worktree and branch, opens a new session with the kickoff message, and keeps the compact Kanban board synchronized in the right sidebar.
16
+
17
+ ![Compact Kanban board in the right sidebar](docs/screenshots/sidebar-board.png)
18
+
19
+ ### Task details drawer & Start controls
20
+
21
+ Click any card to inspect its description, `Done when` criteria, dependencies, QA reports, and timeline, or launch work in a new worktree with **Start**.
22
+
23
+ ![Task details drawer](docs/screenshots/task-drawer.png)
24
+
25
+ ### Master agent pane
26
+
27
+ Open the project-level **Master** chat directly on the board to review status, onboard new repositories, and confirm milestone or agent proposals.
28
+
29
+ ![Master agent pane](docs/screenshots/master-pane.png)
30
+
31
+ ```mermaid
32
+ flowchart LR
33
+ RM["ROADMAP.md<br/>(base branch)"] --> H[Host: parser + ledger]
34
+ A1[Agent @ worktree A] -->|roadmap_* tools| H
35
+ A2[Agent @ worktree B] -->|roadmap_* tools| H
36
+ H -->|SSE| UI[Board tab]
37
+ UI -->|Approve / Feedback / Release / Reopen| H
38
+ H -->|feedback as follow-up| A1
39
+ ```
40
+
41
+ - **Structure lives in git.** `ROADMAP.md` is read from the base branch (`main` by default) with `git show`, so edits appear once merged.
42
+ - **Status lives on the Host.** An append-only ledger keyed by the repository's git common dir, shared by every worktree.
43
+ - **Only a human marks a task done.** Agents can claim, note, block, unblock, and submit; the tools enforce it.
44
+
45
+ ## ROADMAP.md format
46
+
47
+ ```markdown
48
+ # Roadmap: Project name
49
+
50
+ ## M1: Foundation
51
+ Goal: optional milestone text.
52
+
53
+ ### M1.1: CI setup
54
+ Optional description (Markdown).
55
+ - Done when: pipeline green on PR
56
+ - Depends: —
57
+
58
+ ### M1.2: Database schema
59
+ - Depends: M1.1
60
+ ```
61
+
62
+ Milestone IDs are `M<n>`, task IDs `M<n>.<m>` under their milestone. Errors (duplicate ID, task outside its milestone, unknown dependency, cycle, status for a removed task, an old `P` ID) show at the top of the board with line numbers.
63
+
64
+ ## Status flow
65
+
66
+ ```mermaid
67
+ stateDiagram-v2
68
+ [*] --> todo
69
+ todo --> in_progress: claim (agent)
70
+ in_progress --> review: submit (agent)
71
+ in_progress --> blocked: block (agent)
72
+ blocked --> in_progress: unblock (agent)
73
+ review --> done: approve (you)
74
+ review --> in_progress: feedback (you)
75
+ in_progress --> todo: release (you) / auto on error
76
+ blocked --> todo: release (you) / auto on error
77
+ review --> todo: release (you)
78
+ done --> in_progress: reopen (you)
79
+ ```
80
+
81
+ - One session holds at most one active claim (`in_progress`, `blocked`, or `review`).
82
+ - A claim is released automatically when its session's turn ends with an error, when the session is archived, or when feedback cannot be delivered. A task in `review` is never auto-released.
83
+ - Feedback arrives in the claimant session as an ordinary user message; the agent fixes and calls `roadmap_submit` again.
84
+
85
+ ## Agent tools
86
+
87
+ | Tool | Purpose |
88
+ |---|---|
89
+ | `roadmap_status` | Milestones with %, tasks with status/claimant, what you can claim |
90
+ | `roadmap_claim(task_id)` | Take a task; returns description, done criteria, earlier feedback |
91
+ | `roadmap_note(task_id, text)` | Progress note on the timeline |
92
+ | `roadmap_submit(task_id, summary)` | Hand in for review |
93
+ | `roadmap_block(task_id, reason, needs_human_input?)` / `roadmap_unblock(task_id, text?)` | Report a blocker; `needs_human_input: true` marks the card "Needs your input", answered in the task chat and cleared by unblock |
94
+ | `roadmap_report_qa(commit, build?, summary?, results[])` | File an immutable QA report (one result per done criterion, with evidence) on the task this session or its parent holds in progress |
95
+ | `roadmap_delegate(agent, assignment)` | Start a mapped project agent as your subagent in the task worktree, on the model a human mapped to it; the claim stays with you |
96
+
97
+ Questions and design reviews happen in the embedded task chat: an agent that needs a decision calls `roadmap_block` with `needs_human_input: true`, and the human answers in the chat. The Approve & Merge confirmation shows the task's latest QA report and warns when the branch HEAD moved past the tested commit; `GET /api/roadmap-board/projects/<projectId>/qa-reports?taskId=<id>` answers `{ reports, branchHead }` (`branchHead` is the task branch's full sha, or `null`). See [docs/features/qa-reports.md](docs/features/qa-reports.md).
98
+
99
+ A milestone can be piloted end to end: **Pilot ▶** runs one goal-driven session through spec, plan approval, implementation, local review, blind QA and the final merge — see [docs/features/pilot.md](docs/features/pilot.md).
100
+
101
+ The project is resolved from the session's working directory, so start each agent session inside a worktree of the repository.
102
+
103
+ ## Start a task
104
+
105
+ A `todo` task whose dependencies are done shows two controls:
106
+
107
+ - **Start** creates the worktree `../<repo>-worktrees/<id>` on a new branch `task/<id>-<slug>` from the base branch, opens a new session in it, claims the task, and sends the agent a kickoff message. The board then opens the new session.
108
+ - **Claim here** claims the task for the sidebar's current session and sends it the kickoff. It shows only for that session's own project and is disabled while the session already holds a claim.
109
+
110
+ Start never deletes anything: if the branch or path already exists it stops with `worktree-exists`, and a later failure keeps the worktree and session and names them in the error. Both controls need the DSH session controller and working-directory service; without them `GET /api/roadmap-board/capabilities` reports `start: false` and the controls are hidden.
111
+
112
+ ## Project agents
113
+
114
+ The board stores project agents per project in DSH storage (M12.4), so edits take effect at once in every open board without a repository change. **Export to .agent/agents** writes them to `.agent/agents/<name>.md` of the project's **main working tree** (not a task worktree), where Codex and Claude Code find them; **Import from .agent/agents** reads that folder back. A file has YAML frontmatter with `name` (equal to the file name, `a-z`, `0-9` and single `-`, at most 64 characters) and `description` (the agent's purpose, one line, at most 1024 characters); the Markdown body is the agent's instructions (at most 16 KB). This is Claude Code's subagent format.
115
+
116
+ ```markdown
117
+ ---
118
+ name: reviewer
119
+ description: Reviews a diff for bugs and missing tests. Never edits code.
120
+ ---
121
+ You are a code reviewer. …
122
+ ```
123
+
124
+ In the left-sidebar **Roadmap Board**, choose a project and select **Subagent configuration** next to **Reload**. Close the panel (or press Escape) to return to the board. The right-sidebar **Roadmap** tab still offers the collapsible **Project agents** section. Both entry points list agents and let you create, edit, and remove them. The name is fixed after creation; other frontmatter fields are kept. A save or remove carries the version of the agents the form showed: if they changed meanwhile (another tab, the Master), it is refused with `agent-conflict` and the form shows the current agents. Export never overwrites a file edited outside the board unless you choose **Overwrite and export**, and never deletes a file; an invalid file is listed with its error and must be fixed on disk before an import. The board never commits. See [docs/features/roadmap-store.md](docs/features/roadmap-store.md) §7.3.
125
+
126
+ Use the **Model** dropdown on each valid agent to choose from DSH’s live model catalog (including advertised reasoning efforts) or **DSH default**, which follows DSH’s configured default. The board stores the mapping in `dsh_roadmap_board_agents_v1`, not in the repository. New agents start unassigned. An unassigned agent or one whose mapping no longer resolves cannot be delegated to; the board shows why an existing mapping is unavailable.
127
+
128
+ Inside a task, the main agent receives the ready agents as a roster in its kickoff and in `roadmap_status` / `roadmap_claim`, delegates work with `roadmap_delegate(agent, assignment)`, and keeps the claim. The child runs in the task worktree on the mapped model; the task card shows its agent name and model, and labels any subagent started another way **ad hoc**. See [docs/features/delegate.md](docs/features/delegate.md).
129
+
130
+ In **Project agents**, choose **Link for Codex and Claude Code** to preview the four relative links into `.agent/`, then **Create links** to create the missing ones:
131
+
132
+ | Link | Target |
133
+ |---|---|
134
+ | `.claude/agents` | `../.agent/agents` |
135
+ | `.codex/agents` | `../.agent/targets/codex/agents` |
136
+ | `.agents/skills` | `../.agent/skills` |
137
+ | `.claude/skills` | `../.agent/skills` |
138
+
139
+ Claude Code reads the original Markdown agents directly. Codex reads the generated TOML files; edit the Markdown or use the board, not the TOML. Both tools link the whole skills directory. MCP and hooks are not linked. Commit the links and their contents (including the generated TOML) to share them. Existing conflicts stop setup without changing anything. If Git checks out links as plain files (`core.symlinks=false`), enable symlink support and check those paths out again.
140
+
141
+ ## Milestone feedback inbox
142
+
143
+ Feedback on accepted work (a bug, an addition, a change) goes to the milestone's **Feedback inbox**, not back into the accepted task. Accepted tasks stay `done`. Feedback isn't scheduled work until you create or link a task. Only humans use the inbox: there are no agent tools for it.
144
+
145
+ ```mermaid
146
+ flowchart LR
147
+ F[Pending feedback] -->|Link to task| L[Linked]
148
+ F -->|Close + reason| C[Closed]
149
+ F -->|Create follow-up| D[Draft: task id + Markdown]
150
+ D -->|you merge it into the base branch| P[Check publication]
151
+ P -->|marker found in the task| L
152
+ P -->|not yet| D
153
+ P -->|id collision| R[Regenerate] --> D
154
+ D -->|Cancel draft| F
155
+ ```
156
+
157
+ - **Collect.** Every milestone row, including a milestone at 100%, has a **Feedback inbox** button with its pending count. Inside the inbox, choose **Add feedback**. A `done` task card offers **Give feedback**, which pre-fills that task as the source. Only non-blank text is required. The category (bug, addition, or change) is optional.
158
+ - **Open a session with it.** When the Host can start sessions, the capture form has **Open an agent session with this feedback**, on by default. **Send and open session** saves the item and opens a new agent session in the project's main working tree in one step; the board switches to it. The session claims no task. Its first prompt names the feedback ID, recaps the milestone (goal, tasks and their status), and carries the feedback text, category and source task, asking the agent to reproduce and report before any change. The item stays pending and lists its sessions (they survive a reload); **Open a session** on a pending item opens another one, and is the retry when a session could not open (the item is saved either way).
159
+ - **Triage.** The inbox opens on **Pending**. **History** lists linked and closed items. For a pending item, you can:
160
+ - **Link to task**: pick any task in the roadmap, for example when the work is already tracked.
161
+ - **Close**: enter a reason. The reason is required.
162
+ - **Create follow-up**: create a new task. See the next item.
163
+ - **Create a follow-up task.** Enter a one-line title and the done criteria, one per line.
164
+ - The destination is the item's milestone by default. You can select any other milestone in the roadmap.
165
+ - **Prepare task** reserves the next free task ID. The inbox then shows the ID, the base commit, and the exact Markdown block, including the line `<!-- roadmap-feedback:<id> -->`.
166
+ - While a draft exists, you can't link or close the item.
167
+ - **Publish it yourself.** The plugin never writes to the repository.
168
+ 1. On a branch from the base branch, add the copied block under the destination milestone in `ROADMAP.md`. Keep the marker line exactly as it is.
169
+ 2. Merge the branch into the base branch through your normal Git process.
170
+ 3. Choose **Check publication**. The plugin links the item once the marker appears inside the reserved task on the base branch. The board then reloads, and the new `todo` task counts toward its milestone's progress.
171
+
172
+ Opening an inbox also checks its drafts. A draft found published there is linked, and the board reloads as well. Feature branches and uncommitted edits are never read.
173
+ - **Conflicts.**
174
+ - **Collision**: the reserved ID is already taken on the base branch. The inbox shows the server's message and the marker line. If that task has the same title, it's probably your follow-up: add the marker line inside it and check again. Otherwise, choose **Regenerate task id** to reserve a new ID against the latest base.
175
+ - **Duplicate or misplaced marker**: the message explains how to fix the roadmap.
176
+ - **Cancel draft** drops the draft so you can link, close, or prepare it again. A cancelled ID is never reused. If the marker is already published correctly, the item is linked instead.
177
+ - **Linked items** show the target task's ID, title, and current status from the board. If the target leaves the roadmap, the inbox reports that the task is no longer in the roadmap. If the roadmap can't be read, the inbox reports that the status is unknown.
178
+ - **Errors and retry.** Errors appear inline in the inbox, and your typed text is kept. Unsent text in an inbox form is also kept in page memory while the board cannot show the milestone, for example when the base branch is briefly unreadable. A note says so, and the inbox reopens with your text when the roadmap is back. Saving or choosing Cancel clears it; reloading the page drops it. If someone else changed the item first (409), the item shows its latest state, and your unsent text stays available to copy. If the Host can't reach feedback storage or the roadmap (503), choose **Try again** to resend the same request.
179
+ - Counts come from `GET /api/roadmap-board/projects/<projectId>/feedback`. This single request reads feedback storage, not Git. A published draft stays pending until you check publication or open its inbox.
180
+
181
+ ## Agent activity
182
+
183
+ A claimed task (`in_progress`, `blocked`, `review`) shows a live **Agents** tree: the claimant session (`main`) and its sub-agents at any depth, each with its model (and reasoning effort), preset, and **working** or **idle**. Click a row to open that session. Archived sessions are hidden.
184
+
185
+ ```
186
+ ● main anthropic/claude (high) preset: default working
187
+ └ ● impl-3 anthropic/claude working
188
+ └ ● review-2 idle
189
+ ```
190
+
191
+ The tree is in memory only. It follows the Host's session events live and, after a restart, is rebuilt from the session store the first time the board shows the task. Changes reach the board over the existing stream, at most once per second per project.
192
+
193
+ ## Approve merges the task
194
+
195
+ When a task in `review` has a branch of its own (the claim's branch, not the base branch), **Approve** answers `202` and merges it in the background, one task per project at a time:
196
+
197
+ 1. **Preflight**: the main working tree must be on the base branch, clean, with no merge, rebase, or cherry-pick in progress; the task worktree likewise on its branch. Otherwise the attempt is `blocked` and nothing changes.
198
+ 2. **Rebase** the task branch onto the base branch in its worktree. A stop is aborted (`conflict`).
199
+ 3. **Check**: when the rebase changed the branch, run the project's check command (board settings, `verifyCommand`) with `/bin/sh -c` in the worktree, bounded by `verifyTimeoutMs`. A failure (`check-failed`) keeps the rebase and merges nothing.
200
+ 4. **Merge** `--no-ff` into the base branch in the main working tree. A stop is aborted (`conflict`).
201
+ 5. **Clean up** with git's safe commands: `git worktree remove` (no `--force`) and `git branch -d`. Whatever git refuses is kept and named. Sessions are kept.
202
+
203
+ Every attempt is an `integrate` event on the timeline; conflicts and failed checks show on the card with their detail, and the task stays in `review`. A task without its own branch is approved as before. A `done` task whose branch is still unmerged shows **Merge**, which runs the same steps without changing its status.
204
+
205
+ Limits: the check runs with the Host's environment; the board never pushes; a Host restart mid-run can leave a rebase or merge in progress, which the next attempt reports as `blocked`; macOS/Linux only (`/bin/sh`).
206
+
207
+ ## Install (web profile)
208
+
209
+ Install from npm:
210
+
211
+ ```bash
212
+ dsh plugin --profile web add dsh-pilot-board@0.1.0
213
+ ```
214
+
215
+ or with the `plugin_manager` tool (`action: install_bundle`, `target: dsh-pilot-board@0.1.0`).
216
+
217
+ ### Upgrading from `dsh-roadmap-board`
218
+
219
+ The package was renamed to `dsh-pilot-board` before its first release. Remove the old name first, because two entries would insert the same plugin row and both halves register the same tabs:
220
+
221
+ ```bash
222
+ dsh plugin --profile web remove dsh-roadmap-board
223
+ dsh plugin --profile web add dsh-pilot-board@0.1.0
224
+ ```
225
+
226
+ or **Plugins** in the sidebar: remove the `dsh-roadmap-board` bundle, then add `dsh-pilot-board@0.1.0`. Every storage domain keeps its `dsh_roadmap_board_*` name (`_v2`, `_archive_v2`, `_feedback_v1`, `_agents_v1`, `_roadmaps_v1`, `_qa_blobs_v1`), so board state, feedback, stored roadmaps, agent mappings, and QA evidence carry over unchanged. If a local dev checkout already generated Codex agent files, delete `.agent/targets/codex/agents/*.toml` once so they are regenerated with the new header.
227
+
228
+ From a local checkout during development:
229
+
230
+ ```bash
231
+ dsh plugin --profile web add /absolute/path/to/dsh-pilot-board
232
+ ```
233
+
234
+ Then refresh the page and open **Roadmap board** in the left sidebar (full Kanban panel) or **Roadmap** in the right sidebar.
235
+
236
+ ## Configuration (`cordis.patch.yml`)
237
+
238
+ | Key | Default | Meaning |
239
+ |---|---|---|
240
+ | `baseBranch` | `main` | Branch the roadmap is read from (also editable per project on the board) |
241
+ | `roadmapPath` | `ROADMAP.md` | Path relative to the repository root |
242
+ | `pollIntervalMs` | `5000` | Minimum interval between base-branch head checks |
243
+ | `gitTimeoutMs` | `5000` | Timeout per git command |
244
+ | `maxEventsPerProject` | `5000` | Soft ledger cap; only notes are trimmed |
245
+ | `toolResultMaxChars` | `6000` | Bound of every tool result |
246
+ | `autoReleaseOnError` | `true` | Release a claim when its turn ends with an error |
247
+ | `verifyTimeoutMs` | `600000` | Timeout of the check command before a merge (min 1000) |
248
+
249
+ ## Ledger retention and rollback
250
+
251
+ On a ledger write, a completed task whose ledger holds more than 50 events keeps its latest 50 in the active record (`dsh_roadmap_board_v2`) and moves older events to `dsh_roadmap_board_archive_v2`. This is the maximum before the note cap: when `maxEventsPerProject` is below 50, the project-wide cap can trim notes from those 50 as well. A checkpoint preserves the state needed to replay the retained events plus only the last claimant's worktree and branch, which a later `reopen` reuses. Active tasks are not compacted; the separate `maxEventsPerProject` soft cap can still trim notes from the active ledger. Archived events have no automatic expiry or cleanup, and the board does not expose an archive browser.
252
+
253
+ Normal board loads open only the active domain and derive task status from its checkpoints and retained events. They don't open or read the archive. The archive is read only when a new claimant needs the task's earlier feedback: the events archived up to the checkpoint's high-water mark are scanned, in sequence order, and their feedback is appended to the retained window's.
254
+
255
+ Storage reset at the Milestone/Task rename: this release starts fresh in `dsh_roadmap_board_v2` and `dsh_roadmap_board_archive_v2`. The old `dsh_roadmap_board` and `dsh_roadmap_board_archive` domains are left untouched and are never read. Rolling back to a pre-rename release reopens the old domains as they were at the rename; work recorded in the v2 domains is not carried over. Per-project settings (`baseBranch`, `roadmapPath` overrides) live in the project record, so they also reset to the `cordis.patch.yml` defaults.
256
+
257
+ Rolling back past M8 (approve merges): older releases refuse a ledger record that contains an `integrate` event (unknown kind). Before starting such a release, remove the `integrate` events from the affected project records (in a backup copy, then restore it), or stay on M8 and fix forward.
258
+
259
+ Back up `dsh_roadmap_board_v2` and `dsh_roadmap_board_archive_v2` together before upgrading, plus `dsh_roadmap_board_feedback_v1` (milestone feedback; independent of the ledger, so it can be restored on its own). To roll back to a release that cannot read checkpoints, stop the Host and restore the pre-compaction backup before starting the older release. Restoring that snapshot loses later changes unless you migrate them separately. To preserve post-backup history, first reconstruct the full ledger offline from a copy of both domains: for each project, merge retained events with archived events for that project's checkpointed tasks up through each task's checkpoint sequence (ignoring any later rows left by interrupted writes), deduplicate by sequence, and sort by sequence. Verify status and history, then replace the active records with the reconstructed ledger without checkpoint or sequence-floor fields. Don't downgrade directly against compacted records: the old release won't replay the archived prefix, and removing the archive won't restore it.
260
+
261
+ ## Development
262
+
263
+ ```bash
264
+ npm run build # regenerate client.js from client/*.js
265
+ npm run check # generated files up to date + syntax
266
+ npm test # node --test tests/unit tests/host (includes the architecture contract)
267
+ ```
268
+
269
+ `client.js` is generated: edit `client/*.js` (the board is English-only; copy lives in `client/100-copy.js`), then run `npm run build`. Code structure and the rules for new features: [ARCHITECTURE.md](ARCHITECTURE.md).
270
+
271
+ For a cold-load measurement on the real DSH JSON backend, make the DSH storage packages and Zod available to Node (for example, via the profile's `node_modules` on `NODE_PATH`), then run:
272
+
273
+ ```bash
274
+ ROADMAP_BENCHMARK_DSH=1 NODE_PATH="$HOME/.dsh/profiles/node_modules" node --test tests/host/ledger-compaction.test.mjs
275
+ ```
276
+
277
+ The test reports elapsed time without enforcing a CI timing threshold. Without `ROADMAP_BENCHMARK_DSH=1`, the test uses a dependency-free JSON adapter for correctness coverage, not a real DSH timing measurement.
278
+
279
+ Design: [SPEC.md](SPEC.md) · architecture: [ARCHITECTURE.md](ARCHITECTURE.md) · module contracts: [CONTRACTS.md](CONTRACTS.md) · verified DSH APIs: [docs/DSH-API.md](docs/DSH-API.md).
280
+
281
+ ## License
282
+
283
+ MIT