Skip to content

feat(quest): pre-RED drift check against the spec's approval base - #67

Merged
GrillerGeek merged 2 commits into
mainfrom
fix/59-pre-red-drift-check
Oct 18, 2026
Merged

GrillerGeek merged 2 commits into
mainfrom
fix/59-pre-red-drift-check

Conversation

@GrillerGeek

Copy link
Copy Markdown
Owner

Fixes #59.

Adds a drift check to Step 3 item 2 of quest.md. Mordain performs it in place of architecture-reviewer, which the issue proposed. Aldric's contract requires him to give 2–3 alternatives and forbids reading tests, and he has no Bash. The drift report has to list flipping tests and walk the git range.

  • Approval base: the spec frontmatter's approved_at: <sha> if present. Otherwise Mordain uses the last commit that touched the spec and records it as a proxy. A plan that already existed is handled the same way. IDD-framework doesn't write approved_at yet, so this works without it.
  • Trigger: git log --name-status <approval_base>..HEAD -- <named paths> is non-empty.
  • Report (read-only):
    • stale line numbers;
    • moved or renamed targets;
    • existing tests whose expectations now flip;
    • derived counts that changed.
  • Design drift: intervening behaviour that changes the design is a decision, not a correction. It goes to the user, or to Aldric through item 4.
  • Corrections: routed through docs-writer, committed, and recorded in the plan before test-author is dispatched.
  • Briefs: API names and signatures are copied from the spec or plan, never written from memory (item 1).
  • Plan template: adds approval_base: to the frontmatter and a drift-check line to ## Context.
  • Elsewhere: the portable scroll gets the same rule, the bundle is regenerated, and there is a CHANGELOG entry.

validate_plugin.py reports 0 errors and 0 warnings, validate_portable.py passes, and pytest passes 197 tests. This is a prompt-contract change. It has not been dogfooded with a live quest. Step numbering is unchanged, so references to Step 3.4 and 3.7 still hold.

🤖 Generated with Claude Code

….17.5)

A spec approved against one base and built on a later one carried stale
line numbers, renamed targets, flipping tests and wrong counts into RED.
Mordain now takes the approval base (spec `approved_at`, else the last
commit touching the spec as a recorded proxy), walks intervening commits
on named paths read-only, routes corrections through docs-writer before
test-author, and surfaces design drift to the user. Briefs quote API
names from the spec or plan, never from memory. The plan records
`approval_base` and the drift-check outcome.

Fixes #59

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coldtea-pr-lens

Copy link
Copy Markdown

Note

Nothing here is code, only docs, data or images, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@GrillerGeek

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

…check

# Conflicts:
#	CHANGELOG.md

Co-authored-by: GrillerGeek <66818+GrillerGeek@users.noreply.github.com>

Copilot AI commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merged main and resolved the CHANGELOG.md conflict, retaining both branches’ entries. Merge commit: 5c0fe2e.

@GrillerGeek
GrillerGeek merged commit b7d809b into main Oct 18, 2026
3 checks passed
@GrillerGeek
GrillerGeek deleted the fix/59-pre-red-drift-check branch October 18, 2026 12:02
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.

Pre-RED drift check when a spec was approved against an older base

2 participants