|
| 1 | +# Torrust Tracker Deployment Tool |
| 2 | + |
| 3 | +A modern Perl console application for deploying Torrust Tracker to Hetzner Cloud using Packer, Terraform, and Ansible. |
| 4 | + |
| 5 | +## Code Quality Standards |
| 6 | + |
| 7 | +### Markdown Documentation |
| 8 | + |
| 9 | +- **Linting**: Follow [markdownlint](https://github.com/DavidAnson/markdownlint) conventions |
| 10 | +- **Structure**: Use consistent heading hierarchy |
| 11 | +- **Links**: Prefer relative links for internal documentation |
| 12 | +- **Code blocks**: Always specify language for syntax highlighting |
| 13 | +- **Tables**: Tables automatically ignore line length limits (configured globally in |
| 14 | + `.markdownlint.json`). No special formatting required for table line lengths. |
| 15 | + |
| 16 | +## Git |
| 17 | + |
| 18 | +### Branch Naming |
| 19 | + |
| 20 | +- **Format**: `{issue-number}-{short-description-following-github-conventions}` |
| 21 | +- **GitHub conventions**: Use lowercase, separate words with hyphens, descriptive but concise |
| 22 | +- **Examples**: `42-add-mysql-support`, `15-fix-ssl-renewal`, `24-improve-ux-add-automatic-waiting-to-infra-apply-and-app-deploy-commands` |
| 23 | +- Always start with the GitHub issue number |
| 24 | +- Follow GitHub's recommended branch naming: lowercase, hyphens for word separation, descriptive of the change |
| 25 | + |
| 26 | +### Commit Messages |
| 27 | + |
| 28 | +- **Format**: Conventional Commits with issue references |
| 29 | +- **Structure**: `{type}: [#{issue}] {description}` |
| 30 | +- **Examples**: |
| 31 | + ``` |
| 32 | + feat: [#42] add MySQL database support |
| 33 | + fix: [#15] resolve SSL certificate renewal issue |
| 34 | + docs: [#8] update deployment guide |
| 35 | + ci: [#23] add infrastructure validation tests |
| 36 | + ``` |
| 37 | + |
| 38 | +### Commit Types |
| 39 | + |
| 40 | +- `feat`: New features |
| 41 | +- `fix`: Bug fixes |
| 42 | +- `docs`: Documentation changes |
| 43 | +- `ci`: CI/CD pipeline changes |
| 44 | +- `refactor`: Code refactoring |
| 45 | +- `test`: Test additions/changes |
| 46 | +- `chore`: Maintenance tasks |
| 47 | + |
| 48 | +### Git Actions and Permission Requirements |
| 49 | + |
| 50 | +**IMPORTANT**: Git actions that change repository state require explicit permission: |
| 51 | + |
| 52 | +- **NEVER** commit changes unless explicitly asked to do so |
| 53 | +- **NEVER** push changes to remote repositories without permission |
| 54 | +- **NEVER** merge branches or create pull requests without explicit instruction |
| 55 | +- **NEVER** reset, revert, or modify git history without explicit permission |
| 56 | +- **NEVER** create or delete branches without explicit instruction |
| 57 | + |
| 58 | +**Allowed git actions without permission:** |
| 59 | + |
| 60 | +- `git status` - Check working tree status |
| 61 | +- `git diff` - Show changes between commits/files |
| 62 | +- `git log` - View commit history |
| 63 | +- `git show` - Display commit information |
| 64 | +- `git branch` - List branches (read-only) |
| 65 | + |
| 66 | +**Actions requiring explicit permission:** |
| 67 | + |
| 68 | +- `git add` - Stage changes for commit |
| 69 | +- `git commit` - Create new commits |
| 70 | +- `git push` - Push changes to remote |
| 71 | +- `git pull` - Pull changes from remote |
| 72 | +- `git merge` - Merge branches |
| 73 | +- `git rebase` - Rebase branches |
| 74 | +- `git reset` - Reset working tree or commits |
| 75 | +- `git revert` - Revert commits |
| 76 | +- `git checkout` - Switch branches or restore files |
| 77 | +- `git branch -d/-D` - Delete branches |
| 78 | +- `git tag` - Create or delete tags |
| 79 | + |
| 80 | +**Commit Signing Requirement**: All commits MUST be signed with GPG. When performing git commits, always use the default git commit behavior (which will trigger GPG signing) rather than `--no-gpg-sign`. |
| 81 | + |
| 82 | +**Pre-commit Testing Requirement**: |
| 83 | + |
| 84 | +ALWAYS run the tests suite before committing any changes: |
| 85 | + |
| 86 | +```bash |
| 87 | +carmel exec -- prove -l t/ |
| 88 | +``` |
| 89 | + |
| 90 | +ALWAYS run the linting suite before committing any changes: |
| 91 | + |
| 92 | +```bash |
| 93 | +markdownlint "**/*.md" |
| 94 | +``` |
0 commit comments