diff --git a/.claude/skills/bump-vite-task/SKILL.md b/.claude/skills/bump-vite-task/SKILL.md index 71aa49ebc3..8298a6087f 100644 --- a/.claude/skills/bump-vite-task/SKILL.md +++ b/.claude/skills/bump-vite-task/SKILL.md @@ -73,6 +73,7 @@ vite-task changes often affect CLI output, which means snapshot tests need updat - **Changed defaults or behavior**: Update any docs that describe the old behavior - **Removed/deprecated options**: Remove or mark as deprecated in the relevant docs - If no user-facing changes are found, skip this step. +- Docs also link to files in the vite-task repo, such as the JSON Schemas for `vp run --json`, by permalinks that carry the full vite-task commit hash. Find them with `grep -rn 'github.com/voidzero-dev/vite-task/blob/' docs/`, replace the old hash with the new full hash, and check that each linked path still exists at the new commit (for example `gh api "repos/voidzero-dev/vite-task/contents/?ref=" --silent`). If a file moved or its content changed in a way the docs describe, update the link target or the surrounding text too. ### 8. Create the PR diff --git a/docs/guide/run.md b/docs/guide/run.md index a39055dd1c..ba8fa6497c 100644 --- a/docs/guide/run.md +++ b/docs/guide/run.md @@ -354,12 +354,34 @@ Task Details: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ``` +When a task misses the cache, the summary lists every change that caused the miss. Use `-vv` (or `--verbose --verbose`) to also list each cached run's unchanged inputs, under `Unchanged:`, and the files a cache hit restores, under `Outputs:`. If a run hits the cache when you expected a miss, `-vv` shows whether the file you edited is an input at all. + Use `--last-details` to show the summary from the last run without running tasks again: ```bash vp run --last-details ``` +## Dry Runs And JSON Output + +`--dry-run` shows what a run would do without running anything. It prints each command with its cache status, then the summary. Vite Task checks the cache as a real run would, but writes nothing: + +```bash +vp run --dry-run -r build +``` + +`--json` prints JSON instead of text, for scripts and agents: + +- `vp run --json`, with no task or other flags, prints every package and task in the workspace, with each task's `dependsOn` resolved, and runs nothing. See the [task graph schema](https://github.com/voidzero-dev/vite-task/blob/cb1ea8d214b26a0f3ca2b2ef3b6bc471b18ffacb/crates/vt/schemas/task-graph.json). +- `vp run --dry-run --json build` prints the plan for a run: each task it would run, the tasks each one waits for, each step's command, and whether each step would hit the cache. With a task, `--json` only works together with `--dry-run`. See the [run plan schema](https://github.com/voidzero-dev/vite-task/blob/cb1ea8d214b26a0f3ca2b2ef3b6bc471b18ffacb/crates/vt/schemas/run-plan.json). + +Add `-v` or `-vv` for more detail: + +- On its own, `--dry-run` shows the first change it finds behind each miss. With `-v`, the summary lists every change. +- `-vv` with `--dry-run --json` adds each step's `baseline.fingerprint` and `baseline.outputs`: the inputs its cached run recorded, and the outputs a hit would restore. + +Put these flags before the task name. Anything after the task name is passed to the task. + ## Concurrency By default, up to 4 tasks run at the same time. Use `--concurrency-limit` to change this: