halfcycle 0.6.0 → 0.7.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/.claude-plugin/plugin.json +1 -1
- package/bin/bin.bundle.mjs +3468 -2161
- package/bin/pre-tool-use-filter.sh +6 -2
- package/dist/bin.js +0 -0
- package/dist/check-criteria.d.ts +57 -0
- package/dist/check-criteria.d.ts.map +1 -0
- package/dist/check-report.d.ts +2 -1
- package/dist/check-report.d.ts.map +1 -1
- package/dist/check-tasks.d.ts +75 -22
- package/dist/check-tasks.d.ts.map +1 -1
- package/dist/cli-contract.d.ts +1 -1
- package/dist/cli-contract.d.ts.map +1 -1
- package/dist/cli.js +1407 -367
- package/dist/cli.js.map +3 -3
- package/dist/close-phase.d.ts +39 -1
- package/dist/close-phase.d.ts.map +1 -1
- package/dist/index.js +116 -17
- package/dist/index.js.map +3 -3
- package/dist/install.d.ts +7 -2
- package/dist/install.d.ts.map +1 -1
- package/dist/pace.d.ts +19 -4
- package/dist/pace.d.ts.map +1 -1
- package/dist/ready.d.ts +6 -3
- package/dist/ready.d.ts.map +1 -1
- package/dist/route.d.ts +95 -0
- package/dist/route.d.ts.map +1 -0
- package/package.json +11 -11
- package/dist/claude-plan.d.ts +0 -133
- package/dist/claude-plan.d.ts.map +0 -1
|
@@ -478,7 +478,7 @@ halfcycle_pt_branch() {
|
|
|
478
478
|
done
|
|
479
479
|
}
|
|
480
480
|
halfcycle_pt_time_line() {
|
|
481
|
-
local LC_ALL=C hc_val hc_id hc_home hc_folder hc_branch hc_at hc_secs hc_frac hc_dir hc_line hc_f_session_id hc_f_agent_id hc_f_transcript_path hc_f_tool_use_id
|
|
481
|
+
local LC_ALL=C hc_val hc_id hc_home hc_folder hc_branch hc_at hc_secs hc_frac hc_dir hc_line hc_f_session_id hc_f_agent_id hc_f_transcript_path hc_f_tool_use_id hc_f_rollout_path
|
|
482
482
|
local hc_re='^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
|
|
483
483
|
[ -n "${GUARD_SERVICE_TOKEN:-}" ] || return 0
|
|
484
484
|
[ -n "${GUARD_ENGAGEMENT_ID:-}" ] || return 0
|
|
@@ -494,6 +494,10 @@ halfcycle_pt_time_line() {
|
|
|
494
494
|
hc_f_transcript_path=$hc_val
|
|
495
495
|
halfcycle_pt_optional 'tool_use_id' || return 1
|
|
496
496
|
hc_f_tool_use_id=$hc_val
|
|
497
|
+
case ${hc_pt_agent:-} in
|
|
498
|
+
'') hc_f_rollout_path=null ;;
|
|
499
|
+
*) hc_f_rollout_path=$hc_f_transcript_path hc_f_transcript_path=null ;;
|
|
500
|
+
esac
|
|
497
501
|
halfcycle_pt_string cwd
|
|
498
502
|
case $? in
|
|
499
503
|
0) hc_folder=$hc_val ;;
|
|
@@ -508,7 +512,7 @@ halfcycle_pt_time_line() {
|
|
|
508
512
|
fi
|
|
509
513
|
halfcycle_pt_branch "$hc_folder" || return 1
|
|
510
514
|
halfcycle_pt_stamp "$1" || return 1
|
|
511
|
-
printf -v hc_line '{"at":"%s","event":"action","session":%s,"agent":%s,"folder":"%s","branch":%s,"transcript":%s,"toolUse":%s}' "$hc_at" "$hc_f_session_id" "$hc_f_agent_id" "$hc_folder" "$hc_branch" "$hc_f_transcript_path" "$hc_f_tool_use_id"
|
|
515
|
+
printf -v hc_line '{"at":"%s","event":"action","session":%s,"agent":%s,"folder":"%s","branch":%s,"transcript":%s,"toolUse":%s,"rollout":%s}' "$hc_at" "$hc_f_session_id" "$hc_f_agent_id" "$hc_folder" "$hc_branch" "$hc_f_transcript_path" "$hc_f_tool_use_id" "$hc_f_rollout_path"
|
|
512
516
|
hc_dir=$hc_home/.halfcycle/engagements/$hc_id/time-log
|
|
513
517
|
umask 077
|
|
514
518
|
{ printf '%s\n' "$hc_line" >> "$hc_dir/events.jsonl"; } 2>/dev/null ||
|
package/dist/bin.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `npx halfcycle@latest check-criteria [<record file>] [--repo <root>]`
|
|
3
|
+
* (`whole-phase-criteria-check` AC4, M1–M7; `edge-case-criteria` AC5, M8 and M9).
|
|
4
|
+
*
|
|
5
|
+
* OFFLINE, ALWAYS. This verb reads only files on the person's own machine — the
|
|
6
|
+
* plan file `docs/build-records/task-plan.json`, each spec file the plan lists in
|
|
7
|
+
* `specs` (`docs/features/<name>.md`, once per name), and the criteria record, which
|
|
8
|
+
* is `docs/build-records/criteria-check.json` unless a file is named — and nothing
|
|
9
|
+
* else. It opens no credential file, makes no network call, and needs no sign-in.
|
|
10
|
+
*
|
|
11
|
+
* ONE HOME FOR EACH THING IT READS. The plan is parsed with `taskPlanSchema` through
|
|
12
|
+
* `check-tasks.ts`'s `readJsonFile`, as `check-tasks` and `ready` read it; the spec
|
|
13
|
+
* files are opened only by `readPlanSpecFiles`; the record only by
|
|
14
|
+
* `readCriteriaRecordFile`, through the wire's own schema for it. The rules M1–M9, the
|
|
15
|
+
* clear line and every line's words are `checkCriteriaRecord` (`@halfcycle/core`),
|
|
16
|
+
* which is pure. This module's whole job is reading the files, handing them over,
|
|
17
|
+
* and turning the answer into an exit code: 0 clean, 1 any line, 2 a usage error or a
|
|
18
|
+
* file that is missing, cannot be read, is not JSON or does not match its shape
|
|
19
|
+
* (naming the file and where), as `check-tasks` does.
|
|
20
|
+
*
|
|
21
|
+
* A NAMED RECORD FILE is read from the project's top folder when it is a relative
|
|
22
|
+
* path, or as it is when absolute, and every line names it as it was typed.
|
|
23
|
+
*
|
|
24
|
+
* SHIPS TO CLIENT DISK inside the CLI (INV-001: Node builtins, `@halfcycle/core` and
|
|
25
|
+
* `@halfcycle/events` only, through `check-tasks.ts`). Every string here is a sentence
|
|
26
|
+
* a person reads in their own terminal; no comment sits beside an object member.
|
|
27
|
+
*/
|
|
28
|
+
/** The usage line, printed for an extra argument or an unknown flag. */
|
|
29
|
+
export declare const CHECK_CRITERIA_USAGE = "npx halfcycle@latest check-criteria [<record file>] [--repo <root>]";
|
|
30
|
+
/**
|
|
31
|
+
* What the arguments after `check-criteria` came to: at most one positional (the
|
|
32
|
+
* record file) and at most one `--repo <root>`; anything else is usage.
|
|
33
|
+
*/
|
|
34
|
+
export type CheckCriteriaArgs = {
|
|
35
|
+
ok: true;
|
|
36
|
+
file: string | undefined;
|
|
37
|
+
repoRoot: string | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
};
|
|
41
|
+
export declare function parseCheckCriteriaArgs(argv: readonly string[]): CheckCriteriaArgs;
|
|
42
|
+
/** The sentence for a record file that is not there, without the verb's prefix. */
|
|
43
|
+
export declare function missingRecordLine(file: string): string;
|
|
44
|
+
/** What a run of the verb came to. */
|
|
45
|
+
export interface CheckCriteriaRun {
|
|
46
|
+
readonly stdout: string;
|
|
47
|
+
readonly stderr: string;
|
|
48
|
+
readonly exitCode: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The whole verb. Reads the plan under `repoRoot`, the specs it lists, and the record
|
|
52
|
+
* (`file`, or `docs/build-records/criteria-check.json`), hands them to
|
|
53
|
+
* `checkCriteriaRecord` and prints its lines, one per line, in the order it returns
|
|
54
|
+
* them, or its clear line when nothing refuses. Never throws.
|
|
55
|
+
*/
|
|
56
|
+
export declare function runCheckCriteria(repoRoot: string, file: string | undefined): CheckCriteriaRun;
|
|
57
|
+
//# sourceMappingURL=check-criteria.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-criteria.d.ts","sourceRoot":"","sources":["../src/check-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAYH,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,wEAAwE,CAAC;AAE1G;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACpE;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAElB,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAiBjF;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,CAoB7F"}
|
package/dist/check-report.d.ts
CHANGED
|
@@ -51,7 +51,8 @@ export interface CheckReportDeps {
|
|
|
51
51
|
/**
|
|
52
52
|
* The whole verb. Reads the report from `source` (standard input for `-`),
|
|
53
53
|
* checks it against `head` with the four statuses of the served block, and
|
|
54
|
-
* prints each problem's line, or the clear line. Never throws.
|
|
54
|
+
* prints each problem's line, or the clear line. Never throws. A short `--head`
|
|
55
|
+
* is refused first, with exit 2, before the report is read.
|
|
55
56
|
*/
|
|
56
57
|
export declare function runCheckReport(source: string, head: string, deps?: CheckReportDeps): CheckReportRun;
|
|
57
58
|
//# sourceMappingURL=check-report.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-report.d.ts","sourceRoot":"","sources":["../src/check-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAUH,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,8DAA8D,CAAC;AAE9F,iGAAiG;AACjG,MAAM,MAAM,eAAe,GAAG;IAAE,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AAM,CAAC;CACnC;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,cAAc,CA2BvG"}
|
package/dist/check-tasks.d.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* OFFLINE, ALWAYS. This verb reads only files on the person's own machine —
|
|
6
6
|
* `docs/build-records/task-plan.json`, `docs/system.json` when it is there, the
|
|
7
7
|
* phase's plan file in `docs/phases/` when it is there, each
|
|
8
|
-
* spec file the plan lists in `specs` (`docs/features/<name>.md`, once per name),
|
|
9
|
-
*
|
|
8
|
+
* spec file the plan lists in `specs` (`docs/features/<name>.md`, once per name), the
|
|
9
|
+
* newest criteria record at `docs/build-records/criteria-check.json` when it is there,
|
|
10
|
+
* and, with `--with-task-list`, `docs/build-records/build-tasks.json` — and nothing else. It opens no credential
|
|
10
11
|
* file, makes no network call, and needs no sign-in. Everything it prints comes from
|
|
11
12
|
* `checkTaskPlan` (`@halfcycle/core`), which is pure: this module's whole job is
|
|
12
13
|
* reading the files, handing them to that function, and printing what it returns.
|
|
@@ -40,14 +41,20 @@
|
|
|
40
41
|
* description that is broken, and passing it silently would let through the very
|
|
41
42
|
* plan this rule exists to catch.
|
|
42
43
|
*
|
|
43
|
-
* THE PHASE'S OWN PLAN NAMES THE PARTS IT CHANGES (O8,
|
|
44
|
-
* description passed its check and the phase's plan file (`planFileRel`, the plan
|
|
44
|
+
* THE PHASE'S OWN PLAN NAMES THE PARTS IT CHANGES (O8, issues #2339 and #2354). When
|
|
45
|
+
* the description passed its check and the phase's plan file (`planFileRel`, the plan
|
|
45
46
|
* verb's one home of that name) is there, reads as JSON, is for this phase and passes
|
|
46
47
|
* the plan verb's own check against that description (`checkPhasePlan`), its parts go
|
|
47
48
|
* to `checkTaskPlan`, which refuses a task building a part outside them with no
|
|
48
|
-
* reason.
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* reason. A missing plan says nothing: this verb runs while the plan may not be
|
|
50
|
+
* written yet. A plan that is there but falls short in any of those ways goes to
|
|
51
|
+
* `checkTaskPlan` as unusable, with why, and is refused there in one O8 line, in the
|
|
52
|
+
* order the plan verb names the same faults (`readAndCheckPlan`): it could not be
|
|
53
|
+
* opened, it is not JSON, it names another phase, then the check's problems. It is a
|
|
54
|
+
* refusal, not a stop (exit 1, every other line still printed), because the plan
|
|
55
|
+
* itself is still worth checking; but never a silent pass, because a typo in the
|
|
56
|
+
* phase plan would otherwise turn the not-in-plan rule off with the clear line
|
|
57
|
+
* printed.
|
|
51
58
|
*
|
|
52
59
|
* THE LISTED SPECS NAME THE CRITERIA (C1–C6, `criteria-coverage`). `readPlanSpecFiles`
|
|
53
60
|
* is the one place spec files are opened: for each name `planSpecNamesToRead` gives
|
|
@@ -59,6 +66,17 @@
|
|
|
59
66
|
* error here: the check names it (C6). A file that is there and cannot be read
|
|
60
67
|
* stops the run with exit 2, naming it, as an unreadable plan does.
|
|
61
68
|
*
|
|
69
|
+
* THE NEWEST CRITERIA RECORD HOLDS THE WALK (V6, `whole-phase-criteria-check` AC3).
|
|
70
|
+
* `readCriteriaRecordFile` is the one place a record file is opened, and parses it with
|
|
71
|
+
* the wire's own schema for the record (`workCriteriaRecordSchema`), never a second
|
|
72
|
+
* one; `readCriteriaRecord`, which both callers of `checkTaskPlan` (this verb and
|
|
73
|
+
* `ready`) use, and the `check-criteria` verb (`check-criteria.ts`) both read through
|
|
74
|
+
* it. Missing is not an error here: there is no record yet. There, and unreadable, not
|
|
75
|
+
* JSON or not that shape, stops the run with exit 2 naming it, as an unreadable plan
|
|
76
|
+
* does. A record for another phase, or whose check is not a criteria check of this
|
|
77
|
+
* plan (`criteriaRecordMismatch`), is not read further (`check-criteria` names it as
|
|
78
|
+
* M1 or M2); otherwise its check and the task of each `fix` row go to `checkTaskPlan`.
|
|
79
|
+
*
|
|
62
80
|
* SHIPS TO CLIENT DISK inside the CLI (INV-001: Node builtins, `@halfcycle/core` and
|
|
63
81
|
* `@halfcycle/events` only, the latter for the description's and the phase plan's checks; no
|
|
64
82
|
* network and no `fetch`). Every string here is
|
|
@@ -66,8 +84,8 @@
|
|
|
66
84
|
* register, a route, or this project's own tooling; no comment sits beside an
|
|
67
85
|
* object member.
|
|
68
86
|
*/
|
|
69
|
-
import { type SystemDescription } from '@halfcycle/events';
|
|
70
|
-
import { type PlanSpecFiles, type TaskPlan } from '@halfcycle/core';
|
|
87
|
+
import { type SystemDescription, type WorkCriteriaRecord } from '@halfcycle/events';
|
|
88
|
+
import { type CriteriaRecordFixes, type PlanSpecFiles, type TaskPlan, type TaskPlanCheckRequest, type TaskPlanPhasePlan } from '@halfcycle/core';
|
|
71
89
|
/** The usage line, printed for no phase, an extra argument or an unknown flag. */
|
|
72
90
|
export declare const CHECK_TASKS_USAGE = "npx halfcycle@latest check-tasks <phase> [--with-task-list] [--repo <root>]";
|
|
73
91
|
/**
|
|
@@ -89,8 +107,14 @@ export declare function parseCheckTasksArgs(argv: readonly string[]): CheckTasks
|
|
|
89
107
|
* and `ready` (`ready.ts`) each print it after their own.
|
|
90
108
|
*/
|
|
91
109
|
export declare const MISSING_PLAN_LINE = "there is no docs/build-records/task-plan.json in this project yet. Run the task-graph step to write it, then run this again.";
|
|
110
|
+
/**
|
|
111
|
+
* The crew roster as the plan check takes it, each member's callsign and tier, so a
|
|
112
|
+
* task marked `cheapFirst` is checked against its holder's tier (J2,
|
|
113
|
+
* `cheaper-models-first` AC2). Both verbs that check the plan hand it over.
|
|
114
|
+
*/
|
|
115
|
+
export declare function planCrew(): TaskPlanCheckRequest['crew'];
|
|
92
116
|
/** One JSON file, read and parsed: present and valid, missing, or unreadable/unparsable (with the line to print). */
|
|
93
|
-
type FileRead<T> = {
|
|
117
|
+
export type FileRead<T> = {
|
|
94
118
|
kind: 'ok';
|
|
95
119
|
value: T;
|
|
96
120
|
} | {
|
|
@@ -113,21 +137,21 @@ type SafeParse<T> = {
|
|
|
113
137
|
};
|
|
114
138
|
};
|
|
115
139
|
/**
|
|
116
|
-
* Read and parse one JSON file under `repoRoot
|
|
117
|
-
*
|
|
140
|
+
* Read and parse one JSON file under `repoRoot` (`rel` from the project's top folder,
|
|
141
|
+
* or an absolute path, which is read as it is). The line in a `bad` answer carries
|
|
142
|
+
* no verb's prefix; this verb, `ready` (`ready.ts`) and `check-criteria`
|
|
143
|
+
* (`check-criteria.ts`) each add their own. Never throws.
|
|
118
144
|
*/
|
|
119
145
|
export declare function readJsonFile<T>(repoRoot: string, rel: string, parse: (raw: unknown) => SafeParse<T>): FileRead<T>;
|
|
120
146
|
/**
|
|
121
|
-
* The
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
147
|
+
* The phase's own plan, as `checkTaskPlan` takes it: where it lives and the parts its
|
|
148
|
+
* changes name; or where it lives and why it could not be used (it could not be
|
|
149
|
+
* opened, is not JSON, is the plan for another phase, or fails the plan verb's check
|
|
150
|
+
* against `description`); or `undefined` when there is no plan to compare with (the
|
|
151
|
+
* phase is not a phase name, or the file is missing). Never throws, never stops the
|
|
152
|
+
* run (see the module header).
|
|
126
153
|
*/
|
|
127
|
-
export declare function readPhasePlanParts(repoRoot: string, phase: string, description: SystemDescription):
|
|
128
|
-
file: string;
|
|
129
|
-
partIds: string[];
|
|
130
|
-
} | undefined;
|
|
154
|
+
export declare function readPhasePlanParts(repoRoot: string, phase: string, description: SystemDescription): TaskPlanPhasePlan | undefined;
|
|
131
155
|
/**
|
|
132
156
|
* The plan's listed specs, read: `ok` with the request's `specFiles`, or `bad` with
|
|
133
157
|
* the line naming a spec file that is there and could not be read, without any
|
|
@@ -148,6 +172,34 @@ export type PlanSpecFilesRead = {
|
|
|
148
172
|
* Boundary section as `readSpecBoundary` reads it. Never throws.
|
|
149
173
|
*/
|
|
150
174
|
export declare function readPlanSpecFiles(repoRoot: string, plan: TaskPlan): PlanSpecFilesRead;
|
|
175
|
+
/**
|
|
176
|
+
* The newest criteria record, read: `ok` with what `checkTaskPlan` takes from it, or
|
|
177
|
+
* with nothing when there is no record or it is not this plan's to read further; or
|
|
178
|
+
* `bad` with the line naming the file, without any verb's prefix (each caller adds its
|
|
179
|
+
* own, as with `readJsonFile`'s line).
|
|
180
|
+
*/
|
|
181
|
+
export type CriteriaRecordRead = {
|
|
182
|
+
kind: 'ok';
|
|
183
|
+
record: CriteriaRecordFixes | undefined;
|
|
184
|
+
} | {
|
|
185
|
+
kind: 'bad';
|
|
186
|
+
line: string;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* The one place a criteria record file is opened and parsed: `rel` under `repoRoot`
|
|
190
|
+
* (`docs/build-records/criteria-check.json` unless the caller names another, as
|
|
191
|
+
* `check-criteria` lets a person do), through the wire's schema for the record, never a
|
|
192
|
+
* second one. The `bad` line names the file as the caller named it. Never throws.
|
|
193
|
+
*/
|
|
194
|
+
export declare function readCriteriaRecordFile(repoRoot: string, rel?: string): FileRead<WorkCriteriaRecord>;
|
|
195
|
+
/**
|
|
196
|
+
* The newest criteria record, as the plan check takes it. Reads
|
|
197
|
+
* `docs/build-records/criteria-check.json` under `repoRoot` when it is there
|
|
198
|
+
* (`readCriteriaRecordFile`). A record for another phase than `plan`'s, or whose check
|
|
199
|
+
* is not a criteria check of `plan` (`criteriaRecordMismatch`, the rule M1 and M2 of
|
|
200
|
+
* `check-criteria` print from), gives nothing. Never throws.
|
|
201
|
+
*/
|
|
202
|
+
export declare function readCriteriaRecord(repoRoot: string, plan: TaskPlan): CriteriaRecordRead;
|
|
151
203
|
/** What a run of the verb came to. */
|
|
152
204
|
export interface CheckTasksRun {
|
|
153
205
|
readonly stdout: string;
|
|
@@ -158,7 +210,8 @@ export interface CheckTasksRun {
|
|
|
158
210
|
* The whole verb. Reads `docs/build-records/task-plan.json` under `repoRoot`,
|
|
159
211
|
* `docs/system.json` when it is there, the phase's plan file when that is there too
|
|
160
212
|
* (`readPhasePlanParts`), each spec file the plan lists in `specs`
|
|
161
|
-
* (`docs/features/<name>.md`, through `readPlanSpecFiles`),
|
|
213
|
+
* (`docs/features/<name>.md`, through `readPlanSpecFiles`), the criteria record when it
|
|
214
|
+
* is there (`readCriteriaRecord`), and, with `withTaskList`,
|
|
162
215
|
* `docs/build-records/build-tasks.json`; hands them to
|
|
163
216
|
* `checkTaskPlan` and prints its lines, one per line, in the order it returns them,
|
|
164
217
|
* or `checkTaskPlan`'s own clear line when there is nothing to report. Never throws.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-tasks.d.ts","sourceRoot":"","sources":["../src/check-tasks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"check-tasks.d.ts","sourceRoot":"","sources":["../src/check-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AAIH,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAYL,KAAK,mBAAmB,EAExB,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAKzB,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,gFAAgF,CAAC;AAE/G;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAChF;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAElB,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CAuB3E;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,iIAAiH,CAAC;AAE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AQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,iBAAiB,CAkBrF;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAA6B,GACjC,QAAQ,CAAC,kBAAkB,CAAC,CAE9B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,kBAAkB,CASvF;AAED,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,GAAG,aAAa,CAqDnG"}
|
package/dist/cli-contract.d.ts
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* home is the failure mode it exists to prevent.
|
|
63
63
|
*/
|
|
64
64
|
/** The verbs the CLI dispatches. Anything else after `halfcycle ` is unknown. */
|
|
65
|
-
export declare const CLI_VERBS: readonly ["install", "check-drift", "build-record", "open-phase", "close-phase", "system", "draw", "plan", "review", "check-tasks", "check-report", "ready", "uninstall", "change", "pace", "prove", "preview", "doctor", "restore"];
|
|
65
|
+
export declare const CLI_VERBS: readonly ["install", "check-drift", "build-record", "open-phase", "close-phase", "system", "draw", "plan", "review", "check-tasks", "check-criteria", "check-report", "ready", "uninstall", "change", "pace", "route", "prove", "preview", "doctor", "restore"];
|
|
66
66
|
export type CliVerb = (typeof CLI_VERBS)[number];
|
|
67
67
|
/** A flag every invocation of the verb must carry. */
|
|
68
68
|
export interface RequiredFlag {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-contract.d.ts","sourceRoot":"","sources":["../src/cli-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAIH,iFAAiF;AACjF,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"cli-contract.d.ts","sourceRoot":"","sources":["../src/cli-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAIH,iFAAiF;AACjF,eAAO,MAAM,SAAS,iQAAkQ,CAAC;AAEzR,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,iDAAiD;AACjD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAA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