@comfanion/workflow 4.36.51 → 4.36.52

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.51",
3
+ "version": "4.36.52",
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.51",
3
- "buildDate": "2026-01-25T17:27:24.815Z",
2
+ "version": "4.36.52",
3
+ "buildDate": "2026-01-25T20:58:41.016Z",
4
4
  "files": [
5
5
  "config.yaml",
6
6
  "FLOW.yaml",
@@ -55,6 +55,7 @@ permission:
55
55
  <r>Find and use `**/project-context.md` as source of truth if exists</r>
56
56
  <r critical="MANDATORY">🔍 SEARCH FIRST: You MUST call search() BEFORE glob/grep when exploring.
57
57
  search({ query: "topic", index: "docs" }) → THEN glob if needed</r>
58
+ <r>For parallel execution: call multiple @agents in one message (they run concurrently)</r>
58
59
  </rules>
59
60
  </activation>
60
61
 
@@ -71,6 +71,7 @@ permission:
71
71
  <r critical="MANDATORY">🔍 SEARCH FIRST: You MUST call search() BEFORE glob/grep when exploring.
72
72
  search({ query: "topic", index: "docs" }) → THEN glob if needed</r>
73
73
  <r critical="MANDATORY">📋 NEVER create/modify files without user confirmation. Follow <workflow>.</r>
74
+ <r>For parallel execution: call multiple @agents in one message (they run concurrently)</r>
74
75
  </rules>
75
76
  </activation>
76
77
 
@@ -50,6 +50,7 @@ permission:
50
50
  <r>Check for conflicts before merging</r>
51
51
  <r>Archive merged/rejected changes</r>
52
52
  <r>Find and use `**/project-context.md` as source of truth if exists</r>
53
+ <r>For parallel execution: call multiple @agents in one message (they run concurrently)</r>
53
54
  </rules>
54
55
  </activation>
55
56
 
@@ -3,8 +3,6 @@ description: "Senior Developer - Use for: implementing stories, TDD development,
3
3
  mode: all # Can be primary agent or invoked via @dev
4
4
  temperature: 0.2
5
5
 
6
- model: zai-coding-plan/glm-4.7 # Uncomment when available
7
-
8
6
  # Tools - FULL ACCESS for implementation
9
7
  tools:
10
8
  read: true
@@ -61,10 +59,11 @@ permission:
61
59
  <r>Never implement anything not mapped to a specific task/subtask</r>
62
60
  <r>All existing tests must pass 100% before story is ready for review</r>
63
61
  <r>NEVER lie about tests being written or passing</r>
64
- <r>Prefer story review after story implementation @reviewer</r>
62
+ <r>After story complete: read .opencode/config.yaml if auto_review: true → invoke @reviewer</r>
65
63
  <r>Find and use `**/prd.md`, `**/architecture.md`, `AGENTS.md` and `CLAUDE.md` as source of truth</r>
66
64
  <r critical="MANDATORY">🔍 SEARCH FIRST: Call search() BEFORE glob when exploring codebase.
67
65
  search({ query: "feature pattern", index: "code" }) → THEN glob if needed</r>
66
+ <r>For parallel execution: call multiple @agents in one message (they run concurrently)</r>
68
67
  </rules>
69
68
 
70
69
  <dev-story-workflow hint="When executing /dev-story command" critical="FOLLOW THIS EXACTLY">
@@ -101,18 +100,19 @@ permission:
101
100
  <step n="8">Clear TODO list (all done)</step>
102
101
  <step n="9">Mark story status as "review"</step>
103
102
 
104
- <!-- PHASE 4: AUTO REVIEW (if auto_review: true in config.yaml) -->
103
+ <!-- PHASE 4: AUTO REVIEW -->
105
104
  <step n="10" critical="AUTO-INVOKE @reviewer">
106
- Check config.yamldevelopment.auto_review
107
- IF auto_review: true THEN:
108
- a) Invoke @reviewer with story path
109
- b) @reviewer analyzes: security, correctness, tests, quality
110
- c) Wait for verdict:
111
- - APPROVE → mark story "done", announce completion
112
- - CHANGES_REQUESTEDadd review tasks to story, go to step 5
113
- - BLOCKEDHALT with review findings
114
- IF auto_review: false THEN:
115
- a) Announce: "Story ready for review. Run /review-story to complete."
105
+ IF story status = "done" skip (already complete)
106
+
107
+ a) Read .opencode/config.yaml get development.auto_review value (default: true)
108
+ b) IF auto_review: true (or not set) THEN:
109
+ - Invoke @reviewer with story path
110
+ - Handle verdict:
111
+ * APPROVEmark story "done"
112
+ * CHANGES_REQUESTEDgo to step 5
113
+ * BLOCKED HALT
114
+ c) IF auto_review: false THEN:
115
+ - Announce: "Story ready for review. Run /review-story to complete."
116
116
  </step>
117
117
 
118
118
  </dev-story-workflow>
@@ -293,6 +293,6 @@ permission:
293
293
 
294
294
  **Story Status Flow:**
295
295
  ```
296
- ready-for-dev → in-progress -> @coder`s → review → @reviewer → done
297
- _________| (if changes requested)
298
- ```
296
+ ready-for-dev → in-progress -> @coder`s → review → @reviewer → done
297
+ _____________________| (if changes requested)
298
+ ```
@@ -65,6 +65,7 @@ permission:
65
65
  <r>Find and use `**/project-context.md` as source of truth if exists</r>
66
66
  <r critical="MANDATORY">🔍 SEARCH FIRST: You MUST call search() BEFORE glob/grep when exploring.
67
67
  search({ query: "topic", index: "docs" }) → THEN glob if needed</r>
68
+ <r>For parallel execution: call multiple @agents in one message (they run concurrently)</r>
68
69
  </rules>
69
70
 
70
71
  <before-epic-story critical="MANDATORY">
@@ -57,6 +57,7 @@ permission:
57
57
  <r>Find and use `**/project-context.md` as source of truth if exists</r>
58
58
  <r>Leverage large context window for comprehensive analysis</r>
59
59
  <r>Use web grounding for up-to-date information</r>
60
+ <r>For parallel execution: call multiple @agents in one message (they run concurrently)</r>
60
61
  </rules>
61
62
 
62
63
  <gemini-capabilities hint="Model-specific features">
@@ -39,7 +39,24 @@ permission:
39
39
  <step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
40
40
  <step n="4">Load .opencode/skills/code-review/SKILL.md</step>
41
41
  <step n="5">Find and load docs/coding-standards/ files</step>
42
+ <step n="6">Find similar code patterns using search() before reviewing</step>
42
43
 
44
+ <search-first critical="MANDATORY - DO THIS BEFORE GLOB/GREP">
45
+ BEFORE using glob or grep, you MUST call search() first:
46
+ 1. search({ query: "your topic", index: "code" }) - for source code patterns
47
+ 2. search({ query: "your topic", index: "docs" }) - for documentation
48
+ 3. THEN use glob/grep if you need specific files
49
+
50
+ Example: Looking for similar patterns to compare?
51
+ ✅ CORRECT: search({ query: "repository pattern implementation", index: "code" })
52
+ ❌ WRONG: glob("**/*repo*.go") without search first
53
+
54
+ Use semantic search to:
55
+ - Find existing patterns (to compare against review target)
56
+ - Locate related code that might be affected
57
+ - Find tests for similar functionality
58
+ </search-first>
59
+
43
60
  <rules>
44
61
  <r>ALWAYS communicate in {communication_language}</r>
45
62
  <r>Focus on finding bugs, security issues, and code smells</r>
@@ -47,6 +64,8 @@ permission:
47
64
  <r>Prioritize: Security > Correctness > Performance > Style</r>
48
65
  <r>Provide specific fixes, not just complaints</r>
49
66
  <r>Use GPT-5.2 Codex strengths: bug finding, edge cases, test gaps</r>
67
+ <r>Find and use `docs/coding-standards/*.md`, `**/prd.md`, `**/architecture.md` as source of truth</r>
68
+ <r critical="MANDATORY">🔍 SEARCH FIRST: Call search() BEFORE glob when exploring codebase</r>
50
69
  </rules>
51
70
  </activation>
52
71
 
@@ -55,6 +74,8 @@ permission:
55
74
  <action>Read the story file completely</action>
56
75
  <action>Understand what was supposed to be built</action>
57
76
  <action>Load coding-standards for this project</action>
77
+ <action>search() for similar patterns in codebase to compare against</action>
78
+ <action>search() in docs for architecture requirements</action>
58
79
  </phase>
59
80
 
60
81
  <phase name="2. Security First">
@@ -82,7 +103,7 @@ permission:
82
103
  <phase name="5. Report">
83
104
  <action>Categorize issues: High/Medium/Low</action>
84
105
  <action>Provide specific fixes for each issue</action>
85
- <action>Update story file with review outcome</action>
106
+ <action>Return verdict: APPROVE | CHANGES_REQUESTED | BLOCKED</action>
86
107
  </phase>
87
108
  </workflow>
88
109
 
@@ -103,6 +124,42 @@ permission:
103
124
  <skill name="code-review">Complete code review methodology</skill>
104
125
  </skills>
105
126
 
127
+ <codesearch-guide hint="Use semantic search during review">
128
+ <check-first>codeindex({ action: "list" }) → See available indexes</check-first>
129
+
130
+ <when-to-use-during-review>
131
+ <use case="Find existing patterns to compare">
132
+ search({ query: "repository pattern for users", index: "code" })
133
+ → Compare reviewed code against established patterns
134
+ </use>
135
+ <use case="Find related code that might be affected">
136
+ search({ query: "functions that call UserService", index: "code" })
137
+ → Check if changes break other code
138
+ </use>
139
+ <use case="Find tests for similar functionality">
140
+ search({ query: "user repository tests", index: "code" })
141
+ → Compare test coverage with similar components
142
+ </use>
143
+ <use case="Check architecture compliance">
144
+ search({ query: "domain layer structure", index: "docs" })
145
+ → Verify code follows documented architecture
146
+ </use>
147
+ </when-to-use-during-review>
148
+
149
+ <vs-grep>
150
+ grep: exact text match "UserRepository" → finds only that string
151
+ search: semantic "user storage" → finds UserRepository, UserStore, user_repo.go
152
+ </vs-grep>
153
+
154
+ <strategy>
155
+ 1. codeindex({ action: "list" }) → Check what indexes exist
156
+ 2. search({ query: "pattern to compare", index: "code" }) → Find similar code
157
+ 3. Read top results → Understand project patterns
158
+ 4. Compare reviewed code against patterns
159
+ 5. grep for specific symbols if needed
160
+ </strategy>
161
+ </codesearch-guide>
162
+
106
163
  <review_checklist>
107
164
  <category name="Security (HIGH)">
108
165
  <item>No hardcoded secrets, API keys, passwords</item>
@@ -45,6 +45,15 @@ This command invokes the **Dev** agent (Rick).
45
45
  12. **Clear TODO** (all tasks done)
46
46
  13. Mark story as `review`
47
47
 
48
+ ### Phase 4: Auto Review (configurable)
49
+ 14. Check `config.yaml → development.auto_review`:
50
+ - **If `auto_review: true`**: Invoke @reviewer automatically
51
+ - @reviewer analyzes: security, correctness, test coverage
52
+ - APPROVE → mark story `done`
53
+ - CHANGES_REQUESTED → add review tasks, go back to Phase 2
54
+ - BLOCKED → HALT with findings
55
+ - **If `auto_review: false`**: Announce "Story ready for review. Run /review-story to complete."
56
+
48
57
  ## TODO Workflow
49
58
 
50
59
  ```
@@ -103,11 +112,13 @@ The workflow will HALT and ask for input when:
103
112
  ## Story Status Flow
104
113
 
105
114
  ```
106
- ready-for-dev → in-progress → review → done
115
+ ready-for-dev → in-progress -> @coder`s → review → @reviewer → done
116
+ ↑_____________________| (if changes requested)
107
117
  ```
108
118
 
109
119
  ## Next Steps After Completion
110
120
 
111
- 1. `/code-review` - Review the implementation
112
- 2. If approved, mark story as `done`
113
- 3. Continue with next story
121
+ - **If `auto_review: true`**: Story automatically reviewed by @reviewer
122
+ - Approved `done`
123
+ - Changes requested fix and re-run
124
+ - **If `auto_review: false`**: Run `/review-story` manually
@@ -10,6 +10,7 @@ Execute a story by implementing tasks/subtasks, writing tests, validating, and u
10
10
  - **Tests are MANDATORY validation** - each task has tests that MUST pass
11
11
  - **Continue until COMPLETE** - do not stop for "milestones"
12
12
  - **NEVER lie about tests** - tests must actually exist and pass
13
+ - **For parallel execution** - call multiple @coder in one message (they run concurrently)
13
14
 
14
15
  ## Methodology Selection
15
16
 
@@ -175,9 +176,10 @@ Read from `config.yaml → development.methodology`:
175
176
  <!-- PARALLEL OPPORTUNITY CHECK -->
176
177
  <phase name="PARALLEL_CHECK">
177
178
  <action>Identify other tasks with same satisfied dependencies</action>
178
- <output if="parallel tasks exist">
179
- 💡 **Parallel Opportunity:** Tasks {{parallel_tasks}} can be done together (same deps)
180
- </output>
179
+ <check if="parallel tasks exist">
180
+ <output>💡 **Parallel Opportunity:** Tasks {{parallel_tasks}} can be done together</output>
181
+ <action>Call multiple @coder in ONE message to run them concurrently</action>
182
+ </check>
181
183
  </phase>
182
184
 
183
185
  <!-- LOAD METHODOLOGY FROM CONFIG -->
@@ -496,49 +498,66 @@ Read from `config.yaml → development.methodology`:
496
498
  </step>
497
499
  ```
498
500
 
499
- ### Step 8: Automatic Code Review (by @reviewer)
501
+ ### Step 8: Auto Review (configurable via config.yaml)
500
502
 
501
503
  ```xml
502
- <step n="8" goal="Automatic security and quality review before done">
503
- <critical>ALWAYS invoke @reviewer after all tasks complete</critical>
504
-
505
- <action>Invoke @reviewer agent with story path</action>
506
- <action>@reviewer uses GPT-5.2 Codex for deep analysis</action>
504
+ <step n="8" goal="Auto review based on config.yaml setting">
505
+ <action>Read config.yaml development.auto_review</action>
507
506
 
508
- <invoke agent="reviewer">
509
- <param name="story_path">{{story_path}}</param>
510
- <param name="files_changed">{{file_list}}</param>
511
- <param name="focus">security, correctness, test coverage</param>
512
- </invoke>
513
-
514
- <check if="reviewer verdict = APPROVE">
515
- <action>Mark story status as "done"</action>
516
- <output>✅ Code review passed! Story complete.</output>
507
+ <!-- AUTO REVIEW ENABLED -->
508
+ <check if="auto_review: true">
509
+ <critical>Invoke @reviewer for automatic code review</critical>
510
+
511
+ <action>Invoke @reviewer agent with story path</action>
512
+ <action>@reviewer uses GPT-5.2 Codex for deep analysis</action>
513
+
514
+ <invoke agent="reviewer">
515
+ <param name="story_path">{{story_path}}</param>
516
+ <param name="files_changed">{{file_list}}</param>
517
+ <param name="focus">security, correctness, test coverage</param>
518
+ </invoke>
519
+
520
+ <check if="reviewer verdict = APPROVE">
521
+ <action>Mark story status as "done"</action>
522
+ <output>✅ Code review passed! Story complete.</output>
523
+ </check>
524
+
525
+ <check if="reviewer verdict = CHANGES_REQUESTED">
526
+ <action>Create follow-up tasks from review findings</action>
527
+ <action>Add tasks to story file</action>
528
+ <output>
529
+ 🔄 **Code Review: Changes Requested**
530
+
531
+ Review found {{issues_count}} issues to fix.
532
+ New tasks added to story.
533
+
534
+ Run dev-story again to fix issues.
535
+ </output>
536
+ <goto step="4">Fix review issues</goto>
537
+ </check>
538
+
539
+ <check if="reviewer verdict = BLOCKED">
540
+ <action>Mark story status as "blocked"</action>
541
+ <output>
542
+ ❌ **Code Review: Blocked**
543
+
544
+ Critical issues found. See review for details.
545
+ Cannot proceed until blocking issues resolved.
546
+ </output>
547
+ <halt reason="Blocked by code review"/>
548
+ </check>
517
549
  </check>
518
550
 
519
- <check if="reviewer verdict = CHANGES_REQUESTED">
520
- <action>Create follow-up tasks from review findings</action>
521
- <action>Add tasks to story file</action>
551
+ <!-- AUTO REVIEW DISABLED -->
552
+ <check if="auto_review: false OR not set">
522
553
  <output>
523
- 🔄 **Code Review: Changes Requested**
524
-
525
- Review found {{issues_count}} issues to fix.
526
- New tasks added to story.
554
+ **Story Ready for Review**
527
555
 
528
- Run dev-story again to fix issues.
529
- </output>
530
- <goto step="4">Fix review issues</goto>
531
- </check>
532
-
533
- <check if="reviewer verdict = BLOCKED">
534
- <action>Mark story status as "blocked"</action>
535
- <output>
536
- ❌ **Code Review: Blocked**
556
+ Story: {{story_key}}
557
+ Status: review
537
558
 
538
- Critical issues found. See review for details.
539
- Cannot proceed until blocking issues resolved.
559
+ Run `/review-story` to complete code review.
540
560
  </output>
541
- <halt reason="Blocked by code review"/>
542
561
  </check>
543
562
  </step>
544
563
  ```
@@ -573,5 +592,5 @@ Read from `config.yaml → development.methodology`:
573
592
  - [ ] File List includes all changes
574
593
  - [ ] Dev Agent Record complete
575
594
  - [ ] Change Log updated
576
- - [ ] **@reviewer approved** (auto-invoked after Step 7)
577
- - [ ] Status set to "done"
595
+ - [ ] **@reviewer approved** (if `auto_review: true`) OR status = `review` (if `auto_review: false`)
596
+ - [ ] Status set to "done" (after review)