@dialecte/cli 0.5.0 → 0.6.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/README.md +221 -27
- package/dist/cli.js +25294 -21660
- package/dist/lookups.d.ts +13 -7
- package/dist/lookups.js +1929 -1176
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ shape. Exit codes: 0 an answer or green, 1 nothing found or a failed check,
|
|
|
25
25
|
2 usage or refused; a command's help says when it differs.
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
Discover api members schema explain standard
|
|
28
|
+
Discover api members schema explain standard facts
|
|
29
29
|
Use run fixture new
|
|
30
30
|
Grow lot
|
|
31
31
|
Plan plan
|
|
@@ -41,11 +41,12 @@ dialecte members <expr> # what an expression of the live types holds
|
|
|
41
41
|
dialecte schema <Tag> # what an element may hold and where
|
|
42
42
|
dialecte explain <code> # what an error or diagnostic code means, when it is raised, the usual fix
|
|
43
43
|
dialecte standard index|find|show|eval # index and search the standards kept on this machine, outside every repository
|
|
44
|
+
dialecte facts list|show|forget # the facts recorded in your data folder: their state now, their history; forget one
|
|
44
45
|
dialecte run <script.ts> # run a script on an in-memory project of the installed dialecte: one structured outcome
|
|
45
46
|
dialecte fixture <Tag> # the smallest valid XML document holding an element, built by the dialecte's engine
|
|
46
47
|
dialecte new verb <namespace> <query|transaction> <name>
|
|
47
48
|
dialecte lot start <brief.json> # a lot from its brief: the lot folder in the store, the numbered worktree, .dialecte/lot
|
|
48
|
-
dialecte lot status <id> # its state derived from the records, the checks, the exact
|
|
49
|
+
dialecte lot status <id> # its state derived from the records, the checks, the next station and its exact command; reads only
|
|
49
50
|
dialecte lot wait <id> [--timeout <seconds>] # until the lot needs someone: ready, a question, failed, a limit
|
|
50
51
|
dialecte lot answer <id> <question> "<answer>" [--by <who>] # answer an open question of the lot, once
|
|
51
52
|
dialecte lot result <id> # the hand-over (card, show and run lines) of a ready lot, or why it stopped; writes nothing
|
|
@@ -53,7 +54,7 @@ dialecte lot stop <id> --reason <text> # end the lot: its pending hand-over ab
|
|
|
53
54
|
dialecte inbox # what waits on someone across every lot store: questions, ready hand-overs, failed lots
|
|
54
55
|
dialecte plan next|check|mark <plan.md> # what can start now in a plan's lot block; the block checked; a person's mark
|
|
55
56
|
dialecte lot exempt|accept|revised|gone|mutation # the lot declaration .dialecte/lot.json
|
|
56
|
-
dialecte lot finding|decide|snapshot|choice|standard <id|folder> ... # a lot's review rounds, in its lot or hand-over folder
|
|
57
|
+
dialecte lot finding|decide|snapshot|choice|standard|verify <id|folder> ... # a lot's review rounds and late fixes, in its lot or hand-over folder
|
|
57
58
|
dialecte lot delta <id|folder> --round <n> # the fix diff since round n-1; --worktree: the old code to run a test on
|
|
58
59
|
dialecte lot recap <id|folder> # the pull request's expandable part, built from the hand-over's records only
|
|
59
60
|
dialecte lot close <name|index> # a finished lot: node_modules to the pool, its worktree to the trash
|
|
@@ -150,10 +151,15 @@ Every Dialecte package ships the agent skills that describe it in `skills/<name>
|
|
|
150
151
|
- **Session-start check, every agent**: when `dialecte-lot` is installed by the sync (whatever the targets),
|
|
151
152
|
`skills sync` writes a section in the project's root `AGENTS.md`, between `<!-- dialecte-skills:session-check -->`
|
|
152
153
|
and `<!-- /dialecte-skills:session-check -->`, telling the agent to run `npx --no-install @dialecte/cli doctor --brief`
|
|
153
|
-
at a session start. It is
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
at a session start. It is written with a blank line inside each marker, the form a markdown formatter keeps, so a
|
|
155
|
+
formatted `AGENTS.md` stays formatted. An existing `AGENTS.md` gets it appended after one blank line; the body
|
|
156
|
+
between the markers is compared tolerantly (whitespace does not matter: line ends, blank lines, a wrapped
|
|
157
|
+
sentence), and only the marked block is replaced when an older release wrote another sentence: every byte outside
|
|
158
|
+
it stays, line ends included. A missing `AGENTS.md` is created only when you answer yes on a terminal or pass `--agents-file`; without
|
|
159
|
+
either, the sync says it was not created. The section and the file are never removed nor deleted by a sync:
|
|
160
|
+
`--no-session-check`, `--no-contributing` or a sync without `dialecte-lot` leave them in place (delete the section
|
|
161
|
+
by hand if you do not want it). `--no-agents-file` leaves `AGENTS.md` alone altogether (it excludes
|
|
162
|
+
`--agents-file`). A marker without its pair, or a doubled one, leaves the file alone with a warning.
|
|
157
163
|
An `AGENTS.md` holding only the section is no evidence of a vendor.
|
|
158
164
|
- **Session-start check (Claude Code)**: the same check as an adapter: `skills sync` adds a `SessionStart` hook running
|
|
159
165
|
`npx --no-install @dialecte/cli doctor --brief` (the installed cli: no download at a session start) to
|
|
@@ -212,6 +218,20 @@ Exit codes: 0 an answer, 1 nothing found (or a warning for `doctor`), 2 a usage
|
|
|
212
218
|
need the method's `@intent` tags hold, then its summary, then its name - one intent word beats any number
|
|
213
219
|
of summary words; stop words dropped, word forms reduced to a light stem (`copied`, `copies`, `copying`
|
|
214
220
|
→ `copy`); ties put a dialecte's verb before core's, then sort by route.
|
|
221
|
+
- `dialecte api find --source "<need>"` also searches the exported functions of the package you are in (the
|
|
222
|
+
nearest `package.json` at or above the folder): every exported function declaration, arrow or function-expression
|
|
223
|
+
`const` of its tracked and untracked-not-ignored `src/**/*.ts` files, tests left out, read from the syntax alone
|
|
224
|
+
(a local `export { name }` counts, a re-export does not; an overload set is one function, at its first overload).
|
|
225
|
+
A source row prints `<file>#<name> source <file>:<line>`, then the intent that matched, its summary or
|
|
226
|
+
`(no summary)`. A function without `@intent` ranks on the words its summary and name hold together; at equal
|
|
227
|
+
hits an indexed method comes first, and a function the package's `api.json` already lists is shown once, by its
|
|
228
|
+
route. A file that does not parse is left out with a `note:` line. What each file holds is cached by its content
|
|
229
|
+
hash in `dialecte-source-index.json` in the worktree's git folder, shared by the packages of the repository and
|
|
230
|
+
rebuilt by another cli version (outside a git work tree, every file is read).
|
|
231
|
+
`dialecte api show <file>#<name>` (`src/lib/git.ts#readGit`) prints one source function's signature, summary,
|
|
232
|
+
intents and declaration, with or without `--source`; an unknown name in a file that was read names up to five of
|
|
233
|
+
that file's functions, the closest first; an unknown file names the closest source paths, or the
|
|
234
|
+
`api find --source` call that lists them.
|
|
215
235
|
- `dialecte api show <path>` (`info.of`, `doc.query.info.of`, `tx.reference.applyUuidRemap`): signature as
|
|
216
236
|
declared, summary, intents, other routes, where it is declared in its repository, and one call: the
|
|
217
237
|
method's JSDoc `@example` when it is short and calls the method, else a call from the test next to it
|
|
@@ -333,6 +353,65 @@ characters, never split nor stemmed; its plural (the acronym and one lowercase `
|
|
|
333
353
|
`show`, `find` and `eval` build the index first when it is missing. Every verb answers exit 2 with how to set
|
|
334
354
|
`DIALECTE_STANDARD` when no standard is configured.
|
|
335
355
|
|
|
356
|
+
## The facts ledger
|
|
357
|
+
|
|
358
|
+
`dialecte facts` reads the facts an agent recorded when it answered a question about a dialecte or a standard,
|
|
359
|
+
and retires the ones that no longer hold. A fact is a question (its words, its subject, its kind), its answer,
|
|
360
|
+
where the answer comes from (`schema`, `dialecte`, `standard`, `person` or `outside`), the effort it took, the
|
|
361
|
+
evidence and the sources it rests on. One question has one current fact; a better answer replaces it (an answer
|
|
362
|
+
checked against the documents always replaces an unchecked one, whatever the efforts), and the replaced fact is
|
|
363
|
+
kept, marked `superseded by F-<n>`.
|
|
364
|
+
|
|
365
|
+
**Where the ledger is.** In your data folder only: `$XDG_DATA_HOME/dialecte/facts/` (else
|
|
366
|
+
`$HOME/.local/share/dialecte/facts/`), one ledger per person, shared by every repository you work in. Each fact is a
|
|
367
|
+
file `F-<n>.json` and its history `F-<n>.history.jsonl`, one line per event (`created`, `reused`, `stale`,
|
|
368
|
+
`superseded`, `forgotten`, `rechecked`); `by-key/` holds one pointer per question to its current fact. Nothing is
|
|
369
|
+
ever deleted: a fact file is written once, afterwards only its state, its `supersededBy` and its sources change,
|
|
370
|
+
and its history only grows (a history line is at most 4,096 bytes: longer lists and strings in it are cut, and
|
|
371
|
+
a line still too long has each list replaced by its length, `fromCount` for `from`; the line marked `cut`, the
|
|
372
|
+
fact file always holding its sources whole). Every verb refuses (exit 2, nothing written) a ledger inside a git work tree, naming
|
|
373
|
+
the folder, the work tree and the fix: set `XDG_DATA_HOME` to a folder outside the repository. Only the data
|
|
374
|
+
folder counts, never the folder the command runs in.
|
|
375
|
+
|
|
376
|
+
**States.** A fact's state is the state now, checked on every read:
|
|
377
|
+
|
|
378
|
+
- `valid` - its sources still hold;
|
|
379
|
+
- `stale` - a source moved since it was recorded: the files of the standard it quotes (any file changed, added or
|
|
380
|
+
removed), or the definition of the dialecte it read. Written to the fact once, with a `stale` line holding why
|
|
381
|
+
(the source that failed and the fix), which every later read shows;
|
|
382
|
+
- `unverifiable` - a source cannot be compared now (no standard configured, its folder gone, the dialecte not
|
|
383
|
+
installed). Shown only, never written;
|
|
384
|
+
- `unchecked` - an answer from outside the documents; a person's answer given without them is `valid` and marked
|
|
385
|
+
`unchecked` on its line;
|
|
386
|
+
- `forgotten` - retired by `facts forget`.
|
|
387
|
+
|
|
388
|
+
A person's fact is never checked. A fact file no question points to (a record a crash stopped) is an `orphan`; a
|
|
389
|
+
file that is not readable JSON is `unreadable`. A read repairs what a crash or two writers at once left: the
|
|
390
|
+
previous fact of a question gets its `supersededBy`, with a `superseded` line marked `repaired`.
|
|
391
|
+
|
|
392
|
+
- `dialecte facts list [--about <Tag>] [--state <state>|all] [--json]`: one line per question, its current fact
|
|
393
|
+
whatever its state: `<id> <state> <effort> <source> <question>` (the question cut). A `stale` fact (found by
|
|
394
|
+
this read, or by an earlier one: the reason its `stale` line keeps) or one this read found `unverifiable` ends
|
|
395
|
+
its line with `- <why>`: the source that failed and the fix (for example: set `DIALECTE_STANDARD`, the expected
|
|
396
|
+
layout of a refused standard root, run from the package that installs the dialecte). `--state valid`, `stale`, `unverifiable`,
|
|
397
|
+
`unchecked` or `forgotten`: the current facts in that state now; `--state orphan`: the fact files no question
|
|
398
|
+
points to; `--state all`: every fact file, superseded, orphan and unreadable ones (with their path) included, a
|
|
399
|
+
superseded fact's line holding `superseded by F-<n>` before its question:
|
|
400
|
+
`<id> <state> <effort> <source> superseded by F-<n> <question>`. `--about <Tag>`: the facts whose subject
|
|
401
|
+
holds that tag. `--json` answers `{ facts: [{ id, path, fact?, state, current, reason? }] }` (no `fact` for an
|
|
402
|
+
unreadable file). An unknown state is
|
|
403
|
+
a usage error naming the states. The schema sources are compared with the dialectes installed in the folder the
|
|
404
|
+
command runs in; run from a folder with no `package.json`, they are `unverifiable`, never an error.
|
|
405
|
+
- `dialecte facts show <id> [--json]`: the fact's question, answer, source, effort, state now (with `- <why>` when
|
|
406
|
+
stale or unverifiable), sources and number of pieces of evidence, then its history in order; `--json` answers
|
|
407
|
+
`{ fact, state, current, reason?, history }`.
|
|
408
|
+
- `dialecte facts forget <id> --reason <text> [--json]`: marks the fact `forgotten` and appends a `forgotten` line
|
|
409
|
+
holding the reason (cut at 200 characters, the line then marked `cut`); the file is kept. Forgetting it again says so and writes nothing.
|
|
410
|
+
`--json` answers `{ id, state, already }`. No reason, or a blank one, is a usage error.
|
|
411
|
+
|
|
412
|
+
`show` and `forget` answer exit 1 for an id with no fact (the closest ids named) or a fact file that is not
|
|
413
|
+
readable JSON (its path named).
|
|
414
|
+
|
|
336
415
|
## MCP server
|
|
337
416
|
|
|
338
417
|
The MCP server of the read-only lookups is its own package: [`@dialecte/mcp`](https://github.com/dialecte/mcp) (`npx @dialecte/mcp`). It builds on the pure answer functions this package exports at `@dialecte/cli/lookups`.
|
|
@@ -582,7 +661,19 @@ the answer.
|
|
|
582
661
|
test proves nothing yet"); a passing case with a receipt whose own test call changed; a passing case
|
|
583
662
|
still waiting for its green whose test file, or test code it imports, changed since its red ("test
|
|
584
663
|
code changed since its red and it passes"); a failure on a missing export, a type or syntax error, a
|
|
585
|
-
timeout, a stub thrown at import or before the assertion; a file holding `.only` or `only: true
|
|
664
|
+
timeout, a stub thrown at import or before the assertion; a file holding `.only` or `only: true`; a
|
|
665
|
+
file whose run reports no case, `red` and `green` alike, with why the package's vitest configs (every
|
|
666
|
+
`vitest*.config.*` and their `projects`, read as files) give: `ran no case: the file belongs to
|
|
667
|
+
<config>, which the default config does not list (projects)`, `ran no case of the file` (the default
|
|
668
|
+
config holds it: an empty describe, no test call; or a config cannot be fully read - an `include`,
|
|
669
|
+
`exclude` or `projects` entry that is no string literal or inline object, such as an imported constant,
|
|
670
|
+
a spread, a call or a glob of config files - and may hold it), `every case is skipped` (only `.skip` /
|
|
671
|
+
`.todo` / `.skipIf(true)` cases; the gate, which only collects, maps each case the run reports to its
|
|
672
|
+
test call, so a case a helper registers counts as run). A refused file is never frozen, and the gate's
|
|
673
|
+
tdd step fails on it with the same reason. A file
|
|
674
|
+
no vitest config includes (a Playwright spec, a type test) is no vitest test file: it leaves the
|
|
675
|
+
selection with `outside <file> not a vitest test file (no vitest config includes it)`, is never
|
|
676
|
+
refused nor frozen, and never fails the gate. A
|
|
586
677
|
case the same as at the base is marked unchanged; a case the lot accepts is marked accepted, unless
|
|
587
678
|
it is proven red then green at its current test call (an acceptance never overrides a proof: it goes
|
|
588
679
|
the normal path, no accepted receipt, and the line adds `acceptance not needed (proven red → green): it
|
|
@@ -680,14 +771,30 @@ the answer.
|
|
|
680
771
|
looks deleted) prints `deleted <file> a test call of the base is gone`; when a `gone` entry of
|
|
681
772
|
`.dialecte/lot.json` names its file (a path or a glob), it prints
|
|
682
773
|
`gone <file> a test call of the base is gone (<reason>)` instead, in the gate's details too. A titled
|
|
683
|
-
test gone and a deleted test file stay `deleted`. A
|
|
684
|
-
|
|
774
|
+
test gone and a deleted test file stay `deleted`. A changed test file whose run reports no case prints
|
|
775
|
+
`refused <file> <reason>` (the reasons of `red` above), one no vitest config includes `outside <file>
|
|
776
|
+
not a vitest test file (no vitest config includes it)`. A ledger that cannot be read is refused with its
|
|
777
|
+
path. `--json` answers the state: `cases`, `duplicates`, `unfrozen`, `findings`, `unlisted`, and, only
|
|
778
|
+
when there are some, `zeroCases: [{ file, reason }]` (the refused files) and `notVitest: [<file>]` (the
|
|
779
|
+
files out of the selection).
|
|
685
780
|
- `status --flags` prints only the cases whose receipts carry a flag, with their flags.
|
|
686
781
|
- `status --legend` prints the tdd terms of the hand-over card, each in two lines: what it means, and
|
|
687
782
|
whether to look. It needs no package: it works from any folder.
|
|
688
783
|
- The lot is the uncommitted work: the change is measured from HEAD, so the cases of lots already
|
|
689
784
|
committed on the branch are not asked again. `--base <ref>` (`tdd` and `gate`) gives the
|
|
690
|
-
whole-branch view; `gate --full`
|
|
785
|
+
whole-branch view; `gate --full` (and `--release`) measures the tdd step from the lot's base: the
|
|
786
|
+
branch the lot was started on (the store lot's base, else the branch `worktree add` recorded it was cut
|
|
787
|
+
from; a base given as a commit id stands for the resolved base branch), from where HEAD now leaves it,
|
|
788
|
+
so a lot that merged or rebased onto its base's new commits is not asked for them. When that base is
|
|
789
|
+
not found, is behind the cut, never held the cut (a stacked lot), was rewritten or has merged the lot's own commits, it measures from the
|
|
790
|
+
worktree's cut and says why; a worktree with no recorded base measures from its cut, one not made by
|
|
791
|
+
`worktree add` from where the branch left its base branch. The first details line of the gate's tdd step
|
|
792
|
+
(none when the step is skipped) reads `tdd base: <short sha> (<source>)`, the source one of `--base`,
|
|
793
|
+
`lot base <ref>`, `worktree from <ref>`, `base branch <b> (the lot's base is a commit)`, `worktree cut`,
|
|
794
|
+
`base branch <b>`, `HEAD`; a fallback reads `tdd base: the worktree's cut (<why>)`, the why one of `no
|
|
795
|
+
base branch recorded`, `<ref> not found`, `<ref> is behind the cut`, `<ref> does not hold the cut: a
|
|
796
|
+
stacked lot` (the ref's reflog never reached the cut), `<ref> was rewritten: the cut <sha>
|
|
797
|
+
is no ancestor of the merge-base <sha>`, `<ref> holds the lot's own commits`.
|
|
691
798
|
- Test code is compared by the leaves of the parser's syntax tree, each file parsed by its extension
|
|
692
799
|
(a `.ts` file is no TSX): whitespace, comments (except the ones a tool reads:
|
|
693
800
|
`@vitest-environment`, `@jest-environment`, `@vite-ignore`), quote style, statement semicolons,
|
|
@@ -839,11 +946,34 @@ the answer.
|
|
|
839
946
|
merge hand-over the tdd verdict is judged on the worktree's own lot tree (the tree its first merge lot
|
|
840
947
|
merged onto), current while the hook record of the merged tree stands, so no `gates ran on another tree`
|
|
841
948
|
for it), then, in a consumer, `mutation` when the package declares a mutation scope (below), then
|
|
842
|
-
`review` from the hand-over folder's findings ledger and `round-<n>/` snapshots, then `
|
|
949
|
+
`review` from the hand-over folder's findings ledger and `round-<n>/` snapshots (below), then `late
|
|
950
|
+
fixes` on a card still to run (below), then `standard`. `✓`
|
|
843
951
|
passed; `!` to look at (a step not run here, with its reason, or not run after a failure; no
|
|
844
952
|
findings ledger, or one holding no row yet: `no findings recorded`; only nits open); `✗` failed (a
|
|
845
|
-
failed step, a blocking or should-fix finding open,
|
|
846
|
-
|
|
953
|
+
failed step, a blocking or should-fix finding open, no independent review after the last round, `gate
|
|
954
|
+
never run on this tree` when there is no record).
|
|
955
|
+
- `review`: the review rounds are the `round-<n>/` snapshots only, against the cap of the lot's effort
|
|
956
|
+
(low 1, medium 2, high 3; the identity's effort, else the folder's `brief.json`), then the independent
|
|
957
|
+
review, then the open findings: `✓ review 2 review rounds of 2 · independent review approve · approved`.
|
|
958
|
+
The independent review must come after the last snapshot: an `independent-reviewer` station end with a
|
|
959
|
+
verdict strictly after the snapshot's time (`round-<n>.state`'s `at`, else `round-<n>.base`'s mtime; a
|
|
960
|
+
tie is not after), shown `independent review <verdict>`; or, for a folder without step events (no
|
|
961
|
+
`events.jsonl`, or events saying the worktree's cli writes none), a ledger row of a round above it,
|
|
962
|
+
shown `independent review: round 3 in the ledger` (`rounds 3-4`). None: `✗ review no independent
|
|
963
|
+
review after round <n>`, the card BLOCKED. Beyond the cap each round names its first go-ahead row
|
|
964
|
+
(`3 review rounds (cap 1, round 2 by <who>, round 3 by <who>)`), a round without one gives `! review
|
|
965
|
+
3 review rounds, cap 2, no go-ahead recorded` (a warning); no effort recorded: `2 review rounds (no
|
|
966
|
+
effort recorded)`. A folder with step events and no review round snapshot reads `✗ review no review
|
|
967
|
+
round snapshot: dialecte lot snapshot <lot> --round 1` (the ledger never stands in there). A folder with
|
|
968
|
+
no snapshot, no ledger row and no independent end, a folder without step events and with no snapshot
|
|
969
|
+
(its ledger rows claim no independent review), and a release hand-over keep the ledger-only line
|
|
970
|
+
(`<n> rounds · approved · findings ledger`).
|
|
971
|
+
- `late fixes`: a change of the tree after the last snapshot (the worktree's state hash against
|
|
972
|
+
`round-<n>.state`'s) reads `! late fixes unverified since round <n> (<k> files): dialecte lot verify
|
|
973
|
+
<lot> --by <who> --note <text>`, a `lot verify` of the current state `✓ late fixes verified by <who>:
|
|
974
|
+
<note>`, a last snapshot without `.state` (an older cli) `! late fixes not checked (round <n> has no
|
|
975
|
+
state)`; the last snapshot's tree, or no snapshot, prints no line. A warning only: `handover run`'s
|
|
976
|
+
`verify` guard refuses. The records read are the worktree's last runs and the store's records of the tree the
|
|
847
977
|
hand-over commits - the worktree's tree, or for a hand-over holding a merge lot the tree its last lot
|
|
848
978
|
leaves (the trial merge with its resolutions) - the newest record of each step winning; a tdd step
|
|
849
979
|
another worktree recorded is left out (its verdict is that worktree's), and a stored record counts
|
|
@@ -942,9 +1072,11 @@ the answer.
|
|
|
942
1072
|
whose command (or an ancestor's) is a known editor or the one `git config dialecte.editor` names, and one
|
|
943
1073
|
named in `git config dialecte.personProcesses` (a comma list of command names, never committed) is one of the
|
|
944
1074
|
person's tools; every other process is left behind.
|
|
945
|
-
- `dialecte handover run <folder>` is what `commit.sh` runs.
|
|
1075
|
+
- `dialecte handover run <folder>` is what `commit.sh` runs. Three of its guards, `target` (the target branch's tip is held, as above),
|
|
946
1076
|
`processes` (read at run time, never from the card: a process left behind, or a list that cannot be read,
|
|
947
|
-
refuses; tools only pass with `!`)
|
|
1077
|
+
refuses; tools only pass with `!`) and `verify` (late fixes nobody verified: `✗ verify late fixes
|
|
1078
|
+
unverified since round <n>`; `! verify late fixes not checked (round <n> has no state)` never refuses;
|
|
1079
|
+
`✓ verify no late fixes`, or `verified by <who>: <note>`), come after the merges guard. Each refusal
|
|
948
1080
|
exits 2 with nothing committed, where every other guard exits 1; `--rehearse` prints `!` for each and goes
|
|
949
1081
|
on. The merges guard's note for a merge lot of the target that moved reads `lot <n>: merges main at <sha>; main
|
|
950
1082
|
is now <sha> (see target)`. Each guard prints one line with its result
|
|
@@ -1238,7 +1370,34 @@ the answer.
|
|
|
1238
1370
|
- `dialecte lot status <id> [--json]` derives the lot's state from its records (`working`, `input-required`,
|
|
1239
1371
|
`ready`, `committed`, `canceled`, `failed`), with the worktree and link checks and the exact next command (the
|
|
1240
1372
|
text form adds an `also:` line when there is one, five lines at most); it
|
|
1241
|
-
reads files only, runs no git and writes nothing. A
|
|
1373
|
+
reads files only, runs no git and writes nothing. A real working lot's next station is walked from its
|
|
1374
|
+
records (`nextStation`: per step test-writer, `tdd red`, test-reviewer at medium or high effort,
|
|
1375
|
+
implementer, `tdd green` and `gate --fast`; per review round its snapshot, reviewer, fixer or adjudicator
|
|
1376
|
+
and `gate --fast`; then `gate --full` after the last edit station, `contrib` for a producer, the
|
|
1377
|
+
independent review, the hand-over to write; the first unmet one wins): the text form prints it after the
|
|
1378
|
+
state line, `station implementer step 2 of 3 · round -/2 · effort medium` (`<what>` may be `reviewer
|
|
1379
|
+
round 1`, `tdd green and gate --fast (implementer step 2 ended, claim unchecked)`, `implementer running
|
|
1380
|
+
since <at> (run <run>)`, `lot snapshot round 2`, `question to the person (round cap 2 reached)`, `handover write (no
|
|
1381
|
+
hand-over written)`, `unknown (<why>)`), the position line given up first, and `next` is that station's
|
|
1382
|
+
command (`dialecte lot station <name> start implementer --step 2`, `... end <station> --run <run>`, the
|
|
1383
|
+
check's command, `dialecte lot snapshot <name> --round <r>`, at the cap its `--beyond-cap` form), `also`
|
|
1384
|
+
keeping the manual line; a hand-over to write and an unknown position keep the manual line. A station
|
|
1385
|
+
is ended by an end with exit 0 or none and a verdict other than `failed` or `limit`; a start with no end
|
|
1386
|
+
is running until a later station start or end or a snapshot comes (a check never closes it: the
|
|
1387
|
+
station's own `tdd red`, `tdd green` and `gate --fast` run inside it), `no end` after; an end that names
|
|
1388
|
+
its run and gives no `--step`/`--round` takes its start's; an end of another name, or one with no start
|
|
1389
|
+
that places it, is `unplaced`. A claim is checked by a later `step.end` of its kind with exit 0 in
|
|
1390
|
+
the lot's own worktree (never `throwaway`, no later failed run of the kind, no newer failed gate
|
|
1391
|
+
record), or by one inside the station's run whose `stateHash` is the one its end recorded (the tree it
|
|
1392
|
+
handed over); when the events say the worktree's cli writes no step events, its tdd ledger and green gate
|
|
1393
|
+
records after the end stand in (a later green record of a gate mode covers every earlier claim of that
|
|
1394
|
+
mode), else `unknown (the worktree's cli records no steps)`. A reviewer or test-reviewer end approves only
|
|
1395
|
+
with `approve`: none or another word reads `unknown (<station> ended without a verdict)` or `unknown
|
|
1396
|
+
(<station> ended with <word>)`. `--json` adds `station` (`{ kind, station, check, step, round, why,
|
|
1397
|
+
unplaced, noEnd }`, `null` for a simulated lot) and `rounds` (`{ review, cap, effort, steps, beyondCap:
|
|
1398
|
+
[{ round, by, reason }], independent }`, `effort` the level the cap is taken from or `null`, `steps` the
|
|
1399
|
+
brief's count; the text form prints from them). Other states, a
|
|
1400
|
+
simulated lot and `lot start` keep their next. A damaged lot (a folder of the store whose name has a lot
|
|
1242
1401
|
name's shape and whose records do not hold: no readable `identity.json`, one naming another folder, or a record
|
|
1243
1402
|
that fails its check) answers `<name> damaged: <reason>` then `next: dialecte lot stop <name> --reason <text>`
|
|
1244
1403
|
(`{ lot, state: "damaged", reason, next }` with `--json`), exit 6, never `no lot`; the reason is a fixed word
|
|
@@ -1333,8 +1492,13 @@ the answer.
|
|
|
1333
1492
|
records are found; the block's `shared` files (the changelog, the README, the command map) never hold a lot back.
|
|
1334
1493
|
An entry's state is read, never declared: done by a committed hand-over or store lot, open by a store lot, a
|
|
1335
1494
|
pending hand-over or a worktree on its branch, else ready, waiting, parked, or unknown with the reason when its
|
|
1336
|
-
repository cannot be read (files only: the stores, the registries, `worktrees/*/HEAD`; no git process
|
|
1337
|
-
|
|
1495
|
+
repository cannot be read (files only: the stores, the registries, `worktrees/*/HEAD`; no git process, except
|
|
1496
|
+
one probe per lot whose hand-over was committed outside its folder and not closed yet: once its branch is past
|
|
1497
|
+
the lot's base commit and on the base branch that lot reads `committed`, is no longer open nor holds anything,
|
|
1498
|
+
and is listed under `landed` as `lot <full name> committed: hand-over committed in <folder>, branch on
|
|
1499
|
+
<target>`; once `lot close` closes that hand-over every reader reads it `committed`, files only, with no
|
|
1500
|
+
`landed` line; a lot with a live run or a transition later than that hand-over reads from its own records). The
|
|
1501
|
+
text says the counts, the open lots (and open work no entry accounts for: its repository's proposals are
|
|
1338
1502
|
`unverified`), the lots that can start in critical-path order (`unblocks 7 (chain 4)`, `after <id>`, `merge:
|
|
1339
1503
|
<open lots>`, `next: dialecte lot start <brief>` or the brief to write), the ready lots held by an open one with
|
|
1340
1504
|
each scope pair met, person entries without a mark, the spec work (a spec missing or `DRAFT`), what each entry
|
|
@@ -1342,7 +1506,8 @@ the answer.
|
|
|
1342
1506
|
twice the cores, the free and inactive memory against 2 GB (`vm_stat` on macOS, `/proc/meminfo` on Linux); a
|
|
1343
1507
|
proposal whose heavy steps would run beside a live one says `stacks:`, and on a short machine its heavy steps
|
|
1344
1508
|
would wait (advice only). `--all` lists the done entries; `--json` answers `{ plan, repositories, counts,
|
|
1345
|
-
entries, proposals, held, specWork, heavy, unknown }
|
|
1509
|
+
entries, proposals, held, landed, specWork, heavy, unknown }`, `landed` always a list (`[{ repository, lot,
|
|
1510
|
+
folder, target }]`, `[]` when none). Exit 0 when a lot or fix can start, 1 when none can, 2
|
|
1346
1511
|
for a usage error, no block or an invalid one (every fault listed), or a repository that is not a git checkout.
|
|
1347
1512
|
`dialecte plan check <plan.md> [--json]` checks the block alone: one line when valid, else every fault (exit
|
|
1348
1513
|
2). `dialecte plan mark <plan.md> <id> done --by <who> [--reason <text>]` records a person entry's mark once in
|
|
@@ -1363,7 +1528,7 @@ the answer.
|
|
|
1363
1528
|
(`{ state, note, at }`, the note's words joined by single spaces) for the card's `standard` line; the line
|
|
1364
1529
|
references of what was read stay in the findings ledger. Another state, or no note, is a usage error
|
|
1365
1530
|
(exit 2); a folder inside a repository is refused as below.
|
|
1366
|
-
- `dialecte lot finding`, `decide`, `snapshot`, `choice` and `
|
|
1531
|
+
- `dialecte lot finding`, `decide`, `snapshot`, `choice`, `delta` and `verify` keep a lot's review rounds in its
|
|
1367
1532
|
lot folder, or in a hand-over folder (`_commit-plan/<topic>-<date>/`) that stays outside every repository:
|
|
1368
1533
|
each refuses any other folder inside a git work tree or a git folder (`.git/`, a bare repository). `--` ends the options: the
|
|
1369
1534
|
words after it are taken as they are, so a finding or a reason may start with `--`. Each writes its file
|
|
@@ -1387,7 +1552,23 @@ the answer.
|
|
|
1387
1552
|
`round-<n>.base`. An existing round, an untracked nested repository and a submodule (a gitlink in the
|
|
1388
1553
|
index or at HEAD) are refused; a run that
|
|
1389
1554
|
stops part-way leaves only `.partial` names, which the next run removes. `.dialecte/lot.json` is
|
|
1390
|
-
never part of it.
|
|
1555
|
+
never part of it. `round-<n>.state` (`{ "schema": 1, "at", "stateHash" }`, the worktree's state hash)
|
|
1556
|
+
is written and renamed with the others. A round above the cap of the lot's effort (low 1, medium 2,
|
|
1557
|
+
high 3; the identity's effort, else the folder's `brief.json`, else none recorded and a cap of 1; an
|
|
1558
|
+
interim read until the risk class lands) is refused, exit 2, naming `dialecte lot snapshot <folder>
|
|
1559
|
+
--round <n> --beyond-cap --by <who> --reason <text>`. With them the row `| round <n> beyond the cap of
|
|
1560
|
+
<cap>: <reason> | <who> | <day> |` goes to `decisions.md` first, then the snapshot (a retry finds the
|
|
1561
|
+
row of that round and adds none; once it stands, the plain `--round <n>` takes the round too). `--beyond-cap` within the cap, `--by` or `--reason` without it or
|
|
1562
|
+
blank, and a `--by` or `--reason` holding a forbidden word (`lot snapshot: --by holds a forbidden word:
|
|
1563
|
+
nothing written`, the word never printed) are refused, exit 2, nothing written; an existing round
|
|
1564
|
+
stays exit 1.
|
|
1565
|
+
- `lot verify <id|folder> --by <who> --note <text>`, run inside the lot's worktree, appends `{ schema: 1,
|
|
1566
|
+
at, by, note, state }` to `<folder>/verify.jsonl` in one write, `state` the worktree's state hash: the
|
|
1567
|
+
late fixes of that tree verified (the card's `late fixes` line, the `verify` guard). One later change
|
|
1568
|
+
needs a new verify. Exit 0 recorded; 2 for `--by` or `--note` missing, blank or not one line, a
|
|
1569
|
+
forbidden word in either, a run in another work tree than the lot identity's worktree (both named), or
|
|
1570
|
+
no snapshot yet (nothing is late), nothing written; 1 outside a git work tree, or a line over the event
|
|
1571
|
+
line limit.
|
|
1391
1572
|
- `lot delta <id|folder> --round <n> [--worktree] [--json]` (n ≥ 2) prints, for each file of
|
|
1392
1573
|
`round-<n-1>/`, of `round-<n-1>.deleted` or of the worktree's status, what changed since round n-1,
|
|
1393
1574
|
in the form that fits where the file is: the snapshot copy against the worktree file (or
|
|
@@ -1425,7 +1606,17 @@ the answer.
|
|
|
1425
1606
|
too, `head` its last lot commit or `null`. Kept,
|
|
1426
1607
|
with why and nothing done for that hand-over: first, a worktree a lot of the repository's store names
|
|
1427
1608
|
(by real path) while the lot is not `committed` nor `canceled`, reason `lot <full name> <state>` (the
|
|
1428
|
-
store read once, no git process per lot
|
|
1609
|
+
store read once, no git process per lot but the one probe below). A lot whose hand-over was committed
|
|
1610
|
+
outside its own folder (no registry entry for the lot folder, every entry naming its worktree and branch
|
|
1611
|
+
`committed`) reads `committed` once its branch is past the lot's base commit (the base an ancestor of the
|
|
1612
|
+
tip, the tip not the base) and on the base branch. Such a lot keeps nothing, and every outcome of its
|
|
1613
|
+
worktree carries the line `lot <full name> committed: hand-over committed in <folder>, branch on <target>`
|
|
1614
|
+
(under the outcome's line, indented; `landed` in `--json`); the other keep rules below still apply to it.
|
|
1615
|
+
Once `lot close` has closed that hand-over, every reader (`lot status`, `lot wait`, the overlap at `lot
|
|
1616
|
+
start`, `worktree prune`, `plan next` among them) reads the lot `committed`, files only and without the
|
|
1617
|
+
probe, so a branch deleted afterwards never reopens it. A lot with a live run, or a transition later than
|
|
1618
|
+
that hand-over (resumed after it), reads from its own records, never landed nor closed by it. A hand-over
|
|
1619
|
+
still `pending`; its worktree is the main
|
|
1429
1620
|
checkout (never parked, moved or trashed); no registered worktree at that path (closed already, or one
|
|
1430
1621
|
in the trash or the pool: never a target again); a worktree on another branch than the hand-over's
|
|
1431
1622
|
(both branches named: it holds other work now); a `locked` worktree (`git worktree lock`); another
|
|
@@ -1453,7 +1644,7 @@ the answer.
|
|
|
1453
1644
|
decided nor moved (an entry without it, a worktree removed by hand, is still kept: `nothing to close`).
|
|
1454
1645
|
Exit 0 when every named hand-over closed (or was already closed), 1 when one was kept, 2 for a name or
|
|
1455
1646
|
index the registry does not hold (then nothing is closed); `--json` prints
|
|
1456
|
-
`[{ handover, closed: true, already?: true } | { handover, kept }]`.
|
|
1647
|
+
`[{ handover, closed: true, already?: true, landed? } | { handover, kept, landed? }]`.
|
|
1457
1648
|
- Recording a lot. Every record below is appended to a file, never rewritten; a reader skips a half line and a line
|
|
1458
1649
|
it cannot parse, and counts them.
|
|
1459
1650
|
- `dialecte lot station <id> start <station> [flags]` and `lot station <id> end <station> [--run <run>] [flags]`
|
|
@@ -1463,10 +1654,12 @@ the answer.
|
|
|
1463
1654
|
`--tokens-cache-read`, `--tokens-cache-write`, `--tokens-total`), `--money <amount> <currency>`,
|
|
1464
1655
|
`--duration`, `--exit`, `--verdict` and `--suite <name>=<runs>` for suites the agent ran itself. Nothing but
|
|
1465
1656
|
the station is required; a field nobody gave stays unknown. `start` answers a `run` and the `end` command to
|
|
1466
|
-
run; `end` pairs with `--run
|
|
1657
|
+
run; `end` pairs with `--run` (an end that gives no `--step`/`--round` then takes its start's), else with the one open start of its station whose step, round and attempt match
|
|
1467
1658
|
the ones it gives (several: refused), else is recorded alone. `--event <id>` makes a retry safe: the same id
|
|
1468
1659
|
with the same fields answers the first event (`already`) and writes nothing, other fields are refused.
|
|
1469
|
-
`start` is refused on a committed, canceled or failed lot, `end` is accepted in every state.
|
|
1660
|
+
`start` is refused on a committed, canceled or failed lot, `end` is accepted in every state. An `end`
|
|
1661
|
+
records `stateHash`, the state hash of the lot's worktree (left out when it cannot be read; a retry does
|
|
1662
|
+
not compare it): a check the station ran on that tree inside its run counts for its claim. The station
|
|
1470
1663
|
names `shared` and `outside` are the report's own labels and are refused. `lot station <id> --from
|
|
1471
1664
|
<file.json>` takes the same fields as one JSON object, plus `phase` (`start` or `end`); an unknown key
|
|
1472
1665
|
is refused, every fault at once. A line over 4,096 bytes is refused. Exit 1 when the event cannot be written, 2
|
|
@@ -1475,7 +1668,8 @@ the answer.
|
|
|
1475
1668
|
`gate --fast`, `--full`, `--release` and `--hook`, `contrib`, `tdd red`, `tdd green`, `mutants run`,
|
|
1476
1669
|
`handover run` (real and rehearsal), `lot delta --worktree` and `worktree add`: the step, whether it is heavy,
|
|
1477
1670
|
its exit, its time, whether a gate reused records, and per gate step its status, counts, time and selection. A
|
|
1478
|
-
step in a worktree that links no lot, or none matching, writes nothing.
|
|
1671
|
+
step in a worktree that links no lot, or none matching, writes nothing. The `step.end` of `tdd red` and
|
|
1672
|
+
`tdd green` carries `stateHash`, the worktree's state hash after the run (computed only in a lot). A write that fails prints one
|
|
1479
1673
|
`events: not recorded: <reason>` line and never changes the step's exit; a step killed after its start writes
|
|
1480
1674
|
its end as interrupted where it can. Long lists are cut, failing parts first. A step run in a worktree whose
|
|
1481
1675
|
link names a lot that lives elsewhere (a copied or moved worktree) is written to that lot as `step.foreign`.
|