You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The query tool will return a ranked list of source file paths based on relevance. The output will look like this:
@@ -69,10 +71,22 @@ When you need to understand a new concept or feature area:
69
71
-`npm run ai:query -- -q "form validation patterns"`
70
72
-`npm run ai:query -- -q "how are stores implemented?"`
71
73
72
-
#### 2. Implementation Pattern (Query Before Coding)
74
+
#### 2. Targeted Content-Type Searching
75
+
Use the `--type` (`-t`) flag to focus your search on specific types of content. This is a powerful way to get more relevant results.
76
+
77
+
-**To find conceptual explanations:**
78
+
-`npm run ai:query -- -q "state management" -t guide`
79
+
-**To find concrete usage examples:**
80
+
-`npm run ai:query -- -q "Button component" -t example`
81
+
-**To dive deep into implementation details:**
82
+
-`npm run ai:query -- -q "afterSet hook" -t src`
83
+
84
+
**Strategy:** If a broad query returns too many source files and not enough conceptual documents, re-run the query with `-t guide`. Conversely, if you have read the guides but need to see the actual implementation, re-run with `-t src`.
85
+
86
+
#### 3. Implementation Pattern (Query Before Coding)
73
87
Before writing or modifying any code, **always** query the knowledge base first to:
74
-
- Look for existing similar implementations.
75
-
- Understand framework conventions for the task you are performing.
88
+
- Look for existing similar implementations (try `-t src` or `-t example`).
89
+
- Understand framework conventions for the task you are performing (try `-t guide`).
76
90
- Identify common patterns used in the relevant area of the codebase.
77
91
78
92
### When Queries Fail to Find Information
@@ -127,4 +141,4 @@ Integrate the query tool into your development process.
127
141
## 5. Session Maintenance
128
142
Your initialization is a snapshot in time. The codebase can change. If you pull new changes from the repository, you should consider re-running your initialization steps (reading `structure.json`, `Neo.mjs`, and `core/Base.mjs`) to ensure your understanding is up-to-date.
129
143
130
-
Furthermore, after pulling changes, the local knowledge base may be out of sync. You should run `npm run ai:build-kb` to re-embed the latest changes into the database.
144
+
Furthermore, after pulling changes, the local knowledge base may be out of sync. You should run `npm run ai:build-kb` to re-embed the latest changes into the database.
0 commit comments