Coding Agent 指令應放在程式碼庫還是工具中?
Agent instructions: in the repo or in the tool?
Coding Agent 的常設規則可放在程式碼庫或執行 Agent 的工具中:前者有版本紀錄並可供團隊檢視,後者則可跨專案使用,但設定不易被察覺,也可能與個別程式碼庫的規則衝突。Styx 在工具中內置多種工作指引,並以專案本身的設計系統和規則為先;兩者不一致時,應以程式碼庫為準。
There are two places to put the standing rules you want a coding agent to follow: in a file in the repo, or built into the tool that runs the agent. I've ended up with both, and they trade off differently.
In the repo, the rules are versioned. They show up in pull requests, the whole team sees them, and they travel with a clone. The cost is that you write and maintain them per project, and they're only as good as the last person who edited them.
In the tool, they work in every project and for every agent with no setup. The cost is that they're invisible: nobody reviews a diff of them, and they can clash with how a particular repo does things.
Styx does the second kind. It builds in guidance from a few public repos: Ponytail for coding, Impeccable for interfaces, design-critique for reviewing a design, and architecture-designer for system design. Only the core rules are included, each applies only to that kind of work, and your project's own design system and rules come first.
That last part is the rule I'd defend: when the two disagree, the repo wins, because it knows the project and the tool doesn't.
Do you agree, or do you let the tool override the repo?
來源:DEV Community · dev.to