@syntesseraai/opencode-feature-factory 0.7.0 → 0.7.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/README.md CHANGED
@@ -33,6 +33,20 @@ It also updates `~/.config/opencode/opencode.json` non-destructively by merging
33
33
  - **`opencode.json` is non-destructive**: existing keys/values are preserved; only missing required plugin/MCP entries are added.
34
34
  - **Global scope**: assets are installed to `~/.config/opencode/` and shared across projects.
35
35
 
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.
36
50
  ## Pipeline Entrypoint
37
51
 
38
52
  - Invoke `/pipeline/start <requirements-brief>` directly from any agent (e.g. `@building`).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Implements features from approved plans and returns structured implementation outputs for pipeline handoff.
3
- color: '#16b910'
3
+ color: '#22c55e'
4
4
  tools:
5
5
  read: true
6
6
  write: true
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Documentation implementation specialist for pipeline documentation stage.
3
- color: '#c522a2'
3
+ color: '#f97316'
4
4
  tools:
5
5
  read: true
6
6
  write: true
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Feature Factory — guided workflow for planning and building features. Walks through requirements, workflow selection, model confirmation, then launches the pipeline or mini-loop.
3
+ mode: primary
4
+ color: '#10b981'
5
+ tools:
6
+ read: true
7
+ write: false
8
+ edit: false
9
+ bash: false
10
+ skill: true
11
+ task: true
12
+ ff_pipeline: true
13
+ ff_mini_loop: true
14
+ permission:
15
+ skill:
16
+ '*': allow
17
+ task:
18
+ building: allow
19
+ reviewing: allow
20
+ planning: allow
21
+ documenting: allow
22
+ ff-research: allow
23
+ explore: allow
24
+ ---
25
+
26
+ You are the Feature Factory workflow assistant. Your job is to guide the user through a structured process before launching either the full pipeline or the mini-loop.
27
+
28
+ Work through this process step by step. Do NOT skip steps or launch a tool until all steps are complete.
29
+
30
+ ---
31
+
32
+ ## Step 1: Understand the request
33
+
34
+ Work through the user's request in a Socratic manner:
35
+ - Ask clarifying questions about scope, constraints, and acceptance criteria.
36
+ - Summarise your understanding back to them and ask them to confirm or correct it.
37
+ - Continue until you have a clear, unambiguous set of requirements.
38
+
39
+ If the user hasn't provided a request yet, ask them what they would like to build.
40
+
41
+ ---
42
+
43
+ ## Step 2: Choose workflow
44
+
45
+ Once requirements are agreed, present the two workflow options:
46
+
47
+ **Pipeline** (full multi-model workflow)
48
+ - Multi-model fan-out planning (3 models propose plans, then consensus synthesis)
49
+ - Build phase with task breakdown and batch validation
50
+ - Multi-model fan-out code review
51
+ - Documentation with review loop
52
+ - Best for: complex features, architectural changes, high-risk work
53
+
54
+ **Mini-loop** (lightweight workflow)
55
+ - Direct build → review loop (single model per step)
56
+ - Documentation with review loop
57
+ - Best for: small features, bug fixes, incremental improvements, well-understood changes
58
+
59
+ Ask the user which workflow they prefer. If they are unsure, recommend one based on the complexity of the requirements.
60
+
61
+ ---
62
+
63
+ ## Step 3: Confirm models
64
+
65
+ Present the default models that will be used for the chosen workflow:
66
+
67
+ **Pipeline defaults:**
68
+ - Planning fan-out: opus (anthropic/claude-opus-4-6), gemini (opencode/gemini-3.1-pro), codex (openai/gpt-5.3-codex)
69
+ - Review fan-out: same as planning
70
+ - Orchestrator (synthesis/triage): openai/gpt-5.4
71
+ - Build: openai/gpt-5.3-codex
72
+ - Validate: opencode/gemini-3.1-pro
73
+ - Documentation: openai/gpt-5.3-codex
74
+ - Doc review: opencode/gemini-3.1-pro
75
+
76
+ **Mini-loop defaults:**
77
+ - Build: openai/gpt-5.3-codex
78
+ - Review: openai/gpt-5.4
79
+ - Documentation: openai/gpt-5.3-codex
80
+ - Doc review: opencode/gemini-3.1-pro
81
+
82
+ Ask: "Would you like to use these default models, or would you like to override any of them?"
83
+
84
+ If they want to override, collect the provider/model strings for each role they want to change.
85
+
86
+ ---
87
+
88
+ ## Step 4: Launch
89
+
90
+ Once all three steps are confirmed, call the appropriate tool:
91
+
92
+ - If they chose **Pipeline**: call the `ff_pipeline` tool with the agreed requirements and any model overrides.
93
+ - If they chose **Mini-loop**: call the `ff_mini_loop` tool with the agreed requirements and any model overrides.
94
+
95
+ Pass only the model parameters that were explicitly overridden; omit any that should use defaults.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: Research sub-agent for external APIs, libraries, and best practices. Produces concise, evidence-backed findings.
3
3
  mode: subagent
4
+ color: '#6366f1'
4
5
  tools:
5
6
  read: true
6
7
  write: false
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Unified validation agent for code and documentation. Performs acceptance, quality, security, and architecture review with context-driven scope.
3
- color: '#f59e0b'
3
+ color: '#8b5cf6'
4
4
  tools:
5
5
  read: true
6
6
  write: false
package/dist/index.js CHANGED
@@ -2,7 +2,6 @@ import { StopQualityGateHooksPlugin } from './stop-quality-gate.js';
2
2
  import { updateMCPConfig } from './mcp-config.js';
3
3
  import { updateAgentConfig } from './agent-config.js';
4
4
  import { updatePluginConfig } from './plugin-config.js';
5
- import { updateCommandConfig } from './command-config.js';
6
5
  import { createWorkflowTools } from './tools/index.js';
7
6
  import { $ } from 'bun';
8
7
  /**
@@ -42,14 +41,6 @@ export const FeatureFactoryPlugin = async (input) => {
42
41
  catch {
43
42
  console.error('Failed to update plugin config in OpenCode plugin');
44
43
  }
45
- // Update command configuration in global OpenCode config
46
- // This registers the Feature-Factory Socratic entrypoint command
47
- try {
48
- await updateCommandConfig($);
49
- }
50
- catch {
51
- console.error('Failed to update command config in OpenCode plugin');
52
- }
53
44
  // Load hooks from the quality gate plugin
54
45
  const qualityGateHooks = await StopQualityGateHooksPlugin(input).catch(() => ({}));
55
46
  // Tool registry: workflow tools (ff_pipeline, ff_mini_loop) powered by
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.7.0",
4
+ "version": "0.7.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",
@@ -1,38 +0,0 @@
1
- type BunShell = any;
2
- /**
3
- * Command configuration type matching the OpenCode `command` config schema.
4
- */
5
- export interface CommandConfig {
6
- template: string;
7
- description?: string;
8
- agent?: string;
9
- model?: string;
10
- subtask?: boolean;
11
- }
12
- export interface CommandConfigs {
13
- [commandName: string]: CommandConfig;
14
- }
15
- /**
16
- * Default commands to register in the global OpenCode config.
17
- *
18
- * "Feature-Factory" is a Socratic entrypoint that guides the user through
19
- * clarifying requirements, choosing between pipeline and mini-loop, confirming
20
- * model selections, and then invoking the appropriate workflow tool.
21
- */
22
- export declare const DEFAULT_COMMANDS: Record<string, CommandConfig>;
23
- /**
24
- * Merge command configs, preserving existing settings and adding new ones.
25
- * Existing command configs take precedence (we never overwrite them).
26
- */
27
- export declare function mergeCommandConfigs(existing: CommandConfigs | undefined, defaults: Record<string, CommandConfig>): CommandConfigs;
28
- /**
29
- * Update the command configuration in global opencode.json.
30
- *
31
- * This function:
32
- * 1. Reads existing config from ~/.config/opencode/opencode.json
33
- * 2. Preserves existing command settings
34
- * 3. Adds default Feature Factory commands that don't exist yet
35
- * 4. Writes updated config back to ~/.config/opencode/opencode.json
36
- */
37
- export declare function updateCommandConfig($: BunShell): Promise<void>;
38
- export {};
@@ -1,128 +0,0 @@
1
- import { isRecord, updateGlobalOpenCodeConfigBlock } from './opencode-global-config.js';
2
- /**
3
- * Default commands to register in the global OpenCode config.
4
- *
5
- * "Feature-Factory" is a Socratic entrypoint that guides the user through
6
- * clarifying requirements, choosing between pipeline and mini-loop, confirming
7
- * model selections, and then invoking the appropriate workflow tool.
8
- */
9
- export const DEFAULT_COMMANDS = {
10
- 'feature-factory': {
11
- description: 'Feature Factory — guided workflow for planning and building features',
12
- agent: 'general',
13
- subtask: false,
14
- template: `You are the Feature Factory workflow assistant. Your job is to guide the user through a structured process before launching either the full pipeline or the mini-loop.
15
-
16
- Work through this process step by step. Do NOT skip steps or launch a tool until all steps are complete.
17
-
18
- ---
19
-
20
- ## Step 1: Understand the request
21
-
22
- The user said: $ARGUMENTS
23
-
24
- Work through their request in a Socratic manner:
25
- - Ask clarifying questions about scope, constraints, and acceptance criteria.
26
- - Summarise your understanding back to them and ask them to confirm or correct it.
27
- - Continue until you have a clear, unambiguous set of requirements.
28
-
29
- If $ARGUMENTS is empty, ask the user what they would like to build.
30
-
31
- ---
32
-
33
- ## Step 2: Choose workflow
34
-
35
- Once requirements are agreed, present the two workflow options:
36
-
37
- **Pipeline** (full multi-model workflow)
38
- - Multi-model fan-out planning (3 models propose plans, then consensus synthesis)
39
- - Build phase with task breakdown and batch validation
40
- - Multi-model fan-out code review
41
- - Documentation with review loop
42
- - Best for: complex features, architectural changes, high-risk work
43
-
44
- **Mini-loop** (lightweight workflow)
45
- - Direct build → review loop (single model per step)
46
- - Documentation with review loop
47
- - Best for: small features, bug fixes, incremental improvements, well-understood changes
48
-
49
- Ask the user which workflow they prefer. If they are unsure, recommend one based on the complexity of the requirements.
50
-
51
- ---
52
-
53
- ## Step 3: Confirm models
54
-
55
- Present the default models that will be used for the chosen workflow:
56
-
57
- **Pipeline defaults:**
58
- - Planning fan-out: opus (anthropic/claude-opus-4-6), gemini (opencode/gemini-3.1-pro), codex (openai/gpt-5.3-codex)
59
- - Review fan-out: same as planning
60
- - Orchestrator (synthesis/triage): openai/gpt-5.4
61
- - Build: openai/gpt-5.3-codex
62
- - Validate: opencode/gemini-3.1-pro
63
- - Documentation: openai/gpt-5.3-codex
64
- - Doc review: opencode/gemini-3.1-pro
65
-
66
- **Mini-loop defaults:**
67
- - Build: openai/gpt-5.3-codex
68
- - Review: openai/gpt-5.4
69
- - Documentation: openai/gpt-5.3-codex
70
- - Doc review: opencode/gemini-3.1-pro
71
-
72
- Ask: "Would you like to use these default models, or would you like to override any of them?"
73
-
74
- If they want to override, collect the provider/model strings for each role they want to change.
75
-
76
- ---
77
-
78
- ## Step 4: Launch
79
-
80
- Once all three steps are confirmed, call the appropriate tool:
81
-
82
- - If they chose **Pipeline**: call the \`ff_pipeline\` tool with the agreed requirements and any model overrides.
83
- - If they chose **Mini-loop**: call the \`ff_mini_loop\` tool with the agreed requirements and any model overrides.
84
-
85
- Pass only the model parameters that were explicitly overridden; omit any that should use defaults.`,
86
- },
87
- };
88
- /**
89
- * Merge command configs, preserving existing settings and adding new ones.
90
- * Existing command configs take precedence (we never overwrite them).
91
- */
92
- export function mergeCommandConfigs(existing, defaults) {
93
- const existingCommands = existing ?? {};
94
- const result = { ...existingCommands };
95
- for (const [commandName, commandConfig] of Object.entries(defaults)) {
96
- if (!result[commandName]) {
97
- result[commandName] = commandConfig;
98
- }
99
- }
100
- return result;
101
- }
102
- /**
103
- * Update the command configuration in global opencode.json.
104
- *
105
- * This function:
106
- * 1. Reads existing config from ~/.config/opencode/opencode.json
107
- * 2. Preserves existing command settings
108
- * 3. Adds default Feature Factory commands that don't exist yet
109
- * 4. Writes updated config back to ~/.config/opencode/opencode.json
110
- */
111
- export async function updateCommandConfig($) {
112
- void $;
113
- await updateGlobalOpenCodeConfigBlock({
114
- blockName: 'command',
115
- warningLabel: 'command config',
116
- update: (existingBlock) => {
117
- const existingCommandConfigs = isRecord(existingBlock)
118
- ? existingBlock
119
- : undefined;
120
- const updatedCommandConfigs = mergeCommandConfigs(existingCommandConfigs, DEFAULT_COMMANDS);
121
- const hasChanges = Object.keys(DEFAULT_COMMANDS).some((commandName) => !existingCommandConfigs?.[commandName]);
122
- return {
123
- nextBlock: updatedCommandConfigs,
124
- changed: hasChanges,
125
- };
126
- },
127
- });
128
- }