mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
fix(expand,setup): append behavioral findings to sections 02-behavioral-profile.md actually has (#520)
Both commands told the model to add to "Strongest Behavioral Traits" and "How I Work Best" / "How [Candidate] Works Best" while also saying "match existing structure", but the shipped file's headings are "Strongest Behaviors" and "How You Work Best", so an inferred trait either opened a duplicate near-identical section or was dropped. The companion to #519, which fixed the same drift in /reset's skeleton. Both bullets now name the shipped headings, and a derived test in each command's suite reads the quoted section names and requires each to be a ## heading of the shipped file; both fail on master.
This commit is contained in:
1 parent
895c02191d
commit
760bbc34cf
5 files changed
+65
-2
No files matched your search
@@ -10,6 +10,7 @@ on the drafter noticing. A real user (#420) ran `/setup` and then hand-edited bo
|
||||
files to close the gap.
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
@@ -90,6 +91,35 @@ class TemplatesStillCarryThePlaceholders(unittest.TestCase):
|
||||
self.assertIn("\\signature{[YOUR_NAME]}", text)
|
||||
|
||||
|
||||
class SetupPathAWritesIntoSectionsTheShippedFilesHave(unittest.TestCase):
|
||||
"""Step A7 named 02-behavioral-profile.md sections that do not exist.
|
||||
|
||||
"Strongest Behavioral Traits" and "How [Candidate] Works Best" are not
|
||||
headings in the shipped file ("Strongest Behaviors", "How You Work Best"
|
||||
are), so the "add only to these sections" rule pointed at nothing. The
|
||||
section names are read from the bullet and checked against the file's
|
||||
`##` headings, with the placeholder-free spelling required: a reader
|
||||
cannot match "[Candidate]" against a heading.
|
||||
"""
|
||||
|
||||
def test_behavioral_profile_bullet_names_real_headings(self):
|
||||
text = COMMAND.read_text(encoding="utf-8")
|
||||
bullet = next(
|
||||
line for line in text.splitlines()
|
||||
if line.startswith("- **`02-behavioral-profile.md`:**")
|
||||
)
|
||||
quoted = re.findall(r'"([^"]+)"', bullet)
|
||||
self.assertTrue(quoted, "the 02-behavioral-profile bullet must name its target sections")
|
||||
headings = {
|
||||
line[3:].strip()
|
||||
for line in (SKILL_DIR / "02-behavioral-profile.md").read_text(encoding="utf-8").splitlines()
|
||||
if line.startswith("## ")
|
||||
}
|
||||
for name in quoted:
|
||||
with self.subTest(section=name):
|
||||
self.assertIn(name, headings, f"02-behavioral-profile.md has no '## {name}' heading")
|
||||
|
||||
|
||||
class SetupPathAProjectsIngestion(unittest.TestCase):
|
||||
"""Guards for /setup Path A document ingestion of documents/projects/."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user