Skip to content

Commit a095009

Browse files
committed
feat(github-rules): add GitHub issue management rules for task tracking
- Introduced a new markdown file `github.mdc` outlining rules for creating GitHub issues, task sizing, progress logging, and closing procedures. - Established guidelines for security, style reminders, and error handling related to GitHub commands. - Aimed at improving project management and ensuring consistent practices across the team.
1 parent c241808 commit a095009

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.cursor/rules/github.mdc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
## 1. Create‑Before‑Code
7+
8+
* **MUST** create a GitHub Issue for every non‑trivial task (≥ 10 lines of code or config).
9+
* Use `gh issue create --title "<concise action>" --body "<goal / acceptance criteria>" --label "ai-task"`.
10+
* Include context‑link back to the originating prompt or reference.
11+
12+
## 2. Granular Task Sizing
13+
14+
* Break large work into issues estimated ≤ 4 hours of agent effort.
15+
* Cross‑link parent/child issues via `gh issue comment <id> "Tracks #<child>"`.
16+
17+
## 3. Progress Logging
18+
19+
* On **start** of work: `gh issue comment <id> "⏳"`.
20+
* After each meaningful commit: `git commit -m "<feat|fix>: <summary> (refs #<id>)"` then push.
21+
* Use `gh issue comment` to post logs or blockers. Prefix with emojis:
22+
23+
* `🚧` Work in progress
24+
* `❗` Need input
25+
* `✅` Completed sub‑task
26+
27+
## 5. Closing the Loop
28+
29+
* When work is complete: `gh issue close <id> --comment "✅ Done."`
30+
* CI must reference closed issues for auditability.
31+
32+
## 7. Fallback / Errors
33+
34+
* If `gh` command fails, log the full stderr in the issue comment `❗ gh error`. Retry twice max.
35+
* If GitHub API outage detected, pause work and comment `⚠️ GitHub outage – pausing`.
36+
37+
## 8. Security & Secrets
38+
39+
* Never include credentials, tokens, or personal data in issues or comments.
40+
* Redact log output before posting.
41+
42+
## 9. Style Reminders
43+
44+
* Follow repo coding conventions
45+
* Each PR **must** pass lint + unit tests before closing the issue.

0 commit comments

Comments
 (0)