Replace internal task tracking (TODO.md, FINDINGS.md) with structured documentation in docs/. Trim CLAUDE.md to agent instructions only. Co-Authored-By: Virgil <virgil@lethean.io>
1.6 KiB
1.6 KiB
CLAUDE.md
What This Is
Shared inference interfaces for the Core Go ecosystem. Module: forge.lthn.ai/core/go-inference
Zero dependencies. Compiles on all platforms. See docs/architecture.md for design rationale.
Commands
go test ./... # Run all tests
go vet ./... # Vet
Stability Rules
This package is the shared contract. Changes here affect go-mlx, go-rocm, and go-ml simultaneously.
- Never change existing method signatures on
TextModelorBackend - Only add methods when two or more consumers need them
- Prefer new interfaces that embed
TextModelover extendingTextModelitself - New fields on
GenerateConfigorLoadConfigare safe (zero-value defaults) - All new interface methods require Virgil approval before merging
Coding Standards
- UK English
- Zero external dependencies — stdlib only (testify permitted in tests)
- Conventional commits:
type(scope): description - Co-Author:
Co-Authored-By: Virgil <virgil@lethean.io> - Licence: EUPL-1.2
Consumers
- go-mlx: implements
Backend+TextModelfor Apple Metal (darwin/arm64) - go-rocm: implements
Backend+TextModelfor AMD ROCm (linux/amd64) - go-ml: wraps inference backends into scoring engine, adds llama.cpp HTTP backend
- go-ai: MCP hub, exposes inference via MCP tools
- go-i18n: uses
TextModelfor Gemma3-1B domain classification
Documentation
docs/architecture.md— interfaces, registry, options, design decisionsdocs/development.md— prerequisites, build, test patterns, coding standardsdocs/history.md— completed phases, commit log, known limitations