claude-autopm 1.18.0 → 1.20.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.
Files changed (75) hide show
  1. package/README.md +159 -0
  2. package/autopm/.claude/agents/core/mcp-manager.md +1 -1
  3. package/autopm/.claude/commands/pm/context.md +11 -0
  4. package/autopm/.claude/commands/pm/epic-decompose.md +25 -2
  5. package/autopm/.claude/commands/pm/epic-oneshot.md +13 -0
  6. package/autopm/.claude/commands/pm/epic-start.md +19 -0
  7. package/autopm/.claude/commands/pm/epic-sync-modular.md +10 -10
  8. package/autopm/.claude/commands/pm/epic-sync.md +14 -14
  9. package/autopm/.claude/commands/pm/issue-start.md +50 -5
  10. package/autopm/.claude/commands/pm/issue-sync.md +15 -15
  11. package/autopm/.claude/commands/pm/what-next.md +11 -0
  12. package/autopm/.claude/mcp/MCP-REGISTRY.md +1 -1
  13. package/autopm/.claude/scripts/azure/active-work.js +2 -2
  14. package/autopm/.claude/scripts/azure/blocked.js +13 -13
  15. package/autopm/.claude/scripts/azure/daily.js +1 -1
  16. package/autopm/.claude/scripts/azure/dashboard.js +1 -1
  17. package/autopm/.claude/scripts/azure/feature-list.js +2 -2
  18. package/autopm/.claude/scripts/azure/feature-status.js +1 -1
  19. package/autopm/.claude/scripts/azure/next-task.js +1 -1
  20. package/autopm/.claude/scripts/azure/search.js +1 -1
  21. package/autopm/.claude/scripts/azure/setup.js +15 -15
  22. package/autopm/.claude/scripts/azure/sprint-report.js +2 -2
  23. package/autopm/.claude/scripts/azure/sync.js +1 -1
  24. package/autopm/.claude/scripts/azure/us-list.js +1 -1
  25. package/autopm/.claude/scripts/azure/us-status.js +1 -1
  26. package/autopm/.claude/scripts/azure/validate.js +13 -13
  27. package/autopm/.claude/scripts/lib/frontmatter-utils.sh +42 -7
  28. package/autopm/.claude/scripts/lib/logging-utils.sh +20 -16
  29. package/autopm/.claude/scripts/lib/validation-utils.sh +1 -1
  30. package/autopm/.claude/scripts/pm/context.js +338 -0
  31. package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +3 -3
  32. package/autopm/.claude/scripts/pm/lib/README.md +85 -0
  33. package/autopm/.claude/scripts/pm/lib/logger.js +78 -0
  34. package/autopm/.claude/scripts/pm/next.js +25 -1
  35. package/autopm/.claude/scripts/pm/what-next.js +660 -0
  36. package/bin/autopm.js +25 -0
  37. package/package.json +1 -1
  38. package/lib/agentExecutor.js.deprecated +0 -101
  39. package/lib/azure/cache.js +0 -80
  40. package/lib/azure/client.js +0 -77
  41. package/lib/azure/formatter.js +0 -177
  42. package/lib/commandHelpers.js +0 -177
  43. package/lib/context/manager.js +0 -290
  44. package/lib/documentation/manager.js +0 -528
  45. package/lib/github/workflow-manager.js +0 -546
  46. package/lib/helpers/azure-batch-api.js +0 -133
  47. package/lib/helpers/azure-cache-manager.js +0 -287
  48. package/lib/helpers/azure-parallel-processor.js +0 -158
  49. package/lib/helpers/azure-work-item-create.js +0 -278
  50. package/lib/helpers/gh-issue-create.js +0 -250
  51. package/lib/helpers/interactive-prompt.js +0 -336
  52. package/lib/helpers/output-manager.js +0 -335
  53. package/lib/helpers/progress-indicator.js +0 -258
  54. package/lib/performance/benchmarker.js +0 -429
  55. package/lib/pm/epic-decomposer.js +0 -273
  56. package/lib/pm/epic-syncer.js +0 -221
  57. package/lib/prdMetadata.js +0 -270
  58. package/lib/providers/azure/index.js +0 -234
  59. package/lib/providers/factory.js +0 -87
  60. package/lib/providers/github/index.js +0 -204
  61. package/lib/providers/interface.js +0 -73
  62. package/lib/python/scaffold-manager.js +0 -576
  63. package/lib/react/scaffold-manager.js +0 -745
  64. package/lib/regression/analyzer.js +0 -578
  65. package/lib/release/manager.js +0 -324
  66. package/lib/tailwind/manager.js +0 -486
  67. package/lib/traefik/manager.js +0 -484
  68. package/lib/utils/colors.js +0 -126
  69. package/lib/utils/config.js +0 -317
  70. package/lib/utils/filesystem.js +0 -316
  71. package/lib/utils/logger.js +0 -135
  72. package/lib/utils/prompts.js +0 -294
  73. package/lib/utils/shell.js +0 -237
  74. package/lib/validators/email-validator.js +0 -337
  75. package/lib/workflow/manager.js +0 -449
@@ -1,324 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { execSync } = require('child_process');
4
-
5
- class ReleaseManager {
6
- constructor(options = {}) {
7
- this.projectPath = options.projectPath || process.cwd();
8
- this.dryRun = options.dryRun || false;
9
- this.verbose = options.verbose || false;
10
- }
11
-
12
- async validateStructure() {
13
- const errors = [];
14
- const requiredFiles = [
15
- 'package.json',
16
- 'README.md',
17
- 'CHANGELOG.md',
18
- '.claude/base.md'
19
- ];
20
-
21
- for (const file of requiredFiles) {
22
- const filePath = path.join(this.projectPath, file);
23
- if (!fs.existsSync(filePath)) {
24
- errors.push(`Missing required file: ${file}`);
25
- }
26
- }
27
-
28
- return {
29
- valid: errors.length === 0,
30
- errors
31
- };
32
- }
33
-
34
- async checkTests() {
35
- try {
36
- if (this.dryRun) {
37
- return { passed: true, failed: 0, total: 100 };
38
- }
39
-
40
- const output = execSync('npm test', {
41
- cwd: this.projectPath,
42
- encoding: 'utf8',
43
- stdio: 'pipe'
44
- });
45
-
46
- const passed = !output.includes('FAILED');
47
- const failMatch = output.match(/Failed: (\d+)/);
48
- const totalMatch = output.match(/Total: (\d+)/);
49
-
50
- return {
51
- passed,
52
- failed: failMatch ? parseInt(failMatch[1]) : 0,
53
- total: totalMatch ? parseInt(totalMatch[1]) : 0
54
- };
55
- } catch (error) {
56
- return {
57
- passed: false,
58
- failed: 1,
59
- total: 1,
60
- error: error.message
61
- };
62
- }
63
- }
64
-
65
- async bumpVersion(type = 'patch') {
66
- const packageJsonPath = path.join(this.projectPath, 'package.json');
67
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
68
-
69
- const [major, minor, patch] = packageJson.version.split('.').map(Number);
70
-
71
- let newVersion;
72
- switch (type) {
73
- case 'major':
74
- newVersion = `${major + 1}.0.0`;
75
- break;
76
- case 'minor':
77
- newVersion = `${major}.${minor + 1}.0`;
78
- break;
79
- case 'patch':
80
- default:
81
- newVersion = `${major}.${minor}.${patch + 1}`;
82
- }
83
-
84
- packageJson.version = newVersion;
85
-
86
- if (!this.dryRun) {
87
- fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
88
- }
89
-
90
- return newVersion;
91
- }
92
-
93
- async validateGitStatus() {
94
- try {
95
- const status = execSync('git status --porcelain', {
96
- cwd: this.projectPath,
97
- encoding: 'utf8'
98
- });
99
-
100
- const branch = execSync('git branch --show-current', {
101
- cwd: this.projectPath,
102
- encoding: 'utf8'
103
- }).trim();
104
-
105
- return {
106
- clean: status.trim() === '',
107
- branch,
108
- changes: status.split('\n').filter(line => line.trim())
109
- };
110
- } catch (error) {
111
- return {
112
- clean: false,
113
- branch: 'unknown',
114
- error: error.message
115
- };
116
- }
117
- }
118
-
119
- async ensureMainBranch() {
120
- const { branch } = await this.validateGitStatus();
121
- return branch === 'main' || branch === 'master';
122
- }
123
-
124
- async getCurrentBranch() {
125
- try {
126
- return execSync('git branch --show-current', {
127
- cwd: this.projectPath,
128
- encoding: 'utf8'
129
- }).trim();
130
- } catch {
131
- return 'unknown';
132
- }
133
- }
134
-
135
- async checkBreakingChanges() {
136
- const changelogPath = path.join(this.projectPath, 'CHANGELOG.md');
137
-
138
- if (!fs.existsSync(changelogPath)) {
139
- return { hasBreaking: false, changes: [] };
140
- }
141
-
142
- const changelog = fs.readFileSync(changelogPath, 'utf8');
143
- const breakingSection = changelog.match(/###?\s*Breaking Changes?\s*\n([\s\S]*?)(?=\n###?|\n##|$)/i);
144
-
145
- if (breakingSection && breakingSection[1].trim()) {
146
- const changes = breakingSection[1]
147
- .split('\n')
148
- .filter(line => line.trim().startsWith('-'))
149
- .map(line => line.trim().substring(1).trim());
150
-
151
- return {
152
- hasBreaking: changes.length > 0,
153
- changes
154
- };
155
- }
156
-
157
- return { hasBreaking: false, changes: [] };
158
- }
159
-
160
- async createTag(version, message) {
161
- const tag = `v${version}`;
162
-
163
- try {
164
- if (!this.dryRun) {
165
- execSync(`git tag -a ${tag} -m "${message}"`, {
166
- cwd: this.projectPath,
167
- encoding: 'utf8'
168
- });
169
- }
170
-
171
- return {
172
- success: true,
173
- tag
174
- };
175
- } catch (error) {
176
- return {
177
- success: false,
178
- error: error.message
179
- };
180
- }
181
- }
182
-
183
- async createGitTag(version, message) {
184
- return this.createTag(version, message);
185
- }
186
-
187
- async push() {
188
- try {
189
- if (!this.dryRun) {
190
- execSync('git push && git push --tags', {
191
- cwd: this.projectPath,
192
- encoding: 'utf8'
193
- });
194
- }
195
-
196
- return { success: true };
197
- } catch (error) {
198
- return {
199
- success: false,
200
- error: error.message
201
- };
202
- }
203
- }
204
-
205
- async pushToRemote() {
206
- return this.push();
207
- }
208
-
209
- async publish() {
210
- try {
211
- const packageJson = JSON.parse(
212
- fs.readFileSync(path.join(this.projectPath, 'package.json'), 'utf8')
213
- );
214
-
215
- if (!this.dryRun) {
216
- execSync('npm publish', {
217
- cwd: this.projectPath,
218
- encoding: 'utf8'
219
- });
220
- }
221
-
222
- return {
223
- success: true,
224
- version: packageJson.version
225
- };
226
- } catch (error) {
227
- return {
228
- success: false,
229
- error: error.message
230
- };
231
- }
232
- }
233
-
234
- async publishToNpm() {
235
- return this.publish();
236
- }
237
-
238
- async generateChangelog(version, changes) {
239
- const changelogPath = path.join(this.projectPath, 'CHANGELOG.md');
240
- let changelog = '';
241
-
242
- if (fs.existsSync(changelogPath)) {
243
- changelog = fs.readFileSync(changelogPath, 'utf8');
244
- }
245
-
246
- const date = new Date().toISOString().split('T')[0];
247
- const newEntry = `## [${version}] - ${date}\n${changes}\n\n`;
248
-
249
- const updatedChangelog = changelog.replace(
250
- /^(#.*?\n+)/,
251
- `$1\n${newEntry}`
252
- );
253
-
254
- if (!this.dryRun) {
255
- fs.writeFileSync(changelogPath, updatedChangelog);
256
- }
257
-
258
- return { success: true };
259
- }
260
-
261
- async executeRelease(options = {}) {
262
- const steps = [];
263
-
264
- // Validate structure
265
- const structureCheck = await this.validateStructure();
266
- steps.push({ step: 'structure', ...structureCheck });
267
- if (!structureCheck.valid) {
268
- return { success: false, steps, error: 'Invalid project structure' };
269
- }
270
-
271
- // Check tests
272
- const testCheck = await this.checkTests();
273
- steps.push({ step: 'tests', ...testCheck });
274
- if (!testCheck.passed) {
275
- return { success: false, steps, error: 'Tests failed' };
276
- }
277
-
278
- // Check git status
279
- const gitStatus = await this.validateGitStatus();
280
- steps.push({ step: 'git-status', ...gitStatus });
281
- if (!gitStatus.clean) {
282
- return { success: false, steps, error: 'Git working directory not clean' };
283
- }
284
-
285
- // Check branch
286
- const onMain = await this.ensureMainBranch();
287
- steps.push({ step: 'branch-check', onMain });
288
- if (!onMain) {
289
- return { success: false, steps, error: 'Not on main branch' };
290
- }
291
-
292
- // Bump version
293
- const newVersion = await this.bumpVersion(options.versionType || 'patch');
294
- steps.push({ step: 'version-bump', version: newVersion });
295
-
296
- // Generate changelog
297
- if (options.changelog) {
298
- await this.generateChangelog(newVersion, options.changelog);
299
- steps.push({ step: 'changelog', success: true });
300
- }
301
-
302
- // Create tag
303
- const tagResult = await this.createTag(newVersion, `Release v${newVersion}`);
304
- steps.push({ step: 'tag', ...tagResult });
305
-
306
- // Push to remote
307
- const pushResult = await this.push();
308
- steps.push({ step: 'push', ...pushResult });
309
-
310
- // Publish to npm
311
- if (!options.skipNpm) {
312
- const publishResult = await this.publish();
313
- steps.push({ step: 'npm-publish', ...publishResult });
314
- }
315
-
316
- return {
317
- success: true,
318
- version: newVersion,
319
- steps
320
- };
321
- }
322
- }
323
-
324
- module.exports = ReleaseManager;