UNPKG

loqatevars

Version:

Locate JavaScript files with 'const' or 'process.env' usage in LLM-generated codebases

30 lines (19 loc) 1.53 kB
# AGENTS.md ## VISION This project, `loqatevars`, enforces an architectural pattern where environment variables and constants are centralized. The core business logic is to prevent the proliferation of scattered `process.env` calls and `const` declarations in large, especially AI-generated, codebases. This tool was created to automate the detection of non-compliance with this pattern, as manual auditing is error-prone and time-consuming. The intended end-state for a codebase analyzed by this tool is to have a single, clearly-defined configuration file (e.g., `config.js` or `localVars.js`) from which all other modules import their configuration. ## FUNCTIONALITY No undocumented items. ## SCOPE **In-Scope:** * Identifying `.js` files containing `const` or `process.env`. * Providing command-line and programmatic interfaces for file scanning. * Ignoring specified files and directories to narrow the search. **Out-of-Scope:** * Automatically refactoring or modifying the identified files. The tool is for detection only. * Analyzing file types other than JavaScript by default (though configurable). * Supporting languages other than JavaScript. ## CONSTRAINTS * All tests reside in the `tests/` directory and are executed via Jest. * The `directory_test/` and `test_samples/` directories contain files specifically designed for testing various scenarios. Do not add, remove, or modify files in these directories unless you are intentionally changing the test cases. ## POLICY No undocumented items.