feat: add --changed fast mode to maintenance agents restricting scope to git-modified files under devplacepy/ and tests/

Implement a new `--changed` flag for the maintenance agent fleet that limits checking and fixing to only files git reports as modified or new (untracked) under `devplacepy/` and `tests/`. The change introduces `agents/changed.py` with `changed_paths()` parsing `git status --porcelain`, adds `_WRITE_ALLOWLIST` guard logic in `agents/agent.py` (`set_write_allowlist`, `clear_write_allowlist`, `_allowlist_guard`) wired into `_mutation_guard` and `create_file`, threads the file list through `orchestrator.run_fleet` -> `agent.run` -> `_execute` -> `task_prompt` with a dedicated "CHANGED-FILES RUN" prompt branch, and exposes `make maintenance` (read-only) and `make maintenance-fix` (fix mode) targets in the Makefile. Documentation is updated in `AGENTS.md`, `CLAUDE.md`, and `README.md`.
This commit is contained in:
2026-06-12 06:15:19 +00:00
parent 425e9bdca1
commit 3ef1d02265
12 changed files with 220 additions and 23 deletions
+8
View File
@@ -534,8 +534,16 @@ 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
make maintenance # whole fleet, read-only, only git-changed files (fast)
make maintenance-fix # whole fleet, fix mode, only git-changed files (fast)
```
`make maintenance` and `make maintenance-fix` restrict the fleet to the files git
reports as modified or new under `devplacepy/` and `tests/`, so checking and fixing
work in progress is fast. In fix mode a hard write-allowlist guarantees no file
outside that changed set is ever touched. The flag is `--changed` on the
orchestrator and any single agent (`python -m agents.security --changed --check`).
Every run is legible live: each agent prints a start banner (icon, name, a
memorable codename, what it will do, and its report path), every line is prefixed
with the wall-clock time and elapsed duration, each AI call streams its running