Write learnings into the project’s agent-memory files (#980), replacing the
auto-generated marker section in each. AGENTS.md (the lean-ctx standard) is
created if absent; CLAUDE.local.md (Claude Code’s local memory) is updated
only when the project already keeps one, so a non-Claude project is never
littered with a file it did not ask for. Returns the file names written.