@dialecte/cli 0.3.0 → 0.3.1
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 +55 -7
- package/dist/cli.js +1115 -593
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ dialecte gate [--full] # the package's Definition of Done, with the real cou
|
|
|
36
36
|
dialecte gate --hook # in a commit hook: the suite, unless a green gate --full of the committed tree answers it
|
|
37
37
|
dialecte tdd red|green|status # receipts: each new test failed on an assertion before the code, then passed untouched
|
|
38
38
|
dialecte new verb <namespace> <query|transaction> <name>
|
|
39
|
-
dialecte handover <lots.json> # the guarded commit-by-lots hand-over a human runs (run, list)
|
|
39
|
+
dialecte handover <lots.json> # the guarded commit-by-lots hand-over a human runs (show, run, abandon, list)
|
|
40
40
|
dialecte handover --legend # every term of the hand-over card: what it means, whether to look
|
|
41
41
|
dialecte worktree add|prune # a worktree ready to work in (sibling links, node_modules checked); what a merge left behind
|
|
42
42
|
dialecte record review|decision|snapshot # a lot's findings ledger and round snapshots, in its hand-over folder
|
|
@@ -517,10 +517,21 @@ the answer.
|
|
|
517
517
|
`commit.sh` that runs
|
|
518
518
|
`npx --no-install @dialecte/cli handover run <folder>` (bash, also run with `sh`; when the repository
|
|
519
519
|
installs no cli that can, it says so in one line with the fix) - and prints the hand-over card, the
|
|
520
|
-
command with its absolute `cd` under it.
|
|
520
|
+
command with its absolute `cd` under it. The folder is the lots file's, or `--out <dir>`. Every hand-over
|
|
521
|
+
written is registered in the repository's store, `<git common dir>/dialecte-handover/`: shared by every
|
|
522
|
+
worktree of the repository, kept when a worktree is removed, never in the working tree. The store holds
|
|
523
|
+
one entry per hand-over, `<name>.json` = `{ folder, branch, worktree, written, state }` (the folder's
|
|
524
|
+
absolute path, the lots file's branch and repository, when it was written, and its state as last
|
|
525
|
+
recorded: `pending` when written, `committed` by a real run that commits every lot, `abandoned` by
|
|
526
|
+
`handover abandon`); the folder stays where it was written. The name is `<yyyy-mm-dd>-<branch slug>[-<n>]` -
|
|
527
|
+
the local date, the branch with every run of characters outside `[A-Za-z0-9._-]` (the `/` included)
|
|
528
|
+
turned into one `-`, then `-2`, `-3`... when that name has an entry already. A folder registered already
|
|
529
|
+
(the same real path) keeps its name: `--rehash` updates its entry, never a second one. A rehearsal and
|
|
530
|
+
`show` write no entry. `--json` answers the card as data: the verdict, `profile`,
|
|
521
531
|
`failedGates`, `otherTreeGates`, `declarations` (the entries to read), `gates` (the gate lines: name,
|
|
522
532
|
status, detail), `contrib` (a contributor's contrib rows, one per row: name, status, detail, and `stale`
|
|
523
|
-
or `source` - `rehearsal`, `from <commit>` - when they apply), `tdd` (the tdd lines as the text a person reads, no layout and no padding), `notes`,
|
|
533
|
+
or `source` - `rehearsal`, `from <commit>` - when they apply), `tdd` (the tdd lines as the text a person reads, no layout and no padding), `notes`, `name` (the
|
|
534
|
+
hand-over's registered name; absent for a folder with no entry), and each lot with
|
|
524
535
|
`pending` until it is committed. Edited a file after the review? `--rehash` (also after
|
|
525
536
|
editing `lots.json`). The repository stays held until every lot is committed: `dialecte gate` runs
|
|
526
537
|
only under this hand-over (see `gate`), and a hand-over of another folder is refused, naming the script
|
|
@@ -608,9 +619,12 @@ the answer.
|
|
|
608
619
|
- `notes`: the lots file's `gates` text, as written; only on the cards printed before a run (the
|
|
609
620
|
written card, a rehearsal's), never on the card after a real run.
|
|
610
621
|
|
|
611
|
-
Its closing rule
|
|
612
|
-
|
|
613
|
-
|
|
622
|
+
Its closing rule names the hand-over, so a part of the card copied alone still says which one it is:
|
|
623
|
+
`dialecte handover show <id> · run <id> · --legend · details: dialecte tdd status`, `<id>` the
|
|
624
|
+
hand-over's registered name, or its folder's absolute path when it has no entry (a folder written by an
|
|
625
|
+
earlier cli; in a box too narrow for it, that
|
|
626
|
+
text is printed inside, above a plain closing rule) - on the written card, `show`'s, a run's and a
|
|
627
|
+
rehearsal's. The command stays under the box until every lot is committed. `dialecte handover --legend` prints every term the card can
|
|
614
628
|
print, each in two lines: what it means, and whether to look.
|
|
615
629
|
|
|
616
630
|
- `dialecte handover run <folder>` is what `commit.sh` runs. Each guard prints one line with its result
|
|
@@ -750,9 +764,43 @@ the answer.
|
|
|
750
764
|
(`{}`) in its place, saying so in one line (`lot file archived: <folder>/lot.json`): the next lot on
|
|
751
765
|
the branch does not inherit its entries. No lot file, an empty one, a rehearsal, a stopped run, or a
|
|
752
766
|
folder that holds a `lot.json` already (a second run) leave the lot file as it is.
|
|
767
|
+
- `dialecte handover show [<name|folder>] [--json]` prints a hand-over's card again, recomputed from its
|
|
768
|
+
folder (the lots file, the snapshot) and the records - the lots found committed from the lots file's HEAD
|
|
769
|
+
to the tip of its branch, `DONE` when every lot is - and writes nothing: not in the folder, the store,
|
|
770
|
+
the worktree or its index, nor a lock or a run marker. A word without a path separator that names an
|
|
771
|
+
entry of the store is that entry's folder; anything else is a path (relative to the current folder), and
|
|
772
|
+
a registered folder given by its path still gets its name on the card. Without an argument: the newest
|
|
773
|
+
registered hand-over of the current branch (the latest date, then the highest counter, from the name),
|
|
774
|
+
whatever its state; none for the branch: the store's entries, one `name branch state` line each, exit
|
|
775
|
+
1 (an empty or missing store says so, exit 1). While the folder exists its state is the folder's own
|
|
776
|
+
(abandoned, pending, partly committed, committed, stale); a folder removed is `gone`: listed, never run,
|
|
777
|
+
never shown as a card (exit 1, naming the missing folder). After the box, when a file of a lot not yet committed
|
|
778
|
+
(or `lots.json`) differs from what was reviewed, a deleted one included:
|
|
779
|
+
`<n> file(s) differ from the reviewed snapshot: re-gate, then dialecte handover <folder>/lots.json --rehash`;
|
|
780
|
+
then the run command on its own line, none once done or abandoned. Colour and width as the written
|
|
781
|
+
card. An unknown name, or a folder that is no hand-over: exit 2, naming it. `--json` answers the card
|
|
782
|
+
as data with its `folder` and `name`, as `dialecte handover --json` does, and `changedSinceReview` (the
|
|
783
|
+
count of that line).
|
|
784
|
+
- `dialecte handover run` without a folder runs the one registered hand-over still to run (its folder
|
|
785
|
+
pending or partly committed; `--rehearse` too): an abandoned, committed, stale or gone one is skipped.
|
|
786
|
+
Two or more: refused, nothing run and no run marker, one `name branch verdict` line each (`READY` or
|
|
787
|
+
`BLOCKED`, computed as `show` does), exit 2; none: says so, exit 1. `handover run <name>` runs that
|
|
788
|
+
registered hand-over (a gone one: exit 2, naming its folder).
|
|
789
|
+
- `dialecte handover abandon [<name|folder>]` gives up a hand-over that will not run: it writes
|
|
790
|
+
`abandoned.json` (when) in its folder, records its entry `abandoned`, then removes the lock of its worktree when the lock names this
|
|
791
|
+
folder's `commit.sh` (a lock naming another hand-over is left, said in one line). Without an argument:
|
|
792
|
+
the hand-over the current worktree's lock names; no lock: says nothing is held, exit 1. Refused (exit 2,
|
|
793
|
+
nothing written) while a real run of it is in progress, and once every lot is committed; a partly
|
|
794
|
+
committed one may be abandoned, its commits stay. It never touches the index, a ref or a commit. An
|
|
795
|
+
abandoned hand-over is `abandoned` in `list` and `show`'s listing, `ABANDONED` on its card (no run
|
|
796
|
+
command); `run` without a folder skips it, `run <it>` refuses (exit 2, naming the marker); abandoning it
|
|
797
|
+
again says it already is (exit 0), and `dialecte handover <lots.json> --rehash` of its folder is refused
|
|
798
|
+
(exit 2, nothing written, naming `abandoned.json`): write a new hand-over into a new folder instead. A run
|
|
799
|
+
and an abandon started at the same moment never both go on: each reads the other's marker again after
|
|
800
|
+
writing its own, and one that finds it refuses (exit 2), nothing committed or abandoned.
|
|
753
801
|
- `dialecte handover list [--root <dir>] [--json]` lists every hand-over folder under the workspace's
|
|
754
802
|
`_commit-plan/` (or the folder given, or the current one): repository, worktree, branch, lots, age, and
|
|
755
|
-
its state - pending, partly committed, committed, or stale when something else moved the branch. A
|
|
803
|
+
its state - pending, partly committed, committed, abandoned, or stale when something else moved the branch. A
|
|
756
804
|
folder holding a hand-written `commit*.sh` and no lots file shows as "legacy script, state unknown".
|
|
757
805
|
- `dialecte worktree add <repository> <branch> [--from <ref>] [--json]` makes a worktree under the
|
|
758
806
|
workspace's `.worktrees/<repository>-<branch tail>` (the last segment of the branch: `core-depth` for
|