go-dependency-direction
Dependency direction in Go
Activation in Kilo
Kilo includes the skill description in the prompt and loads the full body on demand when a task clearly matches (writing, refactoring, or reviewing Go, package layout, interfaces, layering, etc.).
Force it by name: "use go-dependency-direction" or "apply the dependency direction rules".
Temporarily off: say stop go-dependency-direction / normal mode / ignora las reglas de dependencias — then write ordinary Go. Resume with go-dd on / aplica las reglas de dependencias.
After editing this file, run /reload (or start a new session).
The import graph is the architecture. Directory names (domain/, usecase/, infrastructure/) are decoration. A package called domain that imports the one holding your database pool is infrastructure code wearing a label.
Every layout decision reduces to one question: which package is permitted to know that another exists?
Interfaces are declared by the caller
Put the interface in the package that invokes it, listing only the methods that package invokes. Declaring it beside the implementation forces every caller to import the provider, and any signature change there ripples outward to all of them.