@comfanion/workflow 4.38.3-dev.2 → 4.38.4-dev.0
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 +1 -1
- package/src/build-info.json +4 -5
- package/src/opencode/config.yaml +0 -69
- package/src/opencode/gitignore +2 -0
- package/src/opencode/opencode.json +3 -5
- package/src/opencode/vectorizer.yaml +45 -0
- package/src/opencode/plugins/README.md +0 -182
- package/src/opencode/plugins/__tests__/custom-compaction.test.ts +0 -829
- package/src/opencode/plugins/__tests__/file-indexer.test.ts +0 -425
- package/src/opencode/plugins/__tests__/helpers/mock-ctx.ts +0 -171
- package/src/opencode/plugins/__tests__/leak-stress.test.ts +0 -315
- package/src/opencode/plugins/__tests__/usethis-todo.test.ts +0 -205
- package/src/opencode/plugins/__tests__/version-check.test.ts +0 -223
- package/src/opencode/plugins/custom-compaction.ts +0 -1080
- package/src/opencode/plugins/file-indexer.ts +0 -516
- package/src/opencode/plugins/usethis-todo-publish.ts +0 -44
- package/src/opencode/plugins/usethis-todo-ui.ts +0 -37
- package/src/opencode/plugins/version-check.ts +0 -230
- package/src/opencode/tools/codeindex.ts +0 -264
- package/src/opencode/tools/search.ts +0 -149
- package/src/opencode/tools/usethis_todo.ts +0 -538
- package/src/vectorizer/index.js +0 -573
- package/src/vectorizer/package.json +0 -16
package/package.json
CHANGED
package/src/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.38.
|
|
3
|
-
"buildDate": "2026-01-
|
|
2
|
+
"version": "4.38.4-dev.0",
|
|
3
|
+
"buildDate": "2026-01-28T14:48:09.356Z",
|
|
4
4
|
"files": [
|
|
5
5
|
".gitignore",
|
|
6
6
|
"config.yaml",
|
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
"skills",
|
|
11
11
|
"checklists",
|
|
12
12
|
"commands",
|
|
13
|
-
"tools",
|
|
14
|
-
"plugins",
|
|
15
13
|
"mcp",
|
|
16
14
|
"package.json",
|
|
17
|
-
"opencode.json"
|
|
15
|
+
"opencode.json",
|
|
16
|
+
"vectorizer.yaml"
|
|
18
17
|
]
|
|
19
18
|
}
|
package/src/opencode/config.yaml
CHANGED
|
@@ -263,75 +263,6 @@ testarch:
|
|
|
263
263
|
use_playwright: false
|
|
264
264
|
use_mcp_enhancements: true
|
|
265
265
|
|
|
266
|
-
# =============================================================================
|
|
267
|
-
# VECTORIZER (Semantic Code Search)
|
|
268
|
-
# =============================================================================
|
|
269
|
-
vectorizer:
|
|
270
|
-
# Enable/disable vectorizer functionality
|
|
271
|
-
enabled: true
|
|
272
|
-
|
|
273
|
-
# Auto-index files when they change (requires file-indexer plugin)
|
|
274
|
-
auto_index: true
|
|
275
|
-
|
|
276
|
-
# Debounce time in ms (wait before indexing after file change)
|
|
277
|
-
debounce_ms: 1000
|
|
278
|
-
|
|
279
|
-
# Indexes to maintain - each has pattern (what to include) and ignore (what to skip)
|
|
280
|
-
indexes:
|
|
281
|
-
# Code index - source code files
|
|
282
|
-
code:
|
|
283
|
-
enabled: true
|
|
284
|
-
# Glob pattern for files to index
|
|
285
|
-
pattern: "**/*.{js,ts,jsx,tsx,mjs,cjs,py,go,rs,java,kt,swift,c,cpp,h,hpp,cs,rb,php,scala,clj}"
|
|
286
|
-
# Glob patterns to ignore
|
|
287
|
-
ignore:
|
|
288
|
-
- "**/node_modules/**"
|
|
289
|
-
- "**/.git/**"
|
|
290
|
-
- "**/dist/**"
|
|
291
|
-
- "**/build/**"
|
|
292
|
-
- "**/.opencode/**"
|
|
293
|
-
- "**/docs/**"
|
|
294
|
-
- "**/vendor/**"
|
|
295
|
-
- "**/__pycache__/**"
|
|
296
|
-
- "**/*.min.js"
|
|
297
|
-
- "**/*.bundle.js"
|
|
298
|
-
|
|
299
|
-
# Documentation index - markdown, text files
|
|
300
|
-
docs:
|
|
301
|
-
enabled: true
|
|
302
|
-
# Only docs folder by default (change to "**/*.md" for all markdown)
|
|
303
|
-
pattern: "docs/**/*.{md,mdx,txt,rst,adoc}"
|
|
304
|
-
ignore: []
|
|
305
|
-
|
|
306
|
-
# Configuration index - yaml, json, toml
|
|
307
|
-
config:
|
|
308
|
-
enabled: false # Disabled by default
|
|
309
|
-
pattern: "**/*.{yaml,yml,json,toml,ini}"
|
|
310
|
-
ignore:
|
|
311
|
-
- "**/node_modules/**"
|
|
312
|
-
- "**/.git/**"
|
|
313
|
-
- "**/dist/**"
|
|
314
|
-
- "**/build/**"
|
|
315
|
-
- "**/.opencode/**"
|
|
316
|
-
- "**/docs/**"
|
|
317
|
-
- "**/vendor/**"
|
|
318
|
-
- "**/__pycache__/**"
|
|
319
|
-
- "**/*.min.js"
|
|
320
|
-
- "**/*.bundle.js"
|
|
321
|
-
- "**/package-lock.json"
|
|
322
|
-
- "**/yarn.lock"
|
|
323
|
-
|
|
324
|
-
# Global exclude patterns (applied to ALL indexes, in addition to per-index ignore)
|
|
325
|
-
# Patterns without * are wrapped in **/{pattern}/**
|
|
326
|
-
# NOTE: Dot-folders (.git, .claude, .idea, etc.) are already ignored by default (glob dot:false)
|
|
327
|
-
exclude:
|
|
328
|
-
- node_modules
|
|
329
|
-
- vendor
|
|
330
|
-
- dist
|
|
331
|
-
- build
|
|
332
|
-
- out
|
|
333
|
-
- __pycache__
|
|
334
|
-
|
|
335
266
|
# =============================================================================
|
|
336
267
|
# LSP (Language Server Protocol) - Code Intelligence
|
|
337
268
|
# =============================================================================
|
package/src/opencode/gitignore
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
|
|
3
|
+
"plugin": ["@comfanion/usethis_todo","@comfanion/usethis_compaction","@comfanion/usethis_search","@comfanion/usethis_version_check"],
|
|
4
|
+
|
|
4
5
|
"instructions": [
|
|
5
6
|
"AGENTS.md",
|
|
6
7
|
".opencode/FLOW.yaml",
|
|
@@ -19,10 +20,7 @@
|
|
|
19
20
|
},
|
|
20
21
|
|
|
21
22
|
"tools": {
|
|
22
|
-
"lsp": true
|
|
23
|
-
"search": true,
|
|
24
|
-
"codeindex": true,
|
|
25
|
-
"usethis-todo": true
|
|
23
|
+
"lsp": true
|
|
26
24
|
},
|
|
27
25
|
|
|
28
26
|
"permission": {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
vectorizer:
|
|
2
|
+
# Enable/disable vectorizer functionality
|
|
3
|
+
enabled: true
|
|
4
|
+
|
|
5
|
+
# Auto-index files when they change (requires file-indexer plugin)
|
|
6
|
+
auto_index: true
|
|
7
|
+
|
|
8
|
+
# Debounce time in ms (wait before indexing after file change)
|
|
9
|
+
debounce_ms: 1000
|
|
10
|
+
|
|
11
|
+
# Indexes to maintain - each has pattern (what to include) and ignore (what to skip)
|
|
12
|
+
indexes:
|
|
13
|
+
|
|
14
|
+
# Documentation index - markdown, text files
|
|
15
|
+
docs:
|
|
16
|
+
enabled: true
|
|
17
|
+
pattern: "docs/**/*.{md,mdx,txt,rst,adoc}"
|
|
18
|
+
ignore: []
|
|
19
|
+
|
|
20
|
+
# Configuration index - yaml, json, toml
|
|
21
|
+
config:
|
|
22
|
+
enabled: false
|
|
23
|
+
pattern: "**/*.{yaml,yml,json,toml,ini}"
|
|
24
|
+
ignore:
|
|
25
|
+
- "**/node_modules/**"
|
|
26
|
+
- "**/.git/**"
|
|
27
|
+
- "**/dist/**"
|
|
28
|
+
- "**/build/**"
|
|
29
|
+
- "**/.opencode/**"
|
|
30
|
+
- "**/docs/**"
|
|
31
|
+
- "**/vendor/**"
|
|
32
|
+
- "**/__pycache__/**"
|
|
33
|
+
- "**/*.min.js"
|
|
34
|
+
- "**/*.bundle.js"
|
|
35
|
+
- "**/package-lock.json"
|
|
36
|
+
- "**/yarn.lock"
|
|
37
|
+
|
|
38
|
+
# Global exclude patterns (applied to ALL indexes, in addition to per-index ignore)
|
|
39
|
+
exclude:
|
|
40
|
+
- node_modules
|
|
41
|
+
- vendor
|
|
42
|
+
- dist
|
|
43
|
+
- build
|
|
44
|
+
- out
|
|
45
|
+
- __pycache__
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# Plugins
|
|
2
|
-
|
|
3
|
-
Plugins that extend OpenCode with hooks, events, and custom tools.
|
|
4
|
-
|
|
5
|
-
## Available Plugins
|
|
6
|
-
|
|
7
|
-
### file-indexer.ts
|
|
8
|
-
|
|
9
|
-
Automatically reindexes changed files for semantic search.
|
|
10
|
-
|
|
11
|
-
**Features:**
|
|
12
|
-
- Detects file type and updates appropriate index (code, docs, config)
|
|
13
|
-
- Debounces rapid changes (2s) to avoid excessive indexing
|
|
14
|
-
- Hooks into Edit/Write tool execution
|
|
15
|
-
- Logs indexing activity for transparency
|
|
16
|
-
|
|
17
|
-
**Events:** `file.edited`, `document.updated`, `tool.execute.after`
|
|
18
|
-
|
|
19
|
-
**How it works:**
|
|
20
|
-
|
|
21
|
-
| File Extension | Index Updated |
|
|
22
|
-
|----------------|---------------|
|
|
23
|
-
| `.js`, `.ts`, `.py`, etc. | `code` |
|
|
24
|
-
| `.md`, `.txt`, `.rst` | `docs` |
|
|
25
|
-
| `.yaml`, `.json`, `.toml` | `config` |
|
|
26
|
-
|
|
27
|
-
**Prerequisites:**
|
|
28
|
-
```bash
|
|
29
|
-
npx opencode-workflow vectorizer install
|
|
30
|
-
npx opencode-workflow index --index code
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
### version-check.ts
|
|
36
|
-
|
|
37
|
-
Checks for updates and shows a toast notification if a newer version is available.
|
|
38
|
-
|
|
39
|
-
**Features:**
|
|
40
|
-
- Checks npm registry for latest @comfanion/workflow version
|
|
41
|
-
- Compares with locally installed version
|
|
42
|
-
- Shows toast notification if update available
|
|
43
|
-
- Caches check result for 1 hour
|
|
44
|
-
- Supports EN/UK/RU languages
|
|
45
|
-
|
|
46
|
-
**Toast Example:**
|
|
47
|
-
```
|
|
48
|
-
🚀 Update available! 4.36.19 → 4.37.0. Run: npx @comfanion/workflow update
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
### custom-compaction.ts
|
|
54
|
-
|
|
55
|
-
Intelligent session compaction that preserves flow context with epic workflow support.
|
|
56
|
-
|
|
57
|
-
**Features:**
|
|
58
|
-
- Tracks todo list and story task status
|
|
59
|
-
- **Epic workflow state preservation** (new!)
|
|
60
|
-
- Identifies critical documentation files for context
|
|
61
|
-
- Generates smart continuation prompts
|
|
62
|
-
- Differentiates between completed and interrupted tasks
|
|
63
|
-
|
|
64
|
-
**Hook:** `experimental.session.compacting`
|
|
65
|
-
|
|
66
|
-
**What it does:**
|
|
67
|
-
|
|
68
|
-
| Scenario | Compaction Output |
|
|
69
|
-
|----------|-------------------|
|
|
70
|
-
| **Task Completed** | Summary of completed work, next steps, validation reminders |
|
|
71
|
-
| **Task Interrupted** | Current task, what was done, resume instructions, file list |
|
|
72
|
-
| **Epic in Progress** | Epic state file, current story, next action, minimal context |
|
|
73
|
-
|
|
74
|
-
**Epic Workflow Support:**
|
|
75
|
-
|
|
76
|
-
When `/dev-epic` is running, the plugin:
|
|
77
|
-
1. Finds active epic state file in `sprint-N/.sprint-state/epic-XX-state.yaml`
|
|
78
|
-
2. Reads current story from epic state
|
|
79
|
-
3. Generates minimal read commands:
|
|
80
|
-
- Epic state file (progress tracking)
|
|
81
|
-
- Next story file (what to do)
|
|
82
|
-
- CLAUDE.md, PRD, Architecture (context)
|
|
83
|
-
4. Agent resumes automatically without re-reading completed stories
|
|
84
|
-
|
|
85
|
-
**Epic State File Location:**
|
|
86
|
-
```
|
|
87
|
-
docs/sprint-artifacts/
|
|
88
|
-
sprint-1/
|
|
89
|
-
.sprint-state/
|
|
90
|
-
epic-01-state.yaml # Tracks epic-01 progress
|
|
91
|
-
epic-02-state.yaml # Tracks epic-02 progress
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**Critical Files Passed to Context:**
|
|
95
|
-
|
|
96
|
-
**For regular /dev-story:**
|
|
97
|
-
- `CLAUDE.md` - Project coding standards
|
|
98
|
-
- `AGENTS.md` - Agent definitions
|
|
99
|
-
- `project-context.md` - Project overview
|
|
100
|
-
- `.opencode/config.yaml` - Flow config
|
|
101
|
-
- `docs/prd.md` - Product requirements
|
|
102
|
-
- `docs/architecture.md` - System architecture
|
|
103
|
-
- `docs/coding-standards/*.md` - Coding patterns
|
|
104
|
-
- Active story file (if in progress)
|
|
105
|
-
|
|
106
|
-
**For /dev-epic workflow:**
|
|
107
|
-
- Epic state file (e.g., `sprint-1/.sprint-state/epic-01-state.yaml`)
|
|
108
|
-
- Next story file (from epic state)
|
|
109
|
-
- `CLAUDE.md`, `AGENTS.md`, `docs/prd.md`, `docs/architecture.md`
|
|
110
|
-
- ❌ **NOT** completed story files (saves context!)
|
|
111
|
-
- ❌ **NOT** epic file (info in state file)
|
|
112
|
-
|
|
113
|
-
## Installation
|
|
114
|
-
|
|
115
|
-
Plugins in `.opencode/plugins/` are automatically loaded by OpenCode.
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
# No installation needed - just place files in .opencode/plugins/
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Creating Custom Plugins
|
|
122
|
-
|
|
123
|
-
### Hook Types
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
// Compaction - customize context preservation
|
|
127
|
-
"experimental.session.compacting": async (input, output) => {
|
|
128
|
-
output.context.push("Custom context...")
|
|
129
|
-
// or replace entirely:
|
|
130
|
-
output.prompt = "Custom prompt..."
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Events - react to flow changes
|
|
134
|
-
event: async ({ event }) => {
|
|
135
|
-
if (event.type === "session.idle") { /* ... */ }
|
|
136
|
-
if (event.type === "todo.updated") { /* ... */ }
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Tool hooks - intercept tool execution
|
|
140
|
-
"tool.execute.before": async (input, output) => { /* ... */ }
|
|
141
|
-
"tool.execute.after": async (input, output) => { /* ... */ }
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Session Events
|
|
145
|
-
|
|
146
|
-
| Event | When | Use Case |
|
|
147
|
-
|-------|------|----------|
|
|
148
|
-
| `session.idle` | Agent finished responding | Check task completion, send notifications |
|
|
149
|
-
| `todo.updated` | Todo list changed | Track progress, update external systems |
|
|
150
|
-
| `file.edited` | File was modified | Track active files for context |
|
|
151
|
-
| `session.compacted` | Session was compacted | Log, analytics |
|
|
152
|
-
|
|
153
|
-
### Example: Story Progress Tracker
|
|
154
|
-
|
|
155
|
-
```typescript
|
|
156
|
-
export const StoryTrackerPlugin: Plugin = async (ctx) => {
|
|
157
|
-
return {
|
|
158
|
-
event: async ({ event }) => {
|
|
159
|
-
if (event.type === "todo.updated") {
|
|
160
|
-
// Sync with Jira, send Slack notification, etc.
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Example: Auto-Read Documentation
|
|
168
|
-
|
|
169
|
-
```typescript
|
|
170
|
-
export const AutoContextPlugin: Plugin = async (ctx) => {
|
|
171
|
-
return {
|
|
172
|
-
"experimental.session.compacting": async (input, output) => {
|
|
173
|
-
// Always include coding standards in compaction
|
|
174
|
-
output.context.push(`
|
|
175
|
-
## Coding Standards (MUST follow)
|
|
176
|
-
- Read docs/coding-standards/README.md on resume
|
|
177
|
-
- Follow patterns from CLAUDE.md
|
|
178
|
-
`)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
```
|