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
+9 -1
View File
@@ -9,5 +9,13 @@ Scope:
$@
Audit architecture, consistency, type contracts, test debt, dependency/config debt, performance, observability, security hygiene, and documentation drift. Prefer file:line-cited findings and a ranked remediation plan. Do not edit production code.
Execution safety:
- Call the Pi Crew `team` tool for this workflow.
- 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.
- If a command exits non-zero with no useful output, do not retry it unchanged; inspect source/tests or change the hypothesis first.
- After two failed verification attempts without new evidence, stop and report the blocker.
- If five consecutive tool calls add no new information, stop and summarize what is known.
Audit architecture, consistency, type contracts, test debt, dependency/config debt, performance, observability, security hygiene, and documentation drift. Prefer file:line-cited findings and a ranked remediation plan. Do not edit production code.
+9 -1
View File
@@ -7,5 +7,13 @@ Use pi-crew with the `flights-web` team and the `memory-evolution` workflow for:
$@
Look for repeated manual guidance, observed errors, fixes that worked, and agent self-evaluation findings. Propose memory updates and prompt/workflow/template patches only when evidence is strong enough. Require critic review, validation, and GitOps before accepting changes.
Execution safety:
- Call the Pi Crew `team` tool for this workflow.
- 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.
- If a command exits non-zero with no useful output, do not retry it unchanged; inspect source/tests or change the hypothesis first.
- After two failed verification attempts without new evidence, stop and report the blocker.
- If five consecutive tool calls add no new information, stop and summarize what is known.
Look for repeated manual guidance, observed errors, fixes that worked, and agent self-evaluation findings. Propose memory updates and prompt/workflow/template patches only when evidence is strong enough. Require critic review, validation, and GitOps before accepting changes.
+10 -1
View File
@@ -7,5 +7,14 @@ Use pi-crew with the `flights-web` team and the `angular-react-parity` workflow
$@
Treat `ClientApp/` as the Angular reference and `src/` as the React implementation. Produce or update the business-logic spec, parity matrix, and verification report under `docs/parity/`. Use existing compare scripts and Playwright MCP where useful. Do not edit production code unless I explicitly ask for an implementation follow-up.
Execution safety:
- Call the Pi Crew `team` tool for this workflow; do not implement the task directly in the parent Pi 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.
- 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 new evidence, 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.
Treat `ClientApp/` as the Angular reference and `src/` as the React implementation. Produce or update the business-logic spec, parity matrix, and verification report under `docs/parity/`. Use existing compare scripts and Playwright MCP where useful. Do not edit production code unless I explicitly ask for an implementation follow-up.
+9 -1
View File
@@ -9,5 +9,13 @@ Scope:
$@
Review the current branch or diff for correctness, regressions, test gaps, unnecessary complexity, docs drift, and GitOps readiness. Do not edit files unless a clearly safe documentation or config fix is required and you report it explicitly.
Execution safety:
- Call the Pi Crew `team` tool for this workflow.
- 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.
- If a command exits non-zero with no useful output, do not retry it unchanged; inspect source/tests or change the hypothesis first.
- After two failed verification attempts without new evidence, stop and report the blocker.
- If five consecutive tool calls add no new information, stop and summarize what is known.
Review the current branch or diff for correctness, regressions, test gaps, unnecessary complexity, docs drift, and GitOps readiness. Do not edit files unless a clearly safe documentation or config fix is required and you report it explicitly.
+10 -1
View File
@@ -7,5 +7,14 @@ Use pi-crew with the `flights-web` team and the `spec-driven-implementation` wor
$@
Prefer a worktree for non-trivial implementation. Run spec analysis, planning, critic review, TDD/test planning, implementation, unit/e2e verification, code review, docs handoff, and GitOps handoff according to the project crew config.
Execution safety:
- Call the Pi Crew `team` tool for this workflow; do not implement the task directly in the parent Pi 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.
- 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.
Prefer a worktree for non-trivial implementation. Run spec analysis, planning, critic review, TDD/test planning, implementation, unit/e2e verification, code review, docs handoff, and GitOps handoff according to the project crew config.
+10 -1
View File
@@ -7,5 +7,14 @@ Use the `tdd-tester`, `unit-tester`, and implementation roles from the `flights-
$@
Start by identifying the behavior contract and the smallest failing test. Then implement the minimal change, run focused tests, and ask critic/reviewer roles to check the result before GitOps.
Execution safety:
- Prefer the Pi Crew `team` tool; do not continue as an uncoordinated parent Pi implementation session unless the user explicitly asks.
- 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.
- 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.
Start by identifying the behavior contract and the smallest failing test. Then implement the minimal change, run focused tests, and ask critic/reviewer roles to check the result before GitOps.
+4 -1
View File
@@ -24,7 +24,10 @@ You are an adversarial but practical critic.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Find hidden assumptions, missing tests, parity gaps, overengineering, SSR hazards, layer-boundary violations, security risks, rollout risks, and rollback gaps. Challenge the plan or result, but keep recommendations concrete and proportionate.
+4 -1
View File
@@ -24,7 +24,10 @@ You handle operational changes for Aeroflot Flights Web.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Inspect before changing. Preserve secrets. Prefer dry-run/read-only checks first. Document rollback steps for CI/CD, Docker, remote MF builds, SSR deployment, and local dev-server changes. Require explicit approval before destructive operations.
+4 -1
View File
@@ -25,7 +25,10 @@ You write concise technical documentation for maintainers.
- If bash is available in the current runtime, prefer `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to an available listed tool.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Use Context7 through MCP when documenting framework/library behavior. Prefer operational, step-by-step guidance and file:line citations. For parity/spec work, keep the artifact falsifiable: every rule should point to source code, a test, a screenshot, or a known open question.
+4 -1
View File
@@ -24,7 +24,10 @@ You validate browser workflows.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Use Playwright MCP through the MCP proxy when interactive browser evidence helps. Use project commands:
+4 -1
View File
@@ -26,7 +26,10 @@ Respect `AGENTS.md`: work in `src/`; do not edit `ClientApp/` unless explicitly
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Keep edits local to the approved plan. Do not refactor unrelated code. Run the smallest relevant verification and report commands, changed files, and residual risk. End with the shared `self_eval` block.
+4 -1
View File
@@ -32,7 +32,10 @@ Respect `AGENTS.md`: work in `src/`; treat `ClientApp/` as the legacy Angular re
- `git grep -n "pattern"`
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
## Output
+4 -1
View File
@@ -24,7 +24,10 @@ You are the GitOps specialist for this repository.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
The user has authorized autonomous commit and push after successful verification in this project. Use feature branches, not direct pushes to the current/default branch.
+4 -1
View File
@@ -24,7 +24,10 @@ You maintain project memory for Aeroflot Flights Web.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Use the Karpathy-style pattern:
+4 -1
View File
@@ -26,7 +26,10 @@ Respect `AGENTS.md`: work in `src/`; treat `ClientApp/` as a legacy reference on
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Produce:
+4 -1
View File
@@ -24,7 +24,10 @@ You improve the agent system through evidence-backed prompt evolution.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Inputs to inspect:
+4 -1
View File
@@ -26,7 +26,10 @@ Respect `AGENTS.md`. Prioritize correctness, regressions, missing tests, SSR haz
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Report findings first, ordered by severity with file:line evidence. If there are no findings, say so and state remaining verification gaps. Do not edit files unless explicitly asked. End with the shared `self_eval` block.
+4 -1
View File
@@ -28,7 +28,10 @@ Your job is to analyze before implementation. Produce:
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
- scope and non-goals
+4 -1
View File
@@ -24,7 +24,10 @@ You design the smallest meaningful failing test before implementation.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
For this project, prefer `pnpm test` for fast behavior contracts and Playwright only when browser behavior is required. State:
+4 -1
View File
@@ -24,7 +24,10 @@ You audit the repository before judging it.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
First map architecture, module boundaries, git churn, largest files, test layout, and build/test commands. Then produce file:line-cited findings across architecture, consistency, type contracts, test debt, dependency/config debt, performance, observability, security hygiene, documentation drift, and Angular-to-React migration debt.
+4 -1
View File
@@ -24,7 +24,10 @@ You focus on fast tests and regression coverage.
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
Prefer behavior contracts over implementation details. Use project commands from `AGENTS.md`: `pnpm test`, `pnpm test:coverage`, `pnpm check-coverage`, `pnpm typecheck`, and `pnpm lint` as appropriate.
+4 -1
View File
@@ -28,7 +28,10 @@ Inspect:
- For file discovery and code search, prefer bash commands: `rg --files`, `rg -n "pattern" path`, `find path -name "pattern"`, `sed -n 'start,endp' file`, `nl -ba file | sed -n 'start,endp'`, and `git grep -n "pattern"`.
- If any tool returns `Tool <name> not found`, stop using that tool immediately and switch to bash.
- If the same tool error repeats twice, stop the task and report the blocker.
- Never repeat the same failed tool call more than once.
- 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 produce no new information, stop and summarize what is known.
- routes and entry points
@@ -11,7 +11,7 @@ Discover relevant Angular and React code for: {goal}
Treat `ClientApp/` as the Angular reference and `src/` as the React implementation. Identify routes, components, services/API clients, state, tests, fixtures, docs, and existing parity scripts.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or continue after five consecutive calls that add no new information.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or shell commands. 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. Do not continue after five consecutive calls that add no new information.
## analyze-parity
role: parity
@@ -11,7 +11,7 @@ Inspect the user's supplied lesson, recent safe daily logs, agent self-evaluatio
Classify candidates as `stable-rule`, `project-convention`, `user-preference`, `workflow-fix`, `model-weakness`, `one-off`, or `hypothesis`.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or continue after five consecutive calls that add no new information.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or shell commands. 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. Do not continue after five consecutive calls that add no new information.
## compile-memory
role: memory
+1 -1
View File
@@ -11,7 +11,7 @@ Identify changed or relevant areas for review: {goal}
Use `git status --short`, `git diff`, and targeted code search. Do not edit files.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or continue after five consecutive calls that add no new information.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or shell commands. 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. Do not continue after five consecutive calls that add no new information.
## code-review
role: reviewer
@@ -11,7 +11,7 @@ Map the relevant code for: {goal}
Focus on `src/`, route entry points, feature modules, shared APIs, tests, existing docs, and project constraints from `AGENTS.md`. Mention `ClientApp/` only if legacy parity matters.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or continue after five consecutive calls that add no new information.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or shell commands. 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. Do not continue after five consecutive calls that add no new information.
## spec
role: spec
@@ -9,7 +9,7 @@ output: audit-orientation.md
Map the repository for a technical debt audit. Include architecture, module boundaries, largest files, most changed files, test layout, build commands, dependencies, and known migration/parity areas.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or continue after five consecutive calls that add no new information.
Tool policy: do not call `glob` or any unavailable abstract discovery tool. Use bash discovery only: `rg --files`, `rg -n`, `find`, `sed`, `nl`, and `git grep`. If a tool returns `Tool <name> not found`, stop using it immediately; if the same tool error repeats twice, stop the task and report the blocker. Do not repeat failed tool calls or shell commands. 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. Do not continue after five consecutive calls that add no new information.
## audit
role: tech-debt
+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: