@syntesseraai/opencode-feature-factory 0.12.0 → 0.12.2

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 CHANGED
@@ -5,11 +5,11 @@ This file is installed to `~/.config/opencode/AGENTS.md` by `@syntesseraai/openc
5
5
  ## What Feature Factory Provides
6
6
 
7
7
  - Native workflow orchestration through the `feature-factory` agent.
8
- - Default orchestrator model: `feature-factory` -> `github-copilot/gpt-5.4-mini`
8
+ - Default orchestrator model: `feature-factory` -> `openai/gpt-5.4-fast`
9
9
  - Stage sub-agents with default model routing:
10
- - `planning` -> `openai/gpt-5.4`
11
- - `building` -> `openai/gpt-5.3-codex`
12
- - `reviewing` -> `opencode/glm-5.1`
10
+ - `planning` -> `openai/gpt-5.4-fast`
11
+ - `building` -> `openai/gpt-5.4-fast`
12
+ - `reviewing` -> `opencode/claude-opus-4-7`
13
13
  - `documenting` -> `opencode/gemini-3.1-pro`
14
14
  - Specialized agents: `feature-factory`, `planning`, `building`, `reviewing`, and `documenting`.
15
15
  - Quick commands: `/ff-review [optional prompt]`, `/ff-document [optional prompt]`, and `/ff-rework [optional prompt]` (all run as main agents on the relevant stage).
@@ -19,7 +19,7 @@ This file is installed to `~/.config/opencode/AGENTS.md` by `@syntesseraai/openc
19
19
 
20
20
  1. Clarify requirements and acceptance criteria before coding.
21
21
  2. Plan only when no approved planning handoff exists (`PLANNING_GATE=APPROVED` + `FINAL_PLAN`).
22
- 3. Ask for explicit user confirmation before implementation.
22
+ 3. Confirm scope in 1-3 bullets; that scope confirmation counts as implementation approval.
23
23
  4. Build.
24
24
  5. Document.
25
25
  6. Review implementation and documentation gates.
package/README.md CHANGED
@@ -58,16 +58,16 @@ The plugin no longer exposes `ff_pipeline`, `ff_mini_loop`, or `ff_list_models`
58
58
 
59
59
  Instead, the `feature-factory` primary agent orchestrates workflows natively by delegating to stage sub-agents:
60
60
 
61
- - `feature-factory` (orchestrator) -> default model `github-copilot/gpt-5.4-mini`
62
- - `planning` -> default model `openai/gpt-5.4`
63
- - `building` -> default model `openai/gpt-5.3-codex`
64
- - `reviewing` -> default model `opencode/glm-5.1`
61
+ - `feature-factory` (orchestrator) -> default model `openai/gpt-5.4-fast`
62
+ - `planning` -> default model `openai/gpt-5.4-fast`
63
+ - `building` -> default model `openai/gpt-5.4-fast`
64
+ - `reviewing` -> default model `opencode/claude-opus-4-7`
65
65
  - `documenting` -> default model `opencode/gemini-3.1-pro`
66
66
 
67
67
  ### Fixed execution path
68
68
 
69
69
  1. Plan if needed (or consume approved planning handoff).
70
- 2. Explicit confirmation checkpoint.
70
+ 2. Scope confirmation checkpoint; confirmed scope is the implementation approval.
71
71
  3. Build.
72
72
  4. Document.
73
73
  5. Review implementation + documentation gates.
@@ -76,6 +76,8 @@ 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
+ When an approved planning handoff already includes `PLANNING_GATE=APPROVED` + `FINAL_PLAN`, or when an interactive planning loop reaches confirmed scope, the orchestrator uses the scoped summary as the only required implementation approval. It must not ask a second implementation-confirmation question or add a separate “starting now” notice before Build.
80
+
79
81
  Writable stage agents (`building`, `documenting`) prefer native `edit` (and `write` for new files) when needed. Read-only agents keep `edit` disabled.
80
82
 
81
83
  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.
@@ -95,9 +97,10 @@ The plugin includes an auto-handoff hook that continues deterministic next steps
95
97
  - The orchestrator (`@feature-factory`) remains the source of truth for workflow progression.
96
98
  - Auto-handoff is a continuation safety net, not a replacement for orchestrator logic.
97
99
  - On `session.idle`, the hook queries `client.session.messages({ path: { id: sessionId } })`, scans messages in reverse order, and parses only the latest assistant message.
98
- - The hook extracts the next prompt only from these exact machine-readable formats:
100
+ - The hook extracts the next prompt only from these machine-readable formats (outer quotes are optional, may be single or double quotes, and are stripped when present):
99
101
  - `RECOMMENDED_NEXT_STEP: "<human-readable next step>"`
100
102
  - `RECOMMENDED_NEXT_STEP="<human-readable next step>"`
103
+ - `RECOMMENDED_NEXT_STEP='<human-readable next step>'`
101
104
 
102
105
  - If the latest assistant message does not include one of those formats, the hook does nothing.
103
106
  - The hook does not buffer streaming assistant chunks and does not enforce a fixed per-session handoff cap.
@@ -93,8 +93,9 @@ In this handoff mode:
93
93
 
94
94
  1. Do not force the user back through planning.
95
95
  2. Confirm the plan scope in 1-3 bullets.
96
- 3. Start workflow execution at the first build step, using `FINAL_PLAN` as primary input.
97
- 4. Preserve original planning risk/testing assumptions in downstream handoffs.
96
+ 3. Treat that confirmed scope summary as implementation authorization; do not ask for a second implementation-confirmation prompt.
97
+ 4. Start workflow execution at the first build step immediately after the scoped summary, using `FINAL_PLAN` as primary input.
98
+ 5. Preserve original planning risk/testing assumptions in downstream handoffs.
98
99
 
99
100
  ---
100
101
 
@@ -103,7 +104,7 @@ In this handoff mode:
103
104
  Use one fixed workflow only:
104
105
 
105
106
  1. Plan if no approved plan exists.
106
- 2. Ask for explicit user confirmation before implementation begins.
107
+ 2. Confirm scope with the user in 1-3 bullets; that scope confirmation counts as implementation approval.
107
108
  3. Build.
108
109
  4. Document.
109
110
  5. Review (implementation and documentation gates).
@@ -179,11 +180,13 @@ If not clear, ask that same stage a focused follow-up before continuing.
179
180
 
180
181
  When planning is approved, extract and pass `FINAL_PLAN` (plus risks, assumptions, and validation strategy) into the first build handoff. If authoritative handoff already contains `PLANNING_GATE=APPROVED` + `FINAL_PLAN`, skip this loop and use that plan directly.
181
182
 
182
- ### User confirmation checkpoint (required)
183
+ ### Scope confirmation checkpoint (required)
183
184
 
184
- - Before the first implementation iteration, summarize scope in 1-3 bullets.
185
- - Ask for explicit confirmation to proceed with implementation.
186
- - Only begin Build after confirmation.
185
+ - Before the first implementation iteration, summarize confirmed scope in 1-3 bullets.
186
+ - Treat the user's scope confirmation as implementation approval.
187
+ - Do not ask a second implementation-confirmation question after the scoped summary.
188
+ - Do not emit an extra "starting now" or equivalent pre-build notice before delegating Build.
189
+ - This rule applies both after an approved planning handoff and after an interactive planning loop reaches confirmed scope.
187
190
 
188
191
  ### Execution/review loop (max 10 iterations)
189
192
 
@@ -202,17 +205,17 @@ For each iteration `n`:
202
205
 
203
206
  ### Autonomous continuation rule
204
207
 
205
- - After the required user confirmation checkpoint is satisfied, do not pause between required stages.
208
+ - After the required scope confirmation checkpoint is satisfied, do not pause between required stages.
206
209
  - Do not ask the user what to do next while required workflow stages remain unfinished.
207
210
  - Do not use optional phrasing like "If you want, I can..." for unfinished required workflow steps.
208
211
  - If a stage reports partial progress (for example "waiting for tests"), treat it as non-terminal and issue a focused same-stage follow-up immediately.
209
212
 
210
213
  ### Fixed-workflow non-terminal invariant
211
214
 
212
- - After the required user confirmation checkpoint, successful Build always proceeds to Document.
213
- - After the required user confirmation checkpoint, successful Document always proceeds to Review.
215
+ - After the required scope confirmation checkpoint, successful Build always proceeds to Document.
216
+ - After the required scope confirmation checkpoint, successful Document always proceeds to Review.
214
217
  - Build and Document are stage-complete states, not workflow-complete states.
215
- - When deterministic continuation is required after user confirmation, emit `RECOMMENDED_NEXT_STEP` exactly as defined in the Plugin continuation contract below.
218
+ - When deterministic continuation is required after scope confirmation, emit `RECOMMENDED_NEXT_STEP` exactly as defined in the Plugin continuation contract below.
216
219
 
217
220
  ### Direct-execution prohibition
218
221
 
@@ -248,9 +251,15 @@ or
248
251
  RECOMMENDED_NEXT_STEP="<human-readable next step>"
249
252
  ```
250
253
 
254
+ or
255
+
256
+ ```text
257
+ RECOMMENDED_NEXT_STEP='<human-readable next step>'
258
+ ```
259
+
251
260
  Rules:
252
261
 
253
- - Never emit `RECOMMENDED_NEXT_STEP` before the required user confirmation checkpoint.
262
+ - Never emit `RECOMMENDED_NEXT_STEP` before the required scope confirmation checkpoint.
254
263
  - Emit `RECOMMENDED_NEXT_STEP` when the next workflow action is deterministic and does not require user input.
255
264
  - Omit `RECOMMENDED_NEXT_STEP` when the workflow is fully complete, blocked, escalated, or waiting on required user input.
256
265
  - Omit `RECOMMENDED_NEXT_STEP` when the recommendation is "None", "Nothing", "No further steps", or similar.
@@ -1,6 +1,5 @@
1
1
  const SERVICE_NAME = 'feature-factory';
2
- const RECOMMENDED_NEXT_STEP_COLON_RE = /^\s*RECOMMENDED_NEXT_STEP\s*:.*"([^"\r\n]+)".*$/im;
3
- const RECOMMENDED_NEXT_STEP_EQUALS_RE = /^\s*RECOMMENDED_NEXT_STEP\s*=.*"([^"\r\n]+)".*$/im;
2
+ const RECOMMENDED_NEXT_STEP_RE = /^\s*RECOMMENDED_NEXT_STEP\s*[:=](.*)$/i;
4
3
  async function log(client, level, message, extra) {
5
4
  try {
6
5
  await client.app.log({
@@ -36,13 +35,18 @@ function extractMessageText(message) {
36
35
  }
37
36
  export function parseRecommendedNextStep(text) {
38
37
  const normalizedText = text.replace(/\r\n/g, '\n');
39
- const colonMatch = normalizedText.match(RECOMMENDED_NEXT_STEP_COLON_RE);
40
- if (colonMatch?.[1]) {
41
- return colonMatch[1].trim() || null;
42
- }
43
- const equalsMatch = normalizedText.match(RECOMMENDED_NEXT_STEP_EQUALS_RE);
44
- if (equalsMatch?.[1]) {
45
- return equalsMatch[1].trim() || null;
38
+ for (const line of normalizedText.split('\n')) {
39
+ const match = line.match(RECOMMENDED_NEXT_STEP_RE);
40
+ if (!match) {
41
+ continue;
42
+ }
43
+ const rawValue = match[1]?.trim() ?? '';
44
+ const unquotedValue = rawValue.length >= 2 &&
45
+ ((rawValue.startsWith('"') && rawValue.endsWith('"')) ||
46
+ (rawValue.startsWith("'") && rawValue.endsWith("'")))
47
+ ? rawValue.slice(1, -1).trim()
48
+ : rawValue;
49
+ return unquotedValue || null;
46
50
  }
47
51
  return null;
48
52
  }
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.12.0",
4
+ "version": "0.12.2",
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",