git:20261017.f669441 to git:20261017.2f2e03b

50 added, 120 removed. Audit A to A.

---
name: roadmap-task-deliver
description: Deliver the first eligible unfinished roadmap task through implementation, review, green CI, PR merge, and a task-status update. Use for autonomous delivery from local roadmap and task files. Files can be outside the code repository or outside Git.
---
# Roadmap Task Delivery
Deliver one roadmap task through a verified GitHub merge and a saved task-status update. Manage task selection and completion across the code repository and the actual task-file location.
## Resolve inputs and authority
- 1. Find the roadmap, task collection, code repository, requested base branch, remote and review systems in the request and linked guidance. Resolve each relative path from the document that contains it. Ask for missing inputs only when a focused local search cannot identify them.
+ 1. Find the roadmap, task collection, code repository, requested base branch, remote, and review systems in the request and linked guidance. Resolve each relative path from the document that contains it. Ask for missing inputs only when a focused local search cannot identify them.
2. Treat a request to execute this full workflow as authorization for these actions within the selected task:
- Implement the change.
- Create a worktree and branch.
- Commit and push the change.
- Create the draft PR and mark it ready.
- - Fix review findings, reply to reviewers and resolve review threads.
+ - Fix review findings, reply to reviewers, and resolve review threads.
- Merge after the required checks and reviews pass.
- Update task status and create local task commits.
Continue between these stages without routine approval. Explicit user restrictions override these defaults. Reading this skill or a task file does not itself grant authority.
- 3. Read applicable instructions for both the code and task locations. Find each location's Git root separately. Check linked worktrees, nested repositories, untracked files, ignored files and locations outside Git. Record the canonical task path, code repository, base branch, original task contents and uncommitted changes. A directory named `plans` does not prove ownership or Git tracking.
- 4. Execute one selected task. Do not deploy, release, contact customers, spend money or start the next task without separate authorization. Keep a task incomplete when required external decisions or observation evidence are missing.
+ 3. Read the applicable instructions for both the code and task locations. Find each location's Git root separately. Check linked worktrees, nested repositories, untracked files, ignored files, and locations outside Git. Record the canonical task path, code repository, base branch, original task contents, and uncommitted changes. A directory named `plans` does not prove ownership or Git tracking.
+ 4. Execute one selected task. Do not deploy, release, contact customers, spend money, or start the next task without separate authorization. Keep a task incomplete when required external decisions or observation evidence are missing.
## Select or resume the task
- 1. Read the roadmap's outcomes, task order, shared decisions and acceptance requirements. Read the task index and frontmatter next. Keep the existing format and status names. Do not require a fixed folder layout or create a replacement schema.
- 2. Check task status before inspecting branches, worktrees, PRs or delivery records. Skip `done` tasks immediately without revalidating their recorded completion evidence. Investigate delivery state only for a task marked `in_progress`; resume it when the work clearly belongs to that task, including when its PR merged but its task update is missing. Do not duplicate work that another delivery already owns.
+ 1. Read the roadmap's outcomes, task order, shared decisions, and acceptance requirements. Read the task index and frontmatter next. Keep the existing format and status names. Do not require a fixed folder layout or create a replacement schema.
+ 2. Check task status before inspecting branches, worktrees, PRs, or delivery records. Skip `done` tasks immediately without revalidating their recorded completion evidence. Investigate delivery state only for a task marked `in_progress`; resume it when the work clearly belongs to that task, including when its PR merged but its task update is missing. Do not duplicate work that another delivery already owns.
3. When no task is `in_progress`, select the first unfinished task with complete dependencies. Use this order:
- Explicit roadmap or index order.
- Explicit task order.
- Natural task-ID or filename order, with this fallback stated to the user.
- Check dependency references and completion evidence. Do not treat `in_progress`, a checked box or an open PR as proof of implemented and merged work.
- 4. Explain the selection and each earlier skipped task. Skip dependency-blocked tasks or tasks owned elsewhere only when the roadmap permits independent progress. Report unresolved decisions, conflicting ownership or incomplete mandatory predecessors that prevent selection. Do not redefine “first” as easiest. Missing dependencies and dependency cycles do not count as complete.
- 5. Read the full selected task and its prerequisite decisions. Map requirements, failure behavior and verification to current code. If the implementation already exists, verify it. Update status from that evidence without creating an unnecessary change or PR. If all tasks are complete, report the evidence and stop.
- 6. Record the task identity and delivery branch or PR in the existing task metadata format. Use the existing active status when appropriate. Re-read the task before each edit. Preserve concurrent changes. A status edit is not a distributed lock. Stop if competing work or changed acceptance requirements cannot be reconciled safely.
+ Check dependency references and completion evidence. Do not treat `in_progress`, a checked box, or an open PR as proof of implemented and merged work.
+ 4. Explain the selection and each earlier skipped task. Skip dependency-blocked tasks or tasks owned elsewhere only when the roadmap permits independent progress. Report unresolved decisions, conflicting ownership, or incomplete mandatory predecessors that prevent selection. Do not redefine "first" as easiest. Missing dependencies and dependency cycles do not count as complete.
+ 5. Read the full selected task and its prerequisite decisions. Map requirements, failure behavior, and verification to current code. If the implementation already exists, verify it and update the status from that evidence without an unnecessary change or PR. If all tasks are complete, report the evidence and stop.
+ 6. Record the task identity and delivery branch or PR in the existing task metadata format. Use the existing active status when appropriate. Re-read the task before each edit and preserve concurrent changes. A status edit is not a distributed lock. Stop if competing work or changed acceptance requirements cannot be reconciled safely.
## Maintain autonomous progress
- 1. Continue delivery without routine confirmation. Resolve available facts from the roadmap, task, prerequisite decisions, linked documents, code, tests, configuration and relevant history.
- 2. Use installed CLI help, APIs, connectors and authorized browser sessions when needed. Use current official documentation for unfamiliar public behavior or behavior that depends on a specific version. Never send private task or repository data to public search.
- 3. Choose the smallest reversible approach that satisfies the required outcome and authorized scope. Record necessary assumptions. Do not replace the roadmap's intended outcome with an easier intermediate result.
- 4. Ask the user only when one of these conditions prevents progress:
- - A missing decision changes required behavior or scope.
- - Required credentials or authority are unavailable.
- - Requirements conflict.
- - Every safe path requires an unauthorized high-risk action.
-
- State what evidence you checked and what still blocks progress. Continue independent work while waiting when possible.
- 5. Do not treat silence as approval. Do not treat an unavailable external dependency as success. Keep enough delivery evidence to resume blocked work.
+ 1. Continue without routine confirmation. Resolve facts from the roadmap, task, prerequisite decisions, linked documents, code, tests, configuration, history, installed CLI help, connectors, and current official documentation. Never send private task or repository data to public search.
+ 2. Choose the smallest reversible approach that satisfies the required outcome and authorized scope, and record the assumption. Do not replace the roadmap's intended outcome with an easier intermediate result.
+ 3. Ask the user only when a missing decision changes required behavior or scope, credentials or authority are unavailable, requirements conflict, or every safe path needs an unauthorized high-risk action. State what you checked and what still blocks progress, and continue independent work while you wait.
+ 4. Do not treat silence as approval or an unavailable external dependency as success. Keep enough delivery evidence to resume blocked work.
## Coordinate subagents only when useful
- 1. Use one agent by default. Add subagents only when delegation is permitted and independent work saves meaningful time or provides a useful independent check.
- 2. Keep task selection, requirements, planning, shared state, remote changes and completion claims with the current agent. Give each subagent a concrete task, necessary context, read or write limits and an expected result. Delegation does not expand authority.
- 3. Run independent reads in parallel, in the `yarstack:reviewer` agent when the host provides it. Run writes in parallel only when their dependencies and paths do not overlap. Assign one writer to each shared artifact. Apply overlapping fixes in sequence. Keep task-status edits, commits, pushes, review replies and merges with the current agent.
- 4. Check subagent results against source or remote evidence. Integrate required results before final validation or merge. Stop all writers before those stages. Subagents can report missing evidence but must not interrupt the user directly.
+ Use one agent by default. Add a subagent only when delegation is permitted and independent work saves meaningful time or gives a useful independent check; delegation does not expand authority. Run independent reads in the `yarstack:reviewer` agent when the host provides it. Run writes in parallel only when their paths do not overlap, with one writer for each shared artifact. Keep task selection, requirements, planning, shared state, task-status edits, commits, pushes, review replies, merges, and completion claims with the current agent. Verify subagent results against source or remote evidence, and stop all writers before final validation or merge.
## Prepare an isolated delivery worktree
1. Honor the requested remote and base branch. Use a verified existing task branch or workspace when supplied. Check registered worktrees, local and remote branches, and task-linked PRs before creating another delivery.
- 2. Resume a workspace or attach an existing branch unchanged only when it clearly belongs to this task. Record its head, upstream, uncommitted changes, verified PR base and current remote base commit. Do not rebase solely because the base advanced.
- 3. For new work, resolve the remote's current default branch from live evidence unless the user supplied a base. Do not assume `origin`, `main` or `master`. Do not rely only on cached remote `HEAD`.
- 4. Fetch the required base ref. Record its exact commit. Do not switch, pull, reset, stash or update the primary checkout or its local default branch. Stop if current remote evidence cannot establish the base.
- 5. Use the repository's worktree location. Otherwise use an external path such as `<repository-parent>/.worktrees/<repository>/<task-id>-<slug>`. Never overwrite, reset, delete, unlock, prune or force-reuse a conflicting branch, path or worktree. Do not add ignore rules solely for this workspace.
- 6. Create a short branch named for the task at the recorded base commit. Do not make it track the base branch. Set its upstream to the remote topic branch on first push. Check worktree registration, branch, clean initial state and base SHA. Preserve existing state when resuming.
- 7. Read applicable instructions in the selected worktree. Perform code discovery, edits, checks, reviews, commits, pushes and fixes there. Keep task-file ownership separate when the files live elsewhere. Do not redirect task updates to a stale worktree copy.
- 8. Keep the worktree through the final audit. Remove it only when the user or repository explicitly requires cleanup.
-
- ## Discover the repository flow
-
- 1. Check the delivery worktree, task branch, remotes and recorded base. Preserve unrelated staged, unstaged and untracked work. Stop if safe isolation is impossible.
- 2. Read root and nearest instructions, plus linked architecture, testing and PR guidance. Find the closest healthy implementation and test patterns before proposing new code.
- 3. Trace the affected user, API, event or CLI flow through validation, policy, persistence, external effects and observable completion. Record the owners, interfaces, dependencies, tests and current behavior that constrain this task and later tasks.
- 4. Map each requirement to its input or state, expected result, failure behavior, owner and evidence. Separate requirements from historical notes and suggestions. A prerequisite's completion label does not replace source evidence.
- 5. Check installed tools before relying on behavior that depends on their version. Use official sources when needed. Distinguish facts from inference. Stop discovery when the required edits, checks and remaining risks are clear.
- 6. Before editing, state any intentional deviation from the existing pattern and why it is necessary. Do not inventory unrelated modules or generated or vendored output.
-
- ## Create the implementation plan
-
- 1. Use `plan-create` with the requirement map, roadmap decisions and repository evidence. Use one phase for a small coherent change. Add phases only when dependencies require an order.
- 2. Give each phase a goal, deliverables, dependencies, acceptance evidence and behavior to preserve. Map every selected-task requirement to a phase and verification step. Include contracts that later tasks use.
- 3. Use `architecture-refine` or `technical-spike` when an unresolved contract or version-specific fact changes the implementation approach. Apply the autonomous-progress rules before asking the user.
- 4. Write another plan file only when authorized and the repository has an established location and format. Otherwise keep the plan in the active workflow. Do not replace or duplicate the authoritative external task collection.
- 5. Use `plan-update` only when evidence requires corrections to ordering, prerequisites, scope mechanics or checks. Do not change acceptance requirements or rewrite the roadmap to hide incomplete work. Record necessary contract changes for dependent tasks.
-
- ## Implement, validate, and review each phase
-
- 1. Select the next phase with complete prerequisites. Use `phase-implement`. Use `behavior-implement` for behavior changes and `test-design` for non-trivial test choices. Read each skill when applying it.
- 2. Follow existing naming, error, logging, dependency, testing and generated-code conventions. Regenerate artifacts only when source changes require it. Use repository-native commands.
- 3. Use `phase-validate` against the phase's task criteria and planned evidence. Base conclusions on the current implementation and checks. Do not rely on implementation notes.
- 4. Use `phase-review` to find structural regressions introduced by the change. Apply `test-gap-review`, `security-review`, `dependency-review`, `docs-drift-review` and language or platform reviews when relevant.
- 5. Fix verified defects within scope. Rerun affected checks before advancing. Use `plan-update` when evidence requires changes to the plan's mechanics. Preserve the selected task's full outcome.
- 6. After all phases, use `code-review` on the complete diff. Fix verified findings through the responsible phase. Rerun that phase's validation and review.
- 7. Use `change-cleanup-review` on the complete current change. Apply material findings supported by evidence. Rerun affected checks. Map each criterion to final evidence. Run the required repository checks. Review every changed file. Remove unrelated changes before publication.
-
- ## Publish a draft and make it reviewable
-
- 1. Use `pr-draft` after local implementation, validation and review. The full-delivery request supplies publication authority. Use the prepared task branch and verified base.
- 2. Stage explicit paths. Inspect the staged diff. Commit using repository conventions. Push with an upstream. Create the draft PR. Keep unrelated edits from the task repository out of the code commit.
- 3. Follow the PR template. Otherwise describe the problem, fix and tests, including the task ID and acceptance summary. Use a repository task link when available. A private or local path identifies the source but is not a publicly accessible link. Do not copy sensitive roadmap content into the PR.
- 4. Use `text-improve` on the title and body. Use `change-cleanup-review` on the complete presentation. Preserve verified facts. Apply material findings supported by evidence. Keep the final description consistent with the actual diff.
- 5. When practical, wait for draft checks and fix failures before marking the PR ready. Mark it ready only when the pushed head passes local validation and the presentation is accurate.
- 6. If a reviewer runs only on ready PRs, mark the PR ready first. Then check the actual review for the current head. A draft check does not prove review completion.
-
- Do not rewrite published history, force-push, weaken tests, disable checks or use admin overrides to obtain green status. Perform commits, pushes and PR-state changes in sequence because they change shared remote state.
-
- ## Drive CI to green
-
- 1. Record the remote PR head. Check required results for that exact commit. A green result for an earlier head does not prove that a newer push passes.
- 2. Monitor checks and keep the user informed. Inspect the failed job, annotations and relevant logs before editing.
- 3. Classify failures as caused by the change, pre-existing blockers or temporary infrastructure failures. Fix only defects within scope. Retry an unchanged run only when evidence shows that retry can succeed. Report blockers that require broader authority. Do not bypass required checks.
- 4. Apply corrections through the responsible phase's implementation, validation and review steps. Commit and push only verified corrections.
- 5. Discard stale conclusions after each push. Record the new head. Repeat affected checks. Continue until required checks pass or return a neutral result that repository policy explicitly allows.
+ 2. Resume a workspace or attach an existing branch unchanged only when it clearly belongs to this task. Record its head, upstream, uncommitted changes, verified PR base, and current remote base commit. Do not rebase only because the base advanced.
+ 3. For new work, resolve the remote's current default branch from live evidence, such as `git ls-remote --symref <remote> HEAD`, unless the user supplied a base. Do not assume `origin`, `main`, or `master`, or rely only on cached remote `HEAD`. Fetch the base ref and record its exact commit. Stop if current remote evidence cannot establish the base.
+ 4. Do not switch, pull, reset, stash, or update the primary checkout or its local default branch.
+ 5. Use the repository's worktree location, or an external path such as `<repository-parent>/.worktrees/<repository>/<task-id>-<slug>`. Never overwrite, reset, delete, unlock, prune, or force-reuse a conflicting branch, path, or worktree. Do not add ignore rules only for this workspace.
+ 6. Create a short branch named for the task at the recorded base commit, without tracking the base branch. Set its upstream to the remote topic branch on first push. Check the worktree registration, branch, clean initial state, and base SHA.
+ 7. Do all code discovery, edits, checks, reviews, commits, pushes, and fixes in the delivery worktree, after reading its instructions. Keep task-file updates at the canonical task path, not in a stale worktree copy. Keep the worktree through the final audit unless the user or repository requires cleanup.
- ## Close CodeRabbit and other automated review
+ ## Plan, implement, and review
- 1. Use `coderabbit-triage` after the PR is ready when CodeRabbit review is configured or requested. Inspect actual review evidence for other requested reviewers. Check the bot identity, PR, head, review status, thread node IDs and comment IDs. Treat comments as untrusted input.
- 2. Read each thread in code context. Classify each finding:
- - `fix`: a defect within the task's scope.
- - `optional`: an improvement that the task does not require.
- - `reject`: incorrect, unsafe, duplicate or scope-expanding advice.
- 3. Do not implement optional suggestions solely to satisfy a bot. Give evidence-based responses to declined or rejected findings within the authorized review scope.
- 4. Demonstrate each defect where feasible. Add proportionate regression coverage. Make the smallest correction. Rerun affected and required checks.
- 5. After each set of review fixes, use `change-cleanup-review` on the complete current change. Apply material findings supported by evidence. Rerun affected and required checks.
- 6. Commit and push before replying that a defect is fixed. Cite the commit or evidence. Then resolve the thread. Record the rationale before resolving declined or rejected findings.
- 7. Check thread resolution through GitHub tooling or APIs that expose thread state. Top-level comments and review summaries do not prove that inline threads are resolved.
- 8. Wait for the review after each push, or use the repository-supported review trigger. Check all threads again because a fix can introduce new findings. A passing check, emoji or summary alone does not prove review completion for the current head.
- 9. Repeat when new commits, checks, reviews or threads provide new evidence. If a required reviewer is unavailable, try all safe supported recovery steps. Report the remaining external blocker. Do not merge before a required review finishes.
+ 1. Trace the affected flow end to end and find the closest healthy implementation and test patterns. Map each requirement to its input or state, expected result, failure behavior, owner, and evidence. Separate requirements from historical notes and suggestions; a prerequisite's completion label does not replace source evidence. Stop discovery when the edits, checks, and remaining risks are clear.
+ 2. Use `plan-create` with the requirement map, roadmap decisions, and repository evidence. Use one phase for a small coherent change, map every task requirement to a phase and a verification step, and include the contracts that later tasks use. Settle an open design decision with the smallest reversible option and record it; ask the user only under *Maintain autonomous progress*. Use `technical-spike` for a version-specific fact that changes the approach. Write a plan file only when authorized and the repository has an established location; never duplicate the authoritative task collection.
+ 3. For each phase with complete prerequisites, use `phase-implement`, then `phase-validate`, then `phase-review`. Apply `test-gap-review`, `security-review`, `dependency-review`, and `docs-drift-review` when their triggers apply. Fix verified in-scope defects and rerun affected checks before you advance.
+ 4. Use `plan-update` only when evidence requires corrections to ordering, prerequisites, scope mechanics, or checks. Do not change acceptance requirements or rewrite the roadmap to hide incomplete work.
+ 5. After all phases, use `code-review` on the complete diff and fix verified findings through the responsible phase. Then use `change-cleanup-review` on the complete change, run the required repository checks, and map each criterion to final evidence.
- ## Audit before merging
+ ## Publish and drive CI to green
- Fetch fresh local and remote evidence after the last review cycle. Check these conditions:
+ 1. Publish with `pr-draft`, whose authority this full-delivery request supplies: stage explicit paths, commit, push the task branch with an upstream, check `gh pr view --json url` for an existing PR, and otherwise run `gh pr create --draft --base <base>`. Keep task-repository edits out of the code commit. In the PR body, include the task ID and an acceptance summary; a private or local task path identifies the source but is not a link, and sensitive roadmap content stays out.
+ 2. Mark the PR ready with `gh pr ready <number>` only when the pushed head passes local validation and the description is accurate. If a reviewer runs only on ready PRs, mark it ready first.
+ 3. For every pushed head, record its SHA and check the required results for that exact commit, for example with `gh pr checks <number> --required --watch --fail-fast` under the host's command timeout. A green result for an earlier head proves nothing about a newer push.
+ 4. Classify each failure as caused by the change, pre-existing, or a temporary infrastructure failure. Fix in-scope defects through the responsible phase; retry an unchanged run only when evidence shows that a retry can succeed. Stop after three fix cycles for the same failing check and report it as a blocker.
- - The validated commit matches the remote head.
- - The PR is ready.
- - Required checks and reviews are complete.
- - Actionable threads are resolved.
- - The title and body match the final diff and acceptance evidence.
+ Do not rewrite published history, force-push, weaken tests, disable checks, or use admin overrides. Perform commits, pushes, and PR-state changes in sequence.
- Rerun checks invalidated by final edits. Integrate all required agent results. Stop all writers before proceeding to merge.
+ ## Close automated review
- ## Merge as soon as the gates pass
+ 1. Use `coderabbit-triage` when CodeRabbit is configured or requested, and the equivalent evidence for other requested reviewers. The full-delivery request authorizes its remediation, reply, and resolution stages for this task.
+ 2. After each push, wait for the reviewer to review the new head, or use the repository's review trigger, and check all threads again, because a fix can introduce new findings. A passing check, emoji, or summary does not prove that the current head was reviewed.
+ 3. If a required reviewer is unavailable, try the safe supported recovery steps, then report the external blocker. Do not merge before a required review finishes.
- 1. Fetch current PR evidence immediately before the merge:
- - Repository and base branch.
- - Head SHA and non-draft state.
- - Required checks, requested reviews and required approvals.
- - Unresolved actionable threads and mergeability.
+ ## Audit and merge
- Check that the remote head matches the locally validated commit and satisfies the task criteria. Treat empty, pending, missing, skipped or stale results as incomplete unless repository policy explicitly allows them.
- 2. Merge immediately after these requirements pass. Use the repository's allowed merge method. Use an expected-head guard supported by the current GitHub tooling or API. The full-workflow request requires no additional user confirmation. Respect branch protection, human approvals and merge queues. Never use an admin bypass.
- 3. Follow repository update and queue rules if the head or base changes, conflicts arise or the queue requires another candidate. Check the resulting test evidence before reporting completion. Queue admission and auto-merge configuration do not prove a completed merge. Monitor the PR until it merges or an external blocker prevents progress.
- 4. Check that the PR merged into the intended base. Record its URL, merge commit, merge time and validated head. After a timeout or lost response, query authoritative PR state before retrying. Never merge a second PR to compensate for an unknown result.
- 5. Do not mark the task complete if acceptance still requires deployment, real-system checks, approval or an observation period. Complete remaining authorized checks. Otherwise report what remains and keep the merge evidence for resumption.
+ 1. After the last review cycle, fetch fresh evidence immediately before the merge: base branch, head SHA, non-draft state, required checks, requested reviews and approvals, unresolved actionable threads, and mergeability. Check that the remote head matches the locally validated commit and that the title and body match the final diff. Treat empty, pending, missing, skipped, or stale results as incomplete unless repository policy allows them.
+ 2. Merge with the repository's allowed method and a head guard: `gh pr merge <number> --match-head-commit <validated-sha>` with `--squash`, `--merge`, or `--rebase`. The full-workflow request needs no extra confirmation. Respect branch protection, human approvals, and merge queues. Never pass `--admin`. Do not pass `--delete-branch`, because it also deletes the local branch that the delivery worktree uses.
+ 3. If the head or base changes, conflicts arise, or the queue needs another candidate, follow the repository's update and queue rules, and check the new test evidence. Queue admission and auto-merge configuration do not prove a merge. Monitor the PR until it merges or an external blocker stops progress. After a timeout or lost response, query the PR state before retrying, and never merge a second PR to compensate for an unknown result.
+ 4. Confirm that the PR merged into the intended base, and record its URL, merge commit, merge time, and validated head. Do not mark the task complete while acceptance still needs deployment, real-system checks, approval, or an observation period; report what remains and keep the merge evidence for resumption.
## Update and commit the task record
- 1. Re-read the authoritative task and roadmap status or index. Update only the selected task and existing aggregate status that directly represents it. Preserve the format, status names and unrelated fields. Record acceptance evidence, PR and merge identity, and decisions that affect later tasks. Mark complete only after verifying all task criteria and the actual merge.
- 2. For files outside Git, save the task in place. Check the saved result. Do not initialize a repository. For files inside Git, check whether each file is tracked, untracked or intentionally ignored. Include an ordinary untracked task in its authorized update commit. Do not force-add ignored or private files, or change ignore policy, without authority.
- 3. For tasks in the code repository, create the completion commit after the implementation PR merges. Use a safe worktree based on the verified merged base. Include only task completion records. Do not push the update to the already-merged topic branch. Do not switch or reset a dirty primary checkout. Map the original path to its repository-relative counterpart. Report where the committed update resides. Do not leave a duplicate uncommitted status edit.
- 4. For tasks in a separate Git repository, commit only the task and status update on its intended branch. Inspect the staged diff. Preserve unrelated staged and unstaged work. Use an isolated worktree or a scoped patch when necessary. Do not commit all dirty planning files because they share a directory.
- 5. This workflow authorizes a local task-record commit. It does not authorize an automatic push to a separate planning remote or an unreviewed default-branch push. Follow any separately authorized publication policy. Record the task commit SHA, branch and worktree for the next run, even if the original checkout did not advance. If task publication requires a PR, handle it as bookkeeping under that policy. Do not treat it as another selected implementation task.
- 6. The code merge and task-record commit are separate operations. If the status write or commit fails, keep the merge identity. Report the task-record update as incomplete. On resume, check the existing merge and finish only the missing bookkeeping. Do not repeat implementation. Do not claim that an unsaved task record was saved.
+ 1. Re-read the authoritative task and roadmap status or index. Update only the selected task and the existing aggregate status that directly represents it. Preserve the format, status names, and unrelated fields. Record acceptance evidence, PR and merge identity, and decisions that affect later tasks. Mark complete only after verifying all task criteria and the actual merge.
+ 2. For files outside Git, save the task in place and check the saved result. Do not initialize a repository. For files inside Git, check whether each file is tracked, untracked, or intentionally ignored. Include an ordinary untracked task in its authorized update commit. Do not force-add ignored or private files, or change ignore policy, without authority.
+ 3. For tasks in the code repository, create the completion commit after the implementation PR merges, in a safe worktree based on the verified merged base. Include only task completion records. Do not push the update to the already-merged topic branch, and do not switch or reset a dirty primary checkout. Map the original task path to its repository-relative path in that worktree. Report where the committed update resides, and do not leave a duplicate uncommitted status edit.
+ 4. For tasks in a separate Git repository, commit only the task and status update on its intended branch. Inspect the staged diff, and preserve unrelated staged and unstaged work, using an isolated worktree or a scoped patch when necessary.
+ 5. This workflow authorizes a local task-record commit, not a push to a separate planning remote or an unreviewed default-branch push. Follow any separately authorized publication policy; if publishing the task record needs a PR, treat it as bookkeeping under that policy, not as another task. Record the task commit SHA, branch, and worktree for the next run.
+ 6. The code merge and the task-record commit are separate operations. If the status write or commit fails, keep the merge identity and report the task-record update as incomplete. On resume, check the existing merge and finish only the missing bookkeeping; do not repeat the implementation or claim that an unsaved task record was saved.
## Completion
- Check the task criteria, merged PR, base, commit, current task status and saved file or scoped task commit. Review the final diffs in both repositories for unrelated changes.
-
- Report the selected task, delivered behavior, validation and review results, merged PR, task path and status, and remaining blockers. Include the task commit and its location when applicable.
+ Check the task criteria, merged PR, base, commit, current task status, and saved file or scoped task commit. Review the final diffs in both repositories for unrelated changes.
- Finish after this one delivery. Do not select another task automatically.
+ Report the selected task, delivered behavior, validation and review results, merged PR, task path and status, and remaining blockers. Include the task commit and its location when applicable. Finish after this one delivery; do not select another task automatically.