diff --git a/config/opencode/commands/workflow.md b/config/opencode/commands/workflow.md index 0009a63..0051053 100644 --- a/config/opencode/commands/workflow.md +++ b/config/opencode/commands/workflow.md @@ -222,7 +222,7 @@ Provide reviewers with: The workflow is forge-agnostic. It commits locally and stops. **Do not push, and do not open a pull/merge request** — the user chooses their forge and review workflow manually. ### Commit Code Changes -- Stage code changes (everything except `TODO.md` and `.opencode/workflow-summary.md`, which are committed separately below) +- Stage code changes only. **Do not stage `TODO.md`** (committed separately below) and **do not stage `.opencode/workflow-summary.md`** (intentionally never committed — see Local Summary). - Write a conventional commit message summarizing the implementation. Reference the TODO.md issue ID in the body (e.g. `Refs: ABC-1`). - If changes are large/varied, use multiple atomic commits (one per logical unit) @@ -244,7 +244,7 @@ The workflow is forge-agnostic. It commits locally and stops. **Do not push, and - Review outcomes (plan review + final review verdicts) - Unresolved items (if any) - Files changed -- Commit the summary: `chore(workflow): summary for ` +- **Do not commit this file.** It is a per-run, per-branch artifact; committing it would create merge conflicts whenever multiple workflow branches are merged. Leave it untracked. Recommend the user add `.opencode/` to `.gitignore` if not already. --- @@ -252,8 +252,8 @@ The workflow is forge-agnostic. It commits locally and stops. **Do not push, and ## Failure Handling At any phase, if an unrecoverable error occurs: -1. Write `.opencode/workflow-summary.md` (in the worktree, if one exists) with what was completed and what failed -2. If any code was written, commit it with message `wip: incomplete workflow run for ` +1. Write `.opencode/workflow-summary.md` (in the worktree, if one exists) with what was completed and what failed. Do **not** stage or commit this file. +2. If any code was written, commit it with message `wip: incomplete workflow run for `. Stage code only — exclude `.opencode/workflow-summary.md`. 3. Leave the branch and worktree intact for the user to inspect — do not push, do not delete 4. If a worktree exists, dispatch `@pm` (with header `Worktree: $WORKTREE_PATH` and the absolute path `$WORKTREE_PATH/TODO.md`) to add a comment on the issue summarising what failed 5. Stop execution