Skip to content

Releases: existential-birds/daydream

v0.23.1

Choose a tag to compare

@anderskev anderskev released this 11 Jul 18:25
6ab1c8a

Fixed

  • backends/claude: Upgrade claude-agent-sdk to 0.2.116 for shielded subprocess teardown (#266)

    Pins the Claude SDK to 0.2.116, whose cancellation path shields the CLI subprocess teardown. Earlier versions tore the subprocess down unshielded, so a budget/fan-out cancellation mid-stream corrupted anyio's cancel-scope stack ("Attempted to exit a cancel scope that isn't the current task's current cancel scope").

  • backends/pi: Respect configured model defaults (#265)

    The Pi backend now resolves its own configured default model before falling back to DEFAULT_PI_MODEL, so per-phase and config-file model settings are honored instead of being overridden by the built-in default.

v0.23.0

Choose a tag to compare

@anderskev anderskev released this 10 Jul 21:10
bdb2c47

[0.23.0] - 2026-07-10

daydream-v0 23 0

Added

  • runner: --flow <name> selects a registered flow for dispatch (#263)

    A fork can register a brand-new flow via registry.set_flow(...) in daydream_ext and now run it end-to-end with --flow <name> (or RunConfig(flow_name=...)). Built-in names (deep/shallow/review) route to their existing dedicated helpers so behavior is unchanged; pr-feedback is not selectable this way (use daydream feedback); unknown names fail with the standard Extension Error panel. Custom flows open their recorder through the shared factory, so --dump-artifacts/archival apply automatically.

  • archive: --dump-artifacts flag to export full run bundle for CI upload (#258)

    Emits a tarball containing the trajectory, manifest, review artifacts, and handoff (if any) for a completed run. Designed for CI environments where the workspace is ephemeral and the artifact needs to be uploaded as a GitHub Actions artifact or attached to a check run.

  • atif: Re-vendor ATIF v1.7 from harbor and emit v1.7 (#253)

    Updates the vendored ATIF schema to v1.7, bringing the trajectory format in line with the latest harbor specification. All new trajectories are stamped with atif_version: "1.7"; the recorder's v1.6-to-v1.7 delta is limited to the added metrics block on TurnEndEvent and a session_id field on the root.

  • phases: Per-file-group budgeting to fix phase (#251)

    The fix phase now allocates per-file-group wall-clock and tool-call budgets instead of a single global budget, preventing a single slow file group from consuming the entire fix allocation. Budgets scale with the number of findings in each group and fall back to a safe default when unspecified.

  • bench: Repeated-trial benchmarking with variance reporting (#250)

    daydream bench now supports --trials N to run the benchmark N times against the same PR set and report mean plus standard deviation for precision, recall, and F1. Surfaces variance so a single noisy run doesn't mask regressions or false improvements.

  • review: Precision-mode arbiter suppression for evidenced-but-minor findings (#232)

    The arbiter now drops findings that are evidence-backed but below a severity/confidence threshold, reducing noise from technically-correct-but-trivial comments. Suppressed findings are logged to a sidecar audit file. Activated via --precision or automatically when the diff exceeds 500 lines.

  • training: Stable per-finding join key for accept/reject labels (#246)

    Findings now carry a stable fingerprint (hash of file, line range, and finding text) so accept/reject labels can be joined back to the finding across archive, harvest, and projection stages. Eliminates the positional matching that broke when findings were reordered or deduplicated.

  • bench: Materiality gate — --min-confidence / --min-severity (#245)

    Benchmark scoring now filters submitted comments by configurable confidence and severity thresholds, so low-signal findings don't inflate recall. Defaults preserve the previous scoring behavior; values are validated at parse time.

  • bench: Preserve confidence/severity as structured fields on submitted comments (#244)

    Submitted benchmark comments now carry confidence and severity as first-class structured fields rather than embedded in the comment body text. Enables the materiality gate and per-tier scoring breakdowns without parsing prose.

  • benchmark: Direct Anthropic judge route (#243)

    The benchmark scorer can now use an Anthropic model directly as the judge via --judge-model, bypassing the OpenRouter routing layer. Eliminates a class of routing failures and reduces judge-call latency by ~40%.

Fixed

  • backends: Fold Claude cache tokens into prompt_tokens total (#262)

    Claude SDK reports cache read/write tokens separately from input_tokens. The backend now folds them into the prompt_tokens total on CostEvent and MetricsEvent, so cost synthesis and trajectory metrics reflect the true prompt-token count. Previously, cache tokens were silently excluded, understating cost by 30-60% on cached runs.

  • review: Embed verification-protocol gates inline instead of a skill-file read in the structural and generic-fallback reviewers (#260)

    These two reviewers run with cwd set to the reviewed repo, so the previous read review-verification-protocol/SKILL.md instruction resolved against that repo, failed ("skill doesn't exist as a file"), and silently dropped the anchor/evidence/severity gates. The gates (0–3) are now stated inline in VERIFICATION_PROTOCOL_INSTRUCTION, mirroring the inline gate-0 embedding already used by build_verification_prompt. Both reviewers are language-agnostic, so the protocol's language-specific valid-pattern tables were of little use to them; the gate discipline is what mattered and is now self-contained.

  • corpus: Archive findings.json so per-finding join reaches corpus

    The archive step now copies findings.json (the merged-items artifact) into the archive directory alongside the trajectory, so the corpus harvester's per-finding join can reach it without re-running the merge phase. Previously, a missing findings.json caused the harvester to silently skip label attribution for all findings in the run.

  • bench: Validate --min-confidence / --min-severity values

    The materiality gate now rejects invalid confidence/severity values at parse time with an actionable error, instead of silently disabling the gate when a typo or unsupported value was passed.

  • archive: Drop the destructive bootstrap purge of legacy 'Z' valid_at rows

    The archive SQLite index no longer purges legacy bitemporal rows with 'Z' suffix valid_at timestamps on connect. The purge was a migration-era safety net that destroyed legitimate historical data when run against an already-migrated database. Canonicalization now happens at the write boundary instead.

  • corpus: Canonicalize bitemporal timestamps at the write and as_of boundaries

    Bitemporal timestamps in the corpus projection are now canonicalized to ISO 8601 UTC at both the write boundary (when the row is inserted) and the as_of boundary (when the projection query runs), eliminating timezone drift that caused join misses between harvest and projection stages.

v0.22.0

Choose a tag to compare

@anderskev anderskev released this 02 Jul 13:57
6912a2d

[0.22.0] - 2026-07-02

daydream-v0 22 0

Added

  • extensions: Versioned extension seam with daydream_ext discovery, flow engine, and daydream ext validate CLI (#241)

    Daydream now has a first-class, versioned extension API. An installed daydream_ext package is auto-discovered with a version gate and exposed through a Registry on a ContextVar. The registry routes skill slots (stack, structural, pr-feedback, phase-bound), named prompts (with wholesale override), and stack rules through a single seam, replacing scattered hardcoded lookups. All four flows (deep, shallow, review, pr-feedback) now run through a run_flow() engine with enabled gating, Stop/BreakLoop control, and loop groups. New daydream ext validate CLI resolve-checks the entire extension registry.

  • deep: --findings-out drives the deep pipeline and stops before post/fix (#239)

    The single-file review-bot workflow now points at the default deep pipeline so the bot consumes the validated, arbiter-merged review. When --findings-out is set, the orchestrator writes the artifact from merged-items.json and returns before the PR-post block and apply-fixes gate. Also removes the vestigial --plan/ENVISION advisory pass and fixes --review to stop after findings instead of writing a stray plan file.

  • review: Structural evidence gate drops speculative/no-evidence findings before merge (#236)

    Adds a first-class evidence field to all finding schemas. A structural gate in the merge path drops any finding without a grounded citation (path:line) before it reaches merged-items.json, review-output.md, the fix stage, PR posting, or the benchmark. Dropped items are logged to a dropped-speculative.json audit sidecar. Applies to both the cross-stack merge and the tiny-diff single-stack bypass. The confidence enum collapses to HIGH/MEDIUM (LOW/no-evidence removed).

  • prompts: Eliminate speculative and breadth-padding generation in review prompts (#238)

    Removes language that invites evidence-free guesses and scope creep: drops the LOW/no-evidence confidence tier, replaces "Prefer LOW over MEDIUM" with a grounding directive, removes the "Would you have done this differently?" breadth invitation from alternative review, and requires concrete recommendations per issue rather than just the problem.

  • review: Wire review-verification-protocol into structural and generic-fallback reviewers (#235)

    The structural and generic-fallback review prompts now load the review-verification-protocol skill (anchor/evidence/severity gates). The verification prompt adds a gate-0 anti-confabulation echo requirement. Product default is unchanged: verdicts stay advisory, zero findings dropped.

  • templates: Optional single-file review-bot workflow (drops actions: write) (#237)

    Adds daydream/templates/workflows/single/daydream.yml as an optional manual-copy alternative to the three-file split. It chains gate, analyze, and post as needs:-ordered jobs in one workflow run, replacing the cross-workflow workflow_dispatch that required actions: write. The privilege split is preserved at the job level: gate holds the App key but no code, analyze holds PR code but no App key, post holds the App key but no PR code. Every action is pinned to a full commit SHA.

  • training: Eval-on-by-default and recommended-change patch capture (#234)

    Eval is now on by default (--eval becomes --no-eval opt-out); analyze_session runs on every archive unless explicitly skipped, populating all four eval metrics (grounding_rate, total_findings, coverage_ratio, cost_per_finding_usd). A separate recommended.patch (daydream's proposed diff) is captured distinct from the PR-under-review diff.patch, with backward-compat fallback for legacy archives. Untracked files created during the fix phase are included in the capture.

v0.21.0

Choose a tag to compare

@anderskev anderskev released this 01 Jul 00:59
f019f3d

[0.21.0] - 2026-06-30

Added

  • backends: Add pi coding-agent backend with ATIF trajectory parity (#195)

    Daydream now supports z.ai GLM models through a new PiBackend that spawns the pi CLI as a subprocess and parses its JSONL event stream into unified AgentEvent types. Implements the same subprocess+JSONL pattern proven by CodexBackend, with full ATIF v1.6 trajectory parity including tool-use events, cost reporting, and structured-output emulation. Per-phase model defaults for z.ai models are configured in config.py.

  • bench: Review-bot comparison harness (daydream vs coderabbit/greptile) (#208)

    Adds bench/review-bot-compare/ with a replay-driven harness that runs daydream and SaaS review bots (CodeRabbit, Greptile) against the same held-out PRs, harvests their findings, and judges them on a level playing field. Produces per-PR precision/recall metrics so review quality can be compared head-to-head.

  • bench: Offline benchmark report — daydream vs the SaaS field (#224)

    Generates a self-contained HTML benchmark report from comparison-harness results, with per-reviewer scorecards and per-PR breakdowns. Renders entirely offline from cached data — no live API calls needed to produce the report.

  • bench: Select any reviewer backend (incl. GLM via OpenRouter) with evidence-grade submission parity (#223)

    The benchmark harness now lets you run any backend as the reviewer — including GLM via OpenRouter — with submission parity guarantees so results are comparable across providers regardless of their native output format.

  • deep: Parallelize the deep fix loop (#178)

    Same-file findings are now fixed in parallel via anyio.CapacityLimiter(4) fan-out instead of sequentially, significantly cutting wall-clock time for fix phases with multiple independent findings.

  • deep: Ground review intent in the PR description (#182)

    The deep orchestrator's intent phase now reads the PR description so review focus aligns with what the author set out to do, rather than reviewing the diff in a vacuum.

  • trajectory: Record phase timing events (#205)

    Each phase now emits structured timing events into the ATIF trajectory, enabling per-phase wall-clock analysis from the trajectory file without inferring gaps.

  • trajectory: Register subtrajectory entries for parallel fix-phase forks (#220)

    Parallel fix-phase fan-outs now register their sibling trajectories in the parent, so the root trajectory records all forks explicitly rather than leaving them as orphaned files.

  • phases: Batch same-file findings into single run_agent() call (#216)

    When multiple findings target the same file, they are now passed to a single agent invocation instead of one per finding, reducing redundant context loading and redundant tool calls.

  • backends/pi: Retry transient stream-drop errors and mark aborted trajectories partial (#219)

  • backends/pi: Tighten fix-phase prompts with concise_fix_prompts flag (#217)

Changed

  • agent: Cap runaway run_agent turns with wall-clock and tool-call budgets (#185)

    Every run_agent() call is now bounded by configurable wall-clock and tool-call limits, preventing a single stuck agent from burning through an entire review budget. Limits are tiered by phase.

  • deep: Short-circuit tiny-diff fan-out and inline diff hunks in per-stack prompts (#199)

    Small diffs skip the multi-stack fan-out entirely and inline the raw diff hunks into per-stack review prompts, eliminating unnecessary subagent spawns for trivial PRs.

  • deep: Make verify conditional, demote intent to Sonnet, gate alternatives by diff size (#197)

    The verification pass now runs conditionally (skipped when no findings need it), the intent phase moves from Opus to Sonnet, and the alternatives phase is gated by diff size — reducing cost and latency on typical PRs without sacrificing quality on complex ones.

  • backends/codex: Event-layer cost synthesis for provider parity (#196)

  • backends/codex: Surface reasoning_output_tokens for cost attribution (#193)

  • ui: Split ui.py into a ui/ package (#183)

    The 3,500-line ui.py monolith is now a proper package with separate modules for console, panels, messages, tools, agent text, theme, colorize, and summary rendering.

Fixed

  • prompts: Ground review/exploration agents to cwd in linked worktrees (#222)

  • agent: Fix detect_test_success false-negative on deselected/skipped pytest output (#204)

    The test-success detector now handles pytest output containing deselected/skipped counts — previously a clean pass with N deselected was classified as a failure, aborting the fix loop.

  • backends/claude: Eliminate cancel-scope RuntimeError on generator cleanup (#206)

  • backends/pi: Retry transient 429 and OOM failures (#215)

  • backends/pi: Invoke deep review skills natively (#213)

  • training: Drop redundant --since filter from log_shas_since, raise timeout, surface errors (#218)

  • backends/codex: Deterministic tool-id pairing and observable parse failures (#187)

  • backends/codex: Real-CLI golden contract test, trajectory parity, and cost-synthesis pinning (#188, #189, #190, #191)

v0.20.0

Choose a tag to compare

@anderskev anderskev released this 18 Jun 14:32
39b8fc4
daydream-v0 20 0

Added

  • github_app: Run under operator GitHub App identity with scoped token injection (#159)

    Daydream can now act as a self-hosted review bot using the operator's own GitHub App. Reviews are authored under the App's identity with a short-lived, repo-scoped installation token injected at runtime, so the maintainer never exposes a personal access token.

  • bot: Actions trigger surface — @-mention / auto-on-PR review via privilege split (#160)

    Adds GitHub Actions trigger wiring so a review runs either when the bot is @-mentioned on a PR or automatically on PR open/update. A privilege split keeps the untrusted PR-triggered job read-only while a separate trusted job posts results.

  • bot_setup: One-command self-hosted review-bot setup and distribution (#161)

    Bundles the workflow templates and a guided setup flow so an operator can stand up a white-label PR review bot in their own repository with a single command.

  • pricing: User-overridable model price table (#165)

    Per-model token prices can now be overridden via config so cost metrics stay accurate as provider pricing changes, without waiting for a daydream release.

Changed

  • cli: Verb-first redesign with config-file phase control (#141)

    Breaking. The CLI is now verb-first (daydream review, daydream corpus …), with a default review shim so daydream /path still works. Per-phase --model/--backend flags are removed in favor of [tool.daydream] / [tool.daydream.phases.<phase>] config in pyproject.toml or .daydream.toml (precedence: CLI global --model/--backend > config file > built-in default). The data pipeline verbs are namespaced under corpus (daydream corpus harvest/build/label), --max-iterations folds into --loop [N], advanced flags hide behind --help-all, and non-interactive mode auto-detects from a non-TTY/CI environment.

  • deep: Sonnet-first per-stack review with a scoped Opus arbiter (#175)

    Per-stack reviews now run on Sonnet by default with a scoped Opus arbiter pass, cutting review cost and latency while preserving finding quality.

Fixed

  • git_ops: Retry transient git timeouts and distinguish them from genuine errors (#142)

  • training: Correct run-level label attribution — footer-not-bot and archive-time PR linkage (#149)

  • ui: Render Task-family tools with resolved labels in both render paths (#150)

  • codex: Real-path harness infrastructure and Codex backend fixes (#158)

  • training: Harden harvest PR-signal labeling; de-cruft and parallelize the test suite (#174)

Security

  • deps: Bump cryptography, python-multipart, and starlette in the uv group (#162)

v0.19.0

Choose a tag to compare

@anderskev anderskev released this 05 Jun 01:27
42f0899

Added

  • benchmark: Add held-out PR replay benchmark harness via daydream bench (#137)

    Replays a corpus of held-out, already-merged PRs through the review pipeline and scores each run's findings against the human reviewers' acted-upon comments, producing precision/recall metrics for the review agent. Lets daydream measure regressions in review quality across changes to skills, prompts, and backends.

  • cli: Add harness-safe non-interactive mode across all daydream flows (#132)

    --non-interactive makes every flow (deep loop, shallow loop, comment, review, PR feedback) take safe defaults instead of prompting, so daydream can run unattended inside CI or an orchestration harness without blocking on a TTY gate.

  • archive: Add human-override label precedence, idempotent harvest, and rate-limit handling (#119)

    Harvest now treats human-applied labels as authoritative over inferred ones, re-running a harvest no longer duplicates entries, and GitHub rate-limit responses are backed off and retried instead of aborting the run.

  • training: Add a posterior reject-penalty axis to the reward signal (#115)

    The reward model now penalizes findings that were posted but later rejected by a human reviewer, sharpening the signal that distinguishes useful review comments from noise.

  • pr-comment: Add per-phase wall-clock latency to metrics (#109)

Fixed

  • phases: Ground the failure handoff in evidence with an enforced read-only summarizer (#136)

    When a run hands off after a failure, the summary is now produced by a read-only agent constrained to cite actual evidence, preventing the handoff from inventing diagnoses or mutating state.

  • cli: Detect repo slug and PR number from the target checkout, not the current working directory (#135)

  • workspace: Accept a commit-ish --base and guard against dash injection (#134)

  • archive: Derive wall_clock_seconds on every run and unify ISO timestamp parsing (#133)

  • git_ops: Diff against the remote default branch instead of the local one (#113)

  • exploration: Prevent stuck subagents and unmatched tool results (#112)

  • runner: Dispatch on bot instead of pr_number to prevent false feedback routing (#111)

Security

  • deps: Bump starlette from 0.52.1 to 1.0.1 in the uv group (#138)

v0.18.0

Choose a tag to compare

@anderskev anderskev released this 26 May 20:22
63f2c62

[0.18.0] - 2026-05-26

Added

  • training: Corpus pipeline architecture — harvest, reward, bitemporal projection (#104)

    Introduces the daydream/training/ package with three pipeline stages: harvest collects ATIF trajectory runs from the archive into labeled training corpora, reward scores trajectory steps against configurable reward signals (cost efficiency, grounding accuracy, finding acceptance rate), and bitemporal projects reward labels back onto trajectory steps using both wall-clock and agent-logical timestamps. Designed for offline RL/RLHF fine-tuning loops over daydream's own review traces.

  • training: JSONL exporter for ATIF trajectories (#95)

    Adds daydream training export subcommand to convert archived ATIF trajectory files into newline-delimited JSON suitable for ML training pipelines. Each trajectory step becomes one JSONL record with flattened token counts, cost, tool I/O, and phase labels.

  • deep: Language-agnostic structural review meta-stack (#101)

    Adds a structural review pass that runs independently of per-language Beagle skills, analyzing cross-cutting concerns (API contract consistency, error propagation patterns, dependency direction violations) using tree-sitter parse trees. Activates automatically in deep mode when multiple stacks are detected.

  • archive: Capture source_path in manifest and add harvest clone cache (#106)

    The archive manifest now records the absolute source_path of the reviewed repository, enabling corpus harvest to trace runs back to their origin repo. Adds a clone cache under ~/.daydream/harvest/clones/ so repeated harvests against the same repo skip redundant clones.

Changed

  • docs: Rewrite README for research/ML audience (#107)

Fixed

  • tests: Isolate DAYDREAM_ARCHIVE_DIR to stop polluting ~/.daydream/archive (#100)

    Tests that exercise archive functionality now use a temporary directory instead of the user's real archive, preventing test runs from creating stale entries in the production archive index.

  • explore: Remove .coderabbit.yaml from pattern-scanner prompts (#96)

Security

  • deps: Bump idna in the uv group (#97)

v0.17.0

Choose a tag to compare

@anderskev anderskev released this 17 May 02:15
f25b1ba

Breaking

  • cli: Remove the single --model flag in favor of per-phase model overrides (#82). Replace --model <name> with the per-phase flag(s) you actually want — --review-model, --parse-model, --fix-model, --test-model, or --exploration-model. Passing --model now exits early with a curated error pointing at the new flags (both --model X and --model=X shapes are caught before argparse runs). Each phase resolves its model in this order: explicit per-phase flag → per-backend phase default → backend default, so phases without an override knob (WONDER, ENVISION, MERGE, INTENT, PR_FEEDBACK) still get phase-appropriate models out of the box. Per-backend defaults are documented in the README's Per-phase model defaults section.

Added

  • deep: Add a read-only phase_verify_recommendations pass between cross-stack merge and the fix gate (#84). The verifier audits each merged finding's recommendation (not just the finding) against trait/interface contracts and sibling implementations, emits structured consistent / contradicts / uncertain verdicts plus unverified_assumptions to .daydream/deep/recommendation-verdicts.json, and feeds those verdicts back into phase_fix so the fix agent has full verifier context when applying changes. Closes the gap where prior passes only validated whether findings were real — never whether the recommended fix itself was correct. Runs unconditionally in stage 5 so --start-at fix resumes still produce verdicts. UI prints a one-line summary: Recommendation verification: N findings · M flagged (X contradicts, Y uncertain).

  • cli: Add per-phase model override flags --review-model, --parse-model, --fix-model, --test-model (#82). Pairs with the existing --exploration-model so callers can tune cost vs. quality per phase — PARSE on haiku, FIX/TEST/EXPLORATION on sonnet, REVIEW/WONDER/ENVISION/MERGE/INTENT/PR_FEEDBACK on opus — without a single-knob compromise.

  • config: Add PHASE_DEFAULT_MODELS table mapping backend → phase → model id (#82). _resolve_backend(config, phase) consults this table when no explicit per-phase flag is set, and the deep orchestrator resolves per-phase backends for intent / wonder / review / parse / merge / verify / fix / test. UI now prints a dim Model: <name> line after every phase hero so the effective per-phase model is visible at a glance.

v0.16.0

Choose a tag to compare

@anderskev anderskev released this 15 May 22:48
8d50059

Added

  • scripts: Add scripts/review-historic-pr <PR> helper for benchmarking daydream against already-merged PRs (#79)

    Pins the review to the exact code state the PR introduced (PR head against the merge-base on the original target branch) so output is apples-to-apples with whatever was reviewed at PR time (greptile, coderabbit, etc.). Honors DAYDREAM_ARGS, KEEP_BRANCHES, and optional ZIP / ZIP_OUT env vars for bundling .review-output.md plus the ATIF trajectory directory. Requires gh, git, jq, and daydream on $PATH.

Changed

  • trajectory: Read the daydream version from daydream.__version__ instead of importlib.metadata.version("daydream") when stamping agent.version into ATIF trajectories (#81)

    Brings the trajectory recorder in line with every other version-stamping surface (PR comment renderer, PR review wizard, Daydream-Version: git trailer). Eliminates the silent "0.0.0" fallback that fired on PackageNotFoundError — a broken or partial install will now surface the failure loudly. Also eliminates editable-install lag: importlib.metadata reads from the installed package record (which only refreshes on uv sync), so trajectories used to stamp the previous version after a __version__ bump until the next sync. Reading the module attribute is always current.

v0.15.0

Choose a tag to compare

@anderskev anderskev released this 11 May 18:18
acf52ae

Breaking

  • trajectory: Change default trajectory path from <target>/.daydream/trajectory-<ts>-<id>.json to <target>/.daydream/runs/<session_id>/trajectory.json (#70). Scripts that glob for trajectory-*.json directly under .daydream/ must update to runs/*/trajectory.json. The --trajectory <path> flag continues to work for custom locations.

  • cli: Remove deprecated CLI flags (#75). The aliases introduced in #44 alongside the new consolidated surface are gone:

    Removed Replacement
    --ttt, --trust-the-technology --comment
    --review-only --review
    --deep (removed; deep is the default — pass --shallow to opt out)
    --pr <n> (top-level), top-level --bot daydream feedback <n> --bot <name> subcommand
    --python, --typescript, --elixir, --go, --rust, --ios -s <skill> (or auto-detect from changed files)

    Removes the _warn_deprecated helper and its 5 deprecation warnings from daydream/cli.py. Drops the now-dead RunConfig.review_only, trust_the_technology, deep, and forced_skill fields and their downstream branches in runner.py and ui.py. Archive manifest still emits review_only / deep keys (derived from output_mode / shallow) so the index schema is unchanged.

Added

  • workspace: Unify git operations and add worktree isolation (#57)

    Every scattered subprocess.run(["git", ...]) and gh callsite is replaced by a single typed daydream/git_ops.py wrapper, and a new daydream/workspace.py introduces a WorkContext + open_workspace abstraction so runs can execute against an ephemeral git worktree (or in-place). The headline UX bug from #44 — running daydream from an org/container directory produced four parallel fatal: not a git repository errors and the agent confabulated explanations — is now a typed NotAWorktreeError raised at the boundary with actionable guidance. The companion silent-failure case (git diff main...HEAD while sitting on main quietly producing an empty diff) now raises WrongBranchError with three recovery paths (check out a feature branch, pass --branch, or pass --worktree). Adds --worktree, --branch, --base, and repeatable --copy <path> CLI flags; RunConfig gains 7 fields including output_mode. A pure-integer TARGET is now rejected with did you mean: daydream feedback <pr#>?.

  • cli: Add daydream summarize <path> subcommand to render the run-info markdown (rollup + per-phase breakdown table + version footer) for a trajectory file or run directory (#70)

    Pure read + render + print — no GitHub posting. The same call also unifies live and archive trajectory layouts: both now use <root>/runs/<session_id>/trajectory.json plus <root>/runs/<session_id>/trajectories/<descriptor>.json siblings. The - **Mode:** <label> rollup line is removed from render_run_info_block and the live PR comment everywhere; the renderer now owns the <sub>Generated by daydream vX.Y.Z</sub> footer (previously added by the PR-comment shell).

  • cli: Skip the ENVISION (plan generation) phase by default in --comment mode and add a --plan opt-in flag (#71)

    Eliminates unnecessary token spend and interactive prompts when only posting PR review comments. Pass --plan to opt back in: auto-selects all issues, generates a structured implementation plan, and embeds per-issue change instructions (file, action, description, references) in the consolidated agent prompt on the PR comment. phase_generate_plan now returns tuple[Path | None, dict | None] to surface the raw plan data for downstream consumers.

  • phases: Add a setup-investigator and a failure-summarizer/handoff for smarter test failure recovery (#77)

    Option 1 in phase_test_and_heal's recovery menu now runs a read-only setup-investigator subagent (inspects Makefile, pyproject.toml / package.json, CI config, CLAUDE.md, README) before retrying — if it suggests a different test command, the user confirms before the retry switches. Option 4 ("exit and hand off") now spawns a failure-summarizer subagent that writes handoff.md to the archived run directory referencing artifacts by absolute path (no embedded diffs), and explicitly instructs the downstream agent to refuse inline hacks. Adds a soft clipboard wrapper (daydream/clipboard.py) using pbcopy / xclip / xsel / clip.exe — no new top-level deps. Newly created untracked files now surface in the handoff prompt via git_ops.changed_files(). Sub-trajectories are recorded via TrajectoryRecorder.fork().

  • phases: Tag every daydream commit with Daydream-Run: <run_id> and Daydream-Version: <version> git trailers (#73)

    Both phase_commit_push and phase_commit_iteration inject the trailers into the commit agent prompt and verify them post-commit, amending if the agent omitted them. A new git_ops.amend_trailers() helper uses git interpret-trailers to append missing trailers, and git_ops.daydream_commits() queries the log for commits carrying the Daydream-Run trailer.

  • pr-comment: Enrich the PR summary comment with run metrics, daydream version, and Codex cached tokens (#66)

    Replaces the single "Mode" line with a structured rollup (model, cost, tokens, cache hit %, steps, tool calls) plus a collapsed per-phase breakdown table and a daydream version footer. Introduces daydream/pricing.py with a static ModelPrice dataclass and MODEL_PRICES table covering gpt-5.5, gpt-5.5-pro, gpt-5-codex, and gpt-5.3-codex, so Codex-backed runs can synthesize cost when the backend doesn't report it. daydream/pr_comment_renderer.py is a pure renderer — same trajectory in, same markdown out — that aggregates per-phase metrics across one or more sibling trajectories (deep-mode). Also fixes CodexBackend to extract cached_input_tokens from turn.completed.usage (previously hardcoded to None).

Changed

  • agent: Revert default Claude model from claude-opus-4-7 to claude-opus-4-6 (#68)

    4.7 escalates the SDK's default malware-analysis <system-reminder> (injected on every Read tool result) into hard refusals on benign user code, citing the reminder verbatim and declining requested edits — a regression vs. 4.6 / 4.5, which treat it as a soft nudge. Trajectory data across three recent deep runs showed 15 reminder-tied refusals out of 135 reads (~11%) and ~2,537 wasted output tokens on "this is benign code, proceeding…" preambles. Reverting to 4.6 until the underlying behavior is addressed.

  • agent: Make model a required str end-to-end (#68); default lives only in daydream.config.DEFAULT_CLAUDE_MODEL / DEFAULT_CODEX_MODEL, resolved exactly once in create_backend. Removed five duplicated literal fallbacks (ClaudeBackend.__init__, CodexBackend.__init__, AgentState.model, runner.set_model(... or "..."), banner display) so a future model bump is one constant change, not a five-file shotgun edit. set_model / get_model deleted (AgentState.model was unused).

  • pr-comment: Slim the per-phase breakdown columns in the PR summary comment table (#69)

Fixed

  • phases: Guard _do_commit trailer amendment against amending non-daydream commits when the pre-commit SHA could not be read (#73). When head_sha() raised GitError before the agent ran, sha_before was None, so the sha_after == sha_before check always passed through, potentially amending a pre-existing user commit with daydream trailers. Now also checks for sha_before is None and skips trailer verification in that case.

  • archive: Migrate the SQLite schema on connect by adding missing review_backend / fix_backend / test_backend columns via ALTER TABLE (#71), fixing "Run archive failed (non-fatal)" on DBs created before these columns existed.

Security

  • deps: Bump python-multipart from 0.0.26 to 0.0.27 (#74) — adds multipart header limits and safer parse-offset constructors upstream.