Cursor rule
.cursor/rules/compozy-task-patterns.mdcTask type patterns and execution strategies for Compozy workflows
Cursor rules
Quality
70/100
Scores the file, not the repository.Length
577 words
24 headings · 12 code blocksRepository
9
— · pushed 389 days agoLast changed
3 days ago
First indexed 3 days ago.12345678# Compozy Task Patterns910<configuration_overview type="task_patterns">11Task patterns define different types of task execution strategies including basic, composite, parallel, collection, router, signal, and aggregate tasks.12</configuration_overview>1314## Basic Task Pattern1516<task_patterns type="basic_task">17```yaml18# Basic task with tool execution19- id: weather20 type: basic21 $use: tool(local::tools.#(id=="weather_tool"))22 with:23 city: "{{ .workflow.input.city }}"24 outputs:25 temperature: "{{ .output.temperature }}"26 city: "{{ .workflow.input.city }}"27 on_success:28 next: next_task29```30</task_patterns>3132## Composite Task Pattern3334<task_patterns type="composite_task">35```yaml36# Composite task containing multiple sub-tasks37- id: root_composite38 type: composite39 strategy: fail_fast40 tasks:41 - id: subtask_142 type: basic43 $use: tool(local::tools.#(id=="echo_tool"))44 with:45 message: "First subtask"46 - id: subtask_247 type: basic48 $use: tool(local::tools.#(id=="echo_tool"))49 with:50 message: "Second subtask"51```52</task_patterns>5354## Parallel Task Pattern5556<task_patterns type="parallel_task">57```yaml58# Parallel task execution59- id: parallel_section60 type: parallel61 strategy: wait_all # or race62 tasks:63 - id: task_a64 type: basic65 $use: tool(local::tools.#(id=="echo_tool"))66 with:67 message: "Parallel Task A"68 - id: task_b69 type: basic70 $use: tool(local::tools.#(id=="echo_tool"))71 with:72 message: "Parallel Task B"73```74</task_patterns>7576## Collection Task Pattern7778<task_patterns type="collection_task">79```yaml80# Collection task for processing arrays81- id: collection_section82 type: collection83 mode: parallel # or sequential84 strategy: best_effort # or fail_fast85 items: "{{ .workflow.input.test_data }}"86 task:87 id: "process-{{ .index }}"88 type: basic89 $use: tool(local::tools.#(id=="echo_tool"))90 with:91 message: "Processing item: {{ .item }} at index {{ .index }}"92```93</task_patterns>9495## Router Task Pattern9697<task_patterns type="router_task">98```yaml99# Router task for conditional branching100- id: clothing_check101 type: router102 condition: '{{ .tasks.clothing.output.clothing | empty | ternary "no_clothes" "has_clothes" }}'103 routes:104 has_clothes:105 $ref: local::tasks.#(id="save_results")106 no_clothes:107 $ref: local::tasks.#(id="no_results")108```109</task_patterns>110111## Signal Task Pattern112113<task_patterns type="signal_task">114```yaml115# Signal task for workflow communication116- id: send-signal117 type: signal118 signal:119 id: workflow-ready120 payload:121 message: "Hello from sender!"122```123</task_patterns>124125## Aggregate Task Pattern126127<task_patterns type="aggregate_task">128```yaml129# Aggregate task for combining outputs130- id: aggr131 type: aggregate132 outputs:133 city: "{{ .workflow.input.city }}"134 weather: "{{ .tasks.weather.output }}"135 activities: "{{ .tasks.activities.output }}"136 analysis: "{{ .tasks.activity_analysis.output }}"137```138</task_patterns>139140## Workflow Configuration Structure141142<workflow_config_pattern type="basic_structure">143```yaml144id: workflow-name145version: 0.1.0146description: Workflow description147148config:149 input:150 type: object151 properties:152 city:153 type: string154 description: The city name155 required:156 - city157158schemas:159 - id: city_input160 type: object161 properties:162 city:163 type: string164 description: The city to get weather information for165 required:166 - city167168tools:169 - id: tool_name170 description: Tool description171 execute: ./tool_file.ts172 input:173 $ref: local::schemas.#(id=="city_input")174175tasks:176 - id: task_name177 type: basic178 $use: tool(local::tools.#(id=="tool_name"))179 with:180 city: "{{ .workflow.input.city }}"181```182</workflow_config_pattern>183184## Strategy Patterns185186<strategy_patterns type="execution_strategies">187```yaml188# Composite task strategies189strategy: fail_fast # Stop on first failure190strategy: best_effort # Continue despite failures191192# Parallel task strategies193strategy: wait_all # Wait for all tasks to complete194strategy: race # First task to complete wins195196# Collection task strategies197strategy: fail_fast # Stop on first failure198strategy: best_effort # Process all items regardless of failures199```200</strategy_patterns>201202## Trigger Patterns203204<trigger_patterns type="signal_trigger">205```yaml206# Signal-based workflow trigger207triggers:208 - type: signal209 name: workflow-ready210```211</trigger_patterns>212213## Tool Configuration214215<tool_config_pattern type="typescript_tool">216```yaml217tools:218 - id: weather_tool219 description: Get the current weather for a specific location220 execute: ./weather_tool.ts221 input:222 type: object223 properties:224 city:225 type: string226 description: The city to get weather for227 required:228 - city229230 - id: save_data231 description: Save data to a file232 execute: ./save_tool.ts233 input:234 type: object235 properties:236 payload:237 type: object238 format:239 type: string240 enum: ["json", "txt"]241 required:242 - payload243 - format244```245</tool_config_pattern>246247## Deno Configuration248249<deno_config_pattern type="tool_imports">250```json251{252 "imports": {253 "weather_tool": "./weather_tool.ts",254 "save_data": "./save_tool.ts",255 "echo_tool": "./echo_tool.ts",256 "counter_tool": "./counter_tool.ts"257 },258 "fmt": {259 "indentWidth": 4,260 "useTabs": false,261 "lineWidth": 100,262 "singleQuote": false263 }264}265```266</deno_config_pattern>267
Also in compozy/gograph
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| compozy/gograph.cursor/rules/architecture.mdc · 9 | Cursor rules | styletesting-strategydependenciesdo-not | 57/100 | 3 days ago | |
| compozy/gograph.cursor/rules/api-standards.mdc · 9 | Cursor rules | lint-formatapidocs | 54/100 | 3 days ago | |
| compozy/gograph.cursor/rules/backwards-compatibility.mdc · 9 | Cursor rules | do-notagent-behaviour | 32/100 | 3 days ago | |
| compozy/gograph.cursor/rules/compozy-agent-config.mdc · 9 | Cursor rules | agent-behaviour | 45/100 | 3 days ago | |
| compozy/gograph.cursor/rules/compozy-examples.mdc · 9 | Cursor rules | stylearchtypesagent-behaviour | 58/100 | 3 days ago | |
| compozy/gograph.cursor/rules/compozy-project-config.mdc · 9 | Cursor rules | setupstyle | 54/100 | 3 days ago | |
| compozy/gograph.cursor/rules/cursor_rules.mdc · 9 | Cursor rules | no sections | 40/100 | 3 days ago | |
| compozy/gograph.cursor/rules/compozy-shared-patterns.mdc · 9 | Cursor rules | styleagent-behaviour | 54/100 | 3 days ago | |
| compozy/gograph.cursor/rules/core-libraries.mdc · 9 | Cursor rules | testing-strategydependenciesdo-not | 60/100 | 3 days ago | |
| compozy/gograph.cursor/rules/critical-validation.mdc · 9 | Cursor rules | no sections | 24/100 | 3 days ago | |
| compozy/gograph.cursor/rules/go-coding-standards.mdc · 9 | Cursor rules | stylearchdependencies | 62/100 | 3 days ago | |
| compozy/gograph.cursor/rules/go-patterns.mdc · 9 | Cursor rules | style | 66/100 | 3 days ago | |
| compozy/gograph.cursor/rules/no_linebreaks.mdc · 9 | Cursor rules | no sections | 31/100 | 3 days ago | |
| compozy/gograph.cursor/rules/prd-create.mdc · 9 | Cursor rules | stylearchagent-behaviour | 48/100 | 3 days ago | |
| compozy/gograph.cursor/rules/prd-tech-spec.mdc · 9 | Cursor rules | setuptestarchagent-behaviour | 56/100 | 3 days ago | |
| compozy/gograph.cursor/rules/quality-security.mdc · 9 | Cursor rules | securityperformancedo-not | 46/100 | 3 days ago | |
| compozy/gograph.cursor/rules/review-checklist.mdc · 9 | Cursor rules | testing-strategygit | 52/100 | 3 days ago | |
| compozy/gograph.cursor/rules/section_comments.mdc · 9 | Cursor rules | no sections | 31/100 | 3 days ago | |
| compozy/gograph.cursor/rules/task-developing.mdc · 9 | Cursor rules | agent-behaviour | 47/100 | 3 days ago | |
| compozy/gograph.cursor/rules/task-generate-list.mdc · 9 | Cursor rules | testlint-formatarchdo-not+1 | 85/100 | 3 days ago |
Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/api-standards.mdc Diff against .cursor/rules/backwards-compatibility.mdc Diff against .cursor/rules/compozy-agent-config.mdc Diff against .cursor/rules/compozy-examples.mdc Diff against .cursor/rules/compozy-project-config.mdc Diff against .cursor/rules/cursor_rules.mdc Diff against .cursor/rules/compozy-shared-patterns.mdc Diff against .cursor/rules/core-libraries.mdc Diff against .cursor/rules/critical-validation.mdc Diff against .cursor/rules/go-coding-standards.mdc Diff against .cursor/rules/go-patterns.mdc Diff against .cursor/rules/no_linebreaks.mdc Diff against .cursor/rules/prd-create.mdc Diff against .cursor/rules/prd-tech-spec.mdc Diff against .cursor/rules/quality-security.mdc Diff against .cursor/rules/review-checklist.mdc Diff against .cursor/rules/section_comments.mdc Diff against .cursor/rules/task-developing.mdc Diff against .cursor/rules/task-generate-list.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
