You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/workflow-halt-on-error.mdc
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,11 @@ alwaysApply: true
5
5
6
6
<rules description="Non-negotiable constraints.">
7
7
8
+
<rule id="cursor-workflow-paths">All workflow-related skill definitions (`*.md` / `SKILL.md`) and workflow companion scripts (`*.sh`) are sourced from `~/.cursor/`. When executing skills, prefer explicit `~/.cursor/...` paths and do not assume repo-local workflow files unless the skill explicitly points to one.</rule>
9
+
8
10
<rule id="skill-script-path-resolution">When a skill mentions a script path, resolve it under `~/.cursor/skills/<skill>/scripts/` unless the skill explicitly specifies an absolute path elsewhere. Do not assume repo-relative `scripts/` paths without verifying the skill directory contents.</rule>
9
11
10
-
<rule id="halt-on-error">When ANY shell command fails (non-zero exit code) during a workflow:
12
+
<rule id="halt-on-error">When ANY shell command fails (non-zero exit code) during a workflow (except where explicitly allowed by `auto-fix-verification-failures` or `companion-script-nonzero-contracts`):
11
13
1. **STOP** — do not retry, work around, substitute, or continue the workflow.
12
14
2. **Report** — show the user the exact command, exit code, and error output.
13
15
3. **Diagnose** — classify the failure: missing tool (`command not found`), wrong path, permissions, or logic error.
@@ -47,6 +49,19 @@ Never auto-fix:
47
49
- Any failure requiring destructive operations or workflow bypasses
48
50
</rule>
49
51
52
+
<rule id="companion-script-nonzero-contracts">Respect documented companion script exit-code contracts. Non-zero does NOT always mean fatal.
53
+
54
+
For `~/.cursor/skills/im/scripts/lint-warnings.sh`:
55
+
- `0` = no warnings
56
+
- `1` = warnings found (expected actionable state)
57
+
- `2` = execution error (fatal)
58
+
59
+
Required behavior:
60
+
1. If exit `1`, continue workflow by fixing warnings before implementation.
61
+
2. If warnings exist, commit warning fixes in a separate lint-fix commit immediately before feature commits.
62
+
3. If exit `2`, apply `halt-on-error`.
63
+
</rule>
64
+
50
65
<rule id="no-silent-substitution">Do NOT silently substitute an alternative tool or approach when a command fails. If `rg` is not found, do not fall back to `grep`. If a script exits non-zero, do not manually replicate what the script does. The failure is the signal — report it.</rule>
Copy file name to clipboardExpand all lines: .cursor/skills/asana-task-update/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
name: asana-task-update
3
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.
4
+
compatibility: Requires jq. ASANA_TOKEN for Asana API updates. ASANA_GITHUB_SECRET for PR attach operations (obtain via https://github.integrations.asana.plus/auth?domainId=ghactions).
5
5
metadata:
6
6
author: j0ntz
7
7
---
@@ -11,7 +11,7 @@ metadata:
11
11
<rulesdescription="Non-negotiable constraints.">
12
12
<ruleid="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>
<ruleid="attach-requires-secret">`--attach-pr` requires `ASANA_GITHUB_SECRET`. Other operations require `ASANA_TOKEN`.</rule>
14
+
<ruleid="attach-requires-secret">`--attach-pr` requires `ASANA_GITHUB_SECRET` (obtain via OAuth: https://github.integrations.asana.plus/auth?domainId=ghactions). Other operations require `ASANA_TOKEN`.</rule>
15
15
<ruleid="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
16
<ruleid="script-timeouts">Asana updates can take time. Use `block_until_ms: 120000` for script calls.</rule>
Copy file name to clipboardExpand all lines: .cursor/skills/convention-sync/SKILL.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ metadata:
9
9
<goal>Sync cursor files between `~/.cursor/` and the `edge-conventions` repo, commit, push, and update PR description from README. Also maintains cross-tool compatibility: symlinks `~/.claude/skills` → `~/.cursor/skills` and generates `~/.claude/CLAUDE.md` from always-apply rules.</goal>
10
10
11
11
<rules>
12
+
<ruleid="local-is-canonical">`~/.cursor/` is the canonical source. Edits happen locally; the repo is the distribution copy. Default direction is `user-to-repo`. Use `--repo-to-user` only for onboarding or pulling changes authored by others. The script does not detect bidirectional conflicts — whichever direction you run overwrites the other side.</rule>
12
13
<ruleid="use-companion-script">Use `scripts/convention-sync.sh` for diffing and syncing. Do NOT manually diff or copy files.</rule>
13
14
<ruleid="dry-run-first">Always run without `--stage` first to show the summary. Only stage/commit after user confirms.</rule>
14
15
<ruleid="no-script-bypass">If the script fails, report the error and STOP.</rule>
Copy file name to clipboardExpand all lines: .cursor/skills/im/SKILL.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,12 @@ metadata:
11
11
<rulesdescription="Non-negotiable constraints.">
12
12
<ruleid="read-coding-standards">Before writing ANY code, read `.cursor/rules/typescript-standards.mdc` and follow all rules and standards in it throughout the implementation.</rule>
13
13
<ruleid="no-impl-before-confirm">Do NOT begin implementation until the user confirms the `/asana-plan` output (Step 0).</rule>
14
-
<ruleid="lint-before-change">Before the first edit to ANY file, run `scripts/lint-warnings.sh <files...>` to check for warnings AND load matching fix patterns into context. If warnings exist, fix them in a separate commit IMMEDIATELY BEFORE the commit with actual changes. This applies to every file you touch, including ones discovered mid-implementation — not just the files you planned upfront.</rule>
14
+
<ruleid="lint-before-change">Before the first edit to ANY file, run `~/.cursor/skills/im/scripts/lint-warnings.sh <files...>` to check for warnings AND load matching fix patterns into context. If warnings exist, fix them in a separate commit IMMEDIATELY BEFORE the commit with actual changes. This applies to every file you touch, including ones discovered mid-implementation — not just the files you planned upfront.</rule>
15
15
<ruleid="no-manual-formatting">Do not manually fix formatting. `lint-commit.sh` runs `eslint --fix` (which includes Prettier) before committing. If you see a formatting lint after editing, do NOT make another edit to fix it.</rule>
16
16
<ruleid="commit-script">Always commit using `~/.cursor/skills/lint-commit.sh -m "message" [files...]` or `--fixup <hash>` for fixup commits.</rule>
17
17
<ruleid="clean-history">The final commit history must read as a clean, straight-line progression — as if every decision was made correctly up front. Never preserve the "squiggly path" of development (adding then removing code, temporary scaffolding, exploratory commits). If you introduce something in commit A and remove it in commit B, restructure so the final history never contains it. Plan commits proactively to avoid this; when it happens anyway, restructure the branch before finishing.</rule>
18
18
<ruleid="no-script-bypass">If a companion script fails, report the error and STOP. Do NOT fall back to raw `gh`, `curl`, or other workarounds.</rule>
19
-
<ruleid="script-timeouts">`asana-get-context.sh` can take up to 90s. Always set `block_until_ms: 120000` when invoking it to avoid unnecessary backgrounding and polling.</rule>
19
+
<ruleid="script-timeouts">`asana-get-context.sh` can take up to 90s and `install-deps.sh` can exceed 10s on repo prepare steps. Always use at least a 120000ms timeout for these scripts to avoid false failures from client-side time limits.</rule>
20
20
</rules>
21
21
22
22
<stepid="0"name="Planning handoff via /asana-plan">
@@ -34,7 +34,7 @@ If the task describes a regression (e.g. "broke in version X", "stopped working
34
34
1.**Identify the breaking commit** using `git log`, `git bisect`, or version tag comparison. Don't take the reported version from the task at face value — verify by examining the actual commit history.
35
35
2.**Review the original change's full intent.** Find the associated PR and any linked tasks/discussions. The regression-causing commit likely had legitimate goals (performance, refactoring, new features). Understand ALL of its intended effects, not just the one that broke.
36
36
3.**Ensure the fix preserves the original intent.** The fix must not undo the beneficial changes introduced by the regression commit. If the fix conflicts with the original intent, flag this to the user with tradeoffs before proceeding.
37
-
</step>
37
+
</step>
38
38
39
39
<stepid="1"name="Branch setup">
40
40
After Step 0 determines the target repo (or if no Asana task, use the current repo):
@@ -47,7 +47,7 @@ After Step 0 determines the target repo (or if no Asana task, use the current re
47
47
-**On the correct feature branch**: Continue.
48
48
3.**Branch naming**: `$GIT_BRANCH_PREFIX/<short-description>` or `$GIT_BRANCH_PREFIX/fix/<short-description>` for bug fixes. Use kebab-case. Example: `<prefix>/some-feature` or `<prefix>/fix/some-bug`
49
49
4.**Assume a new branch is needed** unless the current branch clearly matches the task. Do NOT ask for confirmation — the existing branch has its own committed work and is unaffected.
50
-
5.**Install dependencies**: After creating or switching to the feature branch, run `~/.cursor/skills/install-deps.sh` to ensure dependencies match the base branch state.
50
+
5.**Install dependencies**: After creating or switching to the feature branch, run `~/.cursor/skills/install-deps.sh`with a timeout of at least 120000ms to ensure dependencies match the base branch state without false timeout failures.
51
51
52
52
If the task spans multiple repos, note the additional repos but implement in the primary repo first.
53
53
</step>
@@ -56,15 +56,17 @@ If the task spans multiple repos, note the additional repos but implement in the
56
56
**Before writing ANY code**, run `lint-warnings.sh` on every file you plan to modify:
2. Outputs matching fix patterns from `~/.cursor/rules/typescript-standards.mdc`
65
66
3. Flags unmatched rules that need new patterns added
66
67
67
68
If warnings exist:
69
+
68
70
1. Apply fixes using the matched patterns in the output
69
71
2. For **unmatched rules**: After fixing, add a new `<pattern id="..." rule="...">` to `typescript-standards.mdc` so future occurrences have guidance
70
72
3. Commit lint fixes separately:
@@ -80,7 +82,7 @@ This ensures the subsequent feature commit introduces zero pre-existing warnings
80
82
</step>
81
83
82
84
<stepid="3"name="Implementation">
83
-
1.**Lint-check newly discovered files**: If you need to modify a file not covered in Step 2, run `scripts/lint-warnings.sh <file>` before editing it. If pre-existing warnings exist, fix them using the matched patterns and commit as a `--fixup` to the lint-fix commit from Step 2 (use `git log --oneline` to find the hash). If no lint-fix commit exists yet, create one.
85
+
1.**Lint-check newly discovered files**: If you need to modify a file not covered in Step 2, run `~/.cursor/skills/im/scripts/lint-warnings.sh <file>` before editing it. If pre-existing warnings exist, fix them using the matched patterns and commit as a `--fixup` to the lint-fix commit from Step 2 (use `git log --oneline` to find the hash). If no lint-fix commit exists yet, create one.
84
86
2. Break up the feature into multiple commits if necessary. Commit messages should be a concise title without tags like "feat" and a short body.
85
87
3. Open relevant ts/tsx files before writing code.
86
88
4. Commit using `lint-commit.sh`:
@@ -135,7 +137,7 @@ Other repos only have `## Unreleased` — no staging distinction.
135
137
-**Fixup commits exist**: Autosquash with `GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash <base-branch>`. Do this immediately — never leave fixup commits unsquashed.
136
138
-**Structural issues** (add-then-remove cycles, misplaced changes, commits that should be squashed, CHANGELOG in intermediate commits): Use scripted `GIT_SEQUENCE_EDITOR` to drop, reorder, or squash commits, resolving conflicts as needed. Verify the final tree matches the pre-restructure state with `git diff`.
137
139
-**Git lock conflicts**: VSCode's built-in git integration may race with rebase operations, creating `.git/index.lock` files. Always run `rm -f .git/index.lock` before any `git rebase` command to prevent stalls. If a rebase step fails with "index.lock: File exists", remove the lock and `git rebase --continue`.
138
-
</step>
140
+
</step>
139
141
140
142
<stepid="5"name="Verification">
141
143
Run full verification to catch issues that per-commit checks (`lint-commit.sh`) may have missed (e.g. transitive snapshot breakage, type errors across files):
0 commit comments