Documentation
¶
Overview ¶
Package sources discovers the instruction/memory/doc artifacts left by AI coding tools and humans (CLAUDE.md, .claude/, .cursor/rules, AGENTS.md, copilot/windsurf/aider configs, README, docs, ADRs) and records them as doctrine *candidates*.
Principle: these are EVIDENCE, not truth. Each source is scoped to the directory it governs and carries recency, so memcode can tell when a source is likely stale relative to the code it describes. Turning candidates into current doctrine — and reconciling conflicts — is the reducer's job (`learn`).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Source ¶
type Source struct {
Kind string `json:"kind"` // claude | cursor | codex/agents | copilot | windsurf | aider | readme | docs
Path string `json:"path"` // relative to repo root
Scope string `json:"scope"` // directory it governs ("." = whole repo)
Bytes int64 `json:"bytes"`
ModTime time.Time `json:"mod_time"`
GitDate string `json:"git_date"` // last commit date touching it (YYYY-MM-DD)
Stale bool `json:"stale"` // code in scope changed after this last did
StaleReason string `json:"stale_reason,omitempty"`
}
Source is one discovered evidence document.
func Discover ¶
Discover returns every recognized source document among the project's non-ignored files (so vendored/cached/gitignored files never count). Tracked AI-config files (CLAUDE.md, .claude/*, .cursor/rules) are included; purely local-ignored ones are not.