Skip to content

fix(copilot): sync .github/copilot-instructions.md + bats parity (SDD-005)#62

Merged
mlorentedev merged 1 commit into
mainfrom
feat/SDD-005-github-copilot-instructions-sync
May 20, 2026
Merged

fix(copilot): sync .github/copilot-instructions.md + bats parity (SDD-005)#62
mlorentedev merged 1 commit into
mainfrom
feat/SDD-005-github-copilot-instructions-sync

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

Summary

Closes a real drift detected by AUDIT-003: PR #60 (AI-019) added a "Model Tier" subsection to ai/copilot/copilot-instructions.md but missed .github/copilot-instructions.md. GitHub Copilot reading the dotfiles repo did NOT see the model-tier policy that every other agent reads.

Same drift class as BUG-001 (#40) and BUG-002 (#47) — mirror files that must move together silently diverge when an editor touches only one.

SDD checklist

  • Vault entry exists (SDD-005-github-copilot-instructions-sync in 11-tasks.md)
  • Spec folder specs/SDD-005-github-copilot-instructions-sync/ in this PR
  • proposal.md filled (Why / What / AC / Risks)
  • tasks.md in TDD order
  • verification.md filled with evidence

SDD skip rationale

Test plan

  • bats tests/*.bats650/650 pass (was 645; +5 from new tests/docs-drift.bats)
  • bats tests/docs-drift.bats → 5/5 green:
    • both files exist
    • parity outside pointer banner
    • both contain ## Model Tier header
    • both reference AGENTS.md in banner
  • Manual diff: only the pointer-banner reference form differs (markdown link vs plain — by design per file deploy context)

Out of scope

  • Build-time generation of .github/copilot-instructions.md from ai/copilot/... (a pre-commit hook). Bats parity check is sufficient enforcement; generation adds complexity without proportional benefit.
  • Reformatting ai/copilot/copilot-instructions.md (canonical source). Drift flows canonical → mirror, not back.

Promotion candidate

The verification.md flags a lesson worth promoting to 90-lessons.md:

Files that must move together silently diverge unless CI asserts parity. When AI-013-style pointer refactors split content across mirror files, ship a bats parity test in the SAME PR.

Three repeats so far (BUG-001 / BUG-002 / AI-019). Generic prevention rule.

Companion audit artifact

30-architecture/audit-003-docs-drift.md (vault) is the audit that surfaced this finding.

…-005)

AUDIT-003 detected drift: PR #60 (AI-019) added a "Model Tier" subsection to
ai/copilot/copilot-instructions.md but missed .github/copilot-instructions.md.
GitHub Copilot reading the dotfiles repo therefore did NOT see the model-tier
policy that every other agent reads.

Same drift class as BUG-001 (#40) and BUG-002 (#47): mirror files that must
move together silently diverge when an editor touches only one.

Changes:
* .github/copilot-instructions.md: append the Model Tier section; align
  pointer-banner fallback wording ("from the current repo").
  ai/copilot/copilot-instructions.md untouched (canonical source).
* tests/docs-drift.bats: new file with 5 cases. Parity rule: stripping
  blockquote lines (`^> `) from both files must yield byte-identical content.
  Sub-rule: both files must contain a `## Model Tier` section + AGENTS.md
  reference in the banner. CI fails loud on future drift.

Tests: 650/650 bats green (was 645; +5 from docs-drift.bats).
Spec: specs/SDD-005-github-copilot-instructions-sync/.
@mlorentedev mlorentedev merged commit f1efc59 into main May 20, 2026
6 checks passed
@mlorentedev mlorentedev deleted the feat/SDD-005-github-copilot-instructions-sync branch May 20, 2026 01:47
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.

1 participant