Skip to content

One Skill Body Parity check: installer should call skill_parity, not reimplement it #98

Description

@derek-palmer

From the 2026-06-09 Architecture Review. Recommendation strength: Worth exploring.

Files

  • src/codeforerunner/skill_parity.py
  • src/codeforerunner/installer.py:124-131 (pass-through strip_frontmatter), installer.py:217-228 (inline body compare)
  • src/codeforerunner/doctor.py:65
  • scripts/validate_skill_copies.py

Problem

skill_parity is the Skill Body Parity module, and doctor plus validate_skill_copies.py use its high-level check_skill_body_parity(). The installer instead borrows the low-level split_frontmatter behind a one-line pass-through (which fails the deletion test) and re-derives body equality inline in plan_install. A change to the parity rule (e.g. whitespace normalization) must be made in two places.

Solution

Give skill_parity one high-level entry point the installer calls — source vs canonical in, result plus reason code (V10) out. Delete the installer's pass-through wrapper and inline comparison.

Benefits

  • Locality: the parity rule changes in one module.
  • Seam: three real adapters (installer, doctor, validator) on one interface.
  • Tests: installer tests stop restating body equality; test_install_body_parity_mismatch_aborts exercises the shared interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture Review / Deepening OpportunityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions