myconvergio 2.1.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 (85) hide show
  1. package/.claude/agents/business_operations/andrea-customer-success-manager.md +175 -0
  2. package/.claude/agents/business_operations/anna-executive-assistant.md +268 -0
  3. package/.claude/agents/business_operations/dave-change-management-specialist.md +200 -0
  4. package/.claude/agents/business_operations/davide-project-manager.md +203 -0
  5. package/.claude/agents/business_operations/enrico-business-process-engineer.md +180 -0
  6. package/.claude/agents/business_operations/fabio-sales-business-development.md +175 -0
  7. package/.claude/agents/business_operations/luke-program-manager.md +105 -0
  8. package/.claude/agents/business_operations/marcello-pm.md +130 -0
  9. package/.claude/agents/business_operations/oliver-pm.md +134 -0
  10. package/.claude/agents/business_operations/sofia-marketing-strategist.md +175 -0
  11. package/.claude/agents/business_operations/steve-executive-communication-strategist.md +111 -0
  12. package/.claude/agents/compliance_legal/dr-enzo-healthcare-compliance-manager.md +198 -0
  13. package/.claude/agents/compliance_legal/elena-legal-compliance-expert.md +169 -0
  14. package/.claude/agents/compliance_legal/guardian-ai-security-validator.md +207 -0
  15. package/.claude/agents/compliance_legal/luca-security-expert.md +229 -0
  16. package/.claude/agents/compliance_legal/sophia-govaffairs.md +132 -0
  17. package/.claude/agents/core_utility/CONSTITUTION.md +365 -0
  18. package/.claude/agents/core_utility/CommonValuesAndPrinciples.md +296 -0
  19. package/.claude/agents/core_utility/MICROSOFT_VALUES.md +121 -0
  20. package/.claude/agents/core_utility/SECURITY_FRAMEWORK_TEMPLATE.md +137 -0
  21. package/.claude/agents/core_utility/diana-performance-dashboard.md +238 -0
  22. package/.claude/agents/core_utility/marcus-context-memory-keeper.md +218 -0
  23. package/.claude/agents/core_utility/po-prompt-optimizer.md +194 -0
  24. package/.claude/agents/core_utility/socrates-first-principles-reasoning.md +260 -0
  25. package/.claude/agents/core_utility/strategic-planner.md +292 -0
  26. package/.claude/agents/core_utility/taskmaster-strategic-task-decomposition-master.md +152 -0
  27. package/.claude/agents/core_utility/thor-quality-assurance-guardian.md +223 -0
  28. package/.claude/agents/core_utility/wanda-workflow-orchestrator.md +247 -0
  29. package/.claude/agents/core_utility/xavier-coordination-patterns.md +251 -0
  30. package/.claude/agents/design_ux/jony-creative-director.md +172 -0
  31. package/.claude/agents/design_ux/sara-ux-ui-designer.md +166 -0
  32. package/.claude/agents/design_ux/stefano-design-thinking-facilitator.md +180 -0
  33. package/.claude/agents/leadership_strategy/ali-chief-of-staff.md +594 -0
  34. package/.claude/agents/leadership_strategy/amy-cfo.md +179 -0
  35. package/.claude/agents/leadership_strategy/antonio-strategy-expert.md +217 -0
  36. package/.claude/agents/leadership_strategy/dan-engineering-gm.md +260 -0
  37. package/.claude/agents/leadership_strategy/domik-mckinsey-strategic-decision-maker.md +324 -0
  38. package/.claude/agents/leadership_strategy/matteo-strategic-business-architect.md +177 -0
  39. package/.claude/agents/leadership_strategy/satya-board-of-directors.md +222 -0
  40. package/.claude/agents/release_management/app-release-manager.md +2352 -0
  41. package/.claude/agents/release_management/feature-release-manager.md +235 -0
  42. package/.claude/agents/specialized_experts/angela-da.md +140 -0
  43. package/.claude/agents/specialized_experts/ava-analytics-insights-virtuoso.md +203 -0
  44. package/.claude/agents/specialized_experts/behice-cultural-coach.md +202 -0
  45. package/.claude/agents/specialized_experts/coach-team-coach.md +180 -0
  46. package/.claude/agents/specialized_experts/ethan-da.md +139 -0
  47. package/.claude/agents/specialized_experts/evan-ic6da.md +140 -0
  48. package/.claude/agents/specialized_experts/fiona-market-analyst.md +148 -0
  49. package/.claude/agents/specialized_experts/giulia-hr-talent-acquisition.md +175 -0
  50. package/.claude/agents/specialized_experts/jenny-inclusive-accessibility-champion.md +200 -0
  51. package/.claude/agents/specialized_experts/michael-vc.md +130 -0
  52. package/.claude/agents/specialized_experts/riccardo-storyteller.md +158 -0
  53. package/.claude/agents/specialized_experts/sam-startupper.md +253 -0
  54. package/.claude/agents/specialized_experts/wiz-investor-venture-capital.md +182 -0
  55. package/.claude/agents/technical_development/baccio-tech-architect.md +210 -0
  56. package/.claude/agents/technical_development/dario-debugger.md +250 -0
  57. package/.claude/agents/technical_development/marco-devops-engineer.md +200 -0
  58. package/.claude/agents/technical_development/omri-data-scientist.md +194 -0
  59. package/.claude/agents/technical_development/otto-performance-optimizer.md +262 -0
  60. package/.claude/agents/technical_development/paolo-best-practices-enforcer.md +303 -0
  61. package/.claude/agents/technical_development/rex-code-reviewer.md +231 -0
  62. package/.claude/rules/api-development.md +358 -0
  63. package/.claude/rules/code-style.md +129 -0
  64. package/.claude/rules/documentation-standards.md +359 -0
  65. package/.claude/rules/ethical-guidelines.md +383 -0
  66. package/.claude/rules/security-requirements.md +182 -0
  67. package/.claude/rules/testing-standards.md +266 -0
  68. package/.claude/skills/architecture/SKILL.md +228 -0
  69. package/.claude/skills/code-review/SKILL.md +140 -0
  70. package/.claude/skills/debugging/SKILL.md +192 -0
  71. package/.claude/skills/performance/SKILL.md +277 -0
  72. package/.claude/skills/project-management/SKILL.md +382 -0
  73. package/.claude/skills/release-management/SKILL.md +342 -0
  74. package/.claude/skills/security-audit/SKILL.md +276 -0
  75. package/.claude/skills/strategic-analysis/SKILL.md +338 -0
  76. package/LICENSE +60 -0
  77. package/README.md +379 -0
  78. package/VERSION +29 -0
  79. package/bin/myconvergio.js +304 -0
  80. package/package.json +43 -0
  81. package/scripts/bump-agent-version.sh +220 -0
  82. package/scripts/postinstall.js +172 -0
  83. package/scripts/sync-from-convergiocli.sh +169 -0
  84. package/scripts/test-deployment.sh +188 -0
  85. package/scripts/version-manager.sh +213 -0
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "myconvergio",
3
+ "version": "2.1.0",
4
+ "description": "60 specialized Claude Code subagents for enterprise software development, strategic leadership, and organizational excellence",
5
+ "keywords": [
6
+ "claude",
7
+ "claude-code",
8
+ "ai-agents",
9
+ "subagents",
10
+ "anthropic",
11
+ "enterprise",
12
+ "productivity"
13
+ ],
14
+ "homepage": "https://github.com/roberdan/MyConvergio",
15
+ "bugs": {
16
+ "url": "https://github.com/roberdan/MyConvergio/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/roberdan/MyConvergio.git"
21
+ },
22
+ "license": "CC-BY-NC-SA-4.0",
23
+ "author": "Roberto D'Angelo <roberdan@fightthestroke.org>",
24
+ "bin": {
25
+ "myconvergio": "./bin/myconvergio.js"
26
+ },
27
+ "files": [
28
+ "bin/",
29
+ "scripts/",
30
+ ".claude/agents/",
31
+ ".claude/rules/",
32
+ ".claude/skills/",
33
+ "VERSION",
34
+ "LICENSE"
35
+ ],
36
+ "scripts": {
37
+ "postinstall": "node scripts/postinstall.js",
38
+ "test": "make test"
39
+ },
40
+ "engines": {
41
+ "node": ">=18.0.0"
42
+ }
43
+ }
@@ -0,0 +1,220 @@
1
+ #!/bin/bash
2
+
3
+ # =============================================================================
4
+ # AGENT VERSION BUMP SCRIPT
5
+ # =============================================================================
6
+ # Bumps version for specific agent or all agents
7
+ # Updates both frontmatter and changelog
8
+ # Part of WAVE 5 Agent Optimization Plan 2025
9
+ # Version: 1.0.0
10
+ # =============================================================================
11
+
12
+ set -euo pipefail
13
+
14
+ # Colors
15
+ RED='\033[0;31m'
16
+ GREEN='\033[0;32m'
17
+ BLUE='\033[0;34m'
18
+ YELLOW='\033[1;33m'
19
+ NC='\033[0m'
20
+
21
+ # Paths
22
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
23
+ ROOT_DIR="$(dirname "$SCRIPT_DIR")"
24
+ AGENTS_DIR="$ROOT_DIR/.claude/agents"
25
+
26
+ # Get current date
27
+ CURRENT_DATE=$(date +%Y-%m-%d)
28
+
29
+ # Function to extract current version from frontmatter
30
+ get_current_version() {
31
+ local file="$1"
32
+ grep '^version:' "$file" | sed 's/version: "\(.*\)"/\1/' | tr -d '"'
33
+ }
34
+
35
+ # Function to bump version
36
+ bump_version() {
37
+ local version="$1"
38
+ local bump_type="$2"
39
+
40
+ IFS='.' read -r major minor patch <<< "$version"
41
+
42
+ case "$bump_type" in
43
+ major)
44
+ echo "$((major + 1)).0.0"
45
+ ;;
46
+ minor)
47
+ echo "${major}.$((minor + 1)).0"
48
+ ;;
49
+ patch)
50
+ echo "${major}.${minor}.$((patch + 1))"
51
+ ;;
52
+ *)
53
+ echo "$version"
54
+ ;;
55
+ esac
56
+ }
57
+
58
+ # Function to update version in file
59
+ update_agent_version() {
60
+ local file="$1"
61
+ local new_version="$2"
62
+ local change_description="$3"
63
+
64
+ local agent_name=$(basename "$file" .md)
65
+ local current_version=$(get_current_version "$file")
66
+
67
+ if [ -z "$current_version" ]; then
68
+ echo -e "${RED}Error: Could not find version in $agent_name${NC}" >&2
69
+ return 1
70
+ fi
71
+
72
+ echo -e "${BLUE}Updating $agent_name: $current_version → $new_version${NC}"
73
+
74
+ # Update version in frontmatter
75
+ if [[ "$OSTYPE" == "darwin"* ]]; then
76
+ # macOS
77
+ sed -i '' "s/^version: \".*\"/version: \"$new_version\"/" "$file"
78
+ else
79
+ # Linux
80
+ sed -i "s/^version: \".*\"/version: \"$new_version\"/" "$file"
81
+ fi
82
+
83
+ # Add changelog entry
84
+ local changelog_entry="- **$new_version** ($CURRENT_DATE): $change_description"
85
+
86
+ # Find the changelog section and add the new entry after "## Changelog"
87
+ if grep -q "^## Changelog" "$file"; then
88
+ if [[ "$OSTYPE" == "darwin"* ]]; then
89
+ # macOS
90
+ sed -i '' "/^## Changelog/a\\
91
+ $changelog_entry
92
+ " "$file"
93
+ else
94
+ # Linux
95
+ sed -i "/^## Changelog/a $changelog_entry" "$file"
96
+ fi
97
+ else
98
+ echo -e "${YELLOW}Warning: No changelog section found in $agent_name${NC}"
99
+ fi
100
+
101
+ echo -e "${GREEN}✓ Updated $agent_name${NC}"
102
+ }
103
+
104
+ # Show help
105
+ show_help() {
106
+ echo -e "${BLUE}MyConvergio Agent Version Bump${NC}"
107
+ echo "Usage: $0 [options] <bump_type> [agent_name] [change_description]"
108
+ echo ""
109
+ echo "Bump Types:"
110
+ echo " major Bump major version (X.0.0)"
111
+ echo " minor Bump minor version (0.X.0)"
112
+ echo " patch Bump patch version (0.0.X)"
113
+ echo ""
114
+ echo "Options:"
115
+ echo " --all Bump all agents"
116
+ echo " --help, -h Show this help message"
117
+ echo ""
118
+ echo "Examples:"
119
+ echo " $0 patch ali-chief-of-staff 'Fixed bug in orchestration'"
120
+ echo " $0 minor baccio-tech-architect 'Added new architecture patterns'"
121
+ echo " $0 --all patch 'Security framework updates'"
122
+ echo ""
123
+ }
124
+
125
+ # Main function
126
+ main() {
127
+ local bump_all=false
128
+ local bump_type=""
129
+ local agent_name=""
130
+ local change_description=""
131
+
132
+ # Parse arguments
133
+ while [[ $# -gt 0 ]]; do
134
+ case "$1" in
135
+ --all)
136
+ bump_all=true
137
+ shift
138
+ ;;
139
+ --help|-h)
140
+ show_help
141
+ exit 0
142
+ ;;
143
+ major|minor|patch)
144
+ bump_type="$1"
145
+ shift
146
+ ;;
147
+ *)
148
+ if [ -z "$agent_name" ]; then
149
+ agent_name="$1"
150
+ elif [ -z "$change_description" ]; then
151
+ change_description="$1"
152
+ fi
153
+ shift
154
+ ;;
155
+ esac
156
+ done
157
+
158
+ # Validate arguments
159
+ if [ -z "$bump_type" ]; then
160
+ echo -e "${RED}Error: Bump type required (major|minor|patch)${NC}" >&2
161
+ show_help
162
+ exit 1
163
+ fi
164
+
165
+ if [ -z "$change_description" ]; then
166
+ echo -e "${RED}Error: Change description required${NC}" >&2
167
+ show_help
168
+ exit 1
169
+ fi
170
+
171
+ if [ "$bump_all" = true ]; then
172
+ echo -e "${BLUE}Bumping all agents ($bump_type)...${NC}"
173
+ echo ""
174
+
175
+ local count=0
176
+ find "$AGENTS_DIR" -type f -name "*.md" \
177
+ ! -name "CONSTITUTION.md" \
178
+ ! -name "MICROSOFT_VALUES.md" \
179
+ ! -name "CommonValuesAndPrinciples.md" \
180
+ ! -name "SECURITY_FRAMEWORK_TEMPLATE.md" | while read -r file; do
181
+
182
+ local current_version=$(get_current_version "$file")
183
+ local new_version=$(bump_version "$current_version" "$bump_type")
184
+ update_agent_version "$file" "$new_version" "$change_description"
185
+ count=$((count + 1))
186
+ done
187
+
188
+ echo ""
189
+ echo -e "${GREEN}✨ All agents updated!${NC}"
190
+ else
191
+ if [ -z "$agent_name" ]; then
192
+ echo -e "${RED}Error: Agent name required${NC}" >&2
193
+ show_help
194
+ exit 1
195
+ fi
196
+
197
+ # Find the agent file
198
+ local agent_file=$(find "$AGENTS_DIR" -type f -name "$agent_name.md" | head -1)
199
+
200
+ if [ -z "$agent_file" ]; then
201
+ echo -e "${RED}Error: Agent '$agent_name' not found${NC}" >&2
202
+ exit 1
203
+ fi
204
+
205
+ local current_version=$(get_current_version "$agent_file")
206
+ local new_version=$(bump_version "$current_version" "$bump_type")
207
+ update_agent_version "$agent_file" "$new_version" "$change_description"
208
+
209
+ echo ""
210
+ echo -e "${GREEN}✨ Version bumped successfully!${NC}"
211
+ fi
212
+ }
213
+
214
+ # Run the script
215
+ if [ $# -eq 0 ]; then
216
+ show_help
217
+ exit 0
218
+ fi
219
+
220
+ main "$@"
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * MyConvergio Post-Install Script
5
+ *
6
+ * Automatically copies agents, rules, and skills to ~/.claude/
7
+ * after npm install -g myconvergio
8
+ *
9
+ * Features:
10
+ * - Creates backup if existing installation found
11
+ * - Saves manifest of installed files for safe uninstall
12
+ * - Preserves user's custom files and CLAUDE.md
13
+ */
14
+
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+ const os = require('os');
18
+
19
+ const CLAUDE_HOME = path.join(os.homedir(), '.claude');
20
+ const PACKAGE_ROOT = path.join(__dirname, '..');
21
+ const MANIFEST_FILE = path.join(CLAUDE_HOME, '.myconvergio-manifest.json');
22
+
23
+ // Colors for terminal output
24
+ const colors = {
25
+ reset: '\x1b[0m',
26
+ green: '\x1b[32m',
27
+ yellow: '\x1b[33m',
28
+ blue: '\x1b[34m',
29
+ };
30
+
31
+ function log(color, message) {
32
+ console.log(`${color}${message}${colors.reset}`);
33
+ }
34
+
35
+ function copyRecursive(src, dest, installedFiles = []) {
36
+ if (!fs.existsSync(src)) {
37
+ return installedFiles;
38
+ }
39
+
40
+ fs.mkdirSync(dest, { recursive: true });
41
+
42
+ const items = fs.readdirSync(src);
43
+
44
+ for (const item of items) {
45
+ const srcPath = path.join(src, item);
46
+ const destPath = path.join(dest, item);
47
+ const stat = fs.statSync(srcPath);
48
+
49
+ if (stat.isDirectory()) {
50
+ copyRecursive(srcPath, destPath, installedFiles);
51
+ } else {
52
+ fs.copyFileSync(srcPath, destPath);
53
+ installedFiles.push(destPath);
54
+ }
55
+ }
56
+
57
+ return installedFiles;
58
+ }
59
+
60
+ function loadManifest() {
61
+ try {
62
+ if (fs.existsSync(MANIFEST_FILE)) {
63
+ return JSON.parse(fs.readFileSync(MANIFEST_FILE, 'utf8'));
64
+ }
65
+ } catch {}
66
+ return { files: [], version: null };
67
+ }
68
+
69
+ function saveManifest(files, version) {
70
+ const manifest = {
71
+ version,
72
+ installedAt: new Date().toISOString(),
73
+ files
74
+ };
75
+ fs.mkdirSync(CLAUDE_HOME, { recursive: true });
76
+ fs.writeFileSync(MANIFEST_FILE, JSON.stringify(manifest, null, 2));
77
+ }
78
+
79
+ function getVersion() {
80
+ try {
81
+ const versionFile = path.join(PACKAGE_ROOT, 'VERSION');
82
+ const content = fs.readFileSync(versionFile, 'utf8');
83
+ const match = content.match(/SYSTEM_VERSION=(.+)/);
84
+ return match ? match[1].trim() : 'unknown';
85
+ } catch {
86
+ const pkg = require('../package.json');
87
+ return pkg.version;
88
+ }
89
+ }
90
+
91
+ function createBackup() {
92
+ const backupDir = path.join(os.homedir(), '.claude-backup-' + Date.now());
93
+ const dirs = ['agents', 'rules', 'skills'];
94
+ let hasContent = false;
95
+
96
+ for (const dir of dirs) {
97
+ const srcDir = path.join(CLAUDE_HOME, dir);
98
+ if (fs.existsSync(srcDir) && fs.readdirSync(srcDir).length > 0) {
99
+ hasContent = true;
100
+ copyRecursive(srcDir, path.join(backupDir, dir));
101
+ }
102
+ }
103
+
104
+ return hasContent ? backupDir : null;
105
+ }
106
+
107
+ function countDirs(dir) {
108
+ if (!fs.existsSync(dir)) return 0;
109
+ return fs.readdirSync(dir).filter(f =>
110
+ fs.statSync(path.join(dir, f)).isDirectory()
111
+ ).length;
112
+ }
113
+
114
+ function main() {
115
+ // Skip if running in CI or if MYCONVERGIO_SKIP_POSTINSTALL is set
116
+ if (process.env.CI || process.env.MYCONVERGIO_SKIP_POSTINSTALL) {
117
+ console.log('Skipping postinstall (CI environment or MYCONVERGIO_SKIP_POSTINSTALL set)');
118
+ return;
119
+ }
120
+
121
+ log(colors.blue, '\n📦 MyConvergio Post-Install\n');
122
+
123
+ const srcAgents = path.join(PACKAGE_ROOT, '.claude', 'agents');
124
+ const srcRules = path.join(PACKAGE_ROOT, '.claude', 'rules');
125
+ const srcSkills = path.join(PACKAGE_ROOT, '.claude', 'skills');
126
+
127
+ // Check if source directories exist
128
+ if (!fs.existsSync(srcAgents)) {
129
+ log(colors.yellow, 'Warning: Source agents directory not found. Skipping installation.');
130
+ return;
131
+ }
132
+
133
+ // Check for existing installation and backup
134
+ const existingManifest = loadManifest();
135
+ if (existingManifest.version) {
136
+ log(colors.yellow, `Existing installation found (v${existingManifest.version})`);
137
+ log(colors.yellow, 'Creating backup before upgrade...\n');
138
+ const backupDir = createBackup();
139
+ if (backupDir) {
140
+ log(colors.green, ` ✓ Backup created: ${backupDir}\n`);
141
+ }
142
+ }
143
+
144
+ const installedFiles = [];
145
+
146
+ // Install agents
147
+ copyRecursive(srcAgents, path.join(CLAUDE_HOME, 'agents'), installedFiles);
148
+ log(colors.green, ` ✓ Installed agents`);
149
+
150
+ // Install rules
151
+ copyRecursive(srcRules, path.join(CLAUDE_HOME, 'rules'), installedFiles);
152
+ log(colors.green, ` ✓ Installed rules`);
153
+
154
+ // Install skills
155
+ copyRecursive(srcSkills, path.join(CLAUDE_HOME, 'skills'), installedFiles);
156
+ const skillsCount = countDirs(path.join(CLAUDE_HOME, 'skills'));
157
+ log(colors.green, ` ✓ Installed ${skillsCount} skills`);
158
+
159
+ // Save manifest for safe uninstall
160
+ const version = getVersion();
161
+ saveManifest(installedFiles, version);
162
+ log(colors.green, ` ✓ Saved manifest (${installedFiles.length} files)`);
163
+
164
+ console.log('');
165
+ log(colors.green, '✅ MyConvergio installed successfully!');
166
+ console.log('');
167
+ log(colors.yellow, 'Your ~/.claude/CLAUDE.md was NOT modified.');
168
+ console.log('Create your own configuration file if needed.\n');
169
+ console.log('Run `myconvergio help` for available commands.\n');
170
+ }
171
+
172
+ main();
@@ -0,0 +1,169 @@
1
+ #!/bin/bash
2
+
3
+ # =============================================================================
4
+ # MYCONVERGIO SYNC FROM CONVERGIOCLI
5
+ # =============================================================================
6
+ # Syncs agent definitions from the ConvergioCLI repository
7
+ # Source: https://github.com/Roberdan/convergio-cli/tree/main/src/agents/definitions
8
+ # =============================================================================
9
+
10
+ set -euo pipefail
11
+
12
+ # Colors
13
+ RED='\033[0;31m'
14
+ GREEN='\033[0;32m'
15
+ BLUE='\033[0;34m'
16
+ YELLOW='\033[1;33m'
17
+ NC='\033[0m'
18
+
19
+ # Paths
20
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
21
+ ROOT_DIR="$(dirname "$SCRIPT_DIR")"
22
+ TARGET_DIR="$ROOT_DIR/.claude/agents"
23
+ TEMP_DIR="/tmp/convergiocli-sync-$$"
24
+
25
+ # Source repository
26
+ REPO_URL="https://github.com/Roberdan/convergio-cli.git"
27
+ SOURCE_PATH="src/agents/definitions"
28
+
29
+ # Parse arguments
30
+ DRY_RUN=false
31
+ VERBOSE=false
32
+
33
+ while [[ $# -gt 0 ]]; do
34
+ case $1 in
35
+ --dry-run)
36
+ DRY_RUN=true
37
+ shift
38
+ ;;
39
+ --verbose|-v)
40
+ VERBOSE=true
41
+ shift
42
+ ;;
43
+ --help|-h)
44
+ echo "Usage: $0 [--dry-run] [--verbose]"
45
+ echo ""
46
+ echo "Options:"
47
+ echo " --dry-run Show what would be synced without making changes"
48
+ echo " --verbose Show detailed output"
49
+ exit 0
50
+ ;;
51
+ *)
52
+ echo -e "${RED}Unknown option: $1${NC}"
53
+ exit 1
54
+ ;;
55
+ esac
56
+ done
57
+
58
+ cleanup() {
59
+ rm -rf "$TEMP_DIR"
60
+ }
61
+ trap cleanup EXIT
62
+
63
+ echo -e "${BLUE}MyConvergio Agent Sync${NC}"
64
+ echo "Source: $REPO_URL"
65
+ echo "Target: $TARGET_DIR"
66
+ echo ""
67
+
68
+ # Clone repository with sparse checkout
69
+ echo -e "${BLUE}Fetching latest agents from ConvergioCLI...${NC}"
70
+ mkdir -p "$TEMP_DIR"
71
+ cd "$TEMP_DIR"
72
+
73
+ git clone --depth 1 --filter=blob:none --sparse "$REPO_URL" repo 2>/dev/null
74
+ cd repo
75
+ git sparse-checkout set "$SOURCE_PATH" 2>/dev/null
76
+
77
+ if [ ! -d "$SOURCE_PATH" ]; then
78
+ echo -e "${RED}Error: Could not find $SOURCE_PATH in repository${NC}"
79
+ exit 1
80
+ fi
81
+
82
+ # Count files
83
+ SOURCE_COUNT=$(find "$SOURCE_PATH" -name '*.md' | wc -l | tr -d ' ')
84
+ TARGET_COUNT=$(find "$TARGET_DIR" -name '*.md' ! -name 'CONSTITUTION.md' ! -name 'CommonValuesAndPrinciples.md' 2>/dev/null | wc -l | tr -d ' ')
85
+
86
+ echo -e "${BLUE}Found $SOURCE_COUNT agents in ConvergioCLI${NC}"
87
+ echo -e "${BLUE}Current $TARGET_COUNT agents in MyConvergio${NC}"
88
+ echo ""
89
+
90
+ if [ "$DRY_RUN" = true ]; then
91
+ echo -e "${YELLOW}DRY RUN - No changes will be made${NC}"
92
+ echo ""
93
+ fi
94
+
95
+ # Compare and sync
96
+ NEW_COUNT=0
97
+ UPDATED_COUNT=0
98
+ UNCHANGED_COUNT=0
99
+
100
+ for src_file in $(find "$SOURCE_PATH" -name '*.md'); do
101
+ filename=$(basename "$src_file")
102
+
103
+ # Skip non-agent files
104
+ if [[ "$filename" == "README.md" ]] || [[ "$filename" == "index.md" ]]; then
105
+ continue
106
+ fi
107
+
108
+ # Determine target category (from source path)
109
+ rel_path="${src_file#$SOURCE_PATH/}"
110
+ category=$(dirname "$rel_path")
111
+
112
+ if [ "$category" = "." ]; then
113
+ # Root level file, put in core_utility
114
+ category="core_utility"
115
+ fi
116
+
117
+ target_file="$TARGET_DIR/$category/$filename"
118
+
119
+ if [ ! -f "$target_file" ]; then
120
+ echo -e "${GREEN}NEW: $category/$filename${NC}"
121
+ NEW_COUNT=$((NEW_COUNT + 1))
122
+
123
+ if [ "$DRY_RUN" = false ]; then
124
+ mkdir -p "$TARGET_DIR/$category"
125
+ cp "$src_file" "$target_file"
126
+ fi
127
+ elif ! diff -q "$src_file" "$target_file" >/dev/null 2>&1; then
128
+ echo -e "${YELLOW}UPDATED: $category/$filename${NC}"
129
+ UPDATED_COUNT=$((UPDATED_COUNT + 1))
130
+
131
+ if [ "$DRY_RUN" = false ]; then
132
+ cp "$src_file" "$target_file"
133
+ fi
134
+
135
+ if [ "$VERBOSE" = true ]; then
136
+ echo " Diff:"
137
+ diff "$target_file" "$src_file" | head -10 || true
138
+ echo ""
139
+ fi
140
+ else
141
+ UNCHANGED_COUNT=$((UNCHANGED_COUNT + 1))
142
+ if [ "$VERBOSE" = true ]; then
143
+ echo -e " UNCHANGED: $category/$filename"
144
+ fi
145
+ fi
146
+ done
147
+
148
+ echo ""
149
+ echo -e "${BLUE}Summary:${NC}"
150
+ echo -e " New agents: ${GREEN}$NEW_COUNT${NC}"
151
+ echo -e " Updated agents: ${YELLOW}$UPDATED_COUNT${NC}"
152
+ echo -e " Unchanged agents: $UNCHANGED_COUNT"
153
+
154
+ if [ "$DRY_RUN" = true ]; then
155
+ echo ""
156
+ echo -e "${YELLOW}Run without --dry-run to apply changes${NC}"
157
+ else
158
+ if [ $NEW_COUNT -gt 0 ] || [ $UPDATED_COUNT -gt 0 ]; then
159
+ echo ""
160
+ echo -e "${GREEN}✅ Sync complete${NC}"
161
+ echo ""
162
+ echo "Next steps:"
163
+ echo " 1. Review changes: git diff"
164
+ echo " 2. Commit: git add -A && git commit -m 'feat: sync agents from ConvergioCLI'"
165
+ else
166
+ echo ""
167
+ echo -e "${GREEN}✅ Already up to date${NC}"
168
+ fi
169
+ fi