Frontmatter
| title | >- |
| author | neo-opus-ada |
| state | Merged |
| createdAt | May 23, 2026, 4:14 PM |
| updatedAt | May 23, 2026, 4:57 PM |
| closedAt | May 23, 2026, 4:57 PM |
| mergedAt | May 23, 2026, 4:57 PM |
| branches | dev ← tobiu/11844-daemons-folder-cleanup |
| url | https://github.com/neomjs/neo/pull/11849 |

Cycle-2 self-correction — pushed c322215b3.
CI unit job 26335211375 caught a regression my prior turn missed:
test/playwright/unit/ai/services/memory-core/MailboxService.spec.mjs:49
Error: Cannot find module '/home/runner/work/neo/neo/ai/daemons/SwarmHeartbeatService.mjs'
Root cause: my Sub 8 sweep regex from\s*['"]... caught all static imports of moved files but missed the dynamic await import('...') call-site in MailboxService.spec.mjs:49. Local re-run on the patched spec: 59/59 pass.
V-B-A lesson: previously I claimed "ZERO new failures with NEO_TEST_SKIP_CI=true" — that flag must have been skipping services/memory-core/MailboxService.spec.mjs locally. The CI's full unit suite is the authoritative gate, not the skip-filtered local subset. Future cross-cutting moves: sweep for both from '...' and await import('...') call-sites.
Remaining check status (pre-fix run):
- 1 failed:
MailboxService addMessage enforces identity and routes correctly— fixed by this commit - 2 flaky:
VectorService.tenantStamping,WriteSideInvariant MailboxService.addMessage succeeds— both passed on retry; pre-existing intermittents
Awaiting CI re-run.

No review body provided.
Authored by Claude Opus 4.7 (Claude Code). Session 5572d9a5-558d-4bea-b416-e31496c289c4.
FAIR-band: in-band [verify @ merge-gate]
Resolves #11844
Summary
Sub 8 of Epic #11831. Folder-structure cleanup: move Orchestrator's cluster into self-contained
ai/daemons/orchestrator/{,services/}folder per @tobiu chief-architect direction. Entry-script renamedorchestrator-daemon.mjs→daemon.mjs(folder context provides daemon identity; eliminatesorchestrator/orchestrator-daemon.mjsredundancy).Source moves (13)
ai/daemons/Orchestrator.mjsai/daemons/orchestrator/Orchestrator.mjsai/daemons/TaskDefinitions.mjsai/daemons/orchestrator/TaskDefinitions.mjsai/scripts/orchestrator-daemon.mjsai/daemons/orchestrator/daemon.mjs(rename)ai/daemons/DreamService.mjsai/daemons/orchestrator/services/DreamService.mjsai/daemons/SwarmHeartbeatService.mjsai/daemons/orchestrator/services/SwarmHeartbeatService.mjsai/daemons/services/BackupCoordinatorService.mjsai/daemons/orchestrator/services/BackupCoordinatorService.mjsai/daemons/services/CadenceEngine.mjsai/daemons/orchestrator/services/CadenceEngine.mjsai/daemons/services/HeavyMaintenanceLeaseService.mjsai/daemons/orchestrator/services/HeavyMaintenanceLeaseService.mjsai/daemons/services/PrimaryRepoSyncService.mjsai/daemons/orchestrator/services/PrimaryRepoSyncService.mjsai/daemons/services/ProcessSupervisorService.mjsai/daemons/orchestrator/services/ProcessSupervisorService.mjsai/daemons/services/SummarizationCoordinatorService.mjsai/daemons/orchestrator/services/SummarizationCoordinatorService.mjsai/daemons/services/TaskStateService.mjsai/daemons/orchestrator/services/TaskStateService.mjsTest moves (12, mirror source structure)
All affected specs moved into
test/playwright/unit/ai/daemons/orchestrator/{,services/}/paths.Consumer updates
ai/services.mjs—DreamService+HeavyMaintenanceLeaseServiceimport pathsbuildScripts/ai/files —backup.mjs,ingestTenant.mjs,roadmapPlanner.mjs,runGoldenPath.mjs,runSandman.mjs,syncGithubWorkflow.mjs,syncKnowledgeBase.mjspackage.json—ai:orchestratorscript path →./ai/daemons/orchestrator/daemon.mjsDeltas from ticket
None — implementation matches #11844 ACs verbatim.
Evidence: L1 (119/119 unit tests pass) → L1 required for substrate refactor (pure structural move; no behavioral change).
Test Evidence
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/→ 119/119 pass (6.6s)Covers: Orchestrator.spec (26) + daemon.spec (10) + 9 service specs (BackupCoordinator/Cadence/Dream/DreamServiceGoldenPath/HeavyMaintenanceLease/PrimaryRepoSync/ProcessSupervisor/Summarization/SwarmHeartbeat/TaskState).
Post-Merge Validation
npm run ai:orchestratorto verify daemon entry path resolves