crewly 1.5.10 → 1.5.12

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 (177) hide show
  1. package/config/constants.ts +3 -3
  2. package/config/orchestrator_tasks/prompts/orchestrator-prompt.md +73 -0
  3. package/config/roles/architect/prompt.md +9 -0
  4. package/config/roles/backend-developer/prompt.md +9 -0
  5. package/config/roles/content-strategist/prompt.md +10 -0
  6. package/config/roles/designer/prompt.md +9 -0
  7. package/config/roles/developer/prompt.md +9 -0
  8. package/config/roles/frontend-developer/prompt.md +9 -0
  9. package/config/roles/fullstack-dev/prompt.md +9 -0
  10. package/config/roles/generalist/prompt.md +9 -0
  11. package/config/roles/ops/prompt.md +9 -0
  12. package/config/roles/product-manager/prompt.md +9 -0
  13. package/config/roles/qa/prompt.md +9 -0
  14. package/config/roles/qa-engineer/prompt.md +9 -0
  15. package/config/roles/researcher/prompt.md +9 -0
  16. package/config/roles/sales/prompt.md +9 -0
  17. package/config/roles/support/prompt.md +9 -0
  18. package/config/roles/team-leader/prompt.md +11 -0
  19. package/config/roles/tpm/prompt.md +9 -0
  20. package/config/roles/ux-designer/prompt.md +9 -0
  21. package/config/skills/agent/core/block-task/execute.sh +3 -1
  22. package/config/skills/agent/core/pipe-to-sink/execute.sh +41 -0
  23. package/config/skills/agent/core/read-task/execute.sh +3 -1
  24. package/config/skills/agent/core/report-progress/execute.sh +3 -1
  25. package/config/skills/agent/screenshot-compare/SKILL.md +75 -0
  26. package/config/skills/agent/screenshot-compare/execute.sh +182 -0
  27. package/config/skills/agent/screenshot-compare/skill.json +10 -0
  28. package/config/skills/agent/xiaoyuzhoufm-transcript/SKILL.md +85 -0
  29. package/config/skills/agent/xiaoyuzhoufm-transcript/execute.sh +306 -0
  30. package/config/skills/agent/xiaoyuzhoufm-transcript/skill.json +10 -0
  31. package/config/skills/orchestrator/cancel-cron/SKILL.md +44 -0
  32. package/config/skills/orchestrator/create-cron/SKILL.md +58 -0
  33. package/config/skills/orchestrator/list-cron/SKILL.md +51 -0
  34. package/config/skills/orchestrator/update-cron/SKILL.md +52 -0
  35. package/config/skills/orchestrator/update-team-member/SKILL.md +36 -0
  36. package/config/skills/orchestrator/update-team-member/execute.sh +25 -0
  37. package/dist/backend/backend/src/constants.d.ts +7 -4
  38. package/dist/backend/backend/src/constants.d.ts.map +1 -1
  39. package/dist/backend/backend/src/constants.js +6 -3
  40. package/dist/backend/backend/src/constants.js.map +1 -1
  41. package/dist/backend/backend/src/controllers/browser/browser.controller.d.ts +21 -2
  42. package/dist/backend/backend/src/controllers/browser/browser.controller.d.ts.map +1 -1
  43. package/dist/backend/backend/src/controllers/browser/browser.controller.js +167 -29
  44. package/dist/backend/backend/src/controllers/browser/browser.controller.js.map +1 -1
  45. package/dist/backend/backend/src/controllers/browser/browser.routes.d.ts +1 -1
  46. package/dist/backend/backend/src/controllers/browser/browser.routes.d.ts.map +1 -1
  47. package/dist/backend/backend/src/controllers/browser/browser.routes.js +7 -3
  48. package/dist/backend/backend/src/controllers/browser/browser.routes.js.map +1 -1
  49. package/dist/backend/backend/src/controllers/data/data.controller.d.ts +47 -0
  50. package/dist/backend/backend/src/controllers/data/data.controller.d.ts.map +1 -0
  51. package/dist/backend/backend/src/controllers/data/data.controller.js +201 -0
  52. package/dist/backend/backend/src/controllers/data/data.controller.js.map +1 -0
  53. package/dist/backend/backend/src/controllers/data/data.routes.d.ts +18 -0
  54. package/dist/backend/backend/src/controllers/data/data.routes.d.ts.map +1 -0
  55. package/dist/backend/backend/src/controllers/data/data.routes.js +44 -0
  56. package/dist/backend/backend/src/controllers/data/data.routes.js.map +1 -0
  57. package/dist/backend/backend/src/controllers/monitoring/token-usage.controller.d.ts +3 -2
  58. package/dist/backend/backend/src/controllers/monitoring/token-usage.controller.d.ts.map +1 -1
  59. package/dist/backend/backend/src/controllers/monitoring/token-usage.controller.js +5 -3
  60. package/dist/backend/backend/src/controllers/monitoring/token-usage.controller.js.map +1 -1
  61. package/dist/backend/backend/src/controllers/system/cron-task.controller.d.ts +4 -0
  62. package/dist/backend/backend/src/controllers/system/cron-task.controller.d.ts.map +1 -1
  63. package/dist/backend/backend/src/controllers/system/cron-task.controller.js +20 -0
  64. package/dist/backend/backend/src/controllers/system/cron-task.controller.js.map +1 -1
  65. package/dist/backend/backend/src/controllers/task-management/task-management.controller.d.ts.map +1 -1
  66. package/dist/backend/backend/src/controllers/task-management/task-management.controller.js +18 -0
  67. package/dist/backend/backend/src/controllers/task-management/task-management.controller.js.map +1 -1
  68. package/dist/backend/backend/src/controllers/team/team-export.controller.d.ts +32 -0
  69. package/dist/backend/backend/src/controllers/team/team-export.controller.d.ts.map +1 -0
  70. package/dist/backend/backend/src/controllers/team/team-export.controller.js +61 -0
  71. package/dist/backend/backend/src/controllers/team/team-export.controller.js.map +1 -0
  72. package/dist/backend/backend/src/controllers/team/team.controller.d.ts.map +1 -1
  73. package/dist/backend/backend/src/controllers/team/team.controller.js +66 -46
  74. package/dist/backend/backend/src/controllers/team/team.controller.js.map +1 -1
  75. package/dist/backend/backend/src/controllers/team/team.routes.d.ts.map +1 -1
  76. package/dist/backend/backend/src/controllers/team/team.routes.js +7 -0
  77. package/dist/backend/backend/src/controllers/team/team.routes.js.map +1 -1
  78. package/dist/backend/backend/src/index.d.ts.map +1 -1
  79. package/dist/backend/backend/src/index.js +37 -7
  80. package/dist/backend/backend/src/index.js.map +1 -1
  81. package/dist/backend/backend/src/routes/api.routes.d.ts.map +1 -1
  82. package/dist/backend/backend/src/routes/api.routes.js +4 -1
  83. package/dist/backend/backend/src/routes/api.routes.js.map +1 -1
  84. package/dist/backend/backend/src/services/agent/agent-registration.service.d.ts.map +1 -1
  85. package/dist/backend/backend/src/services/agent/agent-registration.service.js +6 -2
  86. package/dist/backend/backend/src/services/agent/agent-registration.service.js.map +1 -1
  87. package/dist/backend/backend/src/services/agent/idle-detection.service.d.ts.map +1 -1
  88. package/dist/backend/backend/src/services/agent/idle-detection.service.js +17 -2
  89. package/dist/backend/backend/src/services/agent/idle-detection.service.js.map +1 -1
  90. package/dist/backend/backend/src/services/agent/runtime-agent.service.abstract.d.ts +1 -1
  91. package/dist/backend/backend/src/services/agent/runtime-agent.service.abstract.js +2 -2
  92. package/dist/backend/backend/src/services/agent/runtime-agent.service.abstract.js.map +1 -1
  93. package/dist/backend/backend/src/services/agent/task-planning.service.d.ts +134 -0
  94. package/dist/backend/backend/src/services/agent/task-planning.service.d.ts.map +1 -0
  95. package/dist/backend/backend/src/services/agent/task-planning.service.js +291 -0
  96. package/dist/backend/backend/src/services/agent/task-planning.service.js.map +1 -0
  97. package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.d.ts.map +1 -1
  98. package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.js +8 -0
  99. package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.js.map +1 -1
  100. package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.d.ts.map +1 -1
  101. package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.js +3 -3
  102. package/dist/backend/backend/src/services/ai/prompt-modules/skills-reference.module.js.map +1 -1
  103. package/dist/backend/backend/src/services/browser/browser-bridge.service.d.ts +13 -9
  104. package/dist/backend/backend/src/services/browser/browser-bridge.service.d.ts.map +1 -1
  105. package/dist/backend/backend/src/services/browser/browser-bridge.service.js +44 -12
  106. package/dist/backend/backend/src/services/browser/browser-bridge.service.js.map +1 -1
  107. package/dist/backend/backend/src/services/browser/browser-proxy.service.d.ts +176 -0
  108. package/dist/backend/backend/src/services/browser/browser-proxy.service.d.ts.map +1 -0
  109. package/dist/backend/backend/src/services/browser/browser-proxy.service.js +441 -0
  110. package/dist/backend/backend/src/services/browser/browser-proxy.service.js.map +1 -0
  111. package/dist/backend/backend/src/services/browser/browser-relay-adapter.service.d.ts +162 -0
  112. package/dist/backend/backend/src/services/browser/browser-relay-adapter.service.d.ts.map +1 -0
  113. package/dist/backend/backend/src/services/browser/browser-relay-adapter.service.js +350 -0
  114. package/dist/backend/backend/src/services/browser/browser-relay-adapter.service.js.map +1 -0
  115. package/dist/backend/backend/src/services/cloud/cloud-initializer.d.ts +8 -0
  116. package/dist/backend/backend/src/services/cloud/cloud-initializer.d.ts.map +1 -1
  117. package/dist/backend/backend/src/services/cloud/cloud-initializer.js +27 -0
  118. package/dist/backend/backend/src/services/cloud/cloud-initializer.js.map +1 -1
  119. package/dist/backend/backend/src/services/cloud/cloud-sync.types.d.ts +1 -1
  120. package/dist/backend/backend/src/services/cloud/cloud-sync.types.d.ts.map +1 -1
  121. package/dist/backend/backend/src/services/cloud/cloud-sync.types.js +2 -0
  122. package/dist/backend/backend/src/services/cloud/cloud-sync.types.js.map +1 -1
  123. package/dist/backend/backend/src/services/core/team-export.service.d.ts +103 -0
  124. package/dist/backend/backend/src/services/core/team-export.service.d.ts.map +1 -0
  125. package/dist/backend/backend/src/services/core/team-export.service.js +182 -0
  126. package/dist/backend/backend/src/services/core/team-export.service.js.map +1 -0
  127. package/dist/backend/backend/src/services/data/data-object-store.service.d.ts +160 -0
  128. package/dist/backend/backend/src/services/data/data-object-store.service.d.ts.map +1 -0
  129. package/dist/backend/backend/src/services/data/data-object-store.service.js +434 -0
  130. package/dist/backend/backend/src/services/data/data-object-store.service.js.map +1 -0
  131. package/dist/backend/backend/src/services/data/data-object.types.d.ts +190 -0
  132. package/dist/backend/backend/src/services/data/data-object.types.d.ts.map +1 -0
  133. package/dist/backend/backend/src/services/data/data-object.types.js +143 -0
  134. package/dist/backend/backend/src/services/data/data-object.types.js.map +1 -0
  135. package/dist/backend/backend/src/services/data/schema-registry.service.d.ts +108 -0
  136. package/dist/backend/backend/src/services/data/schema-registry.service.d.ts.map +1 -0
  137. package/dist/backend/backend/src/services/data/schema-registry.service.js +290 -0
  138. package/dist/backend/backend/src/services/data/schema-registry.service.js.map +1 -0
  139. package/dist/backend/backend/src/services/data/sink-registry.service.d.ts +87 -0
  140. package/dist/backend/backend/src/services/data/sink-registry.service.d.ts.map +1 -0
  141. package/dist/backend/backend/src/services/data/sink-registry.service.js +188 -0
  142. package/dist/backend/backend/src/services/data/sink-registry.service.js.map +1 -0
  143. package/dist/backend/backend/src/services/messaging/message-router.service.d.ts.map +1 -1
  144. package/dist/backend/backend/src/services/messaging/message-router.service.js +7 -0
  145. package/dist/backend/backend/src/services/messaging/message-router.service.js.map +1 -1
  146. package/dist/backend/backend/src/services/monitoring/token-usage.service.d.ts +55 -2
  147. package/dist/backend/backend/src/services/monitoring/token-usage.service.d.ts.map +1 -1
  148. package/dist/backend/backend/src/services/monitoring/token-usage.service.js +89 -5
  149. package/dist/backend/backend/src/services/monitoring/token-usage.service.js.map +1 -1
  150. package/dist/backend/backend/src/services/session/pty/pty-session-backend.js +1 -1
  151. package/dist/backend/backend/src/services/session/pty/pty-session-backend.js.map +1 -1
  152. package/dist/backend/backend/src/services/workflow/cron-task.service.d.ts +105 -14
  153. package/dist/backend/backend/src/services/workflow/cron-task.service.d.ts.map +1 -1
  154. package/dist/backend/backend/src/services/workflow/cron-task.service.js +400 -123
  155. package/dist/backend/backend/src/services/workflow/cron-task.service.js.map +1 -1
  156. package/dist/backend/backend/src/types/cron-task.types.d.ts +1 -1
  157. package/dist/backend/backend/src/types/data-object.types.d.ts +117 -0
  158. package/dist/backend/backend/src/types/data-object.types.d.ts.map +1 -0
  159. package/dist/backend/backend/src/types/data-object.types.js +23 -0
  160. package/dist/backend/backend/src/types/data-object.types.js.map +1 -0
  161. package/dist/backend/backend/src/types/settings.types.js +1 -1
  162. package/dist/backend/config/constants.d.ts +3 -3
  163. package/dist/backend/config/constants.js +3 -3
  164. package/dist/backend/config/constants.js.map +1 -1
  165. package/dist/cli/backend/src/constants.d.ts +7 -4
  166. package/dist/cli/backend/src/constants.d.ts.map +1 -1
  167. package/dist/cli/backend/src/constants.js +6 -3
  168. package/dist/cli/backend/src/constants.js.map +1 -1
  169. package/dist/cli/backend/src/types/settings.types.js +1 -1
  170. package/dist/cli/config/constants.d.ts +3 -3
  171. package/dist/cli/config/constants.js +3 -3
  172. package/dist/cli/config/constants.js.map +1 -1
  173. package/frontend/dist/assets/index-371b68d4.css +33 -0
  174. package/frontend/dist/assets/{index-76782e9e.js → index-506f70da.js} +321 -321
  175. package/frontend/dist/index.html +2 -2
  176. package/package.json +1 -1
  177. package/frontend/dist/assets/index-b19b2478.css +0 -33
@@ -856,7 +856,7 @@ export const AGENT_HEARTBEAT_MONITOR_CONSTANTS = {
856
856
  */
857
857
  export const AGENT_SUSPEND_CONSTANTS = {
858
858
  /** Default idle timeout in minutes before an agent is suspended (0 = disabled) */
859
- DEFAULT_IDLE_TIMEOUT_MINUTES: 10,
859
+ DEFAULT_IDLE_TIMEOUT_MINUTES: 30,
860
860
  /** Interval between idle checks in milliseconds (2 minutes) */
861
861
  IDLE_CHECK_INTERVAL_MS: 120_000,
862
862
  /** Maximum age of debug log files eligible for cleanup on suspend (hours) */
@@ -869,8 +869,8 @@ export const AGENT_SUSPEND_CONSTANTS = {
869
869
  STARTED_AGENT_IDLE_TIMEOUT_MINUTES: 15,
870
870
  /** Roles that should never be auto-stopped (always-on) */
871
871
  ALWAYS_ON_ROLES: ['orchestrator', 'auditor'] as const,
872
- /** Idle timeout in ms before a worker agent is stopped (default 10 min) */
873
- AGENT_IDLE_STOP_TIMEOUT_MS: 600_000,
872
+ /** Idle timeout in ms before a worker agent is stopped (default 30 min) */
873
+ AGENT_IDLE_STOP_TIMEOUT_MS: 1_800_000,
874
874
  } as const;
875
875
 
876
876
  // ========================= SERVER PROCESS CONSTANTS =========================
@@ -74,6 +74,21 @@ bash {{ORCHESTRATOR_SKILLS_PATH}}/reply-chat/execute.sh '{"conversationId":"spac
74
74
 
75
75
  Keep responses concise for Slack and Google Chat (use emojis sparingly: ✅ ❌ ⏳).
76
76
 
77
+ ### Acknowledge-First Rule (MANDATORY)
78
+
79
+ When you receive a message from the user (via Slack, Chat UI, or Google Chat):
80
+ 1. **Immediately acknowledge** — Reply on the **same channel** confirming you received the message (e.g., "Got it, working on this now" or "Received, let me check")
81
+ 2. **Then execute** — Start working on the task after the acknowledgment is sent
82
+ 3. **Never work silently** — The user should always see an immediate response before you start any long-running work (delegation, research, code changes)
83
+
84
+ This prevents the user from wondering if their message was received. The acknowledgment should be sent within seconds, not after task completion.
85
+
86
+ ### Non-Blocking Skill Execution
87
+
88
+ When running skills that delegate work to other agents (e.g., `delegate-task`, `send-message`, `start-agent`), these are **fire-and-forget** operations — you do NOT need to wait for the agent to complete the work before continuing. The skill script itself returns quickly (within seconds). Only `get-agent-logs` and `get-team-status` may take slightly longer as they query live state.
89
+
90
+ **Best practice:** After delegating a task, immediately proceed to the next action (e.g., reply to the user, delegate the next task) rather than waiting to see if the agent started working.
91
+
77
92
  ### Checking Crewly Status
78
93
 
79
94
  Use the **bash skill scripts**:
@@ -123,6 +138,64 @@ Your agents have MCP tools and skills that give them access to external services
123
138
 
124
139
  **You are a manager, not a security gate.** The user owns the system and has configured their agents' access. Trust their setup. Your job is to route the request to the right agent, not to second-guess whether the agent should have access.
125
140
 
141
+ ### Crewly Cron System — Built-in Recurring Tasks
142
+
143
+ Crewly has a **built-in cron task system** for scheduling recurring work. **Always use this instead of session-scoped tools like CronCreate** — session tools are lost when the session ends, but Crewly cron tasks persist across restarts.
144
+
145
+ #### How It Works
146
+ - The cron evaluator runs every **60 seconds** on the Crewly backend (localhost:8787)
147
+ - When a cron expression matches, the system **sends `taskDescription` as a message** to the `targetAgent`
148
+ - If the target agent is **offline**, the system **auto-starts** it before delivering the task
149
+ - Tasks are stored per-team in `~/.crewly/teams/{teamId}/cron-tasks.json`
150
+ - Supports **IANA timezones** (e.g., `Asia/Shanghai`, `America/New_York`, `UTC`)
151
+
152
+ #### Cron Skills (use these!)
153
+
154
+ ```bash
155
+ # Create a recurring task
156
+ bash {{ORCHESTRATOR_SKILLS_PATH}}/create-cron/execute.sh '{"cronExpression":"0 9 * * 1-5","timezone":"Asia/Shanghai","targetAgent":"agent-session","targetTeamId":"team-uuid","taskDescription":"Generate daily standup report"}'
157
+
158
+ # List all cron tasks (optionally filter by agent or enabled)
159
+ bash {{ORCHESTRATOR_SKILLS_PATH}}/list-cron/execute.sh
160
+ bash {{ORCHESTRATOR_SKILLS_PATH}}/list-cron/execute.sh '{"targetAgent":"agent-session"}'
161
+
162
+ # Update a cron task (change schedule, description, or enable/disable)
163
+ bash {{ORCHESTRATOR_SKILLS_PATH}}/update-cron/execute.sh '{"id":"cron-xxx","cronExpression":"0 10 * * *"}'
164
+ bash {{ORCHESTRATOR_SKILLS_PATH}}/update-cron/execute.sh '{"id":"cron-xxx","enabled":false}'
165
+
166
+ # Delete a cron task permanently
167
+ bash {{ORCHESTRATOR_SKILLS_PATH}}/cancel-cron/execute.sh '{"id":"cron-xxx"}'
168
+ ```
169
+
170
+ #### API Endpoints (for reference)
171
+ | Method | Endpoint | Description |
172
+ |--------|----------|-------------|
173
+ | POST | `/api/cron-tasks` | Create a cron task |
174
+ | GET | `/api/cron-tasks` | List all cron tasks (supports `?targetAgent=` and `?enabled=` filters) |
175
+ | PATCH | `/api/cron-tasks/:id` | Update a cron task |
176
+ | DELETE | `/api/cron-tasks/:id` | Delete a cron task |
177
+
178
+ #### Required Fields for Creation
179
+ | Field | Description |
180
+ |-------|-------------|
181
+ | `cronExpression` | 5-field cron (minute hour day month weekday) |
182
+ | `timezone` | IANA timezone string (default: UTC) |
183
+ | `targetAgent` | Session name of the target agent |
184
+ | `targetTeamId` | Team ID the agent belongs to |
185
+ | `taskDescription` | Message/task sent to the agent on each trigger |
186
+ | `createdBy` | Who created it (use `"orchestrator"`) |
187
+
188
+ #### Common Cron Expressions
189
+ | Expression | Meaning |
190
+ |------------|---------|
191
+ | `0 9 * * 1-5` | 9:00 AM weekdays |
192
+ | `*/30 * * * *` | Every 30 minutes |
193
+ | `0 0 * * 0` | Midnight every Sunday |
194
+ | `0 8,17 * * *` | 8 AM and 5 PM daily |
195
+ | `0 9 * * 1` | 9 AM every Monday |
196
+
197
+ ⚠️ **IMPORTANT:** Never use Claude's built-in `CronCreate` tool for recurring tasks — those are session-scoped and lost on restart. Always use the Crewly cron skills above.
198
+
126
199
  ### Self-Improvement
127
200
  You have access to the `self_improve` tool to safely modify the Crewly codebase:
128
201
  - Always create a plan before making changes
@@ -96,6 +96,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
96
96
  4. **Store project knowledge with `scope: project`** so other agents can benefit
97
97
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
98
98
 
99
+ ## Recurring Tasks (Cron System)
100
+
101
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
102
+
103
+ - You will receive the task description as a normal message in your terminal
104
+ - Treat it like any other task from the orchestrator — execute it and report results
105
+ - If you were offline, Crewly auto-started you to deliver the task
106
+
107
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
99
108
  After checking in, just say "Ready for tasks" and wait for me to send you work.
100
109
 
101
110
  ## Error Learning Protocol
@@ -113,6 +113,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
113
113
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
114
114
  ```
115
115
 
116
+ ## Recurring Tasks (Cron System)
117
+
118
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
119
+
120
+ - You will receive the task description as a normal message in your terminal
121
+ - Treat it like any other task from the orchestrator — execute it and report results
122
+ - If you were offline, Crewly auto-started you to deliver the task
123
+
124
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
116
125
  After checking in, just say "Ready for tasks" and wait for me to send you work.
117
126
 
118
127
  ## Error Learning Protocol
@@ -71,3 +71,13 @@ When you encounter an error and successfully resolve it:
71
71
  1. Immediately run `record-learning` with the exact error, fix, and environment context.
72
72
  2. If the fix is broadly reusable, store it with `remember` at project scope so other agents inherit it.
73
73
  3. Do not finish the task without recording at least one actionable learning when debugging occurred.
74
+
75
+ ## Recurring Tasks (Cron System)
76
+
77
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
78
+
79
+ - You will receive the task description as a normal message in your terminal
80
+ - Treat it like any other task from the orchestrator — execute it and report results
81
+ - If you were offline, Crewly auto-started you to deliver the task
82
+
83
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
@@ -95,6 +95,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
95
95
  4. **Store project knowledge with `scope: project`** so other agents can benefit
96
96
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
97
97
 
98
+ ## Recurring Tasks (Cron System)
99
+
100
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
101
+
102
+ - You will receive the task description as a normal message in your terminal
103
+ - Treat it like any other task from the orchestrator — execute it and report results
104
+ - If you were offline, Crewly auto-started you to deliver the task
105
+
106
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
98
107
  After checking in, just say "Ready for tasks" and wait for me to send you work.
99
108
 
100
109
  ## Error Learning Protocol
@@ -124,6 +124,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
124
124
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
125
125
  ```
126
126
 
127
+ ## Recurring Tasks (Cron System)
128
+
129
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
130
+
131
+ - You will receive the task description as a normal message in your terminal
132
+ - Treat it like any other task from the orchestrator — execute it and report results
133
+ - If you were offline, Crewly auto-started you to deliver the task
134
+
135
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
127
136
  After checking in, just say "Ready for tasks" and wait for me to send you work.
128
137
 
129
138
  ## Error Learning Protocol
@@ -113,6 +113,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
113
113
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
114
114
  ```
115
115
 
116
+ ## Recurring Tasks (Cron System)
117
+
118
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
119
+
120
+ - You will receive the task description as a normal message in your terminal
121
+ - Treat it like any other task from the orchestrator — execute it and report results
122
+ - If you were offline, Crewly auto-started you to deliver the task
123
+
124
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
116
125
  After checking in, just say "Ready for tasks" and wait for me to send you work.
117
126
 
118
127
  ## Error Learning Protocol
@@ -113,6 +113,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
113
113
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
114
114
  ```
115
115
 
116
+ ## Recurring Tasks (Cron System)
117
+
118
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
119
+
120
+ - You will receive the task description as a normal message in your terminal
121
+ - Treat it like any other task from the orchestrator — execute it and report results
122
+ - If you were offline, Crewly auto-started you to deliver the task
123
+
124
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
116
125
  After checking in, just say "Ready for tasks" and wait for me to send you work.
117
126
 
118
127
  ## Error Learning Protocol
@@ -103,4 +103,13 @@ You have bash skills that let you store and retrieve knowledge that persists acr
103
103
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
104
104
  6. **Store cross-agent user preferences with `scope: project` + `category: user_preference`**
105
105
 
106
+ ## Recurring Tasks (Cron System)
107
+
108
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
109
+
110
+ - You will receive the task description as a normal message in your terminal
111
+ - Treat it like any other task from the orchestrator — execute it and report results
112
+ - If you were offline, Crewly auto-started you to deliver the task
113
+
114
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
106
115
  After checking in, just say "Ready for tasks" and wait for me to send you work.
@@ -127,6 +127,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
127
127
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
128
128
  ```
129
129
 
130
+ ## Recurring Tasks (Cron System)
131
+
132
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
133
+
134
+ - You will receive the task description as a normal message in your terminal
135
+ - Treat it like any other task from the orchestrator — execute it and report results
136
+ - If you were offline, Crewly auto-started you to deliver the task
137
+
138
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
130
139
  After checking in, just say "Ready for tasks" and wait for me to send you work.
131
140
 
132
141
  ## Error Learning Protocol
@@ -100,6 +100,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
100
100
 
101
101
  ## Startup Protocol (#143)
102
102
 
103
+ ## Recurring Tasks (Cron System)
104
+
105
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
106
+
107
+ - You will receive the task description as a normal message in your terminal
108
+ - Treat it like any other task from the orchestrator — execute it and report results
109
+ - If you were offline, Crewly auto-started you to deliver the task
110
+
111
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
103
112
  After checking in, **before** saying "Ready for tasks", perform these startup steps:
104
113
 
105
114
  1. **Recall active goals** — Run `recall` with context "active goals, roadmap, pending work, sprint status" to load previous knowledge about what needs to be done.
@@ -113,6 +113,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
113
113
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
114
114
  ```
115
115
 
116
+ ## Recurring Tasks (Cron System)
117
+
118
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
119
+
120
+ - You will receive the task description as a normal message in your terminal
121
+ - Treat it like any other task from the orchestrator — execute it and report results
122
+ - If you were offline, Crewly auto-started you to deliver the task
123
+
124
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
116
125
  After checking in, just say "Ready for tasks" and wait for me to send you work.
117
126
 
118
127
  ## Error Learning Protocol
@@ -113,6 +113,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
113
113
  bash {{AGENT_SKILLS_PATH}}/core/record-learning/execute.sh '{"agentId":"{{SESSION_NAME}}","agentRole":"{{ROLE}}","projectPath":"{{PROJECT_PATH}}","learning":"Current progress: [what was done]. Remaining: [what is left]. Key findings: [important notes]"}'
114
114
  ```
115
115
 
116
+ ## Recurring Tasks (Cron System)
117
+
118
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
119
+
120
+ - You will receive the task description as a normal message in your terminal
121
+ - Treat it like any other task from the orchestrator — execute it and report results
122
+ - If you were offline, Crewly auto-started you to deliver the task
123
+
124
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
116
125
  After checking in, just say "Ready for tasks" and wait for me to send you work.
117
126
 
118
127
  ## Error Learning Protocol
@@ -96,6 +96,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
96
96
  4. **Store project knowledge with `scope: project`** so other agents can benefit
97
97
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
98
98
 
99
+ ## Recurring Tasks (Cron System)
100
+
101
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
102
+
103
+ - You will receive the task description as a normal message in your terminal
104
+ - Treat it like any other task from the orchestrator — execute it and report results
105
+ - If you were offline, Crewly auto-started you to deliver the task
106
+
107
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
99
108
  After checking in, just say "Ready for tasks" and wait for me to send you work.
100
109
 
101
110
  ## Error Learning Protocol
@@ -95,6 +95,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
95
95
  4. **Store project knowledge with `scope: project`** so other agents can benefit
96
96
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
97
97
 
98
+ ## Recurring Tasks (Cron System)
99
+
100
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
101
+
102
+ - You will receive the task description as a normal message in your terminal
103
+ - Treat it like any other task from the orchestrator — execute it and report results
104
+ - If you were offline, Crewly auto-started you to deliver the task
105
+
106
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
98
107
  After checking in, just say "Ready for tasks" and wait for me to send you work.
99
108
 
100
109
  ## Error Learning Protocol
@@ -95,6 +95,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
95
95
  4. **Store project knowledge with `scope: project`** so other agents can benefit
96
96
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
97
97
 
98
+ ## Recurring Tasks (Cron System)
99
+
100
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
101
+
102
+ - You will receive the task description as a normal message in your terminal
103
+ - Treat it like any other task from the orchestrator — execute it and report results
104
+ - If you were offline, Crewly auto-started you to deliver the task
105
+
106
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
98
107
  After checking in, just say "Ready for tasks" and wait for me to send you work.
99
108
 
100
109
  ## Error Learning Protocol
@@ -18,6 +18,8 @@ You are a **Team Leader** (hierarchyLevel=1) responsible for managing a sub-team
18
18
 
19
19
  **Core identity**: You are a manager, not an individual contributor. Your first reaction should be "Who is best suited for this?" — not "How do I write this code/content myself?" Delegate 90% of execution tasks to your workers. Only handle complex coordination yourself.
20
20
 
21
+ **Worker activation**: Before delegating a task, check worker status via `get-team-status`. If the target worker is **inactive**, use `start-agent` to activate them first, then wait for them to report ready before delegating. Never skip delegation just because workers are offline — wake them up.
22
+
21
23
  **Hierarchy position**: You report directly to the Orchestrator and manage all workers whose `parentMemberId` points to you.
22
24
 
23
25
  ## Your Workers
@@ -185,4 +187,13 @@ Please run the register-self skill to let the team dashboard know you're availab
185
187
  bash {{AGENT_SKILLS_PATH}}/core/register-self/execute.sh '{"role":"{{ROLE}}","sessionName":"{{SESSION_NAME}}"}'
186
188
  ```
187
189
 
190
+ ## Recurring Tasks (Cron System)
191
+
192
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
193
+
194
+ - You will receive the task description as a normal message in your terminal
195
+ - Treat it like any other task from the orchestrator — execute it and report results
196
+ - If you were offline, Crewly auto-started you to deliver the task
197
+
198
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
188
199
  After checking in, say "Ready for tasks" and wait for the Orchestrator to send you work.
@@ -96,6 +96,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
96
96
  4. **Store project knowledge with `scope: project`** so other agents can benefit
97
97
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
98
98
 
99
+ ## Recurring Tasks (Cron System)
100
+
101
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
102
+
103
+ - You will receive the task description as a normal message in your terminal
104
+ - Treat it like any other task from the orchestrator — execute it and report results
105
+ - If you were offline, Crewly auto-started you to deliver the task
106
+
107
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
99
108
  After checking in, just say "Ready for tasks" and wait for me to send you work.
100
109
 
101
110
  ## Error Learning Protocol
@@ -97,6 +97,15 @@ You have bash skills that let you store and retrieve knowledge that persists acr
97
97
  4. **Store project knowledge with `scope: project`** so other agents can benefit
98
98
  5. **Store personal knowledge with `scope: agent`** for role-specific learnings
99
99
 
100
+ ## Recurring Tasks (Cron System)
101
+
102
+ Your team has a built-in cron system. The orchestrator or user can schedule recurring tasks that are automatically sent to you on a schedule (e.g., daily reports, weekly checks). When a cron task fires:
103
+
104
+ - You will receive the task description as a normal message in your terminal
105
+ - Treat it like any other task from the orchestrator — execute it and report results
106
+ - If you were offline, Crewly auto-started you to deliver the task
107
+
108
+ You do not need to manage cron tasks yourself — the orchestrator handles creation and scheduling. If you need a recurring task set up, ask the orchestrator.
100
109
  After checking in, just say "Ready for tasks" and wait for me to send you work.
101
110
 
102
111
  ## Error Learning Protocol
@@ -16,10 +16,12 @@ require_param "reason" "$REASON"
16
16
 
17
17
  BODY=$(jq -n \
18
18
  --arg absoluteTaskPath "$ABSOLUTE_TASK_PATH" \
19
+ --arg taskPath "$ABSOLUTE_TASK_PATH" \
19
20
  --arg reason "$REASON" \
21
+ --arg blockReason "$REASON" \
20
22
  --arg questions "$QUESTIONS" \
21
23
  --arg urgency "$URGENCY" \
22
- '{absoluteTaskPath: $absoluteTaskPath, reason: $reason} +
24
+ '{absoluteTaskPath: $absoluteTaskPath, taskPath: $taskPath, reason: $reason, blockReason: $blockReason} +
23
25
  (if $questions != "" then {questions: $questions} else {} end) +
24
26
  (if $urgency != "" then {urgency: $urgency} else {} end)')
25
27
 
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+ # pipe-to-sink: Route structured data to a registered sink via the Data API.
3
+ #
4
+ # Input (JSON):
5
+ # {
6
+ # "sinkId": "steve-inputs",
7
+ # "data": { "title": "...", "source": "slack", ... },
8
+ # "projectPath": "/path/to/project" (optional — falls back to CREWLY_PROJECT_PATH)
9
+ # }
10
+ #
11
+ # Calls: POST /api/v2/data/sinks/:sinkId
12
+ # Returns: JSON with the created DataObject ID on success, or error details.
13
+ set -euo pipefail
14
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15
+ source "${SCRIPT_DIR}/../../_common/lib.sh"
16
+
17
+ INPUT=$(read_json_input "${1:-}")
18
+ [ -z "$INPUT" ] && error_exit "Usage: execute.sh '{\"sinkId\":\"...\",\"data\":{...}}' or echo '{...}' | execute.sh"
19
+
20
+ SINK_ID=$(printf '%s' "$INPUT" | jq -r '.sinkId // empty')
21
+ require_param "sinkId" "$SINK_ID"
22
+
23
+ DATA=$(printf '%s' "$INPUT" | jq '.data // empty')
24
+ if [ "$DATA" = "null" ] || [ "$DATA" = "" ] || [ "$DATA" = "empty" ]; then
25
+ error_exit "Missing required parameter: data"
26
+ fi
27
+
28
+ # Resolve projectPath: explicit > env var > omit
29
+ PROJECT_PATH=$(printf '%s' "$INPUT" | jq -r '.projectPath // empty')
30
+ if [ -z "$PROJECT_PATH" ] && [ -n "${CREWLY_PROJECT_PATH:-}" ]; then
31
+ PROJECT_PATH="$CREWLY_PROJECT_PATH"
32
+ fi
33
+
34
+ # Build request body
35
+ BODY=$(jq -n \
36
+ --argjson data "$DATA" \
37
+ --arg projectPath "$PROJECT_PATH" \
38
+ '{data: $data} + (if $projectPath != "" then {projectPath: $projectPath} else {} end)')
39
+
40
+ # POST to the data API
41
+ api_call POST "/v2/data/sinks/${SINK_ID}" "$BODY"
@@ -10,6 +10,8 @@ INPUT=$(read_json_input "${1:-}")
10
10
  ABSOLUTE_TASK_PATH=$(printf '%s' "$INPUT" | jq -r '.absoluteTaskPath // empty')
11
11
  require_param "absoluteTaskPath" "$ABSOLUTE_TASK_PATH"
12
12
 
13
- BODY=$(jq -n --arg absoluteTaskPath "$ABSOLUTE_TASK_PATH" '{absoluteTaskPath: $absoluteTaskPath}')
13
+ BODY=$(jq -n --arg absoluteTaskPath "$ABSOLUTE_TASK_PATH" \
14
+ --arg taskPath "$ABSOLUTE_TASK_PATH" \
15
+ '{absoluteTaskPath: $absoluteTaskPath, taskPath: $taskPath}')
14
16
 
15
17
  api_call POST "/task-management/read-task" "$BODY"
@@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
5
  source "${SCRIPT_DIR}/../../_common/lib.sh"
6
6
 
7
7
  INPUT=$(read_json_input "${1:-}")
8
- [ -z "$INPUT" ] && error_exit "Usage: execute.sh '{\"sessionName\":\"dev-1\",\"progress\":50,\"current\":\"Implementing tests\"}'"
8
+ [ -z "$INPUT" ] && error_exit "Usage: execute.sh '{\"sessionName\":\"dev-1\",\"progress\":50,\"current\":\"Implementing tests\",\"taskGroup\":\"delegated\"}'"
9
9
 
10
10
  SESSION_NAME=$(printf '%s' "$INPUT" | jq -r '.sessionName // empty')
11
11
  PROGRESS=$(printf '%s' "$INPUT" | jq -r '.progress // empty')
@@ -20,6 +20,8 @@ BODY=$(printf '%s' "$INPUT" | jq '{
20
20
  progress: (.progress | tonumber),
21
21
  current: .current
22
22
  } +
23
+ (if .projectPath then {projectPath: .projectPath} else {} end) +
24
+ (if .taskGroup then {taskGroup: .taskGroup} else {} end) +
23
25
  (if .completed then {completed: .completed} else {} end) +
24
26
  (if .nextSteps then {nextSteps: .nextSteps} else {} end) +
25
27
  (if .blockers then {blockers: .blockers} else {} end) +
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: screenshot-compare
3
+ description: Compare two screenshots (e.g., iOS reference vs Web implementation) using Gemini Vision API. Returns a structured diff report with categorized issues, severity levels, and CSS fix suggestions. Use when verifying UI parity, checking design implementation accuracy, or auditing visual consistency across platforms.
4
+ category: qa
5
+ assignableRoles:
6
+ - "*"
7
+ version: "1.0.0"
8
+ tags:
9
+ - screenshot
10
+ - visual-qa
11
+ - comparison
12
+ - gemini
13
+ - parity
14
+ ---
15
+
16
+ # Screenshot Compare
17
+
18
+ Compare two UI screenshots using Gemini Vision API and get a structured diff report.
19
+
20
+ ## Actions
21
+
22
+ | Parameter | Required | Description |
23
+ |-----------|----------|-------------|
24
+ | `reference` | Yes | Path to the reference screenshot (source of truth, e.g., iOS app) |
25
+ | `target` | Yes | Path to the target screenshot (implementation to verify, e.g., web app) |
26
+ | `focus` | No | Comma-separated focus areas: `icons,layout,colors,text,images,spacing` (default: all) |
27
+ | `context` | No | Additional context (e.g., "This is the settings page", "Dark mode") |
28
+
29
+ ## Usage
30
+
31
+ ```bash
32
+ # Basic comparison
33
+ bash execute.sh '{"reference":"/path/to/ios-screenshot.png","target":"/path/to/web-screenshot.png"}'
34
+
35
+ # Focused comparison (only icons and colors)
36
+ bash execute.sh '{"reference":"ref.png","target":"web.png","focus":"icons,colors"}'
37
+
38
+ # With context
39
+ bash execute.sh '{"reference":"ios-home.png","target":"web-home.png","context":"Home screen, light mode"}'
40
+ ```
41
+
42
+ ## Output Format
43
+
44
+ Returns JSON with:
45
+ - `matchScore` — 0-100 overall similarity score
46
+ - `totalIssues` — count of differences found
47
+ - `issues[]` — array of categorized differences:
48
+ - `type` — icon_missing, layout_shift, color_mismatch, text_mismatch, font_mismatch, spacing, etc.
49
+ - `severity` — critical, major, minor
50
+ - `element` — which UI element is affected
51
+ - `suggestion` — specific CSS/code fix
52
+
53
+ ## Issue Types
54
+
55
+ | Type | Description |
56
+ |------|-------------|
57
+ | `icon_missing` | Icon present in reference but missing in target |
58
+ | `icon_wrong` | Icon exists but is the wrong icon |
59
+ | `layout_shift` | Elements positioned differently |
60
+ | `spacing` | Padding/margin differences |
61
+ | `color_mismatch` | Colors don't match between reference and target |
62
+ | `text_mismatch` | Text content differs |
63
+ | `font_mismatch` | Font family, size, or weight differs |
64
+ | `image_missing` | Image present in reference but missing/broken in target |
65
+ | `image_wrong` | Image exists but is different |
66
+ | `border_radius` | Rounded corners differ |
67
+ | `shadow` | Box shadow differences |
68
+ | `alignment` | Vertical/horizontal alignment issues |
69
+ | `responsive` | Layout doesn't adapt correctly |
70
+
71
+ ## Prerequisites
72
+
73
+ - `GEMINI_API_KEY` environment variable or configured in Settings > API Keys
74
+ - Both image files must exist and be PNG, JPG, GIF, or WebP
75
+ - Images should be under 4MB each