Skip to main content
Beta.18 redesigns Phase 3 of the workflow: a new Phase 3.4 Commit changes step lets the AI batch commits of this session’s edits, and /trellis:finish-work refocuses on archive + journal, refusing to run on a dirty working tree. Also fixes parent-task progress regression on child archive, hash-tracks AGENTS.md during trellis update, and supports OpenCode PowerShell context injection on Windows.

Enhancements

Phase 3.4 Commit changes

workflow.md Phase 3 gains a required 3.4 Commit changes step that drives the commit cadence for the AI rather than leaving it to the user. The Wrap-up reminder previously at 3.4 renumbers to 3.5. The [workflow-state:completed] breadcrumb (and the four hook fallbacks in inject-workflow-state.py / inject-workflow-state.js) now point users at /trellis:finish-work instead of the legacy task.py finish + task.py archive sequence.

/trellis:finish-work refocuses on survey + archive + journal

The skill drops its old “Remind user to commit” step and gains a survey step that surfaces completed-but-unarchived tasks for one-shot cleanup. The new flow is: Final git log order is <work commits from 3.4>chore(task): archive ... (one or more) → chore: record journal, never interleaved. The common skill template uses {{CMD_REF:finish-work}} so each platform’s cmdRefPrefix resolves correctly: /trellis:finish-work for Claude Code and OpenCode, $finish-work for Codex, /trellis-finish-work for Cursor.

Bug Fixes

Parent-task progress no longer regresses on child archive

task.py list previously dropped completed children from the parent’s [x/y done] count whenever a child task was archived. cmd_archive no longer removes the archived child name from the parent’s children list, and children_progress treats children missing from active statuses as completed (cmd_archive always sets status=completed before moving the directory). The invariant is documented in .trellis/spec/cli/backend/script-conventions.md → “Parent-child invariant”.

AGENTS.md hash-tracked during trellis update

Pre-0.5.0-beta.18 projects wrote AGENTS.md without recording its template hash, which surfaced as a false “modified by you” conflict on update. Beta.18 introduces: User customizations outside the Trellis block are preserved.

OpenCode PowerShell context injection on Windows

inject-subagent-context.js now picks the correct shell syntax based on host.platform: The explicit-assignment dedup detector matches both POSIX (TRELLIS_CONTEXT_ID=..., export TRELLIS_CONTEXT_ID=...) and PowerShell ($env:TRELLIS_CONTEXT_ID = ...) forms, so manually-prefixed commands are not double-wrapped.

Internal

Vitest test isolation: strip host-shell session env vars

A new packages/cli/test/setup.ts is registered via setupFiles in vitest.config.ts. It deletes process.env.TRELLIS_CONTEXT_ID and process.env.OPENCODE_RUN_ID at vitest process start so the OpenCode resolver tests no longer pick up a Claude/OpenCode host-session env var that would hijack the platform-input-derived contextKey. The pattern is documented in .trellis/spec/cli/unit-test/conventions.md → “Test Isolation”.

Spec updates

Upgrade

Existing projects:
No --migrate flag is required for this beta.