No description
Find a file
Snider 42fc6fa931 feat(rfc): Pass Two — 8 architectural findings
P2-1: Core struct fully unexported — export bricks, hide safety
P2-2: Fs.root correctly unexported — security boundaries are the exception
P2-3: Config.Settings untyped map[string]any — needs ConfigVar[T] or schema
P2-4: Global assetGroups outside conclave — bootstrap problem, document boundary
P2-5: SysInfo frozen at init() — cached values override test env (known bug)
P2-6: ErrorPanic.onCrash unexported — monitoring can't wire crash handlers
P2-7: Data.mounts unexported — should embed Registry[*Embed]
P2-8: Logging timing gap — global logger unconfigured until New() completes

New rule: export the bricks, hide the safety mechanisms.
Security boundaries (Fs.root) are the ONE exception to Lego Bricks.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-25 12:35:04 +00:00
.claude chore: save LocaleProvider and Locales changes 2026-03-17 01:45:42 +00:00
.core feat: add .core/ build and release configuration 2026-03-06 17:40:40 +00:00
.githooks chore(githooks): fix pre-commit QA 2026-02-05 22:07:14 +00:00
.github/workflows fix: strip module prefix from coverage paths for Codecov 2026-03-21 09:16:24 +00:00
docs feat(rfc): Pass Two — 8 architectural findings 2026-03-25 12:35:04 +00:00
testdata feat: inline tests + Fs zero-value fix + coverage 76.9% → 82.3% 2026-03-22 13:30:01 +00:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:52 +00:00
.gitattributes feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
.gitignore chore: ignore workspace and IDE dirs 2026-03-15 10:21:42 +00:00
.mcp.json chore: save LocaleProvider and Locales changes 2026-03-17 01:45:42 +00:00
app.go feat: App struct with New(Options) + Find() as method 2026-03-24 22:09:02 +00:00
app_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
array.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
array_test.go feat: inline tests + Fs zero-value fix + coverage 76.9% → 82.3% 2026-03-22 13:30:01 +00:00
CLAUDE.md docs: rewrite CLAUDE.md for current API, remove stale AGENTS.md 2026-03-21 10:07:05 +00:00
cli.go wip: checkpoint before v0.3.3 parity rewrite 2026-03-24 22:09:02 +00:00
cli_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
command.go fix: Result.New handles (value, error) pairs correctly + embed test fixes 2026-03-24 22:09:02 +00:00
command_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
config.go feat: New() constructors for Config, Fs + simplify contract.go init 2026-03-24 22:09:02 +00:00
config_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
contract.go fix: shutdown context, double IPC registration 2026-03-24 22:28:15 +00:00
contract_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
core.go fix: shutdown context, double IPC registration 2026-03-24 22:28:15 +00:00
core_test.go test: add _Bad/_Ugly tests + fix per-Core lock isolation 2026-03-24 22:44:48 +00:00
data.go fix: Result.New handles (value, error) pairs correctly + embed test fixes 2026-03-24 22:09:02 +00:00
data_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
drive.go fix: Result.New handles (value, error) pairs correctly + embed test fixes 2026-03-24 22:09:02 +00:00
drive_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
embed.go feat: Options struct + Result methods + WithOption convenience 2026-03-24 22:09:02 +00:00
embed_test.go fix: Result.New handles (value, error) pairs correctly + embed test fixes 2026-03-24 22:09:02 +00:00
error.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
error_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
fs.go feat: New() constructors for Config, Fs + simplify contract.go init 2026-03-24 22:09:02 +00:00
fs_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
go.mod refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
go.sum refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
i18n.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
i18n_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
info.go feat: add core.Path() + core.Env() fallthrough + PathGlob/PathIsAbs/CleanPath 2026-03-22 09:50:50 +00:00
info_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
ipc.go feat: New() constructors for Config, Fs + simplify contract.go init 2026-03-24 22:09:02 +00:00
ipc_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
LICENSE.txt Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
llm.txt feat: add llm.txt — agent entry point for CoreGO framework 2026-03-25 10:52:55 +00:00
lock.go test: add _Bad/_Ugly tests + fix per-Core lock isolation 2026-03-24 22:44:48 +00:00
lock_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
log.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
log_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
options.go fix: Result.New handles (value, error) pairs correctly + embed test fixes 2026-03-24 22:09:02 +00:00
options_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
path.go fix: address CodeRabbit review findings 2026-03-22 10:12:52 +00:00
path_test.go merge: resolve main→dev conflict in path_test.go 2026-03-23 17:58:05 +00:00
README.md docs: rewrite documentation suite against AX spec 2026-03-21 10:05:04 +00:00
runtime.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
runtime_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
service.go fix: shutdown context, double IPC registration 2026-03-24 22:28:15 +00:00
service_test.go test: add _Bad/_Ugly tests + fix per-Core lock isolation 2026-03-24 22:44:48 +00:00
string.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
string_test.go feat: inline tests + Fs zero-value fix + coverage 76.9% → 82.3% 2026-03-22 13:30:01 +00:00
task.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
task_test.go feat: New() returns *Core directly — no Result wrapper needed 2026-03-24 22:09:02 +00:00
utils.go refactor: flatten polyglot layout to standard Go module 2026-03-21 08:27:14 +00:00
utils_test.go feat: inline tests + Fs zero-value fix + coverage 76.9% → 82.3% 2026-03-22 13:30:01 +00:00

CoreGO

Dependency injection, service lifecycle, command routing, and message-passing for Go.

Import path:

import "dappco.re/go/core"

CoreGO is the foundation layer for the Core ecosystem. It gives you:

  • one container: Core
  • one input shape: Options
  • one output shape: Result
  • one command tree: Command
  • one message bus: ACTION, QUERY, PERFORM

Why It Exists

Most non-trivial Go systems end up needing the same small set of infrastructure:

  • a place to keep runtime state and shared subsystems
  • a predictable way to start and stop managed components
  • a clean command surface for CLI-style workflows
  • decoupled communication between components without tight imports

CoreGO keeps those pieces small and explicit.

Quick Example

package main

import (
	"context"
	"fmt"

	"dappco.re/go/core"
)

type flushCacheTask struct {
	Name string
}

func main() {
	c := core.New(core.Options{
		{Key: "name", Value: "agent-workbench"},
	})

	c.Service("cache", core.Service{
		OnStart: func() core.Result {
			core.Info("cache started", "app", c.App().Name)
			return core.Result{OK: true}
		},
		OnStop: func() core.Result {
			core.Info("cache stopped", "app", c.App().Name)
			return core.Result{OK: true}
		},
	})

	c.RegisterTask(func(_ *core.Core, task core.Task) core.Result {
		switch t := task.(type) {
		case flushCacheTask:
			return core.Result{Value: "cache flushed for " + t.Name, OK: true}
		}
		return core.Result{}
	})

	c.Command("cache/flush", core.Command{
		Action: func(opts core.Options) core.Result {
			return c.PERFORM(flushCacheTask{
				Name: opts.String("name"),
			})
		},
	})

	if !c.ServiceStartup(context.Background(), nil).OK {
		panic("startup failed")
	}

	r := c.Cli().Run("cache", "flush", "--name=session-store")
	fmt.Println(r.Value)

	_ = c.ServiceShutdown(context.Background())
}

Core Surfaces

Surface Purpose
Core Central container and access point
Service Managed lifecycle component
Command Path-based executable operation
Cli CLI surface over the command tree
Data Embedded filesystem mounts
Drive Named transport handles
Fs Local filesystem operations
Config Runtime settings and feature flags
I18n Locale collection and translation delegation
E, Wrap, ErrorLog, ErrorPanic Structured failures and panic recovery

AX-Friendly Model

CoreGO follows the same design direction as the AX spec:

  • predictable names over compressed names
  • paths as documentation, such as deploy/to/homelab
  • one repeated vocabulary across the framework
  • examples that show how to call real APIs

Install

go get dappco.re/go/core

Requires Go 1.26 or later.

Test

core go test

Or with the standard toolchain:

go test ./...

Docs

The full documentation set lives in docs/.

Path Covers
docs/getting-started.md First runnable CoreGO app
docs/primitives.md Options, Result, Service, Message, Query, Task
docs/services.md Service registry, runtime helpers, service locks
docs/commands.md Path-based commands and CLI execution
docs/messaging.md ACTION, QUERY, QUERYALL, PERFORM, PerformAsync
docs/lifecycle.md Startup, shutdown, context, and task draining
docs/subsystems.md App, Data, Drive, Fs, I18n, Cli
docs/errors.md Structured errors, logging helpers, panic recovery
docs/testing.md Test naming and framework testing patterns

License

EUPL-1.2