How forgeprint/forgelore works
Forgelore is a local-first memory system for coding agents: it captures fixes and dead ends, fingerprints later errors, and returns matching memories only when useful. The main path is agent hook or CLI input → error fingerprinting → record lookup → budgeted hint and measurement. Users can also record and review proposals, search then fetch details, share approved memories with a team, and connect through MCP. The graph reflects documented capabilities and shown calls; unsampled subsystem links are omitted rather than inferred.
Components 19
Capture and Recall
- CLI Router
cmd/forgelore/main.go - Event Hooks
cmd/forgelore/hook.go - Error Fingerprinting
internal/fingerprint - Record Capture
cmd/forgelore/record.go - Proposal Review
internal/candidate/candidate.go
Memory and Access
- Configuration
internal/config/config.go - Record Model
internal/record/record.go - Record Store
internal/store/store.go - Search Index
internal/store/index.go - Search and Show
cmd/forgelore/search.go
Agent Integrations
- Agent Mappings
internal/agent/mapping.go - MCP Server
internal/mcp/server.go - MCP Tools
internal/mcp/tools.go
Sharing and Measurement
- Team Operations
cmd/forgelore/team.go - Maintenance
cmd/forgelore/maintenance.go - Measurement Ledger
internal/measure/ledger.go - Measurement Reports
cmd/forgelore/report.go
Other components
- Developer
- Coding Agent
Connections 29
- Developer → CLI Router: runs commands
README.md - Coding Agent → Event Hooks: fires events
README.md - CLI Router → Event Hooks: runs hooks
- Event Hooks → Agent Mappings: translates events
- Event Hooks → Error Fingerprinting: fingerprints errors
cmd/forgelore/hook.go - Event Hooks → Record Store: looks up records
cmd/forgelore/hook.go - Event Hooks → Configuration: loads settings
cmd/forgelore/hook.go - Event Hooks → Measurement Ledger: logs lookups
cmd/forgelore/hook.go - CLI Router → Record Capture: records fixes
README.md - Record Capture → Error Fingerprinting: fingerprints errors
cmd/forgelore/record.go - Record Capture → Record Model: builds records
cmd/forgelore/record.go - Record Capture → Record Store: writes records
- CLI Router → Search and Show: searches memories
README.md - Search and Show → Search Index: queries index
cmd/forgelore/search.go - Search and Show → Record Store: fetches details
cmd/forgelore/search.go - Record Store → Record Model: reads and writes
internal/store/store.go - Search Index → Record Model: indexes records
internal/store/index.go - CLI Router → Team Operations: manages sharing
README.md - Team Operations → Record Store: promotes records
cmd/forgelore/team.go - Team Operations → Record Model: marks taint
cmd/forgelore/team.go - CLI Router → Maintenance: checks store
README.md - CLI Router → Measurement Reports: reports savings
README.md - Measurement Reports → Measurement Ledger: reads ledger
cmd/forgelore/report.go - CLI Router → MCP Server: serves MCP
README.md - MCP Server → MCP Tools: dispatches calls
internal/mcp/server.go - MCP Tools → Record Store: reads memories
internal/mcp/tools.go - MCP Tools → Error Fingerprinting: recalls errors
internal/mcp/tools.go - MCP Tools → Proposal Review: proposes records
internal/mcp/tools.go - MCP Tools → Measurement Ledger: logs lookups
internal/mcp/tools.go