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:
2026-06-11 23:35:31 +00:00
parent 045c36bd38
commit c38e9c8bfa
55 changed files with 5563 additions and 0 deletions
+38
View File
@@ -496,6 +496,44 @@ tools: `tool_create`, `tool_list`, `tool_get`, `tool_update` (including enable/d
the same engine that powers virtual tools. Self-evaluation depth is bounded so a tool cannot loop by
calling itself.
## Maintenance agents
DevPlace ships a fleet of autonomous AI maintenance agents under `agents/` that
keep the codebase consistent. Each agent owns one quality dimension, sweeps the
whole repository for problems in that dimension, and either reports them or fixes
them and verifies the build. The full design is in `agents.md`; the public,
newbie-friendly guide is at `/docs/maintenance-agents.html` and
`/docs/maintenance-usage.html`.
Every agent runs in two modes: `--fix` (default, autonomous) or `--check`
(report only, non-zero exit on findings). The agents share one proven engine
(`agents/agent.py`) and verify their own work with `agents/validator.py`, a
dependency-free validator (Python `ast`/`py_compile`, JavaScript `node --check`,
CSS brace balance, HTML and Jinja templates parsed with Jinja2).
| Agent | Dimension |
|-------|-----------|
| `maestro` | Conversational conductor; runs the right agent or the whole fleet for you |
| `security` | Route authorization, private-data and admin guards, input validation |
| `audit` | Every state change leaves an audit-log entry |
| `devii` | Devii capability parity and role-gated tool visibility |
| `docs` | CLAUDE.md / AGENTS.md / README / `/docs` accuracy and role-aware visibility |
| `fanout` | A feature is wired across every layer (form, schema, Devii tool, docs, SEO) |
| `dry` | Duplication removed; shared helpers reused |
| `style` | Naming, headers, typing, formatting rules |
| `frontend` | ES6 modules, web components, CSS structure |
| `seo` | Search metadata and sitemap coverage |
| `test` | Integration-test coverage (writes tests, never runs the suite) |
```bash
make maestro # talk to the conductor; it runs the rest
make validate # validate the whole codebase (no external tools)
make audit-agent # fix one dimension autonomously
make audit-agent CHECK=1 # report only
make agents-all # run the whole fleet
make agents-all CHECK=1 # CI gate across the fleet
```
## Push notifications & PWA
Authenticated users can receive native web push notifications, and the site is an