Skip to content

Commit 45454d0

Browse files
committed
Decompose pr-create into reusable Asana skills
1 parent 126bcb8 commit 45454d0

File tree

11 files changed

+520
-532
lines changed

11 files changed

+520
-532
lines changed

.cursor/skills/asana-plan/SKILL.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: asana-plan
3+
description: Create an implementation plan from either an Asana task URL or ad-hoc text/file requirements, then wait for user confirmation before implementation.
4+
compatibility: Requires jq. ASANA_TOKEN for Asana context when task URLs are provided.
5+
metadata:
6+
author: j0ntz
7+
---
8+
9+
<goal>Produce a plan document via Cursor planning flow from Asana or text requirements, and hand off approved context to implementation skills.</goal>
10+
11+
<rules description="Non-negotiable constraints.">
12+
<rule id="task-review-for-asana">If input is an Asana task URL, read and follow `~/.cursor/skills/task-review/SKILL.md` steps 1-3 before planning.</rule>
13+
<rule id="no-impl-before-confirm">Do not start implementation while in this skill. End by asking for confirmation.</rule>
14+
<rule id="create-plan-required">Use Cursor's plan tool to output the plan document to the normal planning location.</rule>
15+
</rules>
16+
17+
<step id="1" name="Resolve input mode">
18+
Accept two input forms:
19+
20+
1. **Asana URL mode**: Task URL is provided
21+
2. **Text/file mode**: Ad-hoc text requirement or file reference is provided
22+
23+
If input is ambiguous, ask the user to clarify which mode applies.
24+
</step>
25+
26+
<step id="2" name="Gather requirements">
27+
<sub-step name="Asana URL mode">
28+
Read `~/.cursor/skills/task-review/SKILL.md` and run its steps 1-3 to fetch and summarize task context.
29+
</sub-step>
30+
31+
<sub-step name="Text/file mode">
32+
Read the provided description and any referenced file(s), then summarize scope, target areas, and assumptions.
33+
</sub-step>
34+
</step>
35+
36+
<step id="3" name="Generate plan">
37+
Create a concise actionable implementation plan using Cursor's plan flow. Include:
38+
39+
- Summary
40+
- Goal / Definition of Done
41+
- Likely relevant files
42+
- Findings so far
43+
- Numbered implementation steps
44+
- Constraints
45+
</step>
46+
47+
<step id="4" name="Handoff and confirmation">
48+
Return:
49+
50+
1. Plan file path
51+
2. Short execution summary (what will be changed)
52+
53+
Then ask for confirmation before implementation:
54+
55+
> Does this match your understanding? Any adjustments before I start?
56+
</step>
57+
58+
<handoff-contract>
59+
`/im` consumes this output and starts only after user confirmation. `/im` should not re-run a second independent confirmation flow for the same plan.
60+
</handoff-contract>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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

Comments
 (0)