Commit graph

8 commits

Author SHA1 Message Date
Snider
fe70eb0ce1 docs: add Phase 2 StreamingBackend audit results to FINDINGS.md
Full audit of StreamingBackend usage across ecosystem:
- Only 2 callers (both in host-uk/cli, out of go-ml scope)
- All other consumers use Backend.Generate() (non-streaming)
- GenOpts vs GenerateConfig field comparison documented
- backend_mlx.go dead imports marked as FIXED (Phase 1)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 01:54:26 +00:00
Snider
898c4c228d docs: refine Phase 2 backend consolidation tasks with audit results
Based on comprehensive codebase analysis:
- Only 2 files use StreamingBackend (both in host-uk/cli)
- All other consumers use Backend.Generate() (non-streaming)
- Precise steps: type alias Message, extend GenOpts, deprecate StreamingBackend

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 01:53:27 +00:00
Snider
c3c2c14dba feat(backend): add HTTP/Llama TextModel wrappers + verify downstream
Phase 1 Steps 1.4 and 1.5 complete:

- HTTPTextModel wraps HTTPBackend as inference.TextModel (Generate/Chat
  yield entire response as single Token, Classify unsupported,
  BatchGenerate sequential)
- LlamaTextModel embeds HTTPTextModel, overrides ModelType -> "llama"
  and Close -> llama.Stop()
- 19 new tests (17 HTTPTextModel + 2 LlamaTextModel), all passing
- Verified service.go and judge.go downstream consumers unchanged
- Updated CLAUDE.md: backend_mlx.go DONE, architecture table current,
  critical context reflects Phase 1 complete
- Updated TODO.md: Steps 1.4 and 1.5 marked done

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 01:23:34 +00:00
Snider
a4d7686147 feat(adapter): bridge go-inference TextModel to ml.Backend/StreamingBackend
InferenceAdapter wraps inference.TextModel (iter.Seq[Token]) to satisfy
ml.Backend (string returns) and ml.StreamingBackend (TokenCallback).

- adapter.go: InferenceAdapter with Generate/Chat/Stream/Close
- adapter_test.go: 13 test cases with mock TextModel (all pass)
- backend_mlx.go: rewritten from 253 LOC to ~35 LOC using go-inference
- go.mod: add forge.lthn.ai/core/go-inference dependency
- TODO.md: mark Phase 1 steps 1.1-1.3 complete

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 00:52:34 +00:00
Snider
e7959720c5 docs: add go mod download note and clarify backend_mlx state
CLAUDE.md updated: first-run needs go mod download, backend_mlx.go
imports dead go-mlx subpackages (Phase 1 fixes this).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 00:40:00 +00:00
Snider
84757b8331 docs: comprehensive domain expert session brief for go-inference migration
Rewrites CLAUDE.md with full interface mapping (ml.Backend → inference.TextModel),
adapter design pattern, broken import context, and local dependency paths.

Expands TODO.md Phase 1 into 5 concrete steps with code patterns for
InferenceAdapter, backend_mlx.go rewrite, and downstream verification.

Updates FINDINGS.md with type correspondence table and before/after comparison.

Fixes go.mod replace directives for ~/Code/ layout and adds go-inference.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 21:55:50 +00:00
Virgil
88e926cc24 docs: add TODO.md, FINDINGS.md for fleet delegation
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 21:33:53 +00:00
Snider
7c8e762a86 feat: extract go-ml from go-ai as standalone ML package
Inference backends (MLX, llama.cpp, HTTP), scoring engine, agent
orchestrator, GGUF management, DuckDB storage, Parquet I/O.
Adds CLAUDE.md/TODO.md/FINDINGS.md.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 18:32:04 +00:00