genai-iterate
Skill17 starsChanged 2 days agoMITView on GitHub
Iterate on a GenAI notebook against the self-hosted stack via the genai-stack CLI (config dirs, auth, subdomains, quantization, GPU/VRAM). Arguments: <notebook|service> [--service comfyui|forge|vllm] [--quant int4|fp8] [--validate] [--bg]
- Reads credentials
In this repository19 other files it gives its agents.
- .vibe/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adjoint-secretarySkill
- analyze-slidesSkill
- build-notebookSkill
- check-cell-orderSkill
- cleanup-notebooksSkill
- coordinate-adjointSkill
- coordinateSkill
- enrich-notebooksSkill
- execute-notebookSkill
- mcp-jupyterSkill
- notebook-helpersSkill
- notebook-patternsSkill
- qc-iterative-improveSkill
- review-student-prsSkill
- train-modelSkill
- validate-genaiSkill
- verify-notebooksSkill
The file
Files
GenAI Iterate
Iterer sur un notebook GenAI (MyIA.AI.Notebooks/GenAI/) contre la stack auto-hebergee, en pilotant le CLI scripts/genai-stack/genai.py. Couvre l'Epic #1385 (GenAI series + hosting). Pour les cycles batch, deleguer a l'agent genai-iterator en async.
Arguments
<notebook|service>: chemin notebook ou nom de service (comfyui-qwen,forge-turbo,vllm-zimage).--service comfyui|forge|vllm: service cible si ambigu.--quant int4|fp8: forcer une quantization (Nunchaku INT4 ~4GB / FP8 ~29GB).--validate: lancer la validation stack (genai.py validate+ skillvalidate-genai).--bg: iteration en background.
Process
Phase 0 — Config & secrets (HARD)
.envreel =MyIA.AI.Notebooks/GenAI/.env(gitignored) ; template.env.example(carte sous-domaines).- Secrets uniquement dans
.env. Jamais de literal inline, jamaisos.getenv("KEY","<fallback>"), jamais imprimer une valeur de token (cf .claude/rules/secrets-hygiene.md).
Phase 1 — Pre-flight (CLI genai-stack)
python genai.py docker status # service up ? (docker exige sa sous-commande : status/start/stop — commands/docker.py:277)
python genai.py auth audit # token present + correct (Bearer comfyui / Basic forge / none vllm) ? (auth exige une action : init/sync/audit/get-token/reconstruct-env)
python genai.py gpu # VRAM libre sur le GPU cible ?
python genai.py quant summary # bonne quant chargee ?- comfyui-qwen : GPU0, Bearer (
COMFYUI_API_TOKENou aliasCOMFYUI_AUTH_TOKEN). forge-turbo : GPU1, Basic (FORGE_USER/FORGE_PASSWORD). vllm-zimage : GPU1, no auth. VRAM idle =docs/genai/genai-services.md.
Phase 2 — Quantization (arbitrage VRAM)
- GPU 8GB =>
genai.py quant apply qwen(Nunchaku INT4 ~4GB) obligatoire. - GPU haut de gamme => FP8 possible (
genai.py quant apply zimage). - Simuler d'abord :
genai.py quant apply <service> --dry-run.
Phase 3 — Iteration notebook
- Moderniser libs/APIs obsoletes (deleguer
notebook-modernizer). - Executer via MCP Jupyter (deleguer
notebook-executor). - Valider structure/exec/pedagogie (deleguer
notebook-validator).
Phase 4 — Commit (regle C.2)
- Notebook AVEC outputs reels. Pas de markdown en remplacement d'execution.
- Pas de leak
LOCAL_MODEdans les outputs committes (re-executer en remote propre). - Pas d'URL placeholder
yourdomain.com— vrai sous-domaine.
FLAGS connus (inventaire 2026-05-23)
02-5-Multi-Model-TTS-Gateway401.- Naming
COMFYUI_API_TOKEN=COMFYUI_AUTH_TOKEN(alias canonique, deux noms pour le même secret — géré parrender_envs.py).COMFYUI_BEARER_TOKENn'est plus géré.
Anti-patterns interdits
- Literal de secret inline /
os.getenvavec fallback secret / imprimer un token. - Empiler deux gros modeles au-dela de la VRAM d'un GPU (OOM).
- Committer avec
LOCAL_MODEactif ou sans outputs reels. - Script ad-hoc au lieu du CLI
genai.py.
Voir aussi
- .claude/agents/genai-iterator.md — orchestrateur async
- .claude/skills/validate-genai/SKILL.md — validation stack
- docs/genai/genai-services.md — architectures, scripts, mappings
- .claude/rules/genai-config.md — Docker config, GPU, .env
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

