Skip to content

Commit db334b7

Browse files
authored
Merge pull request #423 from DialmasterOrg/docs/better-contribution-guidelines
docs: PR guidelines / expectations CONTRIBUTING.md
2 parents e103335 + d404bf8 commit db334b7

File tree

1 file changed

+94
-1
lines changed

1 file changed

+94
-1
lines changed

CONTRIBUTING.md

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,21 @@ Found a bug? Check the [GitHub Issues](https://github.com/DialmasterOrg/Youtarr/
5353
- Relevant logs or screenshots
5454

5555
### New Features
56-
Have an idea for a new feature? Open an issue to discuss it before starting development. This helps ensure the feature aligns with the project's direction and prevents duplicate work.
56+
57+
Have an idea for a new feature? **Open an issue to discuss it before starting development.** This is especially important for:
58+
59+
- Features requiring more than ~1,000 lines of code
60+
- Changes to the build system, testing framework, or core architecture
61+
- UI/UX redesigns or navigation changes
62+
- New dependencies or third-party integrations
63+
64+
Why discuss first?
65+
- Ensures the feature aligns with the project direction
66+
- Prevents duplicate work
67+
- Allows the maintainer to suggest the best approach
68+
- Avoids investing time in changes that may not be accepted
69+
70+
For small, obvious improvements (typo fixes, minor bug fixes), feel free to submit a PR directly.
5771

5872
### Documentation Improvements
5973
Documentation is crucial for user adoption. Contributions that improve clarity, fix errors, or add missing information are highly valued. This includes:
@@ -222,18 +236,73 @@ fix/zzz ──────┘
222236
- Modified setup/installation steps
223237
- Changed environment variables
224238

239+
### PR Scope and Size Guidelines
240+
241+
**Keep PRs focused and reviewable.** Large PRs are difficult to review and risky to merge. Follow these guidelines:
242+
243+
#### Size Limits
244+
- **Target: Under 1,000 lines changed** (excluding generated files, lock files)
245+
- **Hard limit: 25 files** - PRs touching more than 25 files need prior discussion
246+
- **One feature per PR** - Don't bundle unrelated changes
247+
248+
#### PR Requirements (Non-Negotiable)
249+
250+
These are hard requirements for all PRs:
251+
252+
- **No merge conflicts** - Rebase your branch on the latest `dev` before submitting
253+
- **CI must pass** - All automated checks must be green (linting, tests, type checking)
254+
- **No bypassing checks** - Never use `--no-verify`, `test.skip()`, or comment out tests
255+
- **Coverage maintained** - Don't delete tests without adding equivalent coverage
256+
257+
#### What Requires Prior Discussion
258+
259+
Open a GitHub issue or Discord discussion **before** starting work on:
260+
261+
| Change Type | Why Discuss First? |
262+
|-------------|-------------------|
263+
| Build system changes | Affects entire codebase |
264+
| Testing framework changes | Affects all tests |
265+
| Major dependencies | Long-term maintenance |
266+
| Architecture changes | Affects future PRs |
267+
| Large refactors | Risk of regressions |
268+
269+
#### Breaking Up Large Changes
270+
271+
If your feature requires many changes, split it into sequential PRs:
272+
273+
1. **Infrastructure PR** - Build/config changes only
274+
2. **Core feature PR** - Minimal implementation
275+
3. **Enhancement PRs** - Additional features, polish
276+
4. **Test migration PR** - Only after feature is stable
277+
278+
Each PR should be independently reviewable and mergeable.
279+
280+
#### What NOT to Do
281+
282+
- **Don't delete existing tests** without adding equivalent coverage first
283+
- **Don't modify CI/workflow files** in feature PRs (submit those separately)
284+
- **Don't combine unrelated features** in a single PR
285+
- **Don't make "while I'm here" changes** - stay focused on the stated goal
286+
225287
### Submitting Your PR
226288

227289
When you're ready, push your branch and create a pull request **targeting the `dev` branch** on GitHub. Your PR will be reviewed by the maintainer.
228290

229291
**PR Checklist:**
230292

231293
- [ ] PR targets `dev` branch (not `main`)
294+
- [ ] PR has no merge conflicts (rebased on latest `dev`)
295+
- [ ] CI passes (linting, tests, type checking all green)
232296
- [ ] Tests pass locally (`npm test`)
233297
- [ ] Coverage meets 70% threshold
298+
- [ ] No bypassed checks (no `--no-verify`, `test.skip`, or commented tests)
234299
- [ ] Conventional commit format used
235300
- [ ] ESLint passes (`npm run lint`)
236301
- [ ] TypeScript compiles without errors (`npm run lint:ts`)
302+
- [ ] PR is focused on a single feature/fix (not bundled changes)
303+
- [ ] PR touches fewer than 25 files (or discussed with maintainer first)
304+
- [ ] No workflow/CI file changes (submit those separately)
305+
- [ ] Existing tests are preserved (or equivalent coverage added)
237306
- [ ] Documentation updated if needed
238307
- [ ] Tested in Docker environment
239308
- [ ] No commented-out code or debug statements
@@ -403,6 +472,30 @@ For more information on database management, see [DATABASE.md](docs/DATABASE.md)
403472

404473
## Getting Help
405474

475+
### Communication Expectations
476+
477+
**We value collaboration over surprise PRs.** Before investing significant time:
478+
479+
1. **Check existing issues** - Is someone already working on this?
480+
2. **Open a discussion issue** - Describe what you want to build
481+
3. **Wait for feedback** - The maintainer may have context you don't
482+
4. **Start small** - A working prototype PR is better than a complete rewrite
483+
484+
#### When to Reach Out
485+
486+
- **Small bug fixes** (< 100 lines): Just submit the PR
487+
- **Medium features** (100-1000 lines): Open an issue first
488+
- **Large changes** (1000+ lines): Discuss on Discord or issue before coding
489+
- **Architectural changes**: Always discuss first, regardless of size
490+
491+
#### Response Times
492+
493+
- **Issues**: Typically responded to within 2-4 days
494+
- **PRs**: Review within 1 week (complex PRs may take longer)
495+
- **Discord**: Usually 1-2 day response time during active hours
496+
497+
Don't interpret silence as approval to proceed with major changes.
498+
406499
### Questions and Discussion
407500

408501
- **Discord Server**: Join our [Discord community](https://discord.gg/68rvWnYMtD) for real-time help and discussion

0 commit comments

Comments
 (0)