Community코딩 & 개발github.com

grahama1970/assistant-lab

/assistant를 위한 자기 개선 워크벤치. 모델을 진단, 훈련, 평가, 프로모션하는 모든 도구를 제공합니다. /assistant가 자체 추론 스택을 진화시키는 '따뜻한 연못'입니다.

assistant-lab란 무엇인가요?

assistant-lab은 /assistant 에이전트의 지속적인 자기 개선을 위한 전용 워크벤치입니다. /monitor-skills가 모든 스킬의 건강 상태를 관찰하는 반면, assistant-lab은 오직 /assistant의 문제 진단, 모델 훈련, 평가, 그리고 프로모션에 집중합니다. 이 스킬은 QLoRA/SFT GPT, DistilBERT/sklearn 분류기, sklearn/XGB 회귀기 등 다양한 모델 유형을 지원하며, 로컬 RTX A5000 GPU (최대 1.7B 파라미터) 또는 RunPod Flash 서버리스 GPU (3-70B)를 사용하여 모델을 훈련시킵니다. 핵심 엔진은 ModelFactory로, 그림자 동의율 임계값(90% 이상 프로모션, 80-90% 프롬프트 재설계, 70-80% 재훈련, 70% 미만 강제 재훈련)을 기반으로 자동 개선 루프를 실행하며, 모든 작업은 CLI 및 Python API를 통해 수행됩니다.

지원 대상~Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/assistant-lab

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

assistant-lab은(는) 무엇을 하나요?

/assistant를 위한 자기 개선 워크벤치입니다. 이곳은 **랩(lab)**으로, /assistant가 문제를 진단하고, 새 모델을 훈련하며, 평가하고, 통과한 모델을 라이브 레지스트리에 프로모션합니다.

/monitor-skills와 혼동하지 마십시오. /monitor-skills는 모든 스킬의 건강 상태, 드리프트, 동기화 문제를 관찰하는 가시성 데몬입니다. /assistant-lab은 구체적으로 자기 개선 도구 상자입니다.

자기 개선 루프

/monitor-skills가 문제 감지    ← 관찰 가능성
    ↓
/assistant-lab이 근본 원인 진단 ← 이 스킬
    ↓
그림자 모드: 교사(scillm)가 shadow.jsonl에 레이블 기록
    ↓
ModelFactory.auto_improve(task)
    ├─ 그림자 동의율 확인
    ├─ >= 90%: 프로모션 → model_registry.json 업데이트
    ├─ 80-90%: 정체 → /prompt-lab 재설계
    ├─ 70-80%: 재훈련 → /create-gpt 또는 /create-classifier
    └─ < 70%: 강제 재훈련 + 아키텍처 변경
    ↓
/gpt-lab 벤치마크 또는 /classifier-lab 평가
    ↓ 통과? → 라이브 레지스트리로 프로모션
    ↓
/assistant가 추론 시 개선된 모델 사용

사용 가능한 도구

도구목적사용 시기
/create-gptQLoRA/SFT/GRPO GPT 훈련 (Tier 1.5)동의율 < 80% 또는 모델 없음
/create-classifierDistilBERT/sklearn 분류기 훈련 (Tier 0.5)텍스트 분류 작업
/create-regressorsklearn/XGB 회귀기 훈련 (Tier 0.75)연속 예측 작업
RunPod FlashPython SDK를 통한 서버리스 GPU 훈련 (7B–70B)모델이 로컬 A5000에 비해 너무 큼 — 훈련용 /ops-runpod 대체
/gpt-lab교사 기준선 대비 GPT 벤치마크훈련 후, 프로모션 전
/classifier-lab분류기 정확도/F1 평가분류기 훈련 후
/prompt-lab정체 감지 시 프롬프트 재설계동의율이 80-90%에서 멈춤
/scillmTier 2 교사 — 레이블 생성항상 (교사는 절대 기준)

사용법

CLI

# 작업에 필요한 것 진단
./run.sh diagnose --task stress-test-grader

# 전체 자율 개선 루프
./run.sh auto-improve --task stress-test-grader

# 특정 모델 유형 훈련
./run.sh train --task stress-test-grader --type gpt
./run.sh train --task sparta-ambiguity --type classifier

# 모델 평가
./run.sh evaluate --task stress-test-grader --type gpt

# 통과한 모델 프로모션 (그림자 모드 비활성화)
./run.sh promote --task stress-test-grader --type gpt

# shadow.jsonl에서 교사 레이블 수집
./run.sh harvest --task stress-test-grader --since 24h

# 모든 작업에 대한 그림자 동의율 통계 표시
./run.sh status

# 전체 자체 테스트 실행 (테스트 데이터에서 훈련 → 평가 → 프로모션 주기)
./run.sh self-test

Python API

from assistant_lab import AssistantLab

lab = AssistantLab()

# 진단: 이 작업에 무엇이 필요한가?
diagnosis = lab.diagnose("stress-test-grader")
# → {"has_gpt": False, "has_classifier": False, "shadow_agreement": 0.0, ...}

# 자동 개선: 결정 + 훈련 + 평가 + 프로모션
result = lab.auto_improve("stress-test-grader")
# → {"actions": ["trained gpt", "evaluated (passing=True)", "promoted"]}

# 수동 단계
lab.train("stress-test-grader", model_type="gpt")
lab.evaluate("stress-test-grader", model_type="gpt")
lab.promote("stress-test-grader", model_type="gpt")

모델 팩토리

핵심 엔진은 ModelFactory입니다 (/common/model_factory.py에서 제공). /assistant-lab은 이를 CLI + 진단 + 보고로 래핑합니다.

그림자 동의율 임계값

동의율조치근거
>= 90%프로모션학생이 교사와 안정적으로 일치
80-90%/prompt-lab 재설계정체 — 프롬프트가 한계일 수 있음
70-80%더 많은 레이블로 재훈련더 많은 데이터가 도움이 될 가능성 높음
< 70%강제 재훈련아키텍처 또는 기본 모델 변경
< 50개 샘플대기결정하기에 데이터 부족

최소 훈련 데이터 (양보 불가)

불충분한 데이터로 /create-gpt train 또는 /create-classifier train을 호출하지 마십시오.

모델 유형최소 샘플규칙
GPT (QLoRA SFT)총 1,000개 이상< 1,000 → Tier 2 교사 유지
분류기 (sklearn/SetFit)클래스당 200개n_samples / n_classes >= 200
회귀기총 100개 이상표준 sklearn 지침

증거: sparta_stress_grading은 246개 샘플로 훈련되어 33.7% 동의율을 기록했습니다. 이는 모델이 너무 일찍 훈련되어 4개월치 그림자 레이블이 낭비된 것입니다. 먼저 수집하고, 준비되면 훈련하십시오.

훈련 데이터 흐름

Tier 2 교사 (persona를 통한 scillm)
    ↓ shadow.jsonl에 레이블 저장
    ↓
/assistant-lab harvest --task X
    ↓ 입력+출력 쌍 추출
    ↓
/create-gpt train --task X --data labels.jsonl
    ↓ Qwen2.5-1.5B에 QLoRA (기본값)
    ↓
/gpt-lab benchmark --task X
    ↓ 학생 vs 교사 비교
    ↓
/assistant-lab promote --task X --type gpt
    ↓ model_registry.json 업데이트, shadow_mode=false

원격 훈련 (RunPod Flash)

로컬 RTX A5000(24GB VRAM, LoRA로 최대 ~1.7B)에 비해 너무 큰 모델의 경우, assistant-lab은 RunPod Flash를 사용합니다 — Docker, SSH, rsync 오버헤드가 없는 서버리스 Python SDK입니다. Flash는 모든 훈련 경로에서 /ops-runpod를 대체합니다. /ops-runpod는 지속적인 추론 서버에만 유지됩니다.

Flash 사용 시기

모델 크기로컬 A5000Flash 필요GPU
0.5–1.7BLoRA 적합아니요./run.sh train (로컬)
3–7B적합하지 않음예B200 (권장) 또는 H200
8–13B불가능예B200 (권장) 또는 H200

Flash GPU 유형

GPUVRAM참고
B200192 GB HBM3e가장 빠름; MoE/긴 컨텍스트에서 H200 대비 3–5배
H200192 GB HBM3가용성 좋음; 견고한 기준

청구: 초당 지불, 작업당 최대 7일 실행.

Flash 비용 추정 (대략)

모델 크기GPU예상 훈련 시간예상 비용
7B QLoRA SFTB200~1–2시간~$5–15
7B QLoRA SFTH200~2–3시간~$8–20
13B QLoRA SFTB200~2–4시간~$10–25
13B QLoRA SFTH200~3–5시간~$12–30

명령어

# 1단계: 항상 먼저 비용 추정
./run.sh estimate --task taxonomy-assessor --target flash --gpu B200 --size 7B

# 2단계: Flash B200에서 훈련 (안전을 위해 --confirm 필요)
./run.sh train --task taxonomy-assessor --target flash --gpu B200 --size 7B --confirm

# Flash H200에서 훈련
./run.sh train --task taxonomy-assessor --target flash --gpu H200 --size 13B --confirm

# 사용자 정의 기본 모델 사용
./run.sh train --task taxonomy-assessor --target flash --gpu B200 --size 8B \
  --base-model meta-llama/Llama-3.1-8B-Instruct --confirm

# 다른 양자화 사용
./run.sh train --task qra-validator --target flash --gpu B200 --size 7B \
  --quantize Q5_K_M --confirm

Flash 훈련 파이프라인

estimate --target flash --gpu B200 --size 7B
    ↓
train --target flash --gpu B200 --confirm
    ├─ 1. 비용 추정 + 예산 게이트
    ├─ 2. Flash 서버리스 작업 제출 (Python SDK — Docker/SSH 없음)
    ├─ 3. 데이터셋을 Flash 워커로 스트리밍
    ├─ 4. B200/H200에서 QLoRA / SFT 훈련 실행 (192GB VRAM)
    ├─ 5. 모델 가중치를 /mnt/storage12tb/models/로 가져오기
    ├─ 6. create-gpt export --quantize Q4_K_M (GGUF)
    └─ 7. 통과 시 평가 + 자동 프로모션

안전 게이트

  • 예산 한도: --max-cost (기본값 $15.00) — 추정치가 한도를 초과하면 훈련 차단
  • 확인: --confirm을 반드시 전달해야 함 — 없으면 비용 표시 후 종료
  • 자동 종료: 종료 시 Flash 작업 취소 (오류 발생 시에도 trap을 통해)
  • 메트릭 로깅: 모든 Flash 훈련 실행이 lab_metrics.jsonl에 기록됨

자기 개선 루프와의 통합

원격 훈련된 모델은 로컬 모델과 동일한 캐스케이드에 통합됩니다:

Tier 0:   휴리스틱 (무료, 즉시)
Tier 0.5: 분류기 (로컬, 무료)
Tier 1.5: 로컬 GPT ≤1.7B (create-gpt, 훈련 후 무료)
Tier 1.5: 원격 GPT 3-13B (train-remote, 훈련 후 무료)  ← 새 기능
Tier 2:   scillm/DeepSeek V3 (Chutes, $0.12/1K 호출)

Tier 1.5의 7-13B 모델은 Tier 2(Chutes) 에스컬레이션을 크게 줄여 훈련 비용을 초과 요금 절감으로 상쇄할 수 있습니다.

다른 스킬과의 관계

/monitor-skills ──→ "스킬 X가 비정상입니다"
                         ↓
/assistant-lab ──→ 진단 → 훈련 → 평가 → 프로모션
                         ↓
/assistant ──────→ 추론 시 프로모션된 모델 사용
  • /monitor-skills: 모든 스킬을 관찰합니다. 문제를 감지합니다. 건강 상태를 보고합니다.
  • /assistant-lab: /assistant의 모델을 수정합니다. 훈련, 평가, 프로모션합니다.
  • /assistant: 추론을 실행합니다. 랩에서 생성된 모델을 사용합니다.

계약

  • 입력: 작업 이름 + 선택적 모델 유형
  • 출력: 진단, 훈련 결과, 평가 결과, 프로모션 상태
  • 종속성: model_factory.py (/common에서), create-* 및 *-lab 스킬
  • 메트릭: ~/.pi/assistant/lab_metrics.jsonl에 추가

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analytics

Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

관련 스킬