LearnNewsExamplesServices
Frontmatter
id7902
titleRefactor Knowledge Base parsing logic into domain-specific Singletons
stateClosed
labels
airefactoring
assigneestobiu
createdAtNov 25, 2025, 3:57 PM
updatedAtNov 25, 2025, 4:33 PM
githubUrlhttps://github.com/neomjs/neo/issues/7902
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 25, 2025, 4:33 PM

Refactor Knowledge Base parsing logic into domain-specific Singletons

Closed v11.11.0 airefactoring
tobiu
tobiu commented on Nov 25, 2025, 3:57 PM

Goal: Decompose the "God Class" DatabaseService.mjs by extracting parsing logic into dedicated, domain-intent focused classes.

Architecture:

  • Create a new namespace Neo.ai.mcp.server.knowledge_base.parser.
  • Ensure all new parsers are Neo.core.Base singletons.

New Classes:

  1. parser/TestParser.mjs:

    • Intent: Extract knowledge from automated tests.
    • Scope: Move the parseTestFile logic and acorn dependency here.
  2. parser/DocumentationParser.mjs:

    • Intent: Extract knowledge from written guides and learning content.
    • Scope: Move the Markdown section-splitting logic here.
  3. parser/ApiParser.mjs:

    • Intent: Extract knowledge from the codebase structure (API).
    • Scope: Move the docs/output/all.json processing logic here.

Impact: DatabaseService.mjs should become an orchestrator that delegates to these services, significantly reducing its LOC and complexity to a manageable level.

tobiu added the ai label on Nov 25, 2025, 3:57 PM
tobiu added the refactoring label on Nov 25, 2025, 3:57 PM
tobiu assigned to @tobiu on Nov 25, 2025, 4:00 PM
tobiu referenced in commit c14cbc7 - "Refactor Knowledge Base parsing logic into domain-specific Singletons #7902" on Nov 25, 2025, 4:33 PM
tobiu closed this issue on Nov 25, 2025, 4:33 PM