@syntesseraai/opencode-feature-factory 0.10.4 → 0.10.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.
package/AGENTS.md ADDED
@@ -0,0 +1,37 @@
1
+ # Feature Factory AGENTS Guide
2
+
3
+ This file is installed to `~/.config/opencode/AGENTS.md` by `@syntesseraai/opencode-feature-factory`.
4
+
5
+ ## What Feature Factory Provides
6
+
7
+ - Workflow tools:
8
+ - `ff_pipeline`: full multi-model planning/build/review/documentation workflow.
9
+ - `ff_mini_loop`: lightweight build/review/documentation loop for focused changes.
10
+ - `ff_list_models`: list available provider/model IDs for workflow overrides.
11
+ - Specialized agents: `feature-factory`, `planning`, `building`, `reviewing`, `documenting`, and `ff-research`.
12
+ - Skills for planning, review quality/security/architecture/documentation, reporting templates, and todo management.
13
+
14
+ ## Preferred Workflow Pattern
15
+
16
+ 1. Clarify requirements and acceptance criteria before coding.
17
+ 2. Choose `ff_mini_loop` for small, well-scoped changes.
18
+ 3. Choose `ff_pipeline` for complex, high-risk, or architectural changes.
19
+ 4. Confirm model overrides only when needed; otherwise use defaults.
20
+ 5. Use worktree isolation when running concurrent workflows.
21
+
22
+ ## Preferred Tooling Pattern
23
+
24
+ - Use `cocoindex-code_search` first for semantic codebase discovery.
25
+ - Use `read`, `glob`, and `grep` for targeted file inspection.
26
+ - Use `morph-mcp_edit_file` for precise code/document edits.
27
+ - Use `bash` for non-interactive command execution (`git`, `npm`, `tsc`, tests, builds).
28
+ - Use PTY only when interactive terminal control is actually required.
29
+ - Use `todowrite` for multi-step tasks to keep progress visible.
30
+
31
+ ## Implementation Expectations
32
+
33
+ - Keep edits scoped and consistent with existing architecture.
34
+ - Prefer non-destructive merges and preserve user configuration.
35
+ - Update docs when behavior, defaults, or operational steps change.
36
+ - Run relevant validation for touched areas (lint/typecheck/tests as needed).
37
+ - Avoid destructive git operations unless explicitly requested.
package/README.md CHANGED
@@ -23,15 +23,21 @@ The installer deploys to `~/.config/opencode/`:
23
23
 
24
24
  - `agents/`
25
25
  - `skills/`
26
+ - `AGENTS.md`
26
27
 
27
28
  It also updates `~/.config/opencode/opencode.json` non-destructively by merging missing Feature Factory MCP entries and plugins without deleting existing user configuration.
28
29
 
29
30
  ## Install Behavior
30
31
 
31
- - **Always overwrites packaged assets**: installer unconditionally overwrites Feature Factory `agents` and `skills` files on every install.
32
+ - **Always overwrites packaged assets**: installer unconditionally overwrites Feature Factory `agents`, `skills`, and `AGENTS.md` files on every install.
32
33
  - **`opencode.json` is non-destructive**: existing keys/values are preserved; only missing required plugin/MCP entries are added.
34
+ - **No automatic plugin removals**: existing plugin entries are preserved as-is, including entries no longer in current defaults.
33
35
  - **Global scope**: assets are installed to `~/.config/opencode/` and shared across projects.
34
36
 
37
+ ## Global AGENTS Guide
38
+
39
+ `~/.config/opencode/AGENTS.md` is installed from this package and provides Feature Factory-specific operating guidance, including workflow selection and preferred tool patterns (semantic search, edit workflow, and `bash`-first command execution).
40
+
35
41
  ## Tools
36
42
 
37
43
  The plugin exposes three MCP tools via the `feature-factory` agent:
@@ -67,6 +73,13 @@ The plugin merges the following MCP servers into global OpenCode config when mis
67
73
  }
68
74
  ```
69
75
 
76
+ The plugin also merges the following default plugins when they are missing:
77
+
78
+ - `@syntesseraai/opencode-feature-factory@latest`
79
+ - `@nick-vi/opencode-type-inject@latest`
80
+ - `@franlol/opencode-md-table-formatter@latest`
81
+ - `opencode-pty@latest`
82
+
70
83
  ### Merge Outcomes
71
84
 
72
85
  `DEFAULT_MCP_SERVERS` currently includes 4 servers (`jina-ai`, `gh_grep`, `context7`, `morph-mcp`).
@@ -77,7 +90,11 @@ The merge behavior is additive and non-destructive:
77
90
  - Existing config with 1 custom server and a customized `gh_grep` entry -> 5 servers after merge (custom + customized `gh_grep` + 3 missing defaults).
78
91
  - Existing server definitions are preserved and never overwritten by defaults.
79
92
 
80
- The plugin list is also merged non-destructively to ensure required companion plugins are present.
93
+ Plugin merge behavior is also additive and non-destructive:
94
+
95
+ - Existing plugin entries are preserved and never removed.
96
+ - Matching is by package base name, so pinned versions (for example `opencode-pty@1.2.3`) prevent adding the `@latest` variant.
97
+ - Legacy `@spoons-and-mirrors/subtask2` entries in user config remain untouched if already present, but are no longer added to new installs/default merges.
81
98
 
82
99
  ## Related Docs
83
100
 
package/bin/ff-deploy.js CHANGED
@@ -3,7 +3,8 @@
3
3
  /**
4
4
  * Feature Factory Deployment Script
5
5
  *
6
- * Deploys skills and agents to the global OpenCode configuration directory.
6
+ * Deploys skills, agents, and AGENTS.md guidance to the global OpenCode
7
+ * configuration directory.
7
8
  * Run manually with: npx @syntesseraai/opencode-feature-factory
8
9
  */
9
10
 
@@ -19,10 +20,12 @@ const GLOBAL_CONFIG_DIR = join(homedir(), '.config', 'opencode');
19
20
  const SKILLS_DIR = join(GLOBAL_CONFIG_DIR, 'skills');
20
21
  const AGENTS_DIR = join(GLOBAL_CONFIG_DIR, 'agents');
21
22
  const GLOBAL_CONFIG_FILE = join(GLOBAL_CONFIG_DIR, 'opencode.json');
23
+ const GLOBAL_AGENTS_GUIDE_FILE = join(GLOBAL_CONFIG_DIR, 'AGENTS.md');
22
24
 
23
25
  const PACKAGE_ROOT = join(__dirname, '..');
24
26
  const SOURCE_SKILLS_DIR = join(PACKAGE_ROOT, 'skills');
25
27
  const SOURCE_AGENTS_DIR = join(PACKAGE_ROOT, 'agents');
28
+ const SOURCE_AGENTS_GUIDE_FILE = join(PACKAGE_ROOT, 'AGENTS.md');
26
29
 
27
30
  // Check if running in interactive mode (has TTY)
28
31
  const isInteractive = process.stdin.isTTY && process.stdout.isTTY;
@@ -60,7 +63,6 @@ const DEFAULT_PLUGINS = [
60
63
  '@syntesseraai/opencode-feature-factory@latest',
61
64
  '@nick-vi/opencode-type-inject@latest',
62
65
  '@franlol/opencode-md-table-formatter@latest',
63
- '@spoons-and-mirrors/subtask2@latest',
64
66
  'opencode-pty@latest',
65
67
  ];
66
68
 
@@ -136,6 +138,15 @@ async function getFileNames(dir) {
136
138
  }
137
139
  }
138
140
 
141
+ async function fileExists(filePath) {
142
+ try {
143
+ await fs.access(filePath);
144
+ return true;
145
+ } catch {
146
+ return false;
147
+ }
148
+ }
149
+
139
150
  async function updateMCPConfig() {
140
151
  if (isInteractive) {
141
152
  console.log('\nšŸ”§ MCP Configuration Update');
@@ -280,6 +291,7 @@ async function deploy() {
280
291
  // Get existing skills/agents for reporting
281
292
  const existingSkills = await getDirectoryNames(SKILLS_DIR);
282
293
  const existingAgents = await getFileNames(AGENTS_DIR);
294
+ const hadExistingAgentsGuide = await fileExists(GLOBAL_AGENTS_GUIDE_FILE);
283
295
 
284
296
  // Deploy skills
285
297
  if (isInteractive) {
@@ -316,11 +328,19 @@ async function deploy() {
316
328
  }
317
329
  }
318
330
 
331
+ // Deploy global AGENTS guide
332
+ await fs.copyFile(SOURCE_AGENTS_GUIDE_FILE, GLOBAL_AGENTS_GUIDE_FILE);
333
+ if (isInteractive) {
334
+ console.log('\nšŸ“˜ Deploying AGENTS Guide...');
335
+ console.log(` ${hadExistingAgentsGuide ? 'šŸ”„' : 'āœ…'} AGENTS.md ${hadExistingAgentsGuide ? '(updated)' : '(new)'}`);
336
+ }
337
+
319
338
  // Summary
320
339
  if (isInteractive) {
321
340
  console.log('\n✨ Deployment Complete!');
322
341
  console.log(` Skills: ${skills.length} deployed`);
323
342
  console.log(` Agents: ${agents.length} deployed`);
343
+ console.log(' AGENTS guide: deployed');
324
344
  console.log(` Location: ${GLOBAL_CONFIG_DIR}`);
325
345
  console.log('\nšŸ“ Next Steps:');
326
346
  console.log(' - Restart OpenCode or run /reload to load new agents');
@@ -8,7 +8,6 @@ export const DEFAULT_PLUGINS = [
8
8
  '@syntesseraai/opencode-feature-factory@latest',
9
9
  '@nick-vi/opencode-type-inject@latest',
10
10
  '@franlol/opencode-md-table-formatter@latest',
11
- '@spoons-and-mirrors/subtask2@latest',
12
11
  'opencode-pty@latest',
13
12
  ];
14
13
  /**
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.10.4",
4
+ "version": "0.10.6",
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",
@@ -15,7 +15,8 @@
15
15
  "assets",
16
16
  "skills",
17
17
  "agents",
18
- "bin"
18
+ "bin",
19
+ "AGENTS.md"
19
20
  ],
20
21
  "keywords": [
21
22
  "opencode",