@syntesseraai/opencode-feature-factory 0.11.8 → 0.11.10
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/AGENTS.md +3 -3
- package/README.md +9 -23
- package/agents/building.md +7 -22
- package/agents/documenting.md +11 -26
- package/agents/feature-factory.md +10 -17
- package/agents/planning.md +12 -24
- package/agents/reviewing.md +11 -23
- package/bin/ff-deploy.js +0 -14
- package/dist/auto-handoff.js +17 -30
- package/dist/mcp-config.d.ts +0 -14
- package/dist/mcp-config.js +0 -14
- package/package.json +1 -1
- package/skills/ff-research-methods/SKILL.md +2 -4
package/AGENTS.md
CHANGED
|
@@ -37,11 +37,11 @@ When work changes behavior, workflows, configuration, operational guidance, or r
|
|
|
37
37
|
## Preferred Tooling Pattern
|
|
38
38
|
|
|
39
39
|
- Use codebase-memory MCP graph tools first in stage agents (`codebase-memory-mcp_search_graph`, `codebase-memory-mcp_get_architecture`, `codebase-memory-mcp_trace_call_path`, `codebase-memory-mcp_get_code_snippet`) for discovery, architecture context, and call-path impact analysis.
|
|
40
|
-
- Keep `
|
|
40
|
+
- Keep `read`/`glob`/`grep` as fallback when codebase-memory MCP is unavailable or the repository has not been indexed.
|
|
41
41
|
- Use `read`, `glob`, and `grep` for targeted file inspection.
|
|
42
|
-
- Writable agents should prefer
|
|
42
|
+
- Writable agents should prefer native `edit` for file updates.
|
|
43
43
|
- Keep `edit` restricted on read-only agents (`planning`, `reviewing`).
|
|
44
|
-
- Route Git operations through `bash` with explicit `git`/`gh` allowlists (and optional `oo git`/`oo gh` wrappers) per OpenCode granular `
|
|
44
|
+
- Route Git operations through `bash` with explicit `git`/`gh` allowlists (and optional `oo git`/`oo gh` wrappers) per OpenCode granular `permissions` rules (`permissions.bash` object syntax), with last-match-wins ordering.
|
|
45
45
|
- Keep read-only agents deny-first for shell usage (`bash: {'*': deny}` with explicit `git`/`gh` and `oo git`/`oo gh` overrides).
|
|
46
46
|
- Explicitly disable PTY tools (`pty_spawn`, `pty_write`, `pty_read`, `pty_list`, `pty_kill`) on read-only agents; they must not rely on PTY as a back door.
|
|
47
47
|
- Use `todowrite` for multi-step tasks to keep progress visible.
|
package/README.md
CHANGED
|
@@ -76,13 +76,13 @@ Instead, the `feature-factory` primary agent orchestrates workflows natively by
|
|
|
76
76
|
|
|
77
77
|
Each transition carries forward normalized prior-stage context (summary, gate/verdict, action items, open issues, and resolved prior output excerpts sourced from previous stage output or existing context) so downstream stages receive full handoff state without unresolved placeholder aliases.
|
|
78
78
|
|
|
79
|
-
Writable stage agents (`building`, `documenting`) prefer
|
|
79
|
+
Writable stage agents (`building`, `documenting`) prefer native `edit` (and `write` for new files) when needed. Read-only agents keep `edit` disabled.
|
|
80
80
|
|
|
81
|
-
Stage-agent code discovery is graph-first: planning/building/reviewing/documenting prefer codebase-memory MCP tools (`codebase-memory-mcp_search_graph`, `codebase-memory-mcp_get_architecture`, `codebase-memory-mcp_trace_call_path`, `codebase-memory-mcp_get_code_snippet`)
|
|
81
|
+
Stage-agent code discovery is graph-first: planning/building/reviewing/documenting prefer codebase-memory MCP tools (`codebase-memory-mcp_search_graph`, `codebase-memory-mcp_get_architecture`, `codebase-memory-mcp_trace_call_path`, `codebase-memory-mcp_get_code_snippet`) for repository-local analysis, and use `gh_grep_searchGitHub` when investigating public GitHub source examples.
|
|
82
82
|
|
|
83
83
|
### Permission policy for shell and PTY tools
|
|
84
84
|
|
|
85
|
-
Feature Factory agent assets follow OpenCode granular permissions (`
|
|
85
|
+
Feature Factory agent assets follow OpenCode granular `permissions` blocks (including `permissions.bash` object syntax) with deny/allow precedence based on **last matching rule wins**.
|
|
86
86
|
|
|
87
87
|
- Stage agents (`planning`, `building`, `reviewing`, `documenting`) expose `bash` and explicitly allow `git`/`gh` command patterns, including `oo`-prefixed variants (`oo git ...`, `oo gh ...`).
|
|
88
88
|
- Read-only agents (`planning`, `reviewing`) are deny-first for shell commands (`'*': deny`) with explicit `git`/`gh` exceptions, including `oo git`/`oo gh`.
|
|
@@ -90,12 +90,12 @@ Feature Factory agent assets follow OpenCode granular permissions (`permission.b
|
|
|
90
90
|
|
|
91
91
|
### Plugin auto-handoff safety net
|
|
92
92
|
|
|
93
|
-
The plugin includes an auto-handoff hook that continues deterministic next steps by reading explicit machine-readable fields from assistant output and dispatching a
|
|
93
|
+
The plugin includes an auto-handoff hook that continues deterministic next steps by reading explicit machine-readable fields from assistant output and dispatching the extracted prompt as a normal text prompt via `client.session.prompt(...)` while setting the target agent.
|
|
94
94
|
|
|
95
95
|
- The orchestrator (`@feature-factory`) remains the source of truth for workflow progression.
|
|
96
96
|
- Auto-handoff is a continuation safety net, not a replacement for orchestrator logic.
|
|
97
97
|
- Multi-stage continuation should target `feature-factory`; one-stage follow-up can target a stage agent.
|
|
98
|
-
- Dispatch is performed through direct API prompt calls (not slash-command execution), and handoffs are
|
|
98
|
+
- Dispatch is performed through direct API prompt calls (not slash-command execution), and handoffs are injected as the next user turn for the targeted agent.
|
|
99
99
|
|
|
100
100
|
## Quick Commands
|
|
101
101
|
|
|
@@ -132,22 +132,8 @@ The plugin merges the following MCP servers into global OpenCode config when mis
|
|
|
132
132
|
|
|
133
133
|
- `jina-ai`
|
|
134
134
|
- `gh_grep`
|
|
135
|
-
- `context7`
|
|
136
|
-
- `morph-mcp`
|
|
137
135
|
|
|
138
|
-
`codebase-memory-mcp` is currently treated as an optional prerequisite (not auto-provisioned by this plugin) because it commonly requires repository-specific indexing/setup.
|
|
139
|
-
|
|
140
|
-
`morph-mcp` is configured as:
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
"morph-mcp": {
|
|
144
|
-
"type": "local",
|
|
145
|
-
"command": ["npx", "-y", "@morphllm/morphmcp"],
|
|
146
|
-
"environment": {
|
|
147
|
-
"MORPH_API_KEY": "{env:MORPH_API_KEY}"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
```
|
|
136
|
+
`codebase-memory-mcp` is currently treated as an optional prerequisite (not auto-provisioned by this plugin) because it commonly requires repository-specific indexing/setup.
|
|
151
137
|
|
|
152
138
|
The plugin also merges the following default plugins when they are missing:
|
|
153
139
|
|
|
@@ -158,12 +144,12 @@ The plugin also merges the following default plugins when they are missing:
|
|
|
158
144
|
|
|
159
145
|
### Merge Outcomes
|
|
160
146
|
|
|
161
|
-
`DEFAULT_MCP_SERVERS` currently includes
|
|
147
|
+
`DEFAULT_MCP_SERVERS` currently includes 2 servers (`jina-ai`, `gh_grep`).
|
|
162
148
|
|
|
163
149
|
The merge behavior is additive and non-destructive:
|
|
164
150
|
|
|
165
|
-
- Empty or missing existing MCP config ->
|
|
166
|
-
- Existing config with 1 custom server and a customized `gh_grep` entry ->
|
|
151
|
+
- Empty or missing existing MCP config -> 2 servers after merge.
|
|
152
|
+
- Existing config with 1 custom server and a customized `gh_grep` entry -> 3 servers after merge (custom + customized `gh_grep` + 1 missing default).
|
|
167
153
|
- Existing server definitions are preserved and never overwritten by defaults.
|
|
168
154
|
|
|
169
155
|
Plugin merge behavior is also additive and non-destructive:
|
package/agents/building.md
CHANGED
|
@@ -3,21 +3,7 @@ description: Implements features from approved plans and returns structured impl
|
|
|
3
3
|
mode: all
|
|
4
4
|
color: '#d2d21a'
|
|
5
5
|
model: openai/gpt-5.3-codex
|
|
6
|
-
|
|
7
|
-
read: true
|
|
8
|
-
write: true
|
|
9
|
-
edit: true
|
|
10
|
-
edit_file: true
|
|
11
|
-
bash: true
|
|
12
|
-
skill: true
|
|
13
|
-
task: true
|
|
14
|
-
'codebase-memory-mcp_search_graph': true
|
|
15
|
-
'codebase-memory-mcp_get_architecture': true
|
|
16
|
-
'codebase-memory-mcp_trace_call_path': true
|
|
17
|
-
'codebase-memory-mcp_get_code_snippet': true
|
|
18
|
-
'codebase-memory-mcp_search_code': true
|
|
19
|
-
'morph-mcp_codebase_search': true
|
|
20
|
-
permission:
|
|
6
|
+
permissions:
|
|
21
7
|
skill:
|
|
22
8
|
'*': allow
|
|
23
9
|
task:
|
|
@@ -56,7 +42,7 @@ You are the building specialist.
|
|
|
56
42
|
|
|
57
43
|
## Editing Workflow (Required)
|
|
58
44
|
|
|
59
|
-
|
|
45
|
+
Use the OpenCode `edit` tool for implementation edits.
|
|
60
46
|
|
|
61
47
|
Fallback policy:
|
|
62
48
|
|
|
@@ -65,9 +51,9 @@ Fallback policy:
|
|
|
65
51
|
- **New files (all models):** `write` or `patch` are acceptable.
|
|
66
52
|
|
|
67
53
|
1. **Read before editing** to confirm current behavior and scope.
|
|
68
|
-
2. **Apply changes with `
|
|
54
|
+
2. **Apply changes with `edit`** for targeted replacements/insertions.
|
|
69
55
|
3. **Re-read after edits** to verify the applied diff and avoid stale assumptions.
|
|
70
|
-
4. If `
|
|
56
|
+
4. If `edit` cannot express the required change, choose fallback by model family: Codex → `patch`/`apply_patch`; non-Codex → `edit`.
|
|
71
57
|
5. For brand-new files, use `write` or `patch`.
|
|
72
58
|
|
|
73
59
|
## Semantic Code Search
|
|
@@ -79,15 +65,14 @@ Use codebase-memory MCP tools first for semantic/structural code search when you
|
|
|
79
65
|
- Trace caller/callee impact with `codebase-memory-mcp_trace_call_path`
|
|
80
66
|
- Read exact source around graph hits with `codebase-memory-mcp_get_code_snippet`
|
|
81
67
|
|
|
82
|
-
Prefer this over
|
|
68
|
+
Prefer this over generic text-only search because graph context reduces false positives and improves dependency-aware edits. For public GitHub source examples, use `gh_grep_searchGitHub`.
|
|
83
69
|
|
|
84
70
|
Search fallback order:
|
|
85
71
|
|
|
86
72
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for discovery.
|
|
87
73
|
2. `codebase-memory-mcp_trace_call_path` / `codebase-memory-mcp_get_code_snippet` for impact and code verification.
|
|
88
|
-
3. `
|
|
89
|
-
4. `
|
|
90
|
-
5. `grep` for exact symbol/literal checks when needed.
|
|
74
|
+
3. `read` to inspect exact implementation details before editing.
|
|
75
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
91
76
|
|
|
92
77
|
## Command Output Compression
|
|
93
78
|
|
package/agents/documenting.md
CHANGED
|
@@ -3,26 +3,12 @@ description: Documentation implementation specialist for pipeline documentation
|
|
|
3
3
|
mode: all
|
|
4
4
|
color: '#f97316'
|
|
5
5
|
model: opencode/gemini-3.1-pro
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
pty_spawn: false
|
|
13
|
-
pty_write: false
|
|
14
|
-
pty_read: false
|
|
15
|
-
pty_list: false
|
|
16
|
-
pty_kill: false
|
|
17
|
-
skill: true
|
|
18
|
-
task: true
|
|
19
|
-
'codebase-memory-mcp_search_graph': true
|
|
20
|
-
'codebase-memory-mcp_get_architecture': true
|
|
21
|
-
'codebase-memory-mcp_trace_call_path': true
|
|
22
|
-
'codebase-memory-mcp_get_code_snippet': true
|
|
23
|
-
'codebase-memory-mcp_search_code': true
|
|
24
|
-
'morph-mcp_codebase_search': true
|
|
25
|
-
permission:
|
|
6
|
+
permissions:
|
|
7
|
+
pty_spawn: deny
|
|
8
|
+
pty_write: deny
|
|
9
|
+
pty_read: deny
|
|
10
|
+
pty_list: deny
|
|
11
|
+
pty_kill: deny
|
|
26
12
|
skill:
|
|
27
13
|
'*': allow
|
|
28
14
|
task:
|
|
@@ -70,7 +56,7 @@ Always load `ff-documentation-rules` before scoping or editing documentation. Tr
|
|
|
70
56
|
|
|
71
57
|
## Editing Workflow (Required)
|
|
72
58
|
|
|
73
|
-
|
|
59
|
+
Use the OpenCode `edit` tool for documentation updates.
|
|
74
60
|
|
|
75
61
|
Fallback policy:
|
|
76
62
|
|
|
@@ -81,9 +67,9 @@ Fallback policy:
|
|
|
81
67
|
1. **Read the current navigation chain first** — inspect the root `README.md`, `docs/INDEX.md`, relevant nested `docs/**/INDEX.md` files, and affected leaf docs before editing.
|
|
82
68
|
2. **Verify behavior from code** — use semantic search and targeted reads so the documentation matches what actually ships.
|
|
83
69
|
3. **Update canonical docs and navigation together** — change the affected leaf docs, every impacted `INDEX.md`, and the root `README.md` when primary documentation entry points or doc structure change.
|
|
84
|
-
4. **Apply changes with `
|
|
70
|
+
4. **Apply changes with `edit`** for precise doc updates.
|
|
85
71
|
5. **Re-read after edits** to validate wording, relative links, and cross-doc consistency.
|
|
86
|
-
6. If `
|
|
72
|
+
6. If `edit` cannot express the required change, choose fallback by model family: Codex → `patch`/`apply_patch`; non-Codex → `edit`.
|
|
87
73
|
7. For brand-new documentation files, use `write` or `patch`.
|
|
88
74
|
|
|
89
75
|
## Semantic Code Search
|
|
@@ -99,9 +85,8 @@ Search fallback order:
|
|
|
99
85
|
|
|
100
86
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for graph-first discovery.
|
|
101
87
|
2. `codebase-memory-mcp_trace_call_path` / `codebase-memory-mcp_get_code_snippet` for behavior confirmation.
|
|
102
|
-
3. `
|
|
103
|
-
4. `
|
|
104
|
-
5. `grep` for exact symbol/literal checks when needed.
|
|
88
|
+
3. `read` to verify exact behavior before writing docs.
|
|
89
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
105
90
|
|
|
106
91
|
## Command Output Compression
|
|
107
92
|
|
|
@@ -3,22 +3,15 @@ description: Feature Factory — native stage orchestrator for planning, buildin
|
|
|
3
3
|
mode: primary
|
|
4
4
|
color: '#0fc24e'
|
|
5
5
|
model: github-copilot/gpt-5.4-mini
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
pty_read: false
|
|
16
|
-
pty_list: false
|
|
17
|
-
pty_kill: false
|
|
18
|
-
skill: true
|
|
19
|
-
task: true
|
|
20
|
-
'morph-mcp_codebase_search': false
|
|
21
|
-
permission:
|
|
6
|
+
permissions:
|
|
7
|
+
write: deny
|
|
8
|
+
edit: deny
|
|
9
|
+
bash: deny
|
|
10
|
+
pty_spawn: deny
|
|
11
|
+
pty_write: deny
|
|
12
|
+
pty_read: deny
|
|
13
|
+
pty_list: deny
|
|
14
|
+
pty_kill: deny
|
|
22
15
|
skill:
|
|
23
16
|
'*': allow
|
|
24
17
|
task:
|
|
@@ -38,7 +31,7 @@ Do not call `ff_pipeline`, `ff_mini_loop`, or `ff_list_models`. This workflow is
|
|
|
38
31
|
This is an orchestration-only, read-only agent. Do not run direct implementation tools.
|
|
39
32
|
|
|
40
33
|
- Allowed direct tools: `task`, `read`, `glob`, and `skill` (shared instruction loading only).
|
|
41
|
-
- Do not run `write`, `edit`, `
|
|
34
|
+
- Do not run `write`, `edit`, `bash`, PTY tools, or semantic search tools directly from this agent.
|
|
42
35
|
- Any investigation, edits, command execution, or validation must be delegated to the appropriate sub-agent.
|
|
43
36
|
|
|
44
37
|
## Delegation-first execution policy
|
package/agents/planning.md
CHANGED
|
@@ -3,25 +3,14 @@ description: Creates implementation plans and planning gates for pipeline and ad
|
|
|
3
3
|
mode: all
|
|
4
4
|
color: '#3b82f6'
|
|
5
5
|
model: openai/gpt-5.4
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
pty_list: false
|
|
15
|
-
pty_kill: false
|
|
16
|
-
skill: true
|
|
17
|
-
task: true
|
|
18
|
-
'codebase-memory-mcp_search_graph': true
|
|
19
|
-
'codebase-memory-mcp_get_architecture': true
|
|
20
|
-
'codebase-memory-mcp_trace_call_path': true
|
|
21
|
-
'codebase-memory-mcp_get_code_snippet': true
|
|
22
|
-
'codebase-memory-mcp_search_code': true
|
|
23
|
-
'morph-mcp_codebase_search': true
|
|
24
|
-
permission:
|
|
6
|
+
permissions:
|
|
7
|
+
write: deny
|
|
8
|
+
edit: deny
|
|
9
|
+
pty_spawn: deny
|
|
10
|
+
pty_write: deny
|
|
11
|
+
pty_read: deny
|
|
12
|
+
pty_list: deny
|
|
13
|
+
pty_kill: deny
|
|
25
14
|
skill:
|
|
26
15
|
'*': allow
|
|
27
16
|
task:
|
|
@@ -53,7 +42,7 @@ You are the planning specialist.
|
|
|
53
42
|
|
|
54
43
|
## Editing Guidance
|
|
55
44
|
|
|
56
|
-
Implementation agents should
|
|
45
|
+
Implementation agents should use `edit` for code changes, with model-specific patch fallbacks when needed. In planning outputs, reference concrete files and intended edits, not line-hash references.
|
|
57
46
|
|
|
58
47
|
You are a read-only agent — you do not write or edit files.
|
|
59
48
|
|
|
@@ -66,15 +55,14 @@ Use codebase-memory MCP tools first when planning:
|
|
|
66
55
|
- `codebase-memory-mcp_trace_call_path` for dependency and impact analysis
|
|
67
56
|
- `codebase-memory-mcp_get_code_snippet` to inspect exact implementation context
|
|
68
57
|
|
|
69
|
-
This is preferred over
|
|
58
|
+
This is preferred over generic text-only discovery because graph-aware results surface structural context directly. For public GitHub source research, use `gh_grep_searchGitHub`.
|
|
70
59
|
|
|
71
60
|
Search fallback order:
|
|
72
61
|
|
|
73
62
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for graph-first discovery.
|
|
74
63
|
2. `codebase-memory-mcp_trace_call_path` / `codebase-memory-mcp_get_code_snippet` for call-flow and source verification.
|
|
75
|
-
3. `
|
|
76
|
-
4. `
|
|
77
|
-
5. `grep` for exact symbol/literal checks when needed.
|
|
64
|
+
3. `read` to verify relevant source context.
|
|
65
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
78
66
|
|
|
79
67
|
## Command Output Compression
|
|
80
68
|
|
package/agents/reviewing.md
CHANGED
|
@@ -3,25 +3,14 @@ description: Unified validation agent for code and documentation. Performs accep
|
|
|
3
3
|
mode: all
|
|
4
4
|
color: '#8b5cf6'
|
|
5
5
|
model: opencode/glm-5.1
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
pty_list: false
|
|
15
|
-
pty_kill: false
|
|
16
|
-
skill: true
|
|
17
|
-
task: true
|
|
18
|
-
'codebase-memory-mcp_search_graph': true
|
|
19
|
-
'codebase-memory-mcp_get_architecture': true
|
|
20
|
-
'codebase-memory-mcp_trace_call_path': true
|
|
21
|
-
'codebase-memory-mcp_get_code_snippet': true
|
|
22
|
-
'codebase-memory-mcp_search_code': true
|
|
23
|
-
'morph-mcp_codebase_search': true
|
|
24
|
-
permission:
|
|
6
|
+
permissions:
|
|
7
|
+
write: deny
|
|
8
|
+
edit: deny
|
|
9
|
+
pty_spawn: deny
|
|
10
|
+
pty_write: deny
|
|
11
|
+
pty_read: deny
|
|
12
|
+
pty_list: deny
|
|
13
|
+
pty_kill: deny
|
|
25
14
|
skill:
|
|
26
15
|
'*': allow
|
|
27
16
|
task:
|
|
@@ -66,15 +55,14 @@ Use codebase-memory MCP tools first when reviewing:
|
|
|
66
55
|
- `codebase-memory-mcp_trace_call_path` to verify security/validation coverage across call paths
|
|
67
56
|
- `codebase-memory-mcp_get_code_snippet` to inspect concrete evidence for findings
|
|
68
57
|
|
|
69
|
-
Prefer this over
|
|
58
|
+
Prefer this over generic text-only search so findings are anchored to graph-aware dependencies, not isolated text matches. For public GitHub source checks, use `gh_grep_searchGitHub`.
|
|
70
59
|
|
|
71
60
|
Search fallback order:
|
|
72
61
|
|
|
73
62
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for discovery and context.
|
|
74
63
|
2. `codebase-memory-mcp_trace_call_path` / `codebase-memory-mcp_get_code_snippet` for evidence collection.
|
|
75
|
-
3. `
|
|
76
|
-
4. `
|
|
77
|
-
5. `grep` for exact symbol/literal checks when needed.
|
|
64
|
+
3. `read` to verify concrete evidence and line references.
|
|
65
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
78
66
|
|
|
79
67
|
## Command Output Compression
|
|
80
68
|
|
package/bin/ff-deploy.js
CHANGED
|
@@ -45,20 +45,6 @@ const DEFAULT_MCP_SERVERS = {
|
|
|
45
45
|
type: 'remote',
|
|
46
46
|
url: 'https://mcp.grep.app',
|
|
47
47
|
},
|
|
48
|
-
context7: {
|
|
49
|
-
type: 'remote',
|
|
50
|
-
url: 'https://mcp.context7.com/mcp',
|
|
51
|
-
headers: {
|
|
52
|
-
CONTEXT7_API_KEY: '{env:CONTEXT7_API_KEY}',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
'morph-mcp': {
|
|
56
|
-
type: 'local',
|
|
57
|
-
command: ['npx', '-y', '@morphllm/morphmcp'],
|
|
58
|
-
environment: {
|
|
59
|
-
MORPH_API_KEY: '{env:MORPH_API_KEY}',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
48
|
};
|
|
63
49
|
|
|
64
50
|
const DEFAULT_PLUGINS = [
|
package/dist/auto-handoff.js
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
const SERVICE_NAME = 'feature-factory';
|
|
2
2
|
const MAX_AUTO_HANDOFFS_PER_SESSION = 5;
|
|
3
|
-
const AUTO_HANDOFF_FLAG_RE =
|
|
4
|
-
const AUTO_HANDOFF_TARGET_RE =
|
|
5
|
-
const AUTO_HANDOFF_REASON_RE =
|
|
6
|
-
const AUTO_HANDOFF_PROMPT_RE =
|
|
7
|
-
function buildSubtaskDescription(reason) {
|
|
8
|
-
switch (reason) {
|
|
9
|
-
case 'REWORK':
|
|
10
|
-
return 'Apply review rework recommendations';
|
|
11
|
-
case 'DOCUMENT':
|
|
12
|
-
return 'Continue workflow documentation stage';
|
|
13
|
-
case 'REVIEW':
|
|
14
|
-
return 'Continue workflow review stage';
|
|
15
|
-
case 'CONTINUE_WORKFLOW':
|
|
16
|
-
default:
|
|
17
|
-
return 'Continue Feature Factory workflow';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
3
|
+
const AUTO_HANDOFF_FLAG_RE = /^\s*AUTO_HANDOFF\s*=\s*(YES|NO)\s*$/im;
|
|
4
|
+
const AUTO_HANDOFF_TARGET_RE = /^\s*AUTO_HANDOFF_TARGET\s*=\s*(feature-factory|building|documenting|reviewing)\s*$/im;
|
|
5
|
+
const AUTO_HANDOFF_REASON_RE = /^\s*AUTO_HANDOFF_REASON\s*=\s*(CONTINUE_WORKFLOW|REWORK|DOCUMENT|REVIEW)\s*$/im;
|
|
6
|
+
const AUTO_HANDOFF_PROMPT_RE = /^\s*(?:AUTO_HANDOFF_PROMPT|FF_PROMPT)\s*<<\s*FF_PROMPT\s*\r?\n([\s\S]*?)\r?\n\s*FF_PROMPT\s*$/im;
|
|
20
7
|
async function log(client, level, message, extra) {
|
|
21
8
|
try {
|
|
22
9
|
await client.app.log({
|
|
@@ -51,27 +38,28 @@ function extractMessageText(info) {
|
|
|
51
38
|
.join('');
|
|
52
39
|
}
|
|
53
40
|
export function parseAutoHandoff(text) {
|
|
54
|
-
const
|
|
41
|
+
const normalizedText = text.replace(/\r\n/g, '\n');
|
|
42
|
+
const enabledMatch = normalizedText.match(AUTO_HANDOFF_FLAG_RE);
|
|
55
43
|
if (!enabledMatch) {
|
|
56
44
|
return null;
|
|
57
45
|
}
|
|
58
|
-
const enabled = enabledMatch[1];
|
|
46
|
+
const enabled = enabledMatch[1]?.toUpperCase();
|
|
59
47
|
if (enabled === 'NO') {
|
|
60
48
|
return { enabled: false };
|
|
61
49
|
}
|
|
62
|
-
const targetMatch =
|
|
63
|
-
const reasonMatch =
|
|
64
|
-
const promptMatch =
|
|
65
|
-
const target = targetMatch?.[1];
|
|
66
|
-
const reason = reasonMatch?.[1];
|
|
50
|
+
const targetMatch = normalizedText.match(AUTO_HANDOFF_TARGET_RE);
|
|
51
|
+
const reasonMatch = normalizedText.match(AUTO_HANDOFF_REASON_RE);
|
|
52
|
+
const promptMatch = normalizedText.match(AUTO_HANDOFF_PROMPT_RE);
|
|
53
|
+
const target = targetMatch?.[1]?.toLowerCase();
|
|
54
|
+
const reason = reasonMatch?.[1]?.toUpperCase();
|
|
67
55
|
const prompt = promptMatch?.[1]?.trim();
|
|
68
56
|
if (!target || !reason || !prompt) {
|
|
69
57
|
return null;
|
|
70
58
|
}
|
|
71
59
|
return {
|
|
72
60
|
enabled: true,
|
|
73
|
-
target
|
|
74
|
-
reason
|
|
61
|
+
target,
|
|
62
|
+
reason,
|
|
75
63
|
prompt,
|
|
76
64
|
};
|
|
77
65
|
}
|
|
@@ -180,12 +168,11 @@ export const AutoHandoffHooksPlugin = async ({ client }) => {
|
|
|
180
168
|
await client.session.prompt({
|
|
181
169
|
path: { id: dispatchSessionId },
|
|
182
170
|
body: {
|
|
171
|
+
agent: parsed.target,
|
|
183
172
|
parts: [
|
|
184
173
|
{
|
|
185
|
-
type: '
|
|
186
|
-
|
|
187
|
-
description: buildSubtaskDescription(parsed.reason),
|
|
188
|
-
prompt: parsed.prompt,
|
|
174
|
+
type: 'text',
|
|
175
|
+
text: parsed.prompt,
|
|
189
176
|
},
|
|
190
177
|
],
|
|
191
178
|
},
|
package/dist/mcp-config.d.ts
CHANGED
|
@@ -19,20 +19,6 @@ export declare const DEFAULT_MCP_SERVERS: {
|
|
|
19
19
|
readonly type: "remote";
|
|
20
20
|
readonly url: "https://mcp.grep.app";
|
|
21
21
|
};
|
|
22
|
-
readonly context7: {
|
|
23
|
-
readonly type: "remote";
|
|
24
|
-
readonly url: "https://mcp.context7.com/mcp";
|
|
25
|
-
readonly headers: {
|
|
26
|
-
readonly CONTEXT7_API_KEY: "{env:CONTEXT7_API_KEY}";
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
readonly 'morph-mcp': {
|
|
30
|
-
readonly type: "local";
|
|
31
|
-
readonly command: readonly ["npx", "-y", "@morphllm/morphmcp"];
|
|
32
|
-
readonly environment: {
|
|
33
|
-
readonly MORPH_API_KEY: "{env:MORPH_API_KEY}";
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
22
|
};
|
|
37
23
|
export interface MCPServerConfig {
|
|
38
24
|
type: 'local' | 'remote';
|
package/dist/mcp-config.js
CHANGED
|
@@ -19,20 +19,6 @@ export const DEFAULT_MCP_SERVERS = {
|
|
|
19
19
|
type: 'remote',
|
|
20
20
|
url: 'https://mcp.grep.app',
|
|
21
21
|
},
|
|
22
|
-
context7: {
|
|
23
|
-
type: 'remote',
|
|
24
|
-
url: 'https://mcp.context7.com/mcp',
|
|
25
|
-
headers: {
|
|
26
|
-
CONTEXT7_API_KEY: '{env:CONTEXT7_API_KEY}',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
'morph-mcp': {
|
|
30
|
-
type: 'local',
|
|
31
|
-
command: ['npx', '-y', '@morphllm/morphmcp'],
|
|
32
|
-
environment: {
|
|
33
|
-
MORPH_API_KEY: '{env:MORPH_API_KEY}',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
22
|
};
|
|
37
23
|
/**
|
|
38
24
|
* Merge MCP servers, preserving existing servers and adding new ones.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@syntesseraai/opencode-feature-factory",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "OpenCode plugin for Feature Factory agents - provides sub-agents and skills for validation, review, security, and architecture assessment",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,16 +18,14 @@ Use these tools directly when available in the active agent:
|
|
|
18
18
|
|
|
19
19
|
- `jina-ai_search_web` / `jina-ai_read_url` / `jina-ai_expand_query`
|
|
20
20
|
- `jina-ai_parallel_search_web` / `jina-ai_parallel_read_url`
|
|
21
|
-
- `context7_resolve-library-id` / `context7_query-docs`
|
|
22
21
|
- `gh_grep_searchGitHub`
|
|
23
|
-
- `morph-mcp_github_codebase_search`
|
|
24
22
|
- `jina-ai_search_arxiv` / `jina-ai_search_ssrn`
|
|
25
23
|
|
|
26
24
|
For local code context while researching implementation fit:
|
|
27
25
|
|
|
28
26
|
- `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture`
|
|
29
27
|
- `codebase-memory-mcp_trace_call_path` + `codebase-memory-mcp_get_code_snippet`
|
|
30
|
-
- `
|
|
28
|
+
- `read` + `grep` as local fallback
|
|
31
29
|
|
|
32
30
|
## When to Use
|
|
33
31
|
|
|
@@ -96,7 +94,7 @@ Use `jina-ai_read_url` for:
|
|
|
96
94
|
|
|
97
95
|
### 4. Code Search (PROGRAMMING-SPECIFIC)
|
|
98
96
|
|
|
99
|
-
Use `
|
|
97
|
+
Use `gh_grep_searchGitHub` for:
|
|
100
98
|
|
|
101
99
|
- Finding library/SDK/API examples
|
|
102
100
|
- Understanding implementation patterns
|