@miroshnik/elves 0.0.0 → 2026.1018.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/AGENTS.md +310 -0
- package/README.md +344 -0
- package/bin/ai-dev.ts +7 -0
- package/bin/elves.ts +2847 -0
- package/bin/shims/timeout +113 -0
- package/claude/CLAUDE.md +71 -0
- package/dist/github/scripts/github.js +3428 -0
- package/dist/spec/scripts/architecture.js +628 -0
- package/dist/spec/scripts/eslint-config.js +54 -0
- package/dist/spec/scripts/harness-qzb932c8.js +959 -0
- package/dist/spec/scripts/harness-v9s1v9w3.js +16045 -0
- package/dist/spec/scripts/harness.js +53 -0
- package/dist/spec/scripts/knip-hints.cjs +34 -0
- package/docs/ci-concurrency.md +82 -0
- package/docs/cloud-sessions.md +203 -0
- package/docs/judgment.md +81 -0
- package/docs/parallel-checkouts.md +220 -0
- package/docs/pr-checks.md +117 -0
- package/docs/testing.md +304 -0
- package/package.json +70 -1
- package/skills/ci-wait/SKILL.md +180 -0
- package/skills/ci-wait/scripts/wait-ci.sh +377 -0
- package/skills/dashboard/SKILL.md +212 -0
- package/skills/dashboard/scripts/dashboard.ts +912 -0
- package/skills/dashboard/scripts/sessions.ts +772 -0
- package/skills/est/SKILL.md +221 -0
- package/skills/est/reference.md +381 -0
- package/skills/est/scripts/est.ts +4854 -0
- package/skills/github/SKILL.md +206 -0
- package/skills/github/locales/en.json +449 -0
- package/skills/github/locales/ru.json +449 -0
- package/skills/github/reference.md +1073 -0
- package/skills/github/scripts/github.ts +4390 -0
- package/skills/github/scripts/locale.ts +495 -0
- package/skills/github/scripts/package.json +3 -0
- package/skills/slot/SKILL.md +145 -0
- package/skills/slot/scripts/package.json +3 -0
- package/skills/slot/scripts/slot.ts +279 -0
- package/skills/spec/SKILL.md +247 -0
- package/skills/spec/canon.md +219 -0
- package/skills/spec/checks.md +709 -0
- package/skills/spec/ci.md +378 -0
- package/skills/spec/migration.md +125 -0
- package/skills/spec/reference.md +889 -0
- package/skills/spec/scripts/architecture.ts +839 -0
- package/skills/spec/scripts/c4.ts +184 -0
- package/skills/spec/scripts/eslint-config.ts +82 -0
- package/skills/spec/scripts/harness.ts +1483 -0
- package/skills/spec/scripts/knip-hints.cjs +34 -0
- package/skills/spec/scripts/knip-hints.d.cts +17 -0
- package/skills/spec/scripts/package-run.ts +22 -0
- package/skills/spec/scripts/package.json +3 -0
- package/skills/spec/scripts/spec-break.ts +232 -0
- package/skills/spec/scripts/spec-claims.ts +198 -0
- package/skills/spec/scripts/spec-diff.ts +1111 -0
- package/skills/spec/scripts/spec-doc.ts +744 -0
- package/skills/spec/scripts/spec-exceptions.ts +233 -0
- package/skills/spec/scripts/spec-publish.ts +214 -0
- package/skills/spec/scripts/spec-run.ts +235 -0
- package/skills/spec/scripts/spec-shard.ts +267 -0
- package/skills/spec/scripts/speclib.ts +826 -0
- package/skills/spec/scripts/vendor/babel-parser.LICENSE +19 -0
- package/skills/spec/scripts/vendor/babel-parser.cjs +14615 -0
- package/skills/spec/scripts/vendor/babel-parser.d.cts +3 -0
- package/skills/task-env/SKILL.md +231 -0
- package/skills/task-env/proxy/compose.yaml +51 -0
- package/skills/task-env/reference.md +254 -0
- package/skills/task-env/scripts/task-env.ts +1017 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dashboard
|
|
3
|
+
description: A browser task dashboard served by its script, in two tabs. «Sessions» (main) — In progress tasks, their Claude Code sessions and what each is waiting for (CI, merge, deploy, human reply, working, silence), the task's PR, its stack's `*.localhost` links, the «Waiting for the owner» block (questions from session answers and from tasks with the «questions» label) and the «Decided auto» block (✅ auto answers of the last day); refreshes itself. «Estimate and actual» — a chart by task close time (estimate and actual hours, their ratio, tokens, cost, waits) with a rolling median, a summary and a table. Use when asked "what's up with the sessions", "is anything stuck", "what is the session waiting for", which questions await an answer or were answered by sessions, where a task's app opens; asked for a dashboard, a chart or "show it visually", how accurate the estimates are, how a flow change affected hours, tokens and cost — even if the word "dashboard" wasn't said. A single table in the terminal — `est history`.
|
|
4
|
+
allowed-tools: Bash(bun *skills/dashboard/scripts/dashboard.ts *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# dashboard — sessions at work, estimate, actual and cost of tasks
|
|
8
|
+
|
|
9
|
+
With a couple dozen parallel sessions you can't see which one is busy with
|
|
10
|
+
what and what it is waiting for, and questions to the owner are scattered
|
|
11
|
+
across sessions. And the flow is edited for the sake of two quantities:
|
|
12
|
+
estimate accuracy and the cost of a task, while the `est history` table shows
|
|
13
|
+
tasks one at a time, without a trend. The `scripts/dashboard.ts` script brings
|
|
14
|
+
up a page with two tabs:
|
|
15
|
+
|
|
16
|
+
- **«Sessions»** (`/`, the main one) — In progress tasks, their sessions,
|
|
17
|
+
what each is waiting for and links to the task's services, with «Waiting
|
|
18
|
+
for the owner» at the top and «Decided auto» at the bottom;
|
|
19
|
+
- **«Estimate and actual»** (`/est`) — a chart by task close date: GitHub
|
|
20
|
+
project fields and the «Estimate» and «Actual» comment markers; the waits of
|
|
21
|
+
each task (CI, after the merge, checks with the slot queue) and their medians
|
|
22
|
+
— a chart panel, a tile and table columns.
|
|
23
|
+
|
|
24
|
+
It writes nothing to GitHub.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bun --no-env-file <skill dir>/scripts/dashboard.ts [--repo o/r | --all-repos] [--since 90d] [--port N] [--no-open]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The skill dir is the one this file is in (in Claude Code —
|
|
31
|
+
`${CLAUDE_SKILL_DIR}`). The data is read by the `est` script next to it
|
|
32
|
+
(`../est/scripts/est.ts`) — the skills are installed together. It needs `gh`
|
|
33
|
+
with the `project` scope, as for `est`. A task's session is found by the pin
|
|
34
|
+
file written by `github task status <N> "In progress"` (in the project
|
|
35
|
+
language — `locales/<language>.json` of the `github` skill)
|
|
36
|
+
(`~/.config/elves/sessions/<session id>` or in `$ELVES_CONFIG_DIR`), its
|
|
37
|
+
state — by the transcript `~/.claude/projects/<dir>/<id>.jsonl`, the addresses
|
|
38
|
+
of its services — by the routes of the `task-env` proxy (its script next to
|
|
39
|
+
it, `../task-env/scripts/task-env.ts`). The dashboard
|
|
40
|
+
is shared by all the machine's repositories: its labels are in English, and what
|
|
41
|
+
it parses — the In progress status, the questions section and label, the last
|
|
42
|
+
line of a session, the epic type — in any language of the dictionary.
|
|
43
|
+
|
|
44
|
+
## How to run
|
|
45
|
+
|
|
46
|
+
The script is a server: it prints the address, opens it in the browser and
|
|
47
|
+
lives until stopped. So run it as a **background command**, not a regular
|
|
48
|
+
call: a regular one won't return until the timeout.
|
|
49
|
+
|
|
50
|
+
1. Before showing «Estimate and actual» — `est fact --sweep --since 90d --write`
|
|
51
|
+
(the `est` skill): the chart draws only recorded actuals. «Sessions» doesn't
|
|
52
|
+
need it.
|
|
53
|
+
2. Run the script in the background — in Claude Code outside the sandbox
|
|
54
|
+
(an unsandboxed call; section "Pitfalls" says why) — and read its output: the
|
|
55
|
+
first line is `dashboard: http://127.0.0.1:<port>/ — …`, the second is
|
|
56
|
+
`browser: opening …` or `browser: not opening (…)`.
|
|
57
|
+
3. Give the user the address. If the agent has its own browser (the app
|
|
58
|
+
panel) — run with `--no-open` and open the address there; otherwise the
|
|
59
|
+
script opens the system one itself (`BROWSER=<command>` — what to open it
|
|
60
|
+
with, `BROWSER=none` — don't open).
|
|
61
|
+
4. The user has looked — stop the background command.
|
|
62
|
+
|
|
63
|
+
| Parameter | What it does |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `--repo o/r` | repository; by default — from the directory's `git remote origin` |
|
|
66
|
+
| `--all-repos` | all repositories in the personal `est` registry (`~/.config/elves/repos.json`); each task names its repository |
|
|
67
|
+
| `--since 90d` | default period of «Estimate and actual» (`d`, `w`, `m`); without it — all time. On the page — «30 days», «90 days», «all time» |
|
|
68
|
+
| `--port N` | port; by default — a free one, a busy one is an error; none can be opened (an agent's sandbox) — an error too, see the pitfalls below |
|
|
69
|
+
| `--no-open` | don't open the browser |
|
|
70
|
+
|
|
71
|
+
## Sessions tab
|
|
72
|
+
|
|
73
|
+
- **A row per In progress task** of the project (an epic isn't a row: its
|
|
74
|
+
session plans): the task and its epic; the session — how long ago the last
|
|
75
|
+
transcript (or subagent) record was, its name — if it doesn't repeat the
|
|
76
|
+
task; what it is waiting for — as a colored label; the task's PR
|
|
77
|
+
(`Closes #N` or branch `<type>/<N>-…`) — number, checks, conflict, merged,
|
|
78
|
+
and whether a deploy is running. At the top — those waiting for the owner,
|
|
79
|
+
then silent and red ones.
|
|
80
|
+
- **Services of the task** — under the task, a link per service of its stack
|
|
81
|
+
(`task-env`): the hosts `<service>.<N>.<project>.localhost` from the
|
|
82
|
+
proxy's API, where `<N>` is the task and `<project>` its repository; the
|
|
83
|
+
proxy's port, if it isn't 80, is in the link. No stack — no line; e2e
|
|
84
|
+
addresses aren't shown: that stack is recreated on every run. The routes
|
|
85
|
+
are read on every open — a container's route leaves with it; the proxy
|
|
86
|
+
isn't running — no links and no error, the routes weren't read otherwise —
|
|
87
|
+
the reason in the tab's error banner.
|
|
88
|
+
- **What it is waiting for.** A session's background task (command,
|
|
89
|
+
subagent, Monitor) without a completion notification — the session is
|
|
90
|
+
waiting for it: PR open and checks running — «CI running», red —
|
|
91
|
+
«CI red», PR merged and the merge commit's checks running — «deploy»,
|
|
92
|
+
otherwise «working» with the background task's description. The last
|
|
93
|
+
turn is a model answer without a tool call: «human reply», and with a
|
|
94
|
+
green mergeable PR — «merge»; «All done. The session can be closed.» or
|
|
95
|
+
self-archiving — «can be closed». No records for more than 15 min and
|
|
96
|
+
nothing in the background — «silence» (a tool call without a result is
|
|
97
|
+
named: waiting for permission or hung). A background task older than 2 h
|
|
98
|
+
without a notification is considered lost. No pin — «no session»; a PR
|
|
99
|
+
with the `Claude-Session` trailer — «cloud, state not visible»: a cloud
|
|
100
|
+
session doesn't pin its task.
|
|
101
|
+
- **«Waiting for the owner».** Questions from the last answers of task
|
|
102
|
+
sessions («human reply», «merge»): from the line «All done, but there are
|
|
103
|
+
questions…» or «Remaining: …» to the end of the answer; without them — the
|
|
104
|
+
last paragraph. Sessions in the
|
|
105
|
+
repository's directories (`paths` of the `est` registry) without an In
|
|
106
|
+
progress task that wrote within the last day — only with an explicit
|
|
107
|
+
question (these lines or a paragraph ending in "?"); routines
|
|
108
|
+
(`<scheduled-task>`) don't count. In progress tasks with the «questions»
|
|
109
|
+
label — as a row, the open items of «## Questions» under a disclosure;
|
|
110
|
+
tasks not in work with the label — as a collapsed group.
|
|
111
|
+
- **«Decided auto».** What the sessions decided themselves in auto mode — to
|
|
112
|
+
look at after the fact, without stopping them: the items of «## Questions»
|
|
113
|
+
marked `autoAnswer` of any language of the dictionary (✅ auto), anywhere in
|
|
114
|
+
the item — `task answer --auto` puts it before the question, by hand it was
|
|
115
|
+
also put after the question or on a continuation line. Tasks of any state,
|
|
116
|
+
epics included, whose description was edited within the last day (never
|
|
117
|
+
edited — created): a comment or a close doesn't bring back old answers. A
|
|
118
|
+
line per answer — the task with a link and how long ago it was edited, the
|
|
119
|
+
question, the answer: the mark between text separates them; at the start or
|
|
120
|
+
end — the text before a bold label (`**Answer:**`), otherwise up to the
|
|
121
|
+
first "?", otherwise the first line (a single line — up to the first dash)
|
|
122
|
+
is the question. No such answers — no block.
|
|
123
|
+
- It refreshes itself every 30 s (and on returning to the tab): what's
|
|
124
|
+
expanded stays expanded. Pins and transcripts are re-read, GitHub — at most
|
|
125
|
+
once a minute and in the background: the page answers from cache, fresh
|
|
126
|
+
data arrives by the next refresh.
|
|
127
|
+
|
|
128
|
+
## Estimate and actual tab
|
|
129
|
+
|
|
130
|
+
- **Summary.** Estimate accuracy — k (the median of "actual / estimate" over
|
|
131
|
+
the last 20 tasks with the `est` marker and `full` coverage) and the share
|
|
132
|
+
of tasks within the ×0.5…×2 tolerance, the same numbers as in
|
|
133
|
+
`est history`. Hours, tokens and cost of a task — the median of the last 10
|
|
134
|
+
closed tasks and the change against the previous 10. The «Cost by model»
|
|
135
|
+
tile — each model's share of $ for the last 10 tasks and for the previous
|
|
136
|
+
10: the model changed — the rate changed.
|
|
137
|
+
- **Chart** — five panels on a shared time axis (close date): hours (ring —
|
|
138
|
+
estimate, dot — actual, the segment between them — the error), actual to
|
|
139
|
+
estimate (the ×1 line — the estimate matched, the band — the ×0.5…×2
|
|
140
|
+
tolerance), tokens, M, and cost, $ (ring — the forecast from the «Estimate»
|
|
141
|
+
comment), and the actual's split. The line is a rolling median of the last
|
|
142
|
+
10 tasks, the number at its end — the current value. The scales are
|
|
143
|
+
logarithmic: an equal step — an equal ratio.
|
|
144
|
+
- **The actual's split** — a bar per task, minutes on a linear scale: CI on
|
|
145
|
+
the PR, after the merge and the deploy, checks, the slot queue (bottom-up)
|
|
146
|
+
and the rest on top; the line — the median share of the waits, % on the
|
|
147
|
+
right scale. A task whose actual predates the split is a gap, not a zero,
|
|
148
|
+
and stays out of the median; the tooltip over the gap says so.
|
|
149
|
+
- **Table** — the same values per task, newest on top; hovering over a point
|
|
150
|
+
highlights the row.
|
|
151
|
+
|
|
152
|
+
Tasks — closed ones with an actual, as in `est history`; an epic isn't
|
|
153
|
+
included (its hours are the sum of its subtasks). Estimate — only with the
|
|
154
|
+
`est` marker: old estimates are in other units; such tasks have an actual but
|
|
155
|
+
no ring and no ratio.
|
|
156
|
+
|
|
157
|
+
## How to read the chart
|
|
158
|
+
|
|
159
|
+
- Estimates converge — the trend of the "actual to estimate" panel lies near
|
|
160
|
+
×1 and the dots gather inside the band. A trend above ×1 — tasks are
|
|
161
|
+
underestimated.
|
|
162
|
+
- A task gets cheaper — the cost and token trend goes down with the same task
|
|
163
|
+
size: check against the hours panel and the task types in the table,
|
|
164
|
+
otherwise "cheaper" means "tasks got smaller".
|
|
165
|
+
- Waits shrink — the share line of the split panel goes down; what a faster
|
|
166
|
+
CI or a shorter slot queue gave — the height of its part of the bars before
|
|
167
|
+
and after the change.
|
|
168
|
+
- The $ trend mixes the flow with the model's rate: a model change changes
|
|
169
|
+
the cost several-fold under the same flow. The «Cost by model» tile
|
|
170
|
+
shows whether the model changed; the flow's effect — by tokens and hours.
|
|
171
|
+
- The effect of a flow change — compare the trend before and after the date
|
|
172
|
+
of an Elves release (tags `vYYYY.MM.DD`) or of the
|
|
173
|
+
`chore(agents): Elves flow …` commit in the project;
|
|
174
|
+
fewer than ten tasks after the change so far — too early to draw a
|
|
175
|
+
conclusion. The chart doesn't see flow without tasks (PRs without an issue)
|
|
176
|
+
— the period summary over all sessions shows it, `est period`.
|
|
177
|
+
|
|
178
|
+
## Pitfalls
|
|
179
|
+
|
|
180
|
+
- GitHub is re-read when the page opens, but at most once a minute; the
|
|
181
|
+
«Refresh» link — immediately. A GitHub error is shown on the
|
|
182
|
+
page, the server keeps running.
|
|
183
|
+
- «Estimate and actual» reads project rows in full, with comments: with
|
|
184
|
+
`--all-repos` the first opening of the tab takes tens of seconds.
|
|
185
|
+
«Sessions» doesn't wait for them: In progress tasks come from a project
|
|
186
|
+
filter on GitHub's side.
|
|
187
|
+
- An In progress task without a session — `github task status` was run not
|
|
188
|
+
from Claude Code, or the pin was removed; two sessions per task (after
|
|
189
|
+
`/clear`) — the one that wrote last is shown.
|
|
190
|
+
- The page is local: the server listens only on `127.0.0.1` and answers only
|
|
191
|
+
to the names `127.0.0.1` and `localhost`. Don't expose it — it contains task
|
|
192
|
+
titles of non-public repositories.
|
|
193
|
+
- The Claude Code sandbox (macOS, checked 2026-10-13): with
|
|
194
|
+
`sandbox.network.allowLocalBinding` off it denies local ports — the script
|
|
195
|
+
exits with «can't listen on 127.0.0.1 …», even without `--port`: another
|
|
196
|
+
port won't help. With it on the server listens and reads the proxy's
|
|
197
|
+
routes, but the `gh` the script starts fails TLS verification there
|
|
198
|
+
(`x509: OSStatus -26276`, a GitHub error in the banner, no tasks) — an
|
|
199
|
+
`excludedCommands` entry covers a direct call, not a child of a script. So
|
|
200
|
+
the dashboard runs outside the sandbox. `allowLocalBinding` is for the
|
|
201
|
+
skill's tests, which open ports with a fake `gh`, and for reaching task
|
|
202
|
+
addresses from sandboxed commands (the `task-env` skill, section "Local
|
|
203
|
+
ports and task addresses").
|
|
204
|
+
- «proxy …: routes not read» in the banner: with «is denied here (an agent's
|
|
205
|
+
sandbox?)» — the dashboard runs in a sandbox without `allowLocalBinding`
|
|
206
|
+
and can't connect to the proxy: run it outside; with «a proxy without the
|
|
207
|
+
API?» — the machine's proxy predates the API: `task-env proxy up` brings
|
|
208
|
+
it to the skill's compose file.
|
|
209
|
+
- A Claude Code cloud session (`CLAUDE_CODE_REMOTE=true`): GitHub Projects are
|
|
210
|
+
closed there, and its localhost isn't visible to the user's browser — the
|
|
211
|
+
script exits with an explanation (`docs/cloud-sessions.md` in Elves).
|
|
212
|
+
- Few or no dots — closed tasks have no actual: `est fact --sweep --write`.
|