memory

package
v1.14.0 Latest Latest
Warning

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

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

Documentation

Overview

ABOUTME: Project memory scanner for cross-session context awareness ABOUTME: Detects project type, build/test commands, and structure; persists to .hex/project.json

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStale

func IsStale(proj *ProjectInfo, maxAge time.Duration) bool

IsStale returns true if the project info is older than maxAge

func Save

func Save(hexDir string, proj *ProjectInfo) error

Save persists project info to hexDir/project.json

Types

type ProjectInfo

type ProjectInfo struct {
	Language     string   `json:"language"`
	BuildCommand string   `json:"build_command,omitempty"`
	TestCommand  string   `json:"test_command,omitempty"`
	Structure    []string `json:"structure,omitempty"`
	DetectedAt   string   `json:"detected_at"`
}

ProjectInfo holds detected project metadata

func DetectProject

func DetectProject(dir string) (*ProjectInfo, error)

DetectProject scans a directory and detects project characteristics

func Load

func Load(hexDir string) (*ProjectInfo, error)

Load reads project info from hexDir/project.json

func (*ProjectInfo) ToPromptContext

func (p *ProjectInfo) ToPromptContext() string

ToPromptContext generates a brief context string for the system prompt

Jump to

Keyboard shortcuts

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