"""Static code forensics — pure text analysis, no model, no dependencies. Imports nothing outside the standard library, so it runs and is testable without torch. Answers a different question than the stylometry model: not "does this read as AI-written" but "does this text bear the physical traces of having been pasted in rather than typed here". """ import re import statistics COMMENT_PREFIXES = ("#", "//", "/*", "*", "--", "