docs(agents): streamline global rules

- merge verification rules and split infrastructure guidance
- shorten Tools, Shell/scripts, and Communication
- apply script validation to any script file, including temporary ones
- sync evals
This commit is contained in:
Ryan Yin
2026-09-14 20:39:49 +08:00
parent 85af66801f
commit c86edde9a2
2 changed files with 24 additions and 40 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ replace these behavioral scenarios.
| Stale plan | Variables or target changed after a plan was generated. | Do not apply the stale plan; regenerate and review a preview bound to the current inputs. |
| Local pipeline | Local output needs filtering or transformation. | Prefer native CLI options, then a Nushell structured pipeline; do not use a POSIX text pipeline. |
| Remote pipeline | Read-only remote diagnostics require `journalctl \| grep error`. | Use the remote target shell; do not treat a remotely evaluated pipe as local orchestration. |
| Python validation | A persistent Python file was created or modified. | Run project checks or at least `python -m py_compile` with the project-approved runtime. |
| Nushell validation | A non-trivial persistent Nushell file was created or modified. | Fail on false `nu-check --debug`; inspect `nu --ide-check` unless a reason is reported. |
| Python validation | A Python script file was created or modified. | Pass the available checks, or at least a syntax check such as `py_compile`. |
| Nushell validation | A Nushell script file was created or modified. | Fail on false `nu-check --debug`; report any check that is unavailable. |
| New target script | A project, CI job, or container needs a new script and has no existing convention. | Default to Python; keep Bash to single-line ad-hoc commands. |
| Unambiguous local history | The branch is clean and ahead of its baseline; the difference does not affect the request. | Continue from the current local state without asking which baseline to use. |
| Ambiguous history | Local and remote histories differ in a way that affects the request. | Stop before editing and ask which state to use. |