claude-autopm 2.8.1 ā 2.8.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.
- package/README.md +116 -8
- package/bin/autopm.js +2 -0
- package/bin/commands/plugin.js +395 -0
- package/bin/commands/team.js +184 -10
- package/install/install.js +223 -4
- package/lib/plugins/PluginManager.js +1328 -0
- package/lib/plugins/PluginManager.old.js +400 -0
- package/package.json +4 -1
- package/scripts/publish-plugins.sh +166 -0
- package/autopm/.claude/agents/cloud/README.md +0 -55
- package/autopm/.claude/agents/cloud/aws-cloud-architect.md +0 -521
- package/autopm/.claude/agents/cloud/azure-cloud-architect.md +0 -436
- package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +0 -385
- package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +0 -306
- package/autopm/.claude/agents/cloud/gemini-api-expert.md +0 -880
- package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +0 -566
- package/autopm/.claude/agents/cloud/openai-python-expert.md +0 -1087
- package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +0 -454
- package/autopm/.claude/agents/core/agent-manager.md +0 -296
- package/autopm/.claude/agents/core/code-analyzer.md +0 -131
- package/autopm/.claude/agents/core/file-analyzer.md +0 -162
- package/autopm/.claude/agents/core/test-runner.md +0 -200
- package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
- package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
- package/autopm/.claude/agents/data/langgraph-workflow-expert.md +0 -520
- package/autopm/.claude/agents/databases/README.md +0 -50
- package/autopm/.claude/agents/databases/bigquery-expert.md +0 -392
- package/autopm/.claude/agents/databases/cosmosdb-expert.md +0 -368
- package/autopm/.claude/agents/databases/mongodb-expert.md +0 -398
- package/autopm/.claude/agents/databases/postgresql-expert.md +0 -321
- package/autopm/.claude/agents/databases/redis-expert.md +0 -52
- package/autopm/.claude/agents/devops/README.md +0 -52
- package/autopm/.claude/agents/devops/azure-devops-specialist.md +0 -308
- package/autopm/.claude/agents/devops/docker-containerization-expert.md +0 -298
- package/autopm/.claude/agents/devops/github-operations-specialist.md +0 -335
- package/autopm/.claude/agents/devops/mcp-context-manager.md +0 -319
- package/autopm/.claude/agents/devops/observability-engineer.md +0 -574
- package/autopm/.claude/agents/devops/ssh-operations-expert.md +0 -1093
- package/autopm/.claude/agents/devops/traefik-proxy-expert.md +0 -444
- package/autopm/.claude/agents/frameworks/README.md +0 -64
- package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +0 -360
- package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +0 -254
- package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +0 -217
- package/autopm/.claude/agents/frameworks/react-ui-expert.md +0 -226
- package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +0 -770
- package/autopm/.claude/agents/frameworks/ux-design-expert.md +0 -244
- package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
- package/autopm/.claude/agents/languages/README.md +0 -50
- package/autopm/.claude/agents/languages/bash-scripting-expert.md +0 -541
- package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +0 -197
- package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +0 -226
- package/autopm/.claude/agents/languages/python-backend-engineer.md +0 -214
- package/autopm/.claude/agents/languages/python-backend-expert.md +0 -289
- package/autopm/.claude/agents/testing/frontend-testing-engineer.md +0 -395
- package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
- package/autopm/.claude/commands/ai/openai-chat.md +0 -65
- package/autopm/.claude/commands/azure/COMMANDS.md +0 -107
- package/autopm/.claude/commands/azure/COMMAND_MAPPING.md +0 -252
- package/autopm/.claude/commands/azure/INTEGRATION_FIX.md +0 -103
- package/autopm/.claude/commands/azure/README.md +0 -246
- package/autopm/.claude/commands/azure/active-work.md +0 -198
- package/autopm/.claude/commands/azure/aliases.md +0 -143
- package/autopm/.claude/commands/azure/blocked-items.md +0 -287
- package/autopm/.claude/commands/azure/clean.md +0 -93
- package/autopm/.claude/commands/azure/docs-query.md +0 -48
- package/autopm/.claude/commands/azure/feature-decompose.md +0 -380
- package/autopm/.claude/commands/azure/feature-list.md +0 -61
- package/autopm/.claude/commands/azure/feature-new.md +0 -115
- package/autopm/.claude/commands/azure/feature-show.md +0 -205
- package/autopm/.claude/commands/azure/feature-start.md +0 -130
- package/autopm/.claude/commands/azure/fix-integration-example.md +0 -93
- package/autopm/.claude/commands/azure/help.md +0 -150
- package/autopm/.claude/commands/azure/import-us.md +0 -269
- package/autopm/.claude/commands/azure/init.md +0 -211
- package/autopm/.claude/commands/azure/next-task.md +0 -262
- package/autopm/.claude/commands/azure/search.md +0 -160
- package/autopm/.claude/commands/azure/sprint-status.md +0 -235
- package/autopm/.claude/commands/azure/standup.md +0 -260
- package/autopm/.claude/commands/azure/sync-all.md +0 -99
- package/autopm/.claude/commands/azure/task-analyze.md +0 -186
- package/autopm/.claude/commands/azure/task-close.md +0 -329
- package/autopm/.claude/commands/azure/task-edit.md +0 -145
- package/autopm/.claude/commands/azure/task-list.md +0 -263
- package/autopm/.claude/commands/azure/task-new.md +0 -84
- package/autopm/.claude/commands/azure/task-reopen.md +0 -79
- package/autopm/.claude/commands/azure/task-show.md +0 -126
- package/autopm/.claude/commands/azure/task-start.md +0 -301
- package/autopm/.claude/commands/azure/task-status.md +0 -65
- package/autopm/.claude/commands/azure/task-sync.md +0 -67
- package/autopm/.claude/commands/azure/us-edit.md +0 -164
- package/autopm/.claude/commands/azure/us-list.md +0 -202
- package/autopm/.claude/commands/azure/us-new.md +0 -265
- package/autopm/.claude/commands/azure/us-parse.md +0 -253
- package/autopm/.claude/commands/azure/us-show.md +0 -188
- package/autopm/.claude/commands/azure/us-status.md +0 -320
- package/autopm/.claude/commands/azure/validate.md +0 -86
- package/autopm/.claude/commands/azure/work-item-sync.md +0 -47
- package/autopm/.claude/commands/cloud/infra-deploy.md +0 -38
- package/autopm/.claude/commands/github/workflow-create.md +0 -42
- package/autopm/.claude/commands/infrastructure/ssh-security.md +0 -65
- package/autopm/.claude/commands/infrastructure/traefik-setup.md +0 -65
- package/autopm/.claude/commands/kubernetes/deploy.md +0 -37
- package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
- package/autopm/.claude/commands/pm/blocked.md +0 -28
- package/autopm/.claude/commands/pm/clean.md +0 -119
- package/autopm/.claude/commands/pm/context-create.md +0 -136
- package/autopm/.claude/commands/pm/context-prime.md +0 -170
- package/autopm/.claude/commands/pm/context-update.md +0 -292
- package/autopm/.claude/commands/pm/context.md +0 -28
- package/autopm/.claude/commands/pm/epic-close.md +0 -86
- package/autopm/.claude/commands/pm/epic-decompose.md +0 -370
- package/autopm/.claude/commands/pm/epic-edit.md +0 -83
- package/autopm/.claude/commands/pm/epic-list.md +0 -30
- package/autopm/.claude/commands/pm/epic-merge.md +0 -222
- package/autopm/.claude/commands/pm/epic-oneshot.md +0 -119
- package/autopm/.claude/commands/pm/epic-refresh.md +0 -119
- package/autopm/.claude/commands/pm/epic-show.md +0 -28
- package/autopm/.claude/commands/pm/epic-split.md +0 -120
- package/autopm/.claude/commands/pm/epic-start.md +0 -195
- package/autopm/.claude/commands/pm/epic-status.md +0 -28
- package/autopm/.claude/commands/pm/epic-sync-modular.md +0 -338
- package/autopm/.claude/commands/pm/epic-sync-original.md +0 -473
- package/autopm/.claude/commands/pm/epic-sync.md +0 -486
- package/autopm/.claude/commands/pm/help.md +0 -28
- package/autopm/.claude/commands/pm/import.md +0 -115
- package/autopm/.claude/commands/pm/in-progress.md +0 -28
- package/autopm/.claude/commands/pm/init.md +0 -28
- package/autopm/.claude/commands/pm/issue-analyze.md +0 -202
- package/autopm/.claude/commands/pm/issue-close.md +0 -119
- package/autopm/.claude/commands/pm/issue-edit.md +0 -93
- package/autopm/.claude/commands/pm/issue-reopen.md +0 -87
- package/autopm/.claude/commands/pm/issue-show.md +0 -41
- package/autopm/.claude/commands/pm/issue-start.md +0 -234
- package/autopm/.claude/commands/pm/issue-status.md +0 -95
- package/autopm/.claude/commands/pm/issue-sync.md +0 -411
- package/autopm/.claude/commands/pm/next.md +0 -28
- package/autopm/.claude/commands/pm/prd-edit.md +0 -82
- package/autopm/.claude/commands/pm/prd-list.md +0 -28
- package/autopm/.claude/commands/pm/prd-new.md +0 -55
- package/autopm/.claude/commands/pm/prd-parse.md +0 -42
- package/autopm/.claude/commands/pm/prd-status.md +0 -28
- package/autopm/.claude/commands/pm/search.md +0 -28
- package/autopm/.claude/commands/pm/standup.md +0 -28
- package/autopm/.claude/commands/pm/status.md +0 -28
- package/autopm/.claude/commands/pm/sync.md +0 -99
- package/autopm/.claude/commands/pm/test-reference-update.md +0 -151
- package/autopm/.claude/commands/pm/validate.md +0 -28
- package/autopm/.claude/commands/pm/what-next.md +0 -28
- package/autopm/.claude/commands/python/api-scaffold.md +0 -50
- package/autopm/.claude/commands/python/docs-query.md +0 -48
- package/autopm/.claude/commands/react/app-scaffold.md +0 -50
- package/autopm/.claude/commands/testing/prime.md +0 -314
- package/autopm/.claude/commands/testing/run.md +0 -125
- package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
- package/autopm/.claude/commands/ui/tailwind-system.md +0 -64
- package/autopm/.claude/rules/ai-integration-patterns.md +0 -219
- package/autopm/.claude/rules/ci-cd-kubernetes-strategy.md +0 -25
- package/autopm/.claude/rules/database-management-strategy.md +0 -17
- package/autopm/.claude/rules/database-pipeline.md +0 -94
- package/autopm/.claude/rules/devops-troubleshooting-playbook.md +0 -450
- package/autopm/.claude/rules/docker-first-development.md +0 -404
- package/autopm/.claude/rules/infrastructure-pipeline.md +0 -128
- package/autopm/.claude/rules/performance-guidelines.md +0 -403
- package/autopm/.claude/rules/ui-development-standards.md +0 -281
- package/autopm/.claude/rules/ui-framework-rules.md +0 -151
- package/autopm/.claude/rules/ux-design-rules.md +0 -209
- package/autopm/.claude/rules/visual-testing.md +0 -223
- package/autopm/.claude/scripts/azure/README.md +0 -192
- package/autopm/.claude/scripts/azure/active-work.js +0 -524
- package/autopm/.claude/scripts/azure/active-work.sh +0 -20
- package/autopm/.claude/scripts/azure/blocked.js +0 -520
- package/autopm/.claude/scripts/azure/blocked.sh +0 -20
- package/autopm/.claude/scripts/azure/daily.js +0 -533
- package/autopm/.claude/scripts/azure/daily.sh +0 -20
- package/autopm/.claude/scripts/azure/dashboard.js +0 -970
- package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-list.js +0 -254
- package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-show.js +0 -7
- package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-status.js +0 -604
- package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
- package/autopm/.claude/scripts/azure/help.js +0 -342
- package/autopm/.claude/scripts/azure/help.sh +0 -20
- package/autopm/.claude/scripts/azure/next-task.js +0 -508
- package/autopm/.claude/scripts/azure/next-task.sh +0 -20
- package/autopm/.claude/scripts/azure/search.js +0 -469
- package/autopm/.claude/scripts/azure/search.sh +0 -20
- package/autopm/.claude/scripts/azure/setup.js +0 -745
- package/autopm/.claude/scripts/azure/setup.sh +0 -20
- package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
- package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
- package/autopm/.claude/scripts/azure/sync.js +0 -563
- package/autopm/.claude/scripts/azure/sync.sh +0 -20
- package/autopm/.claude/scripts/azure/us-list.js +0 -210
- package/autopm/.claude/scripts/azure/us-list.sh +0 -20
- package/autopm/.claude/scripts/azure/us-status.js +0 -238
- package/autopm/.claude/scripts/azure/us-status.sh +0 -20
- package/autopm/.claude/scripts/azure/validate.js +0 -626
- package/autopm/.claude/scripts/azure/validate.sh +0 -20
- package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
- package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
- package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
- package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
- package/autopm/.claude/scripts/pm/analytics.js +0 -425
- package/autopm/.claude/scripts/pm/blocked.js +0 -164
- package/autopm/.claude/scripts/pm/blocked.sh +0 -78
- package/autopm/.claude/scripts/pm/clean.js +0 -464
- package/autopm/.claude/scripts/pm/context-create.js +0 -216
- package/autopm/.claude/scripts/pm/context-prime.js +0 -335
- package/autopm/.claude/scripts/pm/context-update.js +0 -344
- package/autopm/.claude/scripts/pm/context.js +0 -338
- package/autopm/.claude/scripts/pm/epic-close.js +0 -347
- package/autopm/.claude/scripts/pm/epic-edit.js +0 -382
- package/autopm/.claude/scripts/pm/epic-list.js +0 -273
- package/autopm/.claude/scripts/pm/epic-list.sh +0 -109
- package/autopm/.claude/scripts/pm/epic-show.js +0 -291
- package/autopm/.claude/scripts/pm/epic-show.sh +0 -105
- package/autopm/.claude/scripts/pm/epic-split.js +0 -522
- package/autopm/.claude/scripts/pm/epic-start/epic-start.js +0 -183
- package/autopm/.claude/scripts/pm/epic-start/epic-start.sh +0 -94
- package/autopm/.claude/scripts/pm/epic-status.js +0 -291
- package/autopm/.claude/scripts/pm/epic-status.sh +0 -104
- package/autopm/.claude/scripts/pm/epic-sync/README.md +0 -208
- package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +0 -77
- package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +0 -86
- package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +0 -79
- package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +0 -89
- package/autopm/.claude/scripts/pm/epic-sync.sh +0 -137
- package/autopm/.claude/scripts/pm/help.js +0 -92
- package/autopm/.claude/scripts/pm/help.sh +0 -90
- package/autopm/.claude/scripts/pm/in-progress.js +0 -178
- package/autopm/.claude/scripts/pm/in-progress.sh +0 -93
- package/autopm/.claude/scripts/pm/init.js +0 -321
- package/autopm/.claude/scripts/pm/init.sh +0 -178
- package/autopm/.claude/scripts/pm/issue-close.js +0 -232
- package/autopm/.claude/scripts/pm/issue-edit.js +0 -310
- package/autopm/.claude/scripts/pm/issue-show.js +0 -272
- package/autopm/.claude/scripts/pm/issue-start.js +0 -181
- package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +0 -468
- package/autopm/.claude/scripts/pm/issue-sync/gather-updates.sh +0 -460
- package/autopm/.claude/scripts/pm/issue-sync/post-comment.sh +0 -330
- package/autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh +0 -348
- package/autopm/.claude/scripts/pm/issue-sync/update-frontmatter.sh +0 -387
- package/autopm/.claude/scripts/pm/lib/README.md +0 -85
- package/autopm/.claude/scripts/pm/lib/epic-discovery.js +0 -119
- package/autopm/.claude/scripts/pm/lib/logger.js +0 -78
- package/autopm/.claude/scripts/pm/next.js +0 -189
- package/autopm/.claude/scripts/pm/next.sh +0 -72
- package/autopm/.claude/scripts/pm/optimize.js +0 -407
- package/autopm/.claude/scripts/pm/pr-create.js +0 -337
- package/autopm/.claude/scripts/pm/pr-list.js +0 -257
- package/autopm/.claude/scripts/pm/prd-list.js +0 -242
- package/autopm/.claude/scripts/pm/prd-list.sh +0 -103
- package/autopm/.claude/scripts/pm/prd-new.js +0 -684
- package/autopm/.claude/scripts/pm/prd-parse.js +0 -547
- package/autopm/.claude/scripts/pm/prd-status.js +0 -152
- package/autopm/.claude/scripts/pm/prd-status.sh +0 -63
- package/autopm/.claude/scripts/pm/release.js +0 -460
- package/autopm/.claude/scripts/pm/search.js +0 -192
- package/autopm/.claude/scripts/pm/search.sh +0 -89
- package/autopm/.claude/scripts/pm/standup.js +0 -362
- package/autopm/.claude/scripts/pm/standup.sh +0 -95
- package/autopm/.claude/scripts/pm/status.js +0 -148
- package/autopm/.claude/scripts/pm/status.sh +0 -59
- package/autopm/.claude/scripts/pm/sync-batch.js +0 -337
- package/autopm/.claude/scripts/pm/sync.js +0 -343
- package/autopm/.claude/scripts/pm/template-list.js +0 -141
- package/autopm/.claude/scripts/pm/template-new.js +0 -366
- package/autopm/.claude/scripts/pm/validate.js +0 -274
- package/autopm/.claude/scripts/pm/validate.sh +0 -106
- package/autopm/.claude/scripts/pm/what-next.js +0 -660
- package/bin/node/azure-feature-show.js +0 -7
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* PM Sync - Synchronize project data with remote sources
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const { execSync, spawn } = require('child_process');
|
|
9
|
-
|
|
10
|
-
class ProjectSync {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.claudeDir = '.claude';
|
|
13
|
-
this.providersDir = path.join(__dirname, '..', '..', 'providers');
|
|
14
|
-
this.syncLog = path.join(this.claudeDir, 'sync.log');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
detectProvider() {
|
|
18
|
-
// Check for Azure DevOps
|
|
19
|
-
if (fs.existsSync('.azure') || process.env.AZURE_DEVOPS_ORG) {
|
|
20
|
-
return 'azure';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Check for GitHub
|
|
24
|
-
if (fs.existsSync('.github') || fs.existsSync('.git')) {
|
|
25
|
-
try {
|
|
26
|
-
const remoteUrl = execSync('git remote get-url origin 2>/dev/null', { encoding: 'utf8' });
|
|
27
|
-
if (remoteUrl.includes('github.com')) {
|
|
28
|
-
return 'github';
|
|
29
|
-
}
|
|
30
|
-
} catch {}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return 'local';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async syncGit() {
|
|
37
|
-
console.log('\nš¦ Git Synchronization');
|
|
38
|
-
console.log(`${'ā'.repeat(40)}`);
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
// Fetch latest changes
|
|
42
|
-
console.log('š„ Fetching latest changes...');
|
|
43
|
-
execSync('git fetch --all --tags', { stdio: 'inherit' });
|
|
44
|
-
|
|
45
|
-
// Show current branch
|
|
46
|
-
const branch = execSync('git branch --show-current', { encoding: 'utf8' }).trim();
|
|
47
|
-
console.log(`\nšæ Current branch: ${branch}`);
|
|
48
|
-
|
|
49
|
-
// Show status
|
|
50
|
-
const status = execSync('git status --short', { encoding: 'utf8' });
|
|
51
|
-
if (status) {
|
|
52
|
-
console.log('\nš Local changes:');
|
|
53
|
-
console.log(status);
|
|
54
|
-
} else {
|
|
55
|
-
console.log('ā
Working directory clean');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Check if behind/ahead
|
|
59
|
-
try {
|
|
60
|
-
const behind = execSync(`git rev-list --count HEAD..origin/${branch}`, { encoding: 'utf8' }).trim();
|
|
61
|
-
const ahead = execSync(`git rev-list --count origin/${branch}..HEAD`, { encoding: 'utf8' }).trim();
|
|
62
|
-
|
|
63
|
-
if (behind !== '0') {
|
|
64
|
-
console.log(`\nā¬ļø Behind by ${behind} commit(s)`);
|
|
65
|
-
console.log(' Run: git pull');
|
|
66
|
-
}
|
|
67
|
-
if (ahead !== '0') {
|
|
68
|
-
console.log(`\nā¬ļø Ahead by ${ahead} commit(s)`);
|
|
69
|
-
console.log(' Run: git push');
|
|
70
|
-
}
|
|
71
|
-
if (behind === '0' && ahead === '0') {
|
|
72
|
-
console.log('\nā
Up to date with origin');
|
|
73
|
-
}
|
|
74
|
-
} catch {}
|
|
75
|
-
|
|
76
|
-
return true;
|
|
77
|
-
} catch (error) {
|
|
78
|
-
console.error('ā ļø Git sync failed:', error.message);
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
async syncIssues(provider) {
|
|
84
|
-
console.log('\nš« Issue Synchronization');
|
|
85
|
-
console.log(`${'ā'.repeat(40)}`);
|
|
86
|
-
|
|
87
|
-
const issueSyncScript = path.join(__dirname, 'issue-sync', 'sync.js');
|
|
88
|
-
if (fs.existsSync(issueSyncScript)) {
|
|
89
|
-
console.log(`Syncing issues with ${provider}...`);
|
|
90
|
-
|
|
91
|
-
try {
|
|
92
|
-
const sync = require(issueSyncScript);
|
|
93
|
-
if (typeof sync === 'function') {
|
|
94
|
-
await sync(provider);
|
|
95
|
-
} else if (sync.sync) {
|
|
96
|
-
await sync.sync(provider);
|
|
97
|
-
}
|
|
98
|
-
console.log('ā
Issues synchronized');
|
|
99
|
-
return true;
|
|
100
|
-
} catch (error) {
|
|
101
|
-
console.error('ā ļø Issue sync failed:', error.message);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Fallback: Try provider-specific sync
|
|
106
|
-
const providerSyncScript = path.join(this.providersDir, provider, 'sync.js');
|
|
107
|
-
if (fs.existsSync(providerSyncScript)) {
|
|
108
|
-
try {
|
|
109
|
-
require(providerSyncScript);
|
|
110
|
-
return true;
|
|
111
|
-
} catch (error) {
|
|
112
|
-
console.error('ā ļø Provider sync failed:', error.message);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
console.log('ā¹ļø No issue sync available for', provider);
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
async syncEpics() {
|
|
121
|
-
console.log('\nš Epic Synchronization');
|
|
122
|
-
console.log(`${'ā'.repeat(40)}`);
|
|
123
|
-
|
|
124
|
-
const epicSyncScript = path.join(__dirname, 'epic-sync', 'sync.js');
|
|
125
|
-
if (fs.existsSync(epicSyncScript)) {
|
|
126
|
-
console.log('Syncing epics...');
|
|
127
|
-
|
|
128
|
-
try {
|
|
129
|
-
require(epicSyncScript);
|
|
130
|
-
console.log('ā
Epics synchronized');
|
|
131
|
-
return true;
|
|
132
|
-
} catch (error) {
|
|
133
|
-
console.error('ā ļø Epic sync failed:', error.message);
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Fallback: Count local epics
|
|
139
|
-
const epicsDir = path.join(this.claudeDir, 'epics');
|
|
140
|
-
const prdsDir = path.join(this.claudeDir, 'prds');
|
|
141
|
-
let epicCount = 0;
|
|
142
|
-
|
|
143
|
-
if (fs.existsSync(epicsDir)) {
|
|
144
|
-
epicCount += fs.readdirSync(epicsDir).filter(f => f.endsWith('.md')).length;
|
|
145
|
-
}
|
|
146
|
-
if (fs.existsSync(prdsDir)) {
|
|
147
|
-
epicCount += fs.readdirSync(prdsDir).filter(f => f.endsWith('.md')).length;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
console.log(`š Local epics: ${epicCount}`);
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
async syncDependencies() {
|
|
155
|
-
console.log('\nš¦ Dependencies Check');
|
|
156
|
-
console.log(`${'ā'.repeat(40)}`);
|
|
157
|
-
|
|
158
|
-
if (fs.existsSync('package.json')) {
|
|
159
|
-
try {
|
|
160
|
-
// Check for outdated packages
|
|
161
|
-
console.log('Checking for updates...');
|
|
162
|
-
const outdated = execSync('npm outdated --json', { encoding: 'utf8' });
|
|
163
|
-
|
|
164
|
-
if (outdated) {
|
|
165
|
-
const packages = JSON.parse(outdated);
|
|
166
|
-
const count = Object.keys(packages).length;
|
|
167
|
-
|
|
168
|
-
if (count > 0) {
|
|
169
|
-
console.log(`\nā ļø ${count} package(s) outdated:`);
|
|
170
|
-
Object.entries(packages).slice(0, 5).forEach(([name, info]) => {
|
|
171
|
-
console.log(` ⢠${name}: ${info.current} ā ${info.wanted}`);
|
|
172
|
-
});
|
|
173
|
-
if (count > 5) {
|
|
174
|
-
console.log(` ... and ${count - 5} more`);
|
|
175
|
-
}
|
|
176
|
-
console.log('\n Run: npm update');
|
|
177
|
-
}
|
|
178
|
-
} else {
|
|
179
|
-
console.log('ā
All dependencies up to date');
|
|
180
|
-
}
|
|
181
|
-
} catch {
|
|
182
|
-
console.log('ā
Dependencies checked');
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
logSync(type, success, details = '') {
|
|
190
|
-
const logEntry = {
|
|
191
|
-
timestamp: new Date().toISOString(),
|
|
192
|
-
type,
|
|
193
|
-
success,
|
|
194
|
-
details
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
// Ensure directory exists
|
|
198
|
-
const dir = path.dirname(this.syncLog);
|
|
199
|
-
if (!fs.existsSync(dir)) {
|
|
200
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Append to log
|
|
204
|
-
const logLine = JSON.stringify(logEntry) + '\n';
|
|
205
|
-
fs.appendFileSync(this.syncLog, logLine);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
async syncAll(options = {}) {
|
|
209
|
-
const provider = options.provider || this.detectProvider();
|
|
210
|
-
const startTime = Date.now();
|
|
211
|
-
|
|
212
|
-
console.log(`\nš Project Synchronization`);
|
|
213
|
-
console.log(`${'ā'.repeat(50)}`);
|
|
214
|
-
console.log(`š
${new Date().toLocaleString()}`);
|
|
215
|
-
console.log(`š¦ Provider: ${provider}`);
|
|
216
|
-
|
|
217
|
-
const results = {
|
|
218
|
-
git: false,
|
|
219
|
-
issues: false,
|
|
220
|
-
epics: false,
|
|
221
|
-
dependencies: false
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
// Git sync
|
|
225
|
-
if (!options.skipGit) {
|
|
226
|
-
results.git = await this.syncGit();
|
|
227
|
-
this.logSync('git', results.git);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Issues sync
|
|
231
|
-
if (!options.skipIssues) {
|
|
232
|
-
results.issues = await this.syncIssues(provider);
|
|
233
|
-
this.logSync('issues', results.issues, provider);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// Epics sync
|
|
237
|
-
if (!options.skipEpics) {
|
|
238
|
-
results.epics = await this.syncEpics();
|
|
239
|
-
this.logSync('epics', results.epics);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// Dependencies check
|
|
243
|
-
if (!options.skipDeps) {
|
|
244
|
-
results.dependencies = await this.syncDependencies();
|
|
245
|
-
this.logSync('dependencies', results.dependencies);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// Summary
|
|
249
|
-
const elapsed = Math.round((Date.now() - startTime) / 1000);
|
|
250
|
-
console.log(`\n${'ā'.repeat(50)}`);
|
|
251
|
-
console.log('š Sync Summary:');
|
|
252
|
-
console.log(` ⢠Git: ${results.git ? 'ā
' : 'ā'}`);
|
|
253
|
-
console.log(` ⢠Issues: ${results.issues ? 'ā
' : 'ā'}`);
|
|
254
|
-
console.log(` ⢠Epics: ${results.epics ? 'ā
' : 'ā'}`);
|
|
255
|
-
console.log(` ⢠Dependencies: ${results.dependencies ? 'ā
' : 'ā'}`);
|
|
256
|
-
console.log(` ⢠Time: ${elapsed}s`);
|
|
257
|
-
|
|
258
|
-
const successCount = Object.values(results).filter(r => r).length;
|
|
259
|
-
const totalCount = Object.keys(results).length;
|
|
260
|
-
|
|
261
|
-
if (successCount === totalCount) {
|
|
262
|
-
console.log('\nā
All systems synchronized!');
|
|
263
|
-
} else if (successCount > 0) {
|
|
264
|
-
console.log(`\nā ļø Partial sync: ${successCount}/${totalCount} successful`);
|
|
265
|
-
} else {
|
|
266
|
-
console.log('\nā Sync failed');
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// Show last sync time
|
|
270
|
-
const lastSyncFile = path.join(this.claudeDir, '.last-sync');
|
|
271
|
-
fs.writeFileSync(lastSyncFile, new Date().toISOString());
|
|
272
|
-
|
|
273
|
-
console.log('\nš” Next sync: pm sync');
|
|
274
|
-
console.log('š View log: cat .claude/sync.log');
|
|
275
|
-
|
|
276
|
-
return successCount === totalCount;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
async run(args) {
|
|
280
|
-
const options = {};
|
|
281
|
-
|
|
282
|
-
// Parse arguments
|
|
283
|
-
args.forEach(arg => {
|
|
284
|
-
if (arg === '--skip-git') {
|
|
285
|
-
options.skipGit = true;
|
|
286
|
-
} else if (arg === '--skip-issues') {
|
|
287
|
-
options.skipIssues = true;
|
|
288
|
-
} else if (arg === '--skip-epics') {
|
|
289
|
-
options.skipEpics = true;
|
|
290
|
-
} else if (arg === '--skip-deps') {
|
|
291
|
-
options.skipDeps = true;
|
|
292
|
-
} else if (arg === 'git') {
|
|
293
|
-
// Sync only git
|
|
294
|
-
options.skipIssues = true;
|
|
295
|
-
options.skipEpics = true;
|
|
296
|
-
options.skipDeps = true;
|
|
297
|
-
} else if (arg === 'issues') {
|
|
298
|
-
// Sync only issues
|
|
299
|
-
options.skipGit = true;
|
|
300
|
-
options.skipEpics = true;
|
|
301
|
-
options.skipDeps = true;
|
|
302
|
-
} else if (arg === 'epics') {
|
|
303
|
-
// Sync only epics
|
|
304
|
-
options.skipGit = true;
|
|
305
|
-
options.skipIssues = true;
|
|
306
|
-
options.skipDeps = true;
|
|
307
|
-
} else if (arg.startsWith('--provider=')) {
|
|
308
|
-
options.provider = arg.split('=')[1];
|
|
309
|
-
} else if (arg === '--help') {
|
|
310
|
-
console.log('Usage: pm sync [options] [component]');
|
|
311
|
-
console.log('\nComponents:');
|
|
312
|
-
console.log(' git Sync only git repository');
|
|
313
|
-
console.log(' issues Sync only issues');
|
|
314
|
-
console.log(' epics Sync only epics');
|
|
315
|
-
console.log('\nOptions:');
|
|
316
|
-
console.log(' --skip-git Skip git synchronization');
|
|
317
|
-
console.log(' --skip-issues Skip issues synchronization');
|
|
318
|
-
console.log(' --skip-epics Skip epics synchronization');
|
|
319
|
-
console.log(' --skip-deps Skip dependencies check');
|
|
320
|
-
console.log(' --provider=NAME Use specific provider (azure|github)');
|
|
321
|
-
console.log('\nExamples:');
|
|
322
|
-
console.log(' pm sync # Sync everything');
|
|
323
|
-
console.log(' pm sync git # Sync only git');
|
|
324
|
-
console.log(' pm sync --skip-deps # Sync all except dependencies');
|
|
325
|
-
process.exit(0);
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
const success = await this.syncAll(options);
|
|
330
|
-
process.exit(success ? 0 : 1);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// Main execution
|
|
335
|
-
if (require.main === module) {
|
|
336
|
-
const sync = new ProjectSync();
|
|
337
|
-
sync.run(process.argv.slice(2)).catch(error => {
|
|
338
|
-
console.error('ā Error:', error.message);
|
|
339
|
-
process.exit(1);
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
module.exports = ProjectSync;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Template List - Show available templates
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* autopm template:list
|
|
7
|
-
* autopm template:list prd
|
|
8
|
-
* autopm template:list epic
|
|
9
|
-
* autopm template:list task
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
const path = require('path');
|
|
13
|
-
|
|
14
|
-
// Dynamically resolve template engine path
|
|
15
|
-
let TemplateEngine;
|
|
16
|
-
try {
|
|
17
|
-
// Try from project root (where lib/ is installed)
|
|
18
|
-
TemplateEngine = require(path.join(process.cwd(), 'lib', 'template-engine'));
|
|
19
|
-
} catch (err) {
|
|
20
|
-
try {
|
|
21
|
-
// Try relative path from .claude/scripts/pm/ (during development)
|
|
22
|
-
TemplateEngine = require(path.join(__dirname, '..', '..', '..', '..', 'lib', 'template-engine'));
|
|
23
|
-
} catch (err2) {
|
|
24
|
-
// Fallback: try from AutoPM global installation
|
|
25
|
-
try {
|
|
26
|
-
const { execSync } = require('child_process');
|
|
27
|
-
const fs = require('fs');
|
|
28
|
-
let npmRoot;
|
|
29
|
-
try {
|
|
30
|
-
npmRoot = execSync('npm root -g', { encoding: 'utf-8' }).trim();
|
|
31
|
-
} catch (npmErr) {
|
|
32
|
-
throw new Error('Failed to execute "npm root -g". Is npm installed and available in your PATH?');
|
|
33
|
-
}
|
|
34
|
-
if (!npmRoot || !fs.existsSync(npmRoot)) {
|
|
35
|
-
throw new Error(`The npm global root directory "${npmRoot}" does not exist or could not be determined.`);
|
|
36
|
-
}
|
|
37
|
-
const enginePath = path.join(npmRoot, 'claude-autopm', 'lib', 'template-engine');
|
|
38
|
-
if (!fs.existsSync(enginePath + '.js') && !fs.existsSync(enginePath)) {
|
|
39
|
-
throw new Error(`Cannot find template-engine module at "${enginePath}". Please ensure claude-autopm is installed globally.`);
|
|
40
|
-
}
|
|
41
|
-
TemplateEngine = require(enginePath);
|
|
42
|
-
} catch (err3) {
|
|
43
|
-
throw new Error('Cannot find template-engine module. Please ensure lib/ directory is installed.\n' + (err3 && err3.message ? err3.message : ''));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
class TemplateLister {
|
|
49
|
-
constructor() {
|
|
50
|
-
this.templateEngine = new TemplateEngine();
|
|
51
|
-
this.descriptions = {
|
|
52
|
-
// PRD templates
|
|
53
|
-
'api-feature': 'REST/GraphQL API development',
|
|
54
|
-
'ui-feature': 'Frontend component/page',
|
|
55
|
-
'bug-fix': 'Bug resolution workflow',
|
|
56
|
-
'data-migration': 'Database schema changes',
|
|
57
|
-
'documentation': 'Documentation updates',
|
|
58
|
-
|
|
59
|
-
// Epic templates (future)
|
|
60
|
-
'sprint': 'Sprint planning',
|
|
61
|
-
'release': 'Release epic',
|
|
62
|
-
|
|
63
|
-
// Task templates (future)
|
|
64
|
-
'development': 'Development task',
|
|
65
|
-
'testing': 'Testing task'
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
list(type = null) {
|
|
70
|
-
const types = type ? [type] : ['prds', 'epics', 'tasks'];
|
|
71
|
-
|
|
72
|
-
console.log('\nš Available Templates\n');
|
|
73
|
-
console.log('ā'.repeat(60));
|
|
74
|
-
|
|
75
|
-
for (const templateType of types) {
|
|
76
|
-
const templates = this.templateEngine.listTemplates(templateType);
|
|
77
|
-
|
|
78
|
-
if (templates.length === 0) {
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const typeName = templateType.charAt(0).toUpperCase() + templateType.slice(1);
|
|
83
|
-
console.log(`\n${typeName} Templates:`);
|
|
84
|
-
|
|
85
|
-
const builtIn = templates.filter(t => !t.custom);
|
|
86
|
-
const custom = templates.filter(t => t.custom);
|
|
87
|
-
|
|
88
|
-
if (builtIn.length > 0) {
|
|
89
|
-
console.log('\nBuilt-in:');
|
|
90
|
-
builtIn.forEach(t => {
|
|
91
|
-
const desc = this.descriptions[t.name] || 'Template';
|
|
92
|
-
console.log(` ⢠${t.name.padEnd(20)} - ${desc}`);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (custom.length > 0) {
|
|
97
|
-
console.log('\nCustom:');
|
|
98
|
-
custom.forEach(t => {
|
|
99
|
-
console.log(` ⢠${t.name.padEnd(20)} - [Custom Template]`);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
console.log('\n' + 'ā'.repeat(60));
|
|
105
|
-
console.log('\nUsage:');
|
|
106
|
-
console.log(' autopm prd:new --template <name> "<title>"');
|
|
107
|
-
console.log(' autopm prd:new -t api-feature "User Authentication API"');
|
|
108
|
-
console.log('\nCreate custom template:');
|
|
109
|
-
console.log(' autopm template:new prd my-custom-template\n');
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
run(args) {
|
|
113
|
-
const type = args[0]; // Optional: 'prd', 'epic', 'task'
|
|
114
|
-
const validTypes = ['prd', 'prds', 'epic', 'epics', 'task', 'tasks'];
|
|
115
|
-
|
|
116
|
-
if (type && !validTypes.includes(type)) {
|
|
117
|
-
console.error(`ā Invalid type: ${type}`);
|
|
118
|
-
console.log('Valid types: prd, epic, task');
|
|
119
|
-
process.exit(1);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Normalize type
|
|
123
|
-
let normalizedType = null;
|
|
124
|
-
if (type) {
|
|
125
|
-
if (type === 'prd') normalizedType = 'prds';
|
|
126
|
-
else if (type === 'epic') normalizedType = 'epics';
|
|
127
|
-
else if (type === 'task') normalizedType = 'tasks';
|
|
128
|
-
else normalizedType = type;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
this.list(normalizedType);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Main execution
|
|
136
|
-
if (require.main === module) {
|
|
137
|
-
const lister = new TemplateLister();
|
|
138
|
-
lister.run(process.argv.slice(2));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
module.exports = TemplateLister;
|