| 
 | 1 | +<!--   | 
 | 2 | +Think of AGENTS.md as a README for AI agents: a dedicated, predictable place to provide the context and instructions to help AI coding agents work on your project.  | 
 | 3 | +See https://agents.md for more info  | 
 | 4 | +-->  | 
 | 5 | + | 
 | 6 | +# Repository Guidelines  | 
 | 7 | +## Project Structure & Module Organization  | 
 | 8 | +- Source: `nettacker/` (CLI: `nettacker/main.py`, API: `nettacker/api/`, core libs: `nettacker/core/`, modules: `nettacker/modules/`).  | 
 | 9 | +- Entry points: `nettacker.py` (Python) and `poetry` script `nettacker`.  | 
 | 10 | +- Tests: `tests/` (mirrors package layout: `tests/core/`, `tests/lib/`, etc.).  | 
 | 11 | +- Docs & assets: `docs/`, `nettacker/web/static/`.  | 
 | 12 | +- Runtime data (not for commit): `.nettacker/data/` (DB at `.nettacker/data/nettacker.db`, results in `.nettacker/data/results/`).  | 
 | 13 | + | 
 | 14 | +## Build, Test, and Development Commands  | 
 | 15 | +- Install: `poetry install` (uses `pyproject.toml`).  | 
 | 16 | +- Lint/format (all hooks): `make pre-commit` or `pre-commit run --all-files`.  | 
 | 17 | +- Tests: `make test` or `poetry run pytest` (coverage configured via `pyproject.toml`).  | 
 | 18 | +- Run CLI: `poetry run nettacker --help` or `python nettacker.py --help`.  | 
 | 19 | +- Docker (web UI): `docker-compose up`.  | 
 | 20 | + | 
 | 21 | +## Coding Style & Naming Conventions  | 
 | 22 | +- Python 3.9–3.12 supported. Use 4-space indents.  | 
 | 23 | +- Line length: 99 chars (`ruff`, `ruff-format`, `isort` profile=black).  | 
 | 24 | +- Names: modules/files `lower_snake_case`; functions/vars `lower_snake_case`; classes `PascalCase`; constants `UPPER_SNAKE_CASE`.  | 
 | 25 | +- Keep functions small, typed where practical, and add docstrings for public APIs.  | 
 | 26 | + | 
 | 27 | +## Testing Guidelines  | 
 | 28 | +- Framework: `pytest` (+ `pytest-asyncio`, `xdist`).  | 
 | 29 | +- Location/pattern: place tests under `tests/`; name files `test_*.py`; parametrize where useful.  | 
 | 30 | +- Coverage: enforced via `--cov=nettacker` (see `tool.pytest.ini_options`). Add tests with new features and for bug fixes.  | 
 | 31 | +- Run subsets: `poetry run pytest -k <expr>`.  | 
 | 32 | + | 
 | 33 | +## Commit & Pull Request Guidelines  | 
 | 34 | +- Commit messages: imperative tense, concise subject; reference issues (`Fixes #123`).  | 
 | 35 | +- Before pushing: `pre-commit run --all-files` and `make test` must pass.  | 
 | 36 | +- PRs: include a clear description, rationale, linked issue(s), test evidence (logs or screenshots for web UI), and update docs if behavior changes.  | 
 | 37 | + | 
 | 38 | +## Security & Configuration Tips  | 
 | 39 | +- Legal/ethics: only scan assets you are authorized to test.  | 
 | 40 | +- Secrets: never commit API keys, DBs, or results; `.nettacker/data/` is runtime-only.  | 
 | 41 | +- Config: defaults in `nettacker/config.py` (API key, DB path, paths). Review sensitive headers list before logging.  | 
0 commit comments