chore: sync framework content from agent-runtimes main (2026-04-28)

- Hardens qwen-code-methodology rules (no code deletion, pre-commit diff)
- Fixes test-writing CLAUDE.md workspace path
- Adds best-practices-opus-repo/v1 composite harness
- Adds opus-best-practices-review task template
- Adds max_turns support to airouter task template defaults
- Updates agent-repo finalize.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul O'Reilly
2026-04-28 10:58:01 +12:00
parent 37a5165dfb
commit 0272e3df1e
6 changed files with 66 additions and 9 deletions

View File

@@ -86,6 +86,29 @@ fi
# AR-8: Check if there are any changes to commit
git add -A
# AR-37/F73-10: Exclude protected test folders from commit.
# PROTECTED_TEST_FOLDERS is set by entrypoint.py when test_pass_required is active.
# This is defense-in-depth: prevents test file changes reaching the agent branch even
# if the entrypoint revert had a window between the last test run and finalize.
if [ -n "${PROTECTED_TEST_FOLDERS:-}" ]; then
IFS=',' read -ra _PROTECTED_FOLDERS <<< "$PROTECTED_TEST_FOLDERS"
for _folder in "${_PROTECTED_FOLDERS[@]}"; do
_folder=$(echo "$_folder" | xargs) # trim whitespace
if [ -n "$_folder" ]; then
echo "F73: Excluding test folder from commit: $_folder"
git reset HEAD -- "$_folder" 2>/dev/null || true
git checkout HEAD -- "$_folder" 2>/dev/null || true
git clean -fd -- "$_folder" 2>/dev/null || true
fi
done
# Also exclude test infrastructure files
for _infra in conftest.py pyproject.toml pytest.ini setup.cfg tox.ini; do
git reset HEAD -- "$_infra" 2>/dev/null || true
git checkout HEAD -- "$_infra" 2>/dev/null || true
git clean -fd -- "$_infra" 2>/dev/null || true
done
fi
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit — skipping push (AR-8)"
# Write metadata with agent_branch_pushed=false