fix(evaluation): update stale Language Gate preamble to reflect tracking

04-job-evaluation.md still said the gate result "is not a field /scrape
or /rank track" - true when the gate was introduced, false since /rank
began persisting language_gate/language_note as shortlist veto fields
and /scrape began surfacing the flag. The authoritative framework file
taught agents the opposite of rank.md's own persistence rule. New
coupling test pins that the section names the tracked fields and never
reverts to the untracked claim. framework_version 1.2.3 -> 1.2.4.
Review finding F24 (2026-08-19).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mads Lorentzen
2026-08-19 19:52:21 +02:00
co-authored by Claude Opus 5
parent 2036b97040
commit 9ab697de64
3 changed files with 40 additions and 2 deletions
+30
View File
@@ -20,6 +20,9 @@ except ImportError:
REPO = Path(__file__).resolve().parent.parent
COMMAND = REPO / ".claude" / "commands" / "rank.md"
SCRAPER_SKILL = REPO / ".claude" / "skills" / "job-scraper" / "SKILL.md"
EVALUATION = (
REPO / ".claude" / "skills" / "job-application-assistant" / "04-job-evaluation.md"
)
def _sections(text: str) -> dict[str, str]:
@@ -102,6 +105,33 @@ class RankCommandSpec(unittest.TestCase):
"not only when /rank re-scores it",
)
def test_evaluation_framework_acknowledges_language_gate_tracking(self):
"""04-job-evaluation.md is the authoritative file /rank tells its agents
to read. Its Language Gate preamble once said the gate result "is not a
field /scrape or /rank track" - written before the gate was wired into
both consumers, and never updated. An agent reading that learns the
opposite of what rank.md itself insists on ("These veto fields are as
important to persist as the score itself"). The framework text must name
the tracked fields and must not claim they are untracked."""
text = EVALUATION.read_text(encoding="utf-8")
gate = text.partition("## Language Gate")[2].partition("\n## ")[0]
self.assertTrue(gate, "04-job-evaluation.md has no Language Gate section")
self.assertIn(
"language_gate",
gate,
"the Language Gate section must name the language_gate field /rank persists",
)
self.assertIn(
"language_note",
gate,
"the Language Gate section must name the language_note field /rank persists",
)
self.assertNotIn(
"not a field",
gate,
"stale claim: the gate result IS tracked by /scrape and /rank now",
)
def test_step2_schema_includes_language_gate_fields(self):
sections = _sections(COMMAND.read_text(encoding="utf-8"))
step2 = sections.get("Step 2: Batch-Fetch and Score", "")