memory

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProjectMemoryFilename = "GGCODE.md"

Variables

View Source
var ProjectMemoryFilenames = []string{
	"GGCODE.md",
	"AGENTS.md",
	"CLAUDE.md",
	"COPILOT.md",
}

ProjectMemoryFilenames lists the supported project bootstrap documents in priority order.

Functions

func GenerateProjectMemory

func GenerateProjectMemory(root string) (string, error)

GenerateProjectMemory builds a GGCODE.md document using the current repo state.

func LoadProjectMemory

func LoadProjectMemory(workingDir string) (content string, files []string, err error)

LoadProjectMemory reads supported project bootstrap documents from global, project root, and subdirectories. Merge order: global -> walked parents -> nested subdirectories.

func ResolveProjectMemoryInitTarget

func ResolveProjectMemoryInitTarget(workingDir string) (targetPath string, existingFiles []string, err error)

ResolveProjectMemoryInitTarget returns the preferred directory and file path for creating a new project memory file from the current working directory.

Types

type AutoMemory

type AutoMemory struct {
	// contains filtered or unexported fields
}

AutoMemory manages automatic memory persistence in ~/.ggcode/memory/.

func NewAutoMemory

func NewAutoMemory() *AutoMemory

NewAutoMemory creates an AutoMemory instance.

func (*AutoMemory) Clear

func (am *AutoMemory) Clear() error

Clear removes all memory files.

func (*AutoMemory) Dir

func (am *AutoMemory) Dir() string

Dir returns the memory directory path.

func (*AutoMemory) List

func (am *AutoMemory) List() ([]string, error)

List returns all memory keys.

func (*AutoMemory) LoadAll

func (am *AutoMemory) LoadAll() (string, []string, error)

LoadAll loads all memory files and returns their combined content.

func (*AutoMemory) SaveMemory

func (am *AutoMemory) SaveMemory(key, content string) error

SaveMemory saves a memory entry to ~/.ggcode/memory/{key}.md.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL