- Always commit your work. Stage all relevant changes and create a commit with a clear message following the project's
<type>: <description>format (feat, fix, docs, style, refactor, test, chore). - Always push after committing. Keep the remote in sync — run
git pushafter every commit. The repo should never be ahead of origin when a task is done. - Clean up temporary files. Remove any scratch files, temp outputs, or artifacts created during the session (e.g.,
commitmsg.txt, leftover debug files). - Clean up branches. If you created a feature branch and the work is merged or complete, delete it locally and remotely. The default workflow is to work directly on
mainunless the user says otherwise.
- This project is developed on Windows but tools like Foundry, nuclei, and shell scripts target Linux/WSL.
- Always use
pathlib.Pathfor file operations, neveros.path. - Use
Path.expanduser()when resolving paths that contain~. - Use
shutil.which()to verify tool availability before calling external executables. - Never hardcode platform-specific paths (
/usr/bin/,C:\,/mnt/c/). - The repo has a
.gitattributesenforcing LF line endings for scripts and source files. Do not override this.
- Python 3.11+, strict mypy typing, ruff linting (line length 100).
- Use structlog for logging, not print statements.
- Follow existing patterns in the codebase for new code.
- Tests go in
secbrain/tests/. Run with:cd secbrain && pytest tests/ -v