ai-workflow-init 6.2.3 → 6.3.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.
@@ -0,0 +1,234 @@
1
+ # Factory Droid Sync Guide
2
+
3
+ Sync Claude Code workflows to Factory Droid format.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - Source: `.claude/commands/*.md`, `.claude/skills/**/SKILL.md`, `.claude/CLAUDE.md`
10
+ - Target: `.factory/commands/*.md`, `.factory/skills/*/SKILL.md`, `.factory/droids/*.md`
11
+
12
+ ---
13
+
14
+ ## Step 1: Fetch Factory Droid Documentation
15
+
16
+ **Search queries (try in order until successful):**
17
+ 1. `site:docs.factory.ai cli configuration commands skills`
18
+ 2. `factory.ai droid custom commands skills documentation`
19
+ 3. `factory droid cli configuration custom-droids`
20
+
21
+ **Key documentation URLs:**
22
+ - `https://docs.factory.ai/cli/configuration/custom-slash-commands` - Custom commands
23
+ - `https://docs.factory.ai/cli/configuration/skills` - Skills configuration
24
+ - `https://docs.factory.ai/cli/configuration/custom-droids` - Custom droids (sub-agents)
25
+
26
+ ---
27
+
28
+ ## Step 2: Conversion Rules
29
+
30
+ ### Commands (`.factory/commands/*.md`)
31
+
32
+ **Location**: `.factory/commands/{name}.md` (workspace) or `~/.factory/commands/` (personal)
33
+
34
+ **File format:** Markdown (`.md`) or executable with shebang (`#!`)
35
+
36
+ **Frontmatter:**
37
+ - `description`: command description
38
+ - `argument-hint`: optional hint for arguments (e.g., `<feature-name>`)
39
+
40
+ **Arguments:**
41
+ - `$ARGUMENTS` for all text after command name
42
+ - Executable commands receive `$1`, `$2`, etc.
43
+
44
+ **Tool references conversion:**
45
+ | Claude Code | Factory Droid |
46
+ |-------------|---------------|
47
+ | `AskUserQuestion(...)` | (handled by TUI) |
48
+ | `Task(subagent_type='Explore')` | Search codebase |
49
+ | `Task(subagent_type='General')` | General analysis |
50
+ | `Read(file_path=...)` | Read file |
51
+ | `Write(file_path=...)` | Write file |
52
+ | `Edit(file_path=...)` | Edit file |
53
+ | `Glob(pattern=...)` | Find files |
54
+ | `Grep(pattern=...)` | Search content |
55
+ | `Bash(command=...)` | Run command |
56
+
57
+ ### Skills (`.factory/skills/<name>/SKILL.md`)
58
+
59
+ **Location**: `.factory/skills/{skill-name}/SKILL.md` (workspace) or `~/.factory/skills/` (personal)
60
+
61
+ **File format:** `SKILL.md` or `skill.mdx`
62
+
63
+ **Frontmatter (required):**
64
+ - `name`: skill name (should match directory name)
65
+ - `description`: clear description of when to use the skill
66
+
67
+ **Content:** Markdown instructions for skill behavior
68
+
69
+ ### Droids (`.factory/droids/*.md`)
70
+
71
+ **Location**: `.factory/droids/{droid-name}.md` (project) or `~/.factory/droids/` (personal)
72
+
73
+ **File format:** Markdown with YAML frontmatter and non-empty body
74
+
75
+ **Frontmatter:**
76
+ - `name`: Required, droid identifier (matches filename)
77
+ - `description`: Optional, shown in UI
78
+ - `model`: `inherit` (use default) or specific model identifier
79
+ - `reasoningEffort`: Optional (`low`, `medium`, `high`)
80
+ - `tools`: Array of tool IDs or category string
81
+
82
+ **Tool categories:**
83
+ - `read-only` - Read, LS, Grep, Glob
84
+ - `edit` - Write, Edit
85
+ - `execute` - Bash, shell commands
86
+ - `web` - WebSearch, WebFetch
87
+ - `mcp` - MCP tools
88
+
89
+ **Note:** `TodoWrite` tool is automatic for all droids.
90
+
91
+ ---
92
+
93
+ ## Step 3: Templates
94
+
95
+ ### Command Template
96
+
97
+ ```markdown
98
+ ---
99
+ description: {description}
100
+ argument-hint: {optional hint for arguments, e.g., "<feature-name>"}
101
+ ---
102
+
103
+ ## Goal
104
+
105
+ {goal from Claude command}
106
+
107
+ ## Instructions
108
+
109
+ {step-by-step instructions}
110
+
111
+ ### Step 1: {step name}
112
+
113
+ {converted step content}
114
+ - Search codebase for relevant files
115
+ - Read and analyze existing code
116
+ - Write/edit files as needed
117
+
118
+ ...
119
+
120
+ ## Notes
121
+
122
+ {notes section}
123
+ ```
124
+
125
+ ### Skill Template
126
+
127
+ ```markdown
128
+ ---
129
+ name: {skill-name}
130
+ description: {description from Claude skill - explain when to trigger}
131
+ ---
132
+
133
+ # {Skill Title}
134
+
135
+ ## Instructions
136
+
137
+ 1. {step 1}
138
+ 2. {step 2}
139
+ 3. {step 3}
140
+
141
+ ## Guidelines
142
+
143
+ - {guideline 1}
144
+ - {guideline 2}
145
+ ```
146
+
147
+ ### Droid Template
148
+
149
+ ```markdown
150
+ ---
151
+ name: {droid-name}
152
+ description: {description of what this droid does}
153
+ model: inherit
154
+ reasoningEffort: medium
155
+ tools: ["Read", "LS", "Grep", "Glob"]
156
+ ---
157
+
158
+ You are a specialized {role} droid.
159
+
160
+ ## Focus
161
+
162
+ - {behavior 1}
163
+ - {behavior 2}
164
+ - {behavior 3}
165
+
166
+ ## Guidelines
167
+
168
+ - {guideline 1}
169
+ - {guideline 2}
170
+ ```
171
+
172
+ ---
173
+
174
+ ## Step 4: Write Files
175
+
176
+ **Tools:**
177
+ - `mkdir -p .factory/commands`
178
+ - `mkdir -p .factory/skills/{name}`
179
+ - `mkdir -p .factory/droids`
180
+ - Write(file_path=".factory/commands/{name}.md")
181
+ - Write(file_path=".factory/skills/{name}/SKILL.md")
182
+ - Write(file_path=".factory/droids/{name}.md") - only if custom droid needed
183
+
184
+ **Skill name mapping:**
185
+ - `.claude/skills/design/figma-extraction/` → `.factory/skills/figma-extraction/`
186
+ - `.claude/skills/architecture/quality-code-check/` → `.factory/skills/quality-code-check/`
187
+ - `.claude/skills/ux/accessibility/` → `.factory/skills/ux-accessibility/`
188
+
189
+ ---
190
+
191
+ ## Step 5: Output Classification
192
+
193
+ ```
194
+ Factory Droid Commands (.factory/commands/):
195
+ - create-plan.md: [STATUS]
196
+ - execute-plan.md: [STATUS]
197
+ - sync-workflow.md: [STATUS]
198
+
199
+ Factory Droid Skills (.factory/skills/):
200
+ - figma-extraction/SKILL.md: [STATUS]
201
+ - quality-code-check/SKILL.md: [STATUS]
202
+ - frontend-design-fundamentals/SKILL.md: [STATUS]
203
+
204
+ Factory Droid Droids (.factory/droids/):
205
+ - code-reviewer.md: [STATUS] (if custom review workflow)
206
+ - No custom droids needed otherwise
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Factory Droid-Specific Notes
212
+
213
+ 1. **Skills are native**: Factory Droid reads skills from `.factory/skills/*/SKILL.md`
214
+
215
+ 2. **AGENTS.md is native**: Factory Droid reads `AGENTS.md` from root - no conversion needed
216
+
217
+ 3. **Command management:**
218
+ - Reload commands: Press `R` in `/commands`
219
+ - Import existing commands: Press `I` in `/commands`
220
+
221
+ 4. **Droid tool arrays:**
222
+ - Array format: `["Read", "LS", "Grep", "Glob"]`
223
+ - Category string: `"read-only"`, `"edit"`, `"execute"`, `"web"`, `"mcp"`
224
+ - Combine as needed for custom permissions
225
+
226
+ 5. **Example droids:**
227
+ - `code-reviewer`: `tools: ["Read", "LS", "Grep", "Glob"]` - read-only review
228
+ - `security-sweeper`: `tools: ["Read", "Grep", "WebSearch"]` - security analysis
229
+ - `docs-writer`: `tools: ["Read", "Write", "Edit", "Glob"]` - documentation
230
+
231
+ 6. **Reasoning effort:**
232
+ - `low`: Fast, simple tasks
233
+ - `medium`: Balanced (default)
234
+ - `high`: Complex analysis tasks
@@ -0,0 +1,137 @@
1
+ # GitHub Copilot Sync Guide
2
+
3
+ Sync Claude Code workflows to GitHub Copilot format.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - Source: `.claude/commands/*.md`, `.claude/CLAUDE.md`
10
+ - Target: `.github/prompts/*.prompt.md`, `.github/copilot-instructions.md`
11
+
12
+ ---
13
+
14
+ ## Step 1: Fetch GitHub Copilot Documentation
15
+
16
+ **Search queries (try in order until successful):**
17
+ 1. `"github.com" copilot custom instructions repository documentation`
18
+ 2. `site:docs.github.com copilot custom instructions prompts`
19
+ 3. `github copilot prompt files .github/prompts format`
20
+
21
+ **Key documentation URLs:**
22
+ - `https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot`
23
+ - `https://docs.github.com/en/copilot/how-tos/configure-custom-instructions`
24
+
25
+ **Extract and note:**
26
+ - Prompt file location: `.github/prompts/`
27
+ - File format: `*.prompt.md` naming convention
28
+ - Frontmatter structure (applyTo, excludeAgent, etc.)
29
+ - Custom instructions file: `.github/copilot-instructions.md`
30
+ - AGENTS.md support (location, format)
31
+
32
+ ---
33
+
34
+ ## Step 2: Conversion Rules
35
+
36
+ ### Commands → Prompts (`.github/prompts/*.prompt.md`)
37
+
38
+ **Filename:** `{name}.prompt.md` format
39
+
40
+ **Frontmatter:**
41
+ - May need `applyTo` for path-specific prompts
42
+ - Keep `name` and `description`
43
+
44
+ **Tool references conversion:**
45
+ | Claude Code | GitHub Copilot |
46
+ |-------------|----------------|
47
+ | `AskUserQuestion(...)` | Ask user for clarification |
48
+ | `Task(subagent_type='Explore')` | Search codebase for... |
49
+ | `Read(file_path=...)` | Read file |
50
+ | `Write(file_path=...)` | Write file |
51
+ | `Edit(file_path=...)` | Edit file |
52
+ | `Glob(pattern=...)` | Find files |
53
+ | `Grep(pattern=...)` | Search pattern |
54
+ | `Bash(command=...)` | Run command |
55
+
56
+ **Remove:** Claude-specific skill references (Copilot doesn't have skills system)
57
+
58
+ **Keep:** Goal, Steps structure, acceptance criteria
59
+
60
+ ### Skills
61
+
62
+ GitHub Copilot doesn't have a skills system. Options:
63
+ 1. Inline skill content into relevant prompts
64
+ 2. Add to `copilot-instructions.md` as guidelines
65
+ 3. Skip skills (not applicable)
66
+
67
+ ---
68
+
69
+ ## Step 3: Templates
70
+
71
+ ### Prompt Template
72
+
73
+ ```markdown
74
+ ---
75
+ name: {command-name}
76
+ description: {description}
77
+ ---
78
+
79
+ ## Goal
80
+
81
+ {goal from Claude command}
82
+
83
+ ## Workflow Alignment
84
+
85
+ {workflow section - simplified}
86
+
87
+ ## Step 1: {step name}
88
+
89
+ {converted step content - generic instructions}
90
+
91
+ ...
92
+
93
+ ## Notes
94
+
95
+ {notes section - remove Claude-specific references}
96
+ ```
97
+
98
+ ### copilot-instructions.md Template
99
+
100
+ ```markdown
101
+ # Repository Instructions for GitHub Copilot
102
+
103
+ ## Coding Philosophy
104
+
105
+ {core philosophy from .claude/CLAUDE.md}
106
+
107
+ ## Workflow Guidelines
108
+
109
+ {workflow guidelines - converted to generic instructions}
110
+
111
+ ## Code Standards
112
+
113
+ {code presentation, TODO policy, etc.}
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Step 4: Write Files
119
+
120
+ **Tools:**
121
+ - `mkdir -p .github/prompts`
122
+ - Write(file_path=".github/prompts/{name}.prompt.md")
123
+ - Write(file_path=".github/copilot-instructions.md")
124
+
125
+ ---
126
+
127
+ ## Step 5: Output Classification
128
+
129
+ ```
130
+ GitHub Copilot (.github/prompts/):
131
+ - create-plan.prompt.md: [STATUS]
132
+ - execute-plan.prompt.md: [STATUS]
133
+ - sync-workflow.prompt.md: [STATUS]
134
+
135
+ GitHub Copilot Base Instructions:
136
+ - .github/copilot-instructions.md: [STATUS]
137
+ ```
@@ -0,0 +1,227 @@
1
+ # OpenCode Sync Guide
2
+
3
+ Sync Claude Code workflows to OpenCode format.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - Source: `.claude/commands/*.md`, `.claude/skills/**/SKILL.md`, `.claude/CLAUDE.md`
10
+ - Target: `.opencode/command/*.md`, `.opencode/skill/*/SKILL.md`, `.opencode/agent/*.md`, `AGENTS.md`
11
+
12
+ ---
13
+
14
+ ## Step 1: Fetch OpenCode Documentation
15
+
16
+ **Search queries (try in order until successful):**
17
+ 1. `site:opencode.ai docs agents commands skills`
18
+ 2. `opencode.ai documentation configuration`
19
+ 3. `opencode ai terminal commands skills agents`
20
+
21
+ **Key documentation URLs:**
22
+ - `https://opencode.ai/docs/agents/` - Agents configuration
23
+ - `https://opencode.ai/docs/commands/` - Custom commands
24
+ - `https://opencode.ai/docs/skills/` - Agent skills
25
+ - `https://opencode.ai/docs/rules/` - Rules (AGENTS.md)
26
+ - `https://opencode.ai/docs/config/` - Configuration
27
+
28
+ ---
29
+
30
+ ## Step 2: Conversion Rules
31
+
32
+ ### Commands (`.opencode/command/*.md`)
33
+
34
+ **Location**: `.opencode/command/{name}.md`
35
+
36
+ **Frontmatter:**
37
+ - `description` (required)
38
+ - `agent: build` for commands that modify code
39
+ - `agent: plan` for read-only commands
40
+ - `model`: optional model override
41
+ - `subtask`: optional subtask flag
42
+
43
+ **Arguments:**
44
+ - `$ARGUMENTS` for all text after command
45
+ - `$1`, `$2`, etc. for positional args
46
+
47
+ **Tool references conversion:**
48
+ | Claude Code | OpenCode |
49
+ |-------------|----------|
50
+ | `AskUserQuestion(...)` | (handled by TUI) |
51
+ | `Task(subagent_type='Explore')` | `@explore` mention |
52
+ | `Task(subagent_type='General')` | `@general` mention |
53
+ | `Read(file_path=...)` | `@filename` reference |
54
+ | `Write(file_path=...)` | Write instruction |
55
+ | `Edit(file_path=...)` | Edit instruction |
56
+ | `Bash(command=...)` | `` !`command` `` syntax |
57
+
58
+ ### Skills (`.opencode/skill/<name>/SKILL.md`)
59
+
60
+ **Location**: `.opencode/skill/{skill-name}/SKILL.md`
61
+
62
+ **Name validation:**
63
+ - Lowercase alphanumeric with hyphens
64
+ - 1-64 characters
65
+ - Directory name must match `name` in frontmatter
66
+
67
+ **Frontmatter (required):**
68
+ - `name`: skill name
69
+ - `description`: 1-1024 chars
70
+ - `license`: optional (e.g., MIT)
71
+ - `compatibility`: optional (e.g., opencode)
72
+ - `metadata`: optional key-value pairs
73
+
74
+ ### Agents (`.opencode/agent/*.md`)
75
+
76
+ **Built-in agents (don't need to create):**
77
+ - `build` - Primary agent with all tools (default)
78
+ - `plan` - Read-only analysis agent
79
+ - `general` - Subagent for complex tasks
80
+ - `explore` - Subagent for codebase exploration
81
+
82
+ **Create custom agents only if needed.**
83
+
84
+ **Frontmatter:**
85
+ - `description`: agent description
86
+ - `mode`: `primary` or `subagent`
87
+ - `model`: model identifier
88
+ - `temperature`: optional
89
+ - `tools`: tool permissions object
90
+ - `permission`: skill permissions
91
+
92
+ ---
93
+
94
+ ## Step 3: Templates
95
+
96
+ ### Command Template
97
+
98
+ ```markdown
99
+ ---
100
+ description: {description}
101
+ agent: build
102
+ ---
103
+
104
+ {goal and instructions from Claude command}
105
+
106
+ ## Instructions
107
+
108
+ {step-by-step instructions}
109
+
110
+ ### Step 1: {step name}
111
+
112
+ {converted step content}
113
+ - Use @explore to search codebase
114
+ - Use @filename to reference files
115
+ - Use !`command` for shell output
116
+
117
+ ...
118
+
119
+ ## Notes
120
+
121
+ {notes section}
122
+ ```
123
+
124
+ ### Skill Template
125
+
126
+ ```markdown
127
+ ---
128
+ name: {skill-name}
129
+ description: {description from Claude skill, 1-1024 chars}
130
+ license: MIT
131
+ compatibility: opencode
132
+ metadata:
133
+ category: {category}
134
+ source: claude-code
135
+ ---
136
+
137
+ ## What I do
138
+
139
+ {capabilities from Claude skill}
140
+
141
+ ## When to use me
142
+
143
+ {triggers and conditions from Claude skill}
144
+
145
+ ## Instructions
146
+
147
+ {step-by-step instructions from Claude skill}
148
+ ```
149
+
150
+ ### Agent Template (if custom needed)
151
+
152
+ ```markdown
153
+ ---
154
+ description: {agent description}
155
+ mode: subagent
156
+ model: anthropic/claude-sonnet-4-20250514
157
+ temperature: 0.1
158
+ tools:
159
+ write: false
160
+ edit: false
161
+ bash: false
162
+ permission:
163
+ skill:
164
+ "*": allow
165
+ ---
166
+
167
+ {system prompt for agent behavior}
168
+
169
+ Focus on:
170
+ - {behavior 1}
171
+ - {behavior 2}
172
+ - {behavior 3}
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Step 4: Write Files
178
+
179
+ **Tools:**
180
+ - `mkdir -p .opencode/command`
181
+ - `mkdir -p .opencode/skill/{name}`
182
+ - `mkdir -p .opencode/agent`
183
+ - Write(file_path=".opencode/command/{name}.md")
184
+ - Write(file_path=".opencode/skill/{name}/SKILL.md")
185
+ - Write(file_path=".opencode/agent/{name}.md") - only if custom agent needed
186
+
187
+ **Skill name mapping:**
188
+ - `.claude/skills/design/figma-extraction/` → `.opencode/skill/figma-extraction/`
189
+ - `.claude/skills/architecture/quality-code-check/` → `.opencode/skill/quality-code-check/`
190
+ - `.claude/skills/ux/accessibility/` → `.opencode/skill/ux-accessibility/`
191
+
192
+ ---
193
+
194
+ ## Step 5: Output Classification
195
+
196
+ ```
197
+ OpenCode Commands (.opencode/command/):
198
+ - create-plan.md: [STATUS]
199
+ - execute-plan.md: [STATUS]
200
+ - sync-workflow.md: [STATUS]
201
+
202
+ OpenCode Skills (.opencode/skill/):
203
+ - figma-extraction/SKILL.md: [STATUS]
204
+ - quality-code-check/SKILL.md: [STATUS]
205
+ - frontend-design-fundamentals/SKILL.md: [STATUS]
206
+
207
+ OpenCode Agents (.opencode/agent/):
208
+ - Using built-in agents (build, plan, explore, general)
209
+ - [custom agent name]: [STATUS] (if any)
210
+ ```
211
+
212
+ ---
213
+
214
+ ## OpenCode-Specific Notes
215
+
216
+ 1. **Skills are native**: OpenCode reads `.claude/skills/*/SKILL.md` directly! But for clarity, also create `.opencode/skill/*/SKILL.md`
217
+
218
+ 2. **AGENTS.md is native**: OpenCode reads `AGENTS.md` and `CLAUDE.md` from root - no conversion needed
219
+
220
+ 3. **Command syntax special features:**
221
+ - Arguments: `$ARGUMENTS` for all, `$1`, `$2` for positional
222
+ - Shell output: `` !`git status` `` injects command output
223
+ - File references: `@src/file.ts` includes file content
224
+
225
+ 4. **Agent modes:**
226
+ - `primary`: Main agents (Tab to switch)
227
+ - `subagent`: Invoked by `@mention` or by primary agents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-workflow-init",
3
- "version": "6.2.3",
3
+ "version": "6.3.2",
4
4
  "description": "Initialize AI workflow docs & commands into any repo with one command",
5
5
  "bin": {
6
6
  "ai-workflow-init": "./cli.js"