@syntesseraai/opencode-feature-factory 0.11.7 → 0.11.9
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 +2 -2
- package/README.md +9 -22
- package/agents/building.md +8 -10
- package/agents/documenting.md +10 -8
- package/agents/feature-factory.md +11 -5
- package/agents/planning.md +6 -7
- package/agents/reviewing.md +5 -6
- package/bin/ff-deploy.js +0 -7
- package/dist/auto-handoff.js +17 -30
- package/dist/mcp-config.d.ts +0 -7
- package/dist/mcp-config.js +0 -7
- package/package.json +1 -1
- package/skills/ff-research-methods/SKILL.md +2 -3
package/AGENTS.md
CHANGED
|
@@ -37,9 +37,9 @@ 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
44
|
- Route Git operations through `bash` with explicit `git`/`gh` allowlists (and optional `oo git`/`oo gh` wrappers) per OpenCode granular `permission.bash` rules, 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).
|
package/README.md
CHANGED
|
@@ -74,11 +74,11 @@ Instead, the `feature-factory` primary agent orchestrates workflows natively by
|
|
|
74
74
|
6. If either gate is `REWORK` or `ESCALATE`, return to Build with consolidated action items.
|
|
75
75
|
7. Complete only when both gates are `APPROVED`.
|
|
76
76
|
|
|
77
|
-
Each transition carries forward prior-stage context (summary, gate/verdict, action items, open issues, and
|
|
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
|
|
|
@@ -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
|
|
|
@@ -133,21 +133,8 @@ The plugin merges the following MCP servers into global OpenCode config when mis
|
|
|
133
133
|
- `jina-ai`
|
|
134
134
|
- `gh_grep`
|
|
135
135
|
- `context7`
|
|
136
|
-
- `morph-mcp`
|
|
137
136
|
|
|
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
|
-
```
|
|
137
|
+
`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
138
|
|
|
152
139
|
The plugin also merges the following default plugins when they are missing:
|
|
153
140
|
|
|
@@ -158,12 +145,12 @@ The plugin also merges the following default plugins when they are missing:
|
|
|
158
145
|
|
|
159
146
|
### Merge Outcomes
|
|
160
147
|
|
|
161
|
-
`DEFAULT_MCP_SERVERS` currently includes
|
|
148
|
+
`DEFAULT_MCP_SERVERS` currently includes 3 servers (`jina-ai`, `gh_grep`, `context7`).
|
|
162
149
|
|
|
163
150
|
The merge behavior is additive and non-destructive:
|
|
164
151
|
|
|
165
|
-
- Empty or missing existing MCP config ->
|
|
166
|
-
- Existing config with 1 custom server and a customized `gh_grep` entry ->
|
|
152
|
+
- Empty or missing existing MCP config -> 3 servers after merge.
|
|
153
|
+
- Existing config with 1 custom server and a customized `gh_grep` entry -> 4 servers after merge (custom + customized `gh_grep` + 2 missing defaults).
|
|
167
154
|
- Existing server definitions are preserved and never overwritten by defaults.
|
|
168
155
|
|
|
169
156
|
Plugin merge behavior is also additive and non-destructive:
|
package/agents/building.md
CHANGED
|
@@ -7,7 +7,6 @@ tools:
|
|
|
7
7
|
read: true
|
|
8
8
|
write: true
|
|
9
9
|
edit: true
|
|
10
|
-
edit_file: true
|
|
11
10
|
bash: true
|
|
12
11
|
skill: true
|
|
13
12
|
task: true
|
|
@@ -16,7 +15,6 @@ tools:
|
|
|
16
15
|
'codebase-memory-mcp_trace_call_path': true
|
|
17
16
|
'codebase-memory-mcp_get_code_snippet': true
|
|
18
17
|
'codebase-memory-mcp_search_code': true
|
|
19
|
-
'morph-mcp_codebase_search': true
|
|
20
18
|
permission:
|
|
21
19
|
skill:
|
|
22
20
|
'*': allow
|
|
@@ -49,13 +47,14 @@ You are the building specialist.
|
|
|
49
47
|
|
|
50
48
|
## Operating Mode
|
|
51
49
|
|
|
52
|
-
- Use
|
|
50
|
+
- Use normalized, resolved stage handoff context from prior-stage output or existing context.
|
|
51
|
+
- Never rely on unresolved placeholder aliases in handoff prompts.
|
|
53
52
|
- Do not rely on intermediate artifact files for pipeline progression.
|
|
54
53
|
- Persist only when explicitly requested by the user.
|
|
55
54
|
|
|
56
55
|
## Editing Workflow (Required)
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
Use the OpenCode `edit` tool for implementation edits.
|
|
59
58
|
|
|
60
59
|
Fallback policy:
|
|
61
60
|
|
|
@@ -64,9 +63,9 @@ Fallback policy:
|
|
|
64
63
|
- **New files (all models):** `write` or `patch` are acceptable.
|
|
65
64
|
|
|
66
65
|
1. **Read before editing** to confirm current behavior and scope.
|
|
67
|
-
2. **Apply changes with `
|
|
66
|
+
2. **Apply changes with `edit`** for targeted replacements/insertions.
|
|
68
67
|
3. **Re-read after edits** to verify the applied diff and avoid stale assumptions.
|
|
69
|
-
4. If `
|
|
68
|
+
4. If `edit` cannot express the required change, choose fallback by model family: Codex → `patch`/`apply_patch`; non-Codex → `edit`.
|
|
70
69
|
5. For brand-new files, use `write` or `patch`.
|
|
71
70
|
|
|
72
71
|
## Semantic Code Search
|
|
@@ -78,15 +77,14 @@ Use codebase-memory MCP tools first for semantic/structural code search when you
|
|
|
78
77
|
- Trace caller/callee impact with `codebase-memory-mcp_trace_call_path`
|
|
79
78
|
- Read exact source around graph hits with `codebase-memory-mcp_get_code_snippet`
|
|
80
79
|
|
|
81
|
-
Prefer this over
|
|
80
|
+
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`.
|
|
82
81
|
|
|
83
82
|
Search fallback order:
|
|
84
83
|
|
|
85
84
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for discovery.
|
|
86
85
|
2. `codebase-memory-mcp_trace_call_path` / `codebase-memory-mcp_get_code_snippet` for impact and code verification.
|
|
87
|
-
3. `
|
|
88
|
-
4. `
|
|
89
|
-
5. `grep` for exact symbol/literal checks when needed.
|
|
86
|
+
3. `read` to inspect exact implementation details before editing.
|
|
87
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
90
88
|
|
|
91
89
|
## Command Output Compression
|
|
92
90
|
|
package/agents/documenting.md
CHANGED
|
@@ -7,7 +7,6 @@ tools:
|
|
|
7
7
|
read: true
|
|
8
8
|
write: true
|
|
9
9
|
edit: true
|
|
10
|
-
edit_file: true
|
|
11
10
|
bash: true
|
|
12
11
|
pty_spawn: false
|
|
13
12
|
pty_write: false
|
|
@@ -21,7 +20,6 @@ tools:
|
|
|
21
20
|
'codebase-memory-mcp_trace_call_path': true
|
|
22
21
|
'codebase-memory-mcp_get_code_snippet': true
|
|
23
22
|
'codebase-memory-mcp_search_code': true
|
|
24
|
-
'morph-mcp_codebase_search': true
|
|
25
23
|
permission:
|
|
26
24
|
skill:
|
|
27
25
|
'*': allow
|
|
@@ -52,6 +50,11 @@ You are the documenting specialist.
|
|
|
52
50
|
- Explain what changed, why it matters, when a reader should use the document, and where they should go next.
|
|
53
51
|
- Return a structured summary for documentation review.
|
|
54
52
|
|
|
53
|
+
## Operating Mode
|
|
54
|
+
|
|
55
|
+
- Use normalized, resolved stage handoff context from prior-stage output or existing context.
|
|
56
|
+
- Never rely on unresolved placeholder aliases in handoff prompts.
|
|
57
|
+
|
|
55
58
|
## Shared Documentation Rules (Required)
|
|
56
59
|
|
|
57
60
|
Always load `ff-documentation-rules` before scoping or editing documentation. Treat it as the authoritative rule set for repository documentation placement, `INDEX.md` navigation, cross-references, and root `README.md` entry points.
|
|
@@ -65,7 +68,7 @@ Always load `ff-documentation-rules` before scoping or editing documentation. Tr
|
|
|
65
68
|
|
|
66
69
|
## Editing Workflow (Required)
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
Use the OpenCode `edit` tool for documentation updates.
|
|
69
72
|
|
|
70
73
|
Fallback policy:
|
|
71
74
|
|
|
@@ -76,9 +79,9 @@ Fallback policy:
|
|
|
76
79
|
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.
|
|
77
80
|
2. **Verify behavior from code** — use semantic search and targeted reads so the documentation matches what actually ships.
|
|
78
81
|
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.
|
|
79
|
-
4. **Apply changes with `
|
|
82
|
+
4. **Apply changes with `edit`** for precise doc updates.
|
|
80
83
|
5. **Re-read after edits** to validate wording, relative links, and cross-doc consistency.
|
|
81
|
-
6. If `
|
|
84
|
+
6. If `edit` cannot express the required change, choose fallback by model family: Codex → `patch`/`apply_patch`; non-Codex → `edit`.
|
|
82
85
|
7. For brand-new documentation files, use `write` or `patch`.
|
|
83
86
|
|
|
84
87
|
## Semantic Code Search
|
|
@@ -94,9 +97,8 @@ Search fallback order:
|
|
|
94
97
|
|
|
95
98
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for graph-first discovery.
|
|
96
99
|
2. `codebase-memory-mcp_trace_call_path` / `codebase-memory-mcp_get_code_snippet` for behavior confirmation.
|
|
97
|
-
3. `
|
|
98
|
-
4. `
|
|
99
|
-
5. `grep` for exact symbol/literal checks when needed.
|
|
100
|
+
3. `read` to verify exact behavior before writing docs.
|
|
101
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
100
102
|
|
|
101
103
|
## Command Output Compression
|
|
102
104
|
|
|
@@ -8,7 +8,6 @@ tools:
|
|
|
8
8
|
glob: true
|
|
9
9
|
write: false
|
|
10
10
|
edit: false
|
|
11
|
-
edit_file: false
|
|
12
11
|
bash: false
|
|
13
12
|
pty_spawn: false
|
|
14
13
|
pty_write: false
|
|
@@ -17,7 +16,6 @@ tools:
|
|
|
17
16
|
pty_kill: false
|
|
18
17
|
skill: true
|
|
19
18
|
task: true
|
|
20
|
-
'morph-mcp_codebase_search': false
|
|
21
19
|
permission:
|
|
22
20
|
skill:
|
|
23
21
|
'*': allow
|
|
@@ -38,7 +36,7 @@ Do not call `ff_pipeline`, `ff_mini_loop`, or `ff_list_models`. This workflow is
|
|
|
38
36
|
This is an orchestration-only, read-only agent. Do not run direct implementation tools.
|
|
39
37
|
|
|
40
38
|
- Allowed direct tools: `task`, `read`, `glob`, and `skill` (shared instruction loading only).
|
|
41
|
-
- Do not run `write`, `edit`, `
|
|
39
|
+
- Do not run `write`, `edit`, `bash`, PTY tools, or semantic search tools directly from this agent.
|
|
42
40
|
- Any investigation, edits, command execution, or validation must be delegated to the appropriate sub-agent.
|
|
43
41
|
|
|
44
42
|
## Delegation-first execution policy
|
|
@@ -130,7 +128,7 @@ When delegating each stage, include:
|
|
|
130
128
|
3. **Previous stage summary**
|
|
131
129
|
4. **Previous stage gate/verdict**
|
|
132
130
|
5. **Key action items / issues**
|
|
133
|
-
6. **
|
|
131
|
+
6. **Resolved prior output context (never unresolved placeholders)**
|
|
134
132
|
|
|
135
133
|
### Handoff template (use for every transition)
|
|
136
134
|
|
|
@@ -148,12 +146,20 @@ PREVIOUS_STAGE_OPEN_ISSUES:
|
|
|
148
146
|
- ...
|
|
149
147
|
|
|
150
148
|
RAW_PREVIOUS_STAGE_OUTPUT:
|
|
151
|
-
|
|
149
|
+
<resolved prior-stage output excerpt or summary>
|
|
150
|
+
|
|
151
|
+
RESOLUTION_SOURCE:
|
|
152
|
+
<previous stage output | existing context>
|
|
153
|
+
|
|
154
|
+
PLACEHOLDER_CHECK:
|
|
155
|
+
PASS (no unresolved placeholder tokens such as unresolved result aliases)
|
|
152
156
|
|
|
153
157
|
CURRENT_STAGE_OBJECTIVE:
|
|
154
158
|
<what this stage must do now>
|
|
155
159
|
```
|
|
156
160
|
|
|
161
|
+
Never pass unresolved placeholder aliases (for example unresolved result-alias syntax) in stage handoff prompts.
|
|
162
|
+
|
|
157
163
|
### "Clear and obvious" transition rule
|
|
158
164
|
|
|
159
165
|
Move to the next stage only when output is clear and obvious, meaning:
|
package/agents/planning.md
CHANGED
|
@@ -20,7 +20,6 @@ tools:
|
|
|
20
20
|
'codebase-memory-mcp_trace_call_path': true
|
|
21
21
|
'codebase-memory-mcp_get_code_snippet': true
|
|
22
22
|
'codebase-memory-mcp_search_code': true
|
|
23
|
-
'morph-mcp_codebase_search': true
|
|
24
23
|
permission:
|
|
25
24
|
skill:
|
|
26
25
|
'*': allow
|
|
@@ -53,7 +52,7 @@ You are the planning specialist.
|
|
|
53
52
|
|
|
54
53
|
## Editing Guidance
|
|
55
54
|
|
|
56
|
-
Implementation agents should
|
|
55
|
+
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
56
|
|
|
58
57
|
You are a read-only agent — you do not write or edit files.
|
|
59
58
|
|
|
@@ -66,15 +65,14 @@ Use codebase-memory MCP tools first when planning:
|
|
|
66
65
|
- `codebase-memory-mcp_trace_call_path` for dependency and impact analysis
|
|
67
66
|
- `codebase-memory-mcp_get_code_snippet` to inspect exact implementation context
|
|
68
67
|
|
|
69
|
-
This is preferred over
|
|
68
|
+
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
69
|
|
|
71
70
|
Search fallback order:
|
|
72
71
|
|
|
73
72
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for graph-first discovery.
|
|
74
73
|
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.
|
|
74
|
+
3. `read` to verify relevant source context.
|
|
75
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
78
76
|
|
|
79
77
|
## Command Output Compression
|
|
80
78
|
|
|
@@ -110,7 +108,8 @@ For external/library uncertainty, use the shared `ff-research-methods` skill dir
|
|
|
110
108
|
## Operating Mode
|
|
111
109
|
|
|
112
110
|
- Prefer deterministic, structured output sections.
|
|
113
|
-
- Use
|
|
111
|
+
- Use normalized, resolved handoff context in stage transitions (summary, status, action items, open issues, and resolved prior output excerpts).
|
|
112
|
+
- Never rely on unresolved placeholder aliases in handoff prompts.
|
|
114
113
|
- Avoid writing intermediate plan files unless a user explicitly requests durable artifacts.
|
|
115
114
|
|
|
116
115
|
## Required Output Sections
|
package/agents/reviewing.md
CHANGED
|
@@ -20,7 +20,6 @@ tools:
|
|
|
20
20
|
'codebase-memory-mcp_trace_call_path': true
|
|
21
21
|
'codebase-memory-mcp_get_code_snippet': true
|
|
22
22
|
'codebase-memory-mcp_search_code': true
|
|
23
|
-
'morph-mcp_codebase_search': true
|
|
24
23
|
permission:
|
|
25
24
|
skill:
|
|
26
25
|
'*': allow
|
|
@@ -66,15 +65,14 @@ Use codebase-memory MCP tools first when reviewing:
|
|
|
66
65
|
- `codebase-memory-mcp_trace_call_path` to verify security/validation coverage across call paths
|
|
67
66
|
- `codebase-memory-mcp_get_code_snippet` to inspect concrete evidence for findings
|
|
68
67
|
|
|
69
|
-
Prefer this over
|
|
68
|
+
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
69
|
|
|
71
70
|
Search fallback order:
|
|
72
71
|
|
|
73
72
|
1. `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture` for discovery and context.
|
|
74
73
|
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.
|
|
74
|
+
3. `read` to verify concrete evidence and line references.
|
|
75
|
+
4. `grep` for exact symbol/literal checks when needed.
|
|
78
76
|
|
|
79
77
|
## Command Output Compression
|
|
80
78
|
|
|
@@ -154,7 +152,8 @@ AUTO_HANDOFF=NO
|
|
|
154
152
|
|
|
155
153
|
## Operating Mode
|
|
156
154
|
|
|
157
|
-
- Use
|
|
155
|
+
- Use normalized, resolved handoff context (summary/status/action items/issues plus resolved prior output excerpts) rather than file-based artifacts.
|
|
156
|
+
- Never rely on unresolved placeholder aliases in handoff prompts.
|
|
158
157
|
- Keep reports concise, evidence-based, and directly actionable for implementation follow-up.
|
|
159
158
|
- Do not delegate to implementation stages from reviewing mode.
|
|
160
159
|
- Never perform implementation or file-modifying work in reviewing mode.
|
package/bin/ff-deploy.js
CHANGED
|
@@ -52,13 +52,6 @@ const DEFAULT_MCP_SERVERS = {
|
|
|
52
52
|
CONTEXT7_API_KEY: '{env:CONTEXT7_API_KEY}',
|
|
53
53
|
},
|
|
54
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
55
|
};
|
|
63
56
|
|
|
64
57
|
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
|
@@ -26,13 +26,6 @@ export declare const DEFAULT_MCP_SERVERS: {
|
|
|
26
26
|
readonly CONTEXT7_API_KEY: "{env:CONTEXT7_API_KEY}";
|
|
27
27
|
};
|
|
28
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
29
|
};
|
|
37
30
|
export interface MCPServerConfig {
|
|
38
31
|
type: 'local' | 'remote';
|
package/dist/mcp-config.js
CHANGED
|
@@ -26,13 +26,6 @@ export const DEFAULT_MCP_SERVERS = {
|
|
|
26
26
|
CONTEXT7_API_KEY: '{env:CONTEXT7_API_KEY}',
|
|
27
27
|
},
|
|
28
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
29
|
};
|
|
37
30
|
/**
|
|
38
31
|
* 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.9",
|
|
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",
|
|
@@ -20,14 +20,13 @@ Use these tools directly when available in the active agent:
|
|
|
20
20
|
- `jina-ai_parallel_search_web` / `jina-ai_parallel_read_url`
|
|
21
21
|
- `context7_resolve-library-id` / `context7_query-docs`
|
|
22
22
|
- `gh_grep_searchGitHub`
|
|
23
|
-
- `morph-mcp_github_codebase_search`
|
|
24
23
|
- `jina-ai_search_arxiv` / `jina-ai_search_ssrn`
|
|
25
24
|
|
|
26
25
|
For local code context while researching implementation fit:
|
|
27
26
|
|
|
28
27
|
- `codebase-memory-mcp_search_graph` + `codebase-memory-mcp_get_architecture`
|
|
29
28
|
- `codebase-memory-mcp_trace_call_path` + `codebase-memory-mcp_get_code_snippet`
|
|
30
|
-
- `
|
|
29
|
+
- `read` + `grep` as local fallback
|
|
31
30
|
|
|
32
31
|
## When to Use
|
|
33
32
|
|
|
@@ -96,7 +95,7 @@ Use `jina-ai_read_url` for:
|
|
|
96
95
|
|
|
97
96
|
### 4. Code Search (PROGRAMMING-SPECIFIC)
|
|
98
97
|
|
|
99
|
-
Use `context7_query-docs` and `
|
|
98
|
+
Use `context7_query-docs` and `gh_grep_searchGitHub` for:
|
|
100
99
|
|
|
101
100
|
- Finding library/SDK/API examples
|
|
102
101
|
- Understanding implementation patterns
|