@julioventura/opensquad 0.1.17

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 (247) hide show
  1. package/README.md +433 -0
  2. package/_opensquad/config/playwright.config.json +11 -0
  3. package/_opensquad/core/architect.agent.yaml +112 -0
  4. package/_opensquad/core/best-practices/_catalog.yaml +126 -0
  5. package/_opensquad/core/best-practices/blog-post.md +132 -0
  6. package/_opensquad/core/best-practices/blog-seo.md +127 -0
  7. package/_opensquad/core/best-practices/brand-resolution-checklist.md +172 -0
  8. package/_opensquad/core/best-practices/copywriting.md +441 -0
  9. package/_opensquad/core/best-practices/data-analysis.md +401 -0
  10. package/_opensquad/core/best-practices/email-newsletter.md +118 -0
  11. package/_opensquad/core/best-practices/email-sales.md +110 -0
  12. package/_opensquad/core/best-practices/image-design.md +348 -0
  13. package/_opensquad/core/best-practices/instagram-feed.md +235 -0
  14. package/_opensquad/core/best-practices/instagram-reels.md +112 -0
  15. package/_opensquad/core/best-practices/instagram-stories.md +107 -0
  16. package/_opensquad/core/best-practices/linkedin-article.md +116 -0
  17. package/_opensquad/core/best-practices/linkedin-post.md +121 -0
  18. package/_opensquad/core/best-practices/researching.md +349 -0
  19. package/_opensquad/core/best-practices/review.md +269 -0
  20. package/_opensquad/core/best-practices/run-recovery.md +61 -0
  21. package/_opensquad/core/best-practices/social-networks-publishing.md +327 -0
  22. package/_opensquad/core/best-practices/squad-creation-checklist.md +32 -0
  23. package/_opensquad/core/best-practices/strategist.md +344 -0
  24. package/_opensquad/core/best-practices/technical-writing.md +365 -0
  25. package/_opensquad/core/best-practices/twitter-post.md +105 -0
  26. package/_opensquad/core/best-practices/twitter-thread.md +122 -0
  27. package/_opensquad/core/best-practices/whatsapp-broadcast.md +107 -0
  28. package/_opensquad/core/best-practices/youtube-script.md +122 -0
  29. package/_opensquad/core/best-practices/youtube-shorts.md +112 -0
  30. package/_opensquad/core/defaults/youtube-video-assembly.json +84 -0
  31. package/_opensquad/core/prompts/build.prompt.md +613 -0
  32. package/_opensquad/core/prompts/design.prompt.md +606 -0
  33. package/_opensquad/core/prompts/discovery.prompt.md +377 -0
  34. package/_opensquad/core/prompts/sherlock-instagram.md +123 -0
  35. package/_opensquad/core/prompts/sherlock-linkedin.md +73 -0
  36. package/_opensquad/core/prompts/sherlock-shared.md +684 -0
  37. package/_opensquad/core/prompts/sherlock-twitter.md +78 -0
  38. package/_opensquad/core/prompts/sherlock-youtube.md +85 -0
  39. package/_opensquad/core/runner.pipeline.md +743 -0
  40. package/_opensquad/core/skills.engine.md +384 -0
  41. package/bin/opensquad.js +108 -0
  42. package/dashboard/index.html +15 -0
  43. package/dashboard/package-lock.json +1964 -0
  44. package/dashboard/package.json +28 -0
  45. package/dashboard/public/assets/avatars/Female1_1wave.png +0 -0
  46. package/dashboard/public/assets/avatars/Female1_2wave.png +0 -0
  47. package/dashboard/public/assets/avatars/Female1_blink.png +0 -0
  48. package/dashboard/public/assets/avatars/Female1_talk.png +0 -0
  49. package/dashboard/public/assets/avatars/Female2_1wave.png +0 -0
  50. package/dashboard/public/assets/avatars/Female2_2wave.png +0 -0
  51. package/dashboard/public/assets/avatars/Female2_blink.png +0 -0
  52. package/dashboard/public/assets/avatars/Female2_talk.png +0 -0
  53. package/dashboard/public/assets/avatars/Female3_blink.png +0 -0
  54. package/dashboard/public/assets/avatars/Female3_talk.png +0 -0
  55. package/dashboard/public/assets/avatars/Female3_wave.png +0 -0
  56. package/dashboard/public/assets/avatars/Female4_blink.png +0 -0
  57. package/dashboard/public/assets/avatars/Female4_talk.png +0 -0
  58. package/dashboard/public/assets/avatars/Female4_wave.png +0 -0
  59. package/dashboard/public/assets/avatars/Female5_blink.png +0 -0
  60. package/dashboard/public/assets/avatars/Female5_talk.png +0 -0
  61. package/dashboard/public/assets/avatars/Female5_wave.png +0 -0
  62. package/dashboard/public/assets/avatars/Female6_blink.png +0 -0
  63. package/dashboard/public/assets/avatars/Female6_talk.png +0 -0
  64. package/dashboard/public/assets/avatars/Female6_wave.png +0 -0
  65. package/dashboard/public/assets/avatars/Male1_1wave.png +0 -0
  66. package/dashboard/public/assets/avatars/Male1_2wave.png +0 -0
  67. package/dashboard/public/assets/avatars/Male1_blink.png +0 -0
  68. package/dashboard/public/assets/avatars/Male1_talk.png +0 -0
  69. package/dashboard/public/assets/avatars/Male2_1wave.png +0 -0
  70. package/dashboard/public/assets/avatars/Male2_2wave.png +0 -0
  71. package/dashboard/public/assets/avatars/Male2_blink.png +0 -0
  72. package/dashboard/public/assets/avatars/Male2_talk.png +0 -0
  73. package/dashboard/public/assets/avatars/Male3_blink.png +0 -0
  74. package/dashboard/public/assets/avatars/Male3_talk.png +0 -0
  75. package/dashboard/public/assets/avatars/Male3_wave.png +0 -0
  76. package/dashboard/public/assets/avatars/Male4_blink.png +0 -0
  77. package/dashboard/public/assets/avatars/Male4_talk.png +0 -0
  78. package/dashboard/public/assets/avatars/Male4_wave.png +0 -0
  79. package/dashboard/public/assets/desks/desktop_set_black_down.png +0 -0
  80. package/dashboard/public/assets/desks/desktop_set_black_down_coding-1.png +0 -0
  81. package/dashboard/public/assets/desks/desktop_set_black_down_coding.png +0 -0
  82. package/dashboard/public/assets/desks/desktop_set_black_up.png +0 -0
  83. package/dashboard/public/assets/desks/desktop_set_white_down.png +0 -0
  84. package/dashboard/public/assets/desks/desktop_set_white_down_coding-1.png +0 -0
  85. package/dashboard/public/assets/desks/desktop_set_white_down_coding.png +0 -0
  86. package/dashboard/public/assets/desks/desktop_set_white_up.png +0 -0
  87. package/dashboard/public/assets/furniture/armchair_tan.png +0 -0
  88. package/dashboard/public/assets/furniture/armchair_tan_down.png +0 -0
  89. package/dashboard/public/assets/furniture/backpack_blue.png +0 -0
  90. package/dashboard/public/assets/furniture/backpack_red.png +0 -0
  91. package/dashboard/public/assets/furniture/blinds.png +0 -0
  92. package/dashboard/public/assets/furniture/blinds_large_closed_white.png +0 -0
  93. package/dashboard/public/assets/furniture/bookshelf.png +0 -0
  94. package/dashboard/public/assets/furniture/bookshelf_purple_tall.png +0 -0
  95. package/dashboard/public/assets/furniture/bulletin_board.png +0 -0
  96. package/dashboard/public/assets/furniture/clock.png +0 -0
  97. package/dashboard/public/assets/furniture/coffee_mug.png +0 -0
  98. package/dashboard/public/assets/furniture/coffee_mug_blue.png +0 -0
  99. package/dashboard/public/assets/furniture/coffee_table.png +0 -0
  100. package/dashboard/public/assets/furniture/coffeepot_right.png +0 -0
  101. package/dashboard/public/assets/furniture/coffeetable_black_horizontal.png +0 -0
  102. package/dashboard/public/assets/furniture/couch.png +0 -0
  103. package/dashboard/public/assets/furniture/couch_tan_down.png +0 -0
  104. package/dashboard/public/assets/furniture/cushion_blue.png +0 -0
  105. package/dashboard/public/assets/furniture/cushion_tan.png +0 -0
  106. package/dashboard/public/assets/furniture/desk_wood.png +0 -0
  107. package/dashboard/public/assets/furniture/fancy_rug.png +0 -0
  108. package/dashboard/public/assets/furniture/fancy_rug_wide.png +0 -0
  109. package/dashboard/public/assets/furniture/flowers1.png +0 -0
  110. package/dashboard/public/assets/furniture/flowers2.png +0 -0
  111. package/dashboard/public/assets/furniture/lamp_tan.png +0 -0
  112. package/dashboard/public/assets/furniture/lantern.png +0 -0
  113. package/dashboard/public/assets/furniture/monstera.png +0 -0
  114. package/dashboard/public/assets/furniture/monstera_small.png +0 -0
  115. package/dashboard/public/assets/furniture/picture_frame.png +0 -0
  116. package/dashboard/public/assets/furniture/plant1.png +0 -0
  117. package/dashboard/public/assets/furniture/plant2.png +0 -0
  118. package/dashboard/public/assets/furniture/plant3.png +0 -0
  119. package/dashboard/public/assets/furniture/plant_poof.png +0 -0
  120. package/dashboard/public/assets/furniture/plant_spindly.png +0 -0
  121. package/dashboard/public/assets/furniture/poster_blue.png +0 -0
  122. package/dashboard/public/assets/furniture/rug.png +0 -0
  123. package/dashboard/public/assets/furniture/succulent_blue.png +0 -0
  124. package/dashboard/public/assets/furniture/succulent_green.png +0 -0
  125. package/dashboard/public/assets/furniture/treasurechest_closed_gold.png +0 -0
  126. package/dashboard/public/assets/furniture/water_cooler_better.png +0 -0
  127. package/dashboard/public/assets/furniture/whiteboard.png +0 -0
  128. package/dashboard/public/assets/furniture/whiteboard_stand_graph.png +0 -0
  129. package/dashboard/public/assets/furniture/window_blinds_open.png +0 -0
  130. package/dashboard/src/App.tsx +46 -0
  131. package/dashboard/src/components/RunDashboardButton.tsx +92 -0
  132. package/dashboard/src/components/SquadCard.tsx +49 -0
  133. package/dashboard/src/components/SquadSelector.tsx +67 -0
  134. package/dashboard/src/components/StatusBadge.tsx +32 -0
  135. package/dashboard/src/components/StatusBar.tsx +116 -0
  136. package/dashboard/src/hooks/useSquadSocket.ts +135 -0
  137. package/dashboard/src/lib/formatTime.ts +16 -0
  138. package/dashboard/src/lib/normalizeState.ts +25 -0
  139. package/dashboard/src/main.tsx +10 -0
  140. package/dashboard/src/office/AgentSprite.ts +241 -0
  141. package/dashboard/src/office/OfficeScene.ts +153 -0
  142. package/dashboard/src/office/PhaserGame.tsx +80 -0
  143. package/dashboard/src/office/RoomBuilder.ts +190 -0
  144. package/dashboard/src/office/assetKeys.ts +150 -0
  145. package/dashboard/src/office/palette.ts +32 -0
  146. package/dashboard/src/plugin/squadWatcher.ts +397 -0
  147. package/dashboard/src/store/useSquadStore.ts +56 -0
  148. package/dashboard/src/styles/globals.css +36 -0
  149. package/dashboard/src/types/state.ts +63 -0
  150. package/dashboard/src/vite-env.d.ts +1 -0
  151. package/dashboard/tsconfig.json +24 -0
  152. package/dashboard/vite.config.ts +13 -0
  153. package/package.json +59 -0
  154. package/public/sfx/slide-transition-sfx.mp3 +0 -0
  155. package/skills/README.md +84 -0
  156. package/skills/apify/SKILL.md +55 -0
  157. package/skills/blotato/SKILL.md +63 -0
  158. package/skills/canva/SKILL.md +60 -0
  159. package/skills/higgsfield/SKILL.md +147 -0
  160. package/skills/image-ai-generator/SKILL.md +124 -0
  161. package/skills/image-ai-generator/scripts/generate.py +175 -0
  162. package/skills/image-creator/SKILL.md +166 -0
  163. package/skills/image-creator/editorial-slide-template.js +645 -0
  164. package/skills/image-fetcher/SKILL.md +91 -0
  165. package/skills/imgbb-uploader/SKILL.md +73 -0
  166. package/skills/imgbb-uploader/scripts/upload.js +125 -0
  167. package/skills/instagram-publisher/README.md +36 -0
  168. package/skills/instagram-publisher/SKILL.md +231 -0
  169. package/skills/instagram-publisher/scripts/publish-playwright.js +418 -0
  170. package/skills/instagram-publisher/scripts/publish.js +521 -0
  171. package/skills/opensquad-agent-creator/SKILL.md +192 -0
  172. package/skills/opensquad-skill-creator/SKILL.md +420 -0
  173. package/skills/opensquad-skill-creator/agents/analyzer.md +274 -0
  174. package/skills/opensquad-skill-creator/agents/comparator.md +202 -0
  175. package/skills/opensquad-skill-creator/agents/grader.md +223 -0
  176. package/skills/opensquad-skill-creator/assets/eval_review.html +146 -0
  177. package/skills/opensquad-skill-creator/eval-viewer/generate_review.py +471 -0
  178. package/skills/opensquad-skill-creator/eval-viewer/viewer.html +1325 -0
  179. package/skills/opensquad-skill-creator/references/schemas.md +430 -0
  180. package/skills/opensquad-skill-creator/references/skill-format.md +235 -0
  181. package/skills/opensquad-skill-creator/scripts/__init__.py +0 -0
  182. package/skills/opensquad-skill-creator/scripts/aggregate_benchmark.py +401 -0
  183. package/skills/opensquad-skill-creator/scripts/quick_validate.py +103 -0
  184. package/skills/opensquad-skill-creator/scripts/run_eval.py +310 -0
  185. package/skills/opensquad-skill-creator/scripts/utils.py +47 -0
  186. package/skills/pdf-extractor/SKILL.md +57 -0
  187. package/skills/pdf-extractor/scripts/extract.py +82 -0
  188. package/skills/resend/SKILL.md +80 -0
  189. package/skills/run-dashboard/README.md +93 -0
  190. package/skills/run-dashboard/SKILL.md +173 -0
  191. package/skills/run-dashboard/scripts/finalize-state.js +273 -0
  192. package/skills/run-dashboard/scripts/generate.js +1296 -0
  193. package/skills/run-dashboard/scripts/serve.js +135 -0
  194. package/skills/run-dashboard/templates/run-dashboard-simple.template.html +191 -0
  195. package/skills/run-dashboard/templates/run-dashboard.template.html +1164 -0
  196. package/skills/smtp-sender/SKILL.md +88 -0
  197. package/skills/smtp-sender/scripts/send.js +478 -0
  198. package/skills/template-designer/SKILL.md +201 -0
  199. package/skills/template-designer/base-templates/model-a.html +27 -0
  200. package/skills/template-designer/base-templates/model-b.html +31 -0
  201. package/skills/template-designer/base-templates/model-c.html +42 -0
  202. package/skills/youtube-publisher/SKILL.md +232 -0
  203. package/skills/youtube-publisher/scripts/publish.js +2078 -0
  204. package/src/agents-cli.js +158 -0
  205. package/src/agents.js +134 -0
  206. package/src/i18n.js +48 -0
  207. package/src/init.js +442 -0
  208. package/src/locales/en.json +79 -0
  209. package/src/locales/es.json +78 -0
  210. package/src/locales/pt-BR.json +78 -0
  211. package/src/logger.js +38 -0
  212. package/src/prompt.js +46 -0
  213. package/src/readme/README.md +146 -0
  214. package/src/runs.js +318 -0
  215. package/src/skills-cli.js +157 -0
  216. package/src/skills.js +146 -0
  217. package/src/supabase-cli.js +584 -0
  218. package/src/update.js +169 -0
  219. package/templates/_opensquad/.opensquad-version +1 -0
  220. package/templates/_opensquad/_investigations/.gitkeep +0 -0
  221. package/templates/ide-templates/antigravity/.agent/rules/opensquad.md +68 -0
  222. package/templates/ide-templates/antigravity/.agent/workflows/opensquad.md +102 -0
  223. package/templates/ide-templates/claude-code/.claude/skills/opensquad/SKILL.md +182 -0
  224. package/templates/ide-templates/claude-code/.mcp.json +8 -0
  225. package/templates/ide-templates/claude-code/CLAUDE.md +57 -0
  226. package/templates/ide-templates/codex/.agents/skills/opensquad/SKILL.md +6 -0
  227. package/templates/ide-templates/codex/AGENTS.md +120 -0
  228. package/templates/ide-templates/cursor/.cursor/commands/opensquad.md +9 -0
  229. package/templates/ide-templates/cursor/.cursor/mcp.json +8 -0
  230. package/templates/ide-templates/cursor/.cursor/rules/opensquad.mdc +62 -0
  231. package/templates/ide-templates/cursor/.cursorignore +3 -0
  232. package/templates/ide-templates/gemini-cli/.gemini/settings.json +8 -0
  233. package/templates/ide-templates/gemini-cli/.gemini/skills/opensquad/SKILL.md +186 -0
  234. package/templates/ide-templates/gemini-cli/GEMINI.md +57 -0
  235. package/templates/ide-templates/opencode/.opencode/commands/opensquad.md +9 -0
  236. package/templates/ide-templates/opencode/AGENTS.md +120 -0
  237. package/templates/ide-templates/qwen-code/.qwen/settings.json +8 -0
  238. package/templates/ide-templates/qwen-code/.qwen/skills/opensquad/SKILL.md +182 -0
  239. package/templates/ide-templates/qwen-code/QWEN.md +57 -0
  240. package/templates/ide-templates/trae/.trae/mcp.json +8 -0
  241. package/templates/ide-templates/trae/.trae/rules/opensquad.md +64 -0
  242. package/templates/ide-templates/vscode-copilot/.github/copilot-instructions.md +59 -0
  243. package/templates/ide-templates/vscode-copilot/.github/prompts/opensquad.prompt.md +209 -0
  244. package/templates/ide-templates/vscode-copilot/.vscode/mcp.json +8 -0
  245. package/templates/ide-templates/vscode-copilot/.vscode/settings.json +3 -0
  246. package/templates/package.json +8 -0
  247. package/templates/squads/.gitkeep +0 -0
package/src/update.js ADDED
@@ -0,0 +1,169 @@
1
+ import { cp, mkdir, readFile, stat } from 'node:fs/promises';
2
+ import { join, dirname, relative } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { loadLocale, t } from './i18n.js';
5
+ import { getTemplateEntries, loadSavedLocale, copyCanonicalSources } from './init.js';
6
+ import { listAvailable as listAvailableSkills, listInstalled as listInstalledSkills, installSkill, getSkillMeta } from './skills.js';
7
+ import { logEvent } from './logger.js';
8
+
9
+ async function loadSavedIdes(targetDir) {
10
+ try {
11
+ const prefsPath = join(targetDir, '_opensquad', '_memory', 'preferences.md');
12
+ const content = await readFile(prefsPath, 'utf-8');
13
+ const match = content.match(/\*\*IDEs:\*\*\s*(.+)/);
14
+ if (match) {
15
+ return match[1].trim().split(/,\s*/);
16
+ }
17
+ } catch {
18
+ // No preferences file
19
+ }
20
+ return ['claude-code'];
21
+ }
22
+
23
+ const __dirname = dirname(fileURLToPath(import.meta.url));
24
+ const TEMPLATES_DIR = join(__dirname, '..', 'templates');
25
+
26
+ const PROTECTED_PATHS = [
27
+ '_opensquad/_memory',
28
+ 'agents',
29
+ 'squads',
30
+ ];
31
+
32
+ function isProtected(relativePath) {
33
+ const normalized = relativePath.replaceAll('\\', '/');
34
+ return PROTECTED_PATHS.some(
35
+ (p) => normalized === p || normalized.startsWith(p + '/')
36
+ );
37
+ }
38
+
39
+ async function backupIfExists(destPath) {
40
+ try {
41
+ await stat(destPath);
42
+ const backupPath = destPath + '.bak';
43
+ await cp(destPath, backupPath);
44
+ return true;
45
+ } catch {
46
+ return false;
47
+ }
48
+ }
49
+
50
+ export async function update(targetDir) {
51
+ console.log('\n 🔄 Opensquad — Update\n');
52
+
53
+ // 1. Check initialized
54
+ try {
55
+ await stat(join(targetDir, '_opensquad'));
56
+ } catch {
57
+ await loadLocale('English');
58
+ console.log(` ${t('updateNotInitialized')}`);
59
+ return { success: false };
60
+ }
61
+
62
+ // 2. Load user's locale
63
+ await loadSavedLocale(targetDir);
64
+
65
+ // 3. Read versions
66
+ let currentVersion = null;
67
+ try {
68
+ currentVersion = (
69
+ await readFile(join(targetDir, '_opensquad', '.opensquad-version'), 'utf-8')
70
+ ).trim();
71
+ } catch {
72
+ // Legacy install — no version file
73
+ }
74
+
75
+ const newVersion = (
76
+ await readFile(join(TEMPLATES_DIR, '_opensquad', '.opensquad-version'), 'utf-8')
77
+ ).trim();
78
+
79
+ // 4. Announce
80
+ if (currentVersion) {
81
+ console.log(
82
+ ` ${t('updateStarting', { old: `v${currentVersion}`, new: `v${newVersion}` })}`
83
+ );
84
+ } else {
85
+ console.log(` ${t('updateStartingUnknown', { new: `v${newVersion}` })}`);
86
+ }
87
+
88
+ // 5. Copy common templates, skipping protected paths and ide-templates/
89
+ const entries = await getTemplateEntries(TEMPLATES_DIR);
90
+ let count = 0;
91
+
92
+ for (const entry of entries) {
93
+ const relativePath = relative(TEMPLATES_DIR, entry);
94
+ if (isProtected(relativePath)) continue;
95
+ // Skip ide-templates — handled separately below
96
+ if (relativePath.replaceAll('\\', '/').startsWith('ide-templates/')) continue;
97
+
98
+ const destPath = join(targetDir, relativePath);
99
+ await mkdir(dirname(destPath), { recursive: true });
100
+ const backed = await backupIfExists(destPath);
101
+ await cp(entry, destPath);
102
+ const displayPath = relativePath.replaceAll('\\', '/');
103
+ if (backed) {
104
+ console.log(` ${t('updatedFile', { path: displayPath })} (backup: ${displayPath}.bak)`);
105
+ } else {
106
+ console.log(` ${t('updatedFile', { path: displayPath })}`);
107
+ }
108
+ count++;
109
+ }
110
+
111
+ // 6. Copy IDE-specific templates based on saved preferences
112
+ const ides = await loadSavedIdes(targetDir);
113
+ for (const ide of ides) {
114
+ const ideSrcDir = join(TEMPLATES_DIR, 'ide-templates', ide);
115
+ let ideEntries;
116
+ try {
117
+ ideEntries = await getTemplateEntries(ideSrcDir);
118
+ } catch {
119
+ continue; // no template dir for this IDE
120
+ }
121
+ for (const entry of ideEntries) {
122
+ const relPath = relative(ideSrcDir, entry);
123
+ if (isProtected(relPath)) continue;
124
+
125
+ const destPath = join(targetDir, relPath);
126
+ await mkdir(dirname(destPath), { recursive: true });
127
+ const backed = await backupIfExists(destPath);
128
+ await cp(entry, destPath);
129
+ const displayPath = relPath.replaceAll('\\', '/');
130
+ if (backed) {
131
+ console.log(` ${t('updatedFile', { path: displayPath })} (backup: ${displayPath}.bak)`);
132
+ } else {
133
+ console.log(` ${t('updatedFile', { path: displayPath })}`);
134
+ }
135
+ count++;
136
+ }
137
+ }
138
+
139
+ // 6a. Copy canonical sources (core, config, dashboard)
140
+ count += await copyCanonicalSources(targetDir, {
141
+ overwrite: true,
142
+ backupFn: backupIfExists,
143
+ protectedFn: isProtected,
144
+ });
145
+
146
+ // 6b. Install new non-MCP, non-hybrid bundled skills not already present
147
+ const availableSkills = await listAvailableSkills();
148
+ const installedSkills = await listInstalledSkills(targetDir);
149
+ for (const id of availableSkills) {
150
+ if (id === 'opensquad-skill-creator') continue;
151
+ if (installedSkills.includes(id)) continue;
152
+ const meta = await getSkillMeta(id);
153
+ if (!meta) continue;
154
+ if (meta.type === 'mcp' || meta.type === 'hybrid') continue;
155
+ await installSkill(id, targetDir);
156
+ console.log(` ${t('createdFile', { path: `skills/${id}/SKILL.md` })}`);
157
+ count++;
158
+ }
159
+
160
+ // 7. Summary
161
+ console.log(`\n ${t('updateFileCount', { count })}`);
162
+ console.log(` ${t('updatePreserved')}`);
163
+ console.log(` ${t('updateSuccess', { version: `v${newVersion}` })}`);
164
+ console.log(`\n ${t('updateLatestHint')}\n`);
165
+
166
+ await logEvent('update', { from: currentVersion || 'unknown', to: newVersion }, targetDir);
167
+
168
+ return { success: true };
169
+ }
@@ -0,0 +1 @@
1
+ 0.1.17
File without changes
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: opensquad
3
+ ---
4
+
5
+ # Opensquad — Project Instructions
6
+
7
+ This project uses **Opensquad**, a multi-agent orchestration framework.
8
+
9
+ ## Quick Start
10
+
11
+ Type `/opensquad` to open the main menu, or use any of these commands:
12
+ - `/opensquad create` — Create a new squad
13
+ - `/opensquad run <name>` — Run a squad
14
+ - `/opensquad help` — See all commands
15
+
16
+ ## Directory Structure
17
+
18
+ - `_opensquad/` — Opensquad core files (do not modify manually)
19
+ - `_opensquad/_memory/` — Persistent memory (company context, preferences)
20
+ - `skills/` — Installed skills (integrations, scripts, prompts)
21
+ - `squads/` — User-created squads
22
+ - `squads/{name}/_investigations/` — Sherlock content investigations (profile analyses)
23
+ - `squads/{name}/output/` — Generated content and files
24
+ - `_opensquad/_browser_profile/` — Persistent browser sessions (login cookies, localStorage)
25
+
26
+ ## How It Works
27
+
28
+ 1. The `/opensquad` workflow is the entry point for all interactions
29
+ 2. The **Architect** agent creates and modifies squads
30
+ 3. During squad creation, the **Sherlock** investigator can analyze reference profiles (Instagram, YouTube, Twitter/X, LinkedIn) to extract real content patterns
31
+ 4. The **Pipeline Runner** executes squads automatically
32
+ 5. All tasks run inline and sequentially (no background subagents)
33
+ 6. Checkpoints pause execution for user input/approval
34
+
35
+ ## Rules
36
+
37
+ - Always use `/opensquad` commands to interact with the system
38
+ - Do not manually edit files in `_opensquad/core/` unless you know what you're doing
39
+ - Squad YAML files can be edited manually if needed, but prefer using `/opensquad edit`
40
+ - Company context in `_opensquad/_memory/company.md` is loaded for every squad run
41
+ ## Execution & Multi-Session Continuity
42
+
43
+ When running or resuming a squad, follow these rules:
44
+ 1. **Check State & Environment**:
45
+ - Always read `squads/{name}/state.json` first. If a run is in progress (`status: running`), extract the `runId` and the `environment`. Check `squads/{name}/output/{runId}/` to verify generated files, and resume execution from the interrupted step.
46
+ - If starting a new run, ask the user to select the active environment: 1. Claude Code (`claude-code`), 2. VSCode + GitHub Copilot Pro (`vscode-copilot`), 3. Google Antigravity (`antigravity`), or 4. Codex / OpenCode (`opencode`). Store this selection as `environment` in `state.json`.
47
+ - If `environment` is `vscode-copilot` or `antigravity`, force all steps to run as `execution: inline` sequentially (override any `execution: subagent` settings).
48
+ 2. **JIT Context Loading**: Do not read all files at once. Read the current step md, the active agent's `.agent.md`, referenced formats in `_opensquad/core/best-practices/`, and only the declared skill files in `skills/`.
49
+ 3. **Binary Validation Gates**:
50
+ - Before a step: Run `test -s` on the `inputFile` and `contextFiles`. Halt and prompt the user if files are missing.
51
+ - After a step: Run `test -s` on `outputFile` and `requiredArtifacts`. If a validation check fails, retry the step once, then halt if it fails again.
52
+ 4. **Update state.json**: Update `state.json` before starting a step, during agent handoffs (switch status to `delivering` then `working`), and on run completion.
53
+ 5. **Post-Run Cleanup**: Upon completion, copy `state.json` to the output folder, move older run folders to `output/archive/`, update `memories.md` with explicit user corrections only, and generate the run dashboard.
54
+
55
+ ## Antigravity Environment: Subagents
56
+
57
+ This environment (Google Antigravity) does not support spawning background or parallel subagents. When agent instructions (e.g., from the Architect) say to "use the Task tool with run_in_background: true" or similar, you MUST instead execute all tasks inline and sequentially:
58
+
59
+ 1. Inform the user you will process the tasks one by one
60
+ 2. Execute each task in the current conversation — do NOT skip or defer any of them
61
+ 3. Complete ALL tasks before asking the next question or moving on
62
+
63
+ Never announce that you "will do something in parallel" and then skip the work. Always do the actual research inline before continuing.
64
+
65
+ ## Interaction Rules
66
+
67
+ - NEVER ask more than one question per message — always wait for the user's answer before proceeding to the next question
68
+ - When presenting options, always use a numbered list (1. / 2. / 3.) — tell the user to reply with the option number
@@ -0,0 +1,102 @@
1
+ ---
2
+ description: Opensquad — Create and run AI agent squads for your business
3
+ ---
4
+
5
+ You are now activating the Opensquad system. Follow these steps IN ORDER:
6
+
7
+ 1. Read `_opensquad/_memory/company.md` for company context
8
+ 2. Read `_opensquad/_memory/preferences.md` for user preferences
9
+ 3. If company.md is empty or contains `<!-- NOT CONFIGURED -->`, run the ONBOARDING flow (see below)
10
+ 4. Otherwise, show the MAIN MENU
11
+
12
+ ## Onboarding Flow (first time only)
13
+
14
+ If `company.md` is empty or contains `<!-- NOT CONFIGURED -->`:
15
+
16
+ 1. Welcome the user warmly to Opensquad
17
+ 2. Ask their name (save to preferences.md)
18
+ 3. Ask their preferred language for outputs (save to preferences.md)
19
+ 4. Ask for their company name/description and website URL
20
+ 5. Use WebFetch on their URL + WebSearch with their company name to research:
21
+ - Company description and sector
22
+ - Target audience
23
+ - Products/services offered
24
+ - Tone of voice (inferred from website copy)
25
+ - Social media profiles found
26
+ 6. Present the findings in a clean summary and ask the user to confirm or correct
27
+ 7. Save the confirmed profile to `_opensquad/_memory/company.md`
28
+ 8. Show the main menu
29
+
30
+ ## Main Menu
31
+
32
+ Present the following numbered menu and ask the user to reply with a number:
33
+
34
+ **Primary menu:**
35
+ 1. **Create a new squad** — Describe what you need and I'll build a squad for you
36
+ 2. **Run an existing squad** — Execute a squad's pipeline
37
+ 3. **My squads** — View, edit, or delete your squads
38
+ 4. **More options** — Skills, company profile, settings, and help
39
+
40
+ If the user replies "4" or types "More options", present a second numbered menu:
41
+ 1. **Skills** — Browse, install, create, and manage skills for your squads
42
+ 2. **Company profile** — View or update your company information
43
+ 3. **Settings & Help** — Language, preferences, configuration, and help
44
+
45
+ ## Command Routing
46
+
47
+ Parse user input and route to the appropriate action:
48
+
49
+ | Input Pattern | Action |
50
+ |---------------|--------|
51
+ | `/opensquad` or `/opensquad menu` | Show main menu |
52
+ | `/opensquad help` | Show help text |
53
+ | `/opensquad create <description>` | Load Architect → Create Squad flow |
54
+ | `/opensquad list` | List all squads in `squads/` directory |
55
+ | `/opensquad run <name>` | Load Pipeline Runner → Execute squad |
56
+ | `/opensquad edit <name> <changes>` | Load Architect → Edit Squad flow |
57
+ | `/opensquad skills` | Load Skills Engine → Show skills menu |
58
+ | `/opensquad install <name>` | Install a skill from the catalog |
59
+ | `/opensquad uninstall <name>` | Remove an installed skill |
60
+ | `/opensquad delete <name>` | Confirm and delete squad directory |
61
+ | `/opensquad edit-company` | Re-run company profile setup |
62
+ | `/opensquad show-company` | Display company.md contents |
63
+ | `/opensquad settings` | Show/edit preferences.md |
64
+ | `/opensquad reset` | Confirm and reset all configuration |
65
+ | Natural language about squads | Infer intent and route accordingly |
66
+
67
+ ## Loading Agents
68
+
69
+ When a specific agent needs to be activated:
70
+
71
+ 1. Read the agent's `.agent.md` file completely
72
+ 2. Adopt the agent's persona (role, identity, communication_style, principles)
73
+ 3. Follow the agent's menu/workflow instructions
74
+ 4. When the agent's task is complete, return to Opensquad main context
75
+
76
+ ## Loading the Pipeline Runner
77
+
78
+ When running a squad:
79
+
80
+ 1. Read `squads/{name}/squad.yaml` to understand the pipeline
81
+ 2. Read `squads/{name}/squad-party.csv` to load all agent personas
82
+ 3. For each agent in the party CSV, also read their full `.agent.md` file from agents/ directory
83
+ 4. Load company context from `_opensquad/_memory/company.md`
84
+ 5. Load squad memory from `squads/{name}/_memory/memories.md`
85
+ 6. Read the pipeline runner instructions from `_opensquad/core/runner.pipeline.md`
86
+ 7. Execute the pipeline step by step following runner instructions
87
+
88
+ ## Language Handling
89
+
90
+ - Read `preferences.md` for the user's preferred language
91
+ - All user-facing output should be in the user's preferred language
92
+ - Internal file names and code remain in English
93
+ - Agent personas communicate in the user's language
94
+
95
+ ## Critical Rules
96
+
97
+ - NEVER skip the onboarding if company.md is not configured
98
+ - ALWAYS load company context before running any squad
99
+ - ALWAYS present checkpoints to the user — never skip them
100
+ - ALWAYS save outputs to the squad's output directory
101
+ - When switching personas (inline execution), clearly indicate which agent is speaking
102
+ - After each pipeline run, update the squad's memories.md with key learnings
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: opensquad
3
+ description: "Opensquad — Multi-agent orchestration framework. Create and run AI squads for your business."
4
+ ---
5
+
6
+ # Opensquad — Multi-Agent Orchestration
7
+
8
+ You are now operating as the Opensquad system. Your primary role is to help users create, manage, and run AI agent squads.
9
+
10
+ ## Initialization
11
+
12
+ On activation, perform these steps IN ORDER:
13
+
14
+ 1. Read the company context file: `{project-root}/_opensquad/_memory/company.md`
15
+ 2. Read the preferences file: `{project-root}/_opensquad/_memory/preferences.md`
16
+ 3. Check if company.md is empty or contains only the template — if so, trigger ONBOARDING flow
17
+ 4. Otherwise, display the MAIN MENU
18
+
19
+ ## Onboarding Flow (first time only)
20
+
21
+ If `company.md` is empty or contains `<!-- NOT CONFIGURED -->`:
22
+
23
+ 1. Welcome the user warmly to Opensquad
24
+ 2. Ask their name (save to preferences.md)
25
+ 3. Ask their preferred language for outputs (save to preferences.md)
26
+ 4. Ask for their company name/description and website URL
27
+ 5. Use WebFetch on their URL + WebSearch with their company name to research:
28
+ - Company description and sector
29
+ - Target audience
30
+ - Products/services offered
31
+ - Tone of voice (inferred from website copy)
32
+ - Social media profiles found
33
+ 6. Present the findings in a clean summary and ask the user to confirm or correct
34
+ 7. Save the confirmed profile to `_opensquad/_memory/company.md`
35
+ 8. Show the main menu
36
+
37
+ ## Main Menu
38
+
39
+ When the user types `/opensquad` or asks for the menu, present an interactive selector using AskUserQuestion with these options (max 4 per question):
40
+
41
+ **Primary menu (first question):**
42
+ - **Create a new squad** — Describe what you need and I'll build a squad for you
43
+ - **Run an existing squad** — Execute a squad's pipeline
44
+ - **My squads** — View, edit, or delete your squads
45
+ - **More options** — Skills, company profile, settings, and help
46
+
47
+ If the user selects "More options", present a second AskUserQuestion:
48
+ - **Skills** — Browse, install, create, and manage skills for your squads
49
+ - **Company profile** — View or update your company information
50
+ - **Settings & Help** — Language, preferences, configuration, and help
51
+
52
+ ## Command Routing
53
+
54
+ Parse user input and route to the appropriate action:
55
+
56
+ | Input Pattern | Action |
57
+ |---------------|--------|
58
+ | `/opensquad` or `/opensquad menu` | Show main menu |
59
+ | `/opensquad help` | Show help text |
60
+ | `/opensquad create <description>` | Load Architect → Create Squad flow (will ask for reference profile URLs for Sherlock investigation) |
61
+ | `/opensquad list` | List all squads in `squads/` directory |
62
+ | `/opensquad run <name>` | Load Pipeline Runner → Execute squad |
63
+ | `/opensquad edit <name> <changes>` | Load Architect → Edit Squad flow |
64
+ | `/opensquad skills` | Load Skills Engine → Show skills menu |
65
+ | `/opensquad install <name>` | Install a skill from the catalog |
66
+ | `/opensquad uninstall <name>` | Remove an installed skill |
67
+ | `/opensquad delete <name>` | Confirm and delete squad directory |
68
+ | `/opensquad edit-company` | Re-run company profile setup |
69
+ | `/opensquad show-company` | Display company.md contents |
70
+ | `/opensquad settings` | Show/edit preferences.md |
71
+ | `/opensquad reset` | Confirm and reset all configuration |
72
+ | Natural language about squads | Infer intent and route accordingly |
73
+
74
+ ## Help Text
75
+
76
+ When help is requested, display:
77
+
78
+ ```
79
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
80
+ 📘 Opensquad Help
81
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
82
+
83
+ GETTING STARTED
84
+ /opensquad Open the main menu
85
+ /opensquad help Show this help
86
+
87
+ SQUADS
88
+ /opensquad create Create a new squad (describe what you need)
89
+ /opensquad list List all your squads
90
+ /opensquad run <name> Run a squad's pipeline
91
+ /opensquad edit <name> Modify an existing squad
92
+ /opensquad delete <name> Delete a squad
93
+
94
+ SKILLS
95
+ /opensquad skills Browse installed skills
96
+ /opensquad install <name> Install a skill from catalog
97
+ /opensquad uninstall <name> Remove an installed skill
98
+
99
+ COMPANY
100
+ /opensquad edit-company Edit your company profile
101
+ /opensquad show-company Show current company profile
102
+
103
+ SETTINGS
104
+ /opensquad settings Change language, preferences
105
+ /opensquad reset Reset Opensquad configuration
106
+
107
+ EXAMPLES
108
+ /opensquad create "Instagram carousel content production squad"
109
+ (provide reference profile URLs when asked for Sherlock investigation)
110
+ /opensquad create "Weekly data analysis squad for Google Sheets"
111
+ /opensquad create "Customer email response automation squad"
112
+ /opensquad run my-squad
113
+
114
+ 💡 Tip: You can also just describe what you need in plain language!
115
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
+ ```
117
+
118
+ ## Loading Agents
119
+
120
+ When a specific agent needs to be activated (Architect, or any squad agent):
121
+
122
+ 1. Read the agent's `.agent.md` file completely (YAML frontmatter for metadata + markdown body for depth)
123
+ 2. Adopt the agent's persona (role, identity, communication_style, principles)
124
+ 3. Follow the agent's menu/workflow instructions
125
+ 4. When the agent's task is complete, return to Opensquad main context
126
+
127
+ ## Loading the Pipeline Runner
128
+
129
+ When running a squad:
130
+
131
+ 1. Read `squads/{name}/squad.yaml` to understand the pipeline
132
+ 2. Read `squads/{name}/squad-party.csv` to load all agent personas
133
+ 2b. For each agent in the party CSV, also read their full `.agent.md` file from agents/ directory
134
+ 3. Load company context from `_opensquad/_memory/company.md`
135
+ 4. Load squad memory from `squads/{name}/_memory/memories.md`
136
+ 5. Read the pipeline runner instructions from `_opensquad/core/runner.pipeline.md`
137
+ 6. Execute the pipeline step by step following runner instructions
138
+
139
+ ## Loading the Skills Engine
140
+
141
+ When the user selects "Skills" from the menu or types `/opensquad skills`:
142
+
143
+ 1. Read `_opensquad/core/skills.engine.md` for the skills engine instructions
144
+ 2. Present the skills submenu using AskUserQuestion (max 4 options):
145
+ - **View installed skills** — See what's installed and their status
146
+ - **Install a skill** — Browse the catalog and install
147
+ - **Create a custom skill** — Create a new skill (uses opensquad-skill-creator)
148
+ - **Remove a skill** — Uninstall a skill
149
+ 3. Follow the corresponding operation in the skills engine
150
+ 4. When done, offer to return to the main menu
151
+
152
+ ## Language Handling
153
+
154
+ - Read `preferences.md` for the user's preferred language
155
+ - All user-facing output should be in the user's preferred language
156
+ - Internal file names and code remain in English
157
+ - Agent personas communicate in the user's language
158
+
159
+ ## Checkpoint Handling (Claude Code)
160
+
161
+ This overrides the shared `runner.pipeline.md` checkpoint behavior for Claude Code. Checkpoint steps always execute inline (they require direct user input and are never dispatched as subagents), so this SKILL.md context is always present when a checkpoint runs.
162
+
163
+ **Rule: ALL checkpoint questions MUST use `AskUserQuestion`.** Never output a question as plain text.
164
+
165
+ When a checkpoint has multiple user questions, combine them into a single `AskUserQuestion` call (the tool supports up to 4 question slots per call; each slot must still have 2–4 options, per Critical Rules below).
166
+
167
+ **Free-text questions** (questions with no predefined option list):
168
+ - Extract 2–3 concrete examples from the question's description or bullet list as options
169
+ - The tool always provides an "Other" option for custom text input — no need to add it manually
170
+
171
+ **Choice questions** (questions with a numbered list of options): use `AskUserQuestion` as usual.
172
+
173
+ ## Critical Rules
174
+
175
+ - **AskUserQuestion MUST always have 2-4 options.** When presenting a dynamic list (squads, skills, agents, etc.) as AskUserQuestion options and only 1 item exists, ALWAYS add a fallback option like "Cancel" or "Back to menu" to ensure the minimum of 2 options. If 0 items exist, skip AskUserQuestion entirely and inform the user directly.
176
+ - NEVER skip the onboarding if company.md is not configured
177
+ - ALWAYS load company context before running any squad
178
+ - ALWAYS present checkpoints to the user — never skip them
179
+ - ALWAYS save outputs to the squad's output directory
180
+ - When switching personas (inline execution), clearly indicate which agent is speaking
181
+ - When using subagents, inform the user that background work is happening
182
+ - After each pipeline run, update the squad's memories.md only with explicit user feedback, and then re-evaluate whether the run surfaced any reusable cross-squad experience that must be registered in the appropriate shared skill or `_opensquad/core` guidance before closing the pipeline
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "playwright": {
4
+ "command": "npx",
5
+ "args": ["@playwright/mcp@latest", "--config", "_opensquad/config/playwright.config.json"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,57 @@
1
+ # Opensquad — Project Instructions
2
+
3
+ This project uses **Opensquad**, a multi-agent orchestration framework.
4
+
5
+ ## Quick Start
6
+
7
+ Type `/opensquad` to open the main menu, or use any of these commands:
8
+ - `/opensquad create` — Create a new squad
9
+ - `/opensquad run <name>` — Run a squad
10
+ - `/opensquad help` — See all commands
11
+ ## Execution & Multi-Session Continuity
12
+
13
+ When running or resuming a squad, you act as the **Pipeline Runner** (defined in `_opensquad/core/runner.pipeline.md`). You must follow these strict rules:
14
+ 1. **Check State & Environment**:
15
+ - Always read `squads/{name}/state.json` first. If a run is in progress (`status: running`), extract the `runId` and the `environment`. Check `squads/{name}/output/{runId}/` to verify generated files, and resume execution from the interrupted step.
16
+ - If starting a new run, ask the user to select the active environment: 1. Claude Code (`claude-code`), 2. VSCode + GitHub Copilot Pro (`vscode-copilot`), 3. Google Antigravity (`antigravity`), or 4. Codex / OpenCode (`opencode`). Store this selection as `environment` in `state.json`.
17
+ - If `environment` is `vscode-copilot` or `antigravity`, force all steps to run as `execution: inline` sequentially (override any `execution: subagent` settings).
18
+ 2. **JIT Context Loading**: Do not read all files at once. Read the current step md, the active agent's `.agent.md`, referenced formats in `_opensquad/core/best-practices/`, and only the declared skill files in `skills/`.
19
+ 3. **Binary Validation Gates**:
20
+ - Before a step: Run `test -s` on the `inputFile` and `contextFiles`. Halt and prompt the user if files are missing.
21
+ - After a step: Run `test -s` on `outputFile` and `requiredArtifacts`. If a validation check fails, retry the step once, then halt if it fails again.
22
+ 4. **Update state.json**: Update `state.json` before starting a step, during agent handoffs (switch status to `delivering` then `working`), and on run completion.
23
+ 5. **Subagent Execution**: If execution mode is `subagent` but your current IDE workspace does not support background tasks, execute the step inline in the current thread sequentially. Switch personas explicitly (e.g. `[Paula Pauta] - Executing Editorial Planning...`).
24
+ 6. **Post-Run Cleanup**: Upon completion, copy `state.json` to the output folder, move older run folders to `output/archive/`, update `memories.md` with explicit user corrections only, and generate the run dashboard.
25
+
26
+ ## Directory Structure
27
+
28
+ - `_opensquad/` — Opensquad core files (do not modify manually)
29
+ - `_opensquad/_memory/` — Persistent memory (company context, preferences)
30
+ - `squads/` — User-created squads
31
+ - `squads/{name}/_investigations/` — Sherlock content investigations (profile analyses)
32
+ - `squads/{name}/output/` — Generated content and files
33
+ - `_opensquad/_browser_profile/` — Persistent browser sessions (login cookies, localStorage)
34
+
35
+ ## How It Works
36
+
37
+ 1. The `/opensquad` skill is the entry point for all interactions
38
+ 2. The **Architect** agent creates and modifies squads
39
+ 3. During squad creation, the **Sherlock** investigator can analyze reference profiles (Instagram, YouTube, Twitter/X, LinkedIn) to extract real content patterns
40
+ 4. The **Pipeline Runner** executes squads automatically
41
+ 5. Agents communicate via persona switching (inline) or subagents (background)
42
+ 6. Checkpoints pause execution for user input/approval
43
+
44
+ ## Rules
45
+
46
+ - Always use `/opensquad` commands to interact with the system
47
+ - Do not manually edit files in `_opensquad/core/` unless you know what you're doing
48
+ - Squad YAML files can be edited manually if needed, but prefer using `/opensquad edit`
49
+ - Company context in `_opensquad/_memory/company.md` is loaded for every squad run
50
+
51
+ ## Browser Sessions
52
+
53
+ Opensquad uses a persistent Playwright browser profile to keep you logged into social media platforms.
54
+ - Sessions are stored in `_opensquad/_browser_profile/` (gitignored, private to you)
55
+ - First time accessing a platform, you'll log in manually once
56
+ - Subsequent runs will reuse your saved session
57
+ - **Important:** The native Claude Code Playwright plugin must be disabled. Opensquad uses its own `@playwright/mcp` server configured in `.mcp.json`.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: opensquad
3
+ description: Run Opensquad — multi-agent orchestration. Use when the user types /opensquad or asks to create, run, or manage squads.
4
+ ---
5
+
6
+ Read `AGENTS.md` at the project root and adopt the Opensquad system role. Follow all initialization, command routing, and workflow instructions defined there.