| name | coding-convention |
| description | Python coding conventions for this workspace. Use when writing or reviewing Python in taskflow-api or scan-simulator — apply automatically, without asking for confirmation. |
Coding Convention — Python
Agent behaviour
When writing or reviewing Python code anywhere in this workspace, apply the
rules below automatically — do not ask for confirmation.
Formatting
- Indentation: 4 spaces, never tabs.
- Formatter: autopep8 (format-on-save); otherwise follow PEP 8.
- Max line length: keep lines reasonable; the formatter's limit wins over
hand-wrapping debates.
Naming
| Element | Style | Example |
|---|
| Script files | lower_snake_case | run_test.py |
| Classes | UpperCamelCase | TaskService, ScanClient |
| Methods, functions | lower_snake_case | close_task(), parse_result() |
| Variables | lower_snake_case | file_path, task_count |
| Constants | UPPER_SNAKE_CASE | MAX_RETRIES, DEFAULT_TIMEOUT |
Rules
- Python 3 only.
- CLI scripts always parse arguments with
argparse — no hand-rolled
sys.argv parsing.
- Functional tests run against the scan simulator, never a real external
service (see the workspace AGENTS.md).