LearnNewsExamplesServices
Frontmatter
titlefix(ai): remove low-ROI DOC_GAP detection from DreamService (#9993)
authortobiu
stateMerged
createdAtApr 14, 2026, 12:01 PM
updatedAtApr 14, 2026, 12:22 PM
closedAtApr 14, 2026, 12:22 PM
mergedAtApr 14, 2026, 12:22 PM
branchesdevagent/9993-remove-doc-gap
urlhttps://github.com/neomjs/neo/pull/9996
Merged
tobiu
tobiu commented on Apr 14, 2026, 12:01 PM

Architectural Context

During the evaluation of the DreamService REM pipeline, we identified that the [DOC_GAP] inference mechanism suffered from significant structural flaws and generated high-volume false positives. The previous logic verified Graph Nodes against the jsdocx output (structure.json / all.json).

However, jsdocx is designed for the human-centric Docs App and inherently filters out entities lacking JSDoc blocks, making it an unreliable manifest for tracking the absolute truth of our Abstract Syntax Topology.

Additionally, optimizing the Swarm Intelligence to chase missing JSDoc blocks yielded a strictly negative ROI. Agents parse AST natively, and documentation gaps are automatically closed point-in-time via the "Anchor & Echo" Protocol (Knowledge Base Enhancement Strategy) during active development.

Changes

  • Removed [DOC_GAP] Logic: Deleted the jsdocx JSON parsing and [DOC_GAP] node iteration from DreamService.executeCapabilityGapInference.
  • Aligning Pipeline to ROI: Capability Gap Inference now correctly focuses processing power on empirical verification gaps ([TEST_GAP]) and architectural strategy ([GUIDE_GAP]).
  • Unit Test Cleanup: Removed obsolete assertions from DreamService.spec.mjs.

Future Trajectory

By removing this noisy metric, we clear the execution path to implement Epic #9673. Instead of measuring "missing JSDoc", future iterations will leverage SourceParser.mjs to inject [TOPOLOGY_GAP] edges natively linking prototypes, singletons, and reactive state flows.

Resolves #9993

tobiu
tobiu commented on Apr 14, 2026, 12:20 PM

Input from Antigravity (Gemini 3.1 Pro):

✦ # PR Review Summary

Status: Approved

The architectural pivot to eliminate [DOC_GAP] inference from the DreamService REM pipeline is mathematically and structurally sound. The associated documentation drift has been thoroughly resolved across all knowledge base guides and unit tests.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 100 - Successfully deprecates human-centric JS documentation tracking in favor of LLM/AST-native graph analysis.
  • [CONTENT_COMPLETENESS]: 100 - "Fat Ticket" protocol was strictly adhered to in the PR description, and no missing variables were left.
  • [EXECUTION_QUALITY]: 100 - The logic removal was precise; Playwright tests were correctly updated to reflect the architectural branch.
  • [PRODUCTIVITY]: 100 - Solved the specific DOC_GAP noise issue fully as mandated.
  • [IMPACT]: 60 - Realigns the REM pipeline for the upcoming Epic #9673 (Topology Gaps).
  • [COMPLEXITY]: 30 - Straightforward logic deprecation with cross-repository documentation updates.
  • [EFFORT_PROFILE]: Quick Win - High ROI reduction in noise with low complexity code removal.

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #9993
  • Related Graph Nodes: DreamService, [DOC_GAP], Epic #9673 ([TOPOLOGY_GAP])

🧠 Graph Ingestion Notes

  • [KB_GAP]: None.
  • [TOOLING_GAP]: The local memory core database had to be surgically purged via an atomic better-sqlite3 script (purgeDocGaps.mjs) to avoid massive context loop delays and data loss from a destructive Sandman re-digestion.
  • [RETROSPECTIVE]: Excellent execution on recognizing that the JS-Doc-based tracking was generating unnecessary noise and that Native AST Parsing sets a far superior vector for the Agent OS routing. A solid step backward to jump two steps forward.

📋 Required Actions

To proceed with merging, please address the following:

  • All required actions completed. The PR is ready to merge.

Merging is approved. Proceeding with handoff.