P0: Refactor cmd/archied/main.go - violates organisation.md wiring rule #1417

Closed
opened 2026-10-27 13:40:18 +00:00 by sam · 0 comments
Owner

cmd/archied/main.go is 1085 lines of substantive wiring, directly violating organisation.md's rule: 'cmd/* MUST NOT contain substantive wiring'.

This is the migration docs' own stated next chunk: internal/app/{archied,agentworker} (not yet started).

Need to:

  • Extract wiring logic from cmd/archied/main.go
  • Create internal/app/archied/ package
  • Create internal/app/agentworker/ package
  • Move dependency injection and lifecycle management into app layer
  • cmd/archied/main.go should only contain CLI flag parsing, OS signal traps, and entry point routing

Blocked by: nothing (but is foundational for migration work)

Close reason

Extracted the full cmd/archied wiring package into internal/app/archied (matching the sibling internal/app/agentworker pattern); cmd/archied/main.go is now 18 lines (codesearch-helper dispatch + call into archied.Run()). Fixed two architecture tests still hardcoded to the old cmd/archied path. task check passes clean.


Imported from beads archie-core-kg1w · GitHub #652 · type task · priority P0 · created 2026-08-28 · closed 2026-08-31

cmd/archied/main.go is 1085 lines of substantive wiring, directly violating organisation.md's rule: 'cmd/* MUST NOT contain substantive wiring'. This is the migration docs' own stated next chunk: internal/app/{archied,agentworker} (not yet started). Need to: - Extract wiring logic from cmd/archied/main.go - Create internal/app/archied/ package - Create internal/app/agentworker/ package - Move dependency injection and lifecycle management into app layer - cmd/archied/main.go should only contain CLI flag parsing, OS signal traps, and entry point routing Blocked by: nothing (but is foundational for migration work) ### Close reason Extracted the full cmd/archied wiring package into internal/app/archied (matching the sibling internal/app/agentworker pattern); cmd/archied/main.go is now 18 lines (codesearch-helper dispatch + call into archied.Run()). Fixed two architecture tests still hardcoded to the old cmd/archied path. task check passes clean. --- _Imported from beads `archie-core-kg1w` · GitHub #652 · type task · priority P0 · created 2026-08-28 · closed 2026-08-31_
sam added the criticaltask labels 2026-10-27 13:40:18 +00:00
sam self-assigned this 2026-10-27 13:40:18 +00:00
sam closed this issue 2026-10-27 13:40:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1417