Skip to content

fix: keep Plan Deviations documents editable until merged - #18

Merged
feO2x merged 3 commits into
mainfrom
15-plan-deviation-changes
Nov 17, 2026
Merged

feO2x merged 3 commits into
mainfrom
15-plan-deviation-changes

Conversation

@feO2x

@feO2x feO2x commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Closes #15

Problem

Plan Deviations documents were frozen once committed. PR/MR review is still part of the Guiding Phase and can lead to further Follow-Up Plans for the same work item, but the frozen document could not be extended; the only workaround was deleting and recreating it.

Changes

  • guided-coding-write-deviations
    • Looks for the work item's existing Plan Deviations document first; stops if there is more than one.
    • Treats a document as frozen once its path exists on the target branch. It fetches the target branch with an explicit refspec (e.g. git fetch origin +refs/heads/main:refs/remotes/origin/main) and checks the path, so squash and rebase merges count. If the fetch fails or the target branch doesn't resolve, it stops without changing anything; the local target branch is used only when the repository has no remote.
    • A frozen document is reported and left untouched; the report mentions that the user can delete it and run the skill again.
    • Otherwise it moves the document to a fresh timestamp (git mv when tracked) and rewrites it completely from all plans and the implementation. The timestamp must be strictly later than every plan of the work item and the existing document, so the document always sorts last.
    • An existing, unmerged document that is no longer needed is reported and left for the user to decide.
  • ai-plans/AGENTS.md template: Plan Deviations documents are frozen once merged into the target branch, and a work item has at most one. Version marker raised to 2.1.0, so re-running guided-coding-setup upgrades existing repositories.
  • CHANGELOG.md: entry under [Unreleased], including the hint to re-run guided-coding-setup.
  • AGENTS.md: note that the template's guided-coding-version marker is maintained by hand, because the release tool does not update it.
  • Regenerated Claude adapter.

Verification

  • dotnet test: 157 passed
  • dotnet run --project tools/GuidedCoding.ClaudeGenerator -- --check: up to date
  • claude plugin validate . --strict: passed
  • Reviewed in three rounds by an independent Codex reviewer (GPT-6.1-Sol, high); the final round rated all categories 10.0 with no findings.

🤖 Generated with Claude Code

feO2x and others added 3 commits November 17, 2026 14:46
Plan Deviations documents were frozen once committed, so Follow-Up Plans
from PR/MR reviews could not be recorded. write-deviations now updates the
work item's existing document under a fresh timestamp until the document
is merged into the target branch, and the ai-plans/AGENTS.md template
documents the new rule.

Refs #15

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… timestamps

Stop instead of falling back to a stale local target branch when fetching
fails, verify that the target branch resolves, and require the deviations
timestamp to be strictly later than all plans of the work item.

Refs #15

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e check

A plain fetch leaves the remote-tracking branch stale when the remote's
fetch mappings do not cover the target branch, so a merged Plan Deviations
document could be treated as editable.

Refs #15

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@feO2x feO2x added this to the 2.1.0 milestone Nov 17, 2026
@feO2x feO2x self-assigned this Nov 17, 2026
@feO2x
feO2x merged commit b82e024 into main Nov 17, 2026
1 check passed
@feO2x
feO2x deleted the 15-plan-deviation-changes branch November 17, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan Deviation Files must not be immutable until PR/MR is merged

1 participant