daydream
Daydream CLI docs

Repository improvement

Audit or request a plan

Improve writes advisory files without editing application source, creating branches, committing, or pushing. Run from the repository root:

daydream improve .
daydream improve plan "Add request limits to the upload service" .

The audit discovers services, vets findings against source evidence, and writes plans for selected findings. improve plan investigates the supplied request without the category audit. Interactive audits ask which findings need plans. Unattended audits select the first five prioritized findings, or all findings when issue publication is enabled. CLI reference defines shared run options.

Improve requires authenticated Claude for every model phase. A conflicting backend override fails before model execution. Each model turn uses a disposable Git snapshot with a tool guard confined to the snapshot root. The guard is not an operating-system sandbox. If snapshot preparation rejects an inherited Git override, remove the named override before retrying.

Select coverage

--effort selects audit breadth independently of model reasoning effort:

EffortCoverage
quickSerial correctness, security, tests, and technical-debt checks. High-confidence findings only, with a maximum of six.
standardAll eight categories, at most eight repository groups by default, excluding investigation-only findings. Default.
deepAll categories, including low-confidence investigation items, without an effort-tier group limit.

The remaining categories are performance, dependencies, developer experience, and documentation. --focus selects security, performance, tests, or branch. Branch focus reviews the diff against the base branch and refuses the base branch itself. Without --focus, audits cover all categories. --scope restricts the default whole-repository scope to a service root, quoted wildcard pattern, or configured service-group name. Patterns match service roots: services/api/* does not select services/api. The Improve settings define service roots, groups, and partition limits. Quick and branch-focused audits use one group. Full audits exclude untracked files and submodule contents.

Read plans and publish issues

Finalization publishes reports, coverage, finding selections, validation diagnostics, and issue results under .daydream/improve/. Coverage records assignments, omissions, and failures without proving that agents read every source line. Plans appear in daydream_plans/ with README.md and .index.json. Invalid plans produce blocked diagnostics instead of executable plans. Update plan statuses in README.md after completion or rejection. README statuses take priority over .index.json. Finding identities and optional rejected.json prevent repeated plans for covered or rejected findings.

Authenticate GitHub and set improve.github.publish_issues = true. Issue publication defaults to false. Daydream copies validated local plans into GitHub issues. Stable markers identify matching open or closed issues across repeated runs. Overlapping or partial matches stop publication for the affected plan group. Local plans remain available after publication failures. Use an external lock for concurrent publication processes on one repository. Partial issue publication returns 2.

Recover re-anchored plans

If the repository head changes during plan writing, affected plans can land in a temporary re-anchor worktree. List worktrees and durable plan landing records:

daydream improve list-reanchor .
daydream improve list-reanchored . --json

Omit --json for a table. Copy or commit required plans before pruning. The following command force-removes the named worktree and plans held only there:

REANCHOR_NAME='RUN_NAME-reanchor'
daydream improve prune-reanchor "$REANCHOR_NAME" .

Replace the name with an entry from list-reanchor. Names must end with -reanchor and be valid for the file system. New plan-writing runs remove stale worktrees, preserving locks newer than 24 hours. Management commands do not run agents.

Back to Daydream