Skip to content

Add a rule against unrequested edits to adjacent code - #731

Open
Lockyer228 wants to merge 1 commit into
DietrichGebert:mainfrom
Lockyer228:fix/640-surgical-changes
Open

Add a rule against unrequested edits to adjacent code#731
Lockyer228 wants to merge 1 commit into
DietrichGebert:mainfrom
Lockyer228:fix/640-surgical-changes

Conversation

@Lockyer228

Copy link
Copy Markdown

Why

ponytail: and the repo's own AGENTS.md are explicit that agents must not "improve" adjacent code while fixing a bug — but the skill's Rules never said it. The result is the exact drift the issue names: unrequested edits to neighboring code, comments, or formatting riding along with a real fix.

What

Add a surgical changes rule to the Rules section of AGENTS.md and skills/ponytail/SKILL.md:

  • touch only what you were asked to touch
  • don't "improve" adjacent code, comments, or formatting; match the style that's there
  • remove only what your change orphaned; mention unrelated dead code instead of deleting it

Propagated byte-identically to the seven adapter copies (.cursor, .windsurf, .clinerules, .agents, .qoder, .github/copilot-instructions, .kiro), per check-rule-copies.js, and regenerated the .openclaw/ skill.

Tests

  • node scripts/check-rule-copies.js → exit 0 (9 rule invariants intact, no existing rule reworded)
  • node --test tests/openclaw-skills.test.js → 18/18
  • npm test → all pass except the pre-existing csv: correct pandas one-liner passes failure, which fails identically on the base commit (no pandas installed locally) — unrelated to this change.

Fixes #640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a rule against unrequested edits to adjacent code

1 participant