ai-agentmanager 1.21.0 → 1.23.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/CHANGELOG.md +12 -0
- package/README.md +84 -2
- package/package.json +1 -1
- package/public/app.js +64 -2
- package/public/designs.js +172 -0
- package/public/index.html +18 -0
- package/public/issues.js +255 -0
- package/public/keys.js +6 -2
- package/public/land.js +2 -0
- package/public/prvoice.js +103 -0
- package/public/reviews.js +318 -0
- package/public/speak.js +7 -2
- package/public/style.css +144 -0
- package/public/value.js +299 -0
- package/src/assistant.js +20 -5
- package/src/cli.js +252 -1
- package/src/designs.js +72 -0
- package/src/issues.js +272 -0
- package/src/jira.js +15 -4
- package/src/manager.js +78 -8
- package/src/notify.js +1 -0
- package/src/reviews.js +359 -0
- package/src/server.js +89 -0
- package/src/value.js +609 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.0 (2026-11-06)
|
|
4
|
+
|
|
5
|
+
- **Reviews.** Reviewer agents for other people's pull requests. **Reviews** (or `g`) lists PRs where your review is requested; tick them, or paste any PR link. A reviewer works read-only on the PR's head: a verdict (approve, approve with nits, blocked), the approval blockers with file, line, why and what would resolve them, critical questions for the author, risks, test gaps and nits. Tick what to send and **Post as pending review** (a draft review under your name that you submit on GitHub), or **Copy**. When the author pushes, the reviewer re-checks its blockers. **🔊 Explain** reads it aloud. The assistant's GitHub reviews source starts reviewers, or only lists them when you pick. `agentmgr review <PR>`, `agentmgr reviews` (`show`, `post`, `dismiss`).
|
|
6
|
+
|
|
7
|
+
## 1.22.0 (2026-11-06)
|
|
8
|
+
|
|
9
|
+
- **Value.** A **Value** button (or `v`) shows what the delivered work is worth, by day, week, month and quarter: engineering hours saved (valued at your loaded hourly rate), other savings, potential revenue and strategic weight, against the AI cost and your own time (leverage, value per AI dollar). Each delivered item (its pull request merged, or done without one) gets an estimate from one short model call, with reasons; correct any figure and yours win, marked ✎ in reports. Weekly, monthly and quarterly reports (daily if you like) go to Slack and, if you choose, a Google Doc, and are saved in `~/.agentmanager/value` with `value.csv`. `agentmgr value` (`edit`, `estimate`, `report`, `set`).
|
|
10
|
+
- **Jira summary.** A **Jira** button (or `i`) lists every Jira or Linear issue an agent works on, the ones waiting for your review first, with a count on the button: the issue and its Jira status, where the work stands (ready for your review, needs your answer, approved but not merged, checks failing, merged), its plan (steps done, approval) and design doc (read it here, its page and Google Doc), its pull request and checks, and a link to the agent's session. **Copy** puts the list on the clipboard as a Markdown table. From the terminal: `agentmgr issues` (`--all`, `--markdown`, `--json`).
|
|
11
|
+
- **Pick which Jira issues get agents.** **Let me pick** in **Assistant** (`agentmgr assistant set --pick-issues on`): the assistant lists new Jira and Linear issues assigned to you under **Jira → Not started** instead of starting agents for them. Tick the ones you want and **Start**; agents start only for those. **Dismiss** takes the rest off the list for good. Also `agentmgr issues propose`, `start` and `dismiss`.
|
|
12
|
+
- **Explain the review, by voice.** **🔊 Explain** on each pull request (in Jira, Land and the agent's AI review) reads a short briefing for the person about to review it: the issue, what the PR does (from its design doc or walkthrough), its state and checks, what the AI review found met, missing and risky, the high-risk changes, open questions, and what's left before it can merge. It starts at once (no model call); Review's change-by-change walkthrough goes deeper.
|
|
13
|
+
- **Designs.** A **Designs** button (or `d`) lists every agent's design doc, the ones waiting for your review first: its name and summary from DESIGN.md, the agent and its issue, and links to read it here, its design page, its Google Doc and the specs it builds on. Search, filters and **Copy** as Markdown. `agentmgr designs` (`--waiting`, `--markdown`, `--json`).
|
|
14
|
+
|
|
3
15
|
## 1.21.0 (2026-11-06)
|
|
4
16
|
|
|
5
17
|
- **Map: where agents are in the code.** A **Map** page (or `m`) shows a project's folders as tiles with each agent on the folders it's changing or reading now. Two agents that changed the same file are joined in red; one reading a file another changed is joined with a dashed line, the warning before they collide, and each is spelled out above the map.
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Run one background [Claude Code](https://claude.com/claude-code) agent per inten
|
|
|
32
32
|
- **Standup.** Each weekday at 9:00 (or whenever you press **Standup**, or `p`), each agent with news since the last one is read aloud in a sentence or two, each in its own voice: what it did, what it's on, what it needs from you. Agents that need you go first and quiet ones are left out. It stops on an agent that needs you, with its questions beside it to answer by tap, or by voice when **Answer by voice** is on (what you say is read back, then sent when you say "send"). The wording comes from one short tool-less model call, plain wording if that fails. A Slack alert says when it's ready (Alerts). Change the time, weekends and wording in the player, or in config.json: `"standup": { "at": "09:00", "weekends": false, "ai": true, "notify": true }`. Speech is your browser's own; voice answers may be sent to your browser's maker to be turned into text.
|
|
33
33
|
- **Map.** A project's folders as tiles sized by their files, with each agent as a badge on the folders it is changing (filled) or reading right now (ring), refreshed every few seconds (**Map** at the top, `m`, or `#map`). A red line joins two agents that changed the same file: they will conflict when merged. A dashed line runs from an agent reading a file to the agent that already changed it, which is the warning before they collide. Each pair is also spelled out above the map. Reading comes from the last half hour of each agent's session; changes from the conflict radar.
|
|
34
34
|
- **Watch.** Every running agent's session side by side on one page, live (**Watch** at the top, or `#watch`), so you follow them all without clicking from one to the next. Tiles keep a fixed order; one waiting on you gets a red border and is counted at the top. Click a tile and type to answer it there; its name opens the agent. Show running agents, only those waiting on you or only those working, one project's, or a fixed number per row; **Fit** sizes the tiles so all of them (up to 12) are on screen, keeping the newest lines in view. Tiles show each session at its own size and never resize it.
|
|
35
|
-
- **Keyboard shortcuts.** Press **?** for the list. `j`/`k` move through the agents, `Enter` opens the terminal, `r` reviews changes, `s` resumes, `Shift+X` closes the session, `e` edits; `n` new agents, `a` Ask Agent, `/` filter, `w` Watch, `m` Map, `p` the standup, `1`-`5` the side tabs. Single keys work when you're not typing in a field or a terminal. From inside a terminal, `Ctrl+Shift+↓`/`↑` switch to the next or previous agent's terminal and `Ctrl+Shift+L` leaves it.
|
|
35
|
+
- **Keyboard shortcuts.** Press **?** for the list. `j`/`k` move through the agents, `Enter` opens the terminal, `r` reviews changes, `s` resumes, `Shift+X` closes the session, `e` edits; `n` new agents, `a` Ask Agent, `/` filter, `w` Watch, `m` Map, `p` the standup, `i` the Jira summary, `d` Designs, `1`-`5` the side tabs. Single keys work when you're not typing in a field or a terminal. From inside a terminal, `Ctrl+Shift+↓`/`↑` switch to the next or previous agent's terminal and `Ctrl+Shift+L` leaves it.
|
|
36
36
|
- **Landing.** A **Land** tab with every agent's open pull request: ready to merge, needs fixes, behind, waiting. Failing checks and requested changes go back to the agent automatically (a few times at most), and so does every new review comment while the PR is open; **Update**, **Ask to fix** and **Merge** in one click.
|
|
37
37
|
- **Triggers.** A label on a GitHub issue starts an agent for it, `/agent …` comments on an agent's pull request reach the agent, and a webhook starts agents from Jira automation or CI. No model watches, so no tokens are spent waiting.
|
|
38
38
|
- **Repo memory.** What one agent learns about a repo (how to run its tests, a gotcha) is recorded in one line and given to every later agent there.
|
|
@@ -905,7 +905,7 @@ An always-on Claude session that works on your behalf. **Assistant** in the top
|
|
|
905
905
|
|
|
906
906
|
| It watches | What it does |
|
|
907
907
|
|---|---|
|
|
908
|
-
| Jira issues newly assigned to you | Starts an agent in the matching project, with the issue link first so the agent is named after the issue (`OPS-7`) |
|
|
908
|
+
| Jira issues newly assigned to you | Starts an agent in the matching project, with the issue link first so the agent is named after the issue (`OPS-7`); with **Let me pick** on, lists it under **Jira → Not started** for you to tick instead |
|
|
909
909
|
| Linear issues newly assigned to you (turn it on in the dialog) | The same, with the Linear link first (`ENG-42`) |
|
|
910
910
|
| New comments and mentions on your Jira issues | Passes the comment to the agent on that issue (`agentmgr tell`), or starts one if the comment asks for new work |
|
|
911
911
|
| GitHub pull requests waiting for your review | Starts a review agent that drafts the review for you to post |
|
|
@@ -926,6 +926,65 @@ agentmgr assistant pause # stop checking and close the sessio
|
|
|
926
926
|
|
|
927
927
|
Settings live in `config.json` under `"assistant"`. A running assistant reads new watch lists and notes after **Pause** and **Turn on**.
|
|
928
928
|
|
|
929
|
+
### Jira summary
|
|
930
|
+
|
|
931
|
+
**Jira** in the top bar (or `i`) lists every Jira or Linear issue an agent works on (the ones started from an issue link, by you or the assistant), one row per agent. **Waiting for you** comes first, and its count shows on the button:
|
|
932
|
+
|
|
933
|
+
| Where it stands | When |
|
|
934
|
+
|---|---|
|
|
935
|
+
| Needs your answer | The agent asked a question, waits at a prompt, or its plan waits for review |
|
|
936
|
+
| Ready for your review | Its pull request is open, not a draft, with no review yet and checks not failing; or it finished without a pull request |
|
|
937
|
+
| Blocked | It says it can't go on |
|
|
938
|
+
| Approved, not merged yet | You approved; merging is left |
|
|
939
|
+
|
|
940
|
+
**Not started** comes before them: issues proposed for agents, each with a box to tick. Tick the ones you want and press **Start**: agents start only for those, named after the issue. **Dismiss** takes ticked ones off the list, and they aren't proposed again. Issues get there when **Let me pick** is on in **Assistant** (`agentmgr assistant set --pick-issues on`): the assistant then proposes new Jira and Linear issues assigned to you instead of starting agents for them. You can propose one yourself too: `agentmgr issues propose @cc "<issue link> what to do"`.
|
|
941
|
+
|
|
942
|
+
**Agents on it** has the ones still working, fixing failing checks or working on your review comments; **Done** the merged and closed ones. Each row shows the issue with its Jira status, the agent's plan (**Read** it here, steps done, and whether it waits for your approval) and design doc (**Read**, its design page and Google Doc), the pull request with its checks and AI review, and the agent, which opens its session. Jira status needs your site, email and API token in **Settings → Jira** (public Atlassian Cloud issues need nothing); it's fetched a few issues at a time and kept five minutes. **Copy** puts the list as a Markdown table on the clipboard, for Slack, Jira or a doc.
|
|
943
|
+
|
|
944
|
+
```bash
|
|
945
|
+
agentmgr issues # not started, and waiting for your review
|
|
946
|
+
agentmgr issues start OPS-7 OPS-9 # start agents for proposed issues
|
|
947
|
+
agentmgr issues dismiss OPS-8 # not for an agent
|
|
948
|
+
agentmgr issues --all # and the rest
|
|
949
|
+
agentmgr issues --markdown # a table to paste
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### Explain the review, by voice
|
|
953
|
+
|
|
954
|
+
**🔊 Explain** on a pull request (in **Jira**, **Land**, and next to **Review with AI** on the agent) reads a short spoken briefing for whoever reviews it, in this order: the issue; the PR and its state (open or draft, checks, conflicts, approved or changes requested); what it does, from the agent's design doc, else its change walkthrough; the AI review's verdict with what is met, missing and risky; the high-risk changes from the walkthrough; questions the agent is waiting on; and what's left before it can merge. It's built from what AI Agent Manager already tracks, so it starts at once; for each change in turn, use 🔊 Listen in **Review**. Pause, stop and speed are next to it while it plays.
|
|
955
|
+
|
|
956
|
+
### Designs
|
|
957
|
+
|
|
958
|
+
**Designs** in the top bar (or `d`) lists every agent's design doc, the ones whose work waits for your review first, with their count on the button. Each shows the doc's name and the summary from its DESIGN.md, the agent (opens its session), its Jira issue and where the work stands, and links: **Read** it here, the design page the agent published, its Google Doc after **Publish to Google Drive**, and the PRDs and tech specs in the agent's brief. Search by name, summary, agent, project or issue; **Copy** puts the shown list on the clipboard as Markdown.
|
|
959
|
+
|
|
960
|
+
```bash
|
|
961
|
+
agentmgr designs # all design docs
|
|
962
|
+
agentmgr designs --waiting # only the ones waiting for your review
|
|
963
|
+
agentmgr designs --markdown # a list to paste
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
### Reviews: other people's pull requests
|
|
967
|
+
|
|
968
|
+
When you're a reviewer on someone else's pull request, a reviewer agent does the first careful pass for you. **Reviews** in the top bar (or `g`) lists pull requests where GitHub has your review requested; tick some and **Review with agents**, or paste any PR link and **Review**. The project is the one whose repository the PR is in.
|
|
969
|
+
|
|
970
|
+
A reviewer is read-only. It checks out the PR's head, reads the description, discussion and diff and as much of the surrounding code as it needs, and may run the tests; it never commits, pushes, approves or comments. It writes:
|
|
971
|
+
|
|
972
|
+
- **A verdict:** approve, approve with nits, or **blocked**, with the reason. Any open blocker means blocked.
|
|
973
|
+
- **Approval blockers:** each with its file and line, why it fails (correctness, security, data loss, a breaking change, missing tests for risky logic, not doing what the PR says), and what would resolve it. Style is never a blocker.
|
|
974
|
+
- **Critical questions for the author:** what the code and description don't answer, such as intent, edge cases, rollout and rollback.
|
|
975
|
+
- **Risks, test gaps and nits**, kept apart from the blockers.
|
|
976
|
+
|
|
977
|
+
Open a review to read it, ask the reviewer about it in its session, or hear it with **🔊 Explain**. Tick what to send (open blockers and questions are ticked to start with) and **Post as pending review**: it becomes a draft review on GitHub under your name, with each item on its line, that only you see until you submit it there. A line outside the diff goes in the review's text instead. **Copy** gives the ticked items as Markdown. When the author pushes, the review is marked **New commits** and the reviewer re-checks each blocker, marking the fixed ones resolved.
|
|
978
|
+
|
|
979
|
+
With **GitHub reviews** on in **Assistant**, it starts reviewers for new requests by itself, unless **Let me pick** is on; then they wait in **Reviews** for you to tick.
|
|
980
|
+
|
|
981
|
+
```bash
|
|
982
|
+
agentmgr review https://github.com/acme/api/pull/42 # start a reviewer (--project, --notes)
|
|
983
|
+
agentmgr reviews # the list, with verdicts
|
|
984
|
+
agentmgr reviews show <agent> # blockers, questions, risks
|
|
985
|
+
agentmgr reviews post <agent> b1 q2 # a pending review with those items
|
|
986
|
+
```
|
|
987
|
+
|
|
929
988
|
## Triggers
|
|
930
989
|
|
|
931
990
|
Start agents from where the work lives, with no session watching and no tokens spent on it. **Assistant → Triggers…**, or `agentmgr triggers`:
|
|
@@ -945,6 +1004,29 @@ Agents started this way are marked **⚡ GitHub** or **⚡ webhook**, Slack aler
|
|
|
945
1004
|
}
|
|
946
1005
|
```
|
|
947
1006
|
|
|
1007
|
+
## Value
|
|
1008
|
+
|
|
1009
|
+
**Value** in the top bar (or `v`) shows what the work delivered with agents is worth, for you and for management: by **Day**, **Week**, **Month** or **Quarter**, with bars for the last periods and the items behind each.
|
|
1010
|
+
|
|
1011
|
+
| Figure | What it is |
|
|
1012
|
+
|---|---|
|
|
1013
|
+
| Value delivered | Engineering hours the work saved × your loaded hourly rate, plus other savings in its first year |
|
|
1014
|
+
| Potential revenue | Revenue the work plausibly enables or protects in its first year (kept apart: it's the least certain) |
|
|
1015
|
+
| Strategic | Items rated 4 or 5 of 5 for moving the product or company position |
|
|
1016
|
+
| Leverage | Engineering hours delivered per hour of your own time (30 minutes per item unless you set it) |
|
|
1017
|
+
| AI cost | What the agents cost, and value per AI dollar |
|
|
1018
|
+
|
|
1019
|
+
Work counts once it's delivered: its pull request merged, or the agent finished without one. Each item gets an estimate from one short model call (at most 30 a day) based on its issue, pull request, design doc, results and AI review, with a reason for each figure. They are estimates, and conservative by instruction. **Edit** any figure, category or the one-line summary for management: yours win, are marked, and stay through re-estimates. **Don't count it** leaves an item out. **Notes for the estimates** in settings give the model your context ("B2B SaaS, ~2,000 customers; checkout work affects revenue").
|
|
1020
|
+
|
|
1021
|
+
Reports: **Copy report** (Markdown) or **Send** for the current period or the one just ended, and on a schedule (weekly on Mondays, monthly on the 1st and quarterly by default; daily if you turn it on; at 09:00) to Slack (with **value reports** on in Slack alerts) and, if you choose, as a Google Doc in "Value reports (AI Agent Manager)" through the Google Drive connector of your Claude account. Every report is also saved in `~/.agentmanager/value/`, next to `value.csv` with every item's figures.
|
|
1022
|
+
|
|
1023
|
+
```bash
|
|
1024
|
+
agentmgr value --period month # totals by month, and this month's items
|
|
1025
|
+
agentmgr value edit OPS-7 --revenue 15000 --summary "Ends login timeouts for our largest customer"
|
|
1026
|
+
agentmgr value report --kind quarter --current # this quarter so far, as Markdown
|
|
1027
|
+
agentmgr value set --rate 140 --reports weekly,monthly,quarterly --at 08:30 --drive on
|
|
1028
|
+
```
|
|
1029
|
+
|
|
948
1030
|
## Results and spend
|
|
949
1031
|
|
|
950
1032
|
**Results** in the top bar shows how agents did over the last 7, 30 or 90 days (or all time): how many started and how many opened a pull request, PRs merged and closed, the merge rate, the median time from starting an agent to its first PR and to merge, and the cost per merged PR. The same by engine and model (which one gets merged more, for less), by where agents came from (you, the assistant, triggers, the backlog, teams, races) and by project. `agentmgr stats --days 30`.
|
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -25,6 +25,11 @@ import { initCode } from '/code.js';
|
|
|
25
25
|
import { initMachine } from '/machine.js';
|
|
26
26
|
import { initWatch } from '/watch.js';
|
|
27
27
|
import { initStandup } from '/standup.js';
|
|
28
|
+
import { initIssues } from '/issues.js';
|
|
29
|
+
import { reviewSpeech } from '/prvoice.js';
|
|
30
|
+
import { initDesigns } from '/designs.js';
|
|
31
|
+
import { initReviews } from '/reviews.js';
|
|
32
|
+
import { initValue } from '/value.js';
|
|
28
33
|
import { initCodeMap } from '/codemap.js';
|
|
29
34
|
import { initKeys } from '/keys.js';
|
|
30
35
|
import { morph } from '/morph.js';
|
|
@@ -51,8 +56,10 @@ const [hashId, hashView] = loginHash ? [null, null] : (ticketHash ? goHash : loc
|
|
|
51
56
|
const watchOnLoad = hashId === 'watch';
|
|
52
57
|
const standupOnLoad = hashId === 'standup';
|
|
53
58
|
const mapOnLoad = hashId === 'map';
|
|
59
|
+
const valueOnLoad = hashId === 'value';
|
|
60
|
+
const reviewsOnLoad = hashId === 'reviews';
|
|
54
61
|
let watchShown = false;
|
|
55
|
-
let selectedId = (watchOnLoad || standupOnLoad || mapOnLoad ? null : hashId) || null;
|
|
62
|
+
let selectedId = (watchOnLoad || standupOnLoad || mapOnLoad || valueOnLoad || reviewsOnLoad ? null : hashId) || null;
|
|
56
63
|
let openTermOnLoad = hashView === 'term' || hashView === 'code' || isShell(hashView) || isBrowser(hashView);
|
|
57
64
|
let filterText = '';
|
|
58
65
|
// "Only agents created in the last N days": remembered in this browser.
|
|
@@ -202,6 +209,34 @@ const standupUi = initStandup({
|
|
|
202
209
|
toast: (m, ms) => toast(m, ms),
|
|
203
210
|
openAgent: (id) => (showTab('agents'), select(id)),
|
|
204
211
|
});
|
|
212
|
+
// Jira: every issue an agent works on, the ones waiting for your review first.
|
|
213
|
+
const issuesUi = initIssues({
|
|
214
|
+
api,
|
|
215
|
+
$,
|
|
216
|
+
esc,
|
|
217
|
+
ago,
|
|
218
|
+
toast: (m, ms) => toast(m, ms),
|
|
219
|
+
openAgent: (id) => (showTab('agents'), select(id)),
|
|
220
|
+
openDoc: (id, kind) => (showTab('agents'), select(id), openDoc(id, kind)),
|
|
221
|
+
});
|
|
222
|
+
$('#issues-btn').onclick = () => issuesUi.open();
|
|
223
|
+
// Designs: every agent's design doc, the ones waiting for your review first.
|
|
224
|
+
const designsUi = initDesigns({
|
|
225
|
+
api,
|
|
226
|
+
$,
|
|
227
|
+
esc,
|
|
228
|
+
ago,
|
|
229
|
+
toast: (m, ms) => toast(m, ms),
|
|
230
|
+
openAgent: (id) => (showTab('agents'), select(id)),
|
|
231
|
+
openDoc: (id) => (showTab('agents'), select(id), openDoc(id, 'designdoc')),
|
|
232
|
+
});
|
|
233
|
+
$('#designs-btn').onclick = () => designsUi.open();
|
|
234
|
+
// Reviews: other people's pull requests, reviewed by agents for you.
|
|
235
|
+
const reviewsUi = initReviews({ api, $, esc, ago, toast: (m, ms) => toast(m, ms), openAgent: (id) => (showTab('agents'), select(id)) });
|
|
236
|
+
$('#reviews-btn').onclick = () => reviewsUi.open();
|
|
237
|
+
// Value: what the delivered work is worth, for you and for management.
|
|
238
|
+
const valueUi = initValue({ api, $, esc, toast: (m, ms) => toast(m, ms), openAgent: (id) => (showTab('agents'), select(id)) });
|
|
239
|
+
$('#value-btn').onclick = () => valueUi.open();
|
|
205
240
|
// Keyboard shortcuts (keys.js): the same actions as the buttons.
|
|
206
241
|
const keysUi = initKeys({ $, esc, run: (act) => shortcut(act) });
|
|
207
242
|
$('#keys-btn').onclick = () => keysUi.help();
|
|
@@ -243,6 +278,10 @@ function shortcut(act) {
|
|
|
243
278
|
if (act === 'watch') return $('#watch-btn') ? $('#watch-btn').click() : false;
|
|
244
279
|
if (act === 'standup') return standupUi.open();
|
|
245
280
|
if (act === 'map') return $('#map-btn').click();
|
|
281
|
+
if (act === 'issues') return issuesUi.open();
|
|
282
|
+
if (act === 'designs') return designsUi.open();
|
|
283
|
+
if (act === 'reviews') return reviewsUi.open();
|
|
284
|
+
if (act === 'value') return valueUi.open();
|
|
246
285
|
if (act.startsWith('tab:')) return showTab(act.slice(4));
|
|
247
286
|
return false;
|
|
248
287
|
}
|
|
@@ -377,7 +416,11 @@ function reviewBox(a) {
|
|
|
377
416
|
if (noRepo(a)) return { button: '', box: '' };
|
|
378
417
|
const r = a.aiReview;
|
|
379
418
|
const button = `<button class="small" data-act="review" ${r?.pending ? 'disabled' : ''}
|
|
380
|
-
title="Check the work against the intent and brief: what is met, missing or risky. A separate one-off model call; runs by itself when the agent says it is done">${r?.pending ? 'Reviewing…' : 'Review with AI'}</button
|
|
419
|
+
title="Check the work against the intent and brief: what is met, missing or risky. A separate one-off model call; runs by itself when the agent says it is done">${r?.pending ? 'Reviewing…' : 'Review with AI'}</button>${
|
|
420
|
+
r?.verdict || a.prs?.some((p) => p.source !== 'mentioned' && p.state)
|
|
421
|
+
? listenHtml(`prvoice:${a.id}`, { title: 'Explain the review aloud: the PR, its checks, the AI review, the riskiest changes and what is left', label: 'Explain review' })
|
|
422
|
+
: ''
|
|
423
|
+
}`;
|
|
381
424
|
// An unhandled review shows as a card above the brief; a handled one stays here, compact.
|
|
382
425
|
if (!r?.verdict || !r.seen) return { button, box: '' };
|
|
383
426
|
return {
|
|
@@ -691,6 +734,8 @@ bindListen((id) => {
|
|
|
691
734
|
else if (what === 'walk') parts = reviewUi.listenParts();
|
|
692
735
|
else if (what === 'score') parts = a?.docs?.scorecard?.data ? scorecardSpeech(a.docs.scorecard) : null;
|
|
693
736
|
else if (what === 'sidewalk') parts = sidePane?.listenParts();
|
|
737
|
+
else if (what === 'prvoice') parts = reviewSpeech(a, issuesUi.about(agentId));
|
|
738
|
+
else if (what === 'reviewer') parts = reviewsUi.speech(agentId);
|
|
694
739
|
if (!parts?.length || !play(id, parts)) toast('Nothing to read aloud here (or this browser has no speech)');
|
|
695
740
|
});
|
|
696
741
|
|
|
@@ -4102,6 +4147,16 @@ function handleEvent(msg) {
|
|
|
4102
4147
|
watchShown = true;
|
|
4103
4148
|
mapUi.show(true);
|
|
4104
4149
|
}
|
|
4150
|
+
if (reviewsOnLoad && !watchShown) {
|
|
4151
|
+
watchShown = true;
|
|
4152
|
+
history.replaceState(null, '', '#');
|
|
4153
|
+
reviewsUi.open();
|
|
4154
|
+
}
|
|
4155
|
+
if (valueOnLoad && !watchShown) {
|
|
4156
|
+
watchShown = true;
|
|
4157
|
+
history.replaceState(null, '', '#');
|
|
4158
|
+
valueUi.open();
|
|
4159
|
+
}
|
|
4105
4160
|
if (standupOnLoad && !watchShown) {
|
|
4106
4161
|
watchShown = true;
|
|
4107
4162
|
history.replaceState(null, '', '#');
|
|
@@ -4117,6 +4172,9 @@ function handleEvent(msg) {
|
|
|
4117
4172
|
watchDocs(msg.agent);
|
|
4118
4173
|
agentChanged(msg.agent);
|
|
4119
4174
|
if (msg.agent.builds) builtUi.sessionChanged(msg.agent);
|
|
4175
|
+
issuesUi.changed();
|
|
4176
|
+
designsUi.changed();
|
|
4177
|
+
if (msg.agent.reviewing) reviewsUi.changed();
|
|
4120
4178
|
// The detail, terminal and document views show one agent; another agent's update leaves them be.
|
|
4121
4179
|
return invalidate([
|
|
4122
4180
|
'list', 'backlog', 'land', 'inbox', 'race', 'team',
|
|
@@ -4137,6 +4195,8 @@ function handleEvent(msg) {
|
|
|
4137
4195
|
teams.set(msg.team.id, msg.team);
|
|
4138
4196
|
} else if (msg.t === 'team-removed') {
|
|
4139
4197
|
teams.delete(msg.id);
|
|
4198
|
+
} else if (msg.t === 'value') {
|
|
4199
|
+
valueUi.changed();
|
|
4140
4200
|
} else if (msg.t === 'standup') {
|
|
4141
4201
|
standupUi.set(msg.latest);
|
|
4142
4202
|
if (msg.latest?.reason === 'scheduled' && msg.latest.items.length) toast('Standup ready: press Standup (or p) to play it', 8000);
|
|
@@ -4494,6 +4554,7 @@ async function loadAssistant({ fill = true } = {}) {
|
|
|
4494
4554
|
f.maxPerDay.value = a.maxPerDay;
|
|
4495
4555
|
f.maxRunning.value = a.maxRunning;
|
|
4496
4556
|
f.notes.value = a.notes ?? '';
|
|
4557
|
+
f.pickIssues.checked = Boolean(a.pickIssues);
|
|
4497
4558
|
}
|
|
4498
4559
|
const state = !a.agentId ? 'Not set up yet. Start it to create its session.' : a.on ? (a.busy ? 'On: checking now.' : 'On.') : 'Paused: not checking.';
|
|
4499
4560
|
$('#assistant-status').innerHTML = `<p><b>${esc(state)}</b>
|
|
@@ -4516,6 +4577,7 @@ const assistantPatch = (f) => ({
|
|
|
4516
4577
|
maxPerDay: Number(f.maxPerDay.value),
|
|
4517
4578
|
maxRunning: Number(f.maxRunning.value),
|
|
4518
4579
|
notes: f.notes.value,
|
|
4580
|
+
pickIssues: f.pickIssues.checked,
|
|
4519
4581
|
});
|
|
4520
4582
|
const assistantError = (err) => {
|
|
4521
4583
|
$('#assistant-error').textContent = err.message;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// Designs: every agent's design doc in one list, the ones waiting for your review first: its name
|
|
2
|
+
// and summary, where it's published, the specs it builds on, and the agent and its issue.
|
|
3
|
+
|
|
4
|
+
const SAVED = 'agentmgr.designsFilter';
|
|
5
|
+
const FILTERS = [
|
|
6
|
+
['you', 'Waiting for you'],
|
|
7
|
+
['agent', 'Agents on it'],
|
|
8
|
+
['done', 'Done'],
|
|
9
|
+
['all', 'All'],
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export function initDesigns({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
13
|
+
const dialog = $('#designs-dialog');
|
|
14
|
+
const body = $('#designs-body');
|
|
15
|
+
let rows = null;
|
|
16
|
+
let loading = false;
|
|
17
|
+
let loadedAt = 0;
|
|
18
|
+
let again = null;
|
|
19
|
+
let query = '';
|
|
20
|
+
let filter = 'you';
|
|
21
|
+
try {
|
|
22
|
+
filter = localStorage.getItem(SAVED) || 'you';
|
|
23
|
+
} catch {}
|
|
24
|
+
|
|
25
|
+
async function load({ quiet = false } = {}) {
|
|
26
|
+
if (loading) return;
|
|
27
|
+
loading = true;
|
|
28
|
+
try {
|
|
29
|
+
rows = (await api('GET', '/designs')).rows;
|
|
30
|
+
loadedAt = Date.now();
|
|
31
|
+
} catch (e) {
|
|
32
|
+
if (!quiet) toast?.(e.message, 5000);
|
|
33
|
+
} finally {
|
|
34
|
+
loading = false;
|
|
35
|
+
}
|
|
36
|
+
badge();
|
|
37
|
+
render();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The button's count: design docs waiting for your review. */
|
|
41
|
+
function badge() {
|
|
42
|
+
const n = rows ? rows.filter((r) => r.group === 'you').length : 0;
|
|
43
|
+
const el = $('#designs-count');
|
|
44
|
+
if (el) {
|
|
45
|
+
el.textContent = n ? String(n) : '';
|
|
46
|
+
el.title = n ? `${n} design docs waiting for your review` : '';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const ext = (label, url, title = '') => `<a href="${esc(url)}" target="_blank" rel="noopener" title="${esc(title)}">${esc(label)} ↗</a>`;
|
|
51
|
+
|
|
52
|
+
function card(r) {
|
|
53
|
+
const links = [
|
|
54
|
+
r.written ? `<button class="link" data-design-read="${esc(r.agent.id)}" title="Read DESIGN.md here">Read</button>` : '<span class="hint">not written yet</span>',
|
|
55
|
+
r.page?.url ? ext('Design page', r.page.url, 'The Artifact the agent published') : r.page?.note ? `<span class="hint" title="${esc(r.page.note)}">page not published</span>` : '',
|
|
56
|
+
r.google ? ext('Google Doc', r.google) : '',
|
|
57
|
+
...r.specs.map((s) => ext(s.label, s.url, s.title ?? '')),
|
|
58
|
+
].filter(Boolean);
|
|
59
|
+
const dot = r.agent.busy ? '<span class="dot busy" title="Working"></span>' : r.agent.running ? '<span class="dot idle" title="Session open"></span>' : '';
|
|
60
|
+
return `<article class="design-card stage-${esc(r.stage)}">
|
|
61
|
+
<header>
|
|
62
|
+
<h3>${esc(r.title)}</h3>
|
|
63
|
+
<span class="hint">${esc(ago(r.updatedAt))}</span>
|
|
64
|
+
</header>
|
|
65
|
+
<div class="design-meta">
|
|
66
|
+
<button class="link" data-design-open="${esc(r.agent.id)}" title="Open the agent's session">${dot}${esc(r.agent.name)}</button>
|
|
67
|
+
${r.agent.project ? `<span class="hint">${esc(r.agent.project)}</span>` : ''}
|
|
68
|
+
${r.issue ? (r.issue.url ? ext(r.issue.key, r.issue.url) : `<span>${esc(r.issue.key)}</span>`) : ''}
|
|
69
|
+
<span class="design-note">${esc(r.note)}</span>
|
|
70
|
+
</div>
|
|
71
|
+
${r.summary ? `<p class="design-summary">${esc(r.summary)}</p>` : ''}
|
|
72
|
+
<div class="design-links">${links.join('<span class="sep">·</span>')}</div>
|
|
73
|
+
</article>`;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function render() {
|
|
77
|
+
if (!dialog.open) return;
|
|
78
|
+
if (!rows) {
|
|
79
|
+
body.innerHTML = '<p class="hint">Loading…</p>';
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const count = (g) => (g === 'all' ? rows.length : rows.filter((r) => r.group === g).length);
|
|
83
|
+
const q = query.trim().toLowerCase();
|
|
84
|
+
const shown = rows
|
|
85
|
+
.filter((r) => filter === 'all' || r.group === filter)
|
|
86
|
+
.filter((r) => !q || [r.title, r.summary, r.agent.name, r.agent.project, r.issue?.key].some((s) => String(s ?? '').toLowerCase().includes(q)));
|
|
87
|
+
const empty = !rows.length
|
|
88
|
+
? 'No design docs yet. Agents write one once their plan is settled (Design doc, on by default when you create an agent).'
|
|
89
|
+
: q
|
|
90
|
+
? 'No design doc matches.'
|
|
91
|
+
: filter === 'you'
|
|
92
|
+
? 'No design doc is waiting for your review.'
|
|
93
|
+
: 'None here.';
|
|
94
|
+
const focused = document.activeElement?.dataset?.designs === 'search';
|
|
95
|
+
body.innerHTML = `
|
|
96
|
+
<div class="issues-head">
|
|
97
|
+
<h2>Designs</h2>
|
|
98
|
+
<div class="chips" role="tablist">${FILTERS.map(([k, label]) => `<button class="chip ${k === filter ? 'active' : ''}" role="tab" aria-selected="${k === filter}" data-designs-filter="${k}">${label} <span class="count">${count(k)}</span></button>`).join('')}</div>
|
|
99
|
+
<input type="search" class="designs-search" data-designs="search" placeholder="Search" value="${esc(query)}" aria-label="Search design docs" />
|
|
100
|
+
<span class="spacer"></span>
|
|
101
|
+
<button class="small" data-designs="copy" title="Copy this list as Markdown, to paste into Slack, Jira or a doc" ${shown.length ? '' : 'disabled'}>Copy</button>
|
|
102
|
+
<button class="small" data-designs="refresh" title="Look again now">↻</button>
|
|
103
|
+
<button class="small" data-designs="close" title="Close (Esc)">Close</button>
|
|
104
|
+
</div>
|
|
105
|
+
${shown.length ? `<div class="designs-list">${shown.map(card).join('')}</div>` : `<p class="hint issues-empty">${esc(empty)}</p>`}`;
|
|
106
|
+
if (focused) {
|
|
107
|
+
const s = body.querySelector('[data-designs="search"]');
|
|
108
|
+
s.focus();
|
|
109
|
+
s.setSelectionRange(s.value.length, s.value.length);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
body.addEventListener('input', (e) => {
|
|
114
|
+
if (e.target.dataset.designs !== 'search') return;
|
|
115
|
+
query = e.target.value;
|
|
116
|
+
render();
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
body.addEventListener('click', async (e) => {
|
|
120
|
+
const o = e.target.closest('[data-design-open]');
|
|
121
|
+
if (o) {
|
|
122
|
+
dialog.close();
|
|
123
|
+
return openAgent(o.dataset.designOpen);
|
|
124
|
+
}
|
|
125
|
+
const rd = e.target.closest('[data-design-read]');
|
|
126
|
+
if (rd) {
|
|
127
|
+
dialog.close();
|
|
128
|
+
return openDoc(rd.dataset.designRead);
|
|
129
|
+
}
|
|
130
|
+
const f = e.target.closest('[data-designs-filter]');
|
|
131
|
+
if (f) {
|
|
132
|
+
filter = f.dataset.designsFilter;
|
|
133
|
+
try {
|
|
134
|
+
localStorage.setItem(SAVED, filter);
|
|
135
|
+
} catch {}
|
|
136
|
+
return render();
|
|
137
|
+
}
|
|
138
|
+
const b = e.target.closest('[data-designs]')?.dataset.designs;
|
|
139
|
+
if (b === 'close') return dialog.close();
|
|
140
|
+
if (b === 'refresh') return load();
|
|
141
|
+
if (b === 'copy') {
|
|
142
|
+
try {
|
|
143
|
+
const { markdown } = await api('GET', `/designs?group=${encodeURIComponent(filter)}&q=${encodeURIComponent(query)}&format=markdown`);
|
|
144
|
+
await navigator.clipboard.writeText(markdown);
|
|
145
|
+
toast?.('Copied as Markdown');
|
|
146
|
+
} catch (err) {
|
|
147
|
+
toast?.(`Couldn't copy: ${err.message}`, 5000);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
function open() {
|
|
153
|
+
if (dialog.open) return dialog.close();
|
|
154
|
+
dialog.showModal();
|
|
155
|
+
render();
|
|
156
|
+
load();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** An agent changed: look again shortly while open, and now and then for the count. */
|
|
160
|
+
function changed() {
|
|
161
|
+
if (!dialog.open && again) return;
|
|
162
|
+
clearTimeout(again);
|
|
163
|
+
const wait = dialog.open ? 1500 : Math.max(5000, 30_000 - (Date.now() - loadedAt));
|
|
164
|
+
again = setTimeout(() => {
|
|
165
|
+
again = null;
|
|
166
|
+
load({ quiet: true });
|
|
167
|
+
}, wait);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
load({ quiet: true });
|
|
171
|
+
return { open, changed, isOpen: () => dialog.open };
|
|
172
|
+
}
|
package/public/index.html
CHANGED
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
<button id="assistant-btn" title="An always-on session that finds new work and starts agents for it">Assistant <span id="assistant-dot" class="assistant-dot" hidden></span></button>
|
|
33
33
|
<button id="spend-btn" title="Results across agents (merge rate, time to PR, cost per merged PR), what they cost, and spending limits">Results <span id="spend-today" class="spend-today"></span></button>
|
|
34
34
|
<button id="standup-btn" title="Today's standup: each agent's news read aloud, and what they need from you">Standup <span id="standup-dot" class="assistant-dot" hidden></span></button>
|
|
35
|
+
<button id="issues-btn" title="Jira: every issue an agent works on, with its Jira status, pull request and agent, the ones waiting for your review first">Jira <span id="issues-count" class="badge ready"></span></button>
|
|
36
|
+
<button id="designs-btn" title="Designs: every agent's design doc with its summary and links, the ones waiting for your review first">Designs <span id="designs-count" class="badge ready"></span></button>
|
|
37
|
+
<button id="reviews-btn" title="Reviews: pull requests you review. Reviewer agents ask the critical questions and find what blocks approval; you post what you pick">Reviews <span id="reviews-count" class="badge ready"></span></button>
|
|
38
|
+
<button id="value-btn" title="Value: what the delivered work is worth, by day, week, month and quarter, against the AI cost and your time; reports for management">Value</button>
|
|
35
39
|
<button id="map-btn" title="The codebase map: where each agent is changing and reading code, and who is about to collide">Map</button>
|
|
36
40
|
<button id="watch-btn" title="Running agents' sessions side by side, live: follow them all without clicking from one to the next">Watch</button>
|
|
37
41
|
<button id="machine-btn" title="A terminal on this computer (your home folder), from any device you're signed in on">Terminal</button>
|
|
@@ -376,6 +380,18 @@
|
|
|
376
380
|
</form>
|
|
377
381
|
</dialog>
|
|
378
382
|
|
|
383
|
+
<dialog id="issues-dialog" class="issues-dialog" aria-label="Jira issues">
|
|
384
|
+
<div id="issues-body"></div>
|
|
385
|
+
</dialog>
|
|
386
|
+
<dialog id="designs-dialog" class="issues-dialog" aria-label="Design docs">
|
|
387
|
+
<div id="designs-body"></div>
|
|
388
|
+
</dialog>
|
|
389
|
+
<dialog id="reviews-dialog" class="issues-dialog" aria-label="Reviews">
|
|
390
|
+
<div id="reviews-body"></div>
|
|
391
|
+
</dialog>
|
|
392
|
+
<dialog id="value-dialog" class="issues-dialog value-dialog" aria-label="Value">
|
|
393
|
+
<div id="value-body"></div>
|
|
394
|
+
</dialog>
|
|
379
395
|
<dialog id="standup-dialog" class="standup-dialog" aria-label="Standup">
|
|
380
396
|
<div id="standup-body"></div>
|
|
381
397
|
</dialog>
|
|
@@ -530,6 +546,7 @@
|
|
|
530
546
|
<label class="check"><input type="checkbox" name="ev_assistant" /> is started for new work (by the assistant, a GitHub label or a webhook)</label>
|
|
531
547
|
<label class="check"><input type="checkbox" name="ev_budget" /> nears or reaches its budget, or today's spend reaches the daily limit</label>
|
|
532
548
|
<label class="check"><input type="checkbox" name="ev_standup" /> the daily standup is ready (with a link to play it)</label>
|
|
549
|
+
<label class="check"><input type="checkbox" name="ev_value" /> value reports (weekly, monthly, quarterly, as set in Value)</label>
|
|
533
550
|
<label class="check"><input type="checkbox" name="ev_waiting" /> finished its turn and is idle after <input name="waitingDelaySec" type="number" min="0" class="num" />s</label>
|
|
534
551
|
<label class="check"><input type="checkbox" name="skipWhenWatching" /> not while I have its terminal open</label>
|
|
535
552
|
<label class="check"><input type="checkbox" name="includeIntent" /> include the intent text in the message</label>
|
|
@@ -589,6 +606,7 @@
|
|
|
589
606
|
<label class="check"><input type="checkbox" name="src_ci" /> Failing checks on my open pull requests</label>
|
|
590
607
|
<label class="check"><input type="checkbox" name="src_slack" /> Slack messages to me that ask for work</label>
|
|
591
608
|
<label class="check"><input type="checkbox" name="src_linear" /> Linear issues newly assigned to me</label>
|
|
609
|
+
<label class="check"><input type="checkbox" name="pickIssues" /> Let me pick: list new Jira and Linear issues under <b>Jira → Not started</b>, and start agents only for the ones I tick</label>
|
|
592
610
|
</fieldset>
|
|
593
611
|
<div class="row three">
|
|
594
612
|
<label>Check every <span class="hint">minutes</span><input name="everyMin" type="number" min="1" /></label>
|