@comfanion/workflow 4.36.12 → 4.36.14
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 +144 -39
- package/bin/cli.js +40 -6
- package/package.json +1 -1
- package/src/build-info.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,61 @@
|
|
|
1
1
|
# @comfanion/workflow
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AI-assisted development workflow with **semantic code search**, agents, and structured documentation.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@comfanion/workflow)
|
|
6
6
|
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- 🔍 **Semantic Code Search** - Find code by meaning, not just text (`"authentication logic"` → finds auth handlers)
|
|
10
|
+
- 🤖 **AI Agents** - Specialized personas (Analyst, PM, Architect, Developer) with skills
|
|
11
|
+
- 📝 **Structured Workflow** - PRD → Architecture → Epics → Stories → Implementation
|
|
12
|
+
- 🔄 **Auto-indexing** - Background indexing on startup with fun toast notifications
|
|
13
|
+
- 🎯 **Jira Integration** - Bidirectional sync with your project
|
|
14
|
+
|
|
7
15
|
## Quick Start
|
|
8
16
|
|
|
9
17
|
```bash
|
|
10
18
|
npx @comfanion/workflow init
|
|
11
19
|
```
|
|
12
20
|
|
|
21
|
+
## Semantic Code Search
|
|
22
|
+
|
|
23
|
+
Search your codebase by **meaning**, not just text matching:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# In Claude Code / AI assistant:
|
|
27
|
+
/search "user authentication middleware" # Finds auth-related code
|
|
28
|
+
/search "database connection handling" # Finds DB setup
|
|
29
|
+
/search "error handling patterns" # Finds error handlers
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### How It Works
|
|
33
|
+
|
|
34
|
+
1. **Vectorizer** converts code into embeddings using local AI model
|
|
35
|
+
2. **Indexes** are stored in `.opencode/vectors/` (code, docs, config)
|
|
36
|
+
3. **Search** finds semantically similar code chunks
|
|
37
|
+
4. **Auto-indexer** keeps indexes fresh on startup
|
|
38
|
+
|
|
39
|
+
### Available Indexes
|
|
40
|
+
|
|
41
|
+
| Index | Files | Use Case |
|
|
42
|
+
|-------|-------|----------|
|
|
43
|
+
| `code` | `*.js, *.ts, *.py, *.go...` | Find functions, classes, logic |
|
|
44
|
+
| `docs` | `*.md, *.txt` | Find documentation, guides |
|
|
45
|
+
| `config` | `*.yaml, *.json` | Find configuration, settings |
|
|
46
|
+
|
|
47
|
+
### Commands
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Manual indexing
|
|
51
|
+
npx @comfanion/workflow index # Index all
|
|
52
|
+
npx @comfanion/workflow index --code # Index code only
|
|
53
|
+
npx @comfanion/workflow index --docs # Index docs only
|
|
54
|
+
|
|
55
|
+
# Check index status
|
|
56
|
+
npx @comfanion/workflow index --status
|
|
57
|
+
```
|
|
58
|
+
|
|
13
59
|
## Installation
|
|
14
60
|
|
|
15
61
|
### NPX (recommended)
|
|
@@ -22,11 +68,15 @@ npx @comfanion/workflow init
|
|
|
22
68
|
|
|
23
69
|
```bash
|
|
24
70
|
npm install -g @comfanion/workflow
|
|
25
|
-
comfanion-workflow init
|
|
26
|
-
# or
|
|
27
71
|
opencode-workflow init
|
|
28
72
|
```
|
|
29
73
|
|
|
74
|
+
### Alternative Package Name
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx create-opencode-workflow init
|
|
78
|
+
```
|
|
79
|
+
|
|
30
80
|
## Commands
|
|
31
81
|
|
|
32
82
|
### `init`
|
|
@@ -40,21 +90,13 @@ npx @comfanion/workflow init
|
|
|
40
90
|
**Interactive prompts:**
|
|
41
91
|
|
|
42
92
|
1. **Your name** - For personalized agent communication
|
|
43
|
-
2. **Communication language** - Ukrainian
|
|
93
|
+
2. **Communication language** - Ukrainian, English, Russian
|
|
44
94
|
3. **Development methodology** - TDD or STUB
|
|
45
|
-
4. **
|
|
46
|
-
5. **
|
|
95
|
+
4. **Vectorizer** - Enable semantic search
|
|
96
|
+
5. **Jira integration** - Enable/disable
|
|
47
97
|
|
|
48
98
|
**Flags:**
|
|
49
99
|
|
|
50
|
-
```bash
|
|
51
|
-
# Skip prompts, use defaults
|
|
52
|
-
npx @comfanion/workflow init -y
|
|
53
|
-
|
|
54
|
-
# With specific options
|
|
55
|
-
npx @comfanion/workflow init --tdd --jira --full
|
|
56
|
-
```
|
|
57
|
-
|
|
58
100
|
| Flag | Description |
|
|
59
101
|
|------|-------------|
|
|
60
102
|
| `-y, --yes` | Skip prompts, use defaults |
|
|
@@ -65,12 +107,17 @@ npx @comfanion/workflow init --tdd --jira --full
|
|
|
65
107
|
|
|
66
108
|
### `update`
|
|
67
109
|
|
|
68
|
-
Update `.opencode/` to latest version
|
|
110
|
+
Update `.opencode/` to latest version.
|
|
69
111
|
|
|
70
112
|
```bash
|
|
71
113
|
npx @comfanion/workflow update
|
|
72
114
|
```
|
|
73
115
|
|
|
116
|
+
**Preserves:**
|
|
117
|
+
- ✅ Your `config.yaml` (with comments!)
|
|
118
|
+
- ✅ Vector indexes (`.opencode/vectors/`)
|
|
119
|
+
- ✅ Custom settings
|
|
120
|
+
|
|
74
121
|
### `doctor`
|
|
75
122
|
|
|
76
123
|
Check installation health.
|
|
@@ -79,49 +126,102 @@ Check installation health.
|
|
|
79
126
|
npx @comfanion/workflow doctor
|
|
80
127
|
```
|
|
81
128
|
|
|
82
|
-
### `
|
|
129
|
+
### `vectorizer`
|
|
83
130
|
|
|
84
|
-
|
|
131
|
+
Manage semantic search vectorizer.
|
|
85
132
|
|
|
86
133
|
```bash
|
|
87
|
-
npx @comfanion/workflow
|
|
134
|
+
npx @comfanion/workflow vectorizer install # Install dependencies
|
|
135
|
+
npx @comfanion/workflow vectorizer status # Check status
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Configuration
|
|
139
|
+
|
|
140
|
+
### `config.yaml`
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
# User settings
|
|
144
|
+
user_name: "Developer"
|
|
145
|
+
communication_language: "en" # en, uk, ru
|
|
146
|
+
|
|
147
|
+
# Development
|
|
148
|
+
development:
|
|
149
|
+
methodology: tdd # tdd or stub
|
|
150
|
+
|
|
151
|
+
# Semantic Search
|
|
152
|
+
vectorizer:
|
|
153
|
+
enabled: true
|
|
154
|
+
auto_index: true # Auto-index on startup
|
|
155
|
+
debounce_ms: 5000
|
|
156
|
+
indexes:
|
|
157
|
+
code: { enabled: true }
|
|
158
|
+
docs: { enabled: true }
|
|
159
|
+
config: { enabled: false }
|
|
160
|
+
exclude:
|
|
161
|
+
- "node_modules/**"
|
|
162
|
+
- "dist/**"
|
|
163
|
+
- "*.min.js"
|
|
164
|
+
|
|
165
|
+
# Jira Integration
|
|
166
|
+
jira:
|
|
167
|
+
enabled: false
|
|
168
|
+
url: "https://your-domain.atlassian.net"
|
|
169
|
+
project_key: "PROJ"
|
|
88
170
|
```
|
|
89
171
|
|
|
90
172
|
## What Gets Created
|
|
91
173
|
|
|
92
|
-
### `.opencode/`
|
|
174
|
+
### `.opencode/`
|
|
93
175
|
|
|
94
176
|
```
|
|
95
177
|
.opencode/
|
|
96
178
|
├── config.yaml # Your configuration
|
|
97
|
-
├── FLOW.yaml # Workflow definition
|
|
98
|
-
├── agents/ #
|
|
99
|
-
├──
|
|
100
|
-
├──
|
|
101
|
-
├──
|
|
179
|
+
├── FLOW.yaml # Workflow definition
|
|
180
|
+
├── agents/ # AI agent personas
|
|
181
|
+
│ ├── analyst.md # Business Analyst
|
|
182
|
+
│ ├── pm.md # Product Manager
|
|
183
|
+
│ ├── architect.md # Solution Architect
|
|
184
|
+
│ └── dev.md # Senior Developer
|
|
185
|
+
├── skills/ # Knowledge modules (25+)
|
|
186
|
+
├── plugins/ # Auto-indexer plugin
|
|
187
|
+
├── vectorizer/ # Semantic search engine
|
|
188
|
+
│ ├── index.js
|
|
189
|
+
│ └── package.json
|
|
190
|
+
├── vectors/ # Vector indexes (auto-created)
|
|
191
|
+
│ ├── code/
|
|
192
|
+
│ ├── docs/
|
|
193
|
+
│ └── config/
|
|
194
|
+
├── tools/ # MCP tools
|
|
195
|
+
│ ├── search.ts # Semantic search tool
|
|
196
|
+
│ └── codeindex.ts # Index management tool
|
|
102
197
|
└── commands/ # Slash commands
|
|
103
198
|
```
|
|
104
199
|
|
|
105
|
-
### `docs/`
|
|
200
|
+
### `docs/`
|
|
106
201
|
|
|
107
202
|
```
|
|
108
203
|
docs/
|
|
109
204
|
├── sprint-artifacts/ # Epics, stories, sprints
|
|
110
205
|
├── requirements/ # Requirements documents
|
|
111
206
|
├── architecture/ # Architecture + ADRs
|
|
112
|
-
|
|
113
|
-
├── coding-standards/ # Coding standards
|
|
114
|
-
└── confluence/ # Translations (Ukrainian)
|
|
207
|
+
└── coding-standards/ # Coding patterns
|
|
115
208
|
```
|
|
116
209
|
|
|
117
|
-
|
|
210
|
+
## Auto-Indexer Plugin
|
|
118
211
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
212
|
+
The auto-indexer runs on Claude Code / AI assistant startup:
|
|
213
|
+
|
|
214
|
+
- 🔍 Checks if indexes need updating
|
|
215
|
+
- 📊 Shows toast notification with file count
|
|
216
|
+
- ☕ Shows fun message while indexing ("Grab a coffee!")
|
|
217
|
+
- 📝 Logs to `.opencode/indexer.log`
|
|
218
|
+
|
|
219
|
+
**Disable auto-indexing:**
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
# config.yaml
|
|
223
|
+
vectorizer:
|
|
224
|
+
auto_index: false
|
|
125
225
|
```
|
|
126
226
|
|
|
127
227
|
## Methodologies
|
|
@@ -129,9 +229,9 @@ CHANGELOG.md # Change history
|
|
|
129
229
|
### TDD (Test-Driven Development)
|
|
130
230
|
|
|
131
231
|
```
|
|
132
|
-
1. Write failing test
|
|
133
|
-
2. Write minimal code to pass
|
|
134
|
-
3. Refactor
|
|
232
|
+
1. Write failing test (RED)
|
|
233
|
+
2. Write minimal code to pass (GREEN)
|
|
234
|
+
3. Refactor (BLUE)
|
|
135
235
|
4. Repeat
|
|
136
236
|
```
|
|
137
237
|
|
|
@@ -146,13 +246,18 @@ CHANGELOG.md # Change history
|
|
|
146
246
|
|
|
147
247
|
## Jira Integration
|
|
148
248
|
|
|
149
|
-
|
|
249
|
+
Set credentials:
|
|
150
250
|
|
|
151
251
|
```bash
|
|
152
252
|
export JIRA_EMAIL="your-email@company.com"
|
|
153
253
|
export JIRA_API_TOKEN="your-api-token"
|
|
154
254
|
```
|
|
155
255
|
|
|
256
|
+
## Requirements
|
|
257
|
+
|
|
258
|
+
- **Node.js** >= 18
|
|
259
|
+
- **~100MB disk** for vectorizer dependencies
|
|
260
|
+
|
|
156
261
|
## Links
|
|
157
262
|
|
|
158
263
|
- **npm:** https://www.npmjs.com/package/@comfanion/workflow
|
package/bin/cli.js
CHANGED
|
@@ -323,13 +323,30 @@ program
|
|
|
323
323
|
|
|
324
324
|
// Install dependencies only if vectorizer is enabled
|
|
325
325
|
if (config.vectorizer_enabled) {
|
|
326
|
-
spinner.text = 'Installing vectorizer...';
|
|
326
|
+
spinner.text = 'Installing vectorizer dependencies...';
|
|
327
327
|
try {
|
|
328
|
-
|
|
328
|
+
// Show progress during npm install
|
|
329
|
+
const steps = [
|
|
330
|
+
'Installing vectorizer dependencies...',
|
|
331
|
+
'Downloading @xenova/transformers (~50MB)...',
|
|
332
|
+
'Installing vectordb...',
|
|
333
|
+
'Installing glob...',
|
|
334
|
+
'Finalizing vectorizer setup...'
|
|
335
|
+
];
|
|
336
|
+
let stepIndex = 0;
|
|
337
|
+
const progressInterval = setInterval(() => {
|
|
338
|
+
stepIndex = (stepIndex + 1) % steps.length;
|
|
339
|
+
spinner.text = steps[stepIndex];
|
|
340
|
+
}, 3000);
|
|
341
|
+
|
|
342
|
+
execSync('npm install', {
|
|
329
343
|
cwd: newVectorizerDir,
|
|
330
344
|
stdio: 'pipe',
|
|
331
|
-
timeout:
|
|
345
|
+
timeout: 180000
|
|
332
346
|
});
|
|
347
|
+
|
|
348
|
+
clearInterval(progressInterval);
|
|
349
|
+
spinner.text = 'Vectorizer installed!';
|
|
333
350
|
} catch (e) {
|
|
334
351
|
// Non-fatal, will show warning below
|
|
335
352
|
}
|
|
@@ -597,13 +614,30 @@ program
|
|
|
597
614
|
|
|
598
615
|
// Install dependencies only if vectorizer is enabled
|
|
599
616
|
if (vectorizerEnabled) {
|
|
600
|
-
spinner.text = 'Installing vectorizer...';
|
|
617
|
+
spinner.text = 'Installing vectorizer dependencies...';
|
|
601
618
|
try {
|
|
602
|
-
|
|
619
|
+
// Show progress during npm install
|
|
620
|
+
const steps = [
|
|
621
|
+
'Installing vectorizer dependencies...',
|
|
622
|
+
'Downloading @xenova/transformers (~50MB)...',
|
|
623
|
+
'Installing vectordb...',
|
|
624
|
+
'Installing glob...',
|
|
625
|
+
'Finalizing vectorizer setup...'
|
|
626
|
+
];
|
|
627
|
+
let stepIndex = 0;
|
|
628
|
+
const progressInterval = setInterval(() => {
|
|
629
|
+
stepIndex = (stepIndex + 1) % steps.length;
|
|
630
|
+
spinner.text = steps[stepIndex];
|
|
631
|
+
}, 3000);
|
|
632
|
+
|
|
633
|
+
execSync('npm install', {
|
|
603
634
|
cwd: newVectorizerDir,
|
|
604
635
|
stdio: 'pipe',
|
|
605
|
-
timeout:
|
|
636
|
+
timeout: 180000
|
|
606
637
|
});
|
|
638
|
+
|
|
639
|
+
clearInterval(progressInterval);
|
|
640
|
+
spinner.text = 'Vectorizer installed!';
|
|
607
641
|
} catch (e) {
|
|
608
642
|
// Non-fatal, will show warning below
|
|
609
643
|
}
|
package/package.json
CHANGED