Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
333 lines (282 loc) · 12.5 KB
/
Copy pathjustfile
File metadata and controls
333 lines (282 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
set positional-arguments
# Override with `just cliare_bin=target/debug/cliare ...` when dogfooding a local build.
cliare_bin := "cliare"
packages := "cliare-core cliare-runtime cliare-policy cliare-issues cliare-inference cliare-evidence cliare-shape cliare-context cliare-cli cliare-score cliare-report cliare-eval cliare-guidance cliare-measure cliare-inspect cliare-app cliare"
# Default traversal budget for large CLI surfaces.
profile := "deep"
max_depth := "12"
max_probes := "5000"
concurrency := "8"
allowed_drop := "0"
# Print the ordered CLIARE workflow cheatsheet.
default:
@just cheatsheet
# Print the ordered CLIARE workflow cheatsheet.
cheatsheet:
@printf '%s\n' \
"CLIARE workflow cheatsheet" \
"" \
"Use <cli> for the executable to measure." \
"Use <run-name> for the results folder under .cliare/." \
"Example: <run-name> = cliare-self writes .cliare/cliare-self." \
"" \
"1. Local dogfood check" \
" just justdev" \
" just review cliare" \
"" \
"2. Standard maintainer review" \
" just measure-standard <cli> <run-name>" \
" just review <run-name>" \
" just issues <run-name>" \
" just report-area <run-name> output-contracts" \
" just report-issue <run-name> <issue-id>" \
"" \
"3. Deep measurement for large CLI surfaces" \
" just measure-deep <cli> <run-name>" \
" just jobs <run-name>" \
" just review <run-name>" \
"" \
"4. Security or host-state review" \
" just measure-host <cli> <run-name>" \
" just report <run-name> security" \
" just issues <run-name>" \
"" \
"5. Authenticated or local-context comparison" \
" just measure-auth <cli> <run-name>" \
" just measure-local-context <cli> <run-name> <project-dir>" \
" just context-compare .cliare/<run-name>/contexts/authenticated .cliare/<run-name>/contexts/local-context" \
"" \
"6. CI guard against a baseline" \
" just guard <cli> <run-name> .cliare/<baseline-run-name>/scorecard.json" \
" just guard-policy <cli> <run-name> .cliare/<baseline-run-name>/scorecard.json policy.json" \
"" \
"7. Publish an agent surface" \
" just describe-write <run-name>" \
" just report-write <run-name> harness" \
" just agent-surface <run-name>" \
" just surface-query <run-name> 'check job status'" \
" just surface-explain <run-name> 'jobs status'" \
"" \
"8. Skills and corpus work" \
" just skills-list" \
" just skills-install-dry" \
" just benchmark" \
"" \
"Lookup commands" \
" just recipes Full raw recipe index" \
" just --summary Compact recipe names" \
" just --show <name> Show the exact command for one recipe" \
"" \
"Release gates" \
" just preflight Local CI equivalent before pushing" \
" just publish-dry-run crates.io dry run for one package"
# Print the ordered CLIARE workflow cheatsheet.
help:
@just cheatsheet
# Print the full raw recipe index in source order.
recipes:
@just --list --unsorted
# Build this repository's CLIARE binary for local dogfooding.
build:
cargo build --locked --bin cliare
# Formatting must be stable before a branch leaves the machine.
fmt-check:
cargo fmt --all -- --check
# Type-check the full workspace.
check:
cargo check --locked --workspace --all-targets --all-features
# Treat lint warnings as failures.
clippy:
env RUSTC_WRAPPER= cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
# Run the workspace test suite.
test:
cargo test --locked --workspace --all-features
# Verify every crate package file set without requiring registry state.
package-list:
for package in {{ packages }}; do \
cargo package --locked --list -p "$package" --allow-dirty > /dev/null; \
done
# Build and measure CLIARE with CLIARE.
cliare-on-cliare run="cliare" profile="quick":
cargo build --locked --bin cliare
target/debug/cliare measure target/debug/cliare --out .cliare/{{ run }} --profile {{ profile }} --refresh
target/debug/cliare summary --out .cliare/{{ run }} > .cliare/{{ run }}/summary.md
cat .cliare/{{ run }}/summary.md
# Local CI equivalent before pushing a branch.
preflight: fmt-check check clippy test package-list cliare-on-cliare
@printf '%s\n' "preflight passed"
# Short alias for the local development preflight gate.
justdev: preflight
@printf '%s\n' "justdev passed"
# Dry-run crates.io publish for one package after dependencies exist on crates.io.
publish-dry-run package="cliare":
cargo publish --locked -p {{ package }} --dry-run
# Print CLIARE's machine-readable command contract.
metadata format="json":
{{ cliare_bin }} metadata --format {{ format }}
# Print a role-specific operational playbook.
playbook role="maintainer" cli="mycli" run=cli format="human":
{{ cliare_bin }} playbook {{ role }} --target {{ cli }} --out .cliare/{{ run }} --format {{ format }}
# Measure a local CLI in the foreground.
measure cli run=cli:
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--profile {{ profile }} \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--refresh
# Measure a local CLI in the background for large command surfaces.
measure-detached cli run=cli:
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--profile {{ profile }} \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--refresh \
--detach
# Run a quick smoke measurement with a smaller traversal budget.
measure-quick cli run=cli:
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--profile quick \
--refresh
# Run the standard maintainer-loop measurement.
measure-standard cli run=cli:
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--profile standard \
--refresh
# Run a deep foreground measurement with the configured traversal budget.
measure-deep cli run=cli:
@just profile=deep max_depth={{ max_depth }} max_probes={{ max_probes }} concurrency={{ concurrency }} measure {{ cli }} {{ run }}
# Measure host/auth-specific behavior. Use only when the target needs local state.
measure-host cli run=cli:
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--profile {{ profile }} \
--execution-mode host \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--refresh
# Measure an authenticated context into a context suite under `.cliare/<run>`.
measure-auth cli run=cli:
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--context authenticated \
--auth-state present \
--execution-mode host \
--profile {{ profile }} \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--refresh
# Measure behavior inside a supplied local project/repository directory.
measure-local-context cli run=cli context_workdir=".":
{{ cliare_bin }} measure {{ cli }} \
--out .cliare/{{ run }} \
--context local-context \
--local-context-state present \
--context-workdir {{ context_workdir }} \
--profile {{ profile }} \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--refresh
# Inspect foreground or detached measurement progress for a run.
jobs run:
{{ cliare_bin }} jobs status --out .cliare/{{ run }}
# Inspect measurement progress for a named context in a context suite.
jobs-context run context:
{{ cliare_bin }} jobs status --out .cliare/{{ run }} --context {{ context }}
# Generate or print a persona report from a run.
report run persona="maintainer" format="markdown":
{{ cliare_bin }} report {{ persona }} --out .cliare/{{ run }} --format {{ format }}
# Write one persona report and shared review artifacts.
report-write run persona="maintainer":
{{ cliare_bin }} report {{ persona }} --out .cliare/{{ run }} --write
# Print a focused persona report for one agent-readiness area.
report-area run area persona="maintainer" format="markdown":
{{ cliare_bin }} report {{ persona }} --out .cliare/{{ run }} --area {{ area }} --format {{ format }}
# Print a focused issue report with evidence attached.
report-issue run issue persona="maintainer" format="bundle":
{{ cliare_bin }} report {{ persona }} --out .cliare/{{ run }} --issue {{ issue }} --with-evidence --format {{ format }}
# List generated issues with maintainer dispositions.
issues run format="human":
{{ cliare_bin }} issues list --out .cliare/{{ run }} --format {{ format }}
# Query the measured command surface for a harness intent.
surface-query run intent format="human":
{{ cliare_bin }} surface query {{ quote(intent) }} --out .cliare/{{ run }} --format {{ format }}
# Query commands with JSON output for a harness intent.
surface-query-json run intent:
{{ cliare_bin }} surface query {{ quote(intent) }} --out .cliare/{{ run }} --require-output json --format json
# Explain one measured command path for harness routing.
surface-explain run command_path format="human":
{{ cliare_bin }} surface explain {{ quote(command_path) }} --out .cliare/{{ run }} --format {{ format }}
# List measured commands by readiness state.
surface-list run state="ready" format="human" limit="50":
{{ cliare_bin }} surface list --out .cliare/{{ run }} --state {{ state }} --limit {{ limit }} --format {{ format }}
# Mark an issue with a maintainer disposition.
issue-mark run issue status reason:
{{ cliare_bin }} issues mark {{ issue }} --out .cliare/{{ run }} --status {{ status }} --reason {{ quote(reason) }}
# Describe an artifact directory for humans or agents.
describe run format="markdown":
{{ cliare_bin }} describe .cliare/{{ run }} --format {{ format }}
# Write artifact-map.json and artifact-map.md into the artifact directory.
describe-write run:
{{ cliare_bin }} describe .cliare/{{ run }} --write
# Compare two context measurement directories.
context-compare left right out=".cliare-context" format="markdown":
{{ cliare_bin }} context compare {{ left }} {{ right }} --out {{ out }} --format {{ format }}
# Compare two context measurement directories and write suite artifacts.
context-compare-write left right out=".cliare-context":
{{ cliare_bin }} context compare {{ left }} {{ right }} --out {{ out }} --write
# Measure and compare against a baseline scorecard.
guard cli run baseline:
{{ cliare_bin }} guard {{ cli }} \
--baseline {{ baseline }} \
--out .cliare/{{ run }} \
--profile {{ profile }} \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--allowed-drop {{ allowed_drop }} \
--refresh
# Measure and compare against a baseline with a policy file.
guard-policy cli run baseline policy:
{{ cliare_bin }} guard {{ cli }} \
--baseline {{ baseline }} \
--policy {{ policy }} \
--out .cliare/{{ run }} \
--profile {{ profile }} \
--max-depth {{ max_depth }} \
--max-probes {{ max_probes }} \
--concurrency {{ concurrency }} \
--allowed-drop {{ allowed_drop }} \
--refresh
# Run a benchmark corpus.
benchmark manifest="benchmarks/local-corpus.json" out=".cliare-bench" target_concurrency="2":
{{ cliare_bin }} benchmark \
--manifest {{ manifest }} \
--out {{ out }} \
--target-concurrency {{ target_concurrency }} \
--refresh
# List installable CLIARE skill targets.
skills-list format="text":
{{ cliare_bin }} skills list --format {{ format }}
# Preview skill installation for this project.
skills-install-dry agent="all" scope="project" project_dir=".":
{{ cliare_bin }} skills install --agent {{ agent }} --scope {{ scope }} --project-dir {{ project_dir }} --dry-run
# Install CLIARE skills into this project.
skills-install-project agent="all" project_dir=".":
{{ cliare_bin }} skills install --agent {{ agent }} --scope project --project-dir {{ project_dir }}
# Common post-measurement maintainer review.
review run:
{{ cliare_bin }} report maintainer --out .cliare/{{ run }} --format markdown
# Common agent-surface publishing loop.
agent-surface run:
{{ cliare_bin }} describe .cliare/{{ run }} --write
{{ cliare_bin }} report harness --out .cliare/{{ run }} --write
{{ cliare_bin }} metadata --format json