LearnNewsExamplesServices
Frontmatter
id7300
titleRefactor Knowledge Base Schema to Fix Type Regression
stateClosed
labels
bug
assigneestobiu
createdAtSep 28, 2025, 3:13 PM
updatedAtSep 28, 2025, 3:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/7300
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 28, 2025, 3:31 PM

Refactor Knowledge Base Schema to Fix Type Regression

Closed v11.0.0 bug
tobiu
tobiu commented on Sep 28, 2025, 3:13 PM

The AI query tool (npm run ai:query) fails for --type example because the knowledge base creation script does not correctly assign a high-level type to items originating from the /examples directory. The current implementation uses type to store the specific code construct (class, method), creating a conflict.

This ticket refactors the knowledge base schema to solve this regression and make the data model more robust.

Tasks:

  1. Modify buildScripts/ai/createKnowledgeBase.mjs:

    • For each chunk generated from the JSDoc output (all.json), add a type property (src, example, etc.) based on its source file path.
    • Rename the existing type property (which currently holds class, method, etc.) to kind to avoid conflicts.
    • For non-JSDoc chunks (guides, releases, tickets), ensure they also have both a type and a kind property (where both can have the same value, e.g., type: 'guide', kind: 'guide').
  2. Verify buildScripts/ai/queryKnowledgeBase.mjs:

    • Confirm that the existing query logic, which filters on the type property, works correctly with the new schema without modification.
tobiu assigned to @tobiu on Sep 28, 2025, 3:13 PM
tobiu added the bug label on Sep 28, 2025, 3:13 PM
tobiu referenced in commit eca8527 - "Refactor Knowledge Base Schema to Fix Type Regression #7300" on Sep 28, 2025, 3:30 PM
tobiu closed this issue on Sep 28, 2025, 3:31 PM