refactor(add-vercel): drop Frontend Engineer delegation, add pre-deploy checks

The specialist-subagent pattern forced every /add-vercel user through the
OneCLI credential-assignment plumbing (dynamically created Frontend Engineer
agents had no Vercel secret on first deploy). For a personal assistant the
isolation wasn't worth the complexity — the host agent can deploy to Vercel
directly using the same CLI.

- Remove the Phase 5 CLAUDE.md patch that forbade writing frontend code
- Drop the bundled frontend-engineer container skill
- Strip the HARD RULE + "Building Websites" delegation from vercel-cli
- Add a concise "Pre-Send Checks" section: local build, deployment READY,
  live URL returns 2xx, optional agent-browser visual check

Net: -194 lines. /add-vercel now installs the CLI, registers the secret,
assigns it to existing agents, and teaches the agent to verify before
sharing the URL. No subagent plumbing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gabi Simons
2026-04-16 19:59:30 +00:00
parent cc784ff94b
commit 1aeb8fb4ca
3 changed files with 13 additions and 207 deletions

View File

@@ -115,25 +115,7 @@ If `MISSING`, add `vercel` to the global npm install line in `container/Dockerfi
If `PRESENT`, skip — no rebuild needed.
## Phase 5: Patch Agent CLAUDE.md Files
Append the frontend delegation rule to every existing agent group's CLAUDE.md. This ensures the agent treats delegation as a hard rule, not a suggestion.
```bash
for claudemd in groups/*/CLAUDE.md; do
if ! grep -q "Frontend Delegation" "$claudemd" 2>/dev/null; then
cat >> "$claudemd" << 'PATCH'
## Frontend Delegation (Vercel)
You MUST NOT write HTML, CSS, or JavaScript yourself. When asked to build a website or web app, delegate to a Frontend Engineer subagent using create_agent then send_message. Both calls are required before telling the user anything is happening.
PATCH
echo "Patched: $claudemd"
fi
done
```
## Phase 6: Sync Skills to Running Agent Groups
## Phase 5: Sync Skills to Running Agent Groups
Container skills are copied once at group creation and not auto-synced. After installing or updating a container skill, sync it to all existing agent groups:
@@ -146,9 +128,9 @@ for session_dir in data/v2-sessions/ag-*; do
done
```
## Phase 7: Restart Running Containers
## Phase 6: Restart Running Containers
Stop all running agent containers so they pick up the new skills and CLAUDE.md changes:
Stop all running agent containers so they pick up the new skills on next wake:
```bash
docker ps --format "{{.ID}} {{.Names}}" | grep nanoclaw-v2 | awk '{print $1}' | xargs -r docker stop