@torka/claude-workflows 0.9.0 → 0.10.0

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/install.js CHANGED
@@ -85,6 +85,32 @@ function getTargetBase() {
85
85
  return path.join(process.env.INIT_CWD || process.cwd(), '.claude');
86
86
  }
87
87
 
88
+ /**
89
+ * Ensure entries exist in a .gitignore file (append if missing)
90
+ */
91
+ function ensureGitignoreEntries(gitignorePath, entries, header) {
92
+ let existingContent = '';
93
+ if (fs.existsSync(gitignorePath)) {
94
+ existingContent = fs.readFileSync(gitignorePath, 'utf8');
95
+ }
96
+
97
+ const existingLines = new Set(
98
+ existingContent.split('\n').map(line => line.trim()).filter(Boolean)
99
+ );
100
+
101
+ const missingEntries = entries.filter(entry => !existingLines.has(entry));
102
+
103
+ if (missingEntries.length > 0) {
104
+ const newContent = existingContent.trimEnd() +
105
+ (existingContent ? '\n\n' : '') +
106
+ `# ${header}\n` +
107
+ missingEntries.join('\n') + '\n';
108
+ fs.writeFileSync(gitignorePath, newContent);
109
+ return missingEntries.length;
110
+ }
111
+ return 0;
112
+ }
113
+
88
114
  /**
89
115
  * Recursively copy directory contents
90
116
  * - New files: copied
@@ -157,6 +183,32 @@ function install() {
157
183
  fs.mkdirSync(targetBase, { recursive: true });
158
184
  }
159
185
 
186
+ // Ensure gitignore entries for package-installed files
187
+ const gitignorePath = path.join(targetBase, '.gitignore');
188
+ const gitignoreEntries = [
189
+ 'commands/implement-epic-with-subagents.md',
190
+ 'commands/plan-parallelization.md',
191
+ 'commands/git-local-cleanup-push-pr.md',
192
+ 'commands/github-pr-resolve.md',
193
+ 'commands/dev-story-backend.md',
194
+ 'commands/dev-story-fullstack.md',
195
+ 'commands/dev-story-ui.md',
196
+ 'agents/principal-code-reviewer.md',
197
+ 'agents/story-prep-master.md',
198
+ 'agents/desk-check-gate.md',
199
+ 'skills/agent-creator/',
200
+ 'skills/designer-founder/',
201
+ '*.backup',
202
+ ];
203
+ const addedCount = ensureGitignoreEntries(
204
+ gitignorePath,
205
+ gitignoreEntries,
206
+ 'Installed by @torka/claude-workflows'
207
+ );
208
+ if (addedCount > 0) {
209
+ log(` Updated .claude/.gitignore (added ${addedCount} entries)`, 'green');
210
+ }
211
+
160
212
  const stats = {
161
213
  copied: [],
162
214
  updated: [],
@@ -189,6 +241,40 @@ function install() {
189
241
  }
190
242
  }
191
243
 
244
+ // Ensure gitignore entries for BMAD workflow
245
+ const bmadDir = path.join(targetBase, '../_bmad');
246
+ if (fs.existsSync(bmadDir)) {
247
+ const bmadGitignorePath = path.join(bmadDir, '.gitignore');
248
+ const bmadEntries = [
249
+ 'bmm/workflows/4-implementation/implement-epic-with-subagents/',
250
+ ];
251
+ const bmadAdded = ensureGitignoreEntries(
252
+ bmadGitignorePath,
253
+ bmadEntries,
254
+ 'Installed by @torka/claude-workflows'
255
+ );
256
+ if (bmadAdded > 0) {
257
+ log(` Updated _bmad/.gitignore (added ${bmadAdded} entries)`, 'green');
258
+ }
259
+ }
260
+
261
+ // Ensure gitignore entries for BMAD output
262
+ const bmadOutputDir = path.join(targetBase, '../_bmad-output');
263
+ if (fs.existsSync(bmadOutputDir)) {
264
+ const bmadOutputGitignorePath = path.join(bmadOutputDir, '.gitignore');
265
+ const bmadOutputEntries = [
266
+ 'epic-executions/',
267
+ ];
268
+ const outputAdded = ensureGitignoreEntries(
269
+ bmadOutputGitignorePath,
270
+ bmadOutputEntries,
271
+ 'Runtime output from @torka/claude-workflows'
272
+ );
273
+ if (outputAdded > 0) {
274
+ log(` Updated _bmad-output/.gitignore (added ${outputAdded} entries)`, 'green');
275
+ }
276
+ }
277
+
192
278
  // Summary
193
279
  log('\n' + colors.bold + '📊 Installation Summary' + colors.reset);
194
280
  log(` Files copied (new): ${stats.copied.length}`, 'green');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torka/claude-workflows",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Claude Code workflow helpers: epic automation, git cleanup, agents, and design workflows",
5
5
  "keywords": [
6
6
  "claude-code",
package/uninstall.js CHANGED
@@ -38,7 +38,8 @@ const INSTALLED_FILES = {
38
38
  commands: [
39
39
  'implement-epic-with-subagents.md',
40
40
  'plan-parallelization.md',
41
- 'git-cleanup-and-merge.md',
41
+ 'git-local-cleanup-push-pr.md',
42
+ 'github-pr-resolve.md',
42
43
  'dev-story-backend.md',
43
44
  'dev-story-fullstack.md',
44
45
  'dev-story-ui.md',