Documentation
¶
Overview ¶
Package context provides CONTEXT.md generation for agent onboarding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(analysis *docs.RepoAnalysis, history *GitHistory, scanState *state.ScanState, w io.Writer) error
Generate writes a CONTEXT.md to w based on analysis, git history, and scan state. scanState may be nil if no previous scan exists.
Types ¶
type AuthorStats ¶
AuthorStats tracks commit count per contributor.
type CommitSummary ¶
type CommitSummary struct {
Hash string
Message string
Author string
Date time.Time
Files int // number of files changed
}
CommitSummary holds metadata about a single commit.
type GitHistory ¶
type GitHistory struct {
RecentWeeks []WeekActivity
TopAuthors []AuthorStats
TotalCommits int
}
GitHistory holds aggregated git log analysis.
func AnalyzeHistory ¶
func AnalyzeHistory(repoPath string, weeks int) (*GitHistory, error)
AnalyzeHistory walks the git log and groups commits by week. weeks controls how many weeks of history to include (default: 4).
type WeekActivity ¶
type WeekActivity struct {
WeekStart time.Time
Commits []CommitSummary
}
WeekActivity groups commits by ISO week.
Click to show internal directories.
Click to hide internal directories.