Resolves gate-subsystem-2 and gate-subsystem-1.
WIRE: gate.Finding.Level is now a typed gate.Level restricted to
LevelError/LevelWarn, and Finding.Validate rejects any other value so a
mis-typed or empty level fails the gate closed instead of silently
downgrading an intended blocker to a pass -- mirroring the fail-closed
standard ReviewFinding.Validate already sets in
internal/domain/workflow/review_findings.go.
WIRE: StageYaegiGate now delegates the blocking decision to
gate.Finding.Blocking instead of re-implementing the raw "error" literal,
so the script-facing gate.Blocking helper (exposed by gateextract to
interpreted .archie/gate.go scripts) and the rule the daemon actually
enforces share one source of truth and cannot drift.
Two pre-existing issues discovered while scoping the Module-position slice
(archie-core-e7bo), unrelated to the playbook engine work:
1. wfextract's //go:generate directive still targeted
internal/workflow, a path gone since the domain migration -- the
committed generated file was hand-patched for imports only, never
regenerated. 'go generate ./...' failed repo-wide, silently.
2. Regeneration surfaced real drift on three surfaces:
- wfextract: the committed table predated the migration and was
missing everything added since -- routing YAML loaders (t2db.9/.10/
.11), the review types, and the Forger/Reviewer/Trees interfaces
that TaskContext exposes to every interpreted stage plugin. A stage
plugin referencing tc.Trees or the review types could not resolve
them.
- pluginextract: internal/plugin/host.go (f73b2d1) added the
Host/Module/Manifest/Permission/Health/CapabilityKind/LifecycleState
/ModuleStatus types and NewHost/AdaptLegacy/HostAPIVersion, none of
which were ever extracted. A daemon plugin written against the
capability-host API (bootstrap.go:707 LoadDir) silently had no way
to reference them.
- secretextract: symbol exports were current; only the hand-applied
nil-guards and comments differ from raw generator output.
Fix: update the wfextract directive to internal/domain/workflow and
regenerate all four extract surfaces via 'go generate ./...'. Re-apply
the documented hand-written nil-guards on interface wrappers (Yaegi
wrappers omit them natively), restating the IMPORTANT note in wfextract's
package doc (it now has interface wrappers for the first time). Delete
the stale hand-patched wfextract generated file in favour of the
correctly-named regeneration.
Regression coverage (the previously-missing types are now reachable from
interpreted code, proven by tests that fail against the old tables):
- wfextract/reachability_test.go: interprets a stage plugin referencing
Trees/Reviewer/LoadPlaybookDirs and calls it; plus a Go-side nil-guard
test on the three wrappers.
- pluginextract/reachability_test.go: interprets a daemon plugin building
a Host from a Go-side Module and calls it end to end; plus nil-guard
tests on the _Module/_Plugin wrappers.
- secretextract keeps its existing wrapper nil-guard tests.
Verified red-then-green: after a fresh 'go generate ./...' wipes the
guards, the guard tests fail with nil-pointer panics; after re-applying,
they pass. task check clean (113/113 UI, exit 0).
Auto-fix lint issues and reformat imports across all files.
gci: group imports per project convention
gofumpt: format unused imports with blank lines
gofix: Go standard fixes
goimports: organize imports
Remaining 54 issues require manual judgment (not auto-fixable).
Checkpoint commit covering concurrent work across several archie-core-abg
epics to avoid losing in-progress state:
- Memory manager (18.7-18.16): background sync pipeline, prefetch with
timeout, memory-write notification, threat scanning, shutdown drain
with abandoned-write tracking, frozen snapshot pattern. Wired
ScanContent and NotifyMemoryToolWrite into HandleToolCall so scanning
and notification actually apply to writes, not just exist as unused
primitives.
- Fixed a literal unresolved merge-conflict that had been committed to
internal/memory/scrubber/scrubber.go.
- Tool provider/registry, MCP client/transport (stdio, HTTP, SSE),
multimodal results, disclosure.
- Pairing device auth store, rate limiting.
- Gateway compression, session store, tasks.
- Various workflow, plugin host, and agentexec updates.
- Introduce `-config-overlay` flag and `config.LoadOverlay()` to merge a base config with an overlay file, only overriding fields the overlay sets. This enables docker-compose to mount the base config from the host and apply only deployment-specific overrides.
- Create `internal/natsrpc` package with reusable NATS request/reply primitives (Envelope, Client, Call, RegisterAll, Respond). Migrate storerpc, worktreerpc, and forgerpc to use it, eliminating duplicated marshal/unmarshal and error handling.
- Create `internal/yaegiutil` package with shared interpreter construction (stdlib + extra symbols), generic export resolution (Resolve), and panic recovery (Safe). Migrate all Yaegi-based surfaces (gate scripts, daemon plugins, skill plugins, workflow stages, skill scripts) to use it, reducing boilerplate and centralizing panic safety.
- Simplify `config.docker.toml` to contain only overlay fields (paths, container config) and remove the duplicated repos list – the base config is now the single source of truth.
- Update docker-compose.yml to pass both -config and -config-overlay flags and mount the base config from the host.
- Add tests for LoadOverlay, DockerConfigOverlaysExampleConfig, Envelope, and yaegiutil utilities.
Implements the full PRD (docs/prds/yaegi-plugin-system.md): repos can
now define .archie/gate.go for diff-inspecting quality rules shell
commands can't express, .archie/stages/*.go for custom pipeline steps,
and skills can ship Go scripts run via a new run_go_script agent tool —
all interpreted in-process with Yaegi, with panics recovered so a bad
script can't take down the daemon. Hot reload (phase 4) needed no code:
every loader reads from disk per call and every task gets a fresh
clone, so nothing is ever cached to go stale.