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.
@@ -1,532 +1,82 @@
1
1
  ---
2
2
  name: sync-workflow
3
- description: Syncs Claude Code workflows to Cursor, GitHub Copilot, and OpenCode formats.
3
+ description: Syncs Claude Code workflows to Cursor, GitHub Copilot, OpenCode, and Factory Droid formats.
4
4
  ---
5
5
 
6
6
  ## Goal
7
7
 
8
- Sync Claude Code commands/workflows to Cursor, GitHub Copilot, and OpenCode formats by:
9
- 1. Fetching latest documentation for target platforms
10
- 2. Analyzing format differences
11
- 3. Converting and updating target files (commands, skills, agents, base instructions)
8
+ Sync Claude Code commands/workflows to selected target platforms by:
9
+ 1. Asking user which platforms to sync
10
+ 2. Fetching latest documentation for selected platforms
11
+ 3. Analyzing source files and converting to target formats
12
+ 4. Syncing AGENTS.md as universal base instructions
12
13
 
13
- ## Prerequisites
14
+ ## Step 1: Select Target Platforms
14
15
 
15
- - Source (Claude Code):
16
- - `.claude/commands/*.md` - Commands
17
- - `.claude/skills/**/*.md` - Skills (SKILL.md files)
18
- - `.claude/CLAUDE.md` - Base instructions
19
- - `AGENTS.md` - Agent instructions
16
+ **Tool:** AskUserQuestion
20
17
 
21
- - Targets:
22
- - **Cursor**: `.cursor/commands/*.md`, `.cursor/rules/`
23
- - **GitHub Copilot**: `.github/prompts/*.prompt.md`, `.github/copilot-instructions.md`
24
- - **OpenCode**: `.opencode/command/*.md`, `.opencode/skill/*/SKILL.md`, `.opencode/agent/*.md`, `AGENTS.md`
18
+ Ask user which platforms to sync (multiple selection allowed):
25
19
 
26
- ---
27
-
28
- ## Step 1: Fetch Latest Documentation (Web Search)
29
-
30
- **CRITICAL: Always fetch latest docs before syncing to ensure format compliance.**
31
-
32
- **Tool:** WebSearch or WebFetch
33
-
34
- ### 1a: Fetch Cursor Documentation
35
-
36
- Search for latest Cursor rules and commands documentation:
37
-
38
- **Search queries (try in order until successful):**
39
- 1. `"cursor.com" rules for ai custom commands documentation`
40
- 2. `site:docs.cursor.com rules commands`
41
- 3. `cursor ai editor custom rules commands format`
42
-
43
- **Key documentation URLs to fetch:**
44
- - `https://docs.cursor.com/context/rules-for-ai`
45
- - `https://docs.cursor.com/context/rules`
46
- - `https://docs.cursor.com/chat/custom-modes`
47
-
48
- **Extract and note:**
49
- - Command file location: `.cursor/commands/` or `.cursor/rules/`
50
- - File format: frontmatter structure, markdown body
51
- - Supported frontmatter fields (name, description, etc.)
52
- - Any special syntax or features (variables, context references)
53
- - AGENTS.md support and location
54
-
55
- ### 1b: Fetch GitHub Copilot Documentation
56
-
57
- Search for latest GitHub Copilot custom instructions documentation:
58
-
59
- **Search queries (try in order until successful):**
60
- 1. `"github.com" copilot custom instructions repository documentation`
61
- 2. `site:docs.github.com copilot custom instructions prompts`
62
- 3. `github copilot prompt files .github/prompts format`
63
-
64
- **Key documentation URLs to fetch:**
65
- - `https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot`
66
- - `https://docs.github.com/en/copilot/how-tos/configure-custom-instructions`
67
-
68
- **Extract and note:**
69
- - Prompt file location: `.github/prompts/`
70
- - File format: `*.prompt.md` naming convention
71
- - Frontmatter structure (applyTo, excludeAgent, etc.)
72
- - Custom instructions file: `.github/copilot-instructions.md`
73
- - AGENTS.md support (location, format)
74
-
75
- ### 1c: Fetch OpenCode Documentation
76
-
77
- Search for latest OpenCode documentation:
78
-
79
- **Search queries (try in order until successful):**
80
- 1. `site:opencode.ai docs agents commands skills`
81
- 2. `opencode.ai documentation configuration`
82
- 3. `opencode ai terminal commands skills agents`
83
-
84
- **Key documentation URLs to fetch:**
85
- - `https://opencode.ai/docs/agents/` - Agents configuration
86
- - `https://opencode.ai/docs/commands/` - Custom commands
87
- - `https://opencode.ai/docs/skills/` - Agent skills
88
- - `https://opencode.ai/docs/rules/` - Rules (AGENTS.md)
89
- - `https://opencode.ai/docs/config/` - Configuration
90
-
91
- **Extract and note:**
92
-
93
- **Agents** (`.opencode/agent/*.md` or `opencode.json`):
94
- - Primary agents: Build (default), Plan (read-only)
95
- - Subagents: General, Explore
96
- - Config options: mode, model, tools, permissions, prompt, description
97
- - Frontmatter format for markdown agents
98
-
99
- **Commands** (`.opencode/command/*.md`):
100
- - Location: `.opencode/command/` (project) or `~/.config/opencode/command/` (global)
101
- - Frontmatter: description, agent, model, subtask
102
- - Arguments: `$ARGUMENTS`, `$1`, `$2`, etc.
103
- - Shell output: `` !`command` ``
104
- - File references: `@filename`
105
-
106
- **Skills** (`.opencode/skill/<name>/SKILL.md`):
107
- - Location: `.opencode/skill/<name>/SKILL.md` or `.claude/skills/<name>/SKILL.md`
108
- - Frontmatter: name (required), description (required), license, compatibility, metadata
109
- - Name validation: lowercase alphanumeric with hyphens, 1-64 chars
110
- - Description: 1-1024 chars
111
-
112
- **Rules** (`AGENTS.md`):
113
- - Location: project root or `~/.config/opencode/AGENTS.md`
114
- - Also reads: `CLAUDE.md`, `.cursor/rules/*.md`
115
- - Can reference external files via `opencode.json` instructions field
116
-
117
- ### 1d: Document Format Summary
118
-
119
- After fetching, create internal summary:
120
-
121
- ```
122
- ## Cursor Format
123
- - Location: [discovered path]
124
- - Frontmatter: [fields]
125
- - Special features: [features]
126
- - AGENTS.md: [supported? location?]
127
-
128
- ## GitHub Copilot Format
129
- - Prompts location: [discovered path]
130
- - Instructions location: [discovered path]
131
- - Frontmatter: [fields]
132
- - Special features: [features]
133
- - AGENTS.md/CLAUDE.md: [supported? location?]
134
-
135
- ## OpenCode Format
136
- - Agents: .opencode/agent/*.md (mode, model, tools, permissions, prompt)
137
- - Commands: .opencode/command/*.md (description, agent, model, subtask)
138
- - Skills: .opencode/skill/<name>/SKILL.md (name, description)
139
- - Rules: AGENTS.md (also reads CLAUDE.md)
140
- - Config: opencode.json
141
- ```
142
-
143
- **Error handling:**
144
- - Web search fails: Use cached knowledge + warn user docs may be outdated
145
- - URL fetch fails: Try alternative URLs or search queries
146
- - Format changed significantly: Alert user, show differences
147
-
148
- ---
149
-
150
- ## Step 2: Analyze Source (Claude Code)
151
-
152
- ### 2a: Analyze Commands
153
-
154
- **Tools:**
155
- - Glob(pattern=".claude/commands/*.md")
156
- - Read(file_path=...) for each command
157
-
158
- **For each Claude command, extract:**
159
- - Frontmatter: name, description
160
- - Goal section
161
- - Step-by-step instructions
162
- - Tool references (AskUserQuestion, Read, Write, Edit, Task, etc.)
163
- - Skill references (`.claude/skills/...`)
164
- - Notes and guidelines
165
-
166
- ### 2b: Analyze Skills
167
-
168
- **Tools:**
169
- - Glob(pattern=".claude/skills/**/SKILL.md")
170
- - Read(file_path=...) for each skill
171
-
172
- **For each Claude skill, extract:**
173
- - Skill name and category (from path)
174
- - SKILL.md content
175
- - Triggers and usage conditions
176
- - Instructions and guidelines
177
-
178
- ### 2c: Analyze Base Instructions
179
-
180
- **Tools:**
181
- - Read(file_path=".claude/CLAUDE.md")
182
- - Read(file_path="AGENTS.md")
183
-
184
- **Build inventory:**
185
20
  ```
186
- | Type | Name | Description | Location |
187
- |---------|-------------------|--------------------------------------|-----------------------|
188
- | Command | create-plan | Generates feature planning doc | .claude/commands/ |
189
- | Command | execute-plan | Implements tasks from planning doc | .claude/commands/ |
190
- | Skill | figma-extraction | Extract design from Figma | .claude/skills/design/|
191
- | Skill | quality-code-check| Linting and type checking | .claude/skills/arch/ |
192
- | Rules | CLAUDE.md | Base instructions | .claude/ |
193
- | Rules | AGENTS.md | Agent instructions | root |
21
+ AskUserQuestion(
22
+ questions=[{
23
+ "question": "Which platforms do you want to sync to?",
24
+ "header": "Platforms",
25
+ "multiSelect": true,
26
+ "options": [
27
+ {"label": "Cursor", "description": ".cursor/commands/, .cursor/rules/"},
28
+ {"label": "GitHub Copilot", "description": ".github/prompts/, copilot-instructions.md"},
29
+ {"label": "OpenCode", "description": ".opencode/command/, skill/, agent/"},
30
+ {"label": "Factory Droid", "description": ".factory/commands/, skills/, droids/"}
31
+ ]
32
+ }]
33
+ )
194
34
  ```
195
35
 
196
36
  ---
197
37
 
198
- ## Step 3: Detect Existing Target Files
38
+ ## Step 2: Load Common Analysis
199
39
 
200
- **Tools:**
201
- - Glob(pattern=".cursor/commands/*.md")
202
- - Glob(pattern=".github/prompts/*.prompt.md")
203
- - Glob(pattern=".opencode/command/*.md")
204
- - Glob(pattern=".opencode/skill/*/SKILL.md")
205
- - Glob(pattern=".opencode/agent/*.md")
206
- - Read(file_path=...) for each existing file
40
+ **Reference:** Read and follow `docs/sync-workflow/common.md`
207
41
 
208
- **Compare and classify:**
209
- - **Missing**: Source exists but not in target
210
- - **Outdated**: Target exists but content differs significantly
211
- - **Current**: Target matches source (skip)
212
-
213
- **Output classification:**
214
- ```
215
- Cursor (.cursor/commands/):
216
- - create-plan.md: OUTDATED (source modified)
217
- - execute-plan.md: CURRENT (skip)
218
- - sync-workflow.md: MISSING (new)
219
-
220
- GitHub Copilot (.github/prompts/):
221
- - create-plan.prompt.md: OUTDATED
222
- - execute-plan.prompt.md: CURRENT (skip)
223
- - sync-workflow.prompt.md: MISSING (new)
224
-
225
- OpenCode Commands (.opencode/command/):
226
- - create-plan.md: MISSING (new)
227
- - execute-plan.md: MISSING (new)
228
-
229
- OpenCode Skills (.opencode/skill/):
230
- - figma-extraction/SKILL.md: MISSING (new)
231
- - quality-code-check/SKILL.md: MISSING (new)
232
-
233
- OpenCode Agents (.opencode/agent/):
234
- - No custom agents needed (use built-in Build/Plan)
235
- ```
42
+ This step:
43
+ - Analyzes source Claude Code files (commands, skills, CLAUDE.md)
44
+ - Detects existing target files
45
+ - Classifies files as MISSING, OUTDATED, or CURRENT
236
46
 
237
47
  ---
238
48
 
239
- ## Step 4: Convert Format (Claude → Targets)
240
-
241
- ### 4a: Claude → Cursor Conversion
242
-
243
- **Conversion rules:**
244
- 1. **Frontmatter**: Keep `name` and `description`, adjust other fields per Cursor docs
245
- 2. **Tool references**: Convert Claude-specific tools to Cursor equivalents
246
- - `AskUserQuestion(...)` → Generic "ask user" instruction
247
- - `Task(subagent_type='Explore')` → "Use workspace search and analysis"
248
- - `Read(file_path=...)` → `read [path]` or similar
249
- - `Write(file_path=...)` → `write to [path]`
250
- - `Edit(file_path=...)` → `edit [path]`
251
- 3. **Skill references**: Convert `.claude/skills/...` → `.cursor/rules/...` or inline
252
- 4. **Keep**: Goal, Steps, Notes sections structure
253
-
254
- **Template for Cursor:**
255
- ```markdown
256
- ---
257
- name: {command-name}
258
- description: {description}
259
- ---
260
-
261
- ## Goal
262
-
263
- {goal from Claude command}
49
+ ## Step 3: Execute Platform-Specific Sync
264
50
 
265
- ## Workflow Alignment
51
+ For each selected platform, load and execute the corresponding guide:
266
52
 
267
- {workflow section}
53
+ ### If Cursor selected:
54
+ **Reference:** Read and follow `docs/sync-workflow/cursor.md`
268
55
 
269
- ## Step 1: {step name}
56
+ ### If GitHub Copilot selected:
57
+ **Reference:** Read and follow `docs/sync-workflow/github-copilot.md`
270
58
 
271
- {converted step content - replace Claude-specific tool syntax}
59
+ ### If OpenCode selected:
60
+ **Reference:** Read and follow `docs/sync-workflow/opencode.md`
272
61
 
273
- ...
62
+ ### If Factory Droid selected:
63
+ **Reference:** Read and follow `docs/sync-workflow/factory-droid.md`
274
64
 
275
- ## Notes
276
-
277
- {notes section}
278
- ```
279
-
280
- ### 4b: Claude → GitHub Copilot Conversion
281
-
282
- **Conversion rules:**
283
- 1. **Filename**: `{name}.prompt.md` format
284
- 2. **Frontmatter**: May need `applyTo` for path-specific prompts
285
- 3. **Tool references**: Convert to generic instructions (Copilot has different tool model)
286
- - `AskUserQuestion(...)` → "Ask user for clarification"
287
- - `Task(subagent_type='Explore')` → "Search codebase for..."
288
- - `Read/Write/Edit` → Generic file operation instructions
289
- 4. **Remove**: Claude-specific skill references (Copilot doesn't have skills system)
290
- 5. **Keep**: Goal, Steps structure, acceptance criteria
291
-
292
- **Template for GitHub Copilot:**
293
- ```markdown
294
- ---
295
- name: {command-name}
296
- description: {description}
297
65
  ---
298
66
 
299
- ## Goal
300
-
301
- {goal from Claude command}
302
-
303
- ## Workflow Alignment
304
-
305
- {workflow section - simplified}
306
-
307
- ## Step 1: {step name}
308
-
309
- {converted step content - generic instructions}
310
-
311
- ...
312
-
313
- ## Notes
314
-
315
- {notes section - remove Claude-specific references}
316
- ```
317
-
318
- ### 4c: Claude → OpenCode Conversion
319
-
320
- **OpenCode has 3 main concepts to sync: Commands, Skills, and Agents**
321
-
322
- #### 4c-1: Commands (`.opencode/command/*.md`)
323
-
324
- **Location**: `.opencode/command/{name}.md`
325
-
326
- **Conversion rules:**
327
- 1. **Frontmatter**: Convert to OpenCode format
328
- - `name` → (filename becomes name)
329
- - `description` → `description`
330
- - Add `agent: build` for commands that modify code
331
- - Add `agent: plan` for read-only commands
332
- 2. **Arguments**: Convert to OpenCode placeholder format
333
- - Named args → `$ARGUMENTS` or `$1`, `$2`, etc.
334
- 3. **Tool references**: Convert to OpenCode instructions
335
- - `AskUserQuestion(...)` → Remove (OpenCode handles differently)
336
- - `Task(subagent_type='Explore')` → "Use @explore to search codebase"
337
- - `Read(file_path=...)` → "Read file at path" or use `@filename`
338
- - `Write/Edit` → "Write/edit file at path"
339
- 4. **Skill references**: Convert to OpenCode skill tool calls
340
- - `.claude/skills/xyz/SKILL.md` → "Load skill xyz" or inline
341
-
342
- **Template for OpenCode Command:**
343
- ```markdown
344
- ---
345
- description: {description}
346
- agent: build
347
- ---
348
-
349
- {goal and instructions from Claude command}
350
-
351
- ## Instructions
352
-
353
- {step-by-step instructions}
354
-
355
- ### Step 1: {step name}
67
+ ## Step 4: Sync AGENTS.md (Always Execute)
356
68
 
357
- {converted step content}
358
- - Use @explore to search codebase
359
- - Use @filename to reference files
360
- - Use !`command` for shell output
361
-
362
- ...
363
-
364
- ## Notes
365
-
366
- {notes section}
367
- ```
368
-
369
- #### 4c-2: Skills (`.opencode/skill/<name>/SKILL.md`)
370
-
371
- **Location**: `.opencode/skill/{skill-name}/SKILL.md`
372
-
373
- **Conversion rules:**
374
- 1. **Directory structure**: Create `.opencode/skill/{name}/SKILL.md`
375
- 2. **Name validation**: Convert to lowercase-hyphenated, 1-64 chars
376
- - `quality-code-check` ✓
377
- - `figma-extraction` ✓
378
- 3. **Frontmatter** (required):
379
- - `name`: skill name (must match directory name)
380
- - `description`: 1-1024 chars
381
- - `license`: optional (e.g., MIT)
382
- - `compatibility`: optional (e.g., opencode)
383
- - `metadata`: optional key-value pairs
384
- 4. **Content**: Convert Claude skill instructions
385
-
386
- **Template for OpenCode Skill:**
387
- ```markdown
388
- ---
389
- name: {skill-name}
390
- description: {description from Claude skill, 1-1024 chars}
391
- license: MIT
392
- compatibility: opencode
393
- metadata:
394
- category: {category}
395
- source: claude-code
396
- ---
397
-
398
- ## What I do
399
-
400
- {capabilities from Claude skill}
401
-
402
- ## When to use me
403
-
404
- {triggers and conditions from Claude skill}
405
-
406
- ## Instructions
407
-
408
- {step-by-step instructions from Claude skill}
409
- ```
410
-
411
- **Claude → OpenCode skill name mapping:**
412
- - `.claude/skills/design/figma-extraction/` → `.opencode/skill/figma-extraction/`
413
- - `.claude/skills/architecture/quality-code-check/` → `.opencode/skill/quality-code-check/`
414
- - `.claude/skills/ux/accessibility/` → `.opencode/skill/ux-accessibility/`
415
-
416
- #### 4c-3: Agents (`.opencode/agent/*.md`)
417
-
418
- **Location**: `.opencode/agent/{agent-name}.md`
419
-
420
- **OpenCode built-in agents (don't need to create):**
421
- - `build` - Primary agent with all tools (default)
422
- - `plan` - Read-only analysis agent
423
- - `general` - Subagent for complex tasks
424
- - `explore` - Subagent for codebase exploration
425
-
426
- **Create custom agents only if needed:**
427
- - For specialized workflows not covered by built-in agents
428
- - For agents with specific tool permissions or models
429
-
430
- **Template for OpenCode Agent:**
431
- ```markdown
432
- ---
433
- description: {agent description}
434
- mode: subagent
435
- model: anthropic/claude-sonnet-4-20250514
436
- temperature: 0.1
437
- tools:
438
- write: false
439
- edit: false
440
- bash: false
441
- permission:
442
- skill:
443
- "*": allow
444
- ---
445
-
446
- {system prompt for agent behavior}
447
-
448
- Focus on:
449
- - {behavior 1}
450
- - {behavior 2}
451
- - {behavior 3}
452
- ```
453
-
454
- **When to create custom agents:**
455
- - `code-reviewer` - If you have a specialized review workflow
456
- - `docs-writer` - For documentation-focused tasks
457
- - `security-auditor` - For security-focused analysis
458
-
459
- ---
460
-
461
- ## Step 5: Write Converted Files
462
-
463
- **Tools:**
464
- - Write(file_path=".cursor/commands/{name}.md")
465
- - Write(file_path=".github/prompts/{name}.prompt.md")
466
- - Write(file_path=".opencode/command/{name}.md")
467
- - Write(file_path=".opencode/skill/{name}/SKILL.md")
468
- - Write(file_path=".opencode/agent/{name}.md") - only if custom agent needed
469
-
470
- **For each item needing sync (MISSING or OUTDATED):**
471
-
472
- 1. Apply conversion rules from Step 4
473
- 2. Create directories if needed:
474
- - `mkdir -p .opencode/command`
475
- - `mkdir -p .opencode/skill/{name}`
476
- - `mkdir -p .opencode/agent`
477
- 3. Write to target location
478
- 4. Log what was created/updated
479
-
480
- **Error handling:**
481
- - Directory doesn't exist: Create it first
482
- - File write fails: Retry once, then notify user
483
- - Conversion uncertain: Add TODO comment in output file
484
- - Skill name validation fails: Adjust name to meet requirements
485
-
486
- ---
487
-
488
- ## Step 6: Sync Base Instruction Files
489
-
490
- **Check and sync base instruction files across all platforms:**
491
-
492
- ### Source files:
493
- - `.claude/CLAUDE.md` - Claude Code base instructions (PRIMARY SOURCE)
494
-
495
- ### Target files by platform:
496
-
497
- | Platform | Base Instructions | Notes |
498
- |----------|-------------------|-------|
499
- | Cursor | `.cursor/CLAUDE.md` | Also reads AGENTS.md |
500
- | GitHub Copilot | `.github/copilot-instructions.md` | Merge sources |
501
- | OpenCode | `AGENTS.md` | Primary instruction file |
502
- | Other tools | `AGENTS.md` | Universal standard |
503
-
504
- **Conversion for each platform:**
505
-
506
- 1. **Cursor**: Copy `.claude/CLAUDE.md` → `.cursor/CLAUDE.md`
507
- 2. **GitHub Copilot**:
508
- - Merge into `.github/copilot-instructions.md`
509
- - Remove Claude-specific tool syntax
510
-
511
- ---
512
-
513
- ## Step 7: Sync AGENTS.md (FINAL STEP - CRITICAL)
514
-
515
- **IMPORTANT: This is the final and most critical step.**
69
+ **IMPORTANT: Always sync AGENTS.md regardless of platform selection.**
516
70
 
517
71
  Many AI coding tools use `AGENTS.md` as their base instruction file:
518
- - **OpenCode** - reads `AGENTS.md` natively
519
- - **Cursor** - supports `AGENTS.md`
520
- - **GitHub Copilot** - supports `AGENTS.md`
521
- - **Other AI tools** - increasingly adopting `AGENTS.md` standard
522
-
523
- ### 7a: Read Source
72
+ - OpenCode, Factory Droid - read natively
73
+ - Cursor, GitHub Copilot - support AGENTS.md
524
74
 
525
- **Tool:** Read(file_path=".claude/CLAUDE.md")
75
+ ### 4a: Read Source
526
76
 
527
- Read the Claude Code base instructions from `.claude/CLAUDE.md`.
77
+ Read `.claude/CLAUDE.md` as the primary source.
528
78
 
529
- ### 7b: Convert Content
79
+ ### 4b: Convert Content
530
80
 
531
81
  **Conversion rules for AGENTS.md:**
532
82
 
@@ -534,11 +84,11 @@ Read the Claude Code base instructions from `.claude/CLAUDE.md`.
534
84
  - Remove `AskUserQuestion(...)` tool references
535
85
  - Remove `Task(subagent_type=...)` syntax
536
86
  - Convert `Read/Write/Edit` tool calls to generic instructions
537
- - Remove `.claude/skills/...` paths (use generic skill references)
87
+ - Remove `.claude/skills/...` paths
538
88
 
539
89
  2. **Keep universal content:**
540
90
  - Core coding philosophy
541
- - Workflow guidelines (Plan → Implement → Test → Review)
91
+ - Workflow guidelines
542
92
  - File structure conventions
543
93
  - Communication guidelines
544
94
  - Code presentation rules
@@ -550,233 +100,55 @@ Read the Claude Code base instructions from `.claude/CLAUDE.md`.
550
100
  - `Glob(pattern=...)` → "Search for files matching pattern"
551
101
  - `Grep(pattern=...)` → "Search content for pattern"
552
102
  - `Bash(command=...)` → "Run command in terminal"
553
- - `WebFetch(url=...)` → "Fetch URL content"
554
-
555
- 4. **Add universal slash commands section:**
556
- - List commands that work across platforms
557
- - Note platform-specific variations
558
-
559
- ### 7c: Write to AGENTS.md
560
-
561
- **Tool:** Write(file_path="AGENTS.md")
562
-
563
- Write the converted content to `AGENTS.md` at project root.
564
-
565
- **Template for AGENTS.md:**
566
- ```markdown
567
- # AI Agent Workflow Standards
568
-
569
- ## Core Coding Philosophy
570
-
571
- Apply these principles when providing solutions, generating code, or making technical decisions:
572
-
573
- ### 1. Simplicity First
574
- {content from .claude/CLAUDE.md}
575
-
576
- ### 2. Deep Understanding
577
- {content from .claude/CLAUDE.md}
578
-
579
- ### 3. Multiple Options
580
- {content from .claude/CLAUDE.md}
581
-
582
- ### 4. Think Ahead
583
- {content from .claude/CLAUDE.md}
584
-
585
- ---
586
103
 
587
- ## Core Workflow: Plan Implement → Test → Review
104
+ ### 4c: Write to AGENTS.md
588
105
 
589
- ### Workflow Alignment
590
- {content from .claude/CLAUDE.md - converted to generic instructions}
591
-
592
- ## File Structure
593
- {content from .claude/CLAUDE.md}
594
-
595
- ## Tooling Strategy
596
- {content from .claude/CLAUDE.md - generic tool references}
597
-
598
- ## Communication
599
- {content from .claude/CLAUDE.md}
600
-
601
- ## Code Presentation
602
- {content from .claude/CLAUDE.md}
603
-
604
- ## TODO Policy
605
- {content from .claude/CLAUDE.md}
606
-
607
- ## Git Workflow
608
- {content from .claude/CLAUDE.md}
609
-
610
- ## Slash Commands
611
- - `/create-plan` - Generate planning doc
612
- - `/execute-plan` - Implement tasks from planning doc
613
- - `/modify-plan` - Modify plan after implementation
614
- - `/code-review` - Validate against standards
615
- - `/generate-standards` - Update CODE_CONVENTIONS.md
616
- - `/writing-test` - Generate tests from acceptance criteria
617
- - `/init-chat` - Load project rules (AGENTS.md)
618
-
619
- ## Quality Gates
620
- {content from .claude/CLAUDE.md}
621
-
622
- ---
623
- ```
624
-
625
- ### 7d: Verify Sync
626
-
627
- After writing, verify:
628
- 1. `AGENTS.md` exists at project root
629
- 2. Content is valid markdown
630
- 3. No Claude-specific syntax remains
631
- 4. All sections are present
632
-
633
- **Notify user:**
634
- ```
635
- ✓ AGENTS.md synced from .claude/CLAUDE.md
636
- - Removed Claude-specific syntax
637
- - Converted tool references to generic instructions
638
- - All AI coding tools will now read the same base instructions
639
- ```
106
+ Write converted content to `AGENTS.md` at project root.
640
107
 
641
108
  ---
642
109
 
643
- ## Step 8: Summary Report
110
+ ## Step 5: Summary Report
644
111
 
645
- **Generate sync report:**
112
+ Generate sync report based on selected platforms:
646
113
 
647
114
  ```
648
115
  ## Workflow Sync Complete
649
116
 
650
- ### Documentation Fetched
651
- - Cursor docs: [date] - [version/status]
652
- - GitHub Copilot docs: [date] - [version/status]
653
- - OpenCode docs: [date] - [version/status]
654
-
655
- ### Files Synced
656
-
657
- #### Cursor (.cursor/commands/)
658
- - [x] create-plan.md - UPDATED
659
- - [x] execute-plan.md - SKIPPED (current)
660
- - [x] sync-workflow.md - CREATED
661
-
662
- #### GitHub Copilot (.github/prompts/)
663
- - [x] create-plan.prompt.md - UPDATED
664
- - [x] execute-plan.prompt.md - SKIPPED (current)
665
- - [x] sync-workflow.prompt.md - CREATED
666
-
667
- #### OpenCode Commands (.opencode/command/)
668
- - [x] create-plan.md - CREATED
669
- - [x] execute-plan.md - CREATED
670
- - [x] sync-workflow.md - CREATED
671
-
672
- #### OpenCode Skills (.opencode/skill/)
673
- - [x] figma-extraction/SKILL.md - CREATED
674
- - [x] quality-code-check/SKILL.md - CREATED
675
- - [x] frontend-design-fundamentals/SKILL.md - CREATED
676
- - [x] ux-accessibility/SKILL.md - CREATED
677
-
678
- #### OpenCode Agents (.opencode/agent/)
679
- - [x] Using built-in agents (build, plan, explore, general)
680
- - [ ] No custom agents needed
681
-
682
- #### Base Instructions (CRITICAL)
683
- - [x] .cursor/CLAUDE.md - UPDATED (from .claude/CLAUDE.md)
684
- - [x] .github/copilot-instructions.md - UPDATED
685
- - [x] **AGENTS.md - SYNCED FROM .claude/CLAUDE.md** ← Final step
686
-
687
- ### AGENTS.md Sync Summary
688
- - Source: .claude/CLAUDE.md
689
- - Target: AGENTS.md (project root)
690
- - Status: ✓ Synced
691
- - Changes:
692
- - Removed Claude-specific tool syntax
693
- - Converted to generic instructions
694
- - Compatible with: OpenCode, Cursor, GitHub Copilot, other AI tools
117
+ ### Platforms Synced
118
+ - [x] Cursor (if selected)
119
+ - [x] GitHub Copilot (if selected)
120
+ - [x] OpenCode (if selected)
121
+ - [x] Factory Droid (if selected)
122
+ - [x] AGENTS.md (always)
123
+
124
+ ### Files Created/Updated
125
+ [List files per platform]
695
126
 
696
127
  ### Warnings
697
- - [any conversion warnings or manual review needed]
128
+ [Any conversion warnings]
698
129
 
699
130
  ### Next Steps
700
- - Review converted files for platform-specific adjustments
701
- - Test commands in each platform:
702
- - Claude Code: `/create-plan`
703
- - Cursor: `/create-plan`
704
- - GitHub Copilot: Use prompt file
705
- - OpenCode: `/create-plan`
706
- - Commit changes: `git add . && git commit -m "[sync] update workflows and AGENTS.md"`
707
- ```
708
- - Test commands in each platform:
709
- - Claude Code: `/create-plan`
710
- - Cursor: `/create-plan`
711
- - GitHub Copilot: Use prompt file
712
- - OpenCode: `/create-plan`
713
- - Commit changes: `git add . && git commit -m "[sync] update Cursor, Copilot, and OpenCode workflows"`
131
+ - Review converted files
132
+ - Test commands in each platform
133
+ - Commit changes
714
134
  ```
715
135
 
716
136
  ---
717
137
 
718
138
  ## Notes
719
139
 
720
- ### General Guidelines
721
-
722
- - Always fetch latest docs first (Step 1) - platform formats change frequently
723
- - Preserve the intent and logic of commands during conversion
724
- - When uncertain about conversion, add TODO comments for manual review
725
- - Keep conversions conservative - better to be generic than broken
726
-
727
140
  ### Platform Comparison Summary
728
141
 
729
- | Feature | Claude Code | Cursor | GitHub Copilot | OpenCode |
730
- |---------|-------------|--------|----------------|----------|
731
- | Commands | `.claude/commands/` | `.cursor/commands/` | `.github/prompts/` | `.opencode/command/` |
732
- | Skills | `.claude/skills/*/SKILL.md` | `.cursor/rules/` | N/A | `.opencode/skill/*/SKILL.md` |
733
- | Agents | N/A (built-in) | N/A | N/A | `.opencode/agent/*.md` |
734
- | Base instructions | `CLAUDE.md` | `CLAUDE.md` | `copilot-instructions.md` | `AGENTS.md` |
735
- | Config | N/A | N/A | N/A | `opencode.json` |
736
- | Frontmatter | YAML | YAML | YAML | YAML |
737
- | Arguments | N/A | N/A | N/A | `$ARGUMENTS`, `$1` |
738
-
739
- ### Tool Reference Conversion
740
-
741
- | Claude Code | Cursor | GitHub Copilot | OpenCode |
742
- |-------------|--------|----------------|----------|
743
- | `AskUserQuestion(...)` | Ask user | Ask user | (handled by TUI) |
744
- | `Task(subagent_type='Explore')` | Workspace search | Search codebase | `@explore` mention |
745
- | `Task(subagent_type='General')` | General search | General search | `@general` mention |
746
- | `Read(file_path=...)` | Read file | Read file | `@filename` reference |
747
- | `Write(file_path=...)` | Write file | Write file | Write instruction |
748
- | `Edit(file_path=...)` | Edit file | Edit file | Edit instruction |
749
- | `Glob(pattern=...)` | Find files | Find files | Search instruction |
750
- | `Grep(pattern=...)` | Search content | Search pattern | Search instruction |
751
- | `Bash(command=...)` | Run command | Run command | `` !`command` `` syntax |
752
- | `WebFetch(url=...)` | Fetch URL | Fetch URL | Fetch instruction |
753
-
754
- ### OpenCode-Specific Considerations
755
-
756
- 1. **Skills are native**: OpenCode reads `.claude/skills/*/SKILL.md` directly! But for clarity, also create `.opencode/skill/*/SKILL.md`
757
-
758
- 2. **AGENTS.md is native**: OpenCode reads `AGENTS.md` and `CLAUDE.md` from root - no conversion needed
759
-
760
- 3. **Built-in agents**: Use `build` (default), `plan`, `explore`, `general` - create custom only when needed
761
-
762
- 4. **Command syntax**:
763
- - Arguments: `$ARGUMENTS` for all, `$1`, `$2` for positional
764
- - Shell output: `` !`git status` `` injects command output
765
- - File references: `@src/file.ts` includes file content
766
-
767
- 5. **Skill requirements**:
768
- - Name: lowercase alphanumeric with hyphens, 1-64 chars
769
- - Description: 1-1024 chars (required)
770
- - Directory name must match `name` in frontmatter
771
-
772
- 6. **Agent modes**:
773
- - `primary`: Main agents (Tab to switch)
774
- - `subagent`: Invoked by `@mention` or by primary agents
142
+ | Feature | Claude Code | Cursor | GitHub Copilot | OpenCode | Factory Droid |
143
+ |---------|-------------|--------|----------------|----------|---------------|
144
+ | Commands | `.claude/commands/` | `.cursor/commands/` | `.github/prompts/` | `.opencode/command/` | `.factory/commands/` |
145
+ | Skills | `.claude/skills/*/SKILL.md` | `.cursor/rules/` | N/A | `.opencode/skill/*/SKILL.md` | `.factory/skills/*/SKILL.md` |
146
+ | Agents | N/A | N/A | N/A | `.opencode/agent/*.md` | `.factory/droids/*.md` |
147
+ | Base | `CLAUDE.md` | `CLAUDE.md` | `copilot-instructions.md` | `AGENTS.md` | `AGENTS.md` |
775
148
 
776
149
  ### When to Run This Command
777
150
 
778
151
  - After adding/modifying Claude commands or skills
779
- - After major updates to Cursor, GitHub Copilot, or OpenCode documentation
152
+ - After major updates to platform documentation
780
153
  - Before releasing new version of ai-workflow-init package
781
154
  - When team reports sync issues between platforms
782
- - When adding support for a new AI coding tool