fix: preserve functional data (URLs, paths, commands) from shrink#261
fix: preserve functional data (URLs, paths, commands) from shrink#261pkking wants to merge 2 commits into
Conversation
Problem: ponytail-review's shrink tag treated URLs as decoration and stripped protocol prefixes (https://), breaking clickability. Fix: - Add explicit rule in ponytail SKILL.md: Never shrink functional data - Add explicit rule in ponytail-review SKILL.md: Functional strings are executable data, not decoration - Add example showing correct URL preservation - Add test suite verifying rules exist in both skills All 3 tests pass.
|
@DietrichGebert could you please take a look this PR :) |
DietrichGebert
left a comment
There was a problem hiding this comment.
Thanks for this, the rule itself is correct. The problem is that it only landed in 2 of the files that carry this content, so the other integrations are now out of parity and the test suite goes red. I checked the branch out and ran it to confirm.
Blocking: npm test fails (4 new failures)
The canonical skill bodies changed, but the generated OpenClaw copies were not regenerated, so tests/openclaw-skills.test.js fails:
x ponytail: committed OpenClaw skill matches the generator
x ponytail: body is the canonical skills/ponytail body, verbatim
x ponytail-review: committed OpenClaw skill matches the generator
x ponytail-review: body is the canonical skills/ponytail-review body, verbatim
main is 54 pass / 2 fail, this branch is 50 pass / 6 fail. (The 2 pre-existing email and csv failures are unrelated to this PR.)
Fix: run node scripts/build-openclaw-skills.js and commit the regenerated .openclaw/skills/ponytail/SKILL.md and .openclaw/skills/ponytail-review/SKILL.md.
Blocking: the new tests never run
package.json runs node --test tests/*.test.js (plural tests/), but the new file is at test/functional-data.test.js (singular test/). npm test does not pick it up, so the 3 tests only pass when run by hand. Please move it to tests/functional-data.test.js.
Parity: the rule is missing from the rest of the surface
The shrink: tag and the "When NOT to be lazy" carve-out are duplicated across the integration files. The fix currently reaches only skills/ponytail/SKILL.md and skills/ponytail-review/SKILL.md. The same content still lives in:
shrink: tag (the exact "same logic, fewer lines" text this PR identifies as the root cause):
skills/ponytail-audit/SKILL.md:23(audit defines the identical tag, still unguarded)commands/ponytail-review.toml:2andcommands/ponytail-audit.toml:2.opencode/command/ponytail-review.md:5and.opencode/command/ponytail-audit.md:5
"Not lazy about" carve-out (home of the base rule):
AGENTS.md:30, then re-sync its 6 byte-equal mirrors socheck-rule-copies.jsstays green:.cursor/rules/ponytail.mdc,.windsurf/rules/ponytail.md,.clinerules/ponytail.md,.agents/rules/ponytail.md,.github/copilot-instructions.md,.kiro/steering/ponytail.md- optional: the hardcoded fallback string in
hooks/ponytail-instructions.js
The Claude hook, Pi extension, and MCP server read skills/ponytail/SKILL.md at runtime, so those need no change.
Suggested order
- Add the rule to
skills/ponytail-audit/SKILL.mdandAGENTS.md, then propagate theAGENTS.mdbody into the 6 mirrors. - Tighten the
shrinkwording in the 4 command prompts. - Run
node scripts/build-openclaw-skills.jsto refresh every OpenClaw copy. - Move the test into
tests/. npm testshould be back to 54 pass / 2 fail.
…claw, move test - Add 'Never shrink functional data' rule to AGENTS.md + 6 mirrors - Add rule to skills/ponytail-audit/SKILL.md Boundaries section - Tighten shrink wording in 4 command prompts (commands/*.toml, .opencode/command/*.md) - Regenerate .openclaw/skills/ via build-openclaw-skills.js - Move test/functional-data.test.js to tests/ so npm test picks it up
|
@DietrichGebert fixed :) |
Problem
The
shrinktag in ponytail-review treated URLs as decoration and stripped protocol prefixes (https://), breaking clickability in editors/terminals.Example: A 7-line comment with full URLs was shrunk to 2 lines with incomplete URLs like
alibabacloud.com/help/...instead ofhttps://www.alibabacloud.com/help/....Root Cause
The
shrinktag definition said "same logic, fewer lines" but didn't distinguish between:Solution
Added explicit rules to both
ponytailandponytail-reviewskills:ponytail/SKILL.md
Added to "When NOT to be lazy" section:
ponytail-review/SKILL.md
Added to "Boundaries" section:
examples/functional-data.md
Added example demonstrating correct behavior:
test/functional-data.test.js
Added test suite verifying:
All 3 tests pass.
Changes
skills/ponytail/SKILL.md: Added rule to "When NOT to be lazy" sectionskills/ponytail-review/SKILL.md: Added rule to "Boundaries" sectionexamples/functional-data.md: New example file (correct behavior)test/functional-data.test.js: New test file (3 tests, all passing)Impact
This prevents future instances of ponytail-review suggesting to shrink functional data (URLs, paths, commands) in the name of brevity, while preserving the core principle of aggressive code simplification.
Net: +90 lines (documentation + tests), but prevents broken URLs and improves clarity about what can/cannot be shrunk.