@comfanion/workflow 4.9.0 → 4.9.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/workflow",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
4
4
  "description": "Initialize OpenCode Workflow system for AI-assisted development with semantic code search",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "3.0.0",
3
- "buildDate": "2026-01-24T09:33:58.989Z",
3
+ "buildDate": "2026-01-24T09:48:49.653Z",
4
4
  "files": [
5
5
  "config.yaml",
6
6
  "FLOW.yaml",
@@ -119,8 +119,14 @@ permission:
119
119
  </prefer-lsp-when>
120
120
  </lsp-exploration>
121
121
 
122
- <codesearch-exploration hint="Semantic search with MULTI-INDEX support">
123
- <check>codeindex({ action: "list" }) → See all indexes. If none, suggest: npx opencode-workflow index --index code</check>
122
+ <codesearch-exploration hint="ALWAYS TRY SEMANTIC SEARCH FIRST">
123
+ <critical>
124
+ BEFORE using grep/glob, ALWAYS check: codeindex({ action: "list" })
125
+ If indexes exist → USE codesearch instead of grep!
126
+ codesearch returns 5-10 relevant files vs 100+ grep matches
127
+ </critical>
128
+
129
+ <first-step>codeindex({ action: "list" }) → Check if indexes exist</first-step>
124
130
 
125
131
  <indexes hint="Different indexes for different content types">
126
132
  <index name="code">Source code (*.go, *.ts, *.py) - functions, classes, logic</index>
@@ -175,14 +181,22 @@ permission:
175
181
  - Regex pattern matching needed
176
182
  </use-grep-when>
177
183
 
178
- <exploration-strategy>
179
- 1. codeindex({ action: "list" }) → Check what indexes exist
180
- 2. codesearch({ query: "high-level concept", index: "code" }) → Find relevant code areas
181
- 3. codesearch({ query: "explanation", index: "docs" }) → Find related documentation
182
- 4. Read top results to understand structure
183
- 5. lsp documentSymbol on key files → Get detailed structure
184
- 6. grep for specific patterns if needed
184
+ <exploration-strategy priority="MANDATORY">
185
+ 1. FIRST: codeindex({ action: "list" }) → Check what indexes exist
186
+ 2. IF indexes exist:
187
+ - codesearch({ query: "concept", index: "code" }) → 5-10 relevant files (NOT 100+ grep matches!)
188
+ - Read top 3-5 results
189
+ - Done! Much faster than grep
190
+ 3. IF no indexes:
191
+ - Suggest: "Index not found. Create with: codeindex({ action: 'reindex', index: 'code' })"
192
+ - Fall back to grep/glob
193
+ 4. Use grep ONLY for exact string matches (function names, imports)
185
194
  </exploration-strategy>
195
+
196
+ <efficiency-comparison>
197
+ BAD: grep "category.*mapping" → 100 matches → read 20 files → slow!
198
+ GOOD: codesearch({ query: "category mapping logic" }) → 5 files → fast!
199
+ </efficiency-comparison>
186
200
  </codesearch-exploration>
187
201
 
188
202
  </agent>