tldr-experts 0.18.0 → 0.18.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 +270 -0
- package/README.md +17 -0
- package/dist/hooks/answer-capture.js +28 -11
- package/dist/hooks/budget-gate.js +9 -9
- package/dist/hooks/{chunk-qdvwnts3.js → chunk-1v05a468.js} +1 -1
- package/dist/hooks/{chunk-vmhfw2r1.js → chunk-2caxb41h.js} +1 -1
- package/dist/hooks/{chunk-msswet35.js → chunk-2ym87z6d.js} +1 -1
- package/dist/hooks/{chunk-xxcy0tsa.js → chunk-4y3pk4n2.js} +7 -3
- package/dist/hooks/{chunk-p0ns6fex.js → chunk-8ak5kwd5.js} +1 -1
- package/dist/hooks/{chunk-rr7n3j59.js → chunk-afttzftj.js} +22 -7
- package/dist/hooks/{chunk-77y6q9mt.js → chunk-c1h38et6.js} +29 -2
- package/dist/hooks/{chunk-00h4xah7.js → chunk-gx6qa496.js} +22 -2
- package/dist/hooks/{chunk-4mjxyfp9.js → chunk-hwsng0xq.js} +1 -1
- package/dist/hooks/{chunk-26xkmfdr.js → chunk-kwaqdq9w.js} +3 -3
- package/dist/hooks/{chunk-7hhjx1wk.js → chunk-nf2j945p.js} +3 -3
- package/dist/hooks/{chunk-ds9sew2e.js → chunk-pday823f.js} +1 -1
- package/dist/hooks/{chunk-ab6cv5v5.js → chunk-vf992pfw.js} +1 -1
- package/dist/hooks/{chunk-rw9zk47w.js → chunk-wx1jce1t.js} +17 -7
- package/dist/hooks/{chunk-bm9aqtg3.js → chunk-x00a2vaz.js} +2 -2
- package/dist/hooks/claim-sources.js +5 -5
- package/dist/hooks/dod-gate.js +8 -8
- package/dist/hooks/no-reask.js +8 -8
- package/dist/hooks/session-start.js +13 -13
- package/dist/hooks/statusline.js +9 -9
- package/dist/tldrx.js +1428 -700
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,275 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.2 — 2026-09-13
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **The zero-touch recipe is written down, on the pages a person opens to run one (#276).**
|
|
8
|
+
Measured on origin/main at 0.18.1, after the first fully unattended run had ended in a merged
|
|
9
|
+
pull request: `--questions`, `--ship`, `--until-done`, `--gates none` and `run cancel` were
|
|
10
|
+
each documented, and no page chained them into the thing that had just worked — seed file →
|
|
11
|
+
`run new … --gates none --questions none --ship pr --budget` → a backgrounded
|
|
12
|
+
`run auto --run <id> --until-done`. `nohup`, `2>&1 &`, the log to `tail -f` and "how do I
|
|
13
|
+
check on it later" had zero hits repo-wide; `--ui plain`, the flag that keeps a backgrounded
|
|
14
|
+
log readable, lived in the spec and the changelog only. Three seeds written the same day had
|
|
15
|
+
failed `run new` on the 240-character claim clip (#275), and the rules a seed must follow to
|
|
16
|
+
survive the importer and the `[src:]` grammar existed only in the source. So: a "Zero-touch
|
|
17
|
+
run, start to finish" section at the top of the site's unattended-operation guide (EN + ES)
|
|
18
|
+
with the copyable block, one line per flag — including that `--ship merge` over a base
|
|
19
|
+
branch seen to require no check arms nothing and leaves the PR open for a person (#274) —
|
|
20
|
+
how to check on the run, how to stop
|
|
21
|
+
it (`run cancel` after the process, never before), and the honest boundary: this is the
|
|
22
|
+
happy path without a person, and a run a person signs is a different configuration. The
|
|
23
|
+
same block, six lines, in the README quick start and both quickstarts; `docs/guide/10` has
|
|
24
|
+
its switches, its flags and its cheat sheet brought up to `--until-done`, `--questions`,
|
|
25
|
+
`--ship`, `--gates none` and `_scoped`, and drops a sentence that predated the engine's own
|
|
26
|
+
gate signer; the seed authoring rules — one claim per bullet, ~200 characters with the
|
|
27
|
+
citation, token last, `path:line` that exists, `"; "` between sources, the four What
|
|
28
|
+
headings, a `Recommended:` line per question, `.tldrx/seeds/<nn>-<slug>.md` — are in
|
|
29
|
+
`docs/guide/05` and in the site section, measured against `markdownClaims.ts` and
|
|
30
|
+
`srcToken.ts` rather than remembered. `run auto` examples in the guides now say `--run <id>` (the generated flag reference keeps its positional form), the
|
|
31
|
+
spelling under which a bare `--until-done` cannot mistake the id for its count. The ES
|
|
32
|
+
landing page links the release notes, which stay English and generated (a translated copy
|
|
33
|
+
would be the second copy `gen-changelog.ts` exists to prevent); the untranslated `TLDRX_UI`
|
|
34
|
+
row on the ES flags page is generated from `gen-cli.ts`'s English-by-design env table and
|
|
35
|
+
was left alone.
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **The dependency frontier is the sequential path's too — nothing fans out over a story a dead
|
|
39
|
+
developer parked (#263).** Measured on a field run (2026-09-12, `run auto --yolo`): S3's
|
|
40
|
+
developer died on its own cap, `parkDeveloperFailure` put the story back at `todo` — deliberate,
|
|
41
|
+
a transport failure settles nothing about the work — and one second later the next wave started
|
|
42
|
+
S4, whose front matter says `depends_on: [S3]`. S4 reached `done` on an epic branch S3 had put
|
|
43
|
+
no line of code on, which is an audit record lying in the dangerous direction: a gate signer
|
|
44
|
+
reads `done` over work that was never delivered. #260 had already built the check that answers
|
|
45
|
+
this (`blockingDependency`: any dependency that is not `done` holds a story, and the story is
|
|
46
|
+
written `blocked` with the reason rather than left quietly at `todo`) and switched it on for
|
|
47
|
+
`--parallel N` only, on the grounds that the sequential loop had no defect of its own. It had
|
|
48
|
+
this one, and `lanes === 1` is the default and what `run auto` runs. Re-measured at 017dda8
|
|
49
|
+
before the change, one fixture, one field moved: at `--parallel 2` the dependent is held with
|
|
50
|
+
the reason `dependency S1 is not done` on `gate.requested`; at the default it is built and
|
|
51
|
+
reported `done`. Now the same one derivation is asked on every N — no second copy of the rule,
|
|
52
|
+
and #260's own direction is kept: a story that depends on nothing still runs after a parked one.
|
|
53
|
+
The park itself, the cap arithmetic and the DoD-decides half of #277 are all untouched.
|
|
54
|
+
|
|
55
|
+
- **The plan's per-story price is a ceiling now, not a wall — and a story that dies on it with
|
|
56
|
+
work in its tree lets the DoD decide (#277).** We shipped this one ourselves, hours earlier:
|
|
57
|
+
#264 landed in 0.18.1 and made the Build executor actually read `03-plan/budget.yml`'s
|
|
58
|
+
per-story prices. Before it nothing did, so the number was decorative and every story got the
|
|
59
|
+
uniform stage share; from #264 on it became the hard ceiling of the developer's turn, at
|
|
60
|
+
`price ÷ (1 + reviewer_share)` = **0.8 × price** — a figure a planner writes before it has
|
|
61
|
+
read a line of the repo. The session running two live unattended runs on 0.18.1 measured the
|
|
62
|
+
consequence (their measurement, not this repo's suite): stories died mid-change on caps a
|
|
63
|
+
dollar or three wide, were left `todo` having spent real money, their dependants went
|
|
64
|
+
`blocked`, and both runs stalled with nothing delivered — the real cost of a story spanning
|
|
65
|
+
roughly an order of magnitude above what the planner had estimated. Two changes, one issue.
|
|
66
|
+
**The cap is now `max(price × story_cap_multiplier, story_cap_floor_usd)`** — defaults 3 and
|
|
67
|
+
$4.00, both new optional `stage.yml` keys alongside `attempts:` and `reviewer_share:`
|
|
68
|
+
(`schemas/stageTuning.ts`), refused by name out of range rather than clamped. 3 NARROWS
|
|
69
|
+
that gap for the low and middle of the range and does not close it: over the prices the
|
|
70
|
+
planner writes today ($1.20-$4.00) the ceiling lands at $4.00-$12.00, so a story at the
|
|
71
|
+
top of the observed spread still dies on it — **a story still dies on its cap whenever
|
|
72
|
+
its real cost exceeds `max(price x 3, $4.00)`**, which is the figure to check before
|
|
73
|
+
recalibrating. The expensive end is carried by the OTHER half below, not by the
|
|
74
|
+
multiplier: the work is committed and measured instead of lost. What neither half covers
|
|
75
|
+
— a stage still reporting `done` over a story that died — is #263, out of scope here. 3
|
|
76
|
+
is chosen against that division of labour and against keeping one story's worst case
|
|
77
|
+
legible in its stage; the floor is the developer-side sibling of
|
|
78
|
+
`REVIEWER_FLOOR_USD` ($1.00) and is a small multiple of it, because the developer reads the
|
|
79
|
+
repo, edits it, runs the story's whole DoD suite and commits where the reviewer reads one
|
|
80
|
+
diff. The error here is not symmetric — a price set too low costs a dead story plus
|
|
81
|
+
everything already paid for it, one set too high costs only the difference on work that lands
|
|
82
|
+
— so the arithmetic is deliberately allowed to over-run a single estimate and the STAGE's own
|
|
83
|
+
budget gate, metered against real spend, is what stops a stage that runs out.
|
|
84
|
+
**Derived at DISPATCH, off the price as it sits on disk, with no migration of `budget.yml`:**
|
|
85
|
+
that is load-bearing rather than tidy, because runs already in flight carry prices written by
|
|
86
|
+
an older planner and only a dispatch-time derivation covers them the moment this is installed.
|
|
87
|
+
`gh #91`'s property survives intact — attempt 1 is the pass the plan priced and gets the whole
|
|
88
|
+
ceiling, the contingency attempt after it gets an `attempts`-th — and the reviewer's share,
|
|
89
|
+
which never came out of the developer's ceiling in the first place, is untouched and now
|
|
90
|
+
visibly additive. The brake's mirror in `budget/remainingWork.ts` moves in step, pinned as
|
|
91
|
+
ever by `test/remaining-work.test.ts`. **And a developer killed by that ceiling with work in
|
|
92
|
+
its tree no longer parks the story `todo`:** it is a story with a diff and no verdict, so the
|
|
93
|
+
facilitator's own Definition of Done decides it — #271's rule over a second cause, the same
|
|
94
|
+
`workSince` tree comparison (committed or not, `tldrx-work/` and `.tldrx/` excluded), the same
|
|
95
|
+
"the cause is recorded either way". The death is named in words with its figure on the story's
|
|
96
|
+
review log, on its `task.done` (`budget_death:`, additive) and in the handoff's `## Unknowns`;
|
|
97
|
+
a red DoD blocks with both reasons on the row; a cap death that left no work still parks the
|
|
98
|
+
story exactly where it was, unchanged since 2026-08-30. The narrowing to a CAP death is
|
|
99
|
+
deliberate: a spawn that never started or a transport fault says nothing about a tree, while
|
|
100
|
+
`Reached maximum budget` says precisely that the turn was working when it stopped. The Plan
|
|
101
|
+
schema contract now tells the planner the price is a ceiling and to budget the expensive case
|
|
102
|
+
rather than the expected one — it is pricing before reading the code, which is exactly when an
|
|
103
|
+
estimate is least worth trusting. What this does NOT fix: a stage that still reports `done`
|
|
104
|
+
while a story died on its cap is #263, measured and filed separately, and is left untouched
|
|
105
|
+
here.
|
|
106
|
+
|
|
107
|
+
- **`--ship merge` no longer arms an auto-merge over a base that requires nothing (#274).**
|
|
108
|
+
Measured on the zero-touch proof run (a field workspace, `--gates none --ship merge`, no human
|
|
109
|
+
in the loop): the PR merged at `06:20:14Z` while all four of its check runs were still pending
|
|
110
|
+
— they had started at 06:20:12/06:20:16/06:20:28 and completed between 06:21:38 and 06:24:56,
|
|
111
|
+
every one of them AFTER the merge — and the ship record said `queued — GitHub merges when its
|
|
112
|
+
checks pass`. The mechanism is a gap between two different sets: the guard counted the checks
|
|
113
|
+
the PR REPORTED (`gh pr view --json statusCheckRollup`), while `gh pr merge --auto` hands the
|
|
114
|
+
wait to GitHub's auto-merge, which waits on the base branch's REQUIREMENTS. That workspace's
|
|
115
|
+
`main` had none (`gh api …/branches/main/protection` → 404 `Branch not protected`), so `--auto`
|
|
116
|
+
did not mean "merge when green", it meant "merge now", and the ledger recorded a red-eligible
|
|
117
|
+
suite as merged on green — a record lying in the dangerous direction (§7). `ship` now asks the
|
|
118
|
+
BASE what it requires before arming anything: `repos/{owner}/{repo}/rules/branches/<base>` for
|
|
119
|
+
rulesets (repository and organization level) and, when that finds none,
|
|
120
|
+
`repos/{owner}/{repo}/branches/<base>/protection` for classic branch protection. Nothing is
|
|
121
|
+
armed without a requirement actually SEEN — `merge: absent — the base branch requires no check
|
|
122
|
+
before merge` when both were read and hold nothing back, and `absent — could not tell what the
|
|
123
|
+
base branch requires` when a probe could not be read, because for a merge "I could not tell" has
|
|
124
|
+
to behave like "there is nothing to wait on". A requirement imposed by a mechanism neither probe
|
|
125
|
+
can see (a merge queue, an org policy this token cannot read) reads as "requires nothing" and so
|
|
126
|
+
arms NOTHING: the residual gap can only ever cost a merge that was not armed, never a merge that
|
|
127
|
+
should not have happened. The `queued` sentence now says what `--auto` actually waits on — the
|
|
128
|
+
base's REQUIRED checks. Two edges of the probe are closed on the same side: a rule that arrives
|
|
129
|
+
carrying an `enforcement` other than `active` is a dry run and is not counted as a requirement
|
|
130
|
+
(GitHub already filters `evaluate`/`disabled` server-side and the response carries no such field
|
|
131
|
+
— measured against the official REST description — so this is belt-and-braces, and its absence is
|
|
132
|
+
read as that documented filter rather than as "unknown", which would refuse to arm on every real
|
|
133
|
+
repo); and only a 404 whose body reads `Branch not protected` means "no classic protection" — a
|
|
134
|
+
branch or a repo that is not there answers 404 too, and reading that as "requires nothing" would
|
|
135
|
+
arm a merge against a base nobody identified.
|
|
136
|
+
|
|
137
|
+
## 0.18.1 — 2026-09-13
|
|
138
|
+
|
|
139
|
+
### Added
|
|
140
|
+
|
|
141
|
+
- **Per-story scoped checks, and the full suite once on the epic head (#257).** Measured on a
|
|
142
|
+
field run at 0.16.1: 99 `check.*` events on one 8-story epic — every story's Definition of Done
|
|
143
|
+
ran the whole declared list, the full suite among it, on every attempt and every fix round, and
|
|
144
|
+
the epic head that actually ships was never run at all. The DoD is a delta gate ("this story did
|
|
145
|
+
not break the tree"), proven until now by running everything because nothing narrower existed.
|
|
146
|
+
`workspace.yml` grows `commands.<slot>_scoped: "<cmd> {{paths}}"`, a template beside a declared
|
|
147
|
+
slot: a story's dod line whose command has one runs the template over the story's own paths —
|
|
148
|
+
declared `touches:` ∪ its committed diff ∪ its dirty entries, existing paths only, one derivation
|
|
149
|
+
in `build/scopedPaths.ts` — substituted at the argv level (a path with a space is ONE argument,
|
|
150
|
+
no shell), and the row says `scope: "paths"` with the paths. The moment the epic flips to `done`,
|
|
151
|
+
the deduped full commands of its stories run once in the epic worktree, after `install:` if
|
|
152
|
+
declared, as `scope: "full"` rows on the epic's `lane` attributed to the last story merged; a red
|
|
153
|
+
there blocks that story, so the `stories` gate condition refuses. The template is never a
|
|
154
|
+
command — not in the allowlist, not citable, not handed to the developer, refused at Plan time
|
|
155
|
+
by a sentence naming the suffix; the story's evidence keeps citing the DECLARED command and the
|
|
156
|
+
row's prose names what ran. A repo that declares no template runs, records and cites exactly
|
|
157
|
+
what it did before: the golden is byte-identical, and a `scope` key emitted unconditionally
|
|
158
|
+
reddens it. Pinned by a two-story fake-agent build — exactly 2 `scope: paths` rows with the
|
|
159
|
+
right paths and 1 `scope: full` row with `lane`, a red epic head blocking S2 with the gate
|
|
160
|
+
counting 1 blocked, and a control with no template emitting no `scope` key at all; skipping the
|
|
161
|
+
epic-head run or substituting nothing each reddens exactly one of those.
|
|
162
|
+
|
|
163
|
+
### Fixed
|
|
164
|
+
|
|
165
|
+
- **A cancelled run's epic branch no longer blocks the next run for the same feature: `run cancel`
|
|
166
|
+
releases it, and Build moves a finished run's leftover aside instead of refusing it as someone
|
|
167
|
+
else's (#272).** Measured 2026-09-13 on a headless proof run at a509dca: run A had cut
|
|
168
|
+
`epic/main-ci-green` and was cancelled; the ordinary retry after a cancelled attempt — same
|
|
169
|
+
feature, id `…-2` — reached Build and was refused, "already exists … did not cut it — refusing to
|
|
170
|
+
stack this run's commits onto someone else's epic", relaunched once under `--until-done`, got the
|
|
171
|
+
same last line and stopped as #252 designed. $3.70 of what/how/plan died on a leftover with ZERO
|
|
172
|
+
commits beyond `main` — the only work of the cancelled run sat on its story branch (#129), which
|
|
173
|
+
nothing touches. Two halves, one rule. `tldrx run cancel` now releases every branch its
|
|
174
|
+
`build.epic_branch` claims, after `closeRun` has taken the run's epic worktrees back: no commit
|
|
175
|
+
beyond the repo's default branch → deleted (it was the base under another name); commits → renamed
|
|
176
|
+
to `epic/<slug>@<run-id>` (one derivation, `build/epicRelease.ts`) so they survive under a name
|
|
177
|
+
that says whose they were; checked out somewhere → left alone and the checkout named; a base git
|
|
178
|
+
cannot count against → left alone, because a miscounted zero there deletes commits. And Build, at
|
|
179
|
+
the refusal, reads WHO owns the branch from the claims under `tldrx-work/`: an owner whose
|
|
180
|
+
`run.yml` is explicitly `cancelled` or `done` — never "no process", since a run killed mid-Build or
|
|
181
|
+
parked at a gate has no process and is still the owner — left a leftover, and Build moves it
|
|
182
|
+
aside by the same rule and cuts its own; an open owner, an unreadable owner, and a branch NO run
|
|
183
|
+
claims keep the refusal verbatim with one line naming which — the unclaimed case is what #262's
|
|
184
|
+
killed-mid-cut run leaves, and its relaunch must find its epic where it left it. Every move is
|
|
185
|
+
written where a person reads it, not only in the branch list: the owner's run.yml
|
|
186
|
+
(`build.epic_released`, additive), its `04-build/handoff.md` when it wrote one, an `epic.released`
|
|
187
|
+
event on its ledger and — from Build — on the new run's ledger and in its handoff's Decisions.
|
|
188
|
+
Pinned against a real repo: delete / rename-with-commits-surviving / worktree-kept for the cancel
|
|
189
|
+
half, and owner-cancelled → renamed + fresh epic + both records, owner-open → verbatim exit 2,
|
|
190
|
+
no-claim → verbatim exit 2 for the Build half; the golden build is byte-identical.
|
|
191
|
+
- **A permission refusal on a story whose tree holds work no longer blocks it before the
|
|
192
|
+
facilitator's own Definition of Done can measure it, and the developer is told why a plumbed
|
|
193
|
+
DoD line is refused (#271).** Measured 2026-09-12 on a headless `run auto --until-done` at
|
|
194
|
+
0.18.0: the developer finished, committed, and then ran the workspace's DoD command wrapped in
|
|
195
|
+
`> log 2>&1; echo EXIT:$? >> log; tail …` — a line the agent's permission layer splits at every
|
|
196
|
+
separator and refuses because the fragments do not each match a grant (#215). #261's block did
|
|
197
|
+
exactly what it says: `blocked: permission — <that line>` on the gate, one attempt spent,
|
|
198
|
+
`--until-done` correctly parked. And it was the wrong verdict, because the refusal was the
|
|
199
|
+
developer's OWN attempt at verification, the work was already in the tree, and the facilitator
|
|
200
|
+
re-runs the DoD one step later regardless — $8.12 to reach a committed story nothing measured.
|
|
201
|
+
The refusal now stops a story only when the tree holds NO work. "Work" is `workSince`, one
|
|
202
|
+
derivation against the tree the developer was handed: the branch tip's tree differs from it
|
|
203
|
+
(`git diff --quiet`), OR the working copy is dirty (`git status --porcelain` semantics —
|
|
204
|
+
untracked files count, git-ignored files do not), both outside `tldrx-work/` and `.tldrx/`,
|
|
205
|
+
which a `root_is_repo` worktree carries and the framework writes during the turn. Uncommitted
|
|
206
|
+
work counts on purpose: the normal path already takes a dirty tree into the DoD and commits it
|
|
207
|
+
afterwards (`runDod` runs before `commitIfDirty`), and the incident's likeliest shape is a
|
|
208
|
+
developer refused while VERIFYING that never reaches its commit. An empty commit, an untouched
|
|
209
|
+
tree, a turn that wrote only framework state and a turn that wrote only an ignored file all
|
|
210
|
+
still block with #261's exact wording after one attempt. With work the refusal is RECORDED and
|
|
211
|
+
the Definition of Done decides: green, and the story goes on to review with the refused command
|
|
212
|
+
named on its review log (`- Developer: … was refused for approval …`), on `task.done` as an
|
|
213
|
+
additive `permission_refused`, and in the handoff's `## Unknowns`; red, and the story blocks
|
|
214
|
+
with BOTH reasons on one row, the DoD's first. Not blocking never means not recording, and a
|
|
215
|
+
refusal is its own story's and its own attempt's only. The spawned developer prompt also gains
|
|
216
|
+
one rule beside "Done means proven": run each DoD command verbatim and alone, with the
|
|
217
|
+
mechanism stated — `>`, `>>`, `2>&1`, `<`, `|`, `;`, `&&`, `||`, `&`, `$()` split a line into
|
|
218
|
+
subcommands and each must match its own grant, so a compound line is refused even when the
|
|
219
|
+
script is allowed — and that the facilitator re-runs the DoD anyway. That sentence moves the
|
|
220
|
+
frozen developer prompt in `test/build-golden.test.ts` by exactly those lines in six prompt
|
|
221
|
+
files; events, `run.yml` rows and exit codes are byte-identical. Pinned by nine tests: refusal
|
|
222
|
+
after a commit + green DoD → `check.*` ran, `done`, recorded on all three surfaces; uncommitted
|
|
223
|
+
work + green DoD → measured, committed by the facilitator, landed; + red DoD → `blocked` with
|
|
224
|
+
both reasons; empty commit, state-dir-only and ignored-file-only → `blocked: permission — …`
|
|
225
|
+
with no DoD spent, one spawn; two stories with the refusal on one → the other's record clean;
|
|
226
|
+
refused on attempt 1 and clean on attempt 2 → attempt 2's record clean; and the prompt sentence
|
|
227
|
+
once, in `## Rules`. Mutations, each measured: dropping the comparison (every refusal
|
|
228
|
+
continues) reddens #261's own test and the empty-commit, state-only and ignored-only cases; a
|
|
229
|
+
`headSha !== since` proxy reddens the uncommitted and empty-commit cases; dropping the dirty
|
|
230
|
+
half reddens the uncommitted case; dropping the state-dir exclusions reddens state-only;
|
|
231
|
+
counting ignored files (`git status --ignored`) reddens state-only and ignored-only; removing
|
|
232
|
+
the per-attempt reset reddens the attempt-2 case.
|
|
233
|
+
- **The headless refusal under a `host-tokens` ceiling now writes its `budget.blocked` — it was
|
|
234
|
+
the one money-family exit 2 the ledger could not see (#266).** Measured 2026-09-12 on
|
|
235
|
+
`runNext.ts`: `budgetRefusal` and `hostTokensNote` both append a `budget.blocked` before
|
|
236
|
+
returning exit 2; `economyRefusal` — the §E.2 gate that refuses a headless spawn on a phase
|
|
237
|
+
priced in host tokens — returned the same exit with only its CLI lines and no
|
|
238
|
+
`store.append` at all. The `--until-done` supervisor (#252) keys its money guard on a
|
|
239
|
+
`budget.blocked` among the attempt's fresh events, so a refusal that wrote nothing read as
|
|
240
|
+
"a refusal with no money behind it" and was relaunched into the same refusal — harmless to
|
|
241
|
+
the wallet, since the gate fires before any spawn, but a relaunch that could never do
|
|
242
|
+
anything, and a run whose own audit trail never states why it stopped (the same
|
|
243
|
+
blind-instrument shape as #248). The gate now appends one row of the `hostTokensNote` shape
|
|
244
|
+
(`phase`, `economy: host-tokens`, `ceiling_tokens`, a `reason` naming the headless
|
|
245
|
+
invocation) before the exit; the refusal text is byte-for-byte what it was. Pinned by a
|
|
246
|
+
headless run on a host-tokens phase → exit 2 AND exactly one `budget.blocked` on the ledger,
|
|
247
|
+
with `stage.started` still at zero (the row records a refusal, not a stage); removing the
|
|
248
|
+
append reddens exactly that test.
|
|
249
|
+
- **A Plan that priced its stories in a shape nothing reads is refused at the Plan gate, and the
|
|
250
|
+
Plan agent is now told the shape (#264).** Measured on a field run: `03-plan/budget.yml` carried
|
|
251
|
+
`ceiling_usd: 108`, a `stories:` list with an `estimate_usd` and a `why` per story, and
|
|
252
|
+
`total_estimate_usd: 111` — priced, sourced, and unreadable. The only reader, `loadPlanPrices`,
|
|
253
|
+
accepts `validateBudget`'s shape (`run`, `ceiling_usd`, `spent_usd`, `per_phase_usd`) and prices
|
|
254
|
+
only the `per_phase_usd` keys that are story ids, so the file failed validation before the map was
|
|
255
|
+
ever looked for and every story got the uniform cap: $5.40 for the story the plan had priced at
|
|
256
|
+
$28, about a quarter of what the reader's own arithmetic would have handed it. Nothing could have
|
|
257
|
+
gone otherwise — the Plan prompt named `budget.yml` as a filename and never its shape,
|
|
258
|
+
`validatePlan` had zero references to the file, and the one string that named the problem
|
|
259
|
+
(`priceIssue`) was computed at Build time and read by nothing. Two halves. The `## Output
|
|
260
|
+
schemas` section the Plan agent reads carries a fourth artefact, GENERATED like the other three:
|
|
261
|
+
its rule table from `BUDGET_REQUIRED_KEYS`, the list `validateBudget` itself enforces, and its
|
|
262
|
+
example run through that validator by the test that pins the contract — and `tldrx plan schema
|
|
263
|
+
--budget` prints it for a person. And the `plan` check runs `validateBudget` over
|
|
264
|
+
`03-plan/budget.yml` at the gate when the file exists, naming the file and every missing key
|
|
265
|
+
(`budget.yml spent_usd: missing required key \`spent_usd\``), so the shape is refused where it
|
|
266
|
+
costs nothing instead of pricing nothing one stage later. The file stays optional; only its shape
|
|
267
|
+
is not. The Build loader is untouched on purpose: it refuses to load on any `validatePlan` issue,
|
|
268
|
+
and the spec's rule for an invalid budget at Build time — an advisory and the uniform split, never
|
|
269
|
+
a refused build — is what a file edited after its gate still gets, which is why the budget check
|
|
270
|
+
is the gate's own function and not a fourth pass inside `validatePlan` (a guard test pins that
|
|
271
|
+
`validatePlan` does not learn it).
|
|
272
|
+
|
|
3
273
|
## 0.18.0 — 2026-09-13
|
|
4
274
|
|
|
5
275
|
### Added
|
package/README.md
CHANGED
|
@@ -41,6 +41,21 @@ tldrx run new payments --scope feature --seed docs/payments/ --budget 25
|
|
|
41
41
|
tldrx run auto # `next`, over and over, until something actually needs you
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
Or hand a small, well-seeded change to the engine with nobody watching — measured once: a one-story
|
|
45
|
+
bugfix went from seed to merged PR in 45 minutes with no human input:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
tldrx run new login-timeout --scope bugfix --seed .tldrx/seeds/01-login-timeout.md \
|
|
49
|
+
--gates none --questions none --ship pr --budget 40
|
|
50
|
+
nohup tldrx run auto --run <id> --until-done --max-usd 40 \
|
|
51
|
+
--wait-answers 8h --wait-gates 8h --notify-every 30m --ui plain > /tmp/<id>.log 2>&1 &
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`--gates none` lets every gate sign itself, `--questions none` lets the loop take each question's own
|
|
55
|
+
`Recommended:` pick, `--ship pr` opens the PR when the run is done. What each flag means, how to write
|
|
56
|
+
the seed, how to check on it and how to stop it:
|
|
57
|
+
[Zero-touch run, start to finish](https://ederwii.github.io/tldr-experts/guides/unattended-operation#zero-touch-run-start-to-finish).
|
|
58
|
+
|
|
44
59
|
**To run it: Node ≥ 20, and nothing else** — the published package is a pre-built bundle with
|
|
45
60
|
zero runtime dependencies, and `dist/` is a Node bundle (Bun runs it too, if you have it).
|
|
46
61
|
**To build or contribute: Bun ≥ 1.3**, which compiles that bundle and runs the test suite.
|
|
@@ -316,6 +331,8 @@ back on the registry is 0.3.0.
|
|
|
316
331
|
|
|
317
332
|
| Version | Date | Status | Contains |
|
|
318
333
|
|---|---|---|---|
|
|
334
|
+
| 0.18.2 | 2026-09-13 | `beta` | three things measured on the first fully unattended run and on the live runs that followed it, one of them a regression 0.18.1 shipped hours earlier: `--ship merge` armed GitHub's auto-merge over a base that required nothing — the guard counted the checks the PR REPORTED while `--auto` waits on the base's REQUIREMENTS, so a proof run's pull request merged at 06:20:14 while all four of its checks finished between 06:21:38 and 06:24:56, and the record said `queued — GitHub merges when its checks pass`; ship now asks the base what it requires through rulesets and classic protection, names its three absences apart, and every unreadable answer arms nothing; the plan's per-story price had become a hard wall at 0.8x the planner's guess once 0.18.1 made those fields actually read, killing stories mid-flight at $1.28 and $3.25 against real costs an order of magnitude higher, so the ceiling is now `max(price x 3, $4.00)` derived at DISPATCH from the budget as it sits on disk — a run already in flight is covered without migrating anything — and, the half that carries the expensive end, a developer that dies on its cap with work in its tree commits it and lets the Definition of Done decide instead of parking the story, the same authority #271 gave a refused one; and the zero-touch recipe is written down where a person looks for it, seed file to backgrounded loop, on the README quick start and both documentation sites, with the honest boundary that this is the happy path without a person |
|
|
335
|
+
| 0.18.1 | 2026-09-13 | `beta` | five things a run could not survive on its own, every one measured on the unattended proof runs that followed 0.18.0 rather than reasoned about: a priced plan was never priced — the planner wrote `stories[].estimate_usd` and Build read only `per_phase_usd` + `spent_usd`, so every story got the same $5.40 cap while the plan said $28, and the contract now names the shape and the plan check refuses a budget.yml that does not carry it; a headless refusal under a host-tokens ceiling wrote nothing to the ledger, so `--until-done` relaunched over a refusal it could not see, and now writes its `budget.blocked` first; a developer that had committed its work and was then refused a compound verification command was blocked BEFORE the facilitator ran the Definition of Done, so the DoD now decides when there is work and the refusal is recorded either way, with the prompt saying to run each DoD command verbatim and alone because shell separators split a line into subcommands that each need their own grant; a workspace can declare `<slot>_scoped` DoD commands that run per story on the paths it touched with the full suite once per epic head, after the full suite was measured running three times per story attempt; and a cancelled run no longer leaves an epic branch that refuses the ordinary retry — `run cancel` releases it and Build renames aside an epic whose owner run is closed, while an open or unknown owner still refuses verbatim and an uncounted branch is never deleted |
|
|
319
336
|
| 0.18.0 | 2026-09-13 | `beta` | the release that lets an unattended run survive its own accidents and end somewhere, every item measured on live runs at 0.16.1 rather than reasoned about: a turn that wrote a lot of files could not be RECORDED — an `agent.result` whose `outputs` field held 3924 bytes of run-relative paths blew the 4096-byte event cap through a RAW append that never reached the capped seam, the throw landed one line after the try/catch built for exactly this and came out as exit 1, which `--retry-failed` does not retry since its branch keys on exit 5, so a loop told to survive two failures survived zero, and the epic branch had been cut on disk one line before the throw with the save after it, leaving the relaunch to read its own epic as a stranger's; `outputs` is now named by COUNT with the full list written beside the event rather than truncated, all four raw appends route through the capped seam at module scope, a throw while recording fails the STAGE with exit 5 saying how many of how many rows landed, the claim is saved the moment it is earned, and `capPayload` still knows its two fields BY NAME — a third growable field has to be taught to it deliberately or it is refused whole; Build entry now proves the Definition of Done can run IN A WORKTREE before a developer is paid, after 18 h from `run auto` to the first story that could run on one workspace, five relaunches, because the repo's `install:` named a file that existed in the human's checkout and was never committed and `git worktree` carries TRACKED FILES ONLY, so every story failed identically after the story was opened and immediately before the paid turn while the base pre-flight was green and right to be, measuring in the checkout where the file is — one throwaway worktree at the base sha, the install run inside it, each DoD command's first token resolved there, NEVER the suite, refusal exit 2 naming the exact path or binary, cached under an additive `worktree:` key narrowed by base sha, declaration hash and AGE (six hours for a green, because the row is a claim about an ENVIRONMENT that no sha contains; the base red's 30 minutes for a red), and costing zero where it could learn nothing; where the two readings could not be told apart it deliberately refuses LESS — a path named by a `dod` command after the first may be an artefact an earlier one builds, so that is an advisory and not a verdict; one blocked story no longer stops every later wave, after a loop told to build 8 stories built 5, never started 3, and reported the stage `done`, twice on the same run, because the parallel path asked only "did any story block" and `depends_on` appeared ZERO times in the Build executor — a story now runs when every one of its `depends_on` is `done`, one held back is `blocked` WITH the reason `dependency S7 blocked` (transitive for free) which is what the gate's `blocked_reason` and the continue note read, the stage line counts every story `waves.yml` scheduled rather than the rows the executor happened to hold, and a scheduled story with no outcome at all is named in `## Unknowns` instead of dropped, while `--parallel 1` is untouched on purpose — a story whose dependency blocked is still attempted there, and changing that would be a second change in the opposite direction; the spawned developer can now delete and rename paths in its own tree, after a story that was simply "delete an unused file" proved undoable — nothing in the allowance could unlink a path or take it out of the index, so every `git rm` came back needing approval nobody was there to give, the refused turn exited 0 with an envelope, the DoD ran green on an untouched tree and the reviewer faulted a diff that was never written, twice — the file-lifecycle git verbs are granted as index operations on the story's OWN tree (never a bare `rm`, `git push` still asserted absent), and a tool call refused for approval now BLOCKS the story at once with the command and why, reaching the story file, the handoff and the gate, so the next missing verb costs one attempt instead of two and nothing; that detector reads a structural field first and the English refusal sentence only as a fenced fallback, because pre-merge review measured the unfenced version reading a plain file-read of a document CONTAINING the phrase as a refusal — this very CHANGELOG is one of them — and a refusal carrying neither signal is a miss taken on purpose, with the sentence half depending on prose the host can change without notice; a fix-list finding now declares what it IS, after three stories with a green definition of done, a merged commit and an APPROVING reviewer settled `blocked`, each on a `fix-now` finding whose whole content was a stale docstring or a citation that did not resolve — the reviewer was not wrong and `severity` was never the vehicle (a free string NO consumer read, one render site under `src`), so a required `kind` splits behaviour from text: `correctness` and `security` hold the story exactly as before, a `docs`/`style` finding submitted `fix-now` is routed to `defer-with-log` with a `Normalised-from:` line, and because this makes a gate WEAKER on purpose the unblocking is priced — declaring a finding `docs` costs the SAME `[src: …]` citation that refuting one already costs, a `kind` that is absent or outside the enum is refused for free and indexed as a fault so it costs the story no attempt, a fix list already on disk with no `Kind:` line reads as not stated and not stated blocks, and the four reviewer-prompt goldens MOVED because the schema alone would have left a reviewer nobody told about the field; `run.yml` can finally explain its own `cost_usd` — a row read `input_tokens: 84, output_tokens: 37150, cost_usd: 1.98` for a 124 KB prompt while the provider reported 4,911,750 cache reads for that same turn, and across 101 transcripts in one workspace cache reads were 97.3% of the input side against a column that saw 0.002% of it — the counters were parsed on every turn and thrown away one function later, and the half the issue did not know about is that the executor path's `agent.result` emitted NO `usage` at all, so every Build and Watch turn lost all four counters and the whole Build was priced off zeroes (measured: zero `usage` lines across the four frozen goldens with ten `agent.result` among them); they are recorded additively and gated one at a time rather than both-or-nothing, `turnTokens` names them while deliberately reading neither so the exclusion is a decision on the record, nothing displayed changed — the dashboard and `tldrx cost` are byte-identical — and a row from before this reads absent, since nothing reconstructs a counter nobody wrote down; a gate about to sign itself is no longer sent as a Yes/No the owner cannot answer, after 3 of 3 questioned stages on two live workspaces sent the prompt 600 ms after the last answer and self-signed on the very next poll, so the one tap it invited ran `approve` on an already-approved gate and, because the in-wait approval fell between two notify windows, the bridge kept the prompt open and re-mentioned its owner every escalate tick for two hours — the release now asks the gate's CONDITIONS through the same re-evaluation the poll uses, extracted so neither can form a second opinion, sends nothing when there is no decision to take and says which stage and why on stdout instead of going quiet, and words a genuinely held gate from that one reading so a payload can no longer name four open questions beside `holding: "none"`; and three things a run could not do before: it can end in a pull request toward main on purpose, frozen at `run new --ship` with `push`, `pr` or `merge` into an additive `run.yml` block and not a sixth phase, pushed through the ONE push wrapper in the codebase with a PR that reports NO check left open and recorded as `merge: absent — no checks to wait on` because auto-merge over nothing to wait on is a merge now rather than a merge when green — pre-merge review caught the first version erasing a recorded merge failure with an empty string and exit 0, and the emitter dropped the whole block until it was taught the key; `questions_policy: recommended` answers a blocking question that carries its own `Recommended:` line and escalates the ones that do not, after 10 owner questions across two headless runs ($89.82 over 28 h and $26.38 over 5.6 h, the agents busy 4.9 h and 56 min of it) parked the loop on 9 that already held the pick in a parsed field, writing `decided_by: agent-default` as a THIRD value beside owner and driver because `owner` there would be an audit record lying in the dangerous direction, and never inventing a pick — no line, a letter naming no option, or a block marked irreversible or money escalates exactly as before; and `run auto --until-done [<n>]` relaunches the loop in-process after an exit it can do nothing else with, at most `n` times (default 5), after five hand relaunches and 18 h before a story ran — never over a person's exit 4, never over a budget block since nothing in-process moves a ceiling, never twice over the same last line, with the run id and the spend baseline pinned across relaunches so `--max-usd` still describes the one command a person typed; the epic-claim-at-cut half of that issue lives in the Build executor and is NOT fixed here |
|
|
320
337
|
| 0.17.0 | 2026-09-12 | `beta` | three things the framework knew and recorded wrongly, each found by reading its own records rather than by using it: a gate notification now carries the condition HOLDING the gate as data instead of leaving it to be guessed from the text of the command it suggests — `holding` says questions, stories or nothing-mechanical, and when a story is blocked with a recorded reason the payload also hands over a ready-made rejection that lets the loop carry on, with the note DERIVED from the blocked story rather than canned, because a rejection's note is fed to the next turn's prompt and a generic one would hand that turn an empty instruction, so when no reason can be derived the offer is absent rather than invented; the emitted command keeps a literal placeholder and never interpolates the reason, which keeps the quoting hazard out of the record and puts it where a substituting client can see it; `run status` stopped printing more money left than it had ceiling — the run ceiling now has ONE live copy, read from `budget.yml` by every live screen, and `run.yml`'s mirror is documented as the creation value and no longer written by a raise, since the break was never that a raise failed to write the mirror but that an ordinary concurrent save carried a stale copy over it, and the fix was to delete the half-sync rather than to build a better one — pre-merge review caught the first version pairing a LIVE spend with that now-frozen ceiling inside `tldrx replay`, which would have reproduced the same impossible line in a different command on every run whose budget had been raised, measured on the real CLI as `$12.00 spent of $10.00 ceiling` with no concurrency required; and a task row now records the ROLE its turn actually ran under, where every Build turn had been filed as the developer including the reviewer's — the role was known at spawn and written to the event stream, and was dropped on the way to the ledger, so the audit record named the wrong actor for work it had itself measured; the new key is additive and written on EVERY row including the developer's, because a role present only on reviewers would make its absence mean developer-or-not-recorded and send a reader back to inferring the role from an absence, which is the guess the change exists to remove |
|
|
321
338
|
| 0.16.1 | 2026-09-12 | `beta` | five things the framework knew and did not say, or said wrong — four of them found by using it rather than by reading it: a red base pre-flight now KEEPS its output, so a refusal that blocks every story in a Build names the failing test and cites the file, where it used to record only the last line of stdout — measured 2026-09-10, a stage refused with `tail: "Test run completed with non-success exit code: 2"` while the cause, `DockerUnavailableException`, sat on line 12 of 163,702 lines the run had already captured and thrown away, so diagnosing a refusal the framework had itself measured meant re-running the workspace's test command by hand; it now routes through the same seam #211 built for a story's DoD, which had been naming its failing test correctly all along on the same command, the same day, in the same repo — the path with the SMALLER blast radius was the legible one; a gate notification now offers the command that CLEARS it rather than always `tldrx approve` — questions open give `tldrx answer <id>`, unfinished stories give `tldrx run status`, and `approve` is offered only when nothing mechanical is outstanding, after an owner approved a Build gate by mistake twice in one evening over unbuilt stories, each time from a phone, each time needing a revoke, while a ten-minute heartbeat repeated `Run: tldrx approve` seven times under a sentence that correctly named the five open questions holding it; `tldrx reject --and-continue` lets a rejection mean "redo it this way and carry on" instead of ending the run — the loop resumed after an approve and stopped after a reject, so the button meaning "there is still work to do" was the one that stopped the work and only a terminal could revive it; five real rejections that night all meant continue, five cost a manual relaunch, and a bare `tldrx reject` still writes a byte-identical `run.yml` and stops exactly as before; the expert-recompute fixture anchors its evidence dates to a `now` it can move, so `bun test` stops going red by the calendar — pristine `main` was red at the exact sha of the published 0.16.0 with no commit in between, and a clock moved one year forward reddened FIVE cases, not the one that had already fired; and `test/merge-wave.test.ts`'s concurrency failure, documented as a known flake since #115 and carrying a written licence to re-run it, was never one: `merge-guard.sh` rewrote `.git/hooks/reference-transaction` IN PLACE while a sibling wave's `git merge` was exec'ing it — ETXTBSY on Linux at 31% under contention, benign on macOS, which is why it was green locally and red in CI, and why a same-sha re-run failed 2 for 2 rather than passing; the hook is now written to a temp file and RENAMED into place, the refusal that used to borrow `2`/`merge conflict` for a hook abort now says what it was and exits 11, and AGENTS.md §4 withdraws the re-run licence for those two cases while naming the interrupted-merge case (#237) as still open and undiagnosed — because "all real" for a whole file costs the same as "all flake", in the other direction |
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
conflictOf
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-nf2j945p.js";
|
|
5
5
|
import {
|
|
6
6
|
FactsStore,
|
|
7
7
|
formatJaccard
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-kwaqdq9w.js";
|
|
9
9
|
import {
|
|
10
10
|
parseHookInput,
|
|
11
11
|
readStdin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-pday823f.js";
|
|
13
13
|
import {
|
|
14
14
|
EventLog,
|
|
15
15
|
PHASE_ID_RE
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-gx6qa496.js";
|
|
17
17
|
import {
|
|
18
18
|
PHASE_IDS
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import"./chunk-
|
|
21
|
-
import"./chunk-
|
|
19
|
+
} from "./chunk-x00a2vaz.js";
|
|
20
|
+
import"./chunk-4y3pk4n2.js";
|
|
21
|
+
import"./chunk-vf992pfw.js";
|
|
22
22
|
import {
|
|
23
23
|
ADVISORY_KEY,
|
|
24
24
|
MAX_FACT_CHARS,
|
|
@@ -28,15 +28,17 @@ import {
|
|
|
28
28
|
renderQuestionBlock,
|
|
29
29
|
replaceBlock,
|
|
30
30
|
serializeQuestions
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-8ak5kwd5.js";
|
|
32
32
|
import {
|
|
33
33
|
ITERATION_ONLY_SLOT,
|
|
34
34
|
PROJECT_FRAMEWORK_DIR,
|
|
35
35
|
PROJECT_WORK_DIR,
|
|
36
36
|
commandProbeIssues,
|
|
37
37
|
factsPath,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
isScopedTemplate,
|
|
39
|
+
parseYaml,
|
|
40
|
+
scopedSlotOf
|
|
41
|
+
} from "./chunk-c1h38et6.js";
|
|
40
42
|
|
|
41
43
|
// src/hooks/answer-capture.ts
|
|
42
44
|
import { existsSync as existsSync5 } from "fs";
|
|
@@ -151,6 +153,8 @@ function loadWorkspace(root) {
|
|
|
151
153
|
const commandRoles = new Map;
|
|
152
154
|
const commandProbes = new Map;
|
|
153
155
|
const iterationCommands = new Set;
|
|
156
|
+
const scopedCommands = new Map;
|
|
157
|
+
const scopedTemplates = new Set;
|
|
154
158
|
const defaultBranches = new Map;
|
|
155
159
|
let seedTriageThresholdTokens = null;
|
|
156
160
|
const empty = () => ({
|
|
@@ -161,6 +165,8 @@ function loadWorkspace(root) {
|
|
|
161
165
|
commandRoles,
|
|
162
166
|
commandProbes,
|
|
163
167
|
iterationCommands,
|
|
168
|
+
scopedCommands,
|
|
169
|
+
scopedTemplates,
|
|
164
170
|
defaultBranches,
|
|
165
171
|
seedTriageThresholdTokens
|
|
166
172
|
});
|
|
@@ -192,13 +198,24 @@ function loadWorkspace(root) {
|
|
|
192
198
|
defaultBranches.set(entry.name, typeof entry.default_branch === "string" && entry.default_branch !== "" ? entry.default_branch : FALLBACK_DEFAULT_BRANCH);
|
|
193
199
|
const own = [];
|
|
194
200
|
const roles = declared.get(entry.name) ?? new Map;
|
|
195
|
-
|
|
201
|
+
const scoped = new Map;
|
|
202
|
+
for (const [role, value] of roles) {
|
|
203
|
+
const base = scopedSlotOf(role);
|
|
204
|
+
if (base !== null) {
|
|
205
|
+
const full = roles.get(base);
|
|
206
|
+
if (full !== undefined && scopedSlotOf(base) === null && isScopedTemplate(value)) {
|
|
207
|
+
scoped.set(full, value);
|
|
208
|
+
scopedTemplates.add(value);
|
|
209
|
+
}
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
196
212
|
commands.add(value);
|
|
197
213
|
if (!own.includes(value))
|
|
198
214
|
own.push(value);
|
|
199
215
|
}
|
|
200
216
|
repoCommands.set(entry.name, own);
|
|
201
217
|
commandRoles.set(entry.name, roles);
|
|
218
|
+
scopedCommands.set(entry.name, scoped);
|
|
202
219
|
const fast = roles.get(ITERATION_ONLY_SLOT);
|
|
203
220
|
if (fast !== undefined)
|
|
204
221
|
iterationCommands.add(fast);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
budgetGateDeny
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2caxb41h.js";
|
|
5
5
|
import {
|
|
6
6
|
allow,
|
|
7
7
|
deny,
|
|
8
8
|
readPayload,
|
|
9
9
|
runHook,
|
|
10
10
|
toolInput
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import"./chunk-
|
|
11
|
+
} from "./chunk-2ym87z6d.js";
|
|
12
|
+
import"./chunk-pday823f.js";
|
|
13
13
|
import {
|
|
14
14
|
asRunBudget,
|
|
15
15
|
currentActor,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
validateRunBudget,
|
|
23
23
|
wouldExceed,
|
|
24
24
|
wouldExceedHostTokens
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-wx1jce1t.js";
|
|
26
26
|
import {
|
|
27
27
|
EventLog
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-gx6qa496.js";
|
|
29
29
|
import {
|
|
30
30
|
cursorStage,
|
|
31
31
|
hostTokensIn,
|
|
@@ -34,18 +34,18 @@ import {
|
|
|
34
34
|
newestActiveRun,
|
|
35
35
|
renderRunEconomies,
|
|
36
36
|
runSpend
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import"./chunk-
|
|
37
|
+
} from "./chunk-hwsng0xq.js";
|
|
38
|
+
import"./chunk-4y3pk4n2.js";
|
|
39
39
|
import {
|
|
40
40
|
noteDeprecations
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-8ak5kwd5.js";
|
|
42
42
|
import {
|
|
43
43
|
PROJECT_WORK_DIR,
|
|
44
44
|
findWorkspaceRoot,
|
|
45
45
|
locateWork,
|
|
46
46
|
parseYaml,
|
|
47
47
|
stageYamlPath
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-c1h38et6.js";
|
|
49
49
|
|
|
50
50
|
// src/hooks/budget-gate.ts
|
|
51
51
|
import { existsSync as existsSync2, readFileSync as readFileSync2, statSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EMPTY_SECTION_RULE,
|
|
4
4
|
noneBullet,
|
|
5
5
|
srcRule
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-c1h38et6.js";
|
|
7
7
|
|
|
8
8
|
// src/hooks/lib/messages.ts
|
|
9
9
|
var GRAMMAR = "[src: <repo:path:line> | https://… | Q<n> | F<n> | $ <cmd> → exit <n> | graph:<node> | absent:<path>]";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isRecord
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-c1h38et6.js";
|
|
4
4
|
|
|
5
5
|
// src/core/run/stagePolicy.ts
|
|
6
6
|
function validateStagePolicy(value, stageIds, issues, spec) {
|
|
@@ -66,13 +66,17 @@ var STAGE_TUNING_DEFAULTS = {
|
|
|
66
66
|
attempts: 2,
|
|
67
67
|
fixlistRounds: 1,
|
|
68
68
|
reviewerShare: 0.25,
|
|
69
|
-
gateSignerShare: 0.25
|
|
69
|
+
gateSignerShare: 0.25,
|
|
70
|
+
storyCapMultiplier: 3,
|
|
71
|
+
storyCapFloorUsd: 4
|
|
70
72
|
};
|
|
71
73
|
var STAGE_TUNING_RANGES = {
|
|
72
74
|
attempts: { key: "attempts", min: 1, max: 5, integer: true },
|
|
73
75
|
fixlistRounds: { key: "fixlist_rounds", min: 0, max: 3, integer: true },
|
|
74
76
|
reviewerShare: { key: "reviewer_share", min: 0, max: 1, integer: false },
|
|
75
|
-
gateSignerShare: { key: "gate_signer_share", min: 0, max: 1, integer: false }
|
|
77
|
+
gateSignerShare: { key: "gate_signer_share", min: 0, max: 1, integer: false },
|
|
78
|
+
storyCapMultiplier: { key: "story_cap_multiplier", min: 1, max: 20, integer: false },
|
|
79
|
+
storyCapFloorUsd: { key: "story_cap_floor_usd", min: 0, max: 200, integer: false }
|
|
76
80
|
};
|
|
77
81
|
var FIELDS = Object.keys(STAGE_TUNING_RANGES);
|
|
78
82
|
function inTuningRange(range, value) {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
spentBasis,
|
|
9
9
|
tallyOf,
|
|
10
10
|
validateRunBudget
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-wx1jce1t.js";
|
|
12
12
|
import {
|
|
13
13
|
EventLog,
|
|
14
14
|
OUTCOME_NOT_RECORDED,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
isTerminal,
|
|
22
22
|
stageAt,
|
|
23
23
|
validateRunFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-gx6qa496.js";
|
|
25
25
|
import {
|
|
26
26
|
cursorStage,
|
|
27
27
|
isAttendedByHostView,
|
|
28
28
|
openRunViews
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-hwsng0xq.js";
|
|
30
30
|
import {
|
|
31
31
|
backupPathFor,
|
|
32
32
|
isAlive,
|
|
@@ -35,20 +35,20 @@ import {
|
|
|
35
35
|
workspaceRootOfRunDir,
|
|
36
36
|
writeAtomic,
|
|
37
37
|
yamlScalar
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-vf992pfw.js";
|
|
39
39
|
import {
|
|
40
40
|
isAdvisory,
|
|
41
41
|
noteDeprecations,
|
|
42
42
|
openBlocks,
|
|
43
43
|
parseQuestions
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-8ak5kwd5.js";
|
|
45
45
|
import {
|
|
46
46
|
FRAMEWORK_ROOT,
|
|
47
47
|
PLAN_STATUSES,
|
|
48
48
|
listRunDirs,
|
|
49
49
|
parseYaml,
|
|
50
50
|
parseYamlRepairing
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-c1h38et6.js";
|
|
52
52
|
|
|
53
53
|
// src/core/statusline/runSnapshot.ts
|
|
54
54
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
@@ -78,6 +78,20 @@ function frameworkVersionSync() {
|
|
|
78
78
|
function inlineList(values) {
|
|
79
79
|
return `[${values.map((v) => yamlScalar(v)).join(", ")}]`;
|
|
80
80
|
}
|
|
81
|
+
function epicRelease(row) {
|
|
82
|
+
const parts = [
|
|
83
|
+
`branch: ${yamlScalar(row.branch)}`,
|
|
84
|
+
`repo: ${yamlScalar(row.repo)}`,
|
|
85
|
+
`outcome: ${yamlScalar(row.outcome)}`,
|
|
86
|
+
...row.renamed_to === undefined ? [] : [`renamed_to: ${yamlScalar(row.renamed_to)}`],
|
|
87
|
+
`commits: ${String(row.commits)}`,
|
|
88
|
+
`base: ${yamlScalar(row.base)}`,
|
|
89
|
+
`via: ${yamlScalar(row.via)}`,
|
|
90
|
+
`at: ${yamlScalar(row.at)}`,
|
|
91
|
+
`reason: ${yamlScalar(row.reason)}`
|
|
92
|
+
];
|
|
93
|
+
return `{${parts.join(", ")}}`;
|
|
94
|
+
}
|
|
81
95
|
function money(n) {
|
|
82
96
|
return n.toFixed(2);
|
|
83
97
|
}
|
|
@@ -174,7 +188,8 @@ function emitRunYaml(run) {
|
|
|
174
188
|
}
|
|
175
189
|
if (run.build !== undefined && run.build.epic_branch.length > 0) {
|
|
176
190
|
const model = run.build.branch_model === undefined ? "" : `, branch_model: ${yamlScalar(run.build.branch_model)}`;
|
|
177
|
-
|
|
191
|
+
const released = run.build.epic_released === undefined || run.build.epic_released.length === 0 ? "" : `, epic_released: [${run.build.epic_released.map(epicRelease).join(", ")}]`;
|
|
192
|
+
lines.push(`build: {epic_branch: ${inlineList(run.build.epic_branch)}${model}${released}}`);
|
|
178
193
|
}
|
|
179
194
|
if (run.cancelled !== undefined) {
|
|
180
195
|
lines.push(`cancelled: {by: ${yamlScalar(run.cancelled.by)}, at: ${yamlScalar(run.cancelled.at)}, ` + `note: ${yamlScalar(run.cancelled.note)}}`);
|