Skip to content

Commit 4520912

Browse files
claudensheaps
authored andcommitted
feat: add Claude Code rules for UI evidence, task completion, GitHub access, and PR management
Add four rule files to .claude/rules/ to codify development workflow expectations: - UI changes require automated screenshot evidence in PRs and docs - Tasks must have passing CI and tests matching the user's request - GitHub token permissions for the nsheaps organization - PR lifecycle management including draft-only creation and body updates after every push https://claude.ai/code/session_01SaZuyTFLGaCcnox7B4ghsN
1 parent 68c27cc commit 4520912

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# GitHub Token Access
2+
3+
Your environment includes a GitHub token with the following permissions:
4+
5+
- **Read access** across the entire `nsheaps` GitHub organization (all repositories).
6+
- **Write access** to create and edit issues and pull requests in any repository within the organization.
7+
- You may act as the user (`nsheaps`) when interacting with GitHub via `gh` CLI or the GitHub API.
8+
9+
Use these permissions to look up context in related repositories, cross-reference issues, and manage PRs and issues as needed.

.claude/rules/pr-management.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Pull Request Management
2+
3+
## PR Body and Title Updates (CRITICAL)
4+
5+
After EVERY push, you MUST review the PR title and body and update them to accurately reflect the full set of changes in the PR:
6+
7+
- The PR title and body describe the **cumulative changes** in the PR and how they relate to the user's original request. They are NOT a description of the most recent commit or push.
8+
- Before updating, evaluate the full commit history, commit messages, and diffs on the branch so you properly understand the complete scope of changes.
9+
- Keep the PR title concise (under 70 characters) and the body well-structured with a summary and test plan.
10+
11+
## PR Lifecycle (CRITICAL)
12+
13+
You are expected to open and maintain PRs. Follow these rules:
14+
15+
1. **Open PRs in draft**: Always create PRs in draft state (`gh pr create --draft`). Never move a PR from draft to ready-for-review — that is the user's responsibility.
16+
2. **Assign nsheaps**: Always assign `nsheaps` as a reviewer/assignee on PRs you create.
17+
3. **Keep PRs up to date**: Update the PR title, body, and labels as the branch evolves.
18+
4. **Close duplicates**: If one PR duplicates functionality from another or resolves an issue, use GitHub magic phrases (e.g., `Closes #123`, `Fixes #456`) in the PR body to link and close appropriately.
19+
5. **Never mark ready for review**: Do NOT remove the draft status from a PR. Only the user may do that.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Task Completion Criteria
2+
3+
Your task is NOT complete until ALL of the following are satisfied:
4+
5+
1. **CI passes**: All continuous integration checks must be green. If CI fails, investigate and fix the issue before considering the task done.
6+
2. **Automated test coverage**: New functionality must have automated tests that cover it. Tests must validate the behavior described in the user's initial request.
7+
3. **Match the initial request**: Tests and implementation must match what the user originally asked for. Do NOT deviate from the initial request or implement beyond it without first discussing the pivot with the user to understand the appropriate direction.
8+
4. **No scope creep**: If you discover adjacent improvements or refactors that seem valuable but were not requested, raise them with the user rather than implementing them unilaterally.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# UI Screenshot Evidence Rule
2+
3+
All UI changes MUST be accompanied by photographic evidence (screenshots).
4+
5+
## Requirements
6+
7+
1. **Screenshot capture**: After making any UI change, capture screenshots demonstrating the change using the E2E screenshot tooling (`bun run test:e2e:screenshots`).
8+
2. **PR inclusion**: Screenshots MUST be included in the pull request body so reviewers can visually verify the change.
9+
3. **Documentation automation**: Screenshots MUST be inserted into documentation pages via automation (not manually). This ensures pictures do not become stale or out of date as the UI evolves.
10+
4. **QA validation**: These automated screenshots also serve as QA validation artifacts. They may be used to verify visual correctness in CI and review workflows.
11+
5. **No manual screenshot management**: Never manually place or update screenshots in documentation. Always rely on the automated pipeline so that docs stay in sync with the actual UI.

0 commit comments

Comments
 (0)