-
-
Notifications
You must be signed in to change notification settings - Fork 400
Add --source-mode to the bundled ChatGPT/Codex detector script #244
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingfalse-positiveA rule fired on writing that was not machine-generatedA rule fired on writing that was not machine-generatedgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Activity
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfalse-positiveA rule fired on writing that was not machine-generatedA rule fired on writing that was not machine-generatedgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
skills/ai-writing-detector/scripts/detect.jssupports only--fileand--context.scripts/sync-plugin-skill.shcopiespatterns.jsinto that directory but never regeneratesdetect.js, so it has drifted frombin/avoid-ai-writing.js.On a Markdown file with YAML frontmatter, the root CLI with
--source-mode rendered-markdownreports[0, "Clean", []]. The bundled script reports[15, "Minimal AI signals", ["tier1", "tier1", "tier1"]], all three hits from the frontmatter. Passing the flag throws a raw Node stack trace (unknown argument: --source-mode) instead of the root CLI's exit-2 message.Rendered-Markdown mode is active work (#123, #189, #190, #196) and the published plugin cannot reach it. The failure it prevents is the repo's worst false-positive class: unedited metadata scored as the author's prose.
Scope
Make
detect.jsa thin wrapper over the root CLI's parser, or add it to the files the sync script generates, so the two cannot drift again. Add--source-modewith matching validation and exit codes. Mirror the flag inskills/ai-writing-detector/SKILL.mdwith guidance on when to use it. Run the sync script andpython3 scripts/validate-openai-plugin.py . --json.Acceptance criteria
--source-mode.detect.js(git diffempty after running it) or a test pins parser parity.npm testand the OpenAI plugin validator pass.Add an
## [Unreleased]changelog entry: this changes the published plugin.