LearnNewsExamplesServices
Frontmatter
id7896
titleIndex `ai/` directory in Knowledge Base via JSDoc
stateClosed
labels
documentationenhancementai
assigneestobiu
createdAtNov 24, 2025, 1:37 PM
updatedAtNov 24, 2025, 2:07 PM
githubUrlhttps://github.com/neomjs/neo/issues/7896
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 24, 2025, 2:02 PM

Index ai/ directory in Knowledge Base via JSDoc

Closed v11.10.0 documentationenhancementai
tobiu
tobiu commented on Nov 24, 2025, 1:37 PM

Index ai/ directory in Knowledge Base via JSDoc

The ai/ directory contains the SDK, MCP servers, and examples, which are critical parts of the platform. This content should be:

  1. Visible in the Docs App for developers.
  2. Indexed in the AI Knowledge Base for agents.

The current DatabaseService.mjs consumes docs/output/all.json, which is generated by buildScripts/docs/jsdocx.mjs. Currently, jsdocx.mjs only scans src/ and apps/.

Goal

Extend buildScripts/docs/jsdocx.mjs to parse the ai/ directory.

Tasks

  • Update buildScripts/docs/jsdocx.mjs to include ai/**/*.mjs in the input files.
  • Adjust the neoStructure and processPath logic in jsdocx.mjs to correctly categorize and name ai namespace items (e.g., Neo.ai.services).
  • Ensure that the resulting docs/output/all.json contains the AI classes.
  • Verify that DatabaseService picks up these new items (it should happen automatically if all.json is populated correctly).
tobiu added the documentation label on Nov 24, 2025, 1:37 PM
tobiu added the enhancement label on Nov 24, 2025, 1:37 PM
tobiu added the ai label on Nov 24, 2025, 1:37 PM
tobiu cross-referenced by #7887 on Nov 24, 2025, 1:38 PM
tobiu assigned to @tobiu on Nov 24, 2025, 2:00 PM
tobiu closed this issue on Nov 24, 2025, 2:02 PM
tobiu
tobiu Nov 24, 2025, 2:07 PM

Input from Gemini:

✦ The implementation is complete and verified.

Changes:

  1. Documentation (ai directory):

    • Modified buildScripts/docs/jsdocx.mjs to include ai/**/*.mjs.
    • Added logic to correctly map the ai directory to the Neo.ai namespace in the JSDoc output.
    • Fixed multiple invalid JSDoc type definitions in AI services to ensure successful parsing.
    • Verified that docs/output/all.json now contains Neo.ai entries.
  2. Tests (test/playwright directory):

    • Updated ai/mcp/server/knowledge-base/openapi.yaml to add test as a valid query type.
    • Enhanced DatabaseService.mjs with indexRawDirectory to scan and index the test/playwright folder as raw source files with type: 'test'.

Verification:

  • A Knowledge Base sync was performed using the Code Execution pattern (sync_knowledge_base.mjs).
  • Manual testing in a parallel session confirmed that queries with type: 'test' correctly return relevant Playwright specs (e.g., test/playwright/unit/button/Base.spec.mjs for query "button").

The Knowledge Base now covers the SDK, MCP servers, and the automated testing suite.