AI Guard maintainer: commenter found flaw in our init-context measurement plan

Yashhh_21 · reddit · 2026-09-18

Follow-up from the maintainer of AI Guard, an open-source ESLint plugin for AI-assisted JS/TS (18 deterministic rules, CLI, GitHub Action). A commenter spotted a flaw in the plan to measure whether init-context reduces agent violations: the linter fires at CI time, stamped by commit rather than the turn that wrote the code. Turn-index data must come from the agent side (post-tool-use hooks); correlating the two clocks is the real project.

Revised plan: run checks via hooks on every file the agent just touched, log violations with turn position, then compare with/without instruction files — until then, git blame per violation is a weak proxy and they'll say so.

Project recap: 18 rules covering floating promises, empty catches, hardcoded secrets, SQL concat, missing authz; npx ai-guard run; GitHub Action with SARIF output; init-context generates CLAUDE.md / .cursorrules / copilot-instructions.md. MIT, free, no paid tier.

Original post →

More from coding & agent

coding & agent channel →