Task: Encode the per-component codegen drift-elimination method as a skill

Table of Contents

This page documents a task in the Entity classification and drift baseline across all components story. It captures the goal, current status, acceptance, and any notes or results.

1. Goal

A reusable skill that runs one component through the full drift-elimination algorithm. The skill is the single method every remediation story follows, so the sweep does not re-derive the recipe per component and does not repeat the pilot mistakes. It encodes the algorithm the ores.refdata and ores.dq pilots proved (see the parent story's Decisions, 2026-09-03), the generated-code review step, the too-complex-to-generate exception rule, and the automation ramp with its evidence gates.

2. Status

Field Value
State DONE
Parent story Entity classification and drift baseline across all components
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-09-04

3. Acceptance

  • The skill is authored under doc/llm/skills/<slug>/SKILL.org per the claude_code_skills.org contract and deployed to .claude/skills/ via deploy_skills. It loads through the Skill tool.
  • The algorithm is stated as an ordered procedure: baseline regen before any model edit, survey every model file, bind entities to profiles, record each no-match with its real feature values, fix codegen gaps at their source, regenerate, require byte-identical output, review the generated code for C++ idiomaticity and smells, extend the check_component_drift.py gate list last. No step is skippable; no partial coverage is a valid end state.
  • The too-complex-to-generate exception rule is stated: an exception needs a recorded justification per entity, and the manual artefact stays visible to the drift check.
  • The automation ramp is stated as levels L0-L2 with the evidence each level needs before promotion.
  • The skill cites its provenance: the ores.refdata and ores.dq worked method records, and the sprint 24 dimension settlement.
  • The dormant product-backlog entries that this method supersedes (entity_evaluation_skill and similar) are closed or re-pointed at the skill.

4. Plan

  • 2026-09-03: task scaffolded with the rollout task (see its Plan).
  • Name the skill against the naming registers: no register verb covers repair to a defined end state, so extend the verb register with fix-, recording the decision in skill_naming_conventions.org's decision log (per the register's own extension mechanism).
  • Scaffold via compass add skill under doc/llm/skills/<slug>/ and author the whole method from the provenance records only: the refdata and dq worked records, the sprint 24 dimension settlement, and the story's 2026-09-03 Decisions.
  • Wire: catalogue regeneration, s1-agent cross-link, dormant entity_evaluation_skill backlog entry re-pointed at the skill.
  • Verify with deploy_skills (export + id-link resolution) and a site export check before raising.

5. Notes

6. Test Scenarios

Manual QA scenarios (scaffolded via compass add test_scenario, run through the QA Validation Runner panel) that verify this task. Link new ones here as they're created; the scenario doc itself links back via its "Verifies task" field.

Scenario State Notes
     

7. PRs

PR Title
#2003 [skills] Add compass-codegen-fix-drift drift-elimination skill

8. Review

# Comment summary File Decision Notes
5534510135 Typo: "Work arounds are not a fix." compass-codegen-fix-drift/SKILL.org Fixed One word: "Workarounds".
5534510135 Dangling id-link A57C28EA has no defining :ID: compass-codegen-fix-drift/SKILL.org Declined The :ID: is defined at projects/modeling/variability_profiles.org:2, the real Variability Profiles doc; the reviewer's id search missed the projects/modeling tree.
5534510135 Skill is 187 lines against the 50-80 thin-index contract; Recipes empty compass-codegen-fix-drift/SKILL.org Noted, no change Matches actual catalogue practice (compass-agile-refine-backlog 346, compass-code-review-comments 408); contract-vs-norm divergence is a separate question, not this PR's defect.

9. Result

Closed 2026-09-04. The canonical method ships as the compass-codegen-fix-drift skill (doc/llm/skills/compass-codegen-fix-drift/SKILL.org, ID 7908E2AF-E196-443F-8FB7-0047553D8EFE) in this PR (c5f51aeb9f, 62cbd692d7, 400620bbf0, a4e2bd8fc5). The name extends the skill naming verb register with fix-, recorded in that document's decision log. The content distills the refdata and dq worked records, the sprint 24 dimension settlement, and the story's 2026-09-03 Decisions into seven ordered, unskippable steps: baseline regen before any model edit, survey every model file, compute resolved feature values, bind every match and record every no-match with its real values, scripted per-entity regeneration with zero-additional-diff and idempotency requirements, generated-code review for C++ idiomaticity (template fixes only), and the drift gate extended last. It states the too-complex-to-generate exception rule (recorded justification per entity, artefact stays visible to the drift check) and the L0-L2 automation ramp with its evidence gates.

Acceptance: authored under doc/llm/skills/<slug>/SKILL.org per the skill contract and deployed via deploy_skills (clean export to .claude/skills, id-links resolve); ordered procedure with no skippable steps and no partial-coverage end state; exception rule; L0-L2 ramp with evidence gates; provenance citations (refdata and dq worked records, sprint 24 settlement); the dormant entity_evaluation_skill backlog entry re-pointed at the skill — all met. The skill is also wired into the catalogue and the s1 agent.

Emacs 29.3 (Org mode 9.6.15)