LearnNewsExamplesServices
Frontmatter
id10028
titleFinalize DreamService Decomposition: Tri-Vector & Topology Extractors
stateClosed
labels
enhancementairefactoringarchitecture
assigneestobiu
createdAtApr 15, 2026, 2:17 PM
updatedAtMay 12, 2026, 4:10 AM
githubUrlhttps://github.com/neomjs/neo/issues/10028
authortobiu
commentsCount0
parentIssue10013
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[x] 10014 [Sub-Epic] Macro Knowledge Base & Semantic Gap Inference
closedAtApr 15, 2026, 3:06 PM

Finalize DreamService Decomposition: Tri-Vector & Topology Extractors

Closed v13.0.0/archive-v13-0-0-chunk-4 enhancementairefactoringarchitecture
tobiu
tobiu commented on Apr 15, 2026, 2:17 PM

Architectural Follow-Up: DreamService LLM Extraction Modules

Context

Following PR #10027, DreamService was successfully reduced from ~1,400 to ~570 lines by decoupling node ingestion, file generation, and garbage collection. However, the class still natively implements the raw LLM prompting, JSON extraction logic, and hallucination recovery loops for two critical phases:

  1. executeTriVectorExtraction
  2. extractTopology

Proposed Architecture

To achieve the "~200-line Execution Controller" objective, we must extract these final cognitive operations into independent SDK modules:

  • SemanticGraphExtractor.mjs: Handles the TriVector parsing (Semantic Graph, Namespace, Roadmap Impact).
  • TopologyInferenceEngine.mjs: Handles scanning episodic documents for structural conflicts (Superseded, Duplicates) against active issues.

Implementation Requirements

  1. Extract both methods into dedicated Neo.core.Base subclasses inside ai/daemons/services/.
  2. Wire these newly created services into the central SDK (ai/services.mjs).
  3. Prune DreamService down to orchestrate these passes via simple await calls.
  4. Ensure no Playwright regressions occur in deterministic testing.

Avoided Pitfalls

  • The Kitchen Sink Anti-Pattern: Doing this extraction ensures future schema tweaks to the LLM (e.g., adding a new graph edge relationship type) do not bloat the fundamental process loop runner.
tobiu added the enhancement label on Apr 15, 2026, 2:17 PM
tobiu added the ai label on Apr 15, 2026, 2:17 PM
tobiu added the refactoring label on Apr 15, 2026, 2:17 PM
tobiu added the architecture label on Apr 15, 2026, 2:17 PM
tobiu added parent issue #10013 on Apr 15, 2026, 2:18 PM
tobiu marked this issue as blocking #10014 on Apr 15, 2026, 2:18 PM
tobiu referenced in commit e876e72 - "feat(ai): Modularize DreamService into standalone singletons (#10028)" on Apr 15, 2026, 2:41 PM
tobiu cross-referenced by PR #10029 on Apr 15, 2026, 2:41 PM
tobiu referenced in commit 210a7c1 - "feat(ai): Modularize DreamService into standalone singletons (#10028) (#10029)" on Apr 15, 2026, 3:06 PM
tobiu closed this issue on Apr 15, 2026, 3:06 PM
tobiu assigned to @tobiu on Apr 18, 2026, 5:20 PM