feat(claude): argo-deploy-helper skill (foxhunt)

Wraps scripts/argo-train.sh with deploy discipline pre-flight: push-before-
deploy gate, mandatory --mbp10-data-dir/--trades-data-dir, --per-enabled,
default L40S unless overridden, H100 max-utilization when chosen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-10 20:58:41 +02:00
parent 8836302baf
commit a90290bfc2

View File

@@ -0,0 +1,69 @@
---
name: argo-deploy-helper
description: Constructs and validates a vetted invocation of scripts/argo-train.sh or scripts/argo-compile-deploy.sh. Enforces push-before-deploy, default L40S pool (ci-training-l40s) unless overridden, mandatory --mbp10-data-dir + --trades-data-dir, --per-enabled, H100 max-utilization flags when H100 chosen. Use when deploying training to argo.
---
# Foxhunt Argo Deploy Helper
Wraps the existing `scripts/argo-train.sh` and `scripts/argo-compile-deploy.sh` with foxhunt deploy discipline pre-flight.
## When to invoke
- "Deploy training X to argo".
- "Run smoke for SP-N on the cluster".
## Pre-flight checklist (BLOCK on any fail)
Before constructing the invocation, run each check. If any fails, do not proceed — report the failure and stop.
1. **Push before deploy** (`feedback_push_before_deploy.md`).
```bash
LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse @{u} 2>/dev/null || echo "")
if [ "$LOCAL" != "$REMOTE" ]; then
echo "BLOCKED: HEAD ($LOCAL) not pushed to upstream ($REMOTE). Run 'git push' first."
exit 1
fi
```
2. **MBP10 + trades data dirs mandatory for SP-chain training** (`feedback_mbp10_mandatory.md`).
- Confirm `--mbp10-data-dir` and `--trades-data-dir` are present in the proposed flag list.
- If absent, BLOCK and ask the user to provide them.
3. **PER enabled** (`feedback_always_per.md`).
- Confirm `--per-enabled` is present (or that the script defaults it to true). PER is always on.
## Default GPU pool (`feedback_default_to_l40s_pool.md`)
Default to `--gpu-pool ci-training-l40s`. Add only if the user did not specify a pool. If the user specifies H100, also enforce H100 max-utilization flags (`feedback_h100_gpu.md`):
- Hard error on under-utilization (script-side flags or env vars per the existing argo-train.sh contract).
- Pass the canonical H100 batch-size + grad-accumulation flags.
## What this skill produces
A complete invocation, ready to run, in the form:
```bash
./scripts/argo-train.sh \
--branch <branch> \
--commit <sha> \
--gpu-pool <pool> \
--mbp10-data-dir <path> \
--trades-data-dir <path> \
--per-enabled \
<other flags>
```
Plus a one-line summary of the pre-flight checks that passed.
## Anti-pattern this skill avoids
- Deploying with HEAD ahead of upstream (un-pushed commits aren't reproducible from the remote).
- H100 deploys without max-utilization flags (waste of expensive node).
- Defaulting to H100 when L40S would do (`feedback_default_to_l40s_pool.md` overrides the older H100-by-default rule).
- Layering Bash run_in_background Monitor on top of argo logs (`feedback_no_redundant_monitor.md`). Stream logs via `argo logs -f`, not via custom shell redirection.
## After deploy
Suggest invoking `foxhunt-smoke-pilot` to monitor the smoke and kill on first useful anomaly signal.