Define builtin content-policy rules by function instead of vocabulary - #116
Merged
Conversation
Move the content-policy baseline text out of a string literal in config.rs into src/builtin-content-policy.md, pulled in at compile time with include_str!. The embedded bytes are identical to the previous literal, so review prompts are unchanged.
Rules 5 and 6 of the builtin content policy previously enumerated specific words and phrases, which drift as model generations change their vocabulary. Both rules now state the functional test (information-free prose, claim inflation, manufactured rhetoric, redundant restatement, templated uniformity, time-dependent truth) with examples marked illustrative rather than exhaustive. The scope section also states that repo-appended rules may declare their own narrower scope, such as applying only to a blog directory. Severity annotations and the three-per-file threshold are unchanged.
The prompt shares one token budget with the batched diff, so policy text size shifts batch windowing on large diffs; the hermetic bench pins that behavior. The functional rewrite now fits within the windowing tolerance while keeping every rule's test and severity.
There was a problem hiding this comment.
- PR description falsely claims byte-identical content in pull request description: The description says the new file is "byte-identical to the previous literal," but the diff rewrites rule 5 (line 9 of builtin-content-policy.md replaces the colon-plus-examples list with a functional test), rule 6 (line 11 replaces fixed vocabulary with functional categories), and the Scope section (line 13 adds a sentence about repo-appended narrower scopes). The same description later acknowledges "this changes prompt text," directly contradicting the byte-identical claim. Remove the byte-identical claim from the description, or revert the markdown text to actually match the old literal. The bench-live gate already confirms the prompt changed.
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.
Moves the builtin content-policy baseline out of a config.rs string literal into src/builtin-content-policy.md, embedded at compile time with include_str!. Rules 5 and 6 state functional tests (information-free prose, claim inflation, manufactured rhetoric, redundant restatement, templated uniformity, time-dependent truth) with examples marked illustrative rather than exhaustive, so the policy does not go stale as model vocabularies shift, and the scope section lets repo-appended rules declare a narrower path scope such as a blog directory. Severities and the three-per-file threshold are unchanged, and the policy text stays within the prompt-size tolerance the hermetic bench pins for batched huge-diff windowing.