Skip to content

fix(agents): delegate refactor-assistant test execution to the caller#731

Merged
kcenon merged 1 commit into
developfrom
fix/issue-728-refactor-assistant-test-delegation
Jun 13, 2026
Merged

fix(agents): delegate refactor-assistant test execution to the caller#731
kcenon merged 1 commit into
developfrom
fix/issue-728-refactor-assistant-test-delegation

Conversation

@kcenon

@kcenon kcenon commented Jun 13, 2026

Copy link
Copy Markdown
Owner

변경 내용

refactor-assistant 에이전트 정의(plugin/agents/ + project/.claude/agents/, 2개 파일)의 ## Safety Verification Protocol 섹션을 재서술하여, 테스트 실행·커밋·revert 책임을 호출 세션(calling session)에 위임하도록 정직하게 표현했다.

배경

이 에이전트의 toolsRead, Edit, Glob, GrepBash가 없다. 그런데 기존 ## Safety Verification Protocol은 다음을 hard requirement로 명시하고 있었다.

  • "Run existing test suite — record baseline"
  • "Re-run tests after each change — revert immediately on any failure"
  • "Run full test suite — compare pass count against baseline"
  • Hard Stop: "Revert on any test failure"
  • "commit each independently"

Bash가 없으므로 테스트 실행·커밋·git revert 중 어느 것도 수행할 수 없다. 즉 동작 보존(behavior-preserving) 안전 계약 전체가 실행 도구 없이 약속되어 있어, 검증 없는 "테스트 통과" 보고로 이어질 수 있는 자기모순이었다. 또한 project 레이어의 permissionMode: acceptEdits와 결합되면 검증되지 않은 편집이 자동 수락된다.

구현

  • ## Safety Verification Protocol 섹션을 재서술하여, 이 에이전트는 편집만 적용하고 테스트 실행·커밋·rollback은 호출 세션이 담당함을 명문화했다.
  • Before / During / After / Hard Stops 하위 항목을 "호출 세션에 테스트 baseline 확인 요청", "각 변경마다 호출 세션이 실행할 테스트 명령을 보고", "실패 보고 시 해당 변경 revert 권고" 형태로 조정했다.
  • ## Processrun baseline tests 문구를 confirm the test baseline with the calling session으로 수정했다.
  • tools, permissionMode 등 frontmatter는 변경하지 않았다(옵션 B). 따라서 후속 permissionMode 정렬 작업과 충돌하지 않는다.

검증

  • scripts/check_agents.shcheck_agents: OK (8 agent pairs in sync) (sandbox OFF 기준 — CI 게이트와 일치)
  • grep "Run existing test suite\|Re-run tests after each change\|Run full test suite" → 2개 파일 모두 0건
  • 두 레이어의 본문 정합성 유지

비고

옵션 (B) 단일 반환·호출자 위임 설계를 택했다. 별도의 테스트 실행 전담 노드(test-runner) 신설은 epic #726의 P1 항목으로 분리되어 있다.

Closes #728
Part of #726

The Safety Verification Protocol hard-required running the test suite, re-running after each change, comparing pass counts, and reverting on failure, but the agent's tool whitelist (Read, Edit, Glob, Grep) has no Bash, so none of it could execute. Reword the protocol so test execution, commits, and rollback are the calling session's responsibility, resolving the self-contradiction without changing tools or permissionMode.
@kcenon kcenon merged commit dae613d into develop Jun 13, 2026
1 check passed
@kcenon kcenon deleted the fix/issue-728-refactor-assistant-test-delegation branch June 13, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant