crewforth 3.5.0-rc.1 → 3.5.0-rc.2
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 +32 -0
- package/README.md +1 -1
- package/VERSION +1 -1
- package/kit/CLAUDE.md +1 -1
- package/kit/eval/lib/statusline.sh +22 -5
- package/kit/eval/lib/todo.awk +167 -0
- package/kit/eval/lib/todo.sh +120 -0
- package/kit/eval/smoke-test.sh +60 -2
- package/kit/hooks/prompt-approval.sh +5 -5
- package/kit/skills/crew-plan/SKILL.md +2 -1
- package/kit/skills/crew-todo/SKILL.md +31 -0
- package/kit/skills/spec-planning/SKILL.md +9 -2
- package/kit/studio/web/agent-spend.js +32 -0
- package/kit/studio/web/app.js +245 -236
- package/kit/studio/web/approvals.js +14 -13
- package/kit/studio/web/ask.js +10 -9
- package/kit/studio/web/canvas.js +56 -54
- package/kit/studio/web/chat.js +41 -41
- package/kit/studio/web/convo.js +21 -18
- package/kit/studio/web/dock.js +20 -19
- package/kit/studio/web/graph-plan.js +62 -22
- package/kit/studio/web/i18n-tr.js +760 -0
- package/kit/studio/web/i18n.js +79 -0
- package/kit/studio/web/index.html +1 -0
- package/kit/studio/web/inspect.js +27 -24
- package/kit/studio/web/list-plan.js +16 -15
- package/kit/studio/web/list.js +6 -5
- package/kit/studio/web/liveness.js +11 -9
- package/kit/studio/web/map-plan.js +33 -29
- package/kit/studio/web/map.js +74 -73
- package/kit/studio/web/models-plan.js +47 -42
- package/kit/studio/web/models.js +21 -20
- package/kit/studio/web/names.js +13 -10
- package/kit/studio/web/nav.js +34 -33
- package/kit/studio/web/newsession.js +25 -24
- package/kit/studio/web/style.css +2 -0
- package/kit/studio/web/theme.js +5 -2
- package/kit/studio/web/timeline-plan.js +19 -18
- package/kit/studio/web/timeline.js +23 -22
- package/kit/studio/web/usage.js +36 -32
- package/package.json +1 -1
|
@@ -32,16 +32,23 @@ commit: <HEAD when the plan was written>
|
|
|
32
32
|
## Constraints
|
|
33
33
|
- <a value, limit or name copied word for word from the request or spec>
|
|
34
34
|
## Tasks (order)
|
|
35
|
-
|
|
35
|
+
Progress: tick a task [x] when its check passes, mark the one in work [~]. /crew-todo shows these boxes.
|
|
36
|
+
### Phase 1 — <name> (phases only when the work has stages)
|
|
37
|
+
1. [ ] <task> — satisfies: AC-1 — size: <S/M/L> — dependency: <none/#n> — risk: <low/medium/high>
|
|
36
38
|
Interfaces: consumes <name: type> · produces <name: type> (only when a later task uses its output)
|
|
37
39
|
Current code: <a few lines, verbatim, at the place it changes> (optional)
|
|
38
|
-
2. …
|
|
40
|
+
2. [ ] …
|
|
39
41
|
— checkpoint: build and tests green, the criteria so far re-read — (after every 2-3 tasks)
|
|
42
|
+
### Phase 2 — <name>
|
|
43
|
+
3. [ ] …
|
|
40
44
|
## Not covered by tests
|
|
41
45
|
- <an input or case no test reaches> → task <n> (five at most)
|
|
42
46
|
## Assumptions / Open questions
|
|
43
47
|
- ...
|
|
44
48
|
```
|
|
49
|
+
- **Every task carries a box, and the box is the record.** `[ ]` open, `[x]` done (its check passed, not "written"),
|
|
50
|
+
`[~]` the one in work. Tick it in the same step that finishes the task; the `Progress:` line keeps that rule in the
|
|
51
|
+
plan, where whoever works it reads it. `/crew-todo` draws the boxes under the status line; it reads, never writes.
|
|
45
52
|
- **No timeline and no estimate in time.** A size (S/M/L) says how much, never when.
|
|
46
53
|
- **No code beyond signatures.** A plan names functions and types; the bodies are the tasks' work. The only code a
|
|
47
54
|
plan quotes is the current code a task changes, word for word.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// What each kind of agent spent, for the summary box: under "Agents", one line per agent type.
|
|
2
|
+
//
|
|
3
|
+
// The numbers are the graph's: every agent node carries its own share of the session's tokens (`usage`), counted
|
|
4
|
+
// once per response whichever file repeated it. This file only adds them up by type, with the same rule the
|
|
5
|
+
// graph's groups use (graph-plan.js `sumOf`): an agent with no usage read adds nothing, and a cost is a dash when
|
|
6
|
+
// any member's is, so a sum never passes for the whole.
|
|
7
|
+
|
|
8
|
+
import { sumOf } from './graph-plan.js';
|
|
9
|
+
import { fmtCount, fmtCost } from './usage.js';
|
|
10
|
+
import { typeOf, roleName } from './names.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* [role, "new tokens · ~cost"] pairs, the most-spent first: the shape `summaryRows` opens under a row.
|
|
14
|
+
* A type that ran more than once says how many times. Empty when no agent has a usage to add.
|
|
15
|
+
*/
|
|
16
|
+
export function agentSpendRows(nodes) {
|
|
17
|
+
const byType = new Map();
|
|
18
|
+
for (const n of nodes ?? []) {
|
|
19
|
+
if (n?.kind !== 'agent' || !n.usage) continue;
|
|
20
|
+
const type = typeOf(n);
|
|
21
|
+
if (!byType.has(type)) byType.set(type, []);
|
|
22
|
+
byType.get(type).push(n);
|
|
23
|
+
}
|
|
24
|
+
return [...byType]
|
|
25
|
+
.map(([type, members]) => ({ type, runs: members.length, sum: sumOf(members) }))
|
|
26
|
+
.filter((g) => g.sum.fresh || g.sum.cacheRead)
|
|
27
|
+
.sort((a, b) => b.sum.fresh - a.sum.fresh || (a.type < b.type ? -1 : 1))
|
|
28
|
+
.map((g) => [
|
|
29
|
+
g.runs > 1 ? `${roleName(g.type)} ×${g.runs}` : roleName(g.type),
|
|
30
|
+
`${fmtCount(g.sum.fresh)} · ${fmtCost(g.sum.cost)}`,
|
|
31
|
+
]);
|
|
32
|
+
}
|