skills(writing-user-outputs): document the stderr half of the anstream macro rule - #3797
Open
worktrunk-bot wants to merge 1 commit into
Open
skills(writing-user-outputs): document the stderr half of the anstream macro rule#3797worktrunk-bot wants to merge 1 commit into
worktrunk-bot wants to merge 1 commit into
Conversation
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.
Skill drift.
writing-user-outputsis the thing loaded before editing anything that produces user-visible strings, and its "Printing output" section states only the stdout half of a two-sided rule — whichprintln!is in scope, and theBrokenPipepanic that turns on it. The stderr half is absent, even though ec0f3a3 (#3771) made it structural:check_stderr_macros_come_from_stylingnow requires every bareeprint!/eprintln!undersrc/to resolve to anstream's.The gap is exactly the mistake #3771 fixed in five files. A developer following the skill's own example import —
use worktrunk::styling::{eprintln, println, stderr};— and then reaching foreprint!mid-block gets std's macro, which keeps ANSI on a redirected stderr where theeprintln!two lines up drops it. The skill never nameseprint!at all, and #3771's commit message notes the suite cannot catch this:CLICOLOR_FORCE=1forces color on both printers, so every snapshot agrees whichever macro is in scope.One paragraph, placed directly after the
println!one it mirrors: the stripping asymmetry and its user-visible symptom, thateprint!is the half that slips and why, the two ways to satisfy the rule (import, or qualify asstyling::eprintln!(…)), the guard test that enforces it, and thatSTD_STDERR_ALLOWED_PATHSexempts whole files rather than calls.No regression test — the change is skill prose. The behavior it describes is already pinned by
check_stderr_macros_come_from_stylingandtest_stderr_narration_strips_ansi_when_piped; what was missing is that a developer reads the rule before tripping the guard rather than after.