Setup
28.9kConfigura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
- Costo de contexto al activarse
- 7.4k tok
- Tamaño del paquete
- 1 archivo
- Última actualización
- hace 4 días
Redacta un eval para una skill existente a partir de su historial real de uso (no de su spec), etiqueta casos como SPEC-DERIVED o HISTORY-IMPLIED y lo deja pendiente de aprobación humana.
Reemplaza a: Benchmarks derivados solo de la spec (--bootstrap-from-skill)
en todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
172 tok en reposo
13 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill skill-autobench --agent claude-codeSe instala solo en este repositorio.
Di cualquiera de estas frases y el agente debería cargar este skill.
Convention: see conventions/brain-first.md — mining starts in the brain. Search the conversation archive before touching raw transcript files, and never declare "no history" without having queried the brain first.
Convention: see conventions/model-routing.md — mining and synthesis run on the cheap tier by default. The full multi-model judging pass is an explicit opt-in (see Contract).
The self-improving loop has three legs: an eval, a variant generator
(SkillOpt), and a replay + judge harness (gbrain eval cross-modal). The
generator and the judge ship with gbrain. The persistently missing leg is the
eval author — someone has to WRITE the eval, and a spec-derived benchmark
only tests what the skill promised, not what users actually asked for or what
actually went wrong. This skill writes the eval from reality instead of
imagination.
Substrates, in priority order:
Brain conversation archive — pages under conversations/, populated by
the conversation-archive skill (hard dependency for this substrate: if it
hasn't ingested your history yet, run it first). Search for the target
skill's name, trigger phrases, and output shapes:
gbrain search "<skill-name>"
gbrain query "when did I use <skill-name> and what did I ask for"
Per-harness session transcripts, as available — use what the harness
exposes; do not assume a layout. gbrain transcripts recent --full reads
the configured local transcript corpus (local-only by design). Claude Code
keeps per-project session JSONL under ~/.claude/projects/; other
harnesses have their own session stores. Absent stores are simply skipped.
From each hit, extract an invocation window: the user ask before the
invocation, the invocation turn itself, and the 2 turns after — because that
is where corrections live. A user correction after an invocation is the
gold signal: it is a real, observed failure mode, and it becomes a
hard_fail plus a replayable case.
FAIL-CLOSED: if no substrate yields a single real invocation of the
target skill, emit an honest no-history report (substrates checked, queries
run, windows scanned, zero matches) and stop. Do NOT invent "typical"
invocations. For a skill with no history, the right tool is
gbrain skillopt <name> --bootstrap-from-skill (spec-derived, and honest
about it) — see Dedup.
From the mined windows plus the current SKILL.md, produce:
{input, expected_behavior, failure_mode_to_catch} — realistic input, a
checkable expected behavior, and the named failure mode the case exists to
catch.HONESTY LABELS are mandatory. Every dimension and every case is labeled:
HISTORY-IMPLIED — a real mined window backs it; cite which one.SPEC-DERIVED — inferred from SKILL.md only; no usage evidence.Never conflate the two. If history is thin or off-target, say so prominently at the top of the staged file ("GROUNDING WARNING: only N windows found, none exercised the core path") instead of padding with fabricated evidence.
Privacy scrub before staging: staged evals live in the skill repo and are
distributable. Mined windows contain real names, companies, and deals —
rewrite every case onto placeholder slugs (alice-example, acme-example)
before writing the file. A history-grounded case keeps its shape and failure
mode, never its real entities.
Write skills/<name>/eval/autobench-<date>.md with frontmatter
status: PENDING-HUMAN-APPROVAL.
This skill NEVER rewrites SKILL.md — not the eval_contract, not the body, not the triggers. Merging the staged eval is the human's decision. (This is a workflow contract the agent must honor, not a mechanically-enforced gate.)
Human reviews, edits, and approves the staged eval; the approved eval_contract is merged into the skill's frontmatter explicitly.
Convert approved cases into skills/<name>/skillopt-benchmark.jsonl lines
and run gbrain skillopt <name> — this is the SkillOpt surface extension:
a history-grounded benchmark replacing the spec-derived bootstrap.
Judge outputs through the native gate:
gbrain eval cross-modal --task "<what the output was meant to achieve>" --output <path>
Re-run autobench after more usage accumulates; diff against the prior staged baseline.
Multi-model judging is only as good as the panel being real. The silent failure class: a model-id normalizer strips provider prefixes and every "different model" call lands on one host, so a "3-frontier consensus" is one model's opinion in a trench coat. Before trusting any multi-model verdict, assert over the result object:
gbrain eval cross-modal already exits 2 (INCONCLUSIVE) when fewer than 2/3
models return parseable scores; the byte-identical duplicate check and the
distinct-endpoint check are the independent backstops this skill layers on
top. Run them over the receipt JSON (written to the receipt dir) before
treating a PASS/FAIL as authoritative. The integrity check is pure assertion
logic over an existing result — it never calls a model itself: no network,
no cost.
Classify each mined correction/failure case by its cheapest durable fix:
| Class | Signal in history | Durable fix |
|---|---|---|
| DETERMINISTIC-CODIFIABLE | An LLM fallback repeatedly handles the same input shape (regex, parsing, slugs, dates) | Convert to deterministic code + a permanent test case. The LLM is not the solution; it is the training-data generator for the code that replaces it. |
| PROMPT-FIXABLE | The correction targets tone, format, or an omission the SKILL.md could specify | An eval case + a gbrain skillopt run |
| SPEC-GAP | Users consistently ask for something the spec never promised | A spec-vs-usage gap observation for the human |
| ROUTING-MISS | The skill fired on the wrong ask, or failed to fire | A routing-eval.jsonl case, not a benchmark case |
Direction of travel: every fixed failure becomes a permanent test, the deterministic share rises, and the LLM-fallback share falls. Log and improve; never silently drop a mined failure.
skills/.conversations/ archive pages (brain-first), then
per-harness session transcripts as available (gbrain transcripts recent
is local-only by design). No usable substrate → honest no-history report,
never fabricated evidence.skills/<name>/eval/autobench-<date>.md,
status: PENDING-HUMAN-APPROVAL — or the no-history report. Never an edit
to SKILL.md, triggers, or any routing surface.gbrain eval cross-modal — no
bespoke judging harness.---
skill: <name>
status: PENDING-HUMAN-APPROVAL
generated: <date>
substrate: { conversation_pages: N, transcript_files: M, windows: K, corrections: C }
---
# Autobench: <name> — <date>
## Grounding
<one paragraph: how much real history backs this eval; GROUNDING WARNING if thin>
## Proposed eval_contract
goal / dimensions (each labeled HISTORY-IMPLIED|SPEC-DERIVED) / hard_fails
## Cases (4-8)
### case-01 [HISTORY-IMPLIED — window ref]
input: ...
expected_behavior: ...
failure_mode_to_catch: ...
## Spec-vs-usage gaps
- spec says X; users ask Y (windows: ...)
## Fail-improve classification
- case-03 → DETERMINISTIC-CODIFIABLE (same date-format fallback, 4 windows)
gbrain eval cross-modal is the
native gate.--bootstrap-from-skill derives tasks
from the spec. THIS skill authors the benchmark from lived usage and feeds
it into skills/<name>/skillopt-benchmark.jsonl — it extends SkillOpt's
surface, never duplicates it. Read the skill-optimizer SKILL.md (on the
host, where its engine lives) before the handoff. No history at all → use
--bootstrap-from-skill, not this.gbrain eval suites) — evals the ENGINE (retrieval,
memory conformance, calibration). This evals SKILLS over their history.skills/skillify/SKILL.md / skills/skill-creator/SKILL.md — create
skills from descriptions; they don't mine lived usage.skills/cross-modal-review/SKILL.md / gbrain eval cross-modal — RUN
judging panels; they don't author evals. The panel-integrity assertions
here verify their panels were real.skills/skillpack-check/SKILL.md — audits skill structure/conformance,
not behavior quality.routing-eval.jsonl — tests dispatch (does the right skill fire);
autobench tests behavior after dispatch. ROUTING-MISS findings route there.Reproducido de garrytan/gbrain bajo licencia MIT. Leer esta página en markdown.
2 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.
Requiere el directorio conversations/ ya poblado (por la skill conversation-archive) para minar historial real.
Este repo incluye 75 skills. Si instalas uno, normalmente ya tienes los demás.
Configura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
Chequeos de salud del brain: aplicación de back-links, auditoría de citas, validación de filing, detección de info obsoleta, páginas huérfanas y benchmarks.
Migra un brain de gbrain-base a la taxonomía de 14 tipos canónicos de gbrain-base-v2 usando gbrain onboard --check y el handler Minion unify-types.
Cuándo y qué recuperar: abre la página del brain de una entidad relevante antes de responder desde memoria.
Operaciones del brain: búsqueda primero, ciclo leer-enriquecer-escribir, atribución de fuentes, enriquecimiento ambiental y back-linking. Leer antes de cualquier interacción con el brain.
Importa exports de ChatGPT, Claude y Perplexity y transcripciones de sesiones como páginas fechadas en conversations/, valida y extrae hechos, y mantiene el archivo sin huecos con detección y backfill.
Control de calidad mediante un segundo modelo: hace que otro modelo revise el trabajo antes de darlo por bueno, con enrutamiento de negativas y opción de derivar a Codex para revisión de diffs.
Verificación sistemática, afirmación por afirmación, de cualquier contenido antes de publicarlo, basada en estándares de fact-checking profesional (The New Yorker, ProPublica, IFCN).
Framework de validación de skills más inteligencia diaria de salud y regresiones de la suite de tests: valida conformidad y clasifica fallos por tandas.