TDD-focused development workflow with strict testing, formatting, and PR guidelines for the Ruler project
Apply consistent development rules across all coding agents for the Ruler project.
This skill configures GitHub Copilot to follow strict TDD (Test-Driven Development) practices, code formatting standards, and pull request workflows for the Ruler repository. It ensures all changes are properly tested, formatted, and reviewed before merging.
1. **Always write tests first** before implementing features
2. **Verify tests fail** before writing implementation code
3. **Make minimal changes** to pass the tests
4. **Ensure comprehensive test coverage** including:
- Unit tests for individual functions and modules
- Integration tests for component interactions
- End-to-end tests for full user workflows
1. **Run Prettier before every commit** to ensure consistent formatting
2. **Never commit unformatted code** - formatting is mandatory, not optional
3. **Follow existing code patterns** in the repository
1. **Create feature branches** for all changes (unless explicitly told otherwise)
2. **Submit pull requests** instead of committing directly to main
3. **Write descriptive PR descriptions** that include:
- Rationale behind the change
- Functional changes being made
- Specific files and modules affected
4. **Ensure all CI tests pass** before marking PR as ready:
- `npm ci` - Clean install dependencies
- `npm run lint` - Lint all code
- `npm test` - Run all tests
- `npm run build` - Verify build succeeds
When committing code yourself using `git commit`, **always** include the AI author flag:
```bash
git commit --author="AI <[email protected]>" -m "Your commit message"
```
This allows AI-generated commits to be easily identified and tracked.
1. Create a feature branch:
```bash
git checkout -b feature/your-feature-name
```
2. Write failing tests first:
- Add test cases that define the expected behavior
- Run tests to verify they fail: `npm test`
3. Implement minimal code to pass tests:
- Write only the code needed to make tests pass
- Run tests again to verify: `npm test`
4. Format code with Prettier:
```bash
npx prettier --write .
```
5. Run full CI suite locally:
```bash
npm ci && npm run lint && npm test && npm run build
```
6. Commit with AI author attribution:
```bash
git commit --author="AI <[email protected]>" -m "Add feature X with tests"
```
7. Push and create pull request:
```bash
git push origin feature/your-feature-name
```
8. Write comprehensive PR description covering rationale, changes, and affected files
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/github-copilot-instructions-ruler/raw