optimize refactor: round 1 — D3 fallback + D1 triggers

Add explicit fallback when refactorer.md unreachable (D3 edge case).
Add triggers to frontmatter for routing (D1).
Size: 379B → 493B (+30%, under 150% cap).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
bastien 2026-05-12 17:55:39 +02:00
parent 58e99b2f36
commit 9a992a0186

View File

@ -1,14 +1,13 @@
--- ---
name: refactor name: refactor
description: Improve code quality without changing behavior — strict norm enforcement description: Improve code quality without changing behavior — strict norm enforcement. Triggers: "refactor", "clean up code", "normaliser".
argument-hint: <file, function, or module to refactor> argument-hint: <file, function, or module to refactor>
disable-model-invocation: true disable-model-invocation: true
allowed-tools: Read, Write, Edit, Grep, Glob, Bash allowed-tools: Read, Write, Edit, Grep, Glob, Bash
--- ---
Load and follow strictly: Load and follow strictly: `$HOME/.claude/agents/refactorer.md`.
- $HOME/.claude/agents/refactorer.md
Execute the REFACTORER agent on the following target: If unreachable, emit `Refactorer agent missing.` and STOP. Never improvise — silent behavior change is unsafe.
$ARGUMENTS $ARGUMENTS