Wordwrap a string with ANSI escape codes
100
Pending
Does it follow best practices?
Impact
100%
1.04xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses wrap-ansi's trim configuration option to control whitespace handling in wrapped text. The focus is on correctly applying the trim option to achieve clean and preserve whitespace modes as specified in the problem.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses wrapAnsi function",
"description": "Imports and uses the wrapAnsi function from the wrap-ansi package as the core wrapping mechanism",
"max_score": 15
},
{
"name": "Implements clean mode",
"description": "Correctly implements clean mode (default behavior) by either omitting the trim option or explicitly setting trim: true in the options object passed to wrapAnsi",
"max_score": 20
},
{
"name": "Implements preserve mode",
"description": "Correctly implements preserve mode by setting trim: false in the options object passed to wrapAnsi to preserve all whitespace",
"max_score": 20
},
{
"name": "Maps options correctly",
"description": "Properly maps the spec's preserveWhitespace option to wrap-ansi's trim option with inverted logic (preserveWhitespace: true maps to trim: false, and preserveWhitespace: false or undefined maps to trim: true)",
"max_score": 25
},
{
"name": "Passes columns parameter",
"description": "Correctly passes the columns parameter to wrapAnsi as the second argument to control the wrapping width",
"max_score": 10
},
{
"name": "Returns wrapped result",
"description": "Returns the result from wrapAnsi directly or with minimal processing, allowing wrap-ansi to handle ANSI codes and whitespace according to the trim setting",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10