@brunosps00/dev-workflow 0.0.6 → 0.0.7

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/lib/constants.js CHANGED
@@ -81,6 +81,17 @@ Source of truth: \`.dw/commands/${name}.md\`
81
81
  Read and follow the complete instructions in the command file above.
82
82
  This wrapper exists for tool discovery. All logic lives in .dw/commands/.
83
83
  </system_instructions>
84
+ `,
85
+ },
86
+ opencode: {
87
+ dir: '.opencode/commands',
88
+ flat: true,
89
+ wrapperTemplate: (name, description) => `---
90
+ description: ${description}
91
+ ---
92
+ Follow ALL instructions in @.dw/commands/${name}.md
93
+
94
+ $ARGUMENTS
84
95
  `,
85
96
  },
86
97
  };
package/lib/init.js CHANGED
@@ -121,7 +121,14 @@ async function run({ force = false, lang = null, mode = 'init' }) {
121
121
  console.log(` ${skillsResults.created} created, ${skillsResults.skipped} skipped, ${skillsResults.overwritten} overwritten\n`);
122
122
  }
123
123
 
124
- // 6-8. Generate platform wrappers
124
+ // 6. Create .opencode/package.json
125
+ const opencodePackageJson = path.join(projectRoot, '.opencode', 'package.json');
126
+ const opencodeContent = JSON.stringify({ dependencies: { '@opencode-ai/plugin': '1.2.17' } }, null, 2) + '\n';
127
+ const opcStatus = writeFile(opencodePackageJson, opencodeContent, false);
128
+ if (opcStatus === 'created') totalCreated++;
129
+ else totalSkipped++;
130
+
131
+ // 7. Generate platform wrappers
125
132
  console.log(' Platform wrappers:');
126
133
  const wrapperResults = generateWrappers(projectRoot, commands, managedForce);
127
134
  totalCreated += wrapperResults.created;
package/lib/wrappers.js CHANGED
@@ -7,8 +7,14 @@ function generateWrappers(projectRoot, commands, force = false) {
7
7
 
8
8
  for (const [platformName, platform] of Object.entries(PLATFORMS)) {
9
9
  for (const cmd of commands) {
10
- const skillDir = path.join(projectRoot, platform.dir, cmd.name);
11
- const skillFile = path.join(skillDir, 'SKILL.md');
10
+ let skillFile;
11
+ if (platform.flat) {
12
+ // Flat format: .opencode/commands/dw-brainstorm.md
13
+ skillFile = path.join(projectRoot, platform.dir, `${cmd.name}.md`);
14
+ } else {
15
+ // Directory format: .claude/skills/dw-brainstorm/SKILL.md
16
+ skillFile = path.join(projectRoot, platform.dir, cmd.name, 'SKILL.md');
17
+ }
12
18
  const content = platform.wrapperTemplate(cmd.name, cmd.description);
13
19
  const status = writeFile(skillFile, content, force);
14
20
  results[status]++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "AI-driven development workflow commands for any project. Scaffolds a complete PRD-to-PR pipeline with multi-platform AI assistant support.",
5
5
  "bin": {
6
6
  "dev-workflow": "./bin/dev-workflow.js"