Documentation
¶
Overview ¶
Package bugpriors mines recent fix-shaped commit messages from the repository's git log and renders them as a short prompt section.
The goal is to give the deep-review prompt a codebase-specific prior: instead of hunting for generic bug patterns, the reviewer learns the actual failure classes this repo has shipped. The output is plain text ready to splice into a prompt; Extract returns "" on any error (missing git, shallow clone, no commits) so a bug-priors miss never fails a review.
Index ¶
Constants ¶
const DefaultLookback = 30
DefaultLookback is the number of commits the extractor scans by default. Roughly two weeks of activity for a single-author codebase, long enough to surface recurring bug classes without burying the most-recent failures.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
Extract runs `git log -n <lookback> --pretty=%s` in repoRoot, filters to fix-shaped subjects, dedupes, caps, and returns a rendered prompt section. Returns "" on any failure or when no matches survive — callers should treat empty as "no priors available" and skip injection.
Calls never propagate git errors: missing git binary, shallow clone, no commits, non-zero exit — all return ("", nil).
Types ¶
This section is empty.