bluera-knowledge 0.16.5 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,122 +0,0 @@
1
- {
2
- "description": "bluera-knowledge skill activation rules - technology-agnostic patterns for development scenarios",
3
- "version": 2,
4
- "globalExclusions": [
5
- { "keyword": "bluera-knowledge" },
6
- { "keyword": "bluera knowledge" },
7
- { "keyword": "/bluera-knowledge:" },
8
- { "regex": "mcp__.*bluera" }
9
- ],
10
- "threshold": 2,
11
- "skills": [
12
- {
13
- "name": "knowledge-search",
14
- "description": "How to query Bluera Knowledge for library/dependency questions",
15
- "triggers": [
16
- { "regex": "the\\s+\\w+(-\\w+)*\\s+(package|library|module|framework|dependency)", "weight": 3 },
17
- { "regex": "\\w+(-\\w+)*\\s+(package|library|module)\\s+(is|does|keeps|isn't|won't|doesn't)", "weight": 3 },
18
- { "regex": "\\w+(-\\w+)*\\s+(documentation|docs)\\b", "weight": 2 },
19
- { "regex": "error\\s+(from|in|with)\\s+(the\\s+)?\\w+(-\\w+)*\\s+(package|library|module)", "weight": 3 },
20
- { "regex": "(package|library|dependency|module)\\s+(is\\s+)?(throwing|throws|error|failing)", "weight": 3 },
21
- { "regex": "how\\s+does\\s+(the\\s+)?\\w+(-\\w+)*\\s+(package|library|module|framework)\\s+(handle|work|process)", "weight": 3 },
22
- { "regex": "what\\s+does\\s+(the\\s+)?\\w+(-\\w+)*\\s+(package|library)\\s+(do|return|accept)", "weight": 3 },
23
- { "regex": "why\\s+does\\s+(the\\s+)?\\w+(-\\w+)*\\s+(package|library|module)", "weight": 3 },
24
- { "regex": "(configure|config|settings)\\s+(for\\s+)?(the\\s+)?\\w+(-\\w+)*\\s+(package|library)", "weight": 3 },
25
- { "regex": "(upgraded?|updated?)\\s+(the\\s+)?\\w+(-\\w+)*\\s+(package|library|dependency)", "weight": 2 },
26
- { "regex": "integrate\\s+(the\\s+)?\\w+(-\\w+)*\\s+(package|library)", "weight": 2 },
27
- { "regex": "dependency\\s+(is|keeps|isn't|won't|error|issue|problem)", "weight": 2 },
28
- { "regex": "third[- ]party\\s+(library|package|code)", "weight": 2 }
29
- ],
30
- "exclusions": [
31
- { "keyword": "my code" },
32
- { "keyword": "our code" },
33
- { "keyword": "this function" },
34
- { "keyword": "this file" },
35
- { "keyword": "this component" },
36
- { "keyword": "this class" },
37
- { "keyword": "this project" },
38
- { "keyword": "I wrote" },
39
- { "keyword": "we wrote" },
40
- { "keyword": "my implementation" },
41
- { "keyword": "store" },
42
- { "keyword": "index" }
43
- ]
44
- },
45
- {
46
- "name": "when-to-query",
47
- "description": "Decision guide for Bluera Knowledge vs Grep/Read",
48
- "triggers": [
49
- { "keyword": "should i grep", "weight": 2 },
50
- { "keyword": "where should i look", "weight": 2 },
51
- { "keyword": "grep or search", "weight": 2 },
52
- { "keyword": "search or grep", "weight": 2 },
53
- { "regex": "where\\s+(should|do)\\s+i\\s+(find|look)\\s+.*(library|package|dependency)", "weight": 3 },
54
- { "regex": "is\\s+there\\s+a\\s+better\\s+way\\s+to\\s+(search|find)", "weight": 2 },
55
- { "regex": "should\\s+i\\s+(use\\s+)?grep\\s+(for|to)", "weight": 2 },
56
- { "regex": "how\\s+(do|should)\\s+i\\s+find.*(in|from)\\s+(a\\s+)?(library|package|dependency)", "weight": 3 }
57
- ],
58
- "exclusions": [
59
- { "keyword": "store" },
60
- { "keyword": "index" }
61
- ]
62
- },
63
- {
64
- "name": "search-optimization",
65
- "description": "Optimizing search parameters and token usage",
66
- "triggers": [
67
- { "keyword": "too many results", "weight": 2 },
68
- { "keyword": "too few results", "weight": 2 },
69
- { "keyword": "limit results", "weight": 2 },
70
- { "keyword": "reduce tokens", "weight": 2 },
71
- { "keyword": "token usage", "weight": 2 },
72
- { "keyword": "optimize search", "weight": 2 },
73
- { "keyword": "detail level", "weight": 2 },
74
- { "regex": "\\b(minimal|contextual|full)\\s+detail", "weight": 2 },
75
- { "regex": "\\b(vector|fts|hybrid)\\s+(search|mode)", "weight": 2 },
76
- { "regex": "narrow\\s+(down\\s+)?(the\\s+)?results", "weight": 2 },
77
- { "regex": "search\\s+(is\\s+)?(returning|giving)\\s+(too\\s+)?(many|few)", "weight": 2 }
78
- ],
79
- "exclusions": [
80
- { "regex": "--?(limit|detail|mode|threshold)\\s*=" }
81
- ]
82
- },
83
- {
84
- "name": "advanced-workflows",
85
- "description": "Multi-tool orchestration patterns",
86
- "triggers": [
87
- { "keyword": "multi-step", "weight": 2 },
88
- { "keyword": "orchestration", "weight": 2 },
89
- { "keyword": "job monitoring", "weight": 2 },
90
- { "keyword": "background job", "weight": 2 },
91
- { "keyword": "combine tools", "weight": 2 },
92
- { "keyword": "chain operations", "weight": 2 },
93
- { "regex": "chain.*searches", "weight": 2 },
94
- { "regex": "multiple.*searches", "weight": 2 },
95
- { "regex": "search.*then\\s+(summarize|extract|filter)", "weight": 2 },
96
- { "regex": "for\\s+each\\s+(search\\s+)?(result|match)", "weight": 2 }
97
- ],
98
- "exclusions": []
99
- },
100
- {
101
- "name": "store-lifecycle",
102
- "description": "Managing knowledge stores",
103
- "triggers": [
104
- { "keyword": "add store", "weight": 2 },
105
- { "keyword": "create store", "weight": 2 },
106
- { "keyword": "delete store", "weight": 2 },
107
- { "keyword": "remove store", "weight": 2 },
108
- { "keyword": "index store", "weight": 2 },
109
- { "keyword": "re-index", "weight": 2 },
110
- { "keyword": "reindex", "weight": 2 },
111
- { "keyword": "knowledge store", "weight": 2 },
112
- { "regex": "add\\s+(a\\s+)?(repo|repository|folder|directory)\\s+(to|for)\\s+(knowledge|indexing|search)", "weight": 3 },
113
- { "regex": "index\\s+(a|the|my)\\s+(repo|repository|folder|directory|library|package)", "weight": 2 },
114
- { "regex": "set\\s+up.*(knowledge|search)\\s*(store|index)", "weight": 2 },
115
- { "regex": "(backup|snapshot|archive).*(knowledge|search)\\s*(store|index)", "weight": 2 }
116
- ],
117
- "exclusions": [
118
- { "regex": "/bluera-knowledge:(add-repo|add-folder|remove-store|index)" }
119
- ]
120
- }
121
- ]
122
- }
@@ -1,273 +0,0 @@
1
- ---
2
- name: advanced-workflows
3
- description: Multi-tool orchestration patterns for complex Bluera Knowledge operations. Teaches progressive library exploration, adding libraries with job monitoring, handling large result sets, multi-store searches, and error recovery workflows.
4
- ---
5
-
6
- # Advanced Bluera Knowledge Workflows
7
-
8
- Master complex multi-tool operations that combine multiple MCP tools for efficient knowledge retrieval and management.
9
-
10
- ## Progressive Library Exploration
11
-
12
- When exploring a new library or codebase, use this pattern for efficient discovery:
13
-
14
- ### Workflow: Find Relevant Code in Unknown Library
15
-
16
- ```
17
- 1. list_stores()
18
- → See what's indexed, identify target store
19
-
20
- 2. get_store_info(store)
21
- → Get metadata: file paths, size, indexed files
22
- → Understand scope before searching
23
-
24
- 3. search(query, detail='minimal', stores=[target])
25
- → Get high-level summaries of relevant code
26
- → Review relevance scores (>0.7 = good match)
27
-
28
- 4. get_full_context(result_ids[top_3])
29
- → Deep dive on most relevant results only
30
- → Get complete code with full context
31
- ```
32
-
33
- **Example:**
34
-
35
- User: "How does Vue's computed properties work?"
36
-
37
- ```
38
- list_stores()
39
- → Found: vue, react, pydantic
40
-
41
- get_store_info('vue')
42
- → Path: .bluera/bluera-knowledge/repos/vue/
43
- → Files: 2,847 indexed
44
-
45
- search("computed properties", intent='find-implementation', detail='minimal', stores=['vue'])
46
- → Result 1: packages/reactivity/src/computed.ts (score: 0.92)
47
- → Result 2: packages/reactivity/__tests__/computed.spec.ts (score: 0.85)
48
- → Result 3: packages/runtime-core/src/apiComputed.ts (score: 0.78)
49
-
50
- get_full_context(['result_1_id', 'result_2_id'])
51
- → Full code for ComputedRefImpl class
52
- → Complete API implementation
53
-
54
- Now explain with authoritative source code.
55
- ```
56
-
57
- ## Adding New Library with Job Monitoring
58
-
59
- When adding large libraries, monitor indexing progress to know when search is ready:
60
-
61
- ### Workflow: Add Library and Wait for Index
62
-
63
- ```
64
- 1. create_store(url_or_path, name)
65
- → Returns: job_id
66
- → Background indexing starts
67
-
68
- 2. check_job_status(job_id)
69
- → Poll every 10-30 seconds
70
- → Status: 'pending' | 'running' | 'completed' | 'failed'
71
- → Progress: percentage, current file
72
-
73
- 3. When status='completed':
74
- list_stores()
75
- → Verify store appears in list
76
-
77
- 4. search(query, stores=[new_store], limit=5)
78
- → Test search works
79
- → Verify indexing quality
80
- ```
81
-
82
- **Example:**
83
-
84
- ```
85
- create_store('https://github.com/fastapi/fastapi', 'fastapi')
86
- → job_id: 'job_abc123'
87
- → Status: Indexing started in background
88
-
89
- # Poll for completion (typically 30-120 seconds for medium repos)
90
- check_job_status('job_abc123')
91
- → Status: running
92
- → Progress: 45% (processing src/fastapi/routing.py)
93
-
94
- # ... wait 30 seconds ...
95
-
96
- check_job_status('job_abc123')
97
- → Status: completed
98
- → Indexed: 487 files, 125k lines
99
-
100
- # Verify and test
101
- list_stores()
102
- → fastapi: 487 files, vector + FTS indexed
103
-
104
- search("dependency injection", stores=['fastapi'], limit=3)
105
- → Returns relevant FastAPI DI patterns
106
- → Store is ready for use!
107
- ```
108
-
109
- ## Handling Large Result Sets
110
-
111
- When initial search returns many results, use progressive detail to avoid context overload:
112
-
113
- ### Workflow: Progressive Detail Strategy
114
-
115
- ```
116
- 1. search(query, detail='minimal', limit=20)
117
- → Get summaries only (~100 tokens/result)
118
- → Review all 20 summaries quickly
119
-
120
- 2. Filter by relevance score:
121
- - Score > 0.8: Excellent match
122
- - Score 0.6-0.8: Good match
123
- - Score < 0.6: Possibly irrelevant
124
-
125
- 3. For top 3-5 results (score > 0.7):
126
- get_full_context(selected_ids)
127
- → Fetch complete code only for relevant items
128
- → Saves ~80% context vs fetching all upfront
129
-
130
- 4. If nothing relevant:
131
- search(refined_query, detail='contextual', limit=10)
132
- → Try different query with more context
133
- → Or broaden/narrow the search
134
- ```
135
-
136
- **Example:**
137
-
138
- ```
139
- # Initial broad search
140
- search("authentication middleware", detail='minimal', limit=20)
141
- → 20 results, scores ranging 0.45-0.92
142
- → Total context: ~2k tokens (minimal)
143
-
144
- # Filter by score
145
- Top results (>0.7):
146
- - Result 3: auth/jwt.ts (score: 0.92)
147
- - Result 7: middleware/authenticate.ts (score: 0.85)
148
- - Result 12: auth/session.ts (score: 0.74)
149
-
150
- # Get full code for top 3 only
151
- get_full_context(['result_3', 'result_7', 'result_12'])
152
- → Complete implementations for relevant files only
153
- → Context: ~3k tokens (vs ~15k if we fetched all 20)
154
-
155
- # Found what we needed! If not, would refine query and retry.
156
- ```
157
-
158
- ## Multi-Store Search with Ranking
159
-
160
- When searching across multiple stores, use ranking to prioritize results:
161
-
162
- ### Workflow: Cross-Library Search
163
-
164
- ```
165
- 1. search(query, limit=10)
166
- → Searches ALL stores
167
- → Returns mixed results ranked by relevance
168
-
169
- 2. Review store distribution:
170
- - If dominated by one store: might narrow to specific stores
171
- - If balanced: good cross-library perspective
172
-
173
- 3. For specific library focus:
174
- search(query, stores=['lib1', 'lib2'], limit=15)
175
- → Search only relevant libraries
176
- → Get more results from target libraries
177
- ```
178
-
179
- **Example:**
180
-
181
- User: "How do different frameworks handle routing?"
182
-
183
- ```
184
- # Search all indexed frameworks
185
- search("routing implementation", intent='find-implementation', limit=15)
186
- → Result mix:
187
- - express (score: 0.91)
188
- - fastapi (score: 0.89)
189
- - hono (score: 0.87)
190
- - vue-router (score: 0.82)
191
- - ...
192
-
193
- # All stores represented, good comparative view!
194
-
195
- # If user wants deeper FastAPI focus:
196
- search("routing implementation", stores=['fastapi', 'starlette'], limit=20)
197
- → More FastAPI/Starlette-specific results
198
- → Deeper exploration of Python framework routing
199
- ```
200
-
201
- ## Error Recovery
202
-
203
- When operations fail, use these recovery patterns:
204
-
205
- ### Workflow: Handle Indexing Failures
206
-
207
- ```
208
- 1. create_store() fails or job_status shows 'failed'
209
- → Check error message
210
- → Common issues:
211
- - Git auth required (private repo)
212
- - Invalid URL/path
213
- - Disk space
214
- - Network timeout
215
-
216
- 2. Recovery actions:
217
- - Auth issue: Provide credentials or use HTTPS
218
- - Invalid path: Verify URL/path exists
219
- - Disk space: delete_store() unused stores
220
- - Network: Retry with smaller repo or use --shallow
221
-
222
- 3. Verify recovery:
223
- list_stores() → Check store appeared
224
- search(test_query, stores=[new_store]) → Verify searchable
225
- ```
226
-
227
- **Example:**
228
-
229
- ```
230
- create_store('https://github.com/private/repo', 'my-repo')
231
- → job_id: 'job_xyz'
232
-
233
- check_job_status('job_xyz')
234
- → Status: failed
235
- → Error: "Authentication required for private repository"
236
-
237
- # Recovery: Use authenticated URL or SSH
238
- create_store('git@github.com:private/repo.git', 'my-repo')
239
- → job_id: 'job_xyz2'
240
-
241
- check_job_status('job_xyz2')
242
- → Status: completed
243
- → Success!
244
- ```
245
-
246
- ## Combining Workflows
247
-
248
- Real-world usage often combines these patterns:
249
-
250
- ```
251
- User: "I need to understand how Express and Hono handle middleware differently"
252
-
253
- 1. list_stores() → check if both indexed
254
- 2. If not: create_store() for missing framework(s)
255
- 3. check_job_status() → wait for indexing
256
- 4. search("middleware implementation", stores=['express', 'hono'], detail='minimal')
257
- 5. Review summaries, identify key files
258
- 6. get_full_context() for 2-3 most relevant from each framework
259
- 7. Compare implementations with full context
260
- ```
261
-
262
- This multi-step workflow is efficient, targeted, and conserves context.
263
-
264
- ## Best Practices
265
-
266
- 1. **Always start with detail='minimal'** - Get summaries first, full context selectively
267
- 2. **Monitor background jobs** - Don't search newly added stores until indexing completes
268
- 3. **Use intent parameter** - Helps ranking ('find-implementation' vs 'find-pattern' vs 'find-usage')
269
- 4. **Filter by stores when known** - Faster, more focused results
270
- 5. **Check relevance scores** - >0.7 is usually a strong match, <0.5 might be noise
271
- 6. **Progressive refinement** - Broad search → filter → narrow → full context
272
-
273
- These workflows reduce token usage, minimize tool calls, and get you to the right answer faster.
@@ -1,110 +0,0 @@
1
- ---
2
- name: knowledge-search
3
- description: Teaches how to use Bluera Knowledge for accessing library sources and reference material. Explains two approaches - vector search via MCP/slash commands for discovery, or direct Grep/Read access to cloned repos for precision. Shows when to use each method and example workflows for querying library internals.
4
- ---
5
-
6
- # Using Bluera Knowledge (BK)
7
-
8
- BK provides access to **definitive library sources** for your project dependencies.
9
-
10
- ## The Rule: Query BK for External Code
11
-
12
- **Any question about libraries, dependencies, or indexed reference material should query BK.**
13
-
14
- BK is:
15
- - **Cheap**: ~100ms response, unlimited queries, no rate limits
16
- - **Authoritative**: Actual source code, not blog posts or training data
17
- - **Complete**: Includes tests, examples, internal APIs, configuration
18
-
19
- ## Always Query BK For:
20
-
21
- **Library implementation:**
22
- - "How does Express handle middleware errors?"
23
- - "What does React's useEffect cleanup actually do?"
24
- - "How is Pydantic validation implemented?"
25
-
26
- **API signatures and options:**
27
- - "What parameters does axios.create() accept?"
28
- - "What options can I pass to hono.use()?"
29
- - "What's the signature of zod.object()?"
30
-
31
- **Error handling:**
32
- - "What errors can this library throw?"
33
- - "Why might this function return undefined?"
34
- - "What validation does Zod perform?"
35
-
36
- **Version-specific behavior:**
37
- - "What changed in React 18?"
38
- - "Is this deprecated in Express 5?"
39
- - "Does my version support this?"
40
-
41
- **Configuration:**
42
- - "What config options exist for Vite?"
43
- - "What are the default values?"
44
- - "What environment variables does this use?"
45
-
46
- **Testing:**
47
- - "How do the library authors test this?"
48
- - "How should I mock this in tests?"
49
- - "What edge cases do the tests cover?"
50
-
51
- **Performance:**
52
- - "Is this cached internally?"
53
- - "What's the complexity of this operation?"
54
- - "Does this run async or sync?"
55
-
56
- **Security:**
57
- - "How does this validate input?"
58
- - "Is this safe against injection?"
59
- - "How are credentials handled?"
60
-
61
- **Integration:**
62
- - "How do I integrate X with Y?"
63
- - "What's the idiomatic usage pattern?"
64
- - "How do examples in the library do this?"
65
-
66
- ## Two Ways to Access Library Sources
67
-
68
- ### 1. Vector Search (Discovery)
69
- Find concepts and patterns across indexed content:
70
- ```
71
- search("vue reactivity system")
72
- /bluera-knowledge:search "pydantic custom validators"
73
- ```
74
-
75
- ### 2. Direct File Access (Precision)
76
- Precise lookups in cloned library source:
77
- ```
78
- Grep: pattern="defineReactive" path=".bluera/bluera-knowledge/repos/vue/"
79
- Read: .bluera/bluera-knowledge/repos/pydantic/pydantic/validators.py
80
- ```
81
-
82
- Both are valid! Use vector search for discovery, Grep/Read for specific functions.
83
-
84
- ## DO NOT Query BK For:
85
-
86
- - **Your project code** → Use Grep/Read directly
87
- - **General concepts** → Use training data ("What is a closure?")
88
- - **Breaking news** → Use web search ("Latest React release")
89
-
90
- ## Example Workflow
91
-
92
- User: "How does Vue's computed properties work internally?"
93
-
94
- Claude:
95
- 1. Check stores: `list_stores` MCP tool → vue store exists
96
- 2. Vector search: `search("vue computed properties")` → finds computed.ts
97
- 3. Read file: `.bluera/bluera-knowledge/repos/vue/packages/reactivity/src/computed.ts`
98
- 4. Grep for implementation: pattern="class ComputedRefImpl"
99
- 5. Explain with authoritative source code examples
100
-
101
- ## Quick Reference
102
-
103
- ```
104
- [library] question → Query BK
105
- [your code] question → Grep/Read directly
106
- [concept] question → Training data
107
- [news/updates] question → Web search
108
- ```
109
-
110
- BK is cheap and fast. Query it liberally for library questions.