Repository navigation
Expand file tree
/
Copy pathmise.toml
More file actions
567 lines (493 loc) · 22.7 KB
/
Copy pathmise.toml
File metadata and controls
567 lines (493 loc) · 22.7 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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
# :schema https://mise.jdx.dev/schema/mise.json
# Docs: https://mise.jdx.dev/configuration.html
# Keep equal to install.sh and the workflow pins (test_bootstrap enforces it).
min_version = "2026.12.3"
[settings]
# Signature and provenance verification keep mise defaults here, so CI (which has no
# home config) verifies every repository tool; the workstation config opts out globally.
lockfile = true
lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64"]
minimum_release_age = "2d"
[settings.task]
run_auto_install = false
# Hide command echoes; keep task output, failure diagnostics, and task-name prefixes.
# MISE_TASK_QUIET=false restores mise's execution messages for debugging.
quiet = true
[task_config]
dir = "{{config_root}}"
[vars]
# Skill templates scaffold other repositories' workflows; the workflow linters skip them unless named.
workflow_templates = "skills/github/references/ci-cd/templates/*.yml skills/gcloud/references/cloud-run/templates/deploy.yml skills/docs/references/site/templates/docs.yml skills/infra/references/opentofu/templates/tofu.yml skills/code-security/templates/codeql.yml"
# Plain shell scripts that shfmt formats; chezmoi shell templates are rendered and linted only.
shell_scripts = "install.sh run_*.sh dot_local/bin/executable_nvim-tty"
# uv installs the dot entry point here; the absolute path avoids Graphviz's dot on PATH.
dot_bin = "{{env.HOME}}/.local/bin/dot"
# Run mise on repository tools without the workstation's home config, like CI: a stale home
# config must not block the tools that repair it, and its disabled provenance checks make
# mise refuse a lockfile that records GitHub attestations.
repo_mise = 'MISE_IGNORED_CONFIG_PATHS="${MISE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/mise}" mise'
[env]
# Export only repo-neutral values (agent shells snapshot env across directories): never UV_PROJECT.
# Avoid transient .pyc files racing parallel chezmoi source traversal.
PYTHONDONTWRITEBYTECODE = "1"
[tool_alias]
fish = "aqua:fish-shell/fish-shell"
# The registry default (vfox) locks release URLs without digests; aqua locks checksums.
neovim = "aqua:neovim/neovim"
[tools]
betterleaks = "latest"
biome = "latest" # Formats and lints Pi TypeScript extensions without npm dependencies
chezmoi = "latest"
dprint = "latest"
fish = "latest"
gh = "latest"
git-cliff = "latest"
jactionlint = "latest"
lefthook = "latest"
lychee = "latest"
neovim = "latest"
node = "lts" # Runs Pi TypeScript extension tests in CI without relying on unpinned host Node
opentofu = "latest"
python = "3.15"
shellcheck = "latest"
shfmt = "latest"
stylua = "latest"
terraform-docs = "latest"
tflint = "latest"
trivy = "latest"
typos = "latest"
typst = "latest"
typstyle = "latest"
uv = "latest"
vale = "latest"
zellij = "latest"
[tools."github:github/gh-actions-lock"]
bin = "gh-actions-lock"
version = "latest" # Pins direct and transitive GitHub Actions deps into .github/workflows/actions.lock
[tools."github:github/gh-actions-lock".platforms]
linux-arm64 = { asset_pattern = "linux-arm64" }
linux-x64 = { asset_pattern = "linux-amd64" }
macos-arm64 = { asset_pattern = "darwin-arm64" }
[tools."github:microsoft/typescript-go"]
bin_path = "package/lib"
version = "latest" # Native tsc type-checker for Pi TypeScript extensions without node_modules
[tools."github:microsoft/typescript-go".platforms]
linux-arm64 = { asset_pattern = "typescript-linux-arm64.tgz" }
linux-x64 = { asset_pattern = "typescript-linux-x64.tgz" }
macos-arm64 = { asset_pattern = "typescript-darwin-arm64.tgz" }
# Canonical project tasks.
[tasks.all]
alias = "a"
description = "Run the full CI gate locally (check, test, build)"
depends = ["check", "test", "build"]
[tasks.build]
alias = "b"
description = "Build the dot Python source distribution and wheel"
wait_for = ["check:leaks"]
run = "uv build dot --out-dir dot/dist --clear --no-sources"
sources = ["dot/pyproject.toml", "dot/uv.lock", "dot/LICENSE", "dot/src/**/*.py", "dot/src/**/*.yaml"]
outputs = ["dot/dist/*.whl", "dot/dist/*.tar.gz"]
[tasks.check]
alias = "c"
description = "Run all static checks in parallel"
depends = ["check:local", "check:network", "check:skills:publish"]
[tasks."check:local"]
description = "Run the static checks that need no remote database"
depends = [
"check:actions",
"check:chezmoi",
"check:fish",
"check:format",
"check:leaks",
"check:lua",
"check:privacy",
"check:python",
"check:shell",
"check:skills",
"check:supagents",
"check:tasks",
"check:tofu",
"check:ts",
"check:typos",
"check:typst",
"check:vale",
]
[tasks."check:network"]
description = "Run the checks that download vulnerability data"
depends = ["check:scan", "check:vuln"]
[tasks."check:actions"]
description = "Validate GitHub Actions workflows, lockfile coverage, shipped workflow templates, and Dependabot config"
run = [
"jactionlint --profile pedantic",
"jactionlint --profile pedantic --ignore actions-lock {{vars.workflow_templates}}",
"gh-actions-lock --verify-local",
]
[tasks."check:actions:online"]
description = "Audit workflows and lockfile provenance online; fails on warnings and skipped lookups (needs GH_TOKEN; weekly in security.yml)"
# Most online audits (ref confusion, repojacking, archived actions) report at warn level.
run = [
"jactionlint --online=strict --strict-exit",
"jactionlint --online=strict --strict-exit --ignore actions-lock {{vars.workflow_templates}}",
"gh-actions-lock --verify",
]
[tasks."check:chezmoi"]
description = "Validate rendered chezmoi source in an isolated destination"
run = """
set -eu
render_config=""
render_destination=""
cleanup() {
if [ -n "$render_destination" ]; then rm -rf -- "$render_destination"; fi
if [ -n "$render_config" ]; then rm -rf -- "$render_config"; fi
}
trap cleanup EXIT
trap 'trap - EXIT; cleanup; trap - INT; kill -INT $$' INT
trap 'trap - EXIT; cleanup; trap - TERM; kill -TERM $$' TERM
render_config="$(mktemp -d)"
render_destination="$(mktemp -d)"
# Separate state also prevents parallel validation from locking the live workstation.
chezmoi init --source "$PWD" --config-path "$render_config/chezmoi.toml" --persistent-state "$render_config/state.boltdb" --promptDefaults
chezmoi apply --dry-run --force --source "$PWD" --destination "$render_destination" --config "$render_config/chezmoi.toml" --persistent-state "$render_config/state.boltdb"
"""
[tasks."check:format"]
description = "Check config and markup formatting (dprint)"
run = "dprint check"
[tasks."check:fish"]
description = "Validate Fish syntax for plain scripts and rendered templates (behavior tests run in test)"
run = """
set -eu
rc=0
for file in dot_config/fish/*.fish dot_config/fish/conf.d/*.fish dot_config/fish/completions/*.fish dot_config/fish/functions/*.fish; do
[ -f "$file" ] || continue
fish --no-config --no-execute -- "$file" || rc=1
done
for tmpl in dot_config/fish/conf.d/*.fish.tmpl; do
[ -f "$tmpl" ] || continue
chezmoi execute-template --source "$PWD" --file "$tmpl" | fish --no-config --no-execute || rc=1
done
exit "$rc"
"""
[tasks."check:leaks"]
description = "Scan working-tree files, including untracked files, for leaked secrets"
# Runs in check:local (pre-push and CI); pre-commit runs check:leaks:staged and security.yml runs check:leaks:full.
# betterleaks 1.10+ loads .betterleaks.toml only when named, so pass it explicitly.
run = "betterleaks dir . --config .betterleaks.toml --redact=100 --verbose --no-banner"
[tasks."check:leaks:staged"]
description = "Scan staged Git changes for leaked secrets"
run = "betterleaks git --staged --config .betterleaks.toml --redact=100 --verbose --no-banner"
[tasks."check:leaks:full"]
description = "Scan the complete Git history (weekly in security.yml; needs a full clone)"
run = "betterleaks git --config .betterleaks.toml --redact=100 --verbose --no-banner"
[tasks."check:lua"]
description = "Check Neovim Lua formatting (stylua)"
run = "stylua --check dot_config/nvim"
[tasks."check:privacy"]
description = "Scan non-encrypted sources and local commits for unapproved emails, SSH comments, and workstation tokens"
run = "uv run --locked --project dot dot privacy -q ."
[tasks."check:privacy:staged"]
description = "Scan staged Git index blobs and local commits for unapproved emails, SSH comments, and workstation tokens"
run = "uv run --locked --project dot dot privacy --staged -q ."
[tasks."check:python"]
description = "Lint, format-check, type-check, and validate Python packaging and dependencies"
depends = ["check:python:lint"]
run = [
"uv run --locked --project dot ruff format --check .",
"uv run --locked --project dot ty check --project dot --extra-search-path tests --extra-search-path skills/gws/scripts --extra-search-path skills/write/references/typst-deck/scripts dot tests skills --exclude 'skills/*/templates' --exclude 'skills/*/references/*/templates'",
"uv run --locked --project dot ty check --project dot --python-version 3.9 private_dot_gemini/private_antigravity-cli/display.py private_dot_gemini/private_antigravity-cli/guard.py",
"uv run --locked --directory dot deptry .",
"uv run --locked --project dot validate-pyproject dot/pyproject.toml",
"uv lock --check --project dot",
]
[tasks."check:python:lint"]
hide = true
run = "uv run --locked --project dot ruff check ."
[tasks."check:scan"]
description = "Scan dependencies, including mise tool locks, and IaC (Trivy)"
env.TRIVY_NO_PROGRESS = "true"
# Pass the repository's workstation Trivy config explicitly so checkouts use it before deploy.
run = """
set -eu
if ! output="$(trivy --quiet --config dot_config/trivy/trivy.yaml fs --tf-vars skills/infra/references/opentofu/templates/terraform.example.tfvars . 2>&1)"; then
rc=$?
printf '%s\n' "$output" >&2
exit "$rc"
fi
"""
[tasks."check:shell"]
description = "Lint shell scripts and rendered chezmoi shell templates; format-check install.sh and plain run scripts"
# Render {{ }} templates against empty stdin for shellcheck; shfmt formats plain scripts only.
run = """
set -eu
rendered=""
cleanup() {
if [ -n "$rendered" ]; then rm -rf -- "$rendered"; fi
}
trap cleanup EXIT
trap 'trap - EXIT; cleanup; trap - INT; kill -INT $$' INT
trap 'trap - EXIT; cleanup; trap - TERM; kill -TERM $$' TERM
rendered="$(mktemp -d)"
for template in run_*.sh.tmpl modify_dot_*; do
chezmoi execute-template --source "$PWD" --with-stdin --file "$template" </dev/null >"$rendered/${template%.tmpl}.bash"
done
shellcheck --rcfile dot_config/shellcheckrc {{vars.shell_scripts}} "$rendered"/*.bash
shellcheck --rcfile dot_config/shellcheckrc --shell=sh "$rendered/modify_dot_profile.bash"
shfmt -d -i 2 -s {{vars.shell_scripts}}
"""
[tasks."check:skills"]
description = "Validate first-party Agent Skill packages, context budgets, and documentation links"
depends = ["check:skills:contracts", "check:skills:links"]
[tasks."check:skills:publish"]
hide = true
run = "gh skill publish --dry-run skills"
[tasks."check:skills:contracts"]
hide = true
run = "uv run --locked --directory dot python -m dot_tasks.skill_contracts"
[tasks."check:skills:links"]
hide = true
# Generated-project templates link relative to their future repository.
run = "lychee --offline --include-fragments --no-progress --exclude-path 'skills/.*/templates' README.md AGENTS.md dot_agents/AGENTS.md SECURITY.md 'skills/**/*.md' '.agents/skills/**/*.md' 'dot_agents/supagents/*.md'"
[tasks."check:skills:links:online"]
description = "Audit external documentation and skill URLs (including fragments) online (weekly in security.yml)"
run = "lychee --include-fragments --no-progress --max-concurrency 4 --retry-wait-time 5 --timeout 20 --max-retries 5 --exclude-path 'skills/.*/templates' README.md AGENTS.md dot_agents/AGENTS.md SECURITY.md 'skills/**/*.md' '.agents/skills/**/*.md' 'dot_agents/supagents/*.md'"
[tasks."check:supagents"]
description = "Validate cross-harness subagent sources and generated configurations"
wait_for = ["format:supagents"]
run = """
set -eu
if output="$(uv run --locked --project dot supagents check --strict --project --source-dir dot_agents/supagents --config supagents.yaml 2>&1)"; then
printf '%s\n' "$output" | tail -n 1
else
rc=$?
printf '%s\n' "$output" >&2
exit "$rc"
fi
"""
[tasks."check:tasks"]
description = "Validate repository task, lockfile, and Git hook definitions"
run = ["mise tasks validate", "{{vars.repo_mise}} lock --check", "lefthook validate"]
[tasks."check:tofu"]
description = "Check OpenTofu starter HCL formatting"
run = "tofu fmt -check -recursive skills/infra/references/opentofu/templates"
[tasks."check:ts"]
description = "Check Pi TypeScript extensions formatting, lint, and types (biome, tsc)"
run = [
"biome check --config-path tests/ts private_dot_pi/private_agent/extensions",
"tsc --noEmit -p tests/ts/tsconfig.json",
]
[tasks."check:typos"]
description = "Check spelling across documentation, skills, and sources (typos)"
run = "typos --config .typos.toml"
[tasks."check:typst"]
description = "Check first-party Typst formatting (typstyle)"
run = "find dot_agents skills -type f -name '*.typ' ! -name 'fmind.typ' -exec typstyle -l 120 --line-ending lf --check {} +"
[tasks."check:vale"]
description = "Check external documentation and templates for mechanical prose errors (vale; warnings stay advisory)"
# Fail on Vale errors (exit 1) only; MiddotStrip warnings print as advisory output.
run = "vale --no-global --config .vale.ini --output=line --glob='!*.py' AGENTS.md dot_agents/AGENTS.md README.md dot_agents/supagents/ skills/calibrate/ skills/humanize/ skills/draft/ skills/write/ skills/proposal/ skills/docs/ skills/diagrams-as-code/ skills/skillify/ skills/subagent/ skills/github/templates/SECURITY.md skills/infra/references/opentofu/templates/README.md"
[tasks."check:completions"]
description = "Validate active Fish completion generators without changing installed scripts"
run = "uv run --locked --directory dot python -m dot_tasks.completions --check"
[tasks."check:vuln"]
description = "Audit the locked Python dependency graphs"
run = "uv audit --project dot --preview-features audit-command --locked"
[tasks.clean]
alias = "n"
description = "Remove build artifacts, coverage shards, and caches"
run = "rm -rf .pytest_cache .ruff_cache .ty_cache dot/.coverage dot/.coverage.* dot/dist"
[tasks."report:coverage"]
description = "Show per-file coverage from the last test run without rerunning tests"
env = { COVERAGE_FILE = "{{config_root}}/dot/.coverage" }
run = "uv run --locked --project dot coverage report --rcfile=dot/pyproject.toml"
[tasks.format]
alias = "f"
description = "Format all active sources and documents"
depends = [
"format:dprint",
"format:lua",
"format:python",
"format:shell",
"format:skills",
"format:supagents",
"format:ts",
"format:typst",
]
[tasks."format:dprint"]
description = "Format JSON, Markdown, TOML, and YAML"
# Order after the index generator without depending on it: pre-commit formats only
# staged files, and `mise run check:skills` / CI then rejects a stale index instead of
# this task regenerating SKILL.md files that the commit would not include.
wait_for = ["format:skills"]
run = "dprint fmt --allow-no-files"
[tasks."format:skills"]
description = "Sync parent guide indexes and shared repo-core starter blocks"
run = "uv run --locked --directory dot python -m dot_tasks.skill_contracts --sync"
[tasks."format:supagents"]
description = "Compile canonical subagent sources into native harness profiles and remove retired outputs"
wait_for = ["format:dprint"]
run = [
"uv run --locked --project dot supagents build --strict --project --source-dir dot_agents/supagents --config supagents.yaml",
"uv run --locked --project dot supagents clean --project --source-dir dot_agents/supagents --config supagents.yaml",
]
# Lefthook passes staged files to these formatters; mise hands variadic arguments
# over as one shell-quoted string, which `eval "set -- ..."` splits back safely.
[tasks."format:lua"]
description = "Format Neovim Lua sources, or only the given files"
usage = 'arg "[files]..." default="dot_config/nvim"'
run = '''
set -eu
eval "set -- ${usage_files:-}"
stylua -- "$@"
'''
[tasks."format:python"]
description = "Apply safe lint fixes and format Python sources, or only the given files"
usage = 'arg "[files]..."'
run = '''
set -eu
eval "set -- ${usage_files:-}"
[ "$#" -gt 0 ] || set -- .
uv run --locked --project dot ruff check --fix-only -- "$@"
uv run --locked --project dot ruff format -- "$@"
'''
[tasks."format:shell"]
description = "Format plain shell scripts, or only the given files (templates stay lint-only)"
usage = 'arg "[files]..."'
run = '''
set -eu
eval "set -- ${usage_files:-}"
[ "$#" -gt 0 ] || set -- {{vars.shell_scripts}}
shfmt -w -i 2 -s -- "$@"
'''
[tasks."format:ts"]
description = "Format Pi TypeScript extensions, or only the given files (biome)"
usage = 'arg "[files]..." default="private_dot_pi/private_agent/extensions"'
run = '''
set -eu
eval "set -- ${usage_files:-}"
biome format --config-path tests/ts --write -- "$@"
'''
[tasks."format:typst"]
description = "Format first-party Typst sources, or only the given files (excludes upstream-pinned fmind.typ)"
usage = 'arg "[files]..."'
run = '''
set -eu
eval "set -- ${usage_files:-}"
if [ "$#" -gt 0 ]; then
typstyle -l 120 --line-ending lf -i -- "$@"
else
find dot_agents skills -type f -name '*.typ' ! -name 'fmind.typ' -exec typstyle -l 120 --line-ending lf -i {} +
fi
'''
[tasks.install]
alias = "i"
description = "Bootstrap a freshly initialized checkout"
run = [
"mise run full",
"lefthook install",
"mise run vim",
"echo '✓ First-time bootstrap complete.'",
]
[tasks.test]
alias = "t"
description = "Run the Python CLI and repository contract tests"
# Cap xdist workers at 8 to bound memory and subprocess fan-out.
# Collect coverage for report:coverage without a global padding floor.
wait_for = ["check:leaks"]
env = { COVERAGE_FILE = "{{config_root}}/dot/.coverage", TZ = "UTC" }
run = "uv run --locked --project dot pytest -c dot/pyproject.toml -q -n auto --maxprocesses 8 --dist worksteal dot/tests tests --cov --cov-config=dot/pyproject.toml --cov-report="
[tasks."test:starters"]
description = "Materialize and execute Python, MCP, ML, script, docs, and OpenTofu starter contracts"
env = { DOT_STARTER_SMOKE = "1" }
run = "uv run --locked --project dot pytest -c dot/pyproject.toml -q -n auto --maxprocesses 4 --dist worksteal --force-enable-socket --timeout=600 tests/skills/test_python_starter.py"
[tasks."test:supagents:live"]
description = "Run on-demand live seeded-defect, clean-control, and fail-closed calibration probes via agy"
run = "uv run --locked --directory dot python -m dot_tasks.calibrate_supagents"
# Project management tasks. Every alias begins with m.
[tasks.apply]
alias = "ma"
description = "Apply the chezmoi source tree"
run = "chezmoi apply --force"
[tasks.completions]
alias = "mg"
description = "Generate Fish completions for installed CLI tools"
run = "uv run --locked --directory dot python -m dot_tasks.completions"
[tasks.deploy]
alias = "me"
description = "Install the dot CLI from this checkout with its locked dependency versions"
# uv tool install ignores uv.lock, so the exported lock constrains it (uv skips constraint
# hashes). --reinstall rebuilds unversioned source edits; --force replaces another ~/.local/bin/dot.
run = [
"uv export --project dot --locked --no-dev --no-emit-project --no-hashes --quiet --output-file dot/dist/constraints.txt",
"uv tool install --reinstall --force --python 3.15 --constraints dot/dist/constraints.txt ./dot",
]
[tasks.diff]
alias = "md"
description = "Show the pending chezmoi diff"
run = "chezmoi diff --force --no-pager"
[tasks.doctor]
alias = "mo"
description = "Run the dot, chezmoi, and mise workstation health checks"
# chezmoi probes hardlinks from its source into TMPDIR; /tmp can be another filesystem.
run = ['"{{vars.dot_bin}}" doctor', 'TMPDIR="$(chezmoi source-path)" chezmoi doctor', "mise doctor"]
[tasks.lock]
alias = "mk"
description = "Refresh Python, repo, and home lockfiles"
# The Neovim lockfile is captured only by upgrade, after it applies and updates plugins:
# re-adding here would copy an older deployed lock over a newer pulled source.
run = [
"uv lock --project dot",
"{{vars.repo_mise}} lock --yes",
# Resolve the portable source baseline, without machine-local tool overrides.
"uv run --locked --directory dot python -m dot_tasks.mise_refresh",
]
[tasks."lock:tool"]
description = "Lock the latest release of only the named global tools; keep every other entry"
usage = 'arg "<tools>..." help="[tools] keys from dot_config/mise/config.toml, such as pypi:brain-framework"'
# Right after an upstream release, `mise cache clear` first if `mise latest TOOL` is stale.
run = '''
set -eu
eval "set -- ${usage_tools:-}"
uv run --locked --directory dot python -m dot_tasks.mise_refresh --tool "$@"
'''
[tasks.release]
alias = "mr"
description = "Prepare, tag, and push the next release; CD publishes it"
run = "uv run --locked --directory dot python -m dot_tasks.release"
[tasks.full]
description = "Install locked repository and global tools, apply dotfiles, deploy dot, and regenerate completions"
run = [
"{{vars.repo_mise}} --locked install -y",
# Seed tool configuration without invoking missing or outdated hook executables.
"chezmoi apply --force --exclude scripts",
# chezmoi keeps deployed targets whose source was removed: drop superseded version graphs
# on every machine that syncs, not only on the one that upgraded. Retire before installing:
# mise reuses an install directory whose graph changed, so the install below rebuilds it.
'uv run --locked --directory dot python -m dot_tasks.mise_locks "$HOME/.config/mise/mise.lock"',
"mise -C \"$HOME\" --locked install -y",
# Re-sync shims with repo mise.toml active so repo-only bin_path tools (e.g. tsc) stay shimmed.
"mise reshim",
"mise run deploy",
# Hooks now see the current dot and global tools on the very first bootstrap.
"mise run apply",
"mise run completions",
]
[tasks.upgrade]
alias = "mu"
description = "Upgrade Python dependencies, mise tools, the theme pin, dprint plugins, and Neovim plugins"
run = [
"UV_MALWARE_CHECK=1 uv sync --upgrade --preview-features malware-check --project dot",
# Refresh version pins before installing the selected releases.
"{{vars.repo_mise}} lock --bump --yes",
"uv run --locked --directory dot python -m dot_tasks.mise_refresh --bump",
# Advance the checksummed fmind/theme pin; several theme files execute.
"uv run --locked --directory dot python -m dot_tasks.theme_pin",
# Apply updated lockfiles and install the bundle; rerun full after a failed install.
"mise run full",
"dprint config update --yes",
"nvim --headless '+Lazy! update' '+Lazy! clean' '+lua require(\"config.sync-parsers\")' +qa",
# Physical path: installed skill links record it, and the catalog check rejects a symlinked checkout path.
'chezmoi re-add --source "$(pwd -P)" ~/.config/nvim/lazy-lock.json',
]
[tasks.vim]
alias = "mv"
description = "Synchronize Neovim plugins headlessly"
run = "nvim --headless '+Lazy! restore' '+Lazy! clean' '+lua require(\"config.sync-parsers\")' +qa"