refactor: rename MCP tool from qwen3_task to task and update delegation flow

- Rename MCP tool `qwen3_task` → `task` in server.py and all references
- Enforce direct use of `mcp__qwen3__task` (no sub-agents) in docs
- Add bootstrap logic to install.sh/update_crazyclaude.sh for repo self-installation
- Introduce tools-local/ directory for local tool overrides
- Add test suite (test_qwen3.sh, test_qwen3.md) to validate Qwen3 file generation
- Update .gitignore: ignore test_qwen3_output/, add missing .claude/
- Add system prompt to server.py for fs_write enforcement
- Update agent docs (qwen3-worker, code-reviewer, delegation-rules, task-planner) to reflect new tool name and workflow
- Add system instruction: always use fs_write/fs_patch, never display content in response
This commit is contained in:
2026-03-27 17:31:40 +01:00
parent ee625dfe3d
commit 5a0874c3c0
13 changed files with 361 additions and 44 deletions

View File

@@ -9,6 +9,20 @@ set -euo pipefail
CLAUDE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LLM_DIR="$CLAUDE_DIR/llm-functions"
# Bootstrap : si on lance depuis le repo CrazyClaude lui-même (pas depuis .claude/)
# on recopie les fichiers sources vers .claude/ puis on rebuild les outils
if [[ "$(basename "$CLAUDE_DIR")" != ".claude" ]]; then
TARGET="${1:-$(pwd)/.claude}"
echo "==> Bootstrap : synchronisation de $CLAUDE_DIR$TARGET"
rsync -a --exclude='.git' --exclude='llm-functions' --exclude='venv' \
"$CLAUDE_DIR/" "$TARGET/"
echo "==> Rebuild des outils"
exec bash "$TARGET/update_crazyclaude.sh" "${@:2}"
fi
# On est maintenant dans .claude/, on peut continuer normalement
dry_run=0
[[ "${1:-}" == "--dry-run" ]] && dry_run=1
@@ -45,4 +59,22 @@ else
fi
echo ""
echo "OK — outils reconstruits dans $LLM_DIR/bin/"
echo "=== Application des overrides locaux ==="
LOCAL_TOOLS_DIR="$CLAUDE_DIR/tools-local"
if [[ -d "$LOCAL_TOOLS_DIR" ]]; then
count=0
for src in "$LOCAL_TOOLS_DIR"/*; do
[[ -f "$src" ]] || continue
name="$(basename "$src")"
dest="$CLAUDE_DIR/llm-functions/bin/$name"
cp "$src" "$dest"
chmod +x "$dest"
count=$((count + 1))
done
echo " $count override(s) appliqué(s)"
else
echo " (aucun répertoire tools-local/)"
fi
echo ""
echo "OK — outils reconstruits dans $LLM_DIR/bin/"