@dialecte/cli 0.9.0 → 0.11.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 +1 -1
- package/dist/cli.js +18711 -15283
- package/dist/lookups.d.ts +16 -16
- package/dist/lookups.js +115 -65
- package/dist/schemas/keep-decision.schema.json +29 -0
- package/package.json +3 -1
- package/templates/ci/.github/workflows/_type-perf.yml +17 -2
package/dist/lookups.js
CHANGED
|
@@ -78,6 +78,7 @@ var SOURCE_SUGGESTION_LIMIT = 5;
|
|
|
78
78
|
var UNKNOWN_SOURCE_CLOSEST_TEXT = 'no source function "{path}" in {root} - closest: {closest}';
|
|
79
79
|
var UNKNOWN_SOURCE_TEXT = 'no source function "{path}" in {root}: `npx @dialecte/cli api find --source "<what you need>"` lists them';
|
|
80
80
|
var NO_PACKAGE_TEXT = "{command}: no package at {cwd}: run it inside a package (a folder holding a package.json, or below one)";
|
|
81
|
+
var SOURCE_TEXT_MISSING = "{file}: no text given for it";
|
|
81
82
|
|
|
82
83
|
// src/lib/api/find-methods.ts
|
|
83
84
|
function findMethods(params) {
|
|
@@ -367,7 +368,10 @@ function ownSkillFolders(cwd) {
|
|
|
367
368
|
return readdirSync2(skillsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join3(skillsRoot, entry.name)).sort();
|
|
368
369
|
}
|
|
369
370
|
function readApiJson(path) {
|
|
370
|
-
|
|
371
|
+
return indexOrThrow({ path, read: parseApiJson(path) });
|
|
372
|
+
}
|
|
373
|
+
function indexOrThrow(params) {
|
|
374
|
+
const { path, read } = params;
|
|
371
375
|
if ("index" in read) return read.index;
|
|
372
376
|
throw new Error(
|
|
373
377
|
`${path} is not a valid api index (${read.problem}): reinstall the package, or run \`dialecte skills generate\` in its repository`
|
|
@@ -693,11 +697,26 @@ function inferredToolsLabel() {
|
|
|
693
697
|
}).join("; ");
|
|
694
698
|
}
|
|
695
699
|
|
|
700
|
+
// src/lib/package-json.constants.ts
|
|
701
|
+
var DECLARING_FIELDS = [
|
|
702
|
+
"dependencies",
|
|
703
|
+
"devDependencies",
|
|
704
|
+
"optionalDependencies",
|
|
705
|
+
"peerDependencies"
|
|
706
|
+
];
|
|
707
|
+
|
|
696
708
|
// src/lib/package-json.ts
|
|
697
709
|
function readPackageJson(root) {
|
|
698
710
|
const source = readStepSource(root);
|
|
699
711
|
return "refusal" in source ? {} : source.packageJson;
|
|
700
712
|
}
|
|
713
|
+
function declaredSpecOf(params) {
|
|
714
|
+
const field = DECLARING_FIELDS.find(
|
|
715
|
+
(candidate) => typeof params.manifest[candidate]?.[params.name] === "string"
|
|
716
|
+
);
|
|
717
|
+
const spec = field === void 0 ? void 0 : params.manifest[field]?.[params.name];
|
|
718
|
+
return field === void 0 || typeof spec !== "string" ? void 0 : { field, spec };
|
|
719
|
+
}
|
|
701
720
|
|
|
702
721
|
// src/lib/process-alive.ts
|
|
703
722
|
function isProcessAlive(pid) {
|
|
@@ -737,6 +756,19 @@ import { dirname as dirname5, join as join10, resolve as resolve3 } from "path";
|
|
|
737
756
|
import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync4 } from "fs";
|
|
738
757
|
import { join as join6, sep as sep2 } from "path";
|
|
739
758
|
|
|
759
|
+
// src/lib/skills/cli-invocations.constants.ts
|
|
760
|
+
var CLI_PACKAGE = "@dialecte/cli";
|
|
761
|
+
var CLI_BIN = "dialecte";
|
|
762
|
+
var UNTAGGED_FENCE_INVOCATION_PATTERN = new RegExp(`^\\s*${CLI_BIN}\\s+(\\S+)`);
|
|
763
|
+
var UNAVAILABLE_REASONS = {
|
|
764
|
+
noCli: `no ${CLI_PACKAGE} installed in this package`,
|
|
765
|
+
noBin: `the installed ${CLI_PACKAGE} {version} has no \`${CLI_BIN}\` bin`,
|
|
766
|
+
failed: `the installed ${CLI_PACKAGE} {version} did not answer \`${CLI_BIN} --help --json\`: {detail}`,
|
|
767
|
+
badManifest: `the installed ${CLI_PACKAGE} has a package.json that is no JSON`,
|
|
768
|
+
noJson: `the installed ${CLI_PACKAGE} {version} answers \`--help --json\` with no JSON`,
|
|
769
|
+
noMap: `the installed ${CLI_PACKAGE} {version} answers \`--help --json\` without the verbs and flags of its commands (a cli before the command map)`
|
|
770
|
+
};
|
|
771
|
+
|
|
740
772
|
// src/lib/store/identity.ts
|
|
741
773
|
import { readFileSync as readFileSync5 } from "fs";
|
|
742
774
|
import { join as join7 } from "path";
|
|
@@ -1767,10 +1799,16 @@ function findPackageFolder(params = {}) {
|
|
|
1767
1799
|
|
|
1768
1800
|
// src/lib/api/source-index.ts
|
|
1769
1801
|
function indexSourceFiles(params) {
|
|
1770
|
-
const { root, files, parse: parse2 } = params;
|
|
1802
|
+
const { root, files, parse: parse2, texts } = params;
|
|
1803
|
+
function bytesOf(file) {
|
|
1804
|
+
if (texts === void 0) return readFileSync10(join17(root, file));
|
|
1805
|
+
const text = texts.get(file);
|
|
1806
|
+
if (text === void 0) throw new Error(SOURCE_TEXT_MISSING.replace("{file}", () => file));
|
|
1807
|
+
return Buffer.from(text, "utf8");
|
|
1808
|
+
}
|
|
1771
1809
|
if (!isInWorkTree(root))
|
|
1772
1810
|
return files.map(function parseFile(file) {
|
|
1773
|
-
return parse2({ file, text:
|
|
1811
|
+
return parse2({ file, text: bytesOf(file).toString("utf8") });
|
|
1774
1812
|
});
|
|
1775
1813
|
const cacheFile = join17(gitFolderOf(root), SOURCE_INDEX_FILE);
|
|
1776
1814
|
const reader = readCliVersion();
|
|
@@ -1784,7 +1822,7 @@ function indexSourceFiles(params) {
|
|
|
1784
1822
|
};
|
|
1785
1823
|
const answer = files.map(function parseChangedFile(file) {
|
|
1786
1824
|
const key = `${prefix}${file}`;
|
|
1787
|
-
const bytes =
|
|
1825
|
+
const bytes = bytesOf(file);
|
|
1788
1826
|
const hash = createHash2("sha256").update(bytes).digest("hex");
|
|
1789
1827
|
const known = cached?.files[key];
|
|
1790
1828
|
if (known !== void 0 && known.hash === hash) {
|
|
@@ -1798,7 +1836,7 @@ function indexSourceFiles(params) {
|
|
|
1798
1836
|
});
|
|
1799
1837
|
if (cached !== void 0 && Object.keys(cached.files).length !== Object.keys(next.files).length)
|
|
1800
1838
|
changed = true;
|
|
1801
|
-
if (changed) writeCache({ cacheFile, cache: next });
|
|
1839
|
+
if (changed && texts === void 0) writeCache({ cacheFile, cache: next });
|
|
1802
1840
|
return answer;
|
|
1803
1841
|
}
|
|
1804
1842
|
function othersFiles(params) {
|
|
@@ -2217,7 +2255,7 @@ var GLOBAL_HELP_NOTES = [
|
|
|
2217
2255
|
'package.json "dialecte" field or with flags:',
|
|
2218
2256
|
` ${ZERO_CONFIG_FLAGS.overrides.join(" ")}`,
|
|
2219
2257
|
`Generated files are formatted with the package's oxfmt: ${ZERO_CONFIG_FLAGS.formatting.join(" | ")}.`,
|
|
2220
|
-
"Env:
|
|
2258
|
+
"Env: COVERAGE_CHILD_CAP=N (cap child edges)."
|
|
2221
2259
|
];
|
|
2222
2260
|
var COMMAND_MAP = {
|
|
2223
2261
|
api: {
|
|
@@ -2384,6 +2422,7 @@ var COMMAND_MAP = {
|
|
|
2384
2422
|
usage: [
|
|
2385
2423
|
"dialecte lot start <brief.json> [--effort low|medium|high] [--overlap-ok] [--by <who> --reason <text>] [--dry-run] [--simulate <scenario>] [--json]",
|
|
2386
2424
|
"dialecte lot start <brief.json> --on <lot> [the options above]",
|
|
2425
|
+
"dialecte lot start <brief.json> --keep <why> [the options above]",
|
|
2387
2426
|
"dialecte lot status <id> [--json]",
|
|
2388
2427
|
"dialecte lot forecast [<id>] [--json] [--against <lot>]",
|
|
2389
2428
|
"dialecte lot risk <id|folder> [--json]",
|
|
@@ -2393,6 +2432,8 @@ var COMMAND_MAP = {
|
|
|
2393
2432
|
"dialecte lot result <id> [--json]",
|
|
2394
2433
|
"dialecte lot stop <id> --reason <text> [--by <who>] [--json]",
|
|
2395
2434
|
"dialecte lot scope <id> [--drop <path>]... [--add <path>]... [--overlap-ok] --by <who> --reason <text>",
|
|
2435
|
+
"dialecte lot keep <id> --by <who> --reason <why> [--json]",
|
|
2436
|
+
"dialecte lot unkeep <id> --by <who> --reason <why> [--json]",
|
|
2396
2437
|
"dialecte lot station <id> start <station> [--step <n>] [--round <n>] [--attempt <n>] [--agent <name>] [--executor host|command] [--vendor <name>] [--model <name>] [--tier <name>] [--effort <word>] [--session <id>] [--skill <name|path>]... [--skill-asked <name|path>]... [--event <id>] [--json]",
|
|
2397
2438
|
"dialecte lot station <id> end <station> [--run <run>] [--step <n>] [--round <n>] [--attempt <n>] [--agent <name>] [--vendor <name>] [--model <name>] [--tier <name>] [--effort <word>] [--session <id>] [--skill <name|path>]... [--skill-asked <name|path>]... [--event <id>] [--tokens-in <n>] [--tokens-out <n>] [--tokens-cache-read <n>] [--tokens-cache-write <n>] [--tokens-total <n>] [--money <amount> <currency>] [--duration <seconds>] [--exit <n>] [--verdict <word>] [--suite <name>=<runs>]... [--json]",
|
|
2398
2439
|
"dialecte lot station <id> --from <file.json> [--json]",
|
|
@@ -2412,6 +2453,7 @@ var COMMAND_MAP = {
|
|
|
2412
2453
|
"dialecte lot verify <id|folder> --by <who> --note <text>",
|
|
2413
2454
|
"dialecte lot report <id> [--json]",
|
|
2414
2455
|
"dialecte lot report --feature <name> [--simulated] [--json]",
|
|
2456
|
+
"dialecte lot report --kept [--json]",
|
|
2415
2457
|
"dialecte lot export <id> <dir> [--json]",
|
|
2416
2458
|
"dialecte lot brief <id> --from <brief.json> --by <who> --reason <text>",
|
|
2417
2459
|
"dialecte lot pr <id> [--print] [--json]",
|
|
@@ -2420,36 +2462,43 @@ var COMMAND_MAP = {
|
|
|
2420
2462
|
"dialecte lot design <id> [--from <file> | --from-plan | --approve --by <who> [--reason <text>] | --waive --by <who> --reason <text>] [--json]",
|
|
2421
2463
|
"dialecte lot land <id>",
|
|
2422
2464
|
"dialecte lot close <hand-over name|lot id|index>... [--json]",
|
|
2465
|
+
"dialecte lot close --feature <name> [--json]",
|
|
2423
2466
|
"dialecte lot prune [<id>...] [--feature <name>] [--all] [--yes] [--json]"
|
|
2424
2467
|
],
|
|
2425
2468
|
notes: [
|
|
2469
|
+
"every verb - the cli floor, read before any verb runs (wait included, help aside): a cli older than the version a repository the invocation reaches asks for runs nothing (exit 2, naming the path it was started by and its real path, both versions and where the floor came from; --json { error, next: null }); the repositories are the current folder's package and those of each lot a word names (an id, an option's value or a word after --: the lot's worktree and repository, never the cli that started it) and of a brief's repository; a package's floor is the cli repository's own version, else the lowest version its @dialecte/cli pin admits (dependencies, devDependencies, optionalDependencies, peerDependencies); a pin with no lower bound (*, x, an empty spec, workspace:*, <2.0.0, an || alternative without one) or no semver range (file:, link:, a path or url, git+, a dist-tag, workspace:^ or workspace:~ with no version after them) asks for the installed cli's version (none installed: no floor); a package in a subfolder that does not ask for the cli takes the floor of the package above it, up to its repository's root; when the working tree's floor refuses, the base branch's tip is read and the cli is refused only below both (a release or pin-bump lot stays landable by the main checkout's cli); the highest floor across the repositories decides; equal or newer runs; a version the cli cannot read for itself is refused whenever a floor exists",
|
|
2426
2470
|
"start - checks the brief (every refusal at once, exit 2), claims the next index, publishes the lot folder in <git common folder>/dialecte-lots/, makes the numbered worktree at the base commit with its .dialecte/lot link; --dry-run checks (the store list included), names the lot and the start to run next, writing nothing; exit 1 when the worktree cannot be made (the lot failed, nothing removed, next: lot stop); a link that cannot be made leaves the lot working with a note; every --json exit is JSON, a usage error { error, usage, next: null } included",
|
|
2471
|
+
"start - --keep <why> or the brief's keep (one line of at most 200 characters) keeps the lot on purpose from its start: its first keep.jsonl line, signed by --by (orchestrator in any casing recorded orchestrator) or caller, is written with its records before the lot is published (a simulated lot's too; --dry-run names it, keep: <why>, writing nothing), the start line and --json name it (kept: <why>); --keep and a brief keep together, or a keep or its signer holding a forbidden word, a path, a link, a reference or a plan entry id, refuse (exit 2, nothing published); after the start a keep changes through lot keep and lot unkeep only (lot brief refuses a changed keep)",
|
|
2427
2472
|
"start - --on <lot> starts the lot on another open lot of the same repository (a stack): its branch is cut at that lot's branch tip, its stack.json records the parent only (where it forks is read from git when it lands), and the parent's scope is its base, never an overlap, at the start and at lot scope --add (every other open lot's still is); a parent that is unknown, damaged, not working or ready, of another repository or without its branch is refused before anything is written, before any other fault of the brief; lot status shows a stack line, on <parent> (#<pull request>, <state>), the parent read through the one lot reader: merged once its landing is proven (its landed fact, git or the host), else its pull request as the host holds it (open, draft, queued, closed, or the host cannot say: <why>), the hand-over card on <parent> (#<pull request>) from files only; on <parent> (no pull request yet) without one",
|
|
2428
2473
|
"start - a scope meeting another open lot goes ahead when that lot's work reads (its forecast against main, run and never written: a new lot has no work, so no conflict can exist), printed shares <met> with <lot> (forecast clean); still refused: a damaged lot or one whose scope cannot be read, a met lock file (exclusive: a lock file is never shared), a forecast that cannot run (forecast unknown: <reason>); after the start the new lot's own forecast is recorded (trigger start); the re-check after the start refuses only what still refuses (a lot that published meanwhile but has no worktree on disk yet has no work: the start goes on)",
|
|
2429
2474
|
"start - --overlap-ok accepts an overlap the start refuses, for an overlap that names its paths (a lot whose scope cannot be read stays refused; a damaged other lot whose scope reads is accepted, its damage recorded beside the go-ahead); it takes --by <who> --reason <text>, the same go-ahead as an effort below the class; each accepted overlap is a line of the lot folder's overlaps.jsonl (the other lot, the met pairs, who and why), printed by the start and its dry run (! overlaps <lot>: ...) and shown on the card's scope line as a warning; on an overlap the forecast cleared it is recorded all the same, printed --overlap-ok not needed: the forecast cleared <lot>; the re-check after the start refuses a held lot the go-ahead did not name",
|
|
2430
2475
|
"start - the effort: the risk class of the brief's scope (high when an entry reaches the package's dialecte.risk.high list) sets the default (high, medium or low); on a terminal, without --json or --dry-run, the effort is asked with that default; an effort below the class (from --effort, the brief or the answer) is refused (exit 2, nothing written) without --by <who> --reason <text>, which are recorded on an effort line in risk.jsonl with the class's derived line, the start printing ! effort <e> below risk class <c> (by <who>: <reason>)",
|
|
2431
2476
|
"--simulate - start a simulated lot that plays one of the scenarios (ready, question, person, two-questions, limit, failure, slow) under wait: no worktree, no branch, no registry entry; it never blocks a real lot",
|
|
2432
|
-
"brief - a working or ready real lot takes a new brief whose only changes are its public text (the summary, the issue, step titles and behaviours); any other change is refused naming the field, nothing written; the new brief passes the start's field and public-text checks; it replaces the stored brief and a brief transition records the sha256 of the old and new brief, --by and --reason, the state and position kept; the same brief again answers already, nothing written; a simulated lot is refused; brief.json edited any other way reads as damage",
|
|
2433
|
-
"pr - renders the lot's pull request from its records through the repository's .github/pull_request_template.md: the title is the brief's first commit message, the body its summary and other commit messages, step titles and behaviours, the changelog fragments the lot adds, tests.json (a part of another tree reads stale), review.jsonl (findings and how each closed, the verdicts by reviewer kind, never a name; a row value its writer never writes refused), the risk class and effort, the overlaps it accepted (the other lot by its index, and why), the issue it closes, and the author's checklist ticked from the records; a missing record reads not recorded; the record text is checked first (a reference, a forbidden word, a plan entry id, a link or a path outside the tree refused, naming the word and the record); the open pull request (landing.json's, else the branch's newest) is edited only when its title or body reads otherwise, a person's part after the kept marker kept (a body without that heading holding a person's text refused, never dropped); a damaged lot refused; --print prints and sends nothing; no pull request yet prints the text and names lot land; --json { title, body,
|
|
2477
|
+
"brief - a working or ready real lot takes a new brief whose only changes are its public text (the summary, the issue, step titles and behaviours, and each lot's commit message, which titles its pull request); any other change is refused naming the field, nothing written; the new brief passes the start's field and public-text checks; it replaces the stored brief and a brief transition records the sha256 of the old and new brief, --by and --reason, the state and position kept; the same brief again answers already, nothing written; a simulated lot is refused; brief.json edited any other way reads as damage",
|
|
2478
|
+
"pr - renders the lot's pull request from its records through the repository's .github/pull_request_template.md: the title is the brief's first commit message (changed with lot brief), the body its summary and other commit messages, step titles and behaviours, the changelog fragments the lot adds, tests.json (a part of another tree reads stale), review.jsonl (findings and how each closed, the verdicts by reviewer kind, never a name; a row value its writer never writes refused), the risk class and effort, the overlaps it accepted (the other lot by its index, and why), the issue it closes, and the author's checklist ticked from the records; a missing record reads not recorded; a lot that changes package.json's version is refused when its title does not name the new version (read at the lot's own fork point: a lot started on an open release lot sets none), naming lot brief; the record text is checked first (a reference, a forbidden word, a plan entry id, a link or a path outside the tree refused, naming the word and the record); the open pull request (landing.json's, else the branch's newest) is edited only when its title or body reads otherwise, a person's part after the kept marker kept (a body without that heading holding a person's text refused, never dropped); a damaged lot refused; --print prints and sends nothing; no pull request yet prints the text and names lot land; --json { title, body, changeRequest, head, sent }",
|
|
2434
2479
|
"review - the private half of the lot's review, read-only (nothing written): the lot's state and branch, its pull request (landing.json's) with the head it is at, the head the lot landed and the worktree's HEAD, its checks, the brief's goal and steps (title, spec, behaviours), tests.json's tdd counts and gate run, decisions.md, every finding of the ledger with its text and state, the standard line, and what lot approve would refuse (or the approve command when it would approve); then opens the pull request's changed files in the browser (--no-open names the page only; an opener that fails is named, never an exit); a lot without a landing prints its private half and names lot land <id>, the host never asked",
|
|
2435
2480
|
"review --pull - the pull request's line comments come back as findings of round <n> in the lot's findings ledger: a thread's first comment only (replies discuss it), each once (pulled-comments.jsonl records the comment and its finding; a second pull answers already), its severity from a leading blocking:, should-fix: or nit: (dropped from the text, kept when it is all the comment says), else should-fix, at its path:line (the path alone for a comment on the file), its lines joined into one; review.jsonl written again; private points stay off the pull request: lot finding records them",
|
|
2436
|
-
"approve - a person's approval of the lot's pull request: refused (exit 1, nothing recorded, nothing queued) unless the lot is at work, the pull request landing.json names is open at the head the lot landed and the worktree is at that head too (an unpushed commit refuses), its checks ran on that head and are green (a check run again counts by its newest run; a failing or pending check, or none yet, refuses) and no finding but a nit is open (open, or a fix still to verify), and its text renders over the live body; then appends { schema, at, by, reason?, number, head } to the lot folder's approvals.jsonl, which review.jsonl shows as a person's approve verdict with that head (a pull request text rendered on another head, after a later commit or a rebase, leaves it out; the body names it by kind only, never the name; the orchestrator in any casing is recorded as orchestrator), renders the pull request's text again from the records, makes a draft ready and queues it (gh pr merge --auto; a lot started with --on whose pull request still merges into its parent's branch queues as a stack up to it, gh stack merge, and only on a host with stacks once the parent's pull request, read by the parent's branch, is queued (auto-merge on or in the merge queue), refused otherwise before anything is recorded: approve the parent first, or land it again once the parent merged); the only verb that queues, lot land never does; a queue the host refuses keeps the approval (exit 1) and the same approval run again answers already approved, writing nothing, and queues; --by orchestrator (in any
|
|
2481
|
+
"approve - a person's approval of the lot's pull request: refused (exit 1, nothing recorded, nothing queued) unless the lot is at work, the pull request landing.json names is open at the head the lot landed and the worktree is at that head too (an unpushed commit refuses), its checks ran on that head and are green (a check run again counts by its newest run; a failing or pending check, or none yet, refuses) and no finding but a nit is open (open, or a fix still to verify), and its text renders over the live body; then appends { schema, at, by, reason?, number, head } to the lot folder's approvals.jsonl, which review.jsonl shows as a person's approve verdict with that head (a pull request text rendered on another head, after a later commit or a rebase, leaves it out; the body names it by kind only, never the name; the orchestrator in any casing and spacing is recorded as orchestrator), renders the pull request's text again from the records, makes a draft ready and queues it (gh pr merge --auto; a lot started with --on whose pull request still merges into its parent's branch queues as a stack up to it, gh stack merge, and only on a host with stacks once the parent's pull request, read by the parent's branch, is queued (auto-merge on or in the merge queue), refused otherwise before anything is recorded: approve the parent first, or land it again once the parent merged); the only verb that queues, lot land never does; a queue the host refuses keeps the approval (exit 1) and the same approval run again answers already approved, writing nothing, and queues; --by orchestrator (in any casing and spacing) approves the cli's own lots only (the package named @dialecte/cli), every other package waits for a person (exit 2); a forbidden word in --by or --reason, or a --by holding what a public record never holds, refused (exit 2) before the host is asked; a lot without a landing names lot land <id>",
|
|
2437
2482
|
"design - a lot's design (design before code): --from <file> records it by the sha256 of its bytes, appending { schema, at, kind: recorded, file, hash, from } to the lot folder's design.jsonl and keeping its copy as design/<hash>.md (the copy rules once the source is gone); a file missing, empty, not UTF-8 or under a scratch root, the system's temporary folder, /tmp or /private/tmp (wiped there) is refused (exit 2), nothing written, and a file outside every git work tree is recorded (plans live there); without a worktree the lot is read at the base recorded at its start, a ! line saying so; --from-plan records the spec of the plan entry the lot carries out, refused when another lot or fix entry of its block names the same spec (write this lot's own design) or the lot carries out no entry with a spec; --approve --by <who> [--reason <text>] appends an approval of the last recorded hash with the need it was given against, refused when nothing is recorded or the source exists with other bytes (record it again); --waive --by <who> --reason <text> appends a waiver with the current need, refused on a lot that needs no design; both refused from the lot's own worktree or its review throwaway (approve from the main checkout), and on a --by or --reason holding a forbidden word or a --by holding what a public record never holds (exit 2); the orchestrator in any casing is recorded as orchestrator; a lot no longer at work is refused (exit 1); without an option it prints design <state>[ by <kind>][ \xB7 <reasons>] and the next command, --json { required, reasons, state, by, uncovered } (by the kind, never a name)",
|
|
2438
2483
|
"design - the need, computed by every reader and never stored: required when a scope entry (or a path) lies in a dialecte.risk.high area or is broader than one, or the lot carries out a plan entry of kind lot; an approval or a waiver holds only for the need it was given against (a reason of a new kind or glob reads unapproved or missing again); a recorded design gates the lot whatever its need; states approved, waived, unapproved (shown not approved), stale (shown stale since its approval: the source edited after its approval), missing, not-required (shown not required); lot start and its dry run print design required (<reasons>) or design not required, lot forecast and lot status the state line, the hand-over card a design line (passed or a warning, never failed), review.jsonl a design row and the pull request body Design: <state> by <kind>",
|
|
2439
|
-
"design - the gate: while a lot's required design is missing, unapproved or stale, tdd red in its own worktree refuses (exit 2, nothing run), gate --hook's design step fails a commit of the lot's branch, from any worktree, holding a production path (
|
|
2484
|
+
"design - the gate: while a lot's required design is missing, unapproved or stale, tdd red in its own worktree refuses (exit 2, nothing run), gate --hook's design step fails a commit of the lot's branch, from any worktree, holding a production path (after the scope step, before every other, whatever dialecte.gate.hook declares; a refused design recorded in the lot's events; a commit of tests or docs only passes; a first or merge commit and a review throwaway on <lot branch>-round-<n> skip it; a branch no lot names gives no line), lot land refuses after its rebase (nothing pushed), handover write refuses a store lot (nothing written), lot approve names design <state> among its reasons and the card's design line, read at the card's worktree, fails (handover run refuses); each reads the shared areas of the lot base its run resolved, through git, over the scope, the change's paths since that base and the staged or landed ones; a refusing path without the lot's worktree refuses; lot land records the base's shared areas again after its rebase",
|
|
2440
2485
|
"land - a lot started with --on lands as a stack: its pull request is based on the parent's branch, its body's depends-on part names the parent's pull request (a parent without one is refused: land it first); the host's stacks are probed once (gh stack): with them, the pull request is linked on the parent's (gh stack link); without, a note says why; it is never queued (lot approve queues it); before each landing it is rebased onto the parent branch's newest tip (the local branch or origin's) when it does not hold it, from its fork point (git merge-base --fork-point: only its own commits move, whatever the parent's amend or rebase); once the parent merged (its landing state: a merge, a squash read offline, or its pull request merged; never the registry's committed alone, which a hand-over run writes before anything reaches the base), the parent's landed fact is recorded and the child is rebased with git rebase --onto origin/<base> <fork point>, only its own commits moved, and its pull request retargeted to the base when the host did not; when the host already rewrote its branch on origin (a native stack), it follows that rewrite (local commits beyond its last push rebased onto it, that head the lease); a conflict names its files, the rebase undone, nothing pushed, exit 2",
|
|
2441
|
-
"land - the lot lands through its pull request: its committed HEAD (uncommitted files stay in the worktree, named), rebased onto origin/<base> when behind (a conflict undone and named, nothing pushed; with uncommitted tracked changes it is pushed as committed, the rebase left for a clean worktree), pushed with a lease, its title and body rendered from the lot's records through the repository's .github/pull_request_template.md on the rebased head before the push (as lot pr renders them; records that do not render, or a base branch origin does not hold, push nothing), its pull request opened with them as a draft or reused (edited when its title or body reads otherwise, a person's part after the kept marker kept), never queued: CI runs on every push and lot approve, a person's step, queues it; a reused pull request queued or ready whose head to push no person approved (approvals.jsonl) is taken back out of the queue before the push (auto-merge off, gh pr merge --disable-auto; a draft again, gh pr ready --undo), since an approval is for one head: a rebase that only moves the sha takes it out too, and every landing checks, so one stopped after its push heals on the next (a refusal there pushes nothing); --draft, from when lot land queued, is refused (exit 2) naming the change; the landing (number, url, branch, pushed tip) recorded in <lot folder>/landing.json; a lot already merged (its pull request merged, or its tip or its work in origin/<base>: a squash read offline) is committed: its landed fact written in <lot folder>/landed.json, its hand-over entry committed, the commits made since named (they land in a new lot), the close line printed, nothing pushed; a branch with no commit beyond origin's base is refused before any push; the committed HEAD is forecast against origin/<base> just fetched (git merge-tree, before any entry, rebase or push): a conflict refuses naming its files and ranges, a forecast that cannot run refuses (fails closed), a lot on an open parent is not compared; the lot's forecast against every other open lot is recorded (trigger land) and each pair it does not clear printed (! <lot>: <why>), for information only; the pushed head is kept in landing.json at once, so a pull request the host refused to open does not make the next push one outside lot land; the host is GitHub through gh, which never prompts",
|
|
2442
|
-
"
|
|
2486
|
+
"land - the lot lands through its pull request: its committed HEAD (uncommitted files stay in the worktree, named), rebased onto origin/<base> when behind (a conflict undone and named, nothing pushed; with uncommitted tracked changes it is pushed as committed, the rebase left for a clean worktree), pushed with a lease, its title and body rendered from the lot's records through the repository's .github/pull_request_template.md on the rebased head before the push (as lot pr renders them; records that do not render, or a base branch origin does not hold, push nothing), its pull request opened with them as a draft or reused (edited when its title or body reads otherwise, a person's part after the kept marker kept), never queued: CI runs on every push and lot approve, a person's step, queues it; a reused pull request queued or ready whose head to push no person approved (approvals.jsonl) is taken back out of the queue before the push (auto-merge off, gh pr merge --disable-auto; a draft again, gh pr ready --undo), since an approval is for one head: a rebase that only moves the sha takes it out too, and every landing checks, so one stopped after its push heals on the next (a refusal there pushes nothing); --draft, from when lot land queued, is refused (exit 2) naming the change; the landing (number, url, branch, pushed tip) recorded in <lot folder>/landing.json; a lot already merged (its pull request merged, or its tip or its work in origin/<base>: a squash read offline) is committed: its landed fact written in <lot folder>/landed.json, its hand-over entry committed, the commits made since named (they land in a new lot), the close line printed (for a lot kept on purpose, its keep and its lot unkeep instead: no line names lot close, and the line after an opened pull request asks to land it again once merged), nothing pushed; a branch with no commit beyond origin's base is refused before any push; the committed HEAD is forecast against origin/<base> just fetched (git merge-tree, before any entry, rebase or push): a conflict refuses naming its files and ranges, a forecast that cannot run refuses (fails closed), a lot on an open parent is not compared; the lot's forecast against every other open lot is recorded (trigger land) and each pair it does not clear printed (! <lot>: <why>), for information only; the pushed head is kept in landing.json at once, so a pull request the host refused to open does not make the next push one outside lot land; the host is GitHub through gh, which never prompts",
|
|
2487
|
+
"land - before anything is written (after the committed-entry check, before the stack rebase, the forecast and any entry), the lot's committed work (its lot base to HEAD) must lie inside its effective scope, as gate --hook's scope step holds it: a path outside refuses (exit 1) naming every such path and the lot scope <lot> --add ... --by lot-session to run, no entry, no rebase, nothing pushed, no pull request; uncommitted work is not held; a lot base that cannot be read refuses",
|
|
2488
|
+
"status - the state derived from the lot records (working, input-required, ready, committed, canceled, failed), the worktree and link checks, and the exact next command (and an also: line); a working real lot adds a station line (station <what> \xB7 round <r>/<cap> \xB7 effort <level>), the next station walked from its station events and checks (step events, else the worktree's tdd ledger and gate records), its next is that station's command and also keeps the manual line, which lot start prints as its next too; the manual line depends on the repository's landing flow: lot land <name> in a CI-first repository, handover write in any other; --json adds station and rounds (review, cap, beyondCap, independent) and effort { level, source, riskClass, below } (source risk-line for an effort recorded by lot risk; an effort below its risk class adds a ! effort <e> below risk class <c> line, ending (by <who>: <reason>) or (no go-ahead recorded)); --json adds forecast { main, pairs }: the newest main line of forecast.jsonl and, per other open lot, the newer of its own line against that lot and that lot's line against it (files only); a lot whose records do not hold reads damaged with its reason and next: lot stop (exit 6); a lot git reads merged (its tip or its work in origin/<base>, a squash included) shows committed, nothing written; --json adds kept: { reason, by, at } for a lot kept on purpose ({ unreadable: <n> } or { unreadableFile: <code> } for a keep.jsonl that cannot be trusted, read kept), else null, the text unchanged; a ready landing lot kept on purpose names no lot close in also; writes nothing; exit 2 for an unknown or ambiguous id",
|
|
2443
2489
|
"forecast - the conflict forecast of a lot's work (its worktree's HEAD plus its uncommitted work, as one snapshot commit made on a copy of its index with a fixed identity and date; the worktree's index, refs and files never written, ignored files left out) against main (origin/<base> as last fetched, never fetched here) and against every other open lot of its store, each by git merge-tree --write-tree, without a checkout: clean, conflict (each path with its kind, content with the line ranges between the markers), exclusive (every conflicted path a lock file) or unknown with its reason (git older than 2.38, a damaged lot, worktree of <lot> missing, <ref> does not resolve, snapshot of <lot> failed, merge-tree failed, forecast of <lot> over 20 s: each git step is limited to 20 seconds); each line also lists the files both sides changed (shares); a path that conflicts against main for either lot is shown once, on the main line; the verdict is the worst line (unknown > conflict > exclusive > clean); default lot: the one whose worktree holds the current folder; --against <lot> compares with main and that lot only; appends the run to the lot folder's forecast.jsonl (one line per comparison, one write, each line at most 4,096 bytes: 10 shared paths, 10 conflict paths, 3 ranges per path, the rest counted in moreShared and more) and a forecast event (its trigger: start, scope, gate, forecast or land, the verbs that record a run); a pair whose lots both change a lock file reads exclusive even when it merges clean; a gate --fast or --full run in a lot's worktree forecasts the lot as its last step and prints forecast: <verdict> with one ! <against>: <why> line per comparison it does not clear (a warning only: the gate's verdict and exit never change); the card shows a conflicts line on a conflict or an unknown, a pair seen from either lot (the newer line wins), and its scope line names each open lot it shares entries with (forecast <verdict>, <age>); --json { lot, verdict, lines }; exit 0 clean, 1 a conflict or an exclusive path (or the run could not be written), 3 unknown, 2 usage, an unknown id, a damaged, closed or simulated lot, or --against the lot itself or a lot of another store; a clean forecast does not promise a semantic merge, three lots landing together, or work not written yet",
|
|
2444
2490
|
"risk - reads the lot folder's (or hand-over folder's) risk.jsonl and the worktree's diff against the lot's base, writing nothing: the risk class derived now with its reasons (high: a changed file in the package's dialecte.risk.high list, the base's and the worktree's together, an added destructive call or git argument on a line that is not a comment alone, a runtime package (one with an exports map) whose API index changed or whose export source changed against the base without its index; light: docs, a version bump, or at most 40 changed lines in at most 3 files; medium otherwise; a declared reason reads <file>: declared [<glob>]), the effort recorded, the cap of review rounds, a ! line when the effort is below the class, ending (by <who>: <reason>) or (no go-ahead recorded); a derivation that cannot run (no commit to compare to) falls back to the last derived line, else class unknown, and ends with ! risk class not derived: <reason>, exit 0; --json the same as one object, under a versioned JSON schema (lot-risk.schema.json, version 1); exit 2 for usage, an unknown id or a damaged store lot (lot risk: <name> damaged: <reason>)",
|
|
2445
2491
|
"risk --effort - appends one effort line { schema, kind: effort, at, effort, class?, by, reason? } to risk.jsonl (the last line wins); the same effort, class and reason as the last line answers already, nothing written; an effort below the class needs --reason; a derivation that cannot run compares against the last derived line, or nothing, and records; --by is required; --json is refused here; refused (exit 2, nothing written) for usage, below without --reason, a forbidden word, a damaged store lot, or a lot that is committed, canceled or failed; exit 1 when the line cannot be written",
|
|
2446
2492
|
"wait - returns the status as soon as the lot needs someone (exit 0 ready or committed, 1 failed or canceled, 3 input-required, 4 a limit) or --timeout is reached (5); a damaged lot at once (6); a real lot is read every second and nothing written, a simulated lot is played to its next blocking point, and answered at once when nothing is left to play (5 while it works)",
|
|
2447
2493
|
"answer - records the answer to an open question once (the same answer again: already); a person question needs --by <who>; a damaged lot takes none (exit 2); runs the onAnswered hooks; next: lot wait",
|
|
2448
2494
|
"result - never blocks, writes nothing: a ready or committed lot gives its hand-over (card, show and run lines), worktree, branch and answered questions; failed or canceled the last reason (exit 1); input-required the open questions (3); working exit 5; damaged exit 6",
|
|
2449
|
-
"stop - ends the lot: refused once committed; a pending hand-over is abandoned first (refused while its run is in progress), then a canceled transition with the reason and --by (caller without it); already canceled exits 0 writing nothing; moves no worktree and deletes nothing; a damaged lot has its folder moved to <git common folder>/dialecte-lots-aside/ with a stopped.json (refused while a live run marker holds it), its index kept claimed",
|
|
2450
|
-
"scope - changes a started lot's scope on the record, its brief left as published; --by and --reason are required on every call; --drop removes scope entries (an entry, or a folder and the entries inside it), --add widens the scope (a path inside a held entry is recorded as its own entry; only an equal entry answers already holds, nothing written, exit 0); --drop and --add may come in one call to narrow a folder to files: one append, the drop line first; a drop is refused for a path that is no entry or lies inside a wider one, a worktree that cannot be read, a drop leaving the lot no scope, or a file the lot
|
|
2495
|
+
"stop - ends the lot: refused once committed; a pending hand-over is abandoned first (refused while its run is in progress), then a canceled transition with the reason and --by (caller without it); already canceled exits 0 writing nothing; moves no worktree and deletes nothing; a damaged lot has its folder moved to <git common folder>/dialecte-lots-aside/ with a stopped.json (refused while a live run marker holds it), its index kept claimed; a damaged lot kept on purpose is refused, nothing moved, naming its lot unkeep first; a kept lot stopped stays kept (canceled and kept: its items stay)",
|
|
2496
|
+
"scope - changes a started lot's scope on the record, its brief left as published; --by and --reason are required on every call; --drop removes scope entries (an entry, or a folder and the entries inside it), --add widens the scope (a path inside a held entry is recorded as its own entry; only an equal entry answers already holds, nothing written, exit 0); --drop and --add may come in one call to narrow a folder to files: one append, the drop line first; a drop is refused for a path that is no entry or lies inside a wider one, a worktree that cannot be read, a drop leaving the lot no scope, or a file the lot changed in its worktree or committed since its lot base inside a dropped entry that no entry left covers (an equal entry, a literal folder holding it, or a glob matching it; the call's adds count), or a lot base that cannot be read; an add is refused when a path is no valid scope entry, or when it meets another open lot's scope and that lot still holds it: the lot's work is forecast against it (trigger scope, recorded only once the add stands) and a clean pair adds with no overlap record; a forecast conflict (its files and ranges), a met lock file, a forecast that cannot run, or a damaged or unreadable lot refuse, unless --overlap-ok accepts an overlap that names its paths (a damaged lot whose scope reads too, its damage recorded) (recorded in overlaps.jsonl before the add with the other lot, the met pairs, --by and --reason, undone with a taken-back add; a lot whose scope cannot be read stays refused; --overlap-ok without --add is refused); a call whose lines would pass the line limit is refused; an add a lot started or widened meanwhile meets is taken back by an undo line, the entries a drop of the same call removed put back (exit 2), a take-back that would pass the line limit refusing the call first (exit 2), a take-back that cannot be written exiting 1 naming the paths and that lot; each change is one line of scope-changes.jsonl ({ schema, at, op, paths, by?, reason? }) and a scope.changed event; the effective scope (the brief's with the changes) is what the overlap guard, lot status and the card read; a damaged, simulated, committed, canceled or failed lot, a forbidden word and a change line that does not read are refused (exit 2), nothing written; a line that cannot be written exits 1",
|
|
2497
|
+
"keep - keeps a lot's items on purpose (its worktree, review throwaways and branches stay after it is committed or canceled): appends { schema, at, op: keep, by, reason } to the lot folder's keep.jsonl and a keep.changed event, in any state, damaged included; --by and --reason required, one line each, the reason at most 200 characters, orchestrator in any casing recorded orchestrator; a forbidden word, a path, a link, a reference or a plan entry id refused (exit 2, nothing written); the reason it is kept with already answers kept already, nothing written (another reason appends: the history stays); a keep.jsonl with a line that does not read, or that cannot be read, is refused naming it (repair it by hand); an event that cannot be written is one printed line, never an exit; prints <name> kept by decision: <why>; --json { lot, kept, written, next }; a keep never changes the lot's state, its scope's hold or any guard",
|
|
2498
|
+
"unkeep - releases a kept lot: appends { schema, at, op: unkeep, by, reason } and a keep.changed event, under the rules of keep; refused (exit 2, nothing written) from the lot's own worktree or one of its review throwaways (-round-<n>, -verify): a lot's own session cannot release what a person kept; a lot not kept answers not kept, nothing written; prints <name> no longer kept and, for a committed or canceled lot whose worktree or branch is left, next: lot prune <name>",
|
|
2451
2499
|
"station - appends one station event (by: host) to the lot's events.jsonl, never rewriting a line: start answers its run and the end command; end pairs with --run, else with the one open start of its station, step, round and attempt (several: refused), else repeats the last such end carrying a cost field with the same fields (already, nothing written), else is recorded alone (started: null); --event <id> again answers the first event (already) or is refused when its fields differ; start is refused on a committed, canceled or failed lot, end is accepted in every state; a simulated lot writes simulated: true; text fields refuse control, line-break and direction characters, vendor, model, tier, effort and session at most 80 characters, step, round and attempt 1-999, tokens, runs and duration non-negative, at most 50 skills (hash: sha256 of the path or of the synced <folder>/<name>/SKILL.md, else null), a verdict of approve, back, fix-then-repass, fixed, disagreed, answered, failed, limit; a line over 4,096 bytes is refused; --from takes the same fields plus phase (start|end) as one JSON object, unknown keys refused, every fault at once; --json { recorded: new|already, run, next }",
|
|
2452
2500
|
"--by - one line, not empty, checked before the lot is read (answer and stop)",
|
|
2501
|
+
"--by orchestrator - refused (exit 2, nothing run) for every verb that signs, run from a lot's workplace (its own worktree, a -round-<n> or -verify throwaway beside it), whichever --by of the line names it, in any casing and spacing: a lot signs --by lot-session; the orchestrator signs from the main checkout",
|
|
2453
2502
|
"<id> - an index (171 = 0171), a full name, a lot folder or .dialecte/lot; a write verb needs an index unique across every store of the store list, a word naming an existing folder is that folder",
|
|
2454
2503
|
"exempt|accept|revised|gone|moved|mutation - write .dialecte/lot.json at the package root (tab JSON), keeping the rest",
|
|
2455
2504
|
"moved - a case of the lot moved by a split or a rename of its file or describe after its red (its own title is part of its test call): two cases, or a file (never a glob) and the file or glob its cases moved to under the same names, several files into one each with its entry; tdd red carries the red (flag moved) when the test call and the test code it reads are as that red froze them and it does not pass on the base production, else refuses",
|
|
@@ -2459,21 +2508,25 @@ var COMMAND_MAP = {
|
|
|
2459
2508
|
"mutation - absent: changed when the diff touches the declared scope, off otherwise; gate = changed that the hand-over waits for",
|
|
2460
2509
|
"finding - appends R<n>-<k> open to <folder>/findings-ledger.md (made when absent)",
|
|
2461
2510
|
"decide - rewrites that finding's state cell, every other byte kept",
|
|
2462
|
-
"snapshot - copies what git status lists to round-<n>/, the deletions to round-<n>.deleted, HEAD to round-<n>.base, { schema, at, stateHash } to round-<n>.state; the folder is a lot folder or stays outside every repository; -- ends the options; the risk class is derived again from the diff first and appended to risk.jsonl as a derived line only when the snapshot goes ahead, a refused snapshot writing nothing (a derivation that cannot run prints ! risk class not derived: <reason> and appends nothing); the cap of review rounds is the rounds of the higher of the effort's class and the class derived now (else the last derived line's) (low or light 1, medium 2, high 3; the effort is the last line of lot risk --effort, else the lot's; a class above the effort prints ! risk class now <class> (<reason>): cap <cap>); with no effort recorded the cap is 1 and a later round is refused (exit 2) naming dialecte lot risk <folder> --effort low|medium|high --by <who>; a round above the cap of an effort is refused (exit 2), naming what set the cap ((effort <e>), or (effort <e>, risk class <c>) when a class raised it), unless --beyond-cap --by <who> --reason <text> gives the go-ahead, written to decisions.md as round <n> beyond the cap of <cap>: <reason> before the snapshot (once: a retry finds it); --beyond-cap within the cap, --by or --reason without it, and --by or --reason holding a forbidden word are refused (exit 2), nothing written",
|
|
2511
|
+
"snapshot - from anywhere, copies what git status lists in the lot's own worktree (a plain hand-over folder: the work tree it runs in; a lot with no worktree, or whose worktree is no work tree, refused naming it, nothing written) to round-<n>/, the deletions to round-<n>.deleted, HEAD to round-<n>.base, { schema, at, stateHash } to round-<n>.state; the folder is a lot folder or stays outside every repository; -- ends the options; the risk class is derived again from the diff first and appended to risk.jsonl as a derived line only when the snapshot goes ahead, a refused snapshot writing nothing (a derivation that cannot run prints ! risk class not derived: <reason> and appends nothing); the cap of review rounds is the rounds of the higher of the effort's class and the class derived now (else the last derived line's) (low or light 1, medium 2, high 3; the effort is the last line of lot risk --effort, else the lot's; a class above the effort prints ! risk class now <class> (<reason>): cap <cap>); with no effort recorded the cap is 1 and a later round is refused (exit 2) naming dialecte lot risk <folder> --effort low|medium|high --by <who>; a round above the cap of an effort is refused (exit 2), naming what set the cap ((effort <e>), or (effort <e>, risk class <c>) when a class raised it), unless --beyond-cap --by <who> --reason <text> gives the go-ahead, written to decisions.md as round <n> beyond the cap of <cap>: <reason> before the snapshot (once: a retry finds it); --beyond-cap within the cap, --by or --reason without it, and --by or --reason holding a forbidden word are refused (exit 2), nothing written",
|
|
2463
2512
|
"choice - appends | decision | who | yyyy-mm-dd | to <folder>/decisions.md (made when absent)",
|
|
2464
2513
|
"standard - writes <folder>/standard.json (state, note, time), read by the card's standard line; outside (the lot's asks answered outside the documents, written by ask itself) warns, and fails at effort high unless the record's confirmed flag is true (written by ask once a person confirmed every outside answer; by hand false): the flag decides, never the note text",
|
|
2465
|
-
"delta - per file, the diff from round-<n-1>/ to the worktree now; --worktree adds a throwaway worktree holding round n-1 and prints its removal command",
|
|
2514
|
+
"delta - per file, the diff from round-<n-1>/ to the lot's own worktree now, from anywhere (a plain hand-over folder: the work tree it runs in); --worktree adds a throwaway worktree holding round n-1 and prints its removal command; for a lot kept on purpose it prints kept by decision: <why> (by <who>, <date>): the throwaway stays with the lot instead, and --json carries kept and no removal",
|
|
2466
2515
|
"recap - the <details> part of a pull request from the hand-over's records only; writes nothing",
|
|
2467
|
-
"verify -
|
|
2468
|
-
"report - reads files only (no git, no process, nothing written): the lot's stations, tokens, money, time, suites per station by time, heavy steps, folders and review rounds from its events.jsonl, transitions, ledger and cards.log; a number nobody reported is unknown, never 0, and a step family whose runs may be unrecorded reads unknown with the reason; --feature lists every lot of that feature in every store (simulated ones counted apart, listed by --simulated; a lot whose folder is gone is read from its cards.log line); next: the lot's own next command",
|
|
2516
|
+
"verify - from anywhere (the main checkout included): appends { schema, at, by, note, state } to <folder>/verify.jsonl in one write, state the state hash of the lot's own worktree (a plain hand-over folder: the work tree it runs in); a lot with no worktree (a simulated lot) or whose worktree is no work tree is refused naming it, nothing written; a change of the tree after the last round-<n>/ snapshot is a late fix: the card warns and handover run refuses it (exit 2) until a verify covers the current state (one later change needs a new verify); a snapshot with no round-<n>.state (an older cli) is not checked; no snapshot yet (nothing is late), --by or --note missing, blank or not one line, or holding a forbidden word are refused (exit 2), nothing written",
|
|
2517
|
+
"report - reads files only (no git, no process, nothing written): the lot's stations, tokens, money, time, suites per station by time, heavy steps, folders and review rounds from its events.jsonl, transitions, ledger and cards.log; a number nobody reported is unknown, never 0, and a step family whose runs may be unrecorded reads unknown with the reason; --feature lists every lot of that feature in every store (simulated ones counted apart, listed by --simulated; a lot whose folder is gone is read from its cards.log line), a kept lot marked kept; next: the lot's own next command, for a committed or canceled lot kept on purpose whose worktree or branch is left lot unkeep (prune would keep everything); a kept lot adds a kept line and kept in --json",
|
|
2518
|
+
"report --kept - every lot kept on purpose of every store of the list and of the folder it runs from, real, simulated and damaged, each read once and filtered on its keep first: <name> <state> kept since <date> by <who>: <why> \xB7 worktree present|gone|unknown \xB7 branch present|gone|unknown, sorted by name, then <n> kept lot(s) (no kept lot: exit 0); next lot unkeep; --json { lots: [{ lot, state, kept, worktree, branch, next }] }; an id, --feature or --simulated beside it exits 2",
|
|
2469
2519
|
"export - copies a lot folder to <dir>/<full name>/ without asks/ (links kept as links, those pointing outside it named), adding the lot's cards.log lines and registry entry; refused for a <dir> inside a git work tree and for an existing <dir>/<full name>; every copied file compared by size and sha256 (events.jsonl as a prefix) before the rename, one more copy on a difference; the source is never written",
|
|
2470
|
-
"prune - removes what a committed or canceled lot leaves behind, each item on its own proof: the lots named by id, else the lots of --feature in every store of the list, else every lot of every store (--all), else every lot of the store of the folder it runs from; base branches fetched first; per lot its line (state, landing) and one line per item - its worktree (the same proof as lot close: kept with why), its review throwaways (recorded by a step's throwaway-add, or cut by hand at a commit of the lot with no commit of their own: they go when every changed path is held by a commit, else kept naming the path held nowhere), its branch and its throwaways' branches; an open lot's items are kept, reason lot <name> <state>; a branch is kept while it is the base, the branch the main checkout is on, an open lot's branch, the stack parent of an open lot, a pending hand-over's or a stash's, while deleting it would lose a commit (a canceled lot's names its commits and the command to delete it anyway), and goes after its worktree when one checks it out; a lot whose worktree is gone and whose landing is not proven is listed stale with the command to stop it; without --yes the plan only; --yes acts in order (worktrees, throwaways, branches), each proof read again at the move: a throwaway proved again after its move, a branch deleted at its proved tip only (git update-ref -d), a branch still parked in the trash listed waiting for the trash; a throwaway's --force removal starts only after its second proof, so a file written into it in that moment goes with it; a deleted branch is restorable with git branch <branch> <tip> (its removing line in cards.log holds the tip) until git's garbage collection, its upstream config is not restored; worktrees git refused to delete from the trash for more than ten minutes are listed with their git status and the forced removal, a throwaway its second proof left in the trash with why and the command that moves it back; a git read an item's decision rests on that fails keeps the item (could not read <what>: <git's error>), never reads as empty; ids, --feature and --all exclude each other; exit 1 when an item meant to go was kept (one another run removed since the plan is no failure), 2 for a usage error or an id that names no lot or more than one",
|
|
2471
|
-
"close - closes a lot or a hand-over: a hand-over of the registry (by name or index), or a lot (its id, name or index), with no registry entry needed; first the landing of every lot the arguments reach (the lot named, the lot an entry registers, the open lots naming an entry's worktree and branch) is read, with the host asked for every lot it reads (one never pushed by lot land, its branch deleted on origin after the merge, included): merged (its tip on the base, its pull request merged - the one landing.json names, else the newest of its branch whose head the branch reached, a pull request opened by hand included - or its work contained in origin/<base>, a squash read offline) writes its landed fact in <lot folder>/landed.json, commits its pending entry (a lot with none is closed as the lot itself: no registry entry is made) and every outcome reaching it carries the line landed on <base> at <commit>: <how>, landed in --json; a lot named by its id that is open is kept with lot <name> <state>: why (its work not in the base, its pull request closed, the commits it holds since part of it landed, or the host's silence); a lot whose branch and worktree are gone reads its landing from the latest card line of its own or of a hand-over on its branch whose entry names its worktree, written since the lot was made; a canceled lot closes, its landing never read; then for each committed or abandoned hand-over, and each committed or canceled lot named by its id: its final record first, the card line in the repository's cards.log (a catch-up one when none exists, for every hand-over of the worktree, read back), then a removing line, then its worktree moved to .worktrees/_trash/ and removed in the background by git worktree remove without --force (git refuses one written into since the check: it stays in .worktrees/_trash/), its node_modules parked in .worktrees/_pool-<repository>-<n>, its caches to their own _trash/ entries, then a removed line (trashed or kept); a commit dropped from its branch (reset or rebased away), held by the branch reflog alone, is named under the closed line: git expires it with that reflog (gc.reflogExpireUnreachable), as it would have with the worktree's; a landed or canceled lot's own
|
|
2520
|
+
"prune - removes what a committed or canceled lot leaves behind, each item on its own proof: the lots named by id, else the lots of --feature in every store of the list, else every lot of every store (--all), else every lot of the store of the folder it runs from; base branches fetched first; per lot its line (state, landing) and one line per item - its worktree (the same proof as lot close: kept with why), its review throwaways (recorded by a step's throwaway-add, or cut by hand at a commit of the lot with no commit of their own: they go when every changed path is held by a commit, else kept naming the path held nowhere), its branch and its throwaways' branches; a lot kept on purpose (lot start --keep, lot keep) keeps every item, reason kept by decision: <why> (by <who>, <date>), before any proof, damaged or not; an open lot's items are kept, reason lot <name> <state>; a branch is kept while it is the base, the branch the main checkout is on, an open lot's branch, the stack parent of an open lot, a pending hand-over's or a stash's, while deleting it would lose a commit (a canceled lot's names its commits and the command to delete it anyway), and goes after its worktree when one checks it out; a lot whose worktree is gone and whose landing is not proven is listed stale with the command to stop it; without --yes the plan only; --yes acts in order (worktrees, throwaways, branches), each proof read again at the move, the lot's keep first (a keep, a damage or a folder gone since the plan keeps the item): a throwaway proved again after its move, a branch deleted at its proved tip only (git update-ref -d), a branch still parked in the trash listed waiting for the trash; a throwaway's --force removal starts only after its second proof, so a file written into it in that moment goes with it; a deleted branch is restorable with git branch <branch> <tip> (its removing line in cards.log holds the tip) until git's garbage collection, its upstream config is not restored; worktrees git refused to delete from the trash for more than ten minutes are listed with their git status and the forced removal, a throwaway its second proof left in the trash with why and the command that moves it back; a git read an item's decision rests on that fails keeps the item (could not read <what>: <git's error>), never reads as empty; ids, --feature and --all exclude each other; exit 1 when an item meant to go was kept (one another run removed since the plan is no failure), 2 for a usage error or an id that names no lot or more than one",
|
|
2521
|
+
"close - closes a lot or a hand-over: a hand-over of the registry (by name or index), or a lot (its id, name or index), with no registry entry needed; first the landing of every lot the arguments reach (the lot named, the lot an entry registers, the open lots naming an entry's worktree and branch) is read, with the host asked for every lot it reads (one never pushed by lot land, its branch deleted on origin after the merge, included): merged (its tip on the base, its pull request merged - the one landing.json names, else the newest of its branch whose head the branch reached, a pull request opened by hand included - or its work contained in origin/<base>, a squash read offline) writes its landed fact in <lot folder>/landed.json, commits its pending entry (a lot with none is closed as the lot itself: no registry entry is made) and every outcome reaching it carries the line landed on <base> at <commit>: <how>, landed in --json; a lot kept on purpose keeps its worktree, reason kept by decision: <why> (by <who>, <date>); a lot named by its id that is open is kept with lot <name> <state>: why (its work not in the base, its pull request closed, the commits it holds since part of it landed, or the host's silence); a lot whose branch and worktree are gone reads its landing from the latest card line of its own or of a hand-over on its branch whose entry names its worktree, written since the lot was made; a canceled lot closes, its landing never read; then for each committed or abandoned hand-over, and each committed or canceled lot named by its id: its final record first, the card line in the repository's cards.log (a catch-up one when none exists, for every hand-over of the worktree, read back), then a removing line, then its worktree moved to .worktrees/_trash/ and removed in the background by git worktree remove without --force (git refuses one written into since the check: it stays in .worktrees/_trash/), its node_modules parked in .worktrees/_pool-<repository>-<n>, its caches to their own _trash/ entries, then a removed line (trashed or kept); a commit dropped from its branch (reset or rebased away), held by the branch reflog alone, is named under the closed line: git expires it with that reflog (gc.reflogExpireUnreachable), as it would have with the worktree's; a landed or canceled lot's own lot files (its root .dialecte/lot link naming the lot's folder): the root's .dialecte/lot.json and each package's (the folder of a package.json git tracks, or one the lot deleted), archived in that folder first (lot prune and lot close --feature archive the same way), the root's as lot.json and a package's as lots/<package path>/lot.json, or lot.landed.json beside a lot.json holding other bytes, never over one and read back, kept naming both archives when both hold other bytes; every lot file it counted read again right before the move, one rewritten since keeping the worktree, nothing archived; a lot file is removable only when empty or byte-equal to an archive of its own package path; kept first when an open lot names it (reason lot <name> <state>), then with why when it is the main checkout, on another branch than the hand-over's, locked, another hand-over of the same worktree is neither committed nor abandoned, a link from outside it points into it, dirty, a landed lot holds commits made since its landing (<n> commit(s) made since its landing: <commits>), its removal would lose a commit (<n> commit(s) its removal would lose: <commits>: a commit only its HEAD or HEAD reflog reaches, that no surviving branch, branch reflog, tag, landed tip or remote-tracking ref holds, nor the same change at the same place (a commit of theirs with the same diff, its hunk line numbers included) - a commit made on a detached HEAD), it holds ignored files its removal would delete that nothing else holds (rebuilt folders, dialecte.rebuiltIgnored folders, the .dialecte/lot link, an empty or archived .dialecte/lot.json and copies byte-equal to the main checkout's go), a process or a mutation run works there, lot close itself runs from inside it, or the processes are not known, or the final record cannot be kept or the lot's commit is not known; the branch never touched; a hand-over already closed, or a lot whose worktree a recorded removal moved, answers already closed, exit 0, nothing moved (a lot whose worktree is gone with no such removal: nothing to close), its lot's landed fact still recorded when the host proves the merge (its landed line beside already closed); exit 1 when one is kept, 2 when a name or index is neither a hand-over nor a lot (the others are still closed)",
|
|
2522
|
+
"close - --feature <name> closes a feature at a pipeline's last step: its lots in every store of the list (simulated ones left out); none answers no lot of the feature, exit 1; a lot of it neither committed nor canceled refuses the whole close, listing each with its state, exit 2, nothing moved; else lot prune's plan without branches, acted at once (removing lines by lot-close): every lot worktree and recorded review throwaway of the feature closed on its own proof, branches untouched and not listed (lot prune removes them); then the rehearsal clones of the machine's scratch roots whose marker names a hand-over folder of a lot of the feature (its lot folder, or the folder of a committed or abandoned entry naming its worktree and branch): a dead one (its pid gone, or running with another start time) that no process works in and no link reaches (links read in this workspace and every workspace of the feature's lots; processes, links and keeps read again before the moves) moved to the workspace's .worktrees/_trash for its own .worktrees/_scratch, else its scratch root's dialecte-trash, with removing and removed lines (item clone); one alive, whose marker cannot tell (no marker, no pid, no start time, an unreadable one), a process works in, or the processes or links cannot be read, kept and named for dialecte worktree prune; a kept lot keeps every item, clones included, with its kept text; a clone of another hand-over is listed, never moved; --json { open, lots: [{ lot, state, landing, items: [{ item: worktree|throwaway|clone, name, decision, outcome }] }], clones: [{ clone, kept }] }; a lot name beside --feature is a usage error (exit 2); exit 0 when every item of the feature went, 1 when one was kept"
|
|
2472
2523
|
],
|
|
2473
2524
|
exitCodes: [
|
|
2474
2525
|
"1 risk --effort: the line could not be written",
|
|
2475
2526
|
"2 risk: usage; unknown id; a damaged store lot; --effort below the class without --reason, no --by, a forbidden word, a lot that is committed, canceled or failed",
|
|
2476
|
-
"2 start: an effort below the risk class without --by and --reason",
|
|
2527
|
+
"2 start: an effort below the risk class without --by and --reason; --keep with a brief keep",
|
|
2528
|
+
"2 keep, unkeep: usage; unknown or ambiguous id; a forbidden word, a path, a link, a reference or a plan entry id; keep.jsonl unreadable; unkeep from the lot's own worktree or one of its review throwaways (-round-<n>, -verify)",
|
|
2529
|
+
"2 report --kept: an id, --feature or --simulated beside it",
|
|
2477
2530
|
"1 station: the event could not be written",
|
|
2478
2531
|
"2 station: usage; refused (a field, the lot state, open starts, --event with other fields, over 4,096 bytes); --run naming no start",
|
|
2479
2532
|
"1 report: --feature names no lot",
|
|
@@ -2483,7 +2536,8 @@ var COMMAND_MAP = {
|
|
|
2483
2536
|
"3 wait, result: input-required",
|
|
2484
2537
|
"4 wait: an agent failed or hit a limit, run again",
|
|
2485
2538
|
"5 wait --timeout, result: still working",
|
|
2486
|
-
"6 status, wait, result: the lot is damaged: a person must look"
|
|
2539
|
+
"6 status, wait, result: the lot is damaged: a person must look",
|
|
2540
|
+
"2 every verb: the cli is older than the version a repository the invocation reaches asks for (the cli floor); nothing done"
|
|
2487
2541
|
],
|
|
2488
2542
|
example: 'dialecte lot finding ../handover --round 1 --severity nit --at src/a.ts:3 "a finding"'
|
|
2489
2543
|
},
|
|
@@ -2553,7 +2607,7 @@ var COMMAND_MAP = {
|
|
|
2553
2607
|
"the default lists end with a scoped rules step (dialecte rules); a step whose run starts with the word dialecte runs as the gate's own cli (its node and entry file, never node_modules/.bin), its line ending (dialecte <version>); a missing dialecte bin fails that step, never the gate",
|
|
2554
2608
|
"a green record of the same tree, install and steps answers the steps after a fresh tdd step; --no-reuse runs them",
|
|
2555
2609
|
"--full and --release hold the machine awake while they run (macOS: caffeinate -i -w <pid>; DIALECTE_KEEP_AWAKE=0 turns it off); a run that spanned a sleep keeps sleptMs on its record and the card says it",
|
|
2556
|
-
|
|
2610
|
+
`--hook - in a commit hook, no test suite (CI runs it on every push): on a commit of a lot's branch, from any worktree, the scope step comes first, whatever dialecte.gate.hook declares: the lot's whole work up to the commit (its lot base against the index tree being committed, both sides of a rename, deletions included) must lie inside its effective scope (the brief's with lot scope's changes; .dialecte/ records left out), else the commit fails naming every path outside and the lot scope <lot> --add ... --by lot-session to run (a path holding a glob character gets no add), no other step run, the failed part in the lot's events; a review throwaway, a committed, canceled, failed or simulated lot, a first commit and a merge in progress skip it; a damaged lot or a lot base that cannot be read fails it; with no base branch it holds the staged change (held against HEAD: no base branch); a branch no lot names gives no line; then the design step; with "dialecte.gate.hook" declared, the tdd receipts of the lot first (every new or changed case since the lot base proven red then green, unchanged, accepted or revised, its newest green at the production as committed; a stale green names dialecte tdd green (measured from the lot base); a first or merge commit skips it), then the declared steps (the cli: check, then rules on the touched files); without one, every step of --full, a scoped one against the hook base; each step answered by a green record (any mode) of the committed tree and install that ran it as it is now, else run; the running line names the steps it runs`,
|
|
2557
2611
|
'--release - alone: "dialecte.gate.release" (default: the --full steps), every scoped step against the empty tree (--base feeds only the tdd step); records dialecte-gate-release.json; each of its steps answers a hook step of the same step hash (a scoped one at any base: it checked everything); its green record answers a rehearsal, contrib and the card when the list covers full (same name, run, counts and changedOnly for every full step)',
|
|
2558
2612
|
`scoped steps ("scoped": true) get DIALECTE_GATE_BASE, _TREE, _CHANGED (the changed paths byte for byte, NUL-separated, relative to the repository top as git diff --name-only names them; a declared failing path is relative to the package root) and _SELECTION, where they write { schema: 1, base, tree, changed, selected: [{ id, reasons }], skipped: [{ id, reason }] } (both lists required, reasons non-empty); the base is --base <ref>, else the merge-base with the base branch (the first found: "dialecte.baseBranch", origin/HEAD, main, master; each local, else on origin), else the empty tree; a local base branch holding commits origin's lacks: a note naming the count, the base read from origin's; select from the working files; without the gate (no DIALECTE_GATE_SELECTION): select everything`,
|
|
2559
2613
|
'a step whose run is npm run <script> the package lacks is not wired: a default step fails a --full or --release run (a --fast one says it and goes on), a declared step fails in every mode; then no step runs, the others read not run: a step of the list is not wired; "dialecte": { "gate": { "skip": { "<default step>": "<reason>" } } } (dialecte.gate.skip) opts a default step out, a warning with its reason',
|
|
@@ -2594,7 +2648,7 @@ var COMMAND_MAP = {
|
|
|
2594
2648
|
"without files: the changed list a scoped gate step hands (DIALECTE_GATE_CHANGED), else the files changed against HEAD and the new ones; a file it cannot read or parse is an error",
|
|
2595
2649
|
"quality rules: argument-mutation, query-in-loop, long-function on implementation files; table-branch, without-export-xml, export-without-queries, fixture-builder, plan-tag on test-shaped files; on test-shaped Dialecte changes: xml-splice, xml-replace, transaction-spy, act-repeats-call, act-snapshot, act-format-check, inline-document-long, expected-fixture, fixture-case-comment (warning), test-file-long, fixture-file-long, fixtures-module, fixture-builder an error; in an app only Dialecte-change script files are judged, the others counted in one line (a contributor package is never an app); with the gate base, an error on a line the change did not add is a warning; without a gate base, or with an empty-tree one (as gate --release hands), the order every caller shares: in the worktree of a store lot its lot base read from git (its fork point from the base branch, or from the line of the lot it was started on while that lot is open; never the base recorded at its start, which a rebase leaves behind; with no base branch found, the newest of the commit it recorded at its start, when HEAD holds it, and a release tag descending from that commit, else no base), else the merge-base with the base branch (skipped, for an empty-tree base and for a run without a gate base, when it is the commit of HEAD), else the last release tag <name>@v<version>, else no base and every error kept; a lot base that cannot be read (its stack parent unreadable) is no base, never the merge-base, said in a rules: no base (<why>) line by every run that reads the order: without a gate base, with an empty-tree one, and on the contrib rules row; a run without a gate base prints one line naming it (rules: base <sha> (the lot <name> | the merge-base with <branch> | the merge-base with the base branch | the release tag <tag>), or rules: no base (<why>) when the lot base cannot be read)",
|
|
2596
2650
|
"changelog-edit (an error), in a package keeping a changes/ folder: CHANGELOG.md edited without the package version bumped; write the entry in changes/<lot>.md (dialecte changelog)",
|
|
2597
|
-
"released-changelog (an error, no opt-out), on CHANGELOG.md in every package: a released ## [<version>] section the change altered - lines added, removed or reordered, the section removed, or its heading repeated - judged against the base branch and where the change left it (a section main corrected after the branch point, or a release the branch predates, is no finding); the release base a rehearsal hands its hooks (DIALECTE_RELEASE_BASE, to the scoped rules step alone) replaces the base branch; no base branch: one line, not judged (--json: releasedChangelogNotJudged)",
|
|
2651
|
+
"released-changelog (an error, no opt-out), on CHANGELOG.md in every package: a released ## [<version>] section the change altered - lines added, removed or reordered (a run of blank and link reference definition lines holding a definition compares as one blank line: a definition renders nothing), the section removed, or its heading repeated - judged against the base branch and where the change left it (a section main corrected after the branch point, or a release the branch predates, is no finding); the release base a rehearsal hands its hooks (DIALECTE_RELEASE_BASE, to the scoped rules step alone) replaces the base branch; no base branch: one line, not judged (--json: releasedChangelogNotJudged)",
|
|
2598
2652
|
"--base <ref>: the files changed from the merge-base of <ref> and HEAD to the worktree are judged (deletions left out; uncommitted ones in), that merge-base the base of the softening as a gate base would be; files given with it, or a ref naming no commit, exit 2",
|
|
2599
2653
|
"base-aware rules (warnings, against the base the run judges the change from: --base, else the lot base, else, in a run that is no scoped gate step, the base branch merge-base; never a release tag, an empty tree nor the gate base): duplicate-read, an added function reading the same element and three or more attributes as an existing one (a named set counts three), or whose name shares two words with an existing function it does not call (generic words such as read, list, file, path or name left out); shared-export-changed, an export imported by a file of another folder (a sub-folder included) newly shared, re-signed (its parameters, return type, or a sibling .types.ts type they name), its body changed, or removed; docs-not-updated, in a contributor library (no bin), a public api.json entry added, re-signed or removed whose doc page (doc/ Markdown or README naming its last two route segments, or its whole route in a code span) the change did not touch; one line names where they stand: quality: since <short> (lot | base-branch | flag), quality: not run (no lot) in a scoped gate step outside any lot, no line when there is no base or no package.json; notes under it: public API: <route> removed: still named by <pages>, ! public API unknown (<why>), aliases changed, when a tsconfig or Vite config changed (the base edges read with the aliases of the tree); a run that judged the whole change writes dialecte-quality.json in the worktree git folder; contrib never runs them",
|
|
2600
2654
|
"--json: dialecteChanges (the verdict of each file), notJudged, baseLine, qualityLine, quality (the base, the examined files, duplicates, sharedExports, publicApi, docs); described by rules.schema.json (schema 1)",
|
|
@@ -2610,7 +2664,7 @@ var COMMAND_MAP = {
|
|
|
2610
2664
|
summary: "The contributor checks of a dialecte package (profile contributor)",
|
|
2611
2665
|
usage: ["dialecte contrib [--no-reuse] [--json]"],
|
|
2612
2666
|
notes: [
|
|
2613
|
-
'after gate --full and before handover: rules on the changed files (against the base of the lot, the order the rules step of the gate shares: the lot base of the store lot read from git (its fork point, never the base recorded at its start), else the merge-base with the base branch, as the rules step of the gate takes it, else the last release tag <name>@v<version>, every error kept without any; a rehearsal against the tip its last merge lot merges, else the gate base of the repository at the HEAD of the lots file: an error on a line the base holds is a warning), the "dialecte": { "contrib": { "steps" } } (default: npm run doc:build with the generatedDocs restored, npm run type-bench:check), npm run type-narrowing when the package has that script and no step runs it (a skip line when it lacks it), no dependency named by a local folder, the mutation line when a scope is declared',
|
|
2667
|
+
'after gate --full and before handover: rules on the changed files (against the base of the lot, the order the rules step of the gate shares: the lot base of the store lot read from git (its fork point, never the base recorded at its start), else the merge-base with the base branch, as the rules step of the gate takes it, else the last release tag <name>@v<version>, every error kept without any; a rehearsal against the tip its last merge lot merges, else the gate base of the repository at the HEAD of the lots file: an error on a line the base holds is a warning), the "dialecte": { "contrib": { "steps" } } (default: npm run doc:build with the generatedDocs restored, npm run type-bench:check), the type-bench step alone handed the base of the change in DIALECTE_CHANGE_BASE (the base of the rules row when it is a commit; a rehearsal hands the tip its last merge lot merges, else the lot base of its repository, and with neither does not run that step), npm run type-narrowing when the package has that script and no step runs it (a skip line when it lacks it), no dependency named by a local folder, the mutation line when a scope is declared',
|
|
2614
2668
|
"the changelog row (after rules): first the released CHANGELOG.md sections, on every run, changed by the lot or not (a merge brings them): a section altered against the base branch and where the change left it fails the row, naming it (rules: released-changelog); the record is keyed on the base's and the merge-base's CHANGELOG.md, so a release on main runs the row again; then in a package keeping changes/, a change that edits README.md, a page under doc/ or a file the package lists in dialecte.changelog.asking (a folder ends in /; the cli lists its command map) adds a changelog fragment changes/<lot>.md, or a no-entry note changes/<lot>.none.md saying why; else it fails naming the file",
|
|
2615
2669
|
"a step a green gate --full of this tree and install passed with the same command is not run again; --no-reuse runs every row",
|
|
2616
2670
|
'a step whose run is npm run <script> the package lacks is not wired: it fails, default or declared; then no row runs, the others read not run: a step of the list is not wired; "dialecte": { "contrib": { "skip": { "<default step>": "<reason>" } } } (dialecte.contrib.skip) opts a default step out, a warning with its reason'
|
|
@@ -2627,8 +2681,8 @@ var COMMAND_MAP = {
|
|
|
2627
2681
|
],
|
|
2628
2682
|
notes: [
|
|
2629
2683
|
"a fragment: one changes/<name>.md per lot (a no-entry note changes/<name>.none.md holds why a visible change has none), its entries under the changelog headings ### Added, Changed, Deprecated, Removed, Fixed, Security; a package keeping a changes/ folder edits CHANGELOG.md only in a release (rules: changelog-edit)",
|
|
2630
|
-
"check - every fragment readable (a known heading, no loose text, no empty or repeated section), the Unreleased part of CHANGELOG.md, then its released sections: none altered against the base branch and where the change left it (rules: released-changelog); --base <revision> judges against that commit alone, the one the change goes onto (the CI check step hands the merge queue's base, or a pull request merge ref's first parent)",
|
|
2631
|
-
"release - writes ## [<x.y.z>] - <date> (default today, local) under an emptied ## [Unreleased] (written above the first version when missing): the Unreleased summary and entries first, then each fragment in file name order, section by section,
|
|
2684
|
+
"check - every fragment readable (a known heading, no loose text, no empty or repeated section, no HTML comment, code fence or HTML block that never closes, and in each block or item a release moves no raw HTML but whole comments and balanced bare tags of an inert element, nor a block that moving the breaking items first would read otherwise; read as CommonMark reads it), the Unreleased part of CHANGELOG.md, then its released sections: none altered against the base branch and where the change left it (rules: released-changelog); --base <revision> judges against that commit alone, the one the change goes onto (the CI check step hands the merge queue's base, or a pull request merge ref's first parent)",
|
|
2685
|
+
"release - writes ## [<x.y.z>] - <date> (default today, local) under an emptied ## [Unreleased] (written above the first version when missing): the Unreleased summary and entries first, then each fragment in file name order, section by section, each section's breaking items (a bullet opening with **Breaking, Breaking: or Breaking (types):) first, the blocks read as CommonMark reads them (each item of a - list a block, any other block whole and never reordered) and joined as oxfmt leaves them (a blank line after an item holding a second block and around any other block); deletes the fragments and the no-entry notes; nothing written when a fragment or the Unreleased part cannot be read"
|
|
2632
2686
|
],
|
|
2633
2687
|
exitCodes: [
|
|
2634
2688
|
"1 a fragment or the Unreleased part cannot be read, a released section is altered (check), the release is refused (no CHANGELOG.md, version already there, nothing to release), or a fragment could not be deleted",
|
|
@@ -2641,7 +2695,7 @@ var COMMAND_MAP = {
|
|
|
2641
2695
|
summary: "The CI files shipped as a template: write them into the package, report drift, run the publish guard",
|
|
2642
2696
|
usage: ["dialecte ci sync [--dry-run]", "dialecte ci check", "dialecte ci publish-decision"],
|
|
2643
2697
|
notes: [
|
|
2644
|
-
"the template: the workflows (ci.yml, publish.yml and their reusables), .github/pull_request_template.md, .nvmrc and changes/.gitkeep; ci.yml selects its jobs from package.json: type-perf with a type-bench:check script, docs with a doc:build script, the Playwright install with a playwright dependency, the npm run skills:check step of the check job with a skills:check script; the check job always runs rules --base of the cli over the change (the base sha of the merge queue, else HEAD^1, skipped on a dispatch), where --no-verify cannot skip it; a build script is required (publish.yml builds the package)",
|
|
2698
|
+
"the template: the workflows (ci.yml, publish.yml and their reusables), .github/pull_request_template.md, .nvmrc and changes/.gitkeep; ci.yml selects its jobs from package.json: type-perf with a type-bench:check script (its bench step handed the base the change goes onto in DIALECTE_CHANGE_BASE: the base sha of the merge queue, else HEAD^1, skipped on a dispatch), docs with a doc:build script, the Playwright install with a playwright dependency, the npm run skills:check step of the check job with a skills:check script; the check job always runs rules --base of the cli over the change (the base sha of the merge queue, else HEAD^1, skipped on a dispatch), where --no-verify cannot skip it; a build script is required (publish.yml builds the package)",
|
|
2645
2699
|
"the repository owns .github/workflows/_test.yml (ci.yml calls it: a workflow_call trigger; a mode input of type string gets pr on a pull request, full in the merge queue) and every other workflow file the template does not name; they are listed, never written",
|
|
2646
2700
|
"sync - writes what differs from the template, deletes the retired files (pr.yml, _lint.yml) and the reusables no job of the package calls; an update prints its diff; a second run is in step; --dry-run writes nothing",
|
|
2647
2701
|
"check - the same comparison, read-only: each drifted file with its diff, then the fix; the template's _check.yml runs it on every pull request",
|
|
@@ -2715,8 +2769,8 @@ var COMMAND_MAP = {
|
|
|
2715
2769
|
],
|
|
2716
2770
|
notes: [
|
|
2717
2771
|
"add - under the workspace's .worktrees/: hooks folder, the links its file: and link: dependencies need to sibling checkouts, node_modules taken from the pool when an entry matches package-lock.json's lock key, else a near entry (at most 5 packages off) completed by npm install --prefer-offline --no-save, else npm ci, a copy-on-write copy only when npm ci fails (the reason on the card), read against package-lock.json (the npm ci to run when it differs), hygiene baseline",
|
|
2718
|
-
"prune - merged worktrees and branches, committed hand-overs, rehearsal clones: the commands with their cd; a worktree whose folder is gone is kept while its HEAD reflog holds work nothing else does (git worktree prune would delete that reflog), and git worktree prune waits while one is kept; a store lot's items (its worktree, its review throwaways <lot worktree>-round-<n> and -verify, its branch and theirs) are never removed here and no landing is read: an open lot's are kept, reason lot <name> <state>, a committed or canceled lot's are listed lot <name> <state>: its own item, removed by dialecte lot prune <name>; a worktree whose branch's work is not in the base is kept (not landed: its work is not in <base>); a worktree or a branch whose removal would lose a commit is kept with its commits (<n> commit(s) its removal would lose: <commits>; a surviving branch, branch reflog, tag, landed tip or remote-tracking ref holds a commit, or the same change at the same place (a commit with the same diff, its hunk line numbers included); deleting a branch takes its reflog); a worktree a process works in is kept (a process works in it: pid <pid>; processes not known: kept with why); ignored entries are read as lot close reads them: rebuilt folders, .dialecte/ views and copies of the main checkout's files go, anything else keeps the worktree (ignored files git worktree remove would delete: <paths>); a rehearsal clone is kept while its marker is missing or unparsable, or its pid runs; --yes runs them after a confirmation on a terminal; committed hand-over folders and finished rehearsal clones go to the trash like the other items: the plan shows the move (mkdir -p <trash> && mv <folder> <trash>/), --yes makes it; a move that cannot be made is a \u2717 line, nothing deleted; the pool (.worktrees/_pool-<repository>-<n>) and the trash (.worktrees/_trash/) are counted, never touched",
|
|
2719
|
-
"prune --reclaim - every worktree idle for --older-than days (default 2: no write to its index, HEAD or reflog since), not the main checkout, not locked, named by no open lot (a failed lot keeps) nor open hand-over, worked in by no process, reached by no link: its node_modules parked in the pool when its lock key is the main checkout's and it installs that lock, else sent to .worktrees/_trash/, its code never touched, a -round-<n> review throwaway's too; a node_modules that is a link is never moved; every rule checked again just before each move; one line per worktree, the total (worktrees, files, size) last; --dry-run moves nothing; --dry-run or --older-than without --reclaim, or an --older-than that is no positive whole number, exit 2"
|
|
2772
|
+
"prune - merged worktrees and branches, committed hand-overs, rehearsal clones: the commands with their cd; a worktree whose folder is gone is kept while its HEAD reflog holds work nothing else does (git worktree prune would delete that reflog), and git worktree prune waits while one is kept; a store lot's items (its worktree, its review throwaways <lot worktree>-round-<n> and -verify, its branch and theirs) are never removed here and no landing is read: an open lot's are kept, reason lot <name> <state>, a damaged lot's are held, reason its keep or lot <name> damaged; a committed or canceled lot kept on purpose holds them as an open lot does, reason kept by decision: <why> (by <who>, <date>); any other committed or canceled lot's are listed lot <name> <state>: its own item, removed by dialecte lot prune <name>; a worktree whose branch's work is not in the base is kept (not landed: its work is not in <base>); a worktree or a branch whose removal would lose a commit is kept with its commits (<n> commit(s) its removal would lose: <commits>; a surviving branch, branch reflog, tag, landed tip or remote-tracking ref holds a commit, or the same change at the same place (a commit with the same diff, its hunk line numbers included); deleting a branch takes its reflog); a worktree a process works in is kept (a process works in it: pid <pid>; processes not known: kept with why); ignored entries are read as lot close reads them: rebuilt folders, .dialecte/ views and copies of the main checkout's files go, anything else keeps the worktree (ignored files git worktree remove would delete: <paths>); a rehearsal clone is kept while its marker is missing or unparsable, or its pid runs; --yes runs them after a confirmation on a terminal; committed hand-over folders and finished rehearsal clones go to the trash like the other items (the workspace's .worktrees/_trash for a clone in its own .worktrees/_scratch, else the scratch root's dialecte-trash): the plan shows the move (mkdir -p <trash> && mv <folder> <trash>/), --yes makes it; a move that cannot be made is a \u2717 line, nothing deleted; the pool (.worktrees/_pool-<repository>-<n>) and the trash (.worktrees/_trash/) are counted, never touched",
|
|
2773
|
+
"prune --reclaim - every worktree idle for --older-than days (default 2: no write to its index, HEAD or reflog since), not the main checkout, not locked, named by no open lot (a failed lot keeps) nor lot kept on purpose (its review throwaways are reclaimed as an open lot's) nor open hand-over, worked in by no process, reached by no link: its node_modules parked in the pool when its lock key is the main checkout's and it installs that lock, else sent to .worktrees/_trash/, its code never touched, a -round-<n> review throwaway's too; a node_modules that is a link is never moved; every rule checked again just before each move; one line per worktree, the total (worktrees, files, size) last; --dry-run moves nothing; --dry-run or --older-than without --reclaim, or an --older-than that is no positive whole number, exit 2"
|
|
2720
2774
|
],
|
|
2721
2775
|
exitCodes: [
|
|
2722
2776
|
"0 add: the worktree exists, whatever the links and the lockfile say",
|
|
@@ -2795,17 +2849,18 @@ var COMMAND_MAP = {
|
|
|
2795
2849
|
},
|
|
2796
2850
|
bench: {
|
|
2797
2851
|
family: "Maintain",
|
|
2798
|
-
summary: "Measure type-instantiation cost (tsc --extendedDiagnostics); --check to gate
|
|
2799
|
-
usage: ["dialecte bench [--check] [zero-config flags]"],
|
|
2852
|
+
summary: "Measure the type-instantiation cost of the change against its base (tsc --extendedDiagnostics); --check to gate it",
|
|
2853
|
+
usage: ["dialecte bench [--check] [--base <ref>] [zero-config flags]"],
|
|
2800
2854
|
notes: [
|
|
2801
|
-
"
|
|
2802
|
-
"
|
|
2803
|
-
"
|
|
2855
|
+
"the head (the working tree) against the base it goes onto, measured fresh: --base <ref> (its merge-base with HEAD), else DIALECTE_CHANGE_BASE (the base CI and contrib hand: a revision read as its commit), else the order rules shares (the lot base of the store lot read from git, else the merge-base with the base branch, HEAD itself on the base branch, else the last release tag <name>@v<version>); nothing is stored, no baseline is written",
|
|
2856
|
+
"the base is exported at its commit into a scratch folder (no worktree), its file: siblings linked, its node_modules the head's when they install its lock, else npm ci; both trees are measured with the head's compiler and the head's probe generator, one run per scenario, and the base removed after",
|
|
2857
|
+
"tsgo (TypeScript 7+) runs with one checker (--checkers 1), so a file set always gives the same count",
|
|
2858
|
+
"each scenario within 5% of its base, a gain, over, new or gone; a row over is explained by a line the change adds to its changelog fragment (- Type cost: <why>) or no-entry note (Type cost: <why>), else --check fails",
|
|
2859
|
+
"no base outside CI and outside a lot: the head alone, nothing compared; dialecte bench --base <name>@v<x.y.z> reports the cost since a release"
|
|
2804
2860
|
],
|
|
2805
2861
|
exitCodes: [
|
|
2806
|
-
"1 --check:
|
|
2807
|
-
"2
|
|
2808
|
-
"3 --check: a baseline from another compiler or version, or one that records no compiler"
|
|
2862
|
+
"1 --check: a scenario over 5% of its base that no type-cost line of the change explains",
|
|
2863
|
+
"2 refused: a base that cannot be read or is no commit, a lot with no base, no base in CI with --check, a head whose node_modules does not install its lock, a head with no version, a base tree that cannot be made or measured, method discovery failing at the head with --check"
|
|
2809
2864
|
],
|
|
2810
2865
|
example: "dialecte bench --check"
|
|
2811
2866
|
},
|
|
@@ -3392,12 +3447,7 @@ function declaredVersions(cwd) {
|
|
|
3392
3447
|
const manifest = JSON.parse(readFileSync13(join24(cwd, "package.json"), "utf8"));
|
|
3393
3448
|
const names = dependencyNames(cwd);
|
|
3394
3449
|
return Object.fromEntries(
|
|
3395
|
-
names.map((name) => [
|
|
3396
|
-
name,
|
|
3397
|
-
String(
|
|
3398
|
-
manifest.dependencies?.[name] ?? manifest.devDependencies?.[name] ?? manifest.peerDependencies?.[name]
|
|
3399
|
-
)
|
|
3400
|
-
])
|
|
3450
|
+
names.map((name) => [name, String(declaredSpecOf({ manifest, name })?.spec)])
|
|
3401
3451
|
);
|
|
3402
3452
|
}
|
|
3403
3453
|
function installedVersion(params) {
|
|
@@ -3427,7 +3477,7 @@ var BROWSER_OPENERS = {
|
|
|
3427
3477
|
};
|
|
3428
3478
|
var OPEN_TIMEOUT_MS = 1e4;
|
|
3429
3479
|
var HOST_READ_METHODS = [
|
|
3430
|
-
"
|
|
3480
|
+
"readChangeRequest",
|
|
3431
3481
|
"readChecks",
|
|
3432
3482
|
"readQueued",
|
|
3433
3483
|
"probeStacks"
|
|
@@ -3458,7 +3508,7 @@ function hostLines(params) {
|
|
|
3458
3508
|
host,
|
|
3459
3509
|
run,
|
|
3460
3510
|
subject,
|
|
3461
|
-
...found.
|
|
3511
|
+
...found.changeRequest !== void 0 && { changeRequest: found.changeRequest }
|
|
3462
3512
|
});
|
|
3463
3513
|
});
|
|
3464
3514
|
return [
|
|
@@ -4542,7 +4592,7 @@ function refusalOf2(params) {
|
|
|
4542
4592
|
// src/lib/host/github/github-host.ts
|
|
4543
4593
|
function createGithubHost() {
|
|
4544
4594
|
const host = {
|
|
4545
|
-
|
|
4595
|
+
readChangeRequest: function readChangeRequest(params) {
|
|
4546
4596
|
const run = runGh({
|
|
4547
4597
|
root: params.root,
|
|
4548
4598
|
call: "viewPullRequest",
|
|
@@ -4551,7 +4601,7 @@ function createGithubHost() {
|
|
|
4551
4601
|
if ("refusal" in run) return NO_PULL_REQUEST_PATTERN.test(run.refusal) ? void 0 : run;
|
|
4552
4602
|
return pullRequestOf({ text: run.output });
|
|
4553
4603
|
},
|
|
4554
|
-
|
|
4604
|
+
openChangeRequest: function openChangeRequest(params) {
|
|
4555
4605
|
const created = runGh({
|
|
4556
4606
|
root: params.root,
|
|
4557
4607
|
call: "createPullRequest",
|
|
@@ -4564,21 +4614,21 @@ function createGithubHost() {
|
|
|
4564
4614
|
}
|
|
4565
4615
|
});
|
|
4566
4616
|
if ("refusal" in created) return created;
|
|
4567
|
-
const read = host.
|
|
4617
|
+
const read = host.readChangeRequest({ root: params.root, ref: params.branch });
|
|
4568
4618
|
return read ?? { refusal: `the pull request of ${params.branch} was opened but cannot be read` };
|
|
4569
4619
|
},
|
|
4570
|
-
|
|
4571
|
-
|
|
4620
|
+
editChangeRequest: editOnGithub,
|
|
4621
|
+
closeChangeRequest: closeOnGithub,
|
|
4572
4622
|
readChecks: readChecksOnGithub,
|
|
4573
4623
|
readReviewComments: readCommentsOnGithub,
|
|
4574
4624
|
openFiles: openFilesTab,
|
|
4575
4625
|
probeStacks: probeStacksOnGithub,
|
|
4576
4626
|
linkStack: linkStackOnGithub,
|
|
4577
4627
|
queueStack: queueStackOnGithub,
|
|
4578
|
-
|
|
4579
|
-
|
|
4628
|
+
retargetChangeRequest: retargetOnGithub,
|
|
4629
|
+
draftChangeRequest: draftOnGithub,
|
|
4580
4630
|
readQueued: readQueuedOnGithub,
|
|
4581
|
-
|
|
4631
|
+
queueChangeRequest: function queueChangeRequest(params) {
|
|
4582
4632
|
const number = String(params.number);
|
|
4583
4633
|
if (params.draft) {
|
|
4584
4634
|
const ready = runGh({
|
|
@@ -4809,7 +4859,7 @@ function findMergedPullRequest(params) {
|
|
|
4809
4859
|
values: { number: String(found.number) }
|
|
4810
4860
|
})
|
|
4811
4861
|
},
|
|
4812
|
-
|
|
4862
|
+
changeRequest: found.number
|
|
4813
4863
|
};
|
|
4814
4864
|
}
|
|
4815
4865
|
var GITHUB_SUBJECT = {
|
|
@@ -4820,9 +4870,9 @@ function needsPullRequest(params) {
|
|
|
4820
4870
|
return { status: "warning", subject: params.subject, detail: GITHUB_PROBE_TEXTS.needsPullRequest };
|
|
4821
4871
|
}
|
|
4822
4872
|
function probeViewPullRequest(params) {
|
|
4823
|
-
if (params.
|
|
4824
|
-
const number = String(params.
|
|
4825
|
-
const read = params.host.
|
|
4873
|
+
if (params.changeRequest === void 0) return needsPullRequest(params);
|
|
4874
|
+
const number = String(params.changeRequest);
|
|
4875
|
+
const read = params.host.readChangeRequest({ root: params.root, ref: number });
|
|
4826
4876
|
if (read !== void 0 && "refusal" in read)
|
|
4827
4877
|
return { status: "error", subject: params.subject, detail: read.refusal };
|
|
4828
4878
|
if (read === void 0)
|
|
@@ -4831,7 +4881,7 @@ function probeViewPullRequest(params) {
|
|
|
4831
4881
|
subject: params.subject,
|
|
4832
4882
|
detail: fillMessage({ template: GITHUB_PROBE_TEXTS.pullRequestNone, values: { number } })
|
|
4833
4883
|
};
|
|
4834
|
-
const none = params.host.
|
|
4884
|
+
const none = params.host.readChangeRequest({ root: params.root, ref: NO_SUCH_BRANCH });
|
|
4835
4885
|
if (none !== void 0)
|
|
4836
4886
|
return {
|
|
4837
4887
|
status: "error",
|
|
@@ -4848,8 +4898,8 @@ function probeViewPullRequest(params) {
|
|
|
4848
4898
|
};
|
|
4849
4899
|
}
|
|
4850
4900
|
function probeViewChecks(params) {
|
|
4851
|
-
if (params.
|
|
4852
|
-
const checks = params.host.readChecks({ root: params.root, number: params.
|
|
4901
|
+
if (params.changeRequest === void 0) return needsPullRequest(params);
|
|
4902
|
+
const checks = params.host.readChecks({ root: params.root, number: params.changeRequest });
|
|
4853
4903
|
if ("refusal" in checks)
|
|
4854
4904
|
return { status: "error", subject: params.subject, detail: checks.refusal };
|
|
4855
4905
|
return {
|
|
@@ -4857,13 +4907,13 @@ function probeViewChecks(params) {
|
|
|
4857
4907
|
subject: params.subject,
|
|
4858
4908
|
detail: fillMessage({
|
|
4859
4909
|
template: GITHUB_PROBE_TEXTS.checksRead,
|
|
4860
|
-
values: { number: String(params.
|
|
4910
|
+
values: { number: String(params.changeRequest), state: checks.state }
|
|
4861
4911
|
})
|
|
4862
4912
|
};
|
|
4863
4913
|
}
|
|
4864
4914
|
function probeQueuedState(params) {
|
|
4865
|
-
if (params.
|
|
4866
|
-
const queued = params.host.readQueued({ root: params.root, number: params.
|
|
4915
|
+
if (params.changeRequest === void 0) return needsPullRequest(params);
|
|
4916
|
+
const queued = params.host.readQueued({ root: params.root, number: params.changeRequest });
|
|
4867
4917
|
if ("refusal" in queued)
|
|
4868
4918
|
return { status: "error", subject: params.subject, detail: queued.refusal };
|
|
4869
4919
|
return {
|
|
@@ -4871,7 +4921,7 @@ function probeQueuedState(params) {
|
|
|
4871
4921
|
subject: params.subject,
|
|
4872
4922
|
detail: fillMessage({
|
|
4873
4923
|
template: GITHUB_PROBE_TEXTS.queuedRead,
|
|
4874
|
-
values: { number: String(params.
|
|
4924
|
+
values: { number: String(params.changeRequest), queued: String(queued.queued) }
|
|
4875
4925
|
})
|
|
4876
4926
|
};
|
|
4877
4927
|
}
|