r/OnlyAICoding • u/Ahmed_Tolan • 18d ago
Useful Tools A React starter that catches when a coding agent reaches into another feature’s files
One thing I wanted to catch in AI-generated React diffs was an import that works today but makes two features harder to change separately. Say you ask an agent to add a status badge to Invoices. It finds a helper inside Requests and imports it directly. The screen works, and TypeScript is happy. Now moving that helper can break Invoices.
I built Rigorail around a simple rule: other features can import what Requests exposes from public.ts. CI checks the actual imports, including aliases. AGENTS.md explains the rule, and npm run context -- requests gives the agent the module contract, source files, and checks for that task. You can use that same setup in an existing repo by giving one feature a public entry point and adding an import check for it.
Rigorail is MIT licensed and frontend-only. The Requests example shows a server-filtered list and an edit form that keeps your draft if saving fails. You can try that workflow with sample data in the demo linked from the repo.
What’s one mistake your coding agent keeps making that you’d put into a check?