@duckmind/deepquark-darwin-arm64 0.9.82 → 0.9.88

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.
Files changed (70) hide show
  1. package/.deepquark/skills/bundled/knowledge-graph/SKILL.md +385 -0
  2. package/.deepquark/skills/bundled/knowledge-graph/STANDARDS.md +461 -0
  3. package/.deepquark/skills/bundled/knowledge-graph/lib/cli.ts +588 -0
  4. package/.deepquark/skills/bundled/knowledge-graph/lib/config.ts +630 -0
  5. package/.deepquark/skills/bundled/knowledge-graph/lib/connection-profile.ts +629 -0
  6. package/.deepquark/skills/bundled/knowledge-graph/lib/container.ts +756 -0
  7. package/.deepquark/skills/bundled/knowledge-graph/lib/mcp-client.ts +1310 -0
  8. package/.deepquark/skills/bundled/knowledge-graph/lib/output-formatter.ts +997 -0
  9. package/.deepquark/skills/bundled/knowledge-graph/lib/token-metrics.ts +335 -0
  10. package/.deepquark/skills/bundled/knowledge-graph/lib/transformation-log.ts +137 -0
  11. package/.deepquark/skills/bundled/knowledge-graph/lib/wrapper-config.ts +113 -0
  12. package/.deepquark/skills/bundled/knowledge-graph/server/.env.example +129 -0
  13. package/.deepquark/skills/bundled/knowledge-graph/server/compare-embeddings.ts +175 -0
  14. package/.deepquark/skills/bundled/knowledge-graph/server/config-falkordb.yaml +108 -0
  15. package/.deepquark/skills/bundled/knowledge-graph/server/config-neo4j.yaml +111 -0
  16. package/.deepquark/skills/bundled/knowledge-graph/server/diagnose.ts +483 -0
  17. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb-dev.yml +146 -0
  18. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb.yml +151 -0
  19. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev-local.yml +161 -0
  20. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev.yml +161 -0
  21. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j.yml +169 -0
  22. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-production.yml +128 -0
  23. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-test.yml +10 -0
  24. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose.yml +84 -0
  25. package/.deepquark/skills/bundled/knowledge-graph/server/entrypoint.sh +40 -0
  26. package/.deepquark/skills/bundled/knowledge-graph/server/install.ts +2054 -0
  27. package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-falkordb.yml +78 -0
  28. package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-neo4j.yml +88 -0
  29. package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose.yml +83 -0
  30. package/.deepquark/skills/bundled/knowledge-graph/server/test-all-llms-mcp.ts +387 -0
  31. package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-models.ts +201 -0
  32. package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-providers.ts +641 -0
  33. package/.deepquark/skills/bundled/knowledge-graph/server/test-graphiti-model.ts +217 -0
  34. package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-correct.ts +141 -0
  35. package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-llms-mcp.ts +386 -0
  36. package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-models.ts +173 -0
  37. package/.deepquark/skills/bundled/knowledge-graph/server/test-llama-extraction.ts +188 -0
  38. package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-final.ts +240 -0
  39. package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-live.ts +187 -0
  40. package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-session.ts +127 -0
  41. package/.deepquark/skills/bundled/knowledge-graph/server/test-model-combinations.ts +316 -0
  42. package/.deepquark/skills/bundled/knowledge-graph/server/test-ollama-models.ts +228 -0
  43. package/.deepquark/skills/bundled/knowledge-graph/server/test-openrouter-models.ts +460 -0
  44. package/.deepquark/skills/bundled/knowledge-graph/server/test-real-life-mcp.ts +311 -0
  45. package/.deepquark/skills/bundled/knowledge-graph/server/test-search-debug.ts +199 -0
  46. package/.deepquark/skills/bundled/knowledge-graph/tools/Install.md +104 -0
  47. package/.deepquark/skills/bundled/knowledge-graph/tools/README.md +120 -0
  48. package/.deepquark/skills/bundled/knowledge-graph/tools/knowledge-cli.ts +996 -0
  49. package/.deepquark/skills/bundled/knowledge-graph/tools/server-cli.ts +531 -0
  50. package/.deepquark/skills/bundled/knowledge-graph/workflows/BulkImport.md +514 -0
  51. package/.deepquark/skills/bundled/knowledge-graph/workflows/CaptureEpisode.md +242 -0
  52. package/.deepquark/skills/bundled/knowledge-graph/workflows/ClearGraph.md +392 -0
  53. package/.deepquark/skills/bundled/knowledge-graph/workflows/GetRecent.md +352 -0
  54. package/.deepquark/skills/bundled/knowledge-graph/workflows/GetStatus.md +373 -0
  55. package/.deepquark/skills/bundled/knowledge-graph/workflows/HealthReport.md +212 -0
  56. package/.deepquark/skills/bundled/knowledge-graph/workflows/InvestigateEntity.md +142 -0
  57. package/.deepquark/skills/bundled/knowledge-graph/workflows/OntologyManagement.md +201 -0
  58. package/.deepquark/skills/bundled/knowledge-graph/workflows/RunMaintenance.md +302 -0
  59. package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchByDate.md +255 -0
  60. package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchFacts.md +382 -0
  61. package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchKnowledge.md +374 -0
  62. package/.deepquark/skills/bundled/knowledge-graph/workflows/StixImport.md +212 -0
  63. package/bin/deepquark +0 -0
  64. package/package.json +1 -1
  65. package/.deepquark/skills/bundled/ge-payroll/SKILL.md +0 -153
  66. package/.deepquark/skills/bundled/ge-payroll/evals/evals.json +0 -23
  67. package/.deepquark/skills/bundled/ge-payroll/references/pain-points-improvements.md +0 -106
  68. package/.deepquark/skills/bundled/ge-payroll/references/process-detail.md +0 -217
  69. package/.deepquark/skills/bundled/ge-payroll/references/raci-stakeholders.md +0 -85
  70. package/.deepquark/skills/bundled/ge-payroll/references/timeline-mandays.md +0 -64
@@ -0,0 +1,382 @@
1
+ # Search Facts Workflow
2
+
3
+ **Objective:** Find relationships and connections between entities in the knowledge graph using semantic fact search.
4
+
5
+ ---
6
+
7
+ ## Step 1: Announce Workflow
8
+
9
+ ```bash
10
+ ~/.claude/Tools/SkillWorkflowNotification SearchFacts MadeinozKnowledgeSystem
11
+ ```
12
+
13
+ **Output to user:**
14
+ ```
15
+ Running the **SearchFacts** workflow from the **MadeinozKnowledgeSystem** skill...
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Step 2: Understand Relationship Query
21
+
22
+ **Identify what user wants to know:**
23
+
24
+ **Direct Relationship Questions:**
25
+ - "How are X and Y related?"
26
+ - "What's the connection between X and Y?"
27
+ - "Show me relationships about X"
28
+
29
+ **Implicit Connection Requests:**
30
+ - "Tell me about X's relationship to Y"
31
+ - "What connects X and Y"
32
+ - "Link between X and Y"
33
+
34
+ **Extract key entities:**
35
+ - Identify the two (or more) entities in question
36
+ - Note the type of relationship being sought
37
+ - Preserve context about the relationship domain
38
+
39
+ ---
40
+
41
+ ## Step 3: Build Fact Query
42
+
43
+ **Construct relationship search query:**
44
+
45
+ > **MCP Tool:** `search_memory_facts` (searches relationship "facts" in the graph)
46
+
47
+ ```typescript
48
+ // TypeScript: searchFacts() → calls MCP tool "search_memory_facts"
49
+ {
50
+ query: "relationship search terms here",
51
+ limit: 15 // Number of facts to return
52
+ }
53
+ ```
54
+
55
+ **Query Construction Tips:**
56
+ - Focus on the relationship, not just entities
57
+ - Use action verbs (connected, relates, influences, causes)
58
+ - Include domain context
59
+ - Keep queries specific to one relationship type
60
+
61
+ **Examples:**
62
+ - "FalkorDB Graphiti integration" → Good
63
+ - "how FalkorDB serves as backend for Graphiti" → Better
64
+ - "database backend" → Too vague
65
+
66
+ ---
67
+
68
+ ## Step 4: Execute Fact Search (CLI-First, MCP-Fallback)
69
+
70
+ ### Primary: Knowledge CLI (via Bash)
71
+
72
+ **ALWAYS try CLI first - it's more reliable and token-efficient (30%+ savings):**
73
+
74
+ ```bash
75
+ bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts search_facts "relationship query" 15
76
+ ```
77
+
78
+ **Arguments:**
79
+ 1. Query (required) - Natural language query about relationships
80
+ 2. Limit (optional) - Number of results (default: 5)
81
+
82
+ **Options:**
83
+ - `--raw` - Output raw JSON instead of compact format
84
+ - `--metrics` - Display token metrics after operation
85
+ - `--since <date>` - Filter to facts created after this date
86
+ - `--until <date>` - Filter to facts created before this date
87
+
88
+ **Date formats:** `today`, `yesterday`, `7d`, `1w`, `1m`, `2026-01-26`
89
+
90
+ ### Fallback: MCP Tool (Only if CLI fails)
91
+
92
+ **⚠️ Only use MCP if CLI returns connection/execution errors.**
93
+
94
+ ```typescript
95
+ search_facts({
96
+ query: relationshipQuery,
97
+ limit: 15
98
+ })
99
+ ```
100
+
101
+ **Entity type filters (when using direct MCP):**
102
+ - `Preference` - User preferences and settings
103
+ - `Procedure` - How-to guides and processes
104
+ - `Learning` - Knowledge from learning sessions
105
+ - `Research` - Findings from research
106
+ - `Decision` - Architectural and strategic decisions
107
+ - `Feature` - Feature implementations
108
+ - `Person`, `Organization`, `Location`, `Concept`, `Event`, `Document`
109
+
110
+ ---
111
+
112
+ ## Step 5: Present Relationship Results
113
+
114
+ **Format facts for user:**
115
+
116
+ ```markdown
117
+ 🔗 **Relationships Found: [Topic]**
118
+
119
+ **Direct Relationships:**
120
+ 1. **[Entity A]** → **[relation]** → **[Entity B]**
121
+ - Fact: [Description of the relationship]
122
+ - Confidence: [Score if available]
123
+ - Episode: [Source episode name]
124
+
125
+ 2. **[Entity C]** → **[relation]** → **[Entity D]**
126
+ - Fact: [Description of the relationship]
127
+ - Confidence: [Score if available]
128
+ - Episode: [Source episode name]
129
+
130
+ **Relationship Network:**
131
+ ```
132
+ [Entity A] --[relation]--> [Entity B]
133
+ |
134
+ +--[relation]--> [Entity C]
135
+ |
136
+ +--[relation]--> [Entity D]
137
+ ```
138
+
139
+ **Key Insights:**
140
+ - [Synthesize what these relationships reveal]
141
+ - [Note patterns or interesting connections]
142
+ - [Highlight temporal evolution if relevant]
143
+
144
+ 💡 **Implications:**
145
+ [What these relationships mean for understanding the topic]
146
+ ```
147
+
148
+ **If no relationships found:**
149
+ ```markdown
150
+ ❌ **No Relationships Found**
151
+
152
+ I couldn't find any direct relationships between "[Entity A]" and "[Entity B]" in your knowledge graph.
153
+
154
+ Suggestions:
155
+ 1. Check if both entities exist in your knowledge graph
156
+ 2. Try searching for each entity separately
157
+ 3. Look for indirect connections through other entities
158
+
159
+ Want to explore each entity individually?
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Best Practices
165
+
166
+ **When to Use SearchFacts vs SearchKnowledge:**
167
+ - **SearchFacts:** Focus on relationships, connections, edges between entities
168
+ - **SearchKnowledge:** Focus on entity summaries, what entities exist
169
+
170
+ **Relationship Query Patterns:**
171
+ - Use relational language (connects, influences, depends on)
172
+ - Specify relationship type if known (causes, requires, enables)
173
+ - Include temporal context (historically, currently, planned)
174
+
175
+ **Interpreting Results:**
176
+ - Look for relationship directionality (A→B vs B→A)
177
+ - Note relationship strength/confidence
178
+ - Consider temporal aspects (when was this relationship established?)
179
+ - Identify transitive relationships (A→B→C implies A→C)
180
+
181
+ ---
182
+
183
+ ## Examples
184
+
185
+ **Example 1: Direct Connection Query**
186
+
187
+ User: "How are FalkorDB and Graphiti related?"
188
+
189
+ Query: "FalkorDB Graphiti backend database relationship"
190
+
191
+ ```typescript
192
+ search_facts({
193
+ query: "FalkorDB backend database integration with Graphiti knowledge graph",
194
+ limit: 15
195
+ })
196
+ ```
197
+
198
+ Returns:
199
+ - FalkorDB → serves as → graph database backend for Graphiti
200
+ - Graphiti → uses → FalkorDB for efficient graph queries
201
+ - FalkorDB → provides → Redis-based graph storage for Graphiti
202
+
203
+ **Example 2: Procedural Dependencies**
204
+
205
+ User: "What connects PAI skills to MCP servers?"
206
+
207
+ Query: "PAI skills integration with MCP servers"
208
+
209
+ ```typescript
210
+ search_facts({
211
+ query: "PAI skills integration MCP servers external tools",
212
+ limit: 15
213
+ })
214
+ ```
215
+
216
+ Returns:
217
+ - PAI skills → integrate with → MCP servers for external capabilities
218
+ - MCP servers → provide → tools to PAI skill workflows
219
+ - Skills → can invoke → MCP tools through canonical structure
220
+
221
+ **Example 3: Influence/Causality**
222
+
223
+ User: "Why did we choose OpenAI for embeddings?"
224
+
225
+ Query: "OpenAI embeddings selection decision reasoning"
226
+
227
+ ```typescript
228
+ search_facts({
229
+ query: "OpenAI embeddings choice decision factors advantages",
230
+ limit: 15
231
+ })
232
+ ```
233
+
234
+ Returns:
235
+ - OpenAI → chosen for → high-quality embeddings
236
+ - Model quality → influenced → OpenAI selection
237
+ - Cost considerations → led to → gpt-4o-mini for embeddings
238
+
239
+ **Example 4: Temporal Relationships**
240
+
241
+ User: "How has my understanding of PAI evolved?"
242
+
243
+ Query: "PAI understanding learning progression over time"
244
+
245
+ ```typescript
246
+ search_facts({
247
+ query: "PAI concepts understanding evolution learning journey",
248
+ limit: 20
249
+ })
250
+ ```
251
+
252
+ Returns chronological relationships showing knowledge progression.
253
+
254
+ ---
255
+
256
+ ## Advanced Relationship Patterns
257
+
258
+ **Dependency Chains:**
259
+ ```typescript
260
+ // Find what depends on what
261
+ query: "procedure dependencies PAI skill workflows"
262
+ ```
263
+
264
+ **Influence Networks:**
265
+ ```typescript
266
+ // Find what influences what
267
+ query: "factors influencing architecture decisions"
268
+ ```
269
+
270
+ **Temporal Sequences:**
271
+ ```typescript
272
+ // Find before/after relationships
273
+ query: "learning progression prerequisites concepts"
274
+ ```
275
+
276
+ **Causal Relationships:**
277
+ ```typescript
278
+ // Find cause and effect
279
+ query: "what caused the decision to use Graphiti"
280
+ ```
281
+
282
+ **Part-Whole Relationships:**
283
+ ```typescript
284
+ // Find component relationships
285
+ query: "components of PAI skill structure"
286
+ ```
287
+
288
+ **Temporal Searches (with date filters):**
289
+ ```bash
290
+ # Facts from today
291
+ bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts search_facts "decisions" --since today
292
+
293
+ # Relationships from last 7 days
294
+ bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts search_facts "architecture" --since 7d
295
+
296
+ # Within a date range
297
+ bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts search_facts "integration" --since 2026-01-01 --until 2026-01-15
298
+
299
+ # Yesterday's relationships
300
+ bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts search_facts "learning" --since yesterday --until today
301
+ ```
302
+
303
+ ---
304
+
305
+ ## Visualizing Relationships
306
+
307
+ **Text-Based Network Diagrams:**
308
+ ```
309
+ [FalkorDB]
310
+ |
311
+ | serves as backend
312
+ |
313
+ v
314
+ [Graphiti]--uses-->[OpenAI Embeddings]
315
+ |
316
+ | provides
317
+ |
318
+ v
319
+ [Knowledge Graph]
320
+ ```
321
+
322
+ **Relationship Matrix:**
323
+ | Entity 1 | Relationship | Entity 2 | Context |
324
+ |----------|-------------|----------|---------|
325
+ | FalkorDB | backs | Graphiti | Database layer |
326
+ | Graphiti | uses | OpenAI | Embeddings |
327
+ | Graphiti | integrates with | PAI | Knowledge system |
328
+
329
+ ---
330
+
331
+ ## Troubleshooting
332
+
333
+ **No Relationships Found:**
334
+ - Entities may not both exist → Search for each separately
335
+ - No direct relationship → Look for indirect through third entities
336
+ - Different terminology → Try synonyms
337
+ - Relationship not captured yet → Check with GetRecent
338
+
339
+ **Too Many Weak Relationships:**
340
+ - Query too broad → Add specific relationship type
341
+ - Filter by confidence threshold if available
342
+ - Focus on strongest connections
343
+ - Narrow domain context
344
+
345
+ **Missing Expected Relationships:**
346
+ - Knowledge may not be captured → Capture episode about this relationship
347
+ - Relationship may be implicit → Make it explicit through capture
348
+ - Different entity names used → Check entity variations
349
+
350
+ **Connection Issues:**
351
+ ```bash
352
+ # Verify server is running
353
+ curl http://localhost:8000/health
354
+
355
+ # Check database status
356
+ curl http://localhost:8000/status
357
+
358
+ # Restart if needed
359
+ podman restart graphiti-knowledge-graph-mcp
360
+ ```
361
+
362
+ ---
363
+
364
+ ## Integration with Other Workflows
365
+
366
+ **Before Searching Facts:**
367
+ - Use `SearchKnowledge` to identify entities first
368
+ - Use `GetRecent` to understand current knowledge context
369
+ - Use `GetStatus` to verify graph is operational
370
+
371
+ **After Searching Facts:**
372
+ - Use `SearchKnowledge` to dive deeper into specific entities
373
+ - Use `CaptureEpisode` to add newly discovered relationships
374
+ - Use `GetEntityEdge` to get full details of a specific relationship
375
+
376
+ ---
377
+
378
+ **Related Workflows:**
379
+ - `SearchKnowledge.md` - Find entities and summaries
380
+ - `GetRecent.md` - Browse recent knowledge additions
381
+ - `CaptureEpisode.md` - Add new relationship information
382
+ - `GetStatus.md` - Check knowledge graph health