Contributing to FAT Agent with Superpowers¶
Adding a New Module¶
- Create a new file in
plugins/fat-agent-with-superpowers/scripts/modules/(e.g.my_module.py). - Subclass
BaseModulefrombase.pyand implement: name— Short identifier (snake_case, e.g.my_module).detect(html: str) -> bool— ReturnTrueif the module is relevant based on HTML signals.audit(html: str, url: str, **kwargs) -> list[dict]— Return a list of finding dicts with keys:category,check,priority(P0-P3),description,fix.- Register the module in
scripts/modules/__init__.pyby importing it and adding it to theMODULESlist. - Add detection tests in
tests/test_modules_<name>.pyand audit-output tests covering at least the happy path and a "no findings" case. - If the module should be included in an existing profile, update
scripts/profiles.py.
Running Tests¶
All tests must pass before submitting a PR. There are no external service dependencies; the test suite uses HTML fixtures and mocked responses.
Code Style¶
- Formatter: black (default settings).
- Linter: ruff (see
pyproject.tomlfor rule config). - Run both before committing:
Pull Request Process¶
- Fork the repo and create a feature branch from
develop. - Make your changes, add tests, and ensure
pytestandruffpass. - Open a PR targeting
developwith a clear description of what the change does and why. - A maintainer will review and merge.