Files
archie/.beads/issues.jsonl
T
sam 6ebbd3b2cf fix: add missing LinkBranch stubs to test doubles
Fix go vet/test failures by adding LinkBranch methods to stubForge, prCapturingForge, testForge, and fakeForge. Update test data from 'sam/archie' to 'acme/widget' and state label defaults from 'archie:*' to 'agent:*'. Add Taskfile.yml for project build automation. Implement container self-network detection so spawned agents join the daemon's Docker network.
2026-07-24 13:32:50 +10:00

29 lines
48 KiB
JSON

{"_type":"issue","id":"archie-core-jfg","title":"Spawned archie-agent containers not on daemon's docker network — can't reach NATS","description":"Root cause of 'agent still failing on the server': archied's container.Pool.Acquire creates archie-agent containers via the Docker SDK with no NetworkMode set, so Docker attaches them to the default bridge network. archied and nats run on the compose-created 'archie-core_default' network instead, so the spawned container's hostname resolution for 'nats' (from NATS_URL=nats://nats:4222) fails and archie-agent can't connect. Confirmed on carina host logs: archied logs show repeating 'taskrun request failed err=\"nats: no responders available for request\"' for every task, containers created and destroyed within ~1.5s (consistent with archie-agent's NATS client failing fast). Fixed by detecting the daemon's own container's network in NewPool (selfNetwork, via ContainerInspect on os.Hostname()) and setting HostConfig.NetworkMode on spawned containers to match.","status":"open","priority":0,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-24T03:10:26Z","created_by":"Sam Catlow","updated_at":"2026-07-24T03:10:26Z","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-s1r","title":"Test forge fakes missing LinkBranch method broke go vet/test for whole module","description":"forge.Forge gained LinkBranch(ctx, owner, repo, issueNumber, branch) error in the branch-linking feature (ff4c51e) but the hand-rolled test doubles (stubForge in cmd/archied/main_test.go, prCapturingForge in cmd/archie-agent/taskrun_test.go, testForge in internal/daemon/daemon_test.go, fakeForge in internal/forgerpc/forgerpc_test.go) never got the method added, so they stopped satisfying forge.Forge. This broke go vet ./... and go test ./... for the entire module, not just those 4 packages, since go vet type-checks all test files as part of module vet. Fixed by adding LinkBranch stubs to all four fakes.","status":"closed","priority":1,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-24T03:04:53Z","created_by":"Sam Catlow","updated_at":"2026-07-24T03:04:58Z","closed_at":"2026-07-24T03:04:58Z","close_reason":"Added LinkBranch stub methods to stubForge, prCapturingForge, testForge, and fakeForge. go build/vet/test ./... now clean across the whole module.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-633","title":"config.docker.toml missing required fields, no overlay merge implemented","description":"config.docker.toml was rewritten to be a docs-as-overlay file (comment says base+overlay merge) but internal/config.Load has no merge logic and docker-compose.yml mounts only config.docker.toml at /etc/archie/config.toml. It is missing bot_user, [forge], [dispatch], [models], [providers], [budgets] which Load requires -\u003e daemon fails to start in docker as currently configured. Implement real base+overlay config loading (or restore a full standalone docker config) so there is one source of truth.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-24T02:42:07Z","created_by":"Sam Catlow","updated_at":"2026-07-24T02:44:53Z","started_at":"2026-07-24T02:42:11Z","closed_at":"2026-07-24T02:44:53Z","close_reason":"Implemented config.LoadOverlay (base decode + overlay decode into same struct, then shared finalize/validate), wired -config-overlay flag in cmd/archied, fixed docker-compose.yml to mount both base config.toml and config.docker.toml overlay, minimized config.docker.toml to true diff-only overlay, added tests proving overlay-omitted required fields (bot_user, repos) still come from base.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-u64","title":"Daemon: process multiple tasks concurrently (max_concurrency enforcement)","description":"Daemon currently processes one task at a time (docs/prds/archie-core-v2-architecture.md Phase 2). This is the core blocker between current state and any multi-agent scaling mode — needed before container max_concurrency or same-repo concurrency can matter. Wire the daemon's dispatch loop to run N tasks in parallel, respecting a configurable max_concurrency.","design":"internal/container/pool.go already enforces max_concurrency for container lifecycle — reuse that limit/pattern in the daemon's task dispatch rather than inventing a second concurrency control.","acceptance_criteria":"Daemon dispatch loop runs multiple tasks concurrently up to a configured max_concurrency limit; single-task-at-a-time behavior is gone.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:31Z","created_by":"Sam Catlow","updated_at":"2026-07-23T21:37:42Z","started_at":"2026-07-23T21:29:41Z","closed_at":"2026-07-23T21:37:42Z","close_reason":"Implemented concurrent SQLite and NATS task dispatch using containers.max_concurrency, with default same-repo serialization and race-tested dispatcher coverage.","dependency_count":0,"dependent_count":2,"comment_count":0}
{"_type":"issue","id":"archie-core-mjj","title":"Consolidate 6 duplicated Yaegi interpreter bootstraps","description":"internal/gate/gateeval/yaegi.go, internal/workflow/wfeval/yaegi.go, internal/workflow/skillbuild/skillbuild.go, internal/skillscript/yaegi.go, internal/plugin/plugin.go, internal/skill/plugin.go each hand-roll interp.New/i.Use(stdlib.Symbols)/panic-recovery. Extract a shared helper (new package, e.g. internal/yaegiutil) for interpreter construction + panic-safe eval, used by all six.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-24T02:42:07Z","created_by":"Sam Catlow","updated_at":"2026-07-24T02:49:56Z","closed_at":"2026-07-24T02:49:56Z","close_reason":"Added internal/yaegiutil (New for interpreter+symbol bootstrap, Resolve[T] for eval+type-assert an export, Safe[R] for panic recovery) and migrated all 6 call sites (gate/gateeval, workflow/wfeval, workflow/skillbuild, skillscript, plugin, skill) to use it, removing the duplicated interp.New/stdlib.Symbols/recover boilerplate from each. Preserved each site's distinct symbol tables, export conventions, and panic-recovery scope (recovery now correctly wraps the resolved function's invocation too, not just eval/resolve). All existing tests pass; added yaegiutil_test.go.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-p9h","title":"Consolidate duplicated NATS RPC client/server boilerplate","description":"internal/storerpc/storerpc.go, internal/worktreerpc/worktreerpc.go, internal/forgerpc/forgerpc.go each reimplement near-identical timeout/marshal/error-envelope helpers for NATS request/reply RPC. Extract shared helpers into a common package.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-24T02:42:07Z","created_by":"Sam Catlow","updated_at":"2026-07-24T02:53:05Z","started_at":"2026-07-24T02:50:00Z","closed_at":"2026-07-24T02:53:05Z","close_reason":"Added internal/natsrpc (Client.Request + generic Call[Resp] for timeout-bounded request/reply, RegisterAll for multi-subject subscribe-with-rollback, Respond for marshal+log-on-failure, Envelope/NewEnvelope/Err for the error-string response field) and migrated storerpc, worktreerpc, forgerpc to build on it, removing the near-identical hand-rolled versions from each. Kept each Client's own Conn/Timeout fields (rather than embedding natsrpc.Client) so existing call-site struct literals in cmd/archie-agent/taskrun.go and cmd/archied/main.go didn't need to change. go build ./... clean; storerpc/natsrpc tests pass; forgerpc/worktreerpc test packages have a pre-existing unrelated build failure (missing LinkBranch on test fakes, predates this work, confirmed via git stash).","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-abg.1","title":"Discovery session: interview to produce multi-agent collaboration PRD","description":"Sam has no implementation approach in mind yet for multi-agent collaboration. Run a structured discovery interview (an agent grilling Sam with scoped questions, one round at a time — not guessing or proposing a design upfront) to extract: the concrete use cases driving this (what does 'multiple agents working in combination' look like day to day?), constraints from the existing archie-core architecture (daemon/worktree/dispatch/RPC boundaries built in the 5zh epic), and what's explicitly out of scope. Write the findings up as docs/prds/multi-agent-collaboration.md.","acceptance_criteria":"docs/prds/multi-agent-collaboration.md exists, reflects Sam's actual answers (not assumptions), and is detailed enough that a future implementation session could break it into scoped, dependency-ordered beads issues the way the 5zh epic was.","notes":"Start the discovery interview from this framing: today's workaround is N independent archied processes; the target is 1 daemon doing what N processes do. Confirm whether that's the whole scope (daemon-side concurrency/orchestration) or whether it also implies agents working on *different* repos/configs than a single [[repos]] list currently supports (today one archied instance is bound to one config.toml with one set of repos — do the 2 running daemons today have different repo lists, different bot identities, or the same repos with different task subsets?).","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-24T00:39:16Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:41:38Z","dependencies":[{"issue_id":"archie-core-abg.1","depends_on_id":"archie-core-abg","type":"parent-child","created_at":"2026-07-24T10:39:15Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-x96.1","title":"Discovery session: interview to produce agent personas PRD","description":"Sam has no implementation approach in mind yet for agent personas. Run a structured discovery interview (an agent grilling Sam with scoped questions, one round at a time) to extract: what a persona means concretely for this project, how it should relate to (or reuse) the existing skill/workflow system, whether personas are a prerequisite for or dependent on the multi-agent collaboration work, and what's explicitly out of scope. Write the findings up as docs/prds/agent-personas.md.","acceptance_criteria":"docs/prds/agent-personas.md exists, reflects Sam's actual answers (not assumptions), and is detailed enough that a future implementation session could break it into scoped, dependency-ordered beads issues the way the 5zh epic was.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-24T00:39:16Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:39:16Z","dependencies":[{"issue_id":"archie-core-x96.1","depends_on_id":"archie-core-x96","type":"parent-child","created_at":"2026-07-24T10:39:16Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-abg","title":"Multi-agent collaboration: many agents working together","description":"Support multiple agents working in combination — not just one agent per task in isolation, but agents coordinating with each other (e.g. on the same repo, the same task, or a decomposed set of related tasks). Scope, coordination model, and conflict-avoidance strategy are all undefined — this is exploratory. No implementation approach has been decided yet.","acceptance_criteria":"A PRD exists (docs/prds/) covering: what 'multiple agents working in combination' means concretely for archie-core, how agents discover/hand off work to each other, how conflicts (same repo, same worktree, shared state) are avoided or resolved, and what changes to daemon/workflow/dispatch are implied. No code changes required to close this epic — the PRD is the deliverable.","notes":"CORRECTION (2026-07-24, verified by inspecting the live configs on carina): the 2 running daemons are NOT split by repo — both poll sam/tau (one also polls sam/archie-core), with dispatch.trigger=\"assignee\". They're split by BOT IDENTITY: config.toml has bot_user=\"archie\", winter.toml has bot_user=\"winter\". Each daemon polls only issues assigned to its own bot_user. Config.BotUser is a single global field today (internal/config/config.go), so one daemon process = exactly one assignable identity — this is NOT solvable by merging [[repos]] lists.\n\nReal scope: one daemon capable of running multiple distinct bot identities concurrently, each polling/claiming/labeling/commenting as itself, potentially across overlapping repos. This is materially different from (and more interesting than) the 'just consolidate configs' fix I originally suggested — it's genuinely a multi-agent-identity problem, not a repo-dispatch problem. Start the discovery interview from here.","status":"open","priority":2,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-24T00:39:05Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:52:59Z","dependency_count":0,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-x96","title":"Agent personas: specialized agents for specific task types","description":"Build on multi-agent collaboration with the concept of agent personas — agents with distinct roles/specializations (e.g. a reviewer persona, a security-focused persona, a specific-language expert persona) that perform specific kinds of tasks rather than one generic agent handling everything. Related to but separable from the multi-agent collaboration epic — personas could exist for single-agent-at-a-time dispatch too (picking the right persona for a task), or become one of the participants in multi-agent collaboration.","acceptance_criteria":"A PRD exists (docs/prds/) covering: what a persona is (system prompt variant? skill-bundle variant? separate model/config?), how a task gets routed to the right persona, how personas relate to the existing skill/workflow system (internal/skill, internal/workflow), and whether personas need to exist before or after multi-agent collaboration lands. No code changes required to close this epic — the PRD is the deliverable.","status":"open","priority":2,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-24T00:39:05Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:39:05Z","dependencies":[{"issue_id":"archie-core-x96","depends_on_id":"archie-core-abg","type":"blocks","created_at":"2026-07-24T10:41:37Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.7","title":"archie-agent: run full task (workflow.Route + workflow.Run) via RPC-backed TaskContext","description":"The actual stage-loop move for archie-core-5zh, depending on the TaskConfig payload and TaskContext interface refactor. cmd/archie-agent gains a handler for a new 'run whole task' NATS message (task summary + TaskConfig + repo config, no secrets). On receipt it: builds its own workflow.Registry via skillbuild.BuildRegistry against its mounted worktree (/data/worktree — same pattern the daemon already uses, no registry needs to cross the wire); calls workflow.Route itself; builds a TaskContext using storerpc.Client (Store), forgerpc.Client (Forge), and a hybrid Trees (worktreerpc.Client for Prepare/Push, a local *worktree.Manager with no token for CommitAll/Diff/ChangedFiles/ChangedLines against the bind-mounted dir); calls workflow.Run; reports completion once instead of round-tripping per stage.","acceptance_criteria":"When agent.mode=nats and containers are enabled, archie-agent runs an entire task's workflow (all stages) per invocation, not one stage per round trip; inprocess/subprocess modes are unaffected.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-23T22:28:00Z","created_by":"Sam Catlow","updated_at":"2026-07-23T23:08:11Z","closed_at":"2026-07-23T23:08:11Z","close_reason":"Added internal/taskrun (Request/Response wire types + SubjectForTask) and cmd/archie-agent/taskrun.go: runTask builds a workflow.Registry from the container's own bind-mounted worktree (skillbuild.BuildRegistry, same call the daemon already makes), routes and runs the task's entire workflow via workflow.Route/workflow.Run, using storerpc.Client/forgerpc.Client for Store/Forge and a new hybridTrees (worktreerpc.Client for Prepare/Push, local *worktree.Manager for CommitAll/Diff/ChangedFiles/ChangedLines against the mount). Added config.TaskConfig.ToConfig() to rebuild a usable config.Config from the curated payload. Added storage.WorktreeMountDir constant (/data/worktree) — critical fix: hybridTrees.Prepare discards the RPC response's host-side directory and returns the container's fixed local mount path instead, since archied and archie-agent see the same files at different paths. Wired a queue-grouped core-NATS subscription on archie.taskrun.\u003e in cmd/archie-agent/main.go so this is reachable in the running binary, not just testable in isolation. End-to-end test drives the real 'bootstrap' workflow (no LLM) through real storerpc/forgerpc/worktreerpc servers and a real local git remote, proving the full chain: registry build, route, prepare, commit, push, PR creation, and that the authoritative task state lands in archied's store via RPC. archie-core-5zh.8 (daemon.go handoff) is now unblocked — it owns deciding exactly how/when archied publishes to archie.taskrun.\u003cid\u003e.","dependencies":[{"issue_id":"archie-core-5zh.7","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T08:27:59Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.7","depends_on_id":"archie-core-5zh.5","type":"blocks","created_at":"2026-07-24T08:28:07Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.7","depends_on_id":"archie-core-5zh.6","type":"blocks","created_at":"2026-07-24T08:28:07Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.8","title":"daemon.go: hand off whole task to archie-agent in sandboxed NATS+container mode","description":"Depends on the archie-agent full-task handler existing. internal/daemon/daemon.go's process() currently always calls workflow.Route/workflow.Run itself, dispatching per-stage LLM calls to d.Agent (NATSRunner does this over NATS today). When d.Nats != nil \u0026\u0026 d.ContainerPool != nil (the sandboxed path this whole PRD phase targets), process() should instead publish one 'run whole task' message to archie-agent and await its completion report, skipping local workflow.Route/workflow.Run entirely. inprocess/subprocess modes (no container pool) keep calling workflow.Run in the daemon exactly as today — this only changes behavior for the fully-sandboxed path.","acceptance_criteria":"With containers enabled, daemon.process() delegates the entire task to archie-agent in one round trip; without containers, behavior is unchanged (verified by existing daemon tests continuing to pass).","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-23T22:28:00Z","created_by":"Sam Catlow","updated_at":"2026-07-23T23:14:48Z","closed_at":"2026-07-23T23:14:48Z","close_reason":"daemon.process() now branches on d.ContainerPool != nil: sandboxed tasks get handed to archie-agent via a new runViaAgent method (publishes taskrun.Request to archie.taskrun.\u003cid\u003e, awaits taskrun.Response) instead of calling workflow.Route/workflow.Run locally; non-container mode is unchanged. runViaAgent only parks the task itself on transport/setup failure (encode error, no responder, decode error, or an error returned before archie-agent's workflow.Run got to run) — on success, every durable side effect already landed via the storerpc/forgerpc/worktreerpc proxies during archie-agent's run, so runViaAgent just logs. Added agentexec.ProvidersFromConfig (deduped from cmd/archied's former executionProviders). Also fixed a real correctness gap this surfaced: with concurrent multi-task dispatch (u64/g1l) plus containerized archie-agent, the 5zh.7 wildcard queue-group subscription could let one container answer a sibling's taskrun message despite having a different task's worktree mounted. archie-agent now reads its boot-time task.json (container.TaskPayload, already written by daemon.process() before container acquire) and subscribes to its own exact archie.taskrun.\u003cid\u003e subject when present, falling back to the shared queue group only when no task.json exists (dev/pool mode). Full container-mode integration (real Docker) isn't covered by an automated test, consistent with the rest of the container-dependent code — runViaAgent itself is unit-tested directly against embedded NATS, bypassing the Docker-dependent Acquire path. This closes the archie-core-5zh epic: archie-agent now runs an entire task's workflow per invocation instead of one stage per round trip, with Store/Forge/git-push credentials staying daemon-side throughout.","dependencies":[{"issue_id":"archie-core-5zh.8","depends_on_id":"archie-core-5zh.7","type":"blocks","created_at":"2026-07-24T08:28:07Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.8","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T08:28:00Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.9","title":"Register storerpc/forgerpc/worktreerpc servers in archied startup","description":"Depends on the TaskContext interface refactor. cmd/archied/main.go builds the Daemon with Store/Forge/Trees but never registers the storerpc.Server/forgerpc.Server/worktreerpc.Server handlers, so archie-agent's RPC calls currently have no responder in production. Wire all three Register(nc) calls into archied's startup when cfg.NATS is configured, alongside the existing NATS client connect.","acceptance_criteria":"When [nats] is configured, archied subscribes to all storerpc/forgerpc/worktreerpc subjects at startup; an archie-agent container can successfully call Store/Forge/worktree operations against a running archied.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T22:28:00Z","created_by":"Sam Catlow","updated_at":"2026-07-23T22:58:58Z","started_at":"2026-07-23T22:56:35Z","closed_at":"2026-07-23T22:58:58Z","close_reason":"Added registerTaskRPCServers() in cmd/archied/main.go, wiring storerpc.Server/forgerpc.Server/worktreerpc.Server onto the daemon's NATS connection whenever [nats] is configured, alongside the existing worktree.Manager and forge/store instances the daemon already owns. Test spins an embedded NATS server, registers via the composed function, then round-trips real storerpc/forgerpc/worktreerpc clients against it to prove all three are reachable. archie-core-5zh.7 (archie-agent full-task handler) can now be built and tested end-to-end against a real archied.","dependencies":[{"issue_id":"archie-core-5zh.9","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T08:28:00Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.9","depends_on_id":"archie-core-5zh.6","type":"blocks","created_at":"2026-07-24T08:28:08Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.5","title":"Curated TaskConfig payload for archie-agent (no secrets)","description":"Groundwork for archie-core-5zh.4. workflow.TaskContext.Cfg (config.Config) is read throughout stages (Models, Budgets, Dispatch incl. label mapping, DiffCapLines, Notify.Webhook, Forge.Host) but the full Config also carries forge/NATS credentials that must never enter the agent container. Add a config.TaskConfig struct — same field names/shapes as the subset config.Config exposes (Models, Budgets, Dispatch, DiffCapLines, Notify, Forge) — with json tags, plus a constructor (e.g. config.Config.ForTask()) that builds it from the daemon's live config. Add json tags to config.Repo's remaining fields (only AllowConcurrent has them today) since tc.Repo also needs to cross the wire.","acceptance_criteria":"config.TaskConfig marshals/unmarshals via JSON and carries exactly the fields workflow stages read; no token/credential field is reachable from it; config.Repo fully round-trips through JSON.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T22:27:59Z","created_by":"Sam Catlow","updated_at":"2026-07-23T22:51:48Z","started_at":"2026-07-23T22:43:06Z","closed_at":"2026-07-23T22:51:48Z","close_reason":"Implemented curated non-secret TaskConfig/TaskForge payload with detached map snapshots, stable JSON Duration encoding, full Repo JSON tags, and regression coverage. Focused config tests, go vet, go fix -diff, and full race suite pass; repository-wide lint remains blocked only by 36 unrelated pre-existing findings.","dependencies":[{"issue_id":"archie-core-5zh.5","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T08:27:58Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.6","title":"TaskContext interface refactor: Forge/Store/Trees as trimmed interfaces","description":"Groundwork for archie-core-5zh.4. workflow.TaskContext currently types Forge/Store/Trees as concrete daemon types (forge.Forge interface already, *store.Store, *worktree.Manager). Define trimmed interfaces in internal/workflow scoped to exactly the methods stages call (Forge: Comment/CloseIssue/CreatePR/SetStateLabel; Store: Update/Transition; Trees: Prepare/CommitAll/Push/Diff/ChangedFiles/ChangedLines) so storerpc.Client, forgerpc.Client, and a worktreerpc-backed implementation can satisfy them from inside archie-agent, while *store.Store/*worktree.Manager and the real forge.Forge implementations keep satisfying them unchanged for the daemon's existing inprocess/subprocess paths.","acceptance_criteria":"TaskContext.Forge/Store/Trees are interface-typed; daemon.go compiles and all existing tests pass unchanged (concrete types satisfy the new interfaces structurally); no behavior change for inprocess/subprocess modes.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T22:27:59Z","created_by":"Sam Catlow","updated_at":"2026-07-23T22:56:18Z","started_at":"2026-07-23T22:54:26Z","closed_at":"2026-07-23T22:56:18Z","close_reason":"Trimmed workflow.TaskContext.Forge/Store/Trees to new interfaces (Forger, TaskStore, Trees) in internal/workflow/workflow.go, scoped to exactly the methods stages call mid-run (4 Forge methods, 2 Store methods, 6 Trees methods). Go's structural typing meant zero changes were needed anywhere else — forge.Forge (already an interface), *store.Store, and *worktree.Manager all satisfy the new interfaces automatically, and storerpc.Client/forgerpc.Client/worktreerpc.Client already match by construction from 5zh.1-3. Full build, race suite, vet, and staticcheck all clean with no behavior change. archie-core-5zh.7 (archie-agent full-task handler) and 5zh.9 (register RPC servers in archied) are now unblocked.","dependencies":[{"issue_id":"archie-core-5zh.6","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T08:27:59Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":2,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.2","title":"Forge RPC proxy: archie-agent → archied for forge API calls","description":"Phase 1 groundwork for archie-core-5zh. Stages call Forge.SetStateLabel/Comment/CreatePR/CloseIssue/CreateIssue/React/RepliesAfter mid-workflow. Forge holds live API tokens (Gitea/GitHub) that must stay daemon-side per the PRD's 'daemon never runs untrusted code, owns all secrets' boundary. Once workflow.Run moves into archie-agent, these calls need to become NATS request/reply RPCs to the daemon rather than shipping forge credentials into the agent container.","acceptance_criteria":"archie-agent can invoke the forge.Forge interface methods used by workflow stages over NATS; archied executes them against the real forge client and replies; no forge API tokens are present in the agent container.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T21:55:44Z","created_by":"Sam Catlow","updated_at":"2026-07-23T22:02:41Z","started_at":"2026-07-23T22:00:46Z","closed_at":"2026-07-23T22:02:41Z","close_reason":"Added internal/forgerpc: core-NATS request/reply RPC for the four forge.Forge methods workflow stages actually call mid-run (Comment, CloseIssue, CreatePR, SetStateLabel). Confirmed via grep that all other Forge methods (AssignedIssues, IssuesWithLabel, React, RepliesAfter, PRState, CreateIssue, AcceptInvitations, VerifyPush) are daemon-only poll/reconcile-loop calls, never invoked from a workflow stage, so nothing else needs proxying. archied stays the sole holder of forge API tokens. Not yet wired into daemon.go or workflow.TaskContext — deferred to archie-core-5zh.4.","dependencies":[{"issue_id":"archie-core-5zh.2","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T07:55:43Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.3","title":"Worktree push RPC proxy: archie-agent → archied for git push","description":"Phase 1 groundwork for archie-core-5zh. worktree.Manager.Push needs the forge HTTPS push token (held daemon-side, used via an askpass helper). Trees.Prepare/CommitAll/Diff/ChangedFiles/ChangedLines are local git operations against the already-mounted worktree and can run agent-side unchanged (containers already bind-mount /data/worktree) — only Push needs to be proxied back to the daemon, which holds the credential.","acceptance_criteria":"archie-agent can request a git push over NATS; archied performs the authenticated push using its held token and replies with success/failure; the push token is never sent to or stored in the agent container.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T21:55:44Z","created_by":"Sam Catlow","updated_at":"2026-07-23T22:05:10Z","started_at":"2026-07-23T22:02:54Z","closed_at":"2026-07-23T22:05:10Z","close_reason":"Added internal/worktreerpc: core-NATS request/reply RPC so archie-agent can request a git push without holding the forge push token. Server resolves the worktree directory itself from owner/repo/issue (never trusts a path from the sandboxed agent) and calls the daemon's own worktree.Manager.Push, which already holds the token via its askpass helper. Prepare/CommitAll/Diff/ChangedFiles/ChangedLines stay local git ops the agent can run directly against its bind-mounted worktree — only Push needed proxying. Not yet wired into daemon.go or workflow.TaskContext — deferred to archie-core-5zh.4, which now has all three RPC proxies (Store, Forge, worktree push) it depends on.","dependencies":[{"issue_id":"archie-core-5zh.3","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T07:55:43Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.4","title":"Move workflow.Route/workflow.Run stage loop into archie-agent","description":"Final step of archie-core-5zh, depends on the Store/Forge/push RPC proxies existing. Move workflow.Route + workflow.Run's stage-loop execution from internal/daemon/daemon.go's process() into cmd/archie-agent, using the RPC proxies for Store/Forge/push and reimplementing CustomStages discovery (wfeval.Discover) agent-side against the already-mounted worktree. daemon.process() keeps worktree prepare + container acquire/release, then hands off the whole task to archie-agent in one NATS round trip instead of one round trip per stage.","acceptance_criteria":"workflow.Route and workflow.Run execute inside archie-agent, not archied, when agent.mode=nats; archie-agent handles a full task (not a single stage) per invocation; inprocess/subprocess modes keep working unchanged.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-23T21:55:44Z","created_by":"Sam Catlow","updated_at":"2026-07-23T22:28:08Z","closed_at":"2026-07-23T22:28:08Z","close_reason":"Superseded by finer-grained sub-issues 5zh.5 (TaskConfig payload), 5zh.6 (TaskContext interface refactor), 5zh.7 (archie-agent full-task handler), 5zh.8 (daemon.go handoff), 5zh.9 (register RPC servers in archied). The original single acceptance criterion (workflow.Route/Run execute in archie-agent) is satisfied once 5zh.7 and 5zh.8 land; splitting further because implementation revealed real design forks (Prepare needing the push token, tc.Cfg needing a curated non-secret payload) that each warrant their own test-first pass.","dependencies":[{"issue_id":"archie-core-5zh.4","depends_on_id":"archie-core-5zh.1","type":"blocks","created_at":"2026-07-24T07:55:48Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.4","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T07:55:44Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.4","depends_on_id":"archie-core-5zh.3","type":"blocks","created_at":"2026-07-24T07:55:49Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-5zh.4","depends_on_id":"archie-core-5zh.2","type":"blocks","created_at":"2026-07-24T07:55:49Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":3,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh.1","title":"Store RPC proxy: archie-agent → archied for task state mutations","description":"Phase 1 groundwork for archie-core-5zh. workflow.Run calls tc.Store.Update every stage and tc.Store.Transition on terminal outcomes — Store wraps a direct SQLite *sql.DB handle that only the daemon owns. Once workflow.Run moves into archie-agent, these calls need to become NATS request/reply RPCs to the daemon (the sole DB owner), reusing the existing AgentRequestMessage/reply-inbox plumbing pattern (internal/agentexec/nats.go) rather than giving the agent container direct DB access.","acceptance_criteria":"archie-agent can call Store.Update and Store.Transition equivalents over NATS; archied executes them against SQLite and replies; no direct DB access from the agent container.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T21:55:43Z","created_by":"Sam Catlow","updated_at":"2026-07-23T21:58:51Z","started_at":"2026-07-23T21:55:58Z","closed_at":"2026-07-23T21:58:51Z","close_reason":"Added internal/storerpc: core-NATS request/reply RPC so archie-agent can call Store.Update/Transition without direct DB access. archied's Store stays the sole owner; store.Task gained json tags to cross the wire. Not yet wired into daemon.go or workflow.TaskContext — that's archie-core-5zh.4's job once all three RPC proxies exist.","dependencies":[{"issue_id":"archie-core-5zh.1","depends_on_id":"archie-core-5zh","type":"parent-child","created_at":"2026-07-24T07:55:43Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-358","title":"ContainerRunner: implement agentexec.Runner against Docker for sandboxed execution","description":"Phase 2 of docs/prds/archie-core-v2-architecture.md. agentexec.Runner (InProcessRunner/SubprocessRunner) is an interface deliberately designed to be swapped for a container-backed runner without touching workflow orchestration. internal/container/pool.go already handles Docker lifecycle (pull, create, start, release, orphan recovery). Implement ContainerRunner against the existing Runner interface.","design":"Do not redesign the execution boundary — implement strictly against the existing Runner interface per its doc comments.","acceptance_criteria":"ContainerRunner implements agentexec.Runner, runs tasks in ephemeral Docker containers with workspace bind-mounted, and is selectable via [agent] mode = \"nats\" + containers.enabled = true.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:32Z","created_by":"Sam Catlow","updated_at":"2026-07-23T23:28:15Z","started_at":"2026-07-23T23:22:41Z","closed_at":"2026-07-23T23:28:15Z","dependencies":[{"issue_id":"archie-core-358","depends_on_id":"archie-core-5zh","type":"blocks","created_at":"2026-07-24T05:36:37Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-358","depends_on_id":"archie-core-5zh.8","type":"supersedes","created_at":"2026-07-24T09:28:14Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-5zh","title":"Promote archie-agent to per-task process; move workflow routing out of archied","description":"cmd/archie-agent exists but only executes one workflow stage per invocation over the internal/agentexec stdin/stdout JSON protocol (v1). Phase 1 of the PRD requires promoting it to the PRD's per-task process model, moving workflow.Route/workflow.Run out of archied and into archie-agent.","acceptance_criteria":"workflow.Route and workflow.Run execute inside archie-agent, not archied; archie-agent handles a full task (not a single stage) per invocation.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:32Z","created_by":"Sam Catlow","updated_at":"2026-07-23T23:15:04Z","started_at":"2026-07-23T21:51:46Z","closed_at":"2026-07-23T23:15:04Z","close_reason":"All sub-issues (5zh.1 Store RPC, 5zh.2 Forge RPC, 5zh.3 worktree Prepare/Push RPC, 5zh.5 curated TaskConfig payload, 5zh.6 TaskContext interface refactor, 5zh.7 archie-agent full-task handler, 5zh.9 register RPC servers, 5zh.8 daemon handoff) are closed. Original acceptance criterion met: workflow.Route and workflow.Run execute inside archie-agent, not archied, in sandboxed NATS+container mode; archie-agent handles a full task per invocation. inprocess/subprocess modes unaffected.","dependencies":[{"issue_id":"archie-core-5zh","depends_on_id":"archie-core-l1q","type":"blocks","created_at":"2026-07-24T05:36:36Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-l1q","title":"NATS transport: JetStream task queue + request-reply between daemon and archie-agent","description":"Phase 1 of docs/prds/archie-core-v2-architecture.md. internal/events.Bus (in-process pub/sub, already feeding SQLite + SSE) is the natural seam to replace the transport under. Daemon publishes tasks, archie-agent consumes, results return via NATS. Preserve current inprocess mode via [agent] mode default for local dev.","design":"Add optional [nats] config block (url, token_env), default anonymous auth for single-node, credentials required for multi-node per PRD sec.9 open question 2.","acceptance_criteria":"Daemon can dispatch a task to archie-agent over NATS JetStream and receive results via request-reply; inprocess mode still works unchanged.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:31Z","created_by":"Sam Catlow","updated_at":"2026-07-23T21:49:40Z","started_at":"2026-07-23T21:43:05Z","closed_at":"2026-07-23T21:49:40Z","close_reason":"Completed JetStream task dispatch and NATS agent request/reply, including token_env authentication for archied and canonical NATS_URL/NATS_TOKEN propagation to container workers; anonymous local mode remains supported and race-tested.","dependencies":[{"issue_id":"archie-core-l1q","depends_on_id":"archie-core-u64","type":"blocks","created_at":"2026-07-24T05:36:36Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-rig","title":"Audit archie-core repo for bugs/improvements, file as Gitea issues","description":"Fan out exploration subagents across internal/ subsystems to find bugs, tech debt, and enhancement opportunities. Each confirmed finding gets filed as a Gitea issue on git.catlow.cloud/sam/archie-core.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-22T16:24:07Z","created_by":"Sam Catlow","updated_at":"2026-07-22T16:37:16Z","started_at":"2026-07-22T16:24:09Z","closed_at":"2026-07-22T16:37:16Z","close_reason":"Audit complete: 58 Gitea issues (#3-#60) filed at git.catlow.cloud/sam/archie-core. 60 raw findings, 59 verified, 58 successfully filed. 8 agents hit session limit at end (webui/workflow/worktree file-phase).","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-cen","title":"Dedup skillbuild.BuildRegistry/AugmentRegistry and align with wfeval.loadStage","description":"internal/workflow/skillbuild/skillbuild.go:41 BuildRegistry and :97 AugmentRegistry are near copy-paste merge loops. Also skillbuild.loadStage and wfeval.loadStage independently implement the same 'Yaegi plugin exports Stage()' loading pattern and have already diverged (skillbuild has a legacy positional-fields fallback wfeval lacks). Share the merge loop and the stage-loading logic.","status":"closed","priority":3,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-24T02:42:08Z","created_by":"Sam Catlow","updated_at":"2026-07-24T02:49:56Z","closed_at":"2026-07-24T02:49:56Z","close_reason":"Extracted mergeSkillWorkflows() shared by BuildRegistry and AugmentRegistry in internal/workflow/skillbuild/skillbuild.go, eliminating the copy-pasted catalog/merge loop. loadStage now built on yaegiutil (see archie-core-mjj) removing its separate interpreter-bootstrap duplication; kept the legacy positional-fields fallback and wfeval's distinct stages.Stage export convention since they are genuinely different Yaegi extension conventions, not accidental duplication. All existing skillbuild/wfeval tests pass.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-340","title":"Eliminate intermittent JetStream TempDir teardown race","description":"An intermittent full-suite race failure shows TestConnectAndPublish cleaning its testing.TempDir while JetStream is still removing the ARCHIE_TASKS msgs directory. The package subsequently passed five race iterations, so the timing window is narrow.\\n\\n## Steps to Reproduce\\n1. Run: go test -race -count=1 ./...\\n2. Repeat until internal/nats TestConnectAndPublish fails during TempDir RemoveAll with: unlinkat .../jetstream/$G/streams/ARCHIE_TASKS/msgs: directory not empty.\\n3. Compare with: go test -race -count=5 ./internal/nats.\\n\\nMake embedded NATS shutdown and storage cleanup deterministic before TempDir cleanup.","acceptance_criteria":"Repeated race runs of internal/nats and the full repository do not race TempDir cleanup against JetStream file removal; the test explicitly waits for server/storage shutdown.","status":"open","priority":3,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-24T00:20:01Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:20:31Z","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-756","title":"Restore a clean repository-wide golangci-lint baseline","description":"Repository-wide golangci-lint currently reports 39 pre-existing findings (32 errcheck and 7 staticcheck) across NATS/RPC/container code and older tests. Remediate the findings without weakening lint configuration so golangci-lint run ./... is a reliable required gate.","acceptance_criteria":"golangci-lint run ./... exits successfully with no findings; affected cleanup/error paths handle or explicitly document ignored errors; existing race tests remain green.","status":"open","priority":3,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-24T00:20:00Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:20:00Z","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-g1l","title":"Per-repo allow_concurrent override for same-repo multi-agent work","description":"Concurrent agents on the same repo are blocked by default (worktree conflict). PRD sec.9 open question 5 proposes a per-repo config override (allow_concurrent = true) for repos where parallel work is safe (different base branches, different packages). Deferred to Phase 2 in the PRD; depends on the daemon supporting concurrent task dispatch at all.","acceptance_criteria":"Repos with allow_concurrent = true in [[repos]] config can have multiple agents working simultaneously without worktree collisions; repos without it keep current serialized behavior.","status":"closed","priority":3,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:32Z","created_by":"Sam Catlow","updated_at":"2026-07-23T21:46:53Z","started_at":"2026-07-23T21:43:14Z","closed_at":"2026-07-23T21:46:53Z","close_reason":"Added config.Repo.AllowConcurrent (allow_concurrent toml key) and threaded it through taskDispatcher so opted-in repos skip the default FIFO same-repo serialization while still respecting containers.max_concurrency. Worktrees are already keyed per issue number, so no on-disk collision. Race-tested dispatcher coverage added.","dependencies":[{"issue_id":"archie-core-g1l","depends_on_id":"archie-core-u64","type":"blocks","created_at":"2026-07-24T05:36:37Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-j7v","title":"Persistent volumes with TTL for container/worktree storage","description":"Phase 2 of docs/prds/archie-core-v2-architecture.md. Current worktree lifecycle is fresh-clone-per-task with status-driven cleanup, no TTL. Add persistent volume support with TTL-based expiry to avoid repeated full clones for repeated work on the same repo.","acceptance_criteria":"Container/worktree storage can persist across tasks for the same repo up to a configured TTL, with automatic cleanup after expiry.","notes":"Implemented containers.volume_ttl (72h default, negative rejected); per-repo bare Git object caches seed dissociated issue worktrees when persistent_storage is enabled; Archie-owned repo Docker volumes are labeled and automatically reaped by age without touching cache/unowned volumes; daemon startup and cycles reap both storage layers; config example and v2 PRD updated. Validation: focused race tests count=5 passed for config/storage/worktree/daemon; go vet ./... passed; scoped staticcheck passed; gofumpt clean; go build ./... passed; full go test -race -count=1 ./... passed on repeat. Repository-wide golangci-lint remains red on 39 pre-existing findings tracked by archie-core-756. One non-reproducing NATS TempDir cleanup flake tracked by archie-core-340 after internal/nats passed race count=5.","status":"closed","priority":3,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:32Z","created_by":"Sam Catlow","updated_at":"2026-07-24T00:20:21Z","started_at":"2026-07-23T23:33:54Z","closed_at":"2026-07-24T00:20:21Z","close_reason":"Persistent container/worktree storage now has configured TTL expiry. Repos opting into persistent_storage retain an Archie-owned Docker repo volume and reuse a per-repo bare Git object cache to avoid repeated full network clones while keeping issue worktrees isolated via dissociated clones. containers.volume_ttl defaults to 72h; daemon startup/cycles automatically remove expired owned repo volumes and Git caches. Tests cover config default/validation, Docker ownership labels and selective expiry, cache reuse/isolation/expiry/path safety, and daemon TTL wiring. Full race suite, vet, build, formatting, and scoped staticcheck pass.","dependencies":[{"issue_id":"archie-core-j7v","depends_on_id":"archie-core-358","type":"blocks","created_at":"2026-07-24T05:36:37Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}