@syntesseraai/opencode-feature-factory 0.10.2 → 0.10.4

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.
Files changed (52) hide show
  1. package/README.md +31 -102
  2. package/agents/building.md +10 -14
  3. package/agents/documenting.md +9 -14
  4. package/agents/feature-factory.md +15 -4
  5. package/agents/ff-research.md +5 -1
  6. package/agents/planning.md +4 -3
  7. package/agents/reviewing.md +3 -3
  8. package/bin/ff-deploy.js +8 -36
  9. package/dist/index.js +2 -2
  10. package/dist/mcp-config.d.ts +9 -1
  11. package/dist/mcp-config.js +7 -0
  12. package/dist/plugin-config.js +0 -1
  13. package/dist/tools/mini-loop.d.ts +4 -0
  14. package/dist/tools/mini-loop.js +310 -288
  15. package/dist/tools/pipeline.d.ts +4 -0
  16. package/dist/tools/pipeline.js +515 -493
  17. package/dist/workflow/fan-out.d.ts +20 -3
  18. package/dist/workflow/fan-out.js +34 -8
  19. package/dist/workflow/orchestrator.d.ts +1 -1
  20. package/dist/workflow/orchestrator.js +1 -1
  21. package/dist/workflow/run-isolation.d.ts +13 -0
  22. package/dist/workflow/run-isolation.js +77 -0
  23. package/package.json +1 -2
  24. package/command/mini-loop/documentation/document.md +0 -15
  25. package/command/mini-loop/documentation/gate.md +0 -16
  26. package/command/mini-loop/documentation/review.md +0 -17
  27. package/command/mini-loop/documentation/run.md +0 -16
  28. package/command/mini-loop/implementation/build.md +0 -15
  29. package/command/mini-loop/implementation/gate.md +0 -16
  30. package/command/mini-loop/implementation/review.md +0 -17
  31. package/command/mini-loop/implementation/run.md +0 -16
  32. package/command/mini-loop/start.md +0 -11
  33. package/command/pipeline/building/breakdown.md +0 -18
  34. package/command/pipeline/building/implement-batch.md +0 -26
  35. package/command/pipeline/building/run.md +0 -13
  36. package/command/pipeline/building/validate-batch.md +0 -17
  37. package/command/pipeline/complete.md +0 -13
  38. package/command/pipeline/documentation/document.md +0 -22
  39. package/command/pipeline/documentation/gate.md +0 -20
  40. package/command/pipeline/documentation/review.md +0 -22
  41. package/command/pipeline/documentation/run.md +0 -16
  42. package/command/pipeline/planning/confirm.md +0 -18
  43. package/command/pipeline/planning/gate.md +0 -24
  44. package/command/pipeline/planning/plan.md +0 -25
  45. package/command/pipeline/planning/run.md +0 -15
  46. package/command/pipeline/planning/synthesize.md +0 -22
  47. package/command/pipeline/reviewing/gate.md +0 -16
  48. package/command/pipeline/reviewing/review.md +0 -20
  49. package/command/pipeline/reviewing/run.md +0 -21
  50. package/command/pipeline/reviewing/synthesize.md +0 -18
  51. package/command/pipeline/reviewing/triage.md +0 -16
  52. package/command/pipeline/start.md +0 -14
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @syntesseraai/opencode-feature-factory
2
2
 
3
- OpenCode plugin that provides Feature Factory agents, skills, and pipeline commands.
3
+ OpenCode plugin that provides Feature Factory agents, skills, and workflow MCP tools.
4
4
 
5
5
  ## Installation
6
6
 
@@ -19,136 +19,65 @@ OpenCode plugin that provides Feature Factory agents, skills, and pipeline comma
19
19
  npx @syntesseraai/opencode-feature-factory install
20
20
  ```
21
21
 
22
- This installer deploys to `~/.config/opencode/`:
22
+ The installer deploys to `~/.config/opencode/`:
23
23
 
24
24
  - `agents/`
25
25
  - `skills/`
26
- - `command/`
27
26
 
28
27
  It also updates `~/.config/opencode/opencode.json` non-destructively by merging missing Feature Factory MCP entries and plugins without deleting existing user configuration.
29
28
 
30
29
  ## Install Behavior
31
30
 
32
- - **Always overwrites packaged assets**: installer unconditionally overwrites Feature Factory `agents`, `skills`, and `command` files on every install.
31
+ - **Always overwrites packaged assets**: installer unconditionally overwrites Feature Factory `agents` and `skills` files on every install.
33
32
  - **`opencode.json` is non-destructive**: existing keys/values are preserved; only missing required plugin/MCP entries are added.
34
33
  - **Global scope**: assets are installed to `~/.config/opencode/` and shared across projects.
35
34
 
36
- ## Agent Frontmatter Metadata
37
-
38
- All shipped Feature Factory agent manifests under `agents/*.md` include a `color` frontmatter field using a valid hex value.
39
-
40
- | Agent | Color |
41
- | ----------------- | --------- |
42
- | `feature-factory` | `#10b981` |
43
- | `planning` | `#3b82f6` |
44
- | `building` | `#22c55e` |
45
- | `reviewing` | `#8b5cf6` |
46
- | `documenting` | `#f97316` |
47
- | `ff-research` | `#6366f1` |
48
-
49
- These colors are intentionally unique to avoid collisions in OpenCode agent UIs and logs.
50
-
51
- ## Pipeline Entrypoint
52
-
53
- - Invoke `/pipeline/start <requirements-brief>` directly from any agent (e.g. `@building`).
54
- - There is no dedicated `@pipeline` intake agent; the command tree handles orchestration autonomously.
55
- - Orchestration is implemented by the command tree under `command/pipeline/` using subtask2 primitives (`return`, `parallel`, `loop`).
56
- - Orchestration wrapper commands (`/pipeline/start`, `/pipeline/*/run`, `/pipeline/complete`) pin `agent: general` to avoid recursive self-invocation before phase-specific delegation begins.
57
- - Coordinator and synthesis model defaults to ChatGPT 5.4 via frontmatter `model:` declarations in orchestrator commands.
58
- - All orchestrator commands include an explicit **orchestrator constraint**: they must NOT directly read, edit, modify, write, or create any code/config/repository files — they only dispatch sub-commands, pass structured data via `{as:name}` / `$RESULT[name]`, and evaluate gate/loop conditions.
59
-
60
35
  ## Tools
61
36
 
62
37
  The plugin exposes three MCP tools via the `feature-factory` agent:
63
38
 
64
- | Tool | Description |
65
- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
- | `ff_pipeline` | Full multi-model pipeline: planning → build → CI → review → documentation. Uses hardcoded per-role model defaults (see Model Routing below). |
67
- | `ff_mini_loop` | Lightweight build → CI → review → documentation loop. **Does not hardcode model defaults** — all roles inherit the current session model when omitted. CI validation runs `ff-ci.sh` if present (up to 3 attempts with auto-fix). |
68
- | `ff_list_models` | Read-only discovery tool. Queries the OpenCode SDK to list all available providers, models, capability badges, connected status, and defaults. |
39
+ | Tool | Description |
40
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | `ff_pipeline` | Full multi-model workflow: planning -> build -> CI -> review -> documentation. Uses hardcoded per-role model defaults and supports optional `worktree_isolation` / `worktree_parent_dir`. |
42
+ | `ff_mini_loop` | Lightweight build -> CI -> review -> documentation loop. Model parameters inherit the current session model when omitted. Supports optional `worktree_isolation` / `worktree_parent_dir`. |
43
+ | `ff_list_models` | Read-only discovery tool that lists available providers/models and defaults from the OpenCode SDK. |
69
44
 
70
45
  ### Mini-Loop Model Inheritance
71
46
 
72
- When `ff_mini_loop` model parameters are omitted, child sessions inherit the parent session's model (the SDK `model` field is omitted entirely from the prompt body). The `doc_model` has a cascade: if `build_model` is explicitly set but `doc_model` is not, the documentation step uses the same model as build. Users can call `ff_list_models` to discover available `provider/model` strings before overriding.
73
-
74
- ## Command Tree
75
-
76
- - `/pipeline/start`
77
- - `/pipeline/planning/run`, `/pipeline/planning/plan`, `/pipeline/planning/synthesize`, `/pipeline/planning/gate`, `/pipeline/planning/confirm`
78
- - `/pipeline/building/run`, `/pipeline/building/breakdown`, `/pipeline/building/validate-batch`, `/pipeline/building/implement-batch`
79
- - `/pipeline/reviewing/run`, `/pipeline/reviewing/triage`, `/pipeline/reviewing/review`, `/pipeline/reviewing/synthesize`, `/pipeline/reviewing/gate`
80
- - `/pipeline/documentation/run`, `/pipeline/documentation/document`, `/pipeline/documentation/review`, `/pipeline/documentation/gate`
81
- - `/pipeline/complete`
82
- - `/mini-loop/start`
83
- - `/mini-loop/implementation/run`, `/mini-loop/implementation/build`, `/mini-loop/implementation/review`, `/mini-loop/implementation/gate`
84
- - `/mini-loop/documentation/run`, `/mini-loop/documentation/document`, `/mini-loop/documentation/review`, `/mini-loop/documentation/gate`
85
- - Mini-loop wrapper commands (`/mini-loop/start`, `/mini-loop/*/run`) also pin `agent: general` so they can be safely launched from any caller agent.
86
-
87
- ## Model Routing
88
-
89
- Models are declared in each command's frontmatter (`model:` field). Multi-model fan-out targets (`plan.md`, `review.md`) use per-invocation `{model:...}` overrides since they are invoked multiple times with different models.
47
+ When `ff_mini_loop` model parameters are omitted, child sessions inherit the parent session model (the SDK `model` field is omitted). The `doc_model` has a cascade: if `build_model` is set and `doc_model` is omitted, documentation uses `build_model`.
90
48
 
91
- | Role | Model | Commands |
92
- | ----------------------- | --------------------------- | --------------------------------------------------------------------------- |
93
- | Orchestration/reasoning | `openai/gpt-5.4` | All `run.md`, `start.md`, `complete.md`, gates, triage, synthesize, confirm |
94
- | Implementation | `openai/gpt-5.3-codex` | `implement-batch`, `build`, `document` |
95
- | Architecture analysis | `anthropic/claude-opus-4-6` | `breakdown`, review fan-out (opus slot) |
96
- | Validation | `opencode/gemini-3.1-pro` | `validate-batch`, documentation review, review fan-out (gemini slot) |
97
- | Multi-model fan-out | per-invocation | `plan.md`, `review.md` |
49
+ ## Global Config Defaults
98
50
 
99
- - Pipeline stages pass intermediate artifacts with `{as:name}` and `$RESULT[name]` (minimal file persistence)
100
- - Planning fan-out (with architecture validation): opus, gemini, and codex models in parallel
101
- - Implementation: codex via frontmatter model declaration in `implement-batch.md`, with parallel `building` sub-agents per independent task within each batch
102
- - Review fan-out (with architecture validation): opus, gemini, and codex models in parallel
103
- - Rework path: `/pipeline/reviewing/run` re-enters implementation via `/pipeline/building/implement-batch` when gate status is `REWORK`
104
- - Documentation stage: codex updates documentation, gemini reviews docs, and orchestrator (`gpt-5.4`) supervises a bounded loop until approved
105
- - Documentation stage skill usage: codex pass loads `ff-todo-management`, `ff-mini-plan`; gemini review pass loads `ff-report-templates` and `ff-severity-classification`
51
+ The plugin merges the following MCP servers into global OpenCode config when missing:
106
52
 
107
- ## Quality Gates
53
+ - `jina-ai`
54
+ - `gh_grep`
55
+ - `context7`
56
+ - `morph-mcp`
108
57
 
109
- - Planning approval: `>=75%` consensus.
110
- - Review approval: `>=95%` confidence and zero unresolved issues.
111
- - Documentation approval: documentation reviewer verdict `APPROVED` with zero unresolved documentation issues.
112
- - Planning loop confirmation: after 5 unsuccessful planning iterations, pipeline asks user whether to continue.
113
-
114
- ## Async Progress Notifications
115
-
116
- Both `ff_pipeline` and `ff_mini_loop` tools run asynchronously with real-time progress notifications:
117
-
118
- - **Immediate return**: Tools return instantly with a brief acknowledgment (e.g. `Pipeline started for: <summary>`), so the LLM can continue the conversation.
119
- - **Background orchestration**: The full pipeline or mini-loop runs in a detached `Promise`. All child session orchestration (fan-out, gates, loops) remains identical — it just executes after the tool returns.
120
- - **Progress updates via `promptAsync(noReply: true)`**: After each major phase completes, a structured notification is injected into the parent session as a visible chat message. These appear in the OpenCode TUI without triggering an LLM turn.
121
- - **Phase-by-phase visibility**: Users see updates for planning, building, CI validation (when `ff-ci.sh` present), each review iteration gate decision, each documentation iteration, and the final completion report.
122
- - **Error notifications**: If the background orchestration throws, a `# Pipeline: Error` or `# Mini-Loop: Error` notification is sent with the last phase and error message.
123
- - **`context.metadata()` retained**: All existing metadata calls remain in place for future-proofing (when OpenCode's TUI renders tool metadata natively).
124
-
125
- ### Notification Format
126
-
127
- Pipeline notifications use plain-text markdown headers with phase START/END bracketing and per-iteration gate details:
58
+ `morph-mcp` is configured as:
128
59
 
60
+ ```json
61
+ "morph-mcp": {
62
+ "type": "local",
63
+ "command": ["npx", "-y", "@morphllm/morphmcp"],
64
+ "environment": {
65
+ "MORPH_API_KEY": "{env:MORPH_API_KEY}"
66
+ }
67
+ }
129
68
  ```
130
- # Pipeline: Reviewing — Iteration 2/10
131
69
 
132
- Status: APPROVED
133
- Confidence: 97%
134
- Unresolved Issues: 0
135
- Duration: 45.3s
136
- Feedback: N/A
137
- ```
70
+ ### Merge Outcomes
138
71
 
139
- Mini-loop notifications follow the same pattern:
72
+ `DEFAULT_MCP_SERVERS` currently includes 4 servers (`jina-ai`, `gh_grep`, `context7`, `morph-mcp`).
140
73
 
141
- ```
142
- # Mini-Loop: Building — Iteration 1/10
74
+ The merge behavior is additive and non-destructive:
143
75
 
144
- Status: REWORK
145
- Confidence: 82%
146
- Unresolved Issues: 2
147
- Duration: 23.1s
148
- Feedback: Fix type errors in handler.ts
149
- ```
76
+ - Empty or missing existing MCP config -> 4 servers after merge.
77
+ - Existing config with 1 custom server and a customized `gh_grep` entry -> 5 servers after merge (custom + customized `gh_grep` + 3 missing defaults).
78
+ - Existing server definitions are preserved and never overwritten by defaults.
150
79
 
151
- Final reports use `# Pipeline: Complete` or `# Mini-Loop: Complete` headers containing the full markdown report. Errors use `# Pipeline: Error` or `# Mini-Loop: Error`.
80
+ The plugin list is also merged non-destructively to ensure required companion plugins are present.
152
81
 
153
82
  ## Related Docs
154
83
 
@@ -4,10 +4,10 @@ mode: primary
4
4
  color: '#22c55e'
5
5
  tools:
6
6
  read: true
7
- write: true
8
- edit: true
7
+ write: false
8
+ edit: false
9
+ edit_file: true
9
10
  bash: true
10
- hashline_edit: true
11
11
  skill: true
12
12
  task: true
13
13
  permission:
@@ -34,23 +34,19 @@ You are the building specialist.
34
34
  - Do not rely on intermediate artifact files for pipeline progression.
35
35
  - Persist only when explicitly requested by the user.
36
36
 
37
- ## Hashline Workflow (Required)
37
+ ## Editing Workflow (Required)
38
38
 
39
- File reads and edits use hashline-annotated tools. The `read` tool returns lines annotated with `#HL <line>:<hash>|<content>` and a `#HL REV:<hash>` header. Follow this workflow:
39
+ Use Morph MCP `edit_file` for all implementation edits.
40
40
 
41
- 1. **Always `read` before editing.** Note the `REV` value from the `#HL REV:<hash>` header — you need it for edits.
42
- 2. **Use `hashline_edit`** for targeted, hash-referenced edits. Operations: `replace`, `delete`, `insert_before`, `insert_after`. Example:
43
- ```json
44
- { "path": "src/app.ts", "operation": "replace", "startRef": "5:a3f", "replacement": "const value = 2", "fileRev": "72c4946c" }
45
- ```
46
- 3. **Use built-in `edit`/`write`** for standard edits — hashline prefixes are automatically stripped before the tool executes.
47
- 4. **After any edit/write**, re-read the file to get fresh refs before further edits.
48
-
49
- Never fabricate refs — always use exactly the refs returned by `read`.
41
+ 1. **Read before editing** to confirm current behavior and scope.
42
+ 2. **Apply changes with `edit_file`** for targeted replacements/insertions.
43
+ 3. **Re-read after edits** to verify the applied diff and avoid stale assumptions.
44
+ 4. **Avoid fallback editors** unless `edit_file` cannot express the required change.
50
45
 
51
46
  ## Semantic Code Search
52
47
 
53
48
  Use `cocoindex-code_search` for semantic code search when you need to:
49
+
54
50
  - Find implementations by meaning, not just text matching (e.g., "authentication logic", "database connection handling")
55
51
  - Locate related code without knowing exact names or keywords
56
52
  - Understand how features work across the codebase
@@ -4,10 +4,10 @@ mode: primary
4
4
  color: '#f97316'
5
5
  tools:
6
6
  read: true
7
- write: true
8
- edit: true
7
+ write: false
8
+ edit: false
9
+ edit_file: true
9
10
  bash: false
10
- hashline_edit: true
11
11
  skill: true
12
12
  task: true
13
13
  permission:
@@ -26,19 +26,14 @@ You are the documenting specialist.
26
26
  - Keep docs concise, consistent, and free of stale references.
27
27
  - Return a structured summary for documentation review.
28
28
 
29
- ## Hashline Workflow (Required)
29
+ ## Editing Workflow (Required)
30
30
 
31
- File reads and edits use hashline-annotated tools. The `read` tool returns lines annotated with `#HL <line>:<hash>|<content>` and a `#HL REV:<hash>` header. Follow this workflow:
31
+ Use Morph MCP `edit_file` for documentation updates.
32
32
 
33
- 1. **Always `read` before editing.** Note the `REV` value — you need it for edits.
34
- 2. **Use `hashline_edit`** for targeted, hash-referenced edits. Operations: `replace`, `delete`, `insert_before`, `insert_after`. Example:
35
- ```json
36
- { "path": "docs/FILE.md", "operation": "replace", "startRef": "5:a3f", "replacement": "Updated text", "fileRev": "72c4946c" }
37
- ```
38
- 3. **Use built-in `edit`/`write`** for standard edits — hashline prefixes are automatically stripped.
39
- 4. **After any edit/write**, re-read the file to get fresh refs before further edits.
40
-
41
- Never fabricate refs — always use exactly the refs returned by `read`.
33
+ 1. **Read before editing** to confirm the current content and linked references.
34
+ 2. **Apply changes with `edit_file`** for precise doc updates.
35
+ 3. **Re-read after edits** to validate wording and cross-doc consistency.
36
+ 4. **Avoid fallback editors** unless `edit_file` cannot express the required change.
42
37
 
43
38
  ## Semantic Code Search
44
39
 
@@ -7,7 +7,6 @@ tools:
7
7
  write: false
8
8
  edit: false
9
9
  bash: false
10
- hashline_edit: false
11
10
  skill: true
12
11
  task: true
13
12
  ff_pipeline: true
@@ -32,6 +31,7 @@ Work through this process step by step. Do NOT skip steps or launch a tool until
32
31
  ## Semantic Code Search
33
32
 
34
33
  Use `cocoindex-code_search` to quickly understand the codebase when clarifying requirements:
34
+
35
35
  - Search by meaning (e.g., "user authentication flow", "API rate limiting") to understand existing architecture
36
36
  - Use this to give informed answers when the user asks about current behavior
37
37
 
@@ -40,6 +40,7 @@ Use `cocoindex-code_search` to quickly understand the codebase when clarifying r
40
40
  ## Step 1: Understand the request
41
41
 
42
42
  Work through the user's request in a Socratic manner:
43
+
43
44
  - Ask clarifying questions about scope, constraints, and acceptance criteria.
44
45
  - Summarise your understanding back to them and ask them to confirm or correct it.
45
46
  - Continue until you have a clear, unambiguous set of requirements.
@@ -53,6 +54,7 @@ If the user hasn't provided a request yet, ask them what they would like to buil
53
54
  Once requirements are agreed, present the two workflow options:
54
55
 
55
56
  **Pipeline** (full multi-model workflow)
57
+
56
58
  - Multi-model fan-out planning (3 models propose plans, then consensus synthesis)
57
59
  - Build phase with task breakdown and batch validation
58
60
  - Multi-model fan-out code review
@@ -60,6 +62,7 @@ Once requirements are agreed, present the two workflow options:
60
62
  - Best for: complex features, architectural changes, high-risk work
61
63
 
62
64
  **Mini-loop** (lightweight workflow)
65
+
63
66
  - Direct build → review loop (single model per step)
64
67
  - Documentation with review loop
65
68
  - Best for: small features, bug fixes, incremental improvements, well-understood changes
@@ -73,6 +76,7 @@ Ask the user which workflow they prefer. If they are unsure, recommend one based
73
76
  Present the default models that will be used for the chosen workflow:
74
77
 
75
78
  **Pipeline defaults:** (hardcoded per-role model assignments)
79
+
76
80
  - Planning fan-out: opus (anthropic/claude-opus-4-6), gemini (opencode/gemini-3.1-pro), codex (openai/gpt-5.3-codex)
77
81
  - Review fan-out: same as planning
78
82
  - Orchestrator (synthesis/triage): openai/gpt-5.4
@@ -82,6 +86,7 @@ Present the default models that will be used for the chosen workflow:
82
86
  - Doc review: opencode/gemini-3.1-pro
83
87
 
84
88
  **Mini-loop defaults:** (inherits the current session model)
89
+
85
90
  - All roles (build, review, documentation, doc review) default to the **current session model** — no hardcoded model is forced.
86
91
  - This means the mini-loop automatically uses whatever model you're currently chatting with.
87
92
  - You can override any individual role if desired (e.g., use a different model for review).
@@ -92,13 +97,19 @@ For the **Mini-loop**, ask: "The mini-loop will use your current session model f
92
97
 
93
98
  If they want to override, collect the provider/model strings for each role they want to change.
94
99
 
100
+ Before moving to launch, also confirm execution isolation:
101
+
102
+ - Ask whether they want **worktree isolation** enabled.
103
+ - Explain: when enabled, the workflow runs in a dedicated detached git worktree directory to avoid collisions with other concurrent runs.
104
+ - If enabled, optionally collect a custom `worktree_parent_dir`; otherwise default behavior is used.
105
+
95
106
  ---
96
107
 
97
108
  ## Step 4: Launch
98
109
 
99
110
  Once all three steps are confirmed, call the appropriate tool:
100
111
 
101
- - If they chose **Pipeline**: call the `ff_pipeline` tool with the agreed requirements and any model overrides.
102
- - If they chose **Mini-loop**: call the `ff_mini_loop` tool with the agreed requirements and any model overrides.
112
+ - If they chose **Pipeline**: call the `ff_pipeline` tool with the agreed requirements, any model overrides, and worktree options when requested.
113
+ - If they chose **Mini-loop**: call the `ff_mini_loop` tool with the agreed requirements, any model overrides, and worktree options when requested.
103
114
 
104
- Pass only the model parameters that were explicitly overridden; omit any that should use defaults.
115
+ Pass only model parameters that were explicitly overridden, and include worktree parameters only when explicitly requested.
@@ -7,7 +7,6 @@ tools:
7
7
  write: false
8
8
  edit: false
9
9
  bash: false
10
- hashline_edit: false
11
10
  skill: true
12
11
  task: false
13
12
  permission:
@@ -28,6 +27,7 @@ You are the research specialist.
28
27
  You have access to powerful external research tools. **Use them proactively:**
29
28
 
30
29
  ### Web Search & Reading
30
+
31
31
  - **`jina-ai_search_web`** — Search the web for current information, docs, articles. Use for up-to-date library info, best practices, changelogs.
32
32
  - **`jina-ai_read_url`** — Read and extract content from any URL. Use to read official documentation, blog posts, READMEs.
33
33
  - **`jina-ai_expand_query`** — Expand search queries for broader coverage.
@@ -35,17 +35,21 @@ You have access to powerful external research tools. **Use them proactively:**
35
35
  - **`jina-ai_parallel_read_url`** — Read multiple URLs in parallel.
36
36
 
37
37
  ### Library Documentation
38
+
38
39
  - **`context7_resolve-library-id`** — Resolve a library name to a Context7 ID. Call this first before querying docs.
39
40
  - **`context7_query-docs`** — Query up-to-date library documentation with code examples. Excellent for API usage, configuration, and best practices.
40
41
 
41
42
  ### Code Examples
43
+
42
44
  - **`gh_grep_searchGitHub`** — Find real-world code examples from public GitHub repos. Search for literal code patterns (e.g., `useState(`, `import React from`), NOT keywords. Use to see how real projects implement specific patterns.
43
45
 
44
46
  ### Academic Papers
47
+
45
48
  - **`jina-ai_search_arxiv`** — Search arXiv for research papers (AI, CS, physics, math).
46
49
  - **`jina-ai_search_ssrn`** — Search SSRN for social science research.
47
50
 
48
51
  ### Semantic Code Search
52
+
49
53
  - **`cocoindex-code_search`** — Search the local codebase by meaning. Use to understand the project's existing patterns before recommending changes.
50
54
 
51
55
  ## Method
@@ -7,7 +7,6 @@ tools:
7
7
  write: false
8
8
  edit: false
9
9
  bash: false
10
- hashline_edit: false
11
10
  skill: true
12
11
  task: true
13
12
  permission:
@@ -26,15 +25,16 @@ You are the planning specialist.
26
25
  - Identify risks, assumptions, and validation strategy.
27
26
  - Apply planning gate criteria and emit explicit status lines.
28
27
 
29
- ## Hashline Workflow (Required)
28
+ ## Editing Guidance
30
29
 
31
- Use the `read` tool to inspect files. Lines are annotated with `#HL <line>:<hash>|<content>` and a `#HL REV:<hash>` header. Use these refs when planning edit operations — include the `startRef` values in your implementation steps so the builder can apply them directly.
30
+ Implementation should prefer Morph MCP `edit_file` for code changes. In planning outputs, reference concrete files and intended edits, not line-hash references.
32
31
 
33
32
  You are a read-only agent — you do not write or edit files.
34
33
 
35
34
  ## Semantic Code Search
36
35
 
37
36
  Use `cocoindex-code_search` for semantic code search when planning:
37
+
38
38
  - Understand existing architecture by meaning (e.g., "authentication logic", "API routing")
39
39
  - Find related implementations before proposing changes
40
40
  - Verify assumptions about how code works
@@ -44,6 +44,7 @@ Prefer this over `grep` when searching by concept rather than exact text.
44
44
  ## External Research
45
45
 
46
46
  Use `@ff-research` for external/library uncertainty. The research agent has access to:
47
+
47
48
  - `jina-ai_search_web` / `jina-ai_read_url` for web search and documentation
48
49
  - `context7_query-docs` for library-specific documentation
49
50
  - `gh_grep_searchGitHub` for real-world code examples
@@ -7,7 +7,6 @@ tools:
7
7
  write: false
8
8
  edit: false
9
9
  bash: false
10
- hashline_edit: false
11
10
  skill: true
12
11
  task: true
13
12
  permission:
@@ -26,15 +25,16 @@ You are the unified reviewing specialist.
26
25
  - Apply scope based on context: acceptance, code quality, security, architecture, documentation.
27
26
  - Return actionable findings with severity and confidence.
28
27
 
29
- ## Hashline Workflow (Required)
28
+ ## File Review Guidance
30
29
 
31
- Use the `read` tool to inspect files. Lines are annotated with `#HL <line>:<hash>|<content>` and a `#HL REV:<hash>` header. Use these refs to cite specific lines in your review findings.
30
+ Use the `read` tool to inspect files and cite standard line references in findings. Do not require hash-based line references.
32
31
 
33
32
  You are a read-only agent — you do not write or edit files.
34
33
 
35
34
  ## Semantic Code Search
36
35
 
37
36
  Use `cocoindex-code_search` for semantic code search when reviewing:
37
+
38
38
  - Search by meaning to find related code (e.g., "input validation", "access control checks")
39
39
  - Verify that implementations match architectural patterns across the codebase
40
40
  - Find similar code to check for consistency
package/bin/ff-deploy.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Feature Factory Deployment Script
5
5
  *
6
- * Deploys skills, agents, and command files to the global OpenCode configuration directory.
6
+ * Deploys skills and agents to the global OpenCode configuration directory.
7
7
  * Run manually with: npx @syntesseraai/opencode-feature-factory
8
8
  */
9
9
 
@@ -18,13 +18,11 @@ const __dirname = dirname(__filename);
18
18
  const GLOBAL_CONFIG_DIR = join(homedir(), '.config', 'opencode');
19
19
  const SKILLS_DIR = join(GLOBAL_CONFIG_DIR, 'skills');
20
20
  const AGENTS_DIR = join(GLOBAL_CONFIG_DIR, 'agents');
21
- const COMMAND_DIR = join(GLOBAL_CONFIG_DIR, 'command');
22
21
  const GLOBAL_CONFIG_FILE = join(GLOBAL_CONFIG_DIR, 'opencode.json');
23
22
 
24
23
  const PACKAGE_ROOT = join(__dirname, '..');
25
24
  const SOURCE_SKILLS_DIR = join(PACKAGE_ROOT, 'skills');
26
25
  const SOURCE_AGENTS_DIR = join(PACKAGE_ROOT, 'agents');
27
- const SOURCE_COMMAND_DIR = join(PACKAGE_ROOT, 'command');
28
26
 
29
27
  // Check if running in interactive mode (has TTY)
30
28
  const isInteractive = process.stdin.isTTY && process.stdout.isTTY;
@@ -49,6 +47,13 @@ const DEFAULT_MCP_SERVERS = {
49
47
  CONTEXT7_API_KEY: '{env:CONTEXT7_API_KEY}',
50
48
  },
51
49
  },
50
+ 'morph-mcp': {
51
+ type: 'local',
52
+ command: ['npx', '-y', '@morphllm/morphmcp'],
53
+ environment: {
54
+ MORPH_API_KEY: '{env:MORPH_API_KEY}',
55
+ },
56
+ },
52
57
  };
53
58
 
54
59
  const DEFAULT_PLUGINS = [
@@ -57,7 +62,6 @@ const DEFAULT_PLUGINS = [
57
62
  '@franlol/opencode-md-table-formatter@latest',
58
63
  '@spoons-and-mirrors/subtask2@latest',
59
64
  'opencode-pty@latest',
60
- 'opencode-hashline@latest',
61
65
  ];
62
66
 
63
67
  function getPackageBaseName(plugin) {
@@ -132,26 +136,6 @@ async function getFileNames(dir) {
132
136
  }
133
137
  }
134
138
 
135
- async function getMarkdownFileCount(dir) {
136
- try {
137
- const entries = await fs.readdir(dir, { withFileTypes: true });
138
- let count = 0;
139
-
140
- for (const entry of entries) {
141
- const entryPath = join(dir, entry.name);
142
- if (entry.isDirectory()) {
143
- count += await getMarkdownFileCount(entryPath);
144
- } else if (entry.isFile() && entry.name.endsWith('.md')) {
145
- count += 1;
146
- }
147
- }
148
-
149
- return count;
150
- } catch {
151
- return 0;
152
- }
153
- }
154
-
155
139
  async function updateMCPConfig() {
156
140
  if (isInteractive) {
157
141
  console.log('\n🔧 MCP Configuration Update');
@@ -292,7 +276,6 @@ async function deploy() {
292
276
  await ensureDir(GLOBAL_CONFIG_DIR);
293
277
  await ensureDir(SKILLS_DIR);
294
278
  await ensureDir(AGENTS_DIR);
295
- await ensureDir(COMMAND_DIR);
296
279
 
297
280
  // Get existing skills/agents for reporting
298
281
  const existingSkills = await getDirectoryNames(SKILLS_DIR);
@@ -333,22 +316,11 @@ async function deploy() {
333
316
  }
334
317
  }
335
318
 
336
- // Deploy command files
337
- if (isInteractive) {
338
- console.log('\n⌨️ Deploying Commands...');
339
- }
340
- await copyDir(SOURCE_COMMAND_DIR, COMMAND_DIR);
341
- const commandsCount = await getMarkdownFileCount(SOURCE_COMMAND_DIR);
342
- if (isInteractive) {
343
- console.log(` ✅ pipeline commands (${commandsCount} files) (overwritten)`);
344
- }
345
-
346
319
  // Summary
347
320
  if (isInteractive) {
348
321
  console.log('\n✨ Deployment Complete!');
349
322
  console.log(` Skills: ${skills.length} deployed`);
350
323
  console.log(` Agents: ${agents.length} deployed`);
351
- console.log(` Commands: ${commandsCount} deployed`);
352
324
  console.log(` Location: ${GLOBAL_CONFIG_DIR}`);
353
325
  console.log('\n📝 Next Steps:');
354
326
  console.log(' - Restart OpenCode or run /reload to load new agents');
package/dist/index.js CHANGED
@@ -45,8 +45,8 @@ export const FeatureFactoryPlugin = async (input) => {
45
45
  const qualityGateHooks = await StopQualityGateHooksPlugin(input).catch(() => ({}));
46
46
  // Tool registry: workflow tools (ff_pipeline, ff_mini_loop) powered by
47
47
  // the SDK client for programmatic session orchestration.
48
- // The old ff-* artifact tools were removed; these replace the subtask2
49
- // command-based workflow with TypeScript-driven orchestration.
48
+ // The old ff-* artifact tools were removed; orchestration is fully
49
+ // TypeScript-driven via these workflow tools.
50
50
  const workflowTools = createWorkflowTools(input.client);
51
51
  // Merge workflow tools with any existing tools from quality gate hooks
52
52
  const existingTools = qualityGateHooks.tool ?? {};
@@ -22,12 +22,20 @@ export declare const DEFAULT_MCP_SERVERS: {
22
22
  readonly CONTEXT7_API_KEY: "{env:CONTEXT7_API_KEY}";
23
23
  };
24
24
  };
25
+ readonly 'morph-mcp': {
26
+ readonly type: "local";
27
+ readonly command: readonly ["npx", "-y", "@morphllm/morphmcp"];
28
+ readonly environment: {
29
+ readonly MORPH_API_KEY: "{env:MORPH_API_KEY}";
30
+ };
31
+ };
25
32
  };
26
33
  export interface MCPServerConfig {
27
34
  type: 'local' | 'remote';
28
- command?: string;
35
+ command?: string[];
29
36
  url?: string;
30
37
  headers?: Record<string, string>;
38
+ environment?: Record<string, string>;
31
39
  enabled?: boolean;
32
40
  }
33
41
  export interface MCPServers {
@@ -22,6 +22,13 @@ export const DEFAULT_MCP_SERVERS = {
22
22
  CONTEXT7_API_KEY: '{env:CONTEXT7_API_KEY}',
23
23
  },
24
24
  },
25
+ 'morph-mcp': {
26
+ type: 'local',
27
+ command: ['npx', '-y', '@morphllm/morphmcp'],
28
+ environment: {
29
+ MORPH_API_KEY: '{env:MORPH_API_KEY}',
30
+ },
31
+ },
25
32
  };
26
33
  /**
27
34
  * Merge MCP servers, preserving existing servers and adding new ones.
@@ -10,7 +10,6 @@ export const DEFAULT_PLUGINS = [
10
10
  '@franlol/opencode-md-table-formatter@latest',
11
11
  '@spoons-and-mirrors/subtask2@latest',
12
12
  'opencode-pty@latest',
13
- 'opencode-hashline@latest',
14
13
  ];
15
14
  /**
16
15
  * Extract the base package name from a plugin specifier, stripping the
@@ -17,6 +17,8 @@ export declare function createMiniLoopTool(client: Client): {
17
17
  review_model: import("zod").ZodOptional<import("zod").ZodString>;
18
18
  doc_model: import("zod").ZodOptional<import("zod").ZodString>;
19
19
  doc_review_model: import("zod").ZodOptional<import("zod").ZodString>;
20
+ worktree_isolation: import("zod").ZodOptional<import("zod").ZodBoolean>;
21
+ worktree_parent_dir: import("zod").ZodOptional<import("zod").ZodString>;
20
22
  };
21
23
  execute(args: {
22
24
  requirements: string;
@@ -24,5 +26,7 @@ export declare function createMiniLoopTool(client: Client): {
24
26
  review_model?: string | undefined;
25
27
  doc_model?: string | undefined;
26
28
  doc_review_model?: string | undefined;
29
+ worktree_isolation?: boolean | undefined;
30
+ worktree_parent_dir?: string | undefined;
27
31
  }, context: import("@opencode-ai/plugin/tool").ToolContext): Promise<string>;
28
32
  };