# FixThis v0.6.0

FixThis v0.6.0 is a rollup release that lands every initiative since v0.3.0
on a single tag. It covers **v0.4 maintainability** (pre-v0.4 compatibility
purge plus risk burn-down), **v0.5 trustworthy onboarding** (README-first
agent install with machine-readable readiness), and the three v0.6 tracks —
**Handoff Intelligence**, **Studio Reliability**, and **Release Grade**.

> **Version-skip note.** There is no `v0.4.0` or `v0.5.0` tag. Each of those
> programs is included verbatim in v0.6.0; consumers upgrading from `v0.3.0`
> jump straight to `v0.6.0`. `CHANGELOG.md` keeps the full per-entry detail
> under the `[0.6.0]` heading.

## Highlights

### v0.4 maintainability

- **Legacy purge.** Pre-v0.4 local compatibility paths are removed: schema-v1
  browser pending mirrors (`localStorage["fixthis.pending.<sessionId>"]`),
  the `.fixthis/artifacts` screenshot fallback, keyless semantic draft
  dedupe, and the deprecated no-item `sendDraftToAgent(sessionId)` overload.
  Draft recovery is now schema-v2 `fixthis.workspace.*` only.
- **Risk burn-down.** Console draft holders left `state.js` for selector-owned
  paths, MCP session handoff and event-log payload builders were split into
  focused collaborators, and CLI setup write-plan construction is now a
  side-effect-free planner shared by `setup`, `init`, and `install-agent`.
- **Contract test.** `scripts/v04LegacyPurgeContract-test.mjs` (canonical
  group) guards against reintroducing the removed paths.

### v0.5 trustworthy onboarding

- **README-first agent path** is canonical:
  `fixthis install-agent --project-dir . --target all` followed by
  `fixthis doctor --project-dir . --json`. `install-agent` writes
  `.fixthis/project.json`, `.fixthis/agent-setup.md`,
  `.fixthis/agent-setup.json`, and `.fixthis/mcp.json.template`.
- **Machine-readable readiness.** `install-agent --json` reports
  `readiness`, `nextAction`, and `restartRequired` alongside `applied`,
  `skipped`, `errors`, and `next`. `fixthis doctor --json`,
  `.fixthis/agent-setup.json`, and the feedback console share that
  vocabulary, so agents can drive the bootstrap from a single contract.
- **Evidence commands.** `npm run docs:agent-bootstrap:test`,
  `npm run first-run:smoke`, and `npm run first-run:smoke:test` guard the
  README-first path.

### v0.6 Handoff Intelligence

- Feedback items may now include `editSurfaceCandidates[].role`, an optional
  role token distinguishing call sites, reusable component definitions,
  copy/data origins, layout/style surfaces, visual-area targets, and
  interop-risk targets.
- Compact handoff Markdown renders the role token as
  `editSurface: <kind>  role=<role> -> <file>:<line> ...`, so agents can
  inspect the likely edit surface before following source-origin candidates.
- New evaluation corpus and regression gate: `npm run handoff:eval:test`.

### v0.6 Studio Reliability

- New grouped reliability harness: `npm run console:reliability:test` covers
  reducer, use-case, polling, stale-session fencing, and idempotency
  contracts.
- Duplicate-save idempotency, Studio stale-session fences, and the draft
  recovery matrix are strengthened so repeated saves, reload recovery,
  session switching, and blocked-device states stay tied to the correct
  feedback workspace.
- Browser-level proof via Playwright: `npm run console:browser:reliability`
  covers two-tab SSE sync, stale-preview isolation, EventSource reconnect
  recovery, stale-save confirmation, repeated Save to MCP idempotency, and
  closed-session mutation rejection.

### v0.6 Studio workflow hardening

- Studio actions route through a centralized workflow policy. Safe automatic
  paths (heartbeat retry, app foreground recovery, preview refresh) stay
  automatic; dirty drafts, stale previews, activity drift, server draft
  conflicts, and stale force-save now require an explicit boundary decision.
- Durable session mutations are rejected for closed sessions at the MCP
  server boundary (screen, item, handoff, claim, resolve, draft mutation
  paths) and surface as a mapped `session_closed` conflict.
- Live preview delivery is push-first: `preview-ready` SSE events and
  fallback preview polling share the preview-application path and session
  fence; polling runs only when the event stream is unavailable.
- Draft recovery now classifies ownership for active, closed, and
  mismatched sessions; unsupported local recovery asks the user to recapture
  instead of silently mutating the wrong workspace.
- Annotate / session edge cases tightened: annotate can launch the app when
  needed, preserves saved-focus and capture-in-flight cases, refreshes
  session counts after returning from detail, avoids entry dead-ends, and
  keeps the annotate badge layout stable at zoomed preview sizes.

### v0.6 Release Grade

- Release claims are now evidence-gated. Handoff Intelligence, Studio
  Reliability, or Release Grade claims require the evidence commands in
  [`docs/contributing/release-readiness.md`](../contributing/release-readiness.md)
  and the release issue must record their results.
- New release-gate checks: `npm run release:v06:evidence:test`,
  `node scripts/check-release-readiness.mjs`, with local-check wiring that
  guards CLI/docs/MCP/output-schema drift before tagging.

## Compatibility

- **Bridge protocol** is unchanged at `1.3`.
- **External Android apps** should apply the Gradle plugin
  `io.github.beyondwin.fixthis.compose` at version `0.6.0`.
- **Persisted JSON** changes are additive. `editSurfaceCandidates[].role`
  is optional; sessions written by older builds omit it and are read as-is.
- **Pre-v0.4 local data is not migrated.** Clear browser storage or run
  `fixthis clean` if old `localStorage["fixthis.pending.<sessionId>"]`
  mirrors or `.fixthis/artifacts` screenshot roots confuse the console.

## Agent install

From a Jetpack Compose Android app repository:

```bash
# macOS
brew install beyondwin/tools/fixthis

# npm
npm install -g @beyondwin/fixthis

# macOS/Linux fallback without package managers
curl -fsSL https://raw.githubusercontent.com/beyondwin/FixThis/main/scripts/install-fixthis.sh \
  | bash -s -- --version v0.6.0

fixthis install-agent --project-dir . --target all
./gradlew fixthisSetup   # only if doctor reports NEEDS_INSTALL
fixthis doctor --project-dir . --json
```

Restart Claude Code or Codex after MCP config is written, then call
`fixthis_open_feedback_console`.

## Release evidence

The v0.6 release-readiness checklist
([`docs/contributing/release-readiness.md`](../contributing/release-readiness.md))
was run on the release commit. Connected-emulator smoke was not executed on
this release machine; the unit, integration, console reliability, browser
reliability, and v0.6 evidence harnesses cover the same surfaces and are the
substituted evidence for this tag.

## See also

- [CHANGELOG.md](../../CHANGELOG.md) — full `[0.6.0]` entry.
- [docs/contributing/release-readiness.md](../contributing/release-readiness.md) —
  release-claim manifest and required evidence.
- [docs/reference/bridge-protocol.md](../reference/bridge-protocol.md) —
  bridge protocol stayed at `1.3`.
