@syntesseraai/opencode-feature-factory 0.1.4 → 0.1.6

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.
@@ -26,36 +26,10 @@ You are a validation orchestrator for Feature Factory. Your role is to run compr
26
26
  4. **Prioritize Issues** - Rank findings by severity and impact
27
27
  5. **Generate Report** - Produce comprehensive validation report
28
28
 
29
- ## Validation Pipeline
30
-
31
- Run all validation agents **in parallel** for maximum efficiency:
32
-
33
- ```
34
- ┌──────────────────────────────────────────────────────────────────────┐
35
- │ ff-validate agent │
36
- ├──────────────────────────────────────────────────────────────────────┤
37
- │ │
38
- │ ┌─────────┐ ┌──────────┐ ┌────────────┐ ┌──────────────────┐ │
39
- │ │ ff-ci │ │ff-review │ │ff-security │ │ ff-acceptance │ │
40
- │ └────┬────┘ └────┬─────┘ └─────┬──────┘ └────────┬─────────┘ │
41
- │ │ │ │ │ │
42
- │ │ │ │ │ │
43
- │ ┌────┴────┐ │ │ ┌───────┴───────┐ │
44
- │ │ tests │ │ │ │ff-well-archit │ │
45
- │ │ build │ │ │ └───────┬───────┘ │
46
- │ │ lint │ │ │ │ │
47
- │ │ types │ │ │ │ │
48
- │ └────┬────┘ │ │ │ │
49
- │ │ │ │ │ │
50
- │ ▼ ▼ ▼ ▼ │
51
- │ ┌─────────────────────────────────────────────────────────────┐ │
52
- │ │ Aggregate & Report │ │
53
- │ └─────────────────────────────────────────────────────────────┘ │
54
- └──────────────────────────────────────────────────────────────────────┘
55
- ```
56
-
57
29
  ## Sub-Agents to Run
58
30
 
31
+ Run all validation agents **in parallel** for maximum efficiency.
32
+
59
33
  Launch these agents **in parallel** using the Task tool:
60
34
 
61
35
  | Agent | Purpose | Focus |
@@ -76,7 +50,7 @@ Launch these agents **in parallel** using the Task tool:
76
50
  2. **Launch Sub-Agents in Parallel**
77
51
 
78
52
  ```
79
- Launch simultaneously:
53
+ Launch all agents simultaneously **in parallel**:
80
54
  - Task(ff-ci): "Run CI checks on the changes"
81
55
  - Task(ff-review): "Review the code changes for quality"
82
56
  - Task(ff-security): "Audit the changes for security issues"
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.1.4",
4
+ "version": "0.1.6",
5
5
  "description": "OpenCode plugin for Feature Factory agents - provides planning, implementation, review, testing, and validation agents",
6
6
  "type": "module",
7
7
  "license": "MIT",
package/src/index.ts CHANGED
@@ -58,36 +58,35 @@ async function readBundledTemplate(templateFileName: string): Promise<string> {
58
58
  *
59
59
  * Behavior:
60
60
  * - Creates .opencode/agent/ if it doesn't exist
61
- * - For each agent template: if the destination file exists, skip (never overwrite)
62
- * - If the destination file doesn't exist, write the template
61
+ * - For each agent template: always writes the bundled template (overwrites any user changes)
63
62
  */
64
63
  async function ensureAgentsInstalled(
65
64
  rootDir: string
66
- ): Promise<{ installed: string[]; skipped: string[] }> {
65
+ ): Promise<{ installed: string[]; updated: string[] }> {
67
66
  const agentDir = path.join(rootDir, '.opencode', 'agent');
68
67
 
69
68
  // Create directories if they don't exist
70
69
  await mkdir(agentDir, { recursive: true });
71
70
 
72
71
  const installed: string[] = [];
73
- const skipped: string[] = [];
72
+ const updated: string[] = [];
74
73
 
75
74
  for (const templateFileName of AGENT_TEMPLATES) {
76
75
  const destPath = path.join(agentDir, templateFileName);
76
+ const existed = await fileExists(destPath);
77
77
 
78
- // Create-once semantics: if it exists, never overwrite
79
- if (await fileExists(destPath)) {
80
- skipped.push(templateFileName);
81
- continue;
82
- }
83
-
84
- // Read template and write to destination
78
+ // Always write the bundled template (overwrite any user changes)
85
79
  const template = await readBundledTemplate(templateFileName);
86
80
  await writeFile(destPath, template, { encoding: 'utf8' });
87
- installed.push(templateFileName);
81
+
82
+ if (existed) {
83
+ updated.push(templateFileName);
84
+ } else {
85
+ installed.push(templateFileName);
86
+ }
88
87
  }
89
88
 
90
- return { installed, skipped };
89
+ return { installed, updated };
91
90
  }
92
91
 
93
92
  /**
@@ -110,7 +109,7 @@ async function ensureAgentsInstalled(
110
109
  *
111
110
  * Behavior:
112
111
  * - On plugin init (every OpenCode startup), syncs agents to .opencode/agent/
113
- * - Only creates new files; never overwrites existing files (respects user edits)
112
+ * - Always overwrites existing files with bundled templates (user changes are not preserved)
114
113
  * - Also syncs on installation.updated event
115
114
  */
116
115
  export const FeatureFactoryPlugin: Plugin = async ({ worktree, directory }) => {