tickmarkr 2.4.2 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -24
- package/dist/adapters/fake.d.ts +1 -0
- package/dist/adapters/fake.js +2 -1
- package/dist/adapters/opencode.d.ts +1 -0
- package/dist/adapters/opencode.js +4 -1
- package/dist/adapters/types.d.ts +14 -0
- package/dist/adapters/types.js +25 -0
- package/dist/cli/commands/approve.d.ts +42 -0
- package/dist/cli/commands/approve.js +80 -13
- package/dist/cli/commands/doctor.d.ts +234 -0
- package/dist/cli/commands/doctor.js +139 -5
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +45 -5
- package/dist/cli/commands/plan.js +58 -6
- package/dist/cli/commands/report.js +18 -45
- package/dist/cli/commands/run.js +3 -0
- package/dist/cli/commands/scope.js +36 -6
- package/dist/cli/commands/stats.d.ts +2 -0
- package/dist/cli/commands/stats.js +42 -23
- package/dist/cli/commands/status.js +20 -4
- package/dist/cli/commands/ui.js +42 -53
- package/dist/cli/commands/unlock.d.ts +1 -1
- package/dist/cli/commands/unlock.js +59 -9
- package/dist/cli/help.d.ts +219 -0
- package/dist/cli/help.js +212 -0
- package/dist/cli/index.d.ts +42 -2
- package/dist/cli/index.js +23 -8
- package/dist/drivers/herdr.d.ts +7 -2
- package/dist/drivers/herdr.js +78 -48
- package/dist/drivers/orca.d.ts +3 -2
- package/dist/drivers/orca.js +43 -4
- package/dist/drivers/subprocess.d.ts +1 -0
- package/dist/drivers/subprocess.js +3 -0
- package/dist/drivers/types.d.ts +14 -0
- package/dist/gates/artifact-manifest.d.ts +50 -0
- package/dist/gates/artifact-manifest.js +23 -0
- package/dist/gates/llm.d.ts +5 -0
- package/dist/gates/llm.js +188 -3
- package/dist/gates/review.d.ts +6 -3
- package/dist/gates/review.js +79 -33
- package/dist/gates/run-gates.d.ts +3 -0
- package/dist/gates/run-gates.js +14 -4
- package/dist/plan/scope.d.ts +25 -0
- package/dist/plan/scope.js +92 -12
- package/dist/report/operator-record.d.ts +49 -0
- package/dist/report/operator-record.js +137 -0
- package/dist/run/daemon.d.ts +5 -5
- package/dist/run/daemon.js +166 -44
- package/dist/run/lock.d.ts +59 -2
- package/dist/run/lock.js +184 -26
- package/dist/run/operator-state.d.ts +86 -0
- package/dist/run/operator-state.js +165 -0
- package/dist/run/supervision.d.ts +32 -0
- package/dist/run/supervision.js +138 -17
- package/dist/tui/cockpit/capture.d.ts +19 -0
- package/dist/tui/cockpit/capture.js +89 -1
- package/dist/tui/cockpit/components.d.ts +15 -1
- package/dist/tui/cockpit/components.js +79 -9
- package/dist/tui/cockpit/decision-actions.d.ts +147 -0
- package/dist/tui/cockpit/decision-actions.js +315 -0
- package/dist/tui/cockpit/derive.d.ts +1 -1
- package/dist/tui/cockpit/derive.js +2 -0
- package/dist/tui/cockpit/evidence-view.d.ts +119 -0
- package/dist/tui/cockpit/evidence-view.js +210 -0
- package/dist/tui/cockpit/home-view.d.ts +88 -0
- package/dist/tui/cockpit/home-view.js +240 -0
- package/dist/tui/cockpit/keys.d.ts +125 -0
- package/dist/tui/cockpit/keys.js +31 -0
- package/dist/tui/cockpit/layout.d.ts +14 -0
- package/dist/tui/cockpit/layout.js +15 -0
- package/dist/tui/cockpit/live-runtime.d.ts +46 -0
- package/dist/tui/cockpit/live-runtime.js +683 -0
- package/dist/tui/cockpit/live-store.d.ts +289 -0
- package/dist/tui/cockpit/live-store.js +308 -0
- package/dist/tui/cockpit/live.d.ts +21 -1
- package/dist/tui/cockpit/live.js +12 -1
- package/dist/tui/cockpit/run-view.d.ts +100 -0
- package/dist/tui/cockpit/run-view.js +202 -0
- package/dist/tui/cockpit/shell.d.ts +50 -0
- package/dist/tui/cockpit/shell.js +74 -0
- package/dist/tui/cockpit/theme.d.ts +27 -0
- package/dist/tui/cockpit/theme.js +21 -0
- package/dist/tui/ink/init-app.d.ts +4 -0
- package/dist/tui/ink/init-app.js +18 -7
- package/package.json +1 -1
- package/skills/tickmarkr-auto/SKILL.md +10 -1
- package/skills/tickmarkr-loop/SKILL.md +72 -1
- package/skills/tickmarkr-overseer/SKILL.md +12 -0
- package/skills/tickmarkr-overseer/scripts/watch-context.sh +13 -2
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
type Help = {
|
|
2
|
+
usage: string;
|
|
3
|
+
description: string;
|
|
4
|
+
options: Record<string, string>;
|
|
5
|
+
examples: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const COMMAND_HELP: {
|
|
8
|
+
init: {
|
|
9
|
+
usage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
options: {
|
|
12
|
+
"--global-dir <path>": string;
|
|
13
|
+
"--agent": string;
|
|
14
|
+
"--force": string;
|
|
15
|
+
"--docs": string;
|
|
16
|
+
"--fresh": string;
|
|
17
|
+
"--yes": string;
|
|
18
|
+
};
|
|
19
|
+
examples: string[];
|
|
20
|
+
};
|
|
21
|
+
doctor: {
|
|
22
|
+
usage: string;
|
|
23
|
+
description: string;
|
|
24
|
+
options: {
|
|
25
|
+
"--models": string;
|
|
26
|
+
"--fix": string;
|
|
27
|
+
"--fix-only": string;
|
|
28
|
+
"--cached": string;
|
|
29
|
+
"--cached-only": string;
|
|
30
|
+
"--probe-preflight": string;
|
|
31
|
+
"--preflight": string;
|
|
32
|
+
"--refresh-catalog": string;
|
|
33
|
+
"--catalog-only": string;
|
|
34
|
+
};
|
|
35
|
+
examples: string[];
|
|
36
|
+
};
|
|
37
|
+
fleet: {
|
|
38
|
+
usage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
options: {
|
|
41
|
+
"--print": string;
|
|
42
|
+
"--why": string;
|
|
43
|
+
"--global-dir <path>": string;
|
|
44
|
+
"--fresh": string;
|
|
45
|
+
};
|
|
46
|
+
examples: string[];
|
|
47
|
+
};
|
|
48
|
+
compile: {
|
|
49
|
+
usage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
options: {
|
|
52
|
+
"--type <speckit|prd|gsd|native>": string;
|
|
53
|
+
"--dry-run": string;
|
|
54
|
+
"--strict": string;
|
|
55
|
+
};
|
|
56
|
+
examples: string[];
|
|
57
|
+
};
|
|
58
|
+
scope: {
|
|
59
|
+
usage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
options: {
|
|
62
|
+
"--preview": string;
|
|
63
|
+
"--yes": string;
|
|
64
|
+
"--force": string;
|
|
65
|
+
};
|
|
66
|
+
examples: string[];
|
|
67
|
+
};
|
|
68
|
+
plan: {
|
|
69
|
+
usage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
options: {
|
|
72
|
+
"--mode <risk-based|partner-led|staff-led>": string;
|
|
73
|
+
"--driver <auto|herdr|subprocess|orca>": string;
|
|
74
|
+
};
|
|
75
|
+
examples: string[];
|
|
76
|
+
};
|
|
77
|
+
run: {
|
|
78
|
+
usage: string;
|
|
79
|
+
description: string;
|
|
80
|
+
options: {
|
|
81
|
+
"--concurrency <N>": string;
|
|
82
|
+
"--driver <auto|herdr|subprocess|orca>": string;
|
|
83
|
+
"--route-strict": string;
|
|
84
|
+
"--no-explore": string;
|
|
85
|
+
"--mode <risk-based|partner-led|staff-led>": string;
|
|
86
|
+
"--quality": string;
|
|
87
|
+
"--supersedes <run-id>": string;
|
|
88
|
+
};
|
|
89
|
+
examples: string[];
|
|
90
|
+
};
|
|
91
|
+
status: {
|
|
92
|
+
usage: string;
|
|
93
|
+
description: string;
|
|
94
|
+
options: {
|
|
95
|
+
"--oneline": string;
|
|
96
|
+
"--watch": string;
|
|
97
|
+
"--plain": string;
|
|
98
|
+
"--events": string;
|
|
99
|
+
"--jsonl": string;
|
|
100
|
+
"--decision-events": string;
|
|
101
|
+
"--webhook <url>": string;
|
|
102
|
+
};
|
|
103
|
+
examples: string[];
|
|
104
|
+
};
|
|
105
|
+
stats: {
|
|
106
|
+
usage: string;
|
|
107
|
+
description: string;
|
|
108
|
+
options: {};
|
|
109
|
+
examples: string[];
|
|
110
|
+
};
|
|
111
|
+
resume: {
|
|
112
|
+
usage: string;
|
|
113
|
+
description: string;
|
|
114
|
+
options: {
|
|
115
|
+
"--graph-changed": string;
|
|
116
|
+
"--retry-failed": string;
|
|
117
|
+
"--driver <auto|herdr|subprocess|orca>": string;
|
|
118
|
+
};
|
|
119
|
+
examples: string[];
|
|
120
|
+
};
|
|
121
|
+
report: {
|
|
122
|
+
usage: string;
|
|
123
|
+
description: string;
|
|
124
|
+
options: {
|
|
125
|
+
"--md": string;
|
|
126
|
+
"--compare <baseline-run-id>": string;
|
|
127
|
+
"--bundle <path>": string;
|
|
128
|
+
};
|
|
129
|
+
examples: string[];
|
|
130
|
+
};
|
|
131
|
+
profile: {
|
|
132
|
+
usage: string;
|
|
133
|
+
description: string;
|
|
134
|
+
options: {
|
|
135
|
+
"--explain <shape> <adapter:model> [sub|api]": string;
|
|
136
|
+
"--weight <0|0.5>": string;
|
|
137
|
+
"--reason <text>": string;
|
|
138
|
+
};
|
|
139
|
+
examples: string[];
|
|
140
|
+
};
|
|
141
|
+
ui: {
|
|
142
|
+
usage: string;
|
|
143
|
+
description: string;
|
|
144
|
+
options: {
|
|
145
|
+
"--view <home|run|evidence>": string;
|
|
146
|
+
"--setup": string;
|
|
147
|
+
};
|
|
148
|
+
examples: string[];
|
|
149
|
+
};
|
|
150
|
+
unlock: {
|
|
151
|
+
usage: string;
|
|
152
|
+
description: string;
|
|
153
|
+
options: {
|
|
154
|
+
"--garbage": string;
|
|
155
|
+
"--yes": string;
|
|
156
|
+
};
|
|
157
|
+
examples: string[];
|
|
158
|
+
};
|
|
159
|
+
approve: {
|
|
160
|
+
usage: string;
|
|
161
|
+
description: string;
|
|
162
|
+
options: {
|
|
163
|
+
"--by <name>": string;
|
|
164
|
+
"--reason <text>": string;
|
|
165
|
+
"--waive": string;
|
|
166
|
+
"--uphold": string;
|
|
167
|
+
"--recheck": string;
|
|
168
|
+
"--review-rounds <N>": string;
|
|
169
|
+
};
|
|
170
|
+
examples: string[];
|
|
171
|
+
};
|
|
172
|
+
beat: {
|
|
173
|
+
usage: string;
|
|
174
|
+
description: string;
|
|
175
|
+
options: {
|
|
176
|
+
"--seat <identity>": string;
|
|
177
|
+
"--arm-id <identity>": string;
|
|
178
|
+
"--pct <0..100>": string;
|
|
179
|
+
"--threshold-pct <0..100>": string;
|
|
180
|
+
"--stand-down": string;
|
|
181
|
+
};
|
|
182
|
+
examples: string[];
|
|
183
|
+
};
|
|
184
|
+
version: {
|
|
185
|
+
usage: string;
|
|
186
|
+
description: string;
|
|
187
|
+
options: {
|
|
188
|
+
"--dist": string;
|
|
189
|
+
};
|
|
190
|
+
examples: string[];
|
|
191
|
+
};
|
|
192
|
+
verify: {
|
|
193
|
+
usage: string;
|
|
194
|
+
description: string;
|
|
195
|
+
options: {
|
|
196
|
+
"--base <ref>": string;
|
|
197
|
+
"--criteria <file>": string;
|
|
198
|
+
"--task <id>": string;
|
|
199
|
+
"--files <glob>": string;
|
|
200
|
+
"--author <adapter:model>": string;
|
|
201
|
+
"--baseline <path>": string;
|
|
202
|
+
"--record <run-id>": string;
|
|
203
|
+
"--json": string;
|
|
204
|
+
"--no-review": string;
|
|
205
|
+
"--no-acceptance": string;
|
|
206
|
+
};
|
|
207
|
+
examples: string[];
|
|
208
|
+
};
|
|
209
|
+
eval: {
|
|
210
|
+
usage: string;
|
|
211
|
+
description: string;
|
|
212
|
+
options: {};
|
|
213
|
+
examples: string[];
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
export declare const PROFILE_HELP: Record<string, Help>;
|
|
217
|
+
export declare function hasHelpFlag(argv: readonly string[]): boolean;
|
|
218
|
+
export declare function commandHelp(command: string, argv?: readonly string[]): string;
|
|
219
|
+
export {};
|
package/dist/cli/help.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// Descriptions live beside dispatch, not in mutating command bodies. The parser/registry drift
|
|
2
|
+
// test checks these option names against production source; adding a command requires help here.
|
|
3
|
+
export const COMMAND_HELP = {
|
|
4
|
+
init: {
|
|
5
|
+
usage: "init [options]", description: "Set up repository/global config, a starter spec and adapter health.",
|
|
6
|
+
options: {
|
|
7
|
+
"--global-dir <path>": "Use this global configuration directory.",
|
|
8
|
+
"--agent": "Install agent skills; combine with --docs for guidance files.",
|
|
9
|
+
"--force": "Refresh existing managed agent skills/docs when installing them.",
|
|
10
|
+
"--docs": "Include agent guidance documents with --agent.",
|
|
11
|
+
"--fresh": "Force fresh adapter probes instead of reusing recent health.",
|
|
12
|
+
"--yes": "Skip the interactive setup wizard and use defaults.",
|
|
13
|
+
}, examples: ["init --yes", "init --agent --force --docs"],
|
|
14
|
+
},
|
|
15
|
+
doctor: {
|
|
16
|
+
usage: "doctor [options]", description: "Probe configured adapters and models and print diagnostics. Default probing may make model calls and refresh a stale catalog.",
|
|
17
|
+
options: {
|
|
18
|
+
"--models": "Include full per-model diagnostics.",
|
|
19
|
+
"--fix": "Run normal probes and repair the test-runner ignore when a safe edit exists.",
|
|
20
|
+
"--fix-only": "Repair and verify the test-runner ignore locally; skip model probes and catalog refresh.",
|
|
21
|
+
"--cached": "Read cached diagnostics without probing or refreshing the catalog.",
|
|
22
|
+
"--cached-only": "Alias for --cached.",
|
|
23
|
+
"--probe-preflight": "Disclose configured model/probe counts and affected files without probing.",
|
|
24
|
+
"--preflight": "Alias for --probe-preflight.",
|
|
25
|
+
"--refresh-catalog": "Refresh only the model catalog; use as the sole option.",
|
|
26
|
+
"--catalog-only": "Alias for --refresh-catalog; use as the sole option.",
|
|
27
|
+
}, examples: ["doctor --probe-preflight", "doctor --fix-only", "doctor --models", "doctor --refresh-catalog"],
|
|
28
|
+
},
|
|
29
|
+
fleet: {
|
|
30
|
+
usage: "fleet [options]", description: "Edit fleet configuration interactively, or print it for scripts.",
|
|
31
|
+
options: {
|
|
32
|
+
"--print": "Print fleet configuration without opening the editor.",
|
|
33
|
+
"--why": "Include routing eligibility explanations in printed output.",
|
|
34
|
+
"--global-dir <path>": "Use this global configuration directory.",
|
|
35
|
+
"--fresh": "Refresh adapter health; may make model calls.",
|
|
36
|
+
}, examples: ["fleet --print --why", "fleet"],
|
|
37
|
+
},
|
|
38
|
+
compile: {
|
|
39
|
+
usage: "compile <spec-dir-or-md> [options]", description: "Compile source into .tickmarkr/graph.json; acceptance criteria are required.",
|
|
40
|
+
options: {
|
|
41
|
+
"--type <speckit|prd|gsd|native>": "Select the source format explicitly.",
|
|
42
|
+
"--dry-run": "Validate and report without saving the graph.",
|
|
43
|
+
"--strict": "Treat all native authoring lint findings as blocking errors.",
|
|
44
|
+
}, examples: ["compile feature.spec.md --type native --dry-run", "compile feature.spec.md --strict"],
|
|
45
|
+
},
|
|
46
|
+
scope: {
|
|
47
|
+
usage: "scope <intent-file> [options]", description: "Draft a native spec beside an answered intent. Authoring requires TTY confirmation or --yes and may make model calls.",
|
|
48
|
+
options: {
|
|
49
|
+
"--preview": "Validate locally and show cached candidate, destination and call budget; no probes, model calls or writes.",
|
|
50
|
+
"--yes": "Confirm the disclosed authoring action without a TTY prompt.",
|
|
51
|
+
"--force": "Allow overwriting the destination spec after confirmation.",
|
|
52
|
+
}, examples: ["scope feature.intent.md --preview", "scope feature.intent.md --yes", "scope feature.intent.md --yes --force"],
|
|
53
|
+
},
|
|
54
|
+
plan: {
|
|
55
|
+
usage: "plan [options]", description: "Print the compiled graph's routing preview, cost estimate and floor lints without dispatching workers.",
|
|
56
|
+
options: {
|
|
57
|
+
"--mode <risk-based|partner-led|staff-led>": "Preview routing under the selected mode.",
|
|
58
|
+
"--driver <auto|herdr|subprocess|orca>": "Preview the execution driver; orca is explicit-only.",
|
|
59
|
+
}, examples: ["plan", "plan --mode risk-based --driver subprocess"],
|
|
60
|
+
},
|
|
61
|
+
run: {
|
|
62
|
+
usage: "run [options]", description: "Execute the compiled graph with production preflight, gates and run locking.",
|
|
63
|
+
options: {
|
|
64
|
+
"--concurrency <N>": "Set a positive integer worker concurrency.",
|
|
65
|
+
"--driver <auto|herdr|subprocess|orca>": "Choose the execution driver; orca is explicit-only.",
|
|
66
|
+
"--route-strict": "Refuse routing conflicts and lints before dispatch.",
|
|
67
|
+
"--no-explore": "Disable learned routing exploration for this run.",
|
|
68
|
+
"--mode <risk-based|partner-led|staff-led>": "Override the routing mode for this run.",
|
|
69
|
+
"--quality": "Compatibility alias for --mode partner-led; cannot combine with --mode.",
|
|
70
|
+
"--supersedes <run-id>": "Record that this engagement supersedes the named run.",
|
|
71
|
+
}, examples: ["run --concurrency 2 --driver subprocess --route-strict"],
|
|
72
|
+
},
|
|
73
|
+
status: {
|
|
74
|
+
usage: "status [<run-id>] [options]", description: "Show a named run or the latest run. With --watch --events, stdout is one JSON document per decision event and stderr carries keepalive lines. Do not merge stdout and stderr (2>&1 corrupts the JSON document stream).",
|
|
75
|
+
options: {
|
|
76
|
+
"--oneline": "Print a compact snapshot and exit.",
|
|
77
|
+
"--watch": "Follow updates; on a TTY open Run unless plain output or event streaming is selected.",
|
|
78
|
+
"--plain": "Use line-mode output with --watch, including on a TTY.",
|
|
79
|
+
"--events": "With --watch, replay and follow decision events as JSON documents on stdout.",
|
|
80
|
+
"--jsonl": "Alias for --events.",
|
|
81
|
+
"--decision-events": "Alias for --events.",
|
|
82
|
+
"--webhook <url>": "With --watch, POST decision events to this URL.",
|
|
83
|
+
}, examples: ["status --oneline", "status run-example --watch --plain", "status run-example --watch --events"],
|
|
84
|
+
},
|
|
85
|
+
stats: {
|
|
86
|
+
usage: "stats", description: "Print all-run channel delivery, failure, rescue, author and reviewer statistics. Takes no run ID.",
|
|
87
|
+
options: {}, examples: ["stats"],
|
|
88
|
+
},
|
|
89
|
+
resume: {
|
|
90
|
+
usage: "resume <run-id> [options]", description: "Continue a run from its journal through production preflight and gates.",
|
|
91
|
+
options: {
|
|
92
|
+
"--graph-changed": "Accept and journal a changed graph identity for this run.",
|
|
93
|
+
"--retry-failed": "Retry failed tasks.",
|
|
94
|
+
"--driver <auto|herdr|subprocess|orca>": "Choose the execution driver; orca is explicit-only.",
|
|
95
|
+
}, examples: ["resume run-example --driver subprocess", "resume run-example --retry-failed"],
|
|
96
|
+
},
|
|
97
|
+
report: {
|
|
98
|
+
usage: "report [<run-id>] [options]", description: "Report on a named or latest run. Markdown goes to stdout; redirect stdout to save an execution record beside the spec.",
|
|
99
|
+
options: {
|
|
100
|
+
"--md": "Write the Markdown execution record to stdout; does not create a Markdown file.",
|
|
101
|
+
"--compare <baseline-run-id>": "Include cost, gate and duration deltas with an environment comparability guard.",
|
|
102
|
+
"--bundle <path>": "Write a portable JSON proof bundle to this local path.",
|
|
103
|
+
}, examples: ["report run-example --md > feature.record.md", "report run-example --compare run-baseline", "report run-example --bundle proof.json"],
|
|
104
|
+
},
|
|
105
|
+
profile: {
|
|
106
|
+
usage: "profile [reset|discount <run-id> [<task-id>]|discounts] [options]",
|
|
107
|
+
description: "Show learned routing, reset the history cursor, append a discount or list discounts. Use profile <operation> --help for details.",
|
|
108
|
+
options: {
|
|
109
|
+
"--explain <shape> <adapter:model> [sub|api]": "Explain the learned score for a shape and channel (default billing: sub).",
|
|
110
|
+
"--weight <0|0.5>": "Required for discount: set the evidence weight.",
|
|
111
|
+
"--reason <text>": "Required for discount: explain the evidence claim.",
|
|
112
|
+
}, examples: ["profile", "profile --explain implement fake:fake-1 sub", "profile discount run-example T1 --weight 0.5 --reason 'infra incident'", "profile discounts", "profile reset"],
|
|
113
|
+
},
|
|
114
|
+
ui: {
|
|
115
|
+
usage: "ui [<run-id>] [options]", description: "Open the cockpit on a TTY. Delivered views: 1 Home, 4 Run, 5 Evidence. Fleet, Plan and Health remain CLI commands: tickmarkr fleet, tickmarkr plan, tickmarkr doctor. Without a TTY use tickmarkr fleet --print or tickmarkr status --watch.",
|
|
116
|
+
options: {
|
|
117
|
+
"--view <home|run|evidence>": "Choose a delivered view; default home (an empty repository opens Home).",
|
|
118
|
+
"--setup": "Open Run Parks for the positional run ID, or latest run; overrides --view.",
|
|
119
|
+
}, examples: ["ui", "ui run-example --view run", "ui run-example --view evidence", "ui --setup run-example"],
|
|
120
|
+
},
|
|
121
|
+
unlock: {
|
|
122
|
+
usage: "unlock <run-id> [--yes] | tickmarkr unlock --garbage [--yes]", description: "Remove only a matching, provably dead run lock after confirmation. Live, inaccessible or changed holders refuse; commit rechecks the preview.",
|
|
123
|
+
options: {
|
|
124
|
+
"--garbage": "Recover an unparseable lock identified by its bytes/inode; no run ID is invented.",
|
|
125
|
+
"--yes": "Confirm removal without a TTY prompt; all holder and race checks still apply.",
|
|
126
|
+
}, examples: ["unlock run-example --yes", "unlock --garbage --yes"],
|
|
127
|
+
},
|
|
128
|
+
approve: {
|
|
129
|
+
usage: "approve <run-id> <task-id> [options]", description: "Append a validated park decision. A running owner may enact it; a closed run requires a separate resume. Decisions cannot be undone.",
|
|
130
|
+
options: {
|
|
131
|
+
"--by <name>": "Name the actor (default: current OS user).",
|
|
132
|
+
"--reason <text>": "Record the decision reason.",
|
|
133
|
+
"--waive": "Waive only the identified failed gate.",
|
|
134
|
+
"--uphold": "Uphold a review failure and fund a fixed attempt.",
|
|
135
|
+
"--recheck": "Request rechecking an infra or failed-gate park; satisfies no gate.",
|
|
136
|
+
"--review-rounds <N>": "Set a positive integer review-round ceiling with the decision.",
|
|
137
|
+
}, examples: ["approve run-example T1 --by operator --reason 'ready to proceed'", "approve run-example T1 --recheck --reason 'infra recovered'"],
|
|
138
|
+
},
|
|
139
|
+
beat: {
|
|
140
|
+
usage: "beat <orchestrator|orchestrator-context|overseer|overseer-context|watch> --seat <identity> [options]",
|
|
141
|
+
description: "Write one supervision beat. The supervising seat's watcher loop repeats it; stopped beats become STALE.",
|
|
142
|
+
options: {
|
|
143
|
+
"--seat <identity>": "Required: identify the supervising pane or agent.",
|
|
144
|
+
"--arm-id <identity>": "Identify this supervision arm.",
|
|
145
|
+
"--pct <0..100>": "Report current context consumption percentage.",
|
|
146
|
+
"--threshold-pct <0..100>": "Set the context warning threshold (default 75).",
|
|
147
|
+
"--stand-down": "Record an explicit handoff and stand down this tier.",
|
|
148
|
+
}, examples: ["beat overseer --seat supervisor", "beat overseer --seat supervisor --stand-down"],
|
|
149
|
+
},
|
|
150
|
+
version: {
|
|
151
|
+
usage: "version [--dist]", description: "Print the installed package version. Top-level aliases: --version and -v.",
|
|
152
|
+
options: { "--dist": "Also print the resolved build directory and distribution fingerprint." },
|
|
153
|
+
examples: ["version", "version --dist"],
|
|
154
|
+
},
|
|
155
|
+
verify: {
|
|
156
|
+
usage: "verify [--base <ref>] [--criteria <file> | --task <id>] [options]",
|
|
157
|
+
description: "Verify the committed merge-base(base, HEAD)..HEAD diff without a daemon or retries. The verdict and JSON result are written to stdout; progress and diagnostics are written to stderr. Do not merge stdout and stderr (2>&1 corrupts the verdict stream).",
|
|
158
|
+
options: {
|
|
159
|
+
"--base <ref>": "Compare against merge-base(ref, HEAD); default main.",
|
|
160
|
+
"--criteria <file>": "Read acceptance criteria from a file; use this or --task.",
|
|
161
|
+
"--task <id>": "Read acceptance criteria and default file scope from a compiled task.",
|
|
162
|
+
"--files <glob>": "Declare file scope; repeat for multiple globs (overrides task scope).",
|
|
163
|
+
"--author <adapter:model>": "Identify the author channel for independent reviewer selection.",
|
|
164
|
+
"--baseline <path>": "Read an existing baseline JSON file instead of capturing one.",
|
|
165
|
+
"--record <run-id>": "Append verification results to the named run journal.",
|
|
166
|
+
"--json": "Print a machine-readable verdict on stdout.",
|
|
167
|
+
"--no-review": "Disable semantic review; deterministic gates remain mandatory.",
|
|
168
|
+
"--no-acceptance": "Disable semantic acceptance even when criteria are supplied.",
|
|
169
|
+
}, examples: ["verify --base main --task T1 --files 'src/**' --files 'tests/**' --author fake:fake-1 --json", "verify --base main --baseline baseline.json --record run-example --no-review --no-acceptance"],
|
|
170
|
+
},
|
|
171
|
+
eval: {
|
|
172
|
+
usage: "eval [<fixtures-root>]", description: "Discover and validate fixture start/solution directories, seed valid fixtures into temporary git repositories, then clean them up. Defaults to fixtures/eval in the current directory.",
|
|
173
|
+
options: {}, examples: ["eval", "eval ./fixtures", "eval -- --help"],
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
export const PROFILE_HELP = {
|
|
177
|
+
reset: {
|
|
178
|
+
usage: "profile reset", description: "Move the learned-history cursor to the latest run. Writes .tickmarkr/profile-since; preserves all telemetry. Help never resets it.",
|
|
179
|
+
options: {}, examples: ["profile reset"],
|
|
180
|
+
},
|
|
181
|
+
discount: {
|
|
182
|
+
usage: "profile discount <run-id> [<task-id>] --weight <0|0.5> --reason <text>", description: "Append an evidence discount to .tickmarkr/profile-discounts. Omitting the task ID discounts the entire run.",
|
|
183
|
+
options: { "--weight <0|0.5>": "Required evidence weight.", "--reason <text>": "Required nonempty reason for the evidence claim." },
|
|
184
|
+
examples: ["profile discount run-example T1 --weight 0.5 --reason 'infra incident'"],
|
|
185
|
+
},
|
|
186
|
+
discounts: {
|
|
187
|
+
usage: "profile discounts", description: "List recorded evidence discounts without modifying them.", options: {}, examples: ["profile discounts"],
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
export function hasHelpFlag(argv) {
|
|
191
|
+
for (const arg of argv) {
|
|
192
|
+
if (arg === "--")
|
|
193
|
+
break;
|
|
194
|
+
if (arg === "--help" || arg === "-h")
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
export function commandHelp(command, argv = []) {
|
|
200
|
+
const operation = argv.find((arg) => arg !== "--help" && arg !== "-h");
|
|
201
|
+
const nested = command === "profile" && operation && Object.hasOwn(PROFILE_HELP, operation) ? PROFILE_HELP[operation] : undefined;
|
|
202
|
+
const help = nested ?? (Object.hasOwn(COMMAND_HELP, command) ? COMMAND_HELP[command] : undefined);
|
|
203
|
+
if (!help)
|
|
204
|
+
return `usage: tickmarkr ${command}\n --help, -h Show help without running the command.`;
|
|
205
|
+
return [
|
|
206
|
+
`usage: tickmarkr ${help.usage}`, help.description, "", "Options:",
|
|
207
|
+
...Object.entries(help.options).map(([flag, description]) => ` ${flag} ${description}`),
|
|
208
|
+
" --help, -h Show help without running the command.",
|
|
209
|
+
"", "Examples:", ...help.examples.map((example) => ` tickmarkr ${example}`),
|
|
210
|
+
"", "Help flags are recognized only before --; arguments after -- are literal data.",
|
|
211
|
+
].join("\n");
|
|
212
|
+
}
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,11 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { approve } from "./commands/approve.js";
|
|
3
|
+
import { beat } from "./commands/beat.js";
|
|
4
|
+
import { compile } from "./commands/compile.js";
|
|
5
|
+
import { doctor } from "./commands/doctor.js";
|
|
6
|
+
import { evalCommand } from "./commands/eval.js";
|
|
7
|
+
import { fleet } from "./commands/fleet.js";
|
|
8
|
+
import { init } from "./commands/init.js";
|
|
9
|
+
import { plan } from "./commands/plan.js";
|
|
10
|
+
import { profile } from "./commands/profile.js";
|
|
11
|
+
import { report } from "./commands/report.js";
|
|
12
|
+
import { resume } from "./commands/resume.js";
|
|
13
|
+
import { run } from "./commands/run.js";
|
|
14
|
+
import { scope } from "./commands/scope.js";
|
|
15
|
+
import { stats } from "./commands/stats.js";
|
|
16
|
+
import { status } from "./commands/status.js";
|
|
17
|
+
import { ui } from "./commands/ui.js";
|
|
18
|
+
import { unlock } from "./commands/unlock.js";
|
|
19
|
+
import { verify } from "./commands/verify.js";
|
|
20
|
+
import { version } from "./commands/version.js";
|
|
2
21
|
export type CommandResult = string | {
|
|
3
22
|
out: string;
|
|
4
23
|
code: number;
|
|
5
24
|
};
|
|
6
25
|
export type CommandMap = Record<string, (argv: string[]) => Promise<CommandResult>>;
|
|
7
|
-
export declare const COMMANDS:
|
|
8
|
-
|
|
26
|
+
export declare const COMMANDS: {
|
|
27
|
+
init: typeof init;
|
|
28
|
+
doctor: typeof doctor;
|
|
29
|
+
fleet: typeof fleet;
|
|
30
|
+
compile: typeof compile;
|
|
31
|
+
scope: typeof scope;
|
|
32
|
+
plan: typeof plan;
|
|
33
|
+
run: typeof run;
|
|
34
|
+
status: typeof status;
|
|
35
|
+
stats: typeof stats;
|
|
36
|
+
resume: typeof resume;
|
|
37
|
+
report: typeof report;
|
|
38
|
+
profile: typeof profile;
|
|
39
|
+
ui: typeof ui;
|
|
40
|
+
unlock: typeof unlock;
|
|
41
|
+
approve: typeof approve;
|
|
42
|
+
beat: typeof beat;
|
|
43
|
+
version: typeof version;
|
|
44
|
+
verify: typeof verify;
|
|
45
|
+
eval: typeof evalCommand;
|
|
46
|
+
};
|
|
47
|
+
export type RegisteredCommand = keyof typeof COMMANDS;
|
|
48
|
+
export declare const USAGE = "tickmarkr \u2014 spec-driven orchestration harness for AI coding agents\nusage: tickmarkr <command>\n init guided setup + doctor; init --agent [--force] [--docs] adds agent skills/docs\n doctor re-probe adapters, herdr, auth; print capability matrix (--fix writes the test-runner ignore when a safe edit exists)\n fleet interactive fleet editor (fleet --print for CI drift checks)\n compile <src> spec \u2192 .tickmarkr/graph.json (fails without acceptance criteria)\n scope <intent> preview locally with --preview; draft after confirmation or --yes (--force to overwrite)\n plan dry-run routing table + cost estimate + floor lints\n eval discover and validate fixtures, seed isolated temp repos, then clean them up\n run execute the graph (--concurrency N --driver auto|herdr|subprocess|orca --route-strict; orca runs only when named)\n status live run state (--watch --events: JSON documents on stdout, keepalives on stderr; 2>&1 corrupts the stream)\n stats all-run channel delivery, red, rescue, author and reviewer statistics\n verify run the gate battery standalone against merge-base(--base, HEAD)..HEAD \u2014 verdict/JSON on stdout, progress on stderr; 2>&1 corrupts the verdict stream (--base main --criteria <file> | --task <id> [--files <glob>] [--author adapter:model] [--no-review] [--json])\n resume <id> continue a run from its journal\n report <id> cost/quality report (--md writes Markdown to stdout; redirect to save a record)\n profile show learned routing profile (profile reset = forget history via cursor, keeps telemetry)\n ui open Home, Run or Evidence (--view home|run|evidence; --setup <id> opens Run Parks)\n unlock remove a stale/garbage run lock (refuses if the holder is alive)\n beat <tier> record one supervision beat for orchestrator|orchestrator-context|overseer|overseer-context|watch, --seat <identity> required (--stand-down to hand off); a supervising seat's own watcher loop calls it, and status reads the tier STALE once the beats stop\n approve <id> <task> release a park (--uphold sides with the reviewer and funds a fixed attempt; --by <name> --reason <text>); takes effect on resume\n version print the installed version (--dist adds build location and fingerprint)\n\nUse tickmarkr <command> --help (or -h) for all options and examples.\nUse tickmarkr profile <operation> --help for nested profile help.";
|
|
9
49
|
export declare function dispatch(cmd: string | undefined, argv: string[], commands?: CommandMap): Promise<{
|
|
10
50
|
out: string;
|
|
11
51
|
code: number;
|
package/dist/cli/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { ui } from "./commands/ui.js";
|
|
|
20
20
|
import { unlock } from "./commands/unlock.js";
|
|
21
21
|
import { verify } from "./commands/verify.js";
|
|
22
22
|
import { version } from "./commands/version.js";
|
|
23
|
+
import { commandHelp, hasHelpFlag } from "./help.js";
|
|
23
24
|
const normalize = (r) => typeof r === "string" ? { out: r, code: 0 } : r;
|
|
24
25
|
export const COMMANDS = {
|
|
25
26
|
init, doctor, fleet, compile, scope, plan, run, status, stats, resume, report, profile, ui, unlock, approve, beat, version, verify, eval: evalCommand,
|
|
@@ -33,33 +34,47 @@ usage: tickmarkr <command>
|
|
|
33
34
|
doctor re-probe adapters, herdr, auth; print capability matrix (--fix writes the test-runner ignore when a safe edit exists)
|
|
34
35
|
fleet interactive fleet editor (fleet --print for CI drift checks)
|
|
35
36
|
compile <src> spec → .tickmarkr/graph.json (fails without acceptance criteria)
|
|
36
|
-
scope <intent>
|
|
37
|
+
scope <intent> preview locally with --preview; draft after confirmation or --yes (--force to overwrite)
|
|
37
38
|
plan dry-run routing table + cost estimate + floor lints
|
|
38
|
-
eval
|
|
39
|
+
eval discover and validate fixtures, seed isolated temp repos, then clean them up
|
|
39
40
|
run execute the graph (--concurrency N --driver auto|herdr|subprocess|orca --route-strict; orca runs only when named)
|
|
40
41
|
status live run state (--watch --events: JSON documents on stdout, keepalives on stderr; 2>&1 corrupts the stream)
|
|
41
42
|
stats all-run channel delivery, red, rescue, author and reviewer statistics
|
|
42
43
|
verify run the gate battery standalone against merge-base(--base, HEAD)..HEAD — verdict/JSON on stdout, progress on stderr; 2>&1 corrupts the verdict stream (--base main --criteria <file> | --task <id> [--files <glob>] [--author adapter:model] [--no-review] [--json])
|
|
43
44
|
resume <id> continue a run from its journal
|
|
44
|
-
report <id> cost/quality report (--md
|
|
45
|
+
report <id> cost/quality report (--md writes Markdown to stdout; redirect to save a record)
|
|
45
46
|
profile show learned routing profile (profile reset = forget history via cursor, keeps telemetry)
|
|
46
|
-
ui open
|
|
47
|
+
ui open Home, Run or Evidence (--view home|run|evidence; --setup <id> opens Run Parks)
|
|
47
48
|
unlock remove a stale/garbage run lock (refuses if the holder is alive)
|
|
48
49
|
beat <tier> record one supervision beat for orchestrator|orchestrator-context|overseer|overseer-context|watch, --seat <identity> required (--stand-down to hand off); a supervising seat's own watcher loop calls it, and status reads the tier STALE once the beats stop
|
|
49
|
-
approve <id> <task> release a park (--uphold sides with the reviewer and funds a fixed attempt; --by <name> --reason <text>); takes effect on resume
|
|
50
|
+
approve <id> <task> release a park (--uphold sides with the reviewer and funds a fixed attempt; --by <name> --reason <text>); takes effect on resume
|
|
51
|
+
version print the installed version (--dist adds build location and fingerprint)
|
|
52
|
+
|
|
53
|
+
Use tickmarkr <command> --help (or -h) for all options and examples.
|
|
54
|
+
Use tickmarkr profile <operation> --help for nested profile help.`;
|
|
50
55
|
// pure, testable dispatcher: resolves a command, forwards argv, shapes the result — no side effects.
|
|
51
56
|
// unknown/missing cmd → USAGE (exit 1 if a cmd was typed, 0 for bare `tickmarkr`); a handler throw becomes
|
|
52
57
|
// a one-line `tickmarkr <cmd>: <message>` (never a raw stack) at exit 1.
|
|
53
58
|
export async function dispatch(cmd, argv, commands = COMMANDS) {
|
|
54
|
-
if (cmd && VERSION_FLAGS.has(cmd))
|
|
55
|
-
return { out: await version(argv), code: 0 };
|
|
56
59
|
const usage = process.stdout.isTTY ? BANNER + USAGE : USAGE;
|
|
57
60
|
if (!cmd || HELP_CMDS.has(cmd))
|
|
58
61
|
return { out: usage, code: 0 };
|
|
59
|
-
|
|
62
|
+
if (VERSION_FLAGS.has(cmd))
|
|
63
|
+
cmd = "version";
|
|
64
|
+
const fn = Object.hasOwn(commands, cmd) ? commands[cmd] : undefined;
|
|
60
65
|
if (!fn)
|
|
61
66
|
return { out: usage, code: 1 };
|
|
67
|
+
if (hasHelpFlag(argv))
|
|
68
|
+
return { out: commandHelp(cmd, argv), code: 0 };
|
|
62
69
|
try {
|
|
70
|
+
// These two legacy handlers scan the entire argv for help before parsing. Preserve their
|
|
71
|
+
// direct-call API, but never let a literal positional turn back into help at the CLI boundary.
|
|
72
|
+
// verify accepts no positionals; status accepts a run ID, which cannot start with a dash.
|
|
73
|
+
const separator = argv.indexOf("--");
|
|
74
|
+
const literalHelp = separator < 0 ? undefined : argv.slice(separator + 1).find((arg) => arg === "--help" || arg === "-h");
|
|
75
|
+
if (literalHelp && (fn === verify || fn === status)) {
|
|
76
|
+
throw new Error(`literal argument ${JSON.stringify(literalHelp)} after -- ${fn === verify ? "is not accepted: verify takes no positional arguments" : "is not a valid run ID"}`);
|
|
77
|
+
}
|
|
63
78
|
return normalize(await fn(argv));
|
|
64
79
|
}
|
|
65
80
|
catch (err) {
|
package/dist/drivers/herdr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JournalEvent } from "../run/journal.js";
|
|
2
|
-
import { type ExecutorDriver, type NotifyOpts, type PanesToCloseOpts, type Slot, type SlotOpts } from "./types.js";
|
|
2
|
+
import { type ExecutorDriver, type FocusTarget, type FocusResult, type NotifyOpts, type PanesToCloseOpts, type Slot, type SlotOpts } from "./types.js";
|
|
3
3
|
export declare const TRAILER_SAFE_FLOOR_COLS = 108;
|
|
4
4
|
export declare const TRAILER_WIDTH_MARGIN = 2;
|
|
5
5
|
export declare const DELIVERY_ATTEMPTS = 3;
|
|
@@ -69,6 +69,7 @@ export declare class HerdrDriver implements ExecutorDriver {
|
|
|
69
69
|
private ws;
|
|
70
70
|
private callerPane;
|
|
71
71
|
private watches;
|
|
72
|
+
private watchTokens;
|
|
72
73
|
constructor(bin?: string, workersPerTab?: number, time?: HerdrTimeSource, journal?: DriverJournal | undefined);
|
|
73
74
|
private appendDispatchRetry;
|
|
74
75
|
private appendPaneClose;
|
|
@@ -126,9 +127,13 @@ export declare class HerdrDriver implements ExecutorDriver {
|
|
|
126
127
|
notify(msg: string, opts?: NotifyOpts): Promise<void>;
|
|
127
128
|
close(slot: Slot): Promise<void>;
|
|
128
129
|
private closeGrouped;
|
|
129
|
-
private
|
|
130
|
+
private watchPanes;
|
|
131
|
+
/** Name collisions never confer repository ownership. Unknown boards stay protected. */
|
|
132
|
+
private retireWatch;
|
|
133
|
+
focus(target: FocusTarget): Promise<FocusResult>;
|
|
130
134
|
private watchSlot;
|
|
131
135
|
private discardSplit;
|
|
136
|
+
/** Only this repository's matching run may replace its acknowledged board. */
|
|
132
137
|
narrator(cwd: string, command: string, runId?: string): Promise<Slot>;
|
|
133
138
|
reconcile(desired: Set<string>, runId: string, opts?: PanesToCloseOpts): Promise<void>;
|
|
134
139
|
worktree(repo: string, branch: string, baseRef: string): Promise<string>;
|