fix: prevent repeated pi command loops

This commit is contained in:
2026-04-30 00:58:02 +03:00
parent 03da13879a
commit 343b2c0759
28 changed files with 136 additions and 27 deletions
+10
View File
@@ -41,6 +41,16 @@ pnpm test:e2e:angular # Legacy Angular app, port 4203
- Preserve SEO/accessibility requirements, including JSON-LD and OpenGraph where relevant.
- Keep layouts fluid and responsive across screen sizes.
## Agent Runtime Safety
- If a task asks for Pi Crew, use the Pi Crew `team` tool or the project slash prompt; do not silently continue as a normal parent Pi implementation session.
- Do not call unavailable abstract tools such as `glob`; use `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`.
- Never repeat the same failed tool call or shell command more than once. Treat identical command, identical exit code, and identical/no output as a loop signal.
- If a command exits non-zero with no useful output, do not retry it unchanged. Inspect source/tests or change the hypothesis first.
- If a focused test fails, use the failure location to inspect and fix code/tests; do not repeatedly grep test output for unrelated terms.
- After two failed verification attempts without a code or test change, stop and report the blocker, current hypothesis, and next concrete fix.
- If five consecutive tool calls add no new information, stop and summarize what is known instead of continuing.
## Architecture
Top-level source areas: