Documentation
¶
Index ¶
Constants ¶
const ( Filename = "COMMITBRIEF.md" OutputFilename = "OUTPUT.md" LocalSubdir = ".commitbrief" )
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(rulesLoaded Loaded, langRes lang.Resolution) (system, userTpl string)
Build assembles the system prompt from the user's review rules and then appends the fixed severity rubric, the JSON-contract response format, the language directive, and the prompt-injection guard. ADR-0014 §1-2 govern the prompt shape — the LLM's only output channel is the JSON findings document; OUTPUT.md no longer participates in prompt construction (it has become a client-side renderer template).
Types ¶
type Loaded ¶
func DefaultOutput ¶
func DefaultOutput() Loaded
func LoadOutput ¶
LoadOutput resolves the output-format template through a three-tier fallback: repo-local (<repoRoot>/.commitbrief/OUTPUT.md) → user-level (<userHome>/.commitbrief/OUTPUT.md) → binary-embedded default. Both path segments are gitignored by `commitbrief setup --local`, so the override is per-user rather than team-shared — output convention is considered a personal preference; team-shared review content stays in COMMITBRIEF.md.
Pass userHome == "" to skip the user-level layer (test injection); the CLI passes os.UserHomeDir() as resolved at startup.