ai-agentmanager 1.59.0 → 1.60.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 +6 -0
- package/README.md +5 -1
- package/package.json +1 -1
- package/public/index.html +1 -1
- package/public/value.js +12 -4
- package/src/cli.js +4 -4
- package/src/server.js +1 -1
- package/src/value.js +48 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.60.0 (2026-11-19)
|
|
4
|
+
|
|
5
|
+
- **Value: pull requests merged.** Next to the value delivered, how many pull requests merged in the period and how many a day, with the change against the period before. Each counts in the period it merged in, so a second pull request on the same work is counted when it lands. It is on the page, in `agentmgr value`, in the report (Markdown and Slack) and as a `pull_requests` column at the end of `value.csv`.
|
|
6
|
+
- **Value by year.** **Year** joins Day, Week, Month and Quarter, on the page and as `--period year` and `report --kind year`. There is no scheduled yearly report.
|
|
7
|
+
- **How far back it goes.** Value keeps work delivered from about 100 days before you first opened it, so a year's count starts there, and delivered work whose agent you have since deleted counts as one pull request.
|
|
8
|
+
|
|
3
9
|
## 1.59.0 (2026-11-19)
|
|
4
10
|
|
|
5
11
|
- **Updates for the people who asked.** When an agent finishes or opens a pull request, what to tell the requester and other stakeholders is written from its work: a Slack message of a few lines, a short email with its subject, and the details both point to. An **Update to send** card appears in the inbox and the alert says it is ready. **Update** with an agent's documents (or `agentmgr announce <agent>`) writes one at any time, for work under way too.
|
package/README.md
CHANGED
|
@@ -1172,11 +1172,12 @@ Agents started this way are marked **⚡ GitHub** or **⚡ webhook**, Slack aler
|
|
|
1172
1172
|
|
|
1173
1173
|
## Value
|
|
1174
1174
|
|
|
1175
|
-
**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 **
|
|
1175
|
+
**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**, **Quarter** or **Year**, with bars for the last periods and the items behind each.
|
|
1176
1176
|
|
|
1177
1177
|
| Figure | What it is |
|
|
1178
1178
|
|---|---|
|
|
1179
1179
|
| Value delivered | Engineering hours the work saved × your loaded hourly rate, plus other savings in its first year |
|
|
1180
|
+
| Pull requests | Pull requests merged in the period (each counts when it merged), and how many a day |
|
|
1180
1181
|
| Potential revenue | Revenue the work plausibly enables or protects in its first year (kept apart: it's the least certain) |
|
|
1181
1182
|
| Strategic | Items rated 4 or 5 of 5 for moving the product or company position |
|
|
1182
1183
|
| Leverage | Engineering hours delivered per hour of your own time (30 minutes per item unless you set it) |
|
|
@@ -1184,10 +1185,13 @@ Agents started this way are marked **⚡ GitHub** or **⚡ webhook**, Slack aler
|
|
|
1184
1185
|
|
|
1185
1186
|
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").
|
|
1186
1187
|
|
|
1188
|
+
Pull requests count in the period they merged in, so a second one on the same work is counted when it lands. Value keeps work from about 100 days before you first opened it, so a year's figures start there.
|
|
1189
|
+
|
|
1187
1190
|
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.
|
|
1188
1191
|
|
|
1189
1192
|
```bash
|
|
1190
1193
|
agentmgr value --period month # totals by month, and this month's items
|
|
1194
|
+
agentmgr value --period year # by year, with the pull requests merged in each
|
|
1191
1195
|
agentmgr value edit OPS-7 --revenue 15000 --summary "Ends login timeouts for our largest customer"
|
|
1192
1196
|
agentmgr value report --kind quarter --current # this quarter so far, as Markdown
|
|
1193
1197
|
agentmgr value set --rate 140 --reports weekly,monthly,quarterly --at 08:30 --drive on
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<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>
|
|
42
42
|
<button id="bugs-btn" title="Bugs: background hunts in a project or folder, and what they found, checked and worst first">Bugs <span id="bugs-count" class="badge"></span></button>
|
|
43
43
|
<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>
|
|
44
|
-
<button id="value-btn" title="Value: what the delivered work is worth, by day, week, month and
|
|
44
|
+
<button id="value-btn" title="Value: what the delivered work is worth, and the pull requests merged, by day, week, month, quarter and year, against the AI cost and your time; reports for management">Value</button>
|
|
45
45
|
<button id="decide-btn" title="Decide: what waits for you with its options and a recommendation, your standing decisions and what was decided for you, the backlog by impact, dates at risk as choices, and a look back at past decisions">Decide <span id="decide-count" class="badge"></span></button>
|
|
46
46
|
<button id="plan-btn" title="Plan: a project's dates (code complete, RC, GA) with their checklists and reminders, the decision log, and the tech debt radar">Plan <span id="plan-count" class="badge"></span></button>
|
|
47
47
|
<button id="news-btn" title="AI News: the frontier labs' latest releases (Anthropic, OpenAI, Google and the other top labs), each summarized, with links">AI News <span id="news-count" class="badge ready"></span></button>
|
package/public/value.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
// Value: what the delivered work is worth, by day, week, month and
|
|
1
|
+
// Value: what the delivered work is worth, by day, week, month, quarter and year: the engineering time it
|
|
2
2
|
// saved, other savings, potential revenue and strategic weight, against the AI cost and your own
|
|
3
|
-
// time. Each item's figures are AI estimates you can correct;
|
|
3
|
+
// time, with the pull requests merged in each. Each item's figures are AI estimates you can correct;
|
|
4
|
+
// reports go out on a schedule.
|
|
4
5
|
|
|
5
6
|
import { expandButton, expandable } from './expand.js';
|
|
6
7
|
|
|
@@ -9,6 +10,7 @@ const PERIODS = [
|
|
|
9
10
|
['week', 'Week'],
|
|
10
11
|
['month', 'Month'],
|
|
11
12
|
['quarter', 'Quarter'],
|
|
13
|
+
['year', 'Year'],
|
|
12
14
|
];
|
|
13
15
|
const CATEGORIES = ['cost savings', 'revenue', 'risk reduction', 'quality', 'customer experience', 'strategic', 'maintenance'];
|
|
14
16
|
const SAVED = 'agentmgr.valuePeriod';
|
|
@@ -27,6 +29,11 @@ export function initValue({ api, $, esc, toast, openAgent }) {
|
|
|
27
29
|
|
|
28
30
|
const money = (n) => (n == null ? '—' : new Intl.NumberFormat(undefined, { style: 'currency', currency: data?.settings.currency ?? 'USD', maximumFractionDigits: 0 }).format(n));
|
|
29
31
|
const pct = (a, b) => (b ? Math.round(((a - b) / b) * 100) : null);
|
|
32
|
+
// Pull requests a day over a period's days so far (the current one has not ended).
|
|
33
|
+
const perDay = (p) => {
|
|
34
|
+
const days = Math.max(1, Math.ceil((Math.min(Date.now(), Date.parse(p.end)) - Date.parse(p.start)) / 86_400_000));
|
|
35
|
+
return Math.round((p.totals.prs / days) * 10) / 10;
|
|
36
|
+
};
|
|
30
37
|
|
|
31
38
|
async function load() {
|
|
32
39
|
try {
|
|
@@ -50,7 +57,7 @@ export function initValue({ api, $, esc, toast, openAgent }) {
|
|
|
50
57
|
const v = (p.totals.valueUsd / max) * 100;
|
|
51
58
|
const r = (p.totals.revenueUsd / max) * 100;
|
|
52
59
|
const on = (selected ?? periods[0].key) === p.key;
|
|
53
|
-
return `<button class="value-bar ${on ? 'on' : ''}" role="listitem" data-value-pick="${esc(p.key)}" title="${esc(`${p.label}: ${money(p.totals.valueUsd)} value, ${money(p.totals.revenueUsd)} potential revenue, ${p.totals.items} items`)}">
|
|
60
|
+
return `<button class="value-bar ${on ? 'on' : ''}" role="listitem" data-value-pick="${esc(p.key)}" title="${esc(`${p.label}: ${money(p.totals.valueUsd)} value, ${money(p.totals.revenueUsd)} potential revenue, ${p.totals.items} items, ${p.totals.prs} pull requests merged`)}">
|
|
54
61
|
<span class="stack"><span class="rev" style="height:${r}%"></span><span class="val" style="height:${v}%"></span></span>
|
|
55
62
|
<span class="lbl">${esc(shortLabel(p))}</span>
|
|
56
63
|
</button>`;
|
|
@@ -63,7 +70,7 @@ export function initValue({ api, $, esc, toast, openAgent }) {
|
|
|
63
70
|
if (period === 'day') return d.toLocaleDateString(undefined, { weekday: 'narrow', day: 'numeric' });
|
|
64
71
|
if (period === 'week') return d.toLocaleDateString(undefined, { month: 'numeric', day: 'numeric' });
|
|
65
72
|
if (period === 'month') return d.toLocaleDateString(undefined, { month: 'short' });
|
|
66
|
-
return p.label.split(' ')[0];
|
|
73
|
+
return period === 'year' ? p.label : p.label.split(' ')[0];
|
|
67
74
|
};
|
|
68
75
|
|
|
69
76
|
function itemRow(it) {
|
|
@@ -167,6 +174,7 @@ export function initValue({ api, $, esc, toast, openAgent }) {
|
|
|
167
174
|
<p class="value-period"><b>${esc(p.label)}</b>${p.current ? ' <span class="hint">so far</span>' : ''} · ${t.items} item${t.items === 1 ? '' : 's'} delivered${data.pending ? ` · <span class="hint">${data.pending} waiting for an estimate</span>` : ''}</p>
|
|
168
175
|
<div class="value-cards">
|
|
169
176
|
${card('Value delivered', money(t.valueUsd), `${t.humanHours} engineering hours${t.savingsUsd ? ` + ${money(t.savingsUsd)} savings` : ''}`, prev?.totals.valueUsd, t.valueUsd)}
|
|
177
|
+
${card('Pull requests', String(t.prs), `merged${period === 'day' ? '' : ` · ${perDay(p)} a day`}`, prev?.totals.prs, t.prs)}
|
|
170
178
|
${card('Potential revenue', money(t.revenueUsd), 'first year', prev?.totals.revenueUsd, t.revenueUsd)}
|
|
171
179
|
${card('Strategic', String(t.strategicHigh), 'high-impact items (4–5 of 5)', null, null)}
|
|
172
180
|
${card('Leverage', t.leverage ? `${t.leverage}×` : '—', `engineering hours per hour of yours (${t.yourHours}h)`, prev?.totals.leverage, t.leverage)}
|
package/src/cli.js
CHANGED
|
@@ -1378,12 +1378,12 @@ export async function main(argv) {
|
|
|
1378
1378
|
console.log(`${r.dismissed} dismissed`);
|
|
1379
1379
|
});
|
|
1380
1380
|
|
|
1381
|
-
const valueCmd = program.command('value').description('What the delivered work is worth (AI estimates you can correct), by day, week, month and
|
|
1381
|
+
const valueCmd = program.command('value').description('What the delivered work is worth (AI estimates you can correct), and the pull requests merged, by day, week, month, quarter and year, with reports for management');
|
|
1382
1382
|
const money = (n, cur = 'USD') => (n == null ? '—' : new Intl.NumberFormat('en-US', { style: 'currency', currency: cur, maximumFractionDigits: 0 }).format(n));
|
|
1383
1383
|
valueCmd
|
|
1384
1384
|
.command('show', { isDefault: true })
|
|
1385
1385
|
.description('Totals for the last periods and the items in the current one')
|
|
1386
|
-
.option('-p, --period <period>', 'day, week, month or
|
|
1386
|
+
.option('-p, --period <period>', 'day, week, month, quarter or year', 'week')
|
|
1387
1387
|
.option('--json', 'print JSON')
|
|
1388
1388
|
.action(async (opts) => {
|
|
1389
1389
|
await daemon();
|
|
@@ -1392,7 +1392,7 @@ export async function main(argv) {
|
|
|
1392
1392
|
const cur = v.settings.currency;
|
|
1393
1393
|
for (const p of v.periods.slice(0, 6)) {
|
|
1394
1394
|
const t = p.totals;
|
|
1395
|
-
console.log(`${bold(p.label.padEnd(22))} ${money(t.valueUsd, cur).padStart(9)} value ${money(t.revenueUsd, cur).padStart(9)} revenue ${String(t.humanHours).padStart(5)} h ${t.items} items${t.leverage ? dim(` ${t.leverage}× leverage`) : ''}${p.current ? dim(' (so far)') : ''}`);
|
|
1395
|
+
console.log(`${bold(p.label.padEnd(22))} ${money(t.valueUsd, cur).padStart(9)} value ${money(t.revenueUsd, cur).padStart(9)} revenue ${String(t.humanHours).padStart(5)} h ${t.items} items ${t.prs} PRs${t.leverage ? dim(` ${t.leverage}× leverage`) : ''}${p.current ? dim(' (so far)') : ''}`);
|
|
1396
1396
|
}
|
|
1397
1397
|
const now = v.periods[0];
|
|
1398
1398
|
const items = v.items.filter((it) => now.items.includes(it.agentId));
|
|
@@ -1439,7 +1439,7 @@ export async function main(argv) {
|
|
|
1439
1439
|
valueCmd
|
|
1440
1440
|
.command('report')
|
|
1441
1441
|
.description('The report for the period just ended (or --current), as Markdown; --send to Slack and Google Drive as set')
|
|
1442
|
-
.option('-k, --kind <kind>', 'day, week, month or
|
|
1442
|
+
.option('-k, --kind <kind>', 'day, week, month, quarter or year', 'week')
|
|
1443
1443
|
.option('--current', 'the current period so far')
|
|
1444
1444
|
.option('--send', 'send it now')
|
|
1445
1445
|
.action(async (o) => {
|
package/src/server.js
CHANGED
|
@@ -296,7 +296,7 @@ export async function startServer({ port = PORT, host = HOST, evalTimer = true }
|
|
|
296
296
|
sendAlert(`:sunrise: *Standup ready*: ${what}\n<${link}|Play it>`, n, `Standup ready: ${what}\nPlay it: ${link}`).catch(() => {});
|
|
297
297
|
},
|
|
298
298
|
});
|
|
299
|
-
// Value: what delivered work is worth, by day, week, month and
|
|
299
|
+
// Value: what delivered work is worth, and the pull requests merged, by day, week, month, quarter and year, with scheduled reports (value.js).
|
|
300
300
|
let pushValue = () => {};
|
|
301
301
|
const value = new Value({
|
|
302
302
|
manager,
|
package/src/value.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// model call: the hours a person would have needed without AI, savings beyond that labor,
|
|
4
4
|
// potential revenue, and strategic value, each with a reason. You can correct any figure; yours
|
|
5
5
|
// win and are marked as yours. Totals by day, week, month and quarter set the value against the
|
|
6
|
-
// AI cost and your own time, and a report goes to Slack (and Google Drive) on a schedule.
|
|
6
|
+
// AI cost and your own time, and a report goes to Slack (and Google Drive) on a schedule. Next to
|
|
7
|
+
// the value: how many pull requests merged in each day, week, month, quarter and year.
|
|
7
8
|
|
|
8
9
|
import fs from 'node:fs';
|
|
9
10
|
import path from 'node:path';
|
|
@@ -80,6 +81,23 @@ export function deliveredAt(a) {
|
|
|
80
81
|
return Number.isFinite(at) ? new Date(at).toISOString() : null;
|
|
81
82
|
}
|
|
82
83
|
|
|
84
|
+
/** An agent's merged pull requests (its own, not ones it only mentioned), with when each merged. */
|
|
85
|
+
export function mergedPrs(a) {
|
|
86
|
+
return Object.values(a.prs ?? {})
|
|
87
|
+
.filter((p) => p.source !== 'mentioned' && p.state === 'MERGED')
|
|
88
|
+
.map((p) => ({ url: p.url ?? null, number: p.number ?? null, mergedAt: Number.isFinite(Date.parse(p.mergedAt)) ? new Date(p.mergedAt).toISOString() : null }));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* When each of an item's pull requests merged, as times. One merged without a time counts at the
|
|
93
|
+
* item's delivery; an item from before pull requests were kept on it counts its link as one.
|
|
94
|
+
*/
|
|
95
|
+
export function prTimes(it) {
|
|
96
|
+
const at = Date.parse(it.deliveredAt);
|
|
97
|
+
if (!Array.isArray(it.prs)) return it.link ? [at] : [];
|
|
98
|
+
return it.prs.map((p) => (p.mergedAt ? Date.parse(p.mergedAt) : at));
|
|
99
|
+
}
|
|
100
|
+
|
|
83
101
|
/** What the estimate is based on, from what agentmgr tracks. */
|
|
84
102
|
export function valueFacts(a, { project = null, designSummary = null, files = null } = {}) {
|
|
85
103
|
const prs = Object.values(a.prs ?? {}).filter((p) => p.source !== 'mentioned' && p.state === 'MERGED');
|
|
@@ -231,11 +249,26 @@ export const PERIODS = {
|
|
|
231
249
|
label: (s) => `Q${Math.floor(new Date(s).getMonth() / 3) + 1} ${new Date(s).getFullYear()}`,
|
|
232
250
|
count: 8,
|
|
233
251
|
},
|
|
252
|
+
year: {
|
|
253
|
+
start: (t) => {
|
|
254
|
+
const d = startOfDay(t);
|
|
255
|
+
d.setMonth(0, 1);
|
|
256
|
+
return d.getTime();
|
|
257
|
+
},
|
|
258
|
+
next: (s) => {
|
|
259
|
+
const d = new Date(s);
|
|
260
|
+
d.setFullYear(d.getFullYear() + 1);
|
|
261
|
+
return d.getTime();
|
|
262
|
+
},
|
|
263
|
+
key: (s) => String(new Date(s).getFullYear()),
|
|
264
|
+
label: (s) => String(new Date(s).getFullYear()),
|
|
265
|
+
count: 5,
|
|
266
|
+
},
|
|
234
267
|
};
|
|
235
268
|
|
|
236
269
|
/** Totals for a set of items. */
|
|
237
270
|
export function totals(items, s) {
|
|
238
|
-
const t = { items: items.length, estimated: 0, humanHours: 0, laborUsd: 0, savingsUsd: 0, revenueUsd: 0, valueUsd: 0, aiCostUsd: 0, yourHours: 0, strategicHigh: 0 };
|
|
271
|
+
const t = { items: items.length, prs: 0, estimated: 0, humanHours: 0, laborUsd: 0, savingsUsd: 0, revenueUsd: 0, valueUsd: 0, aiCostUsd: 0, yourHours: 0, strategicHigh: 0 };
|
|
239
272
|
for (const it of items) {
|
|
240
273
|
const v = itemValue(it, s);
|
|
241
274
|
if (v.humanHours != null) t.estimated += 1;
|
|
@@ -257,12 +290,16 @@ export function totals(items, s) {
|
|
|
257
290
|
return t;
|
|
258
291
|
}
|
|
259
292
|
|
|
260
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* The last `count` periods of a kind, newest first, each with its totals and items. Pull requests
|
|
295
|
+
* count in the period they merged in, which for an item's later ones can be after its own.
|
|
296
|
+
*/
|
|
261
297
|
export function aggregate(items, s, { period = 'week', count, t = Date.now() } = {}) {
|
|
262
298
|
const P = PERIODS[period];
|
|
263
299
|
if (!P) throw err(400, `period is one of ${Object.keys(PERIODS).join(', ')}`);
|
|
264
300
|
const n = count ?? P.count;
|
|
265
301
|
const out = [];
|
|
302
|
+
const merged = items.flatMap(prTimes);
|
|
266
303
|
let start = P.start(t);
|
|
267
304
|
for (let i = 0; i < n; i++) {
|
|
268
305
|
const end = P.next(start);
|
|
@@ -270,7 +307,9 @@ export function aggregate(items, s, { period = 'week', count, t = Date.now() } =
|
|
|
270
307
|
const at = Date.parse(it.deliveredAt);
|
|
271
308
|
return at >= start && at < end;
|
|
272
309
|
});
|
|
273
|
-
|
|
310
|
+
const from = start;
|
|
311
|
+
const sums = { ...totals(inside, s), prs: merged.filter((at) => at >= from && at < end).length };
|
|
312
|
+
out.push({ key: P.key(start), label: P.label(start), start: new Date(start).toISOString(), end: new Date(end).toISOString(), current: i === 0, totals: sums, items: inside.map((it) => it.agentId) });
|
|
274
313
|
start = P.start(start - 1);
|
|
275
314
|
}
|
|
276
315
|
return out;
|
|
@@ -291,6 +330,7 @@ export function valueMarkdown(p, items, s, { who = '', prev = null } = {}) {
|
|
|
291
330
|
'',
|
|
292
331
|
`${t.items} piece${t.items === 1 ? '' : 's'} of work delivered with AI agents.`,
|
|
293
332
|
'',
|
|
333
|
+
`- **Pull requests merged**: ${t.prs}${change('prs')}`,
|
|
294
334
|
`- **Value delivered**: ${money(t.valueUsd, s.currency)}${change('valueUsd')}: ${money(t.laborUsd, s.currency)} of engineering time (${t.humanHours} hours at ${money(s.hourlyRate, s.currency)}/hour) and ${money(t.savingsUsd, s.currency)} in other savings`,
|
|
295
335
|
`- **Potential revenue**: ${money(t.revenueUsd, s.currency)} in the first year`,
|
|
296
336
|
`- **Strategic**: ${t.strategicHigh} high-impact item${t.strategicHigh === 1 ? '' : 's'} (4 or 5 of 5)`,
|
|
@@ -318,7 +358,7 @@ export function valueMarkdown(p, items, s, { who = '', prev = null } = {}) {
|
|
|
318
358
|
export function valueSlack(p, s, link) {
|
|
319
359
|
const t = p.totals;
|
|
320
360
|
const head = `Value delivered, ${p.label}`;
|
|
321
|
-
const line1 = `${money(t.valueUsd, s.currency)} (${t.humanHours} engineering hours) from ${t.items} item${t.items === 1 ? '' : 's'}`;
|
|
361
|
+
const line1 = `${money(t.valueUsd, s.currency)} (${t.humanHours} engineering hours) from ${t.items} item${t.items === 1 ? '' : 's'}, ${t.prs} pull request${t.prs === 1 ? '' : 's'} merged`;
|
|
322
362
|
const line2 = [`Potential revenue ${money(t.revenueUsd, s.currency)}`, `${t.strategicHigh} high-impact`, t.leverage ? `${t.leverage}× leverage on my time` : null, t.roi ? `${t.roi}× per AI dollar` : null].filter(Boolean).join(' · ');
|
|
323
363
|
return {
|
|
324
364
|
text: [`:chart_with_upwards_trend: *${head}*: ${line1}`, line2, link ? `<${link}|Open the report>` : ''].filter(Boolean).join('\n'),
|
|
@@ -326,7 +366,7 @@ export function valueSlack(p, s, link) {
|
|
|
326
366
|
};
|
|
327
367
|
}
|
|
328
368
|
|
|
329
|
-
export const CSV_COLUMNS = ['delivered', 'project', 'title', 'issue', 'link', 'category', 'human_hours', 'labor_usd', 'savings_usd', 'value_usd', 'revenue_usd', 'strategic', 'your_hours', 'ai_cost_usd', 'summary', 'set_by_you', 'confidence', 'agent_id'];
|
|
369
|
+
export const CSV_COLUMNS = ['delivered', 'project', 'title', 'issue', 'link', 'category', 'human_hours', 'labor_usd', 'savings_usd', 'value_usd', 'revenue_usd', 'strategic', 'your_hours', 'ai_cost_usd', 'summary', 'set_by_you', 'confidence', 'agent_id', 'pull_requests'];
|
|
330
370
|
|
|
331
371
|
/** The previous complete period of a kind before t: its start. */
|
|
332
372
|
const lastComplete = (kind, t) => PERIODS[kind].start(PERIODS[kind].start(t) - 1);
|
|
@@ -376,6 +416,7 @@ export class Value {
|
|
|
376
416
|
project: v.projectInfo?.name ?? null,
|
|
377
417
|
issue: a.synopsis?.key ?? leadingJiraKey(a.intent) ?? null,
|
|
378
418
|
link: pr?.url ?? null,
|
|
419
|
+
prs: mergedPrs(a),
|
|
379
420
|
deliveredAt: at,
|
|
380
421
|
aiCostUsd: round(costOf(a), 2),
|
|
381
422
|
};
|
|
@@ -566,6 +607,7 @@ export class Value {
|
|
|
566
607
|
set_by_you: v.yours.join(' '),
|
|
567
608
|
confidence: it.est?.confidence ?? '',
|
|
568
609
|
agent_id: it.agentId,
|
|
610
|
+
pull_requests: prTimes(it).length,
|
|
569
611
|
};
|
|
570
612
|
});
|
|
571
613
|
fs.mkdirSync(this.dir, { recursive: true });
|