Skip to content

docs(rfc): JSON task graph, and dry-run plans with cache status - #933

Merged
wan9chi merged 10 commits into
mainfrom
claude/task-graph-cli-design-516a03
Nov 5, 2026
Merged

wan9chi merged 10 commits into
mainfrom
claude/task-graph-cli-design-516a03

Conversation

@wan9chi

@wan9chi wan9chi commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Motivation

Once the work in #929 lands, vp run caches tasks that read and rewrite their own files without exclusions in cache.input or cache.output.

Humans and AI agents will need to see why a task missed, and what it was checked against, more than before.

Today there is also no way to ask what a run would do, or whether it would hit the cache, before running it (#791, voidzero-dev/vite-plus#2848), or to get the task graph without parsing the task list (#320, voidzero-dev/vite-plus#1182).

Two RFCs:

  • docs/rfcs/task-graph-json.md: vp run --json prints every package and task in the workspace, and the dependsOn edges between tasks.
  • docs/rfcs/dry-run.md: --dry-run stops before running anything, --json prints the plan as JSON, and -v/-vv make the cache check list every change and everything the cached run depends on.

Note

Low Risk
Documentation-only RFCs; they describe proposed CLI and JSON formats but do not change product code in this PR.

Overview
Adds two design RFCs under docs/rfcs/ that specify future vp run behavior for tooling and agents—no runtime changes in this PR.

task-graph-json.md defines vp run --json (no task): a versioned TaskGraph document with packages, tasks keyed by task ID, dependsOn edges, shared conventions (paths, $schema, absent fields, output rules), and which flag combinations are errors (e.g. --json with -r or --dry-run without a task).

dry-run.md defines --dry-run (plan + cache checks without executing or writing), --dry-run --json as a RunPlan with per-step cache status (hit / changed / unknown / noBaseline / etc.), structured changes, optional changesPartial, and -vv fingerprints/outputs. It also specifies behavior changes when implemented: -v/--verbose as a counted flag, and real runs with -v listing all cache miss reasons instead of stopping at the first file difference.

Reviewed by Cursor Bugbot for commit 408b97b. Bugbot is set up for automated code reviews on this repo. Configure here.

@wan9chi wan9chi added the read-write overlap Caching tasks that read and write the same paths label Nov 4, 2026
Comment thread docs/rfcs/dry-run.md Resolved
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +0.84%  [ -2.57% ..  +4.35%]  overhead   +56.25%
dynamic/access             change  +0.00%  [ -4.39% ..  +2.92%]  overhead   +22.39%
dynamic/access-relative    change  +0.61%  [ -2.94% ..  +2.71%]  overhead   +71.66%
dynamic/access-contended   change  +2.19%  [ -3.28% ..  +6.98%]  overhead   +45.34%
static/launch              change  +0.06%  [ -2.81% ..  +2.54%]  overhead  +187.37%
static/access              change  +0.24%  [ -1.07% ..  +1.40%]  overhead +1453.67%
static/access-relative     change  -0.17%  [ -1.53% ..  +1.48%]  overhead +1985.61%
static/access-contended    change  -0.31%  [ -1.33% ..  +1.74%]  overhead +2069.27%

macos

dynamic/launch             change  -0.44%  [ -6.23% ..  +4.79%]  overhead  +227.72%
dynamic/access             change  +0.01%  [ -3.06% ..  +3.96%]  overhead    +3.55%
dynamic/access-relative    change  -1.20%  [ -3.91% ..  +3.26%]  overhead  +250.18%
dynamic/access-contended   change  +2.34%  [ -4.30% ..  +6.39%]  overhead    +2.77%

windows

dynamic/launch             change  +0.36%  [ -4.28% ..  +3.64%]  overhead   +30.54%
dynamic/access             change  +0.00%  [ -3.35% ..  +1.97%]  overhead    +1.62%
dynamic/access-relative    change  +0.20%  [ -3.02% ..  +8.70%]  overhead    +1.41%
dynamic/access-contended   change  +0.59%  [ -2.78% ..  +3.32%]  overhead    +1.58%

@wan9chi wan9chi changed the title docs: add RFCs for task graph JSON and dry runs docs(rfc): JSON task graph, and dry-run plans with cache status Nov 4, 2026
@jasonkuhrt

This comment has been minimized.

@wan9chi

wan9chi commented Nov 5, 2026 •

Copy link
Copy Markdown
Member Author

@jasonkuhrt Thanks for the feedback. It's a very valid concern but also complex to implement. I'd prefer to do it in another RFC.

To avoid confusion in this RFC, I've added unknown status if any previous step misses cache or hit with outputs to restore.

Comment thread docs/rfcs/dry-run.md Resolved

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread docs/rfcs/dry-run.md Resolved
wan9chi and others added 10 commits November 5, 2026 14:36
Add two RFCs for `vp run` diagnostics:

- docs/rfcs/task-graph-json.md: `vp run --json` prints every package and
  task in the workspace and the `dependsOn` edges between tasks.
- docs/rfcs/dry-run.md: `--dry-run` stops before running anything,
  `--json` prints the plan as JSON, and `-v`/`-vv` make the cache check
  list every change and everything the cached run depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The RFCs say output keys are sorted, but the examples listed them in
another order. Sort every example's keys so they match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a fresh checkout, a step that reads another step's outputs looked
changed in a dry run, although the real run hits once those outputs are
restored. A step that would be hit or changed is now unknown when a step
it waits on would write files first, by running or by restoring outputs.
It keeps today's changes, and restore-aware checking stays in Future.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They share the same fields, so declare one object with a status union
instead of three members joined by an intersection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fields follow the order the types declare them, so program and args
come before cache. Map entries keyed by path or ID stay sorted by key.
Plan tasks now declare package before name, as task graph tasks do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vp run --json without a task prints the task graph and rejects
--dry-run, so the rule that adding --dry-run never breaks a working
command line only holds when there is a task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Points to a published JSON Schema with each field's description, so an
agent can look up what a field means from the output alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The schema ships in the vite-plus package that printed the document, so
it matches the output exactly and works offline. The value is a file://
URL that is not percent-encoded and has a / before a Windows drive, the
form both VS Code and JetBrains IDEs read; neither reads a plain Windows
path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wan9chi
wan9chi force-pushed the claude/task-graph-cli-design-516a03 branch from c8ca834 to 408b97b Compare November 5, 2026 06:36
@wan9chi
wan9chi merged commit 56d38d2 into main Nov 5, 2026
18 checks passed
@wan9chi
wan9chi deleted the claude/task-graph-cli-design-516a03 branch November 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

read-write overlap Caching tasks that read and write the same paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants