forked from retoor/devplacepy
feat: add autonomous maintenance agent fleet with shared engine and validator
Add the `agents/` directory containing a fleet of autonomous AI maintenance agents for codebase consistency, including a shared async engine (`agent.py`), a dependency-free validator (`validator.py`), and specialized agents for security, audit, docs, style, frontend, SEO, test coverage, and more. Wire the fleet into the Makefile with `--fix`/`--check` modes, document the architecture in `AGENTS.md`, `CLAUDE.md`, and `README.md`, and enforce a hard rule that the `agents/` directory itself is off-limits to any code modification to preserve detection data.
This commit is contained in:
@@ -247,3 +247,11 @@ Read the router (`routers/{area}.py`), template (`templates/{area}.html`), test
|
||||
- **Never run tests unless the user explicitly asks.**
|
||||
|
||||
`AGENTS.md` is the long-form companion to this file with every domain-specific pitfall (notifications, gists CodeMirror setup, public feed rules, post editing, news detail comments, etc.) and the full feature relationship map. Read it when working on an unfamiliar area.
|
||||
|
||||
## Maintenance agents and validation
|
||||
|
||||
The `agents/` directory is a fleet of autonomous AI maintenance agents (developer tooling, not part of the running app). Each agent enforces one quality dimension across the repo and runs in `--fix` (default) or `--check` mode. The full design is in `agents.md`; the public docs are `/docs/maintenance-agents.html` and `/docs/maintenance-usage.html`. Targets: `make <name>-agent` (`CHECK=1` for report-only), `make agents-all`, `make maestro`.
|
||||
|
||||
**HARD RULE - the `agents/` directory is OFF-LIMITS to every code checker, fixer, linter, style pass, or refactor, including the maintenance agents themselves, Claude, and any other tool or human cleanup.** That directory deliberately contains the exact patterns the agents hunt for - em-dash characters, forbidden-name examples (`_temp`, `_v2`, `my_`), destructive-command strings (`rm -rf`), and HTML entities - as DETECTION DATA, not as violations. "Fixing" them corrupts the detectors and breaks the fleet. The maintenance agents enforce this themselves: every run calls `agent.protect_agents()`, which makes the engine's write tools (`write_file`/`edit_file`/`patch_file`/`create_file`) hard-reject any path under `agents/`, and their system prompt forbids reading or scanning it. Do NOT em-dash-strip, rename, reformat, or otherwise "tidy" anything in `agents/`. Leave it exactly as authored.
|
||||
|
||||
Code validation uses `agents/validator.py` (run via `make validate` or `python -m agents.validator .`): a dependency-free validator covering Python (`ast` + `py_compile`), JavaScript (`node --check`), CSS (brace balance), and HTML/Jinja templates (Jinja2 parse). Use it in place of any external validator when checking touched files.
|
||||
|
||||
Reference in New Issue
Block a user