@comfanion/workflow 4.36.47 → 4.36.49

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/README.md CHANGED
@@ -21,9 +21,10 @@ The workflow uses specialized AI agents, each with a unique persona and skills:
21
21
  | 📊 **Analyst** | Sara | Requirements gathering, stakeholder interviews | Planning |
22
22
  | 📋 **PM** | Dima | PRD, epics, stories, sprint planning, Jira | Planning → Sprint |
23
23
  | 🏗️ **Architect** | Winston | System design, ADRs, coding standards | Planning |
24
- | 💻 **Dev** | Rick | TDD implementation, code review | Implementation |
24
+ | 💻 **Dev** | Rick | TDD implementation, story development | Implementation |
25
25
  | ⚡ **Coder** | Morty | Quick implementation, bug fixes | Implementation |
26
- | 🔍 **Researcher** | Kristina | Technical/market/domain research | Any |
26
+ | 🔍 **Reviewer** | Marcus | Security review, bug finding (GPT-5.2 Codex) | Implementation |
27
+ | 🔬 **Researcher** | Kristina | Technical/market/domain research | Any |
27
28
  | 🔄 **Change Manager** | Bruce | Documentation changes, impact analysis | Any |
28
29
 
29
30
  ### Workflow Pipeline
@@ -31,9 +32,18 @@ The workflow uses specialized AI agents, each with a unique persona and skills:
31
32
  ```
32
33
  Planning: /requirements → /prd → /coding-standards → /architecture
33
34
  Sprint: /epics → /stories → /sprint-plan → /jira-sync
34
- Development: /dev-story /code-review (loop until done)
35
+ Development: /dev-story /review-story (auto) done
36
+ ↑______________| (fix if issues found)
35
37
  ```
36
38
 
39
+ ### Auto Review
40
+
41
+ After `/dev-story` completes all tasks, `@reviewer` (GPT-5.2 Codex) automatically reviews:
42
+ - **Security** - secrets, injection, auth/authz
43
+ - **Correctness** - AC satisfied, edge cases
44
+ - **Testing** - coverage, quality
45
+ - **Code quality** - architecture, performance
46
+
37
47
  ### Key Skills
38
48
 
39
49
  - **requirements-gathering** - Extract FR/NFR through interviews
@@ -127,7 +137,11 @@ npx @comfanion/workflow init
127
137
  2. **Communication language** - Ukrainian, English, Russian
128
138
  3. **Development methodology** - TDD or STUB
129
139
  4. **Vectorizer** - Enable semantic search
130
- 5. **Jira integration** - Enable/disable
140
+ 5. **Embedding model** - Choose speed vs quality:
141
+ - MiniLM-L6 (Fast) - ~10 files/10sec
142
+ - BGE-small (Balanced) - ~9 files/10sec ← default
143
+ - BGE-base (Quality) - ~3 files/10sec
144
+ 6. **Jira integration** - Enable/disable
131
145
 
132
146
  **Flags:**
133
147
 
@@ -181,11 +195,13 @@ communication_language: "en" # en, uk, ru
181
195
  # Development
182
196
  development:
183
197
  methodology: tdd # tdd or stub
198
+ auto_review: true # Auto-invoke @reviewer after /dev-story
184
199
 
185
200
  # Semantic Search
186
201
  vectorizer:
187
202
  enabled: true
188
203
  auto_index: true # Auto-index on startup
204
+ model: "Xenova/bge-small-en-v1.5" # MiniLM, bge-small, bge-base
189
205
  debounce_ms: 5000
190
206
  indexes:
191
207
  code: { enabled: true }
@@ -212,12 +228,18 @@ jira:
212
228
  ├── config.yaml # Your configuration
213
229
  ├── FLOW.yaml # Workflow definition
214
230
  ├── agents/ # AI agent personas
215
- │ ├── analyst.md # Business Analyst
216
- │ ├── pm.md # Product Manager
217
- │ ├── architect.md # Solution Architect
218
- └── dev.md # Senior Developer
231
+ │ ├── analyst.md # Sara - Business Analyst
232
+ │ ├── pm.md # Dima - Product Manager
233
+ │ ├── architect.md # Winston - Solution Architect
234
+ ├── dev.md # Rick - Senior Developer
235
+ │ ├── coder.md # Morty - Fast Coder
236
+ │ ├── reviewer.md # Marcus - Code Reviewer (GPT-5.2 Codex)
237
+ │ ├── researcher.md # Kristina - Researcher
238
+ │ └── change-manager.md # Bruce - Change Manager
219
239
  ├── skills/ # Knowledge modules (25+)
220
- ├── plugins/ # Auto-indexer plugin
240
+ ├── plugins/ # Plugins
241
+ │ ├── file-indexer.ts # Auto-indexer on startup
242
+ │ └── custom-compaction.ts # Agent-aware session compaction
221
243
  ├── vectorizer/ # Semantic search engine
222
244
  │ ├── index.js
223
245
  │ └── package.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/workflow",
3
- "version": "4.36.47",
3
+ "version": "4.36.49",
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.47",
3
- "buildDate": "2026-01-25T02:32:44.569Z",
2
+ "version": "4.36.49",
3
+ "buildDate": "2026-01-25T14:04:59.680Z",
4
4
  "files": [
5
5
  "config.yaml",
6
6
  "FLOW.yaml",
@@ -3,6 +3,8 @@ 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
+
6
8
  # Tools - FULL ACCESS for implementation
7
9
  tools:
8
10
  read: true
@@ -91,12 +93,27 @@ permission:
91
93
  e) Update story file: mark task [x]
92
94
  f) Run test suite - HALT if failures
93
95
  </step>
94
-
96
+
95
97
  <!-- PHASE 3: FINALIZATION -->
96
98
  <step n="6">Run FULL test suite - all tests must pass</step>
97
99
  <step n="7">Update story file: File List, Change Log, Dev Agent Record</step>
98
100
  <step n="8">Clear TODO list (all done)</step>
99
101
  <step n="9">Mark story status as "review"</step>
102
+
103
+ <!-- PHASE 4: AUTO REVIEW (if auto_review: true in config.yaml) -->
104
+ <step n="10" critical="AUTO-INVOKE @reviewer">
105
+ Check config.yaml → development.auto_review
106
+ IF auto_review: true THEN:
107
+ a) Invoke @reviewer with story path
108
+ b) @reviewer analyzes: security, correctness, tests, quality
109
+ c) Wait for verdict:
110
+ - APPROVE → mark story "done", announce completion
111
+ - CHANGES_REQUESTED → add review tasks to story, go to step 5
112
+ - BLOCKED → HALT with review findings
113
+ IF auto_review: false THEN:
114
+ a) Announce: "Story ready for review. Run /review-story to complete."
115
+ </step>
116
+
100
117
  </dev-story-workflow>
101
118
 
102
119
  <todo-usage hint="How to use TODO for tracking">
@@ -145,11 +162,20 @@ permission:
145
162
  - Code following existing patterns
146
163
  </subagent>
147
164
 
165
+ <subagent name="reviewer" when="After ALL story tasks complete (auto-invoked if auto_review: true)">
166
+ - Security review (secrets, injection, auth)
167
+ - Correctness check (AC satisfied, edge cases)
168
+ - Test coverage analysis
169
+ - Code quality assessment
170
+ - Uses GPT-5.2 Codex for deep analysis
171
+ </subagent>
172
+
148
173
  <delegation-strategy>
149
174
  <rule>Prefer delegation to @coder for parallelizable tasks</rule>
150
175
  <rule>Keep complex logic and architecture decisions to yourself</rule>
151
176
  <rule>Delegate multiple tasks in parallel when independent</rule>
152
177
  <rule>Always verify results before marking task complete</rule>
178
+ <rule>ALWAYS invoke @reviewer after all tasks done (step 10)</rule>
153
179
  </delegation-strategy>
154
180
  </subagents>
155
181
 
@@ -254,7 +280,7 @@ permission:
254
280
  - Execute approved stories following tasks/subtasks
255
281
  - Write tests FIRST (red-green-refactor)
256
282
  - Implement code, update story file, run tests
257
- - Perform code reviews
283
+ - Auto-invoke @reviewer for security/quality review
258
284
 
259
285
  **What I Don't Do:**
260
286
  - Define product scope (→ @pm)
@@ -264,4 +290,8 @@ permission:
264
290
 
265
291
  **Red-Green-Refactor:** 🔴 Write failing test → 🟢 Minimal code to pass → 🔵 Refactor
266
292
 
267
- **Story Status Flow:** `ready-for-dev` → `in-progress` → `review` → `done`
293
+ **Story Status Flow:**
294
+ ```
295
+ ready-for-dev → in-progress → review → @reviewer → done
296
+ ↑_________| (if changes requested)
297
+ ```
@@ -1,3 +1,36 @@
1
+ ---
2
+ description: "Code Reviewer - Use for: security review, bug finding, test coverage analysis, code quality. Auto-invoked after /dev-story completes. Has skills: code-review"
3
+ mode: subagent # Invoked by @dev or via /review-story
4
+ temperature: 0.1 # Low temperature for precise analysis
5
+
6
+ model: openai/gpt-5.2-codex # Best at finding bugs and security issues
7
+
8
+ # Tools - Read-only for review (no writes)
9
+ tools:
10
+ read: true
11
+ glob: true
12
+ grep: true
13
+ list: true
14
+ skill: true
15
+ search: true # Semantic search for finding patterns
16
+ codeindex: true
17
+ bash: true # For running tests
18
+ todowrite: false # Reviewer doesn't manage todos
19
+ todoread: true
20
+ edit: false # Reviewer doesn't edit code
21
+ write: false # Reviewer doesn't write files
22
+
23
+ # Permissions - read-only analysis
24
+ permission:
25
+ edit: deny # Reviewer only reports, doesn't fix
26
+ bash:
27
+ "*": deny
28
+ "npm test*": allow
29
+ "go test*": allow
30
+ "pytest*": allow
31
+ "cargo test*": allow
32
+ ---
33
+
1
34
  <agent id="reviewer" name="Marcus" title="Code Reviewer" icon="🔍">
2
35
 
3
36
  <activation critical="MANDATORY">
@@ -155,7 +155,7 @@ export const CustomCompactionPlugin: Plugin = async (ctx) => {
155
155
  * Generate Read commands that agent MUST execute after compaction
156
156
  */
157
157
  function generateReadCommands(agent: string | null, story: StoryContext | null): string {
158
- const agentKey = agent?.toLowerCase() || "default"
158
+ const agentKey = (typeof agent === 'string' ? agent.toLowerCase() : null) || "default"
159
159
  const filesToRead = [...(MUST_READ_FILES[agentKey] || MUST_READ_FILES.default)]
160
160
 
161
161
  // For dev/coder: add story file if active
@@ -244,7 +244,7 @@ DO NOT skip this step. DO NOT ask user what to do. Just read these files first.`
244
244
 
245
245
  async function getRelevantFiles(agent: string | null, story: StoryContext | null): Promise<string[]> {
246
246
  const relevantPaths: string[] = []
247
- const agentKey = agent?.toLowerCase() || "default"
247
+ const agentKey = (typeof agent === 'string' ? agent.toLowerCase() : null) || "default"
248
248
  const filesToCheck = AGENT_FILES[agentKey] || DEFAULT_FILES
249
249
 
250
250
  for (const filePath of filesToCheck) {
@@ -487,7 +487,10 @@ Previous task was completed successfully.
487
487
  // Track active agent from chat messages
488
488
  "chat.message": async (input, output) => {
489
489
  if (input.agent) {
490
- lastActiveAgent = input.agent
490
+ // Handle both string and object agent (e.g., { name: "dev" })
491
+ lastActiveAgent = typeof input.agent === 'string'
492
+ ? input.agent
493
+ : (input.agent as any)?.name || null
491
494
  lastSessionId = input.sessionID
492
495
  }
493
496
  },
@@ -495,7 +498,9 @@ Previous task was completed successfully.
495
498
  // Also track from chat params (backup)
496
499
  "chat.params": async (input, output) => {
497
500
  if (input.agent) {
498
- lastActiveAgent = input.agent
501
+ lastActiveAgent = typeof input.agent === 'string'
502
+ ? input.agent
503
+ : (input.agent as any)?.name || null
499
504
  }
500
505
  },
501
506