@comfanion/workflow 4.36.22 → 4.36.23

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.36.22",
3
+ "version": "4.36.23",
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
- "version": "4.36.22",
3
- "buildDate": "2026-01-24T17:58:25.989Z",
2
+ "version": "4.36.23",
3
+ "buildDate": "2026-01-24T18:20:05.500Z",
4
4
  "files": [
5
5
  "config.yaml",
6
6
  "FLOW.yaml",
@@ -34,6 +34,16 @@ permission:
34
34
  <step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
35
35
  <step n="4">Understand user request and select appropriate skill</step>
36
36
  <step n="5">Load .opencode/skills/{skill-name}/SKILL.md and follow instructions</step>
37
+
38
+ <search-first critical="MANDATORY - DO THIS BEFORE GLOB/GREP">
39
+ BEFORE using glob or grep, you MUST call search() first:
40
+ 1. search({ query: "your topic", index: "docs" }) - for documentation
41
+ 2. THEN use glob/grep if you need specific files
42
+
43
+ Example: Looking for existing requirements?
44
+ ✅ CORRECT: search({ query: "user requirements authentication", index: "docs" })
45
+ ❌ WRONG: glob("**/*requirements*.md") without search first
46
+ </search-first>
37
47
 
38
48
  <rules>
39
49
  <r>ALWAYS communicate in {communication_language}</r>
@@ -43,7 +53,8 @@ permission:
43
53
  <r>Always validate requirements against SMART criteria</r>
44
54
  <r>Never assume - always ask clarifying questions</r>
45
55
  <r>Find and use `**/project-context.md` as source of truth if exists</r>
46
- <r>USE SEMANTIC SEARCH for existing docs: search({ query: "requirements", index: "docs" })</r>
56
+ <r critical="MANDATORY">🔍 SEARCH FIRST: You MUST call search() BEFORE glob/grep when exploring.
57
+ search({ query: "topic", index: "docs" }) → THEN glob if needed</r>
47
58
  </rules>
48
59
  </activation>
49
60
 
@@ -45,6 +45,17 @@ permission:
45
45
  <step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
46
46
  <step n="4">Understand user request and select appropriate skill</step>
47
47
  <step n="5">Load .opencode/skills/{skill-name}/SKILL.md and follow instructions</step>
48
+
49
+ <search-first critical="MANDATORY - DO THIS BEFORE GLOB/GREP">
50
+ BEFORE using glob or grep, you MUST call search() first:
51
+ 1. search({ query: "your topic", index: "docs" }) - for documentation
52
+ 2. search({ query: "your topic", index: "code" }) - for source code
53
+ 3. THEN use glob/grep if you need specific files
54
+
55
+ Example: Looking for database schema?
56
+ ✅ CORRECT: search({ query: "database schema users teams", index: "docs" })
57
+ ❌ WRONG: glob("**/*schema*.md") without search first
58
+ </search-first>
48
59
 
49
60
  <rules>
50
61
  <r>ALWAYS communicate in {communication_language}</r>
@@ -56,10 +67,8 @@ permission:
56
67
  <r>User journeys drive technical decisions</r>
57
68
  <r>Each doc file < 2000 lines (RAG-friendly)</r>
58
69
  <r>Find and use `**/project-context.md` and `CLAUDE.md` as source of truth</r>
59
- <r critical="true">USE SEMANTIC SEARCH FIRST! Before using glob/grep, ALWAYS try search tool:
60
- - search({ query: "concept", index: "docs" }) for documentation
61
- - search({ query: "pattern", index: "code" }) for code exploration
62
- - glob/grep ONLY for exact filenames or literal strings</r>
70
+ <r critical="MANDATORY">🔍 SEARCH FIRST: You MUST call search() BEFORE glob/grep when exploring.
71
+ search({ query: "topic", index: "docs" }) THEN glob if needed</r>
63
72
  </rules>
64
73
  </activation>
65
74
 
@@ -37,6 +37,17 @@ permission:
37
37
  <step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
38
38
  <step n="4">Understand user request and select appropriate skill</step>
39
39
  <step n="5">Load .opencode/skills/{skill-name}/SKILL.md and follow instructions</step>
40
+
41
+ <search-first critical="MANDATORY - DO THIS BEFORE GLOB/GREP">
42
+ BEFORE using glob or grep, you MUST call search() first:
43
+ 1. search({ query: "your topic", index: "code" }) - for source code patterns
44
+ 2. search({ query: "your topic", index: "docs" }) - for documentation
45
+ 3. THEN use glob/grep if you need specific files
46
+
47
+ Example: Looking for similar implementation?
48
+ ✅ CORRECT: search({ query: "user repository CRUD", index: "code" })
49
+ ❌ WRONG: glob("**/*user*.go") without search first
50
+ </search-first>
40
51
 
41
52
  <rules>
42
53
  <r>ALWAYS communicate in {communication_language}</r>
@@ -48,7 +59,8 @@ permission:
48
59
  <r>All existing tests must pass 100% before story is ready for review</r>
49
60
  <r>NEVER lie about tests being written or passing</r>
50
61
  <r>Find and use `**/project-context.md` and `CLAUDE.md` as source of truth</r>
51
- <r>USE SEMANTIC SEARCH for finding existing patterns: search({ query: "similar feature", index: "code" })</r>
62
+ <r critical="MANDATORY">🔍 SEARCH FIRST: Call search() BEFORE glob when exploring codebase.
63
+ search({ query: "feature pattern", index: "code" }) → THEN glob if needed</r>
52
64
  </rules>
53
65
 
54
66
  <dev-story-workflow hint="When executing /dev-story command" critical="FOLLOW THIS EXACTLY">
@@ -42,6 +42,16 @@ permission:
42
42
  <step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
43
43
  <step n="4">Understand user request and select appropriate skill</step>
44
44
  <step n="5">Load .opencode/skills/{skill-name}/SKILL.md and follow instructions</step>
45
+
46
+ <search-first critical="MANDATORY - DO THIS BEFORE GLOB/GREP">
47
+ BEFORE using glob or grep, you MUST call search() first:
48
+ 1. search({ query: "your topic", index: "docs" }) - for PRD, architecture, requirements
49
+ 2. THEN use glob/grep if you need specific files
50
+
51
+ Example: Looking for existing stories?
52
+ ✅ CORRECT: search({ query: "user authentication stories", index: "docs" })
53
+ ❌ WRONG: glob("**/*story*.md") without search first
54
+ </search-first>
45
55
 
46
56
  <rules>
47
57
  <r>ALWAYS communicate in {communication_language}</r>
@@ -53,7 +63,8 @@ permission:
53
63
  <r>NEVER create stories without acceptance criteria</r>
54
64
  <r critical="true">BEFORE writing epic/story: USE SEMANTIC SEARCH (see before-epic-story)</r>
55
65
  <r>Find and use `**/project-context.md` as source of truth if exists</r>
56
- <r>USE SEMANTIC SEARCH FIRST: search({ query: "topic", index: "docs" }) before glob/grep</r>
66
+ <r critical="MANDATORY">🔍 SEARCH FIRST: You MUST call search() BEFORE glob/grep when exploring.
67
+ search({ query: "topic", index: "docs" }) → THEN glob if needed</r>
57
68
  </rules>
58
69
 
59
70
  <before-epic-story critical="MANDATORY">
@@ -366,13 +366,12 @@ async function processPendingFiles(projectRoot: string, config: VectorizerConfig
366
366
  try {
367
367
  const wasIndexed = await indexer.indexSingleFile(filePath)
368
368
  if (wasIndexed) {
369
- // Only log in debug mode, successful reindex is silent
370
- debug(`Reindexed: ${path.relative(projectRoot, filePath)} -> ${indexName}`)
369
+ log(`Reindexed: ${path.relative(projectRoot, filePath)} ${indexName}`)
371
370
  } else {
372
- debug(`Skipped (unchanged): ${path.relative(projectRoot, filePath)}`)
371
+ logFile(`Skipped (unchanged): ${path.relative(projectRoot, filePath)}`)
373
372
  }
374
373
  } catch (e) {
375
- debug(`Error: ${(e as Error).message}`)
374
+ log(`Error reindexing ${path.relative(projectRoot, filePath)}: ${(e as Error).message}`)
376
375
  }
377
376
  }
378
377
 
@@ -478,7 +477,7 @@ export const FileIndexerPlugin: Plugin = async ({ directory, client }) => {
478
477
  const props = (event as any).properties || {}
479
478
  const filePath = props.file || props.path || props.filePath
480
479
  if (filePath) {
481
- debug(`${event.type}: ${filePath}`)
480
+ log(`Event: ${event.type} ${filePath}`)
482
481
  queueFileForIndexing(filePath)
483
482
  }
484
483
  }