Delete four stale SEO and style agent report JSON/MD files from agents/reports/ that had zero findings or were superseded. Export PYTHONDONTWRITEBYTECODE=1 in the Makefile so all make targets suppress bytecode generation, and add a `tree` target that lists the repository file tree via git ls-tree. Update AGENTS.md and CLAUDE.md documentation to reflect that routers now form a directory tree mirroring URL paths and that bytecode writing is disabled project-wide.
15 lines
298 B
Python
15 lines
298 B
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
import json
|
|
|
|
|
|
def parse_metadata(raw: str | dict | None) -> dict | None:
|
|
if not raw:
|
|
return None
|
|
if isinstance(raw, dict):
|
|
return raw
|
|
try:
|
|
return json.loads(raw)
|
|
except (ValueError, TypeError):
|
|
return {"raw": str(raw)}
|