Skip to content

Commit acf52ae

Browse files
anderskevclaude
andauthored
chore(release): 0.15.0 (#78)
* chore(release): bump version to 0.15.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(release): sync uv.lock for 0.15.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8b77de1 commit acf52ae

4 files changed

Lines changed: 45 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.15.0] - 2026-05-11
11+
1012
### Breaking
1113

12-
- **trajectory:** Change default trajectory path from `<target>/.daydream/trajectory-<ts>-<id>.json` to `<target>/.daydream/runs/<session_id>/trajectory.json`. 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.
14+
- **trajectory:** Change default trajectory path from `<target>/.daydream/trajectory-<ts>-<id>.json` to `<target>/.daydream/runs/<session_id>/trajectory.json` ([#70](https://github.com/existential-birds/daydream/pull/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.
1315

14-
- **cli:** Remove deprecated CLI flags ([#64](https://github.com/existential-birds/daydream/issues/64)). The aliases introduced in #44 alongside the new consolidated surface are gone:
16+
- **cli:** Remove deprecated CLI flags ([#75](https://github.com/existential-birds/daydream/pull/75)). The aliases introduced in #44 alongside the new consolidated surface are gone:
1517

1618
| Removed | Replacement |
1719
|---|---|
@@ -23,21 +25,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2325

2426
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.
2527

28+
### Added
29+
30+
- **workspace:** Unify git operations and add worktree isolation ([#57](https://github.com/existential-birds/daydream/pull/57))
31+
32+
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#>?`.
33+
34+
- **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](https://github.com/existential-birds/daydream/pull/70))
35+
36+
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).
37+
38+
- **cli:** Skip the ENVISION (plan generation) phase by default in `--comment` mode and add a `--plan` opt-in flag ([#71](https://github.com/existential-birds/daydream/pull/71))
39+
40+
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.
41+
42+
- **phases:** Add a setup-investigator and a failure-summarizer/handoff for smarter test failure recovery ([#77](https://github.com/existential-birds/daydream/pull/77))
43+
44+
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()`.
45+
46+
- **phases:** Tag every daydream commit with `Daydream-Run: <run_id>` and `Daydream-Version: <version>` git trailers ([#73](https://github.com/existential-birds/daydream/pull/73))
47+
48+
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.
49+
50+
- **pr-comment:** Enrich the PR summary comment with run metrics, daydream version, and Codex cached tokens ([#66](https://github.com/existential-birds/daydream/pull/66))
51+
52+
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`).
53+
2654
### Changed
2755

28-
- **agent:** Revert default Claude model from `claude-opus-4-7` to `claude-opus-4-6` ([#67](https://github.com/existential-birds/daydream/issues/67))
56+
- **agent:** Revert default Claude model from `claude-opus-4-7` to `claude-opus-4-6` ([#68](https://github.com/existential-birds/daydream/pull/68))
2957

3058
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.
3159

32-
- **agent:** Make `model` a required `str` end-to-end; 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).
33-
34-
### Added
60+
- **agent:** Make `model` a required `str` end-to-end ([#68](https://github.com/existential-birds/daydream/pull/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).
3561

36-
- **phases:** Tag every daydream commit with `Daydream-Run: <run_id>` and `Daydream-Version: <version>` git trailers. 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.
62+
- **pr-comment:** Slim the per-phase breakdown columns in the PR summary comment table ([#69](https://github.com/existential-birds/daydream/pull/69))
3763

3864
### Fixed
3965

40-
- **phases:** Guard `_do_commit` trailer amendment against amending non-daydream commits when the pre-commit SHA could not be read. 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.
66+
- **phases:** Guard `_do_commit` trailer amendment against amending non-daydream commits when the pre-commit SHA could not be read ([#73](https://github.com/existential-birds/daydream/pull/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.
67+
68+
- **archive:** Migrate the SQLite schema on connect by adding missing `review_backend` / `fix_backend` / `test_backend` columns via `ALTER TABLE` ([#71](https://github.com/existential-birds/daydream/pull/71)), fixing "Run archive failed (non-fatal)" on DBs created before these columns existed.
69+
70+
### Security
71+
72+
- **deps:** Bump `python-multipart` from 0.0.26 to 0.0.27 ([#74](https://github.com/existential-birds/daydream/pull/74)) — adds multipart header limits and safer parse-offset constructors upstream.
4173

4274
## [0.14.0] - 2026-04-29
4375

@@ -415,7 +447,8 @@ Initial release of Daydream - an automated code review and fix loop using the Cl
415447
- `rich` - Terminal UI components
416448
- `pyfiglet` - ASCII art header generation
417449

418-
[unreleased]: https://github.com/existential-birds/daydream/compare/v0.14.0...HEAD
450+
[unreleased]: https://github.com/existential-birds/daydream/compare/v0.15.0...HEAD
451+
[0.15.0]: https://github.com/existential-birds/daydream/compare/v0.14.0...v0.15.0
419452
[0.14.0]: https://github.com/existential-birds/daydream/compare/v0.13.1...v0.14.0
420453
[0.13.1]: https://github.com/existential-birds/daydream/compare/v0.13.0...v0.13.1
421454
[0.13.0]: https://github.com/existential-birds/daydream/compare/v0.12.0...v0.13.0

daydream/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
ui: User interface utilities for terminal output.
1818
"""
1919

20-
__version__ = "0.14.0"
20+
__version__ = "0.15.0"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "daydream"
3-
version = "0.14.0"
3+
version = "0.15.0"
44
description = "Automated code review and fix loop using Claude"
55
requires-python = ">=3.12"
66
dependencies = [

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)