|
| 1 | +--- |
| 2 | +name: asana-task-update |
| 3 | +description: Update Asana tasks via one reusable workflow (attach PRs, assign/unassign, set status, and update task fields). Use when any skill needs to modify Asana task state. |
| 4 | +compatibility: Requires jq. ASANA_TOKEN for Asana API updates. ASANA_GITHUB_SECRET for PR attach operations. |
| 5 | +metadata: |
| 6 | + author: j0ntz |
| 7 | +--- |
| 8 | + |
| 9 | +<goal>Perform Asana task mutations through one shared command and one shared script, so all callers use the same field mappings and prompts.</goal> |
| 10 | + |
| 11 | +<rules description="Non-negotiable constraints."> |
| 12 | +<rule id="use-companion-script">Use `~/.cursor/skills/asana-task-update/scripts/asana-task-update.sh` for all Asana task mutations. Do not call raw Asana APIs directly from skills that can delegate here.</rule> |
| 13 | +<rule id="task-required">Every operation requires `--task <task_gid>`.</rule> |
| 14 | +<rule id="attach-requires-secret">`--attach-pr` requires `ASANA_GITHUB_SECRET`. Other operations require `ASANA_TOKEN`.</rule> |
| 15 | +<rule id="prompt-codes">If the script exits code 2 with `PROMPT_REVIEWER` or `PROMPT_IMPLEMENTOR`, ask the user and re-run with explicit `--reviewer` or `--implementor`.</rule> |
| 16 | +<rule id="script-timeouts">Asana updates can take time. Use `block_until_ms: 120000` for script calls.</rule> |
| 17 | +</rules> |
| 18 | + |
| 19 | +<usage> |
| 20 | +```bash |
| 21 | +# Attach only |
| 22 | +~/.cursor/skills/asana-task-update/scripts/asana-task-update.sh \ |
| 23 | + --task <task_gid> \ |
| 24 | + --attach-pr --pr-url <url> --pr-title "<title>" --pr-number <num> |
| 25 | + |
| 26 | +# Attach + assign reviewer + set review-needed status + estimate review hours |
| 27 | +~/.cursor/skills/asana-task-update/scripts/asana-task-update.sh \ |
| 28 | + --task <task_gid> \ |
| 29 | + --attach-pr --pr-url <url> --pr-title "<title>" --pr-number <num> \ |
| 30 | + --assign --set-status "Review Needed" --auto-est-review-hrs |
| 31 | + |
| 32 | +# Publish Needed -> Verification Needed (and unassign) |
| 33 | +~/.cursor/skills/asana-task-update/scripts/asana-task-update.sh \ |
| 34 | + --task <task_gid> \ |
| 35 | + --set-status "Verification Needed" --unassign |
| 36 | +``` |
| 37 | +</usage> |
| 38 | + |
| 39 | +<step id="1" name="Build operation flags"> |
| 40 | +Determine which updates are needed by the caller and build one command with all flags: |
| 41 | + |
| 42 | +- `--attach-pr --pr-url --pr-title --pr-number` |
| 43 | +- `--assign` or `--assign <user_gid>` |
| 44 | +- `--unassign` |
| 45 | +- `--set-status "Review Needed|Publish Needed|Verification Needed"` |
| 46 | +- `--set-reviewer <user_gid>` |
| 47 | +- `--set-implementor <user_gid>` |
| 48 | +- `--set-priority <enum_gid>` |
| 49 | +- `--set-planned <enum_gid>` |
| 50 | +- `--auto-est-review-hrs` |
| 51 | +</step> |
| 52 | + |
| 53 | +<step id="2" name="Run update script"> |
| 54 | +Run `asana-task-update.sh` with the built flags. Prefer one call with combined operations over multiple calls. |
| 55 | +</step> |
| 56 | + |
| 57 | +<step id="3" name="Handle prompts"> |
| 58 | +If exit code is 2: |
| 59 | + |
| 60 | +- `PROMPT_REVIEWER`: ask who to assign, then re-run with `--reviewer <gid>` and `--assign` |
| 61 | +- `PROMPT_IMPLEMENTOR`: ask who to set as implementor, then re-run with `--implementor <gid>` |
| 62 | +</step> |
| 63 | + |
| 64 | +<step id="4" name="Report result"> |
| 65 | +Summarize one line per action from script output (attach result, assignment, status change, field updates). |
| 66 | +</step> |
| 67 | + |
| 68 | +<team-roster description="Asana user GIDs. Use numbered lists when prompting users."> |
| 69 | +1. Jon Tzeng — `1200972350160586` |
| 70 | +2. William Swanson — `10128869002320` |
| 71 | +3. Paul Puey — `9976421903322` |
| 72 | +4. Sam Holmes — `1198904591136142` |
| 73 | +5. Matthew Piche — `522823585857811` |
| 74 | +</team-roster> |
| 75 | + |
| 76 | +<exit-codes> |
| 77 | +- `0`: success |
| 78 | +- `1`: error |
| 79 | +- `2`: needs user input (`PROMPT_REVIEWER`, `PROMPT_IMPLEMENTOR`) |
| 80 | +</exit-codes> |
0 commit comments