First off, thank you for considering contributing to Sentinel! This document outlines the absolutely critical rules and expectations for contributing to this project.
By participating, you agree to abide by our specific aesthetic, technical, and security constraints.
Before writing a single line of code, you MUST read the Project Constitution. It contains non-negotiable architectural mandates:
- Type Safety Above All: Target ES2022.
anyis strictly prohibited. Favorunknownand discriminated unions. - Brutalist UI Aesthetics: We use zero border-radius (
0px) globally. Sharp, angular, high-contrast UI only. - Clean State: Immutable data and pure functions where practical.
- Security: Never log secrets. Prevent XSS via React's built-in escapes or explicit sanitization blocks.
We govern all commit history strictly:
-
Signed Commits: All commits MUST be GPG-signed. Commits without signatures will be rejected by our CI.
git config commit.gpgsign true -
Conventional Commits: Every commit message must adopt the Conventional Commits structure (e.g.,
feat:,fix:,docs:,chore:).- Impact on Releases: Your commits directly control our Independent Versioning strategy.
- Path-Based: Only components with files changed in your commit will receive a version bump.
- Bump Types:
fix:triggers a patch bump (0.1.0->0.1.1),feat:triggers a minor bump (0.1.0->0.2.0), andfeat!:triggers a major bump (0.1.0->1.0.0). - Scope: While optional, using scopes like
feat(api):orfix(dashboard):helps generate cleaner changelogs.
- Impact on Releases: Your commits directly control our Independent Versioning strategy.
-
Read the CONSTITUTION.md - it is the absolute source of truth for all conventions.
-
Branching: Branch off
mainusing the specific feature numbering system (e.g.001-feature-name). -
Implementation:
- Write comprehensive Unit Tests for any new utility, algorithm or generator. Include both happy and unhappy paths.
- Write Playwright UI Tests for any alterations to the UX or interactions.
-
Verification:
- Ensure your code is completely clean. Run
tsc -band the exact same linters/formatters as the CI system. - Never run generic
grepvalidations over/distornode_modules. Stick closely tosrc/.
- Ensure your code is completely clean. Run
-
Pull Requests: Pull Requests should point to
mainand undergo code review against the Constitution.
- PascalCase: React components, TypeScript interfaces, classes, enums, type aliases (
TurretCard.tsx). Don't use the 'I' prefix for interfaces. - camelCase: Variables, utility functions, filenames for logic (
codeGenerator.ts). - kebab-case: General organizational directories.
Thank you for building a robust and resilient Sentinel!