Documentation
¶
Overview ¶
Package memdir loads the two on-disk memory files that seed the agent's system prompt at session start:
- <workdir>/EVVA.md project memory — repo conventions, hot facts
- <evvaHome>/USER_PROFILE.md user memory — preferences, working style
Both files are optional. Missing files yield a zero-value Snapshot field and no warning; the prompt builder skips empty sections cleanly. Any non-missing read failure (permission, oversize) is recorded in Snapshot.Warnings — Load itself never returns an error so the agent can always boot.
This package depends only on stdlib. It is not imported by the sysprompt package; the caller threads Snapshot.ProjectMemory / .UserProfile into the prompt context, keeping the dependency arrow one-way.
Index ¶
Constants ¶
const ( ProjectMemoryFile = "EVVA.md" UserProfileFile = "USER_PROFILE.md" )
File names. Exposed so other packages (Phase 9 user-profile background agent, future /memory slash commands) can write to the same paths without re-spelling them.
const MaxFileBytes = 64 * 1024
MaxFileBytes caps each memory file at 64 KiB. Past that the user is almost certainly using EVVA.md for the wrong thing (knowledge base, not conventions doc); we truncate and warn rather than refuse outright so a bloated file doesn't break the session.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshot ¶
type Snapshot struct {
ProjectMemory string // raw contents of <workdir>/EVVA.md
UserProfile string // raw contents of <evvaHome>/USER_PROFILE.md
Warnings []string // non-fatal: oversize-truncation, permission errors
}
Snapshot is one session's view of the two memory files. Either body field may be empty when the file is missing, empty, or unreadable; callers treat empty as "skip the section."