|
| 1 | +# Developer Experience Standards |
| 2 | + |
| 3 | +This document defines lightweight DevEx conventions for repositories created from this template. |
| 4 | + |
| 5 | +The goal is a low-friction contributor workflow that remains portable across languages, frameworks, and project sizes. |
| 6 | + |
| 7 | +## Local workflow |
| 8 | + |
| 9 | +Recommended contributor loop: |
| 10 | + |
| 11 | +1. Read `README.md` for project purpose and layout. |
| 12 | +2. Run `bash scripts/bootstrap.sh` to install or validate local prerequisites. |
| 13 | +3. Copy `config/.env.example` to a local environment file if the project needs environment variables. |
| 14 | +4. Make a focused change on a short-lived branch. |
| 15 | +5. Run `bash scripts/validate.sh` before opening a pull request. |
| 16 | +6. Open a PR with validation notes and any relevant screenshots or logs. |
| 17 | + |
| 18 | +## Environment files |
| 19 | + |
| 20 | +Keep examples safe and explicit: |
| 21 | + |
| 22 | +- Commit `.env.example` files with placeholders only. |
| 23 | +- Never commit real secrets, tokens, credentials, private keys, or local machine paths. |
| 24 | +- Document required variables near the code or config that consumes them. |
| 25 | +- Prefer clear placeholder values such as `YOUR_API_KEY_HERE` or `example.local`. |
| 26 | + |
| 27 | +## Dependency management |
| 28 | + |
| 29 | +Each project should document its package manager and lockfile policy. |
| 30 | + |
| 31 | +Recommended defaults: |
| 32 | + |
| 33 | +- Applications should commit lockfiles when the ecosystem supports them. |
| 34 | +- Libraries and reusable templates may omit lockfiles unless reproducible installs require them. |
| 35 | +- Keep runtime dependencies small and justified. |
| 36 | +- Prefer standard tooling before adding extra packages. |
| 37 | +- Update dependencies intentionally and include validation notes in PRs. |
| 38 | + |
| 39 | +## Validation standards |
| 40 | + |
| 41 | +Template repositories should support these task names when applicable: |
| 42 | + |
| 43 | +- `format:check` for formatting validation |
| 44 | +- `lint` for static analysis |
| 45 | +- `test` for automated tests |
| 46 | + |
| 47 | +The reusable GitHub Actions workflow can call custom commands for each project. Local validation should stay simple and safe to run repeatedly. |
| 48 | + |
| 49 | +## Debugging workflow |
| 50 | + |
| 51 | +When something fails: |
| 52 | + |
| 53 | +1. Reproduce the issue from a clean checkout if possible. |
| 54 | +2. Capture the exact command, expected result, and actual result. |
| 55 | +3. Check environment variables and local config against `config/.env.example`. |
| 56 | +4. Run the smallest relevant validation command first. |
| 57 | +5. Add notes to the issue or PR explaining what was verified. |
| 58 | + |
| 59 | +Avoid committing temporary debug output, machine-specific paths, or local credentials. |
| 60 | + |
| 61 | +## Error handling conventions |
| 62 | + |
| 63 | +Prefer errors that are actionable: |
| 64 | + |
| 65 | +- Say what failed. |
| 66 | +- Say what input or config caused the failure when safe. |
| 67 | +- Suggest the next command or config field to check. |
| 68 | +- Avoid hiding errors with broad catch-all handling. |
| 69 | +- Do not print secrets or sensitive values in logs. |
| 70 | + |
| 71 | +## Coding standards |
| 72 | + |
| 73 | +General coding expectations: |
| 74 | + |
| 75 | +- Keep changes focused and easy to review. |
| 76 | +- Favor clear names over clever abstractions. |
| 77 | +- Keep core logic separate from provider or plugin code. |
| 78 | +- Add tests for behavior, not implementation trivia. |
| 79 | +- Update docs when behavior, setup, or architecture changes. |
| 80 | +- Prefer small modules with obvious ownership. |
| 81 | + |
| 82 | +## Pull request hygiene |
| 83 | + |
| 84 | +A healthy PR should include: |
| 85 | + |
| 86 | +- a clear summary |
| 87 | +- linked issues when applicable |
| 88 | +- validation steps |
| 89 | +- screenshots or logs when useful |
| 90 | +- documentation updates for user-facing or contributor-facing changes |
0 commit comments