chore(validate): drop the local prompt-duplication rule, the engine owns it - #36
Merged
Merged
Conversation
…wns it validate_content.py carried its own "prompt equals sentence or title" rule (#26), a second implementation of the engine's W-PROMPT-DUP (engine#169), which compares the same two pairs after trimming and Unicode NFC normalisation where the local one only stripped whitespace. Two implementations of one rule drift apart; content rules about lessons and manifests belong to the engine. Takes the template's validate_content.py, test_hint_length_rule.py and docs/LESSON-FORMAT.md (which also brings the English and single-character hint-length forms) and removes tests/test_prompt_duplication_rule.py. The engine reports no W-PROMPT-DUP in this repository today, so nothing that was caught before goes unreported. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Worum es geht
scripts/validate_content.pytrug eine eigene Regel „Prompt gleich Satz oder gleich Schritt-Titel“ (#26). Das ist eine zweite Implementierung vonW-PROMPT-DUPaus der Engine (astrapi69/learn-content-engine#169). Die Engine vergleicht dieselben zwei Paare, normalisiert aber mit Trim und Unicode-NFC; die lokale Regel entfernte nur Leerraum. Zwei Implementierungen einer Regel laufen auseinander, und Inhaltsregeln über Lektionen und Manifeste gehören der Engine.Was sich ändert
scripts/validate_content.py,tests/test_hint_length_rule.pyunddocs/LESSON-FORMAT.mdauf dem Stand des Templates (bringt nebenbei die englischen Zahlwörter und die Formen für Antwortlänge 1 in der Hinweislängen-Regel mit);tests/test_prompt_duplication_rule.pyentfällt.Geht etwas verloren?
Nein. Die Engine meldet in diesem Repo heute null
W-PROMPT-DUP(Engine-Lauf mit--warningsgeprüft; er meldet andere Warnungen, der Lauf funktioniert also). Was die lokale Regel fing, meldet die Engine weiterhin, nur als Warnung. Soll eine Warnung blockieren, ist das eine Entscheidung im Warn-Schritt (accepted_warningsin.github/quality-state.json), keine zweite Regel.Nachtrag: warum das Streichen hier nicht vorschnell ist
Gemessen am 2026-09-24 mit Engine 0.28.0 (dieses Repo pinnt noch 0.27.0, das
W-CLOZE-NO-CARRIERnicht kennt):W-PROMPT-DUPW-CLOZE-NO-CARRIERpicture_choice)Im Hub treten Prompt-Dopplung und fehlender Trägersatz fast immer zusammen auf, dort passt die Vermutung einer gemeinsamen Generator-Ursache. In diesem Repo treten die beiden Muster unabhängig voneinander auf: 57 Cloze ohne Trägersatz, aber keine einzige Prompt-Dopplung. Die lokale Regel hat hier also nichts gefunden, was die Engine nicht auch meldet, und das Streichen verschiebt keinen Befund. Die 57 Cloze werden im Inhaltsdurchgang dieses Repos korrigiert (Option A: ausmustern und neu minten).
Lokal:
validate_content.py(4 Sets) undpytest(216 bestanden) grün; die Eigentümer-Prüfung meldet danach nichts mehr.🤖 Generated with Claude Code