From 08e0085ca971f59da8b3ecda532ffe6203b6c68c Mon Sep 17 00:00:00 2001 From: "Anderson A. Giacomolli" Date: Fri, 6 Nov 2026 14:29:18 -0300 Subject: [PATCH] Move shared code to a file of its own Code that gets a user in another file for an unrelated purpose moves to a file named for its function in the same change. The file rules covered only new code, and the rule against unrelated changes made an agent leave a shared helper in the file of its first user, where it hid a dependency of the new caller. --- .agents/skills/go-code/SKILL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.agents/skills/go-code/SKILL.md b/.agents/skills/go-code/SKILL.md index 6b5a0ce..a9e705b 100644 --- a/.agents/skills/go-code/SKILL.md +++ b/.agents/skills/go-code/SKILL.md @@ -13,6 +13,8 @@ description: Go style rules. Use before you write or review Go code. function. Do not create `main_test.go`. - A file carries its own context. Keep each struct and all of its methods in one file. Give a separate responsibility its own type. +- When code in one file gets a user in another file for an unrelated + purpose, move it to a file named for its function in the same change. - Put entry points first, then each struct's methods as a group, then standalone utility functions. Do not put a utility function between the methods of one type. -- 2.53.0