agent: New agent to refactor and optimize code

This commit is contained in:
2025-09-25 23:34:40 +00:00
parent 98b3e5820b
commit 5e510d9bc6

View File

@@ -170,7 +170,7 @@ no_implicit_optional = true
**Python refactor playbook:**
* Replace long functions with helpers; keep functions ~2040 LOC when possible.
* Replace long functions with helpers; keep functions ~20-40 LOC when possible.
* Prefer **pure functions** for logic; isolate I/O.
* Use **`pathlib`** over `os.path` and **`dataclasses`/`pydantic`** for structured data.
* Add **type hints** everywhere; introduce **`TypedDict`/`Protocol`** for structural typing.