diff --git a/llm.txt b/llm.txt new file mode 100644 index 0000000..0c8d922 --- /dev/null +++ b/llm.txt @@ -0,0 +1,41 @@ +# core/go — CoreGO DI Framework + +> dappco.re/go/core — Dependency injection, service lifecycle, and message-passing +> framework for Go. Foundation layer for the Lethean ecosystem. + +## Entry Points + +- CLAUDE.md — Agent instructions, build commands, architecture overview +- docs/RFC.md — API contract specification (start here for the full spec) + +## Package Layout + +- pkg/core/ — The Core struct: DI container, service registry, lifecycle, IPC +- No subpackages — everything is in the root core package + +## Key Types + +- Core — Central application container (created via core.New()) +- Option — Single key-value pair {Key: string, Value: any} +- Options — Collection of Option with typed accessors +- Result — Universal return type {Value: any, OK: bool} +- Service — Managed component with lifecycle (Startable/Stoppable) +- Message — IPC message interface for ACTION/QUERY/PERFORM + +## Service Pattern + +Services register via factory functions: + + core.New( + core.WithService(mypackage.Register), + ) + + func Register(c *core.Core) core.Result { + svc := &MyService{runtime: core.NewServiceRuntime(c, opts)} + return core.Result{Value: svc, OK: true} + } + +## Conventions + +Follows RFC-025 Agent Experience (AX) principles. +See: https://core.help/specs/RFC-025-AGENT-EXPERIENCE/