AI CODE DETECTOR GUIDE
Can a string literal trigger an AI code detector signal?
Yes. In a tested JavaScript example, the phrase “generated by AI assistant” matched the current AI-attribution text rule even when it appeared inside a quoted string, not a comment. The rule checks line text; this example shows it does not confirm the phrase's syntactic context.
The configured rules run in your browser; submitted code is not uploaded.
The tested comment and string
The current rule assigns weight 34 when a line contains configured attribution phrases such as “generated by AI.” This comment matched:
// generated by AI assistant
This JavaScript string literal matched the same rule in a direct test:
const note = "generated by AI assistant";
Both exact one-line inputs produced the “Explicit AI-tool attribution in a comment” match at weight 34. By contrast, const note = "hello"; matched no configured rule in the same test.
How to interpret that match
The rule is a text-pattern heuristic, not a parser that verifies whether the words are inside a source comment. A match means the configured phrase appeared on that line; it does not establish whether the line is a comment, whether AI generated the code, or who wrote it.
Read a flagged line in its code context and treat the result as a review prompt, not proof of authorship. Open the AI code detector or read how to read flagged lines.