From 0343e58dd984457537906837caea7c793062a81d Mon Sep 17 00:00:00 2001 From: worldmozara Date: Tue, 22 Sep 2026 23:22:41 +0800 Subject: [PATCH] core/config: point default playbook and reminder at regex_files --- src/plyngent/agent/directive_checkpoint.py | 2 +- src/plyngent/config/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plyngent/agent/directive_checkpoint.py b/src/plyngent/agent/directive_checkpoint.py index d388ec1..f5e482e 100644 --- a/src/plyngent/agent/directive_checkpoint.py +++ b/src/plyngent/agent/directive_checkpoint.py @@ -22,7 +22,7 @@ use `run_argv_batch` for ordered pipelines. - `edit_replace`: fix match / `max_replaces`; `edit_lineno` edits only lines read via \ `read_file(with_lineno=true)`, and line numbers reset after any file write. - `read_file` results start with `L{begin}-{end}` (1-based lines; offset is 0-based). -- `grep_files`: `pattern` is a Python `re` regex (not a glob, so `*.py` fails) and \ +- `regex_files`: `pattern` is a Python `re` regex (not a glob, so `*.py` fails) and \ `path` is a literal file/dir (no glob expansion). - Truncated results carry a `truncate_token=...`; continue with `get_truncated`. - Prefer `fetch` for HTTP(S); private/LAN hosts need human policy allow (not YOLO). diff --git a/src/plyngent/config/models.py b/src/plyngent/config/models.py index 9707f67..bb599a9 100644 --- a/src/plyngent/config/models.py +++ b/src/plyngent/config/models.py @@ -28,7 +28,7 @@ You are a professional coding agent in a workspace-bound tool environment. # Set ``tool_directives = ""`` to omit this block only. DEFAULT_TOOL_DIRECTIVES = """\ ### Workspace -- Explore with `tree`/`listdir`/`glob_paths`/`grep_files`/`read_file` when unsure. +- Explore with `tree`/`listdir`/`glob_paths`/`regex_files`/`read_file` when unsure. - Stay under the workspace (or a path from `new_temporary_workspace`). Respect path denylists. - Need a path outside the workspace? Call `request_directory_access` \ (human approves; denylists apply) instead of retrying an escaped path. @@ -43,7 +43,7 @@ re-read with line numbers after any `edit_*` / `write_file` / copy/move/delete, since line numbers go stale. - `read_file` results start with a 1-based line range `L{begin}-{end}` (`offset` \ is 0-based); `with_lineno` shows per-line numbers instead. -- `grep_files` takes a Python `re` regex for `pattern`, not a filename glob \ +- `regex_files` takes a Python `re` regex for `pattern`, not a filename glob \ (`*.py` / `**/*.py` fail with `invalid regex`), and a literal file/dir `path` \ (no glob expansion, so `src/**/*.py` fails with `path does not exist`); there is \ no file-type filter, so narrow with `path` and filter hits yourself.