Logotipo de Kortix Harness Refinement

Kortix Harness Refinement

OrganizaciónPopular
kortix-ai
kortix-harness-refinement

The continual-harness refinement protocol — how an agent inspects its recent trajectory for failure signatures and improves its own harness (agent prompts, sub-agents, skills, memory) in place, mid-session, landing changes on the session branch immediately and promoting them to `main` only through a change request. Load this skill when a refinement prompt arrives mid-session, when a workspace's scheduled reflection agent runs, or whenever you decide your own scaffolding needs repair. The sub-agent fan-out in this skill is for a top-level reflection run only; if you loaded this as a subagent, do the four passes yourself and skip the fan-out.

Descripción general

Editorkortix-ai
RepositorioCompanyOS
Nombre de la habilidadkortix-harness-refinement
Estrellas
20.8K
Forks
3.5K
Archivos incluidos
Solo instrucciones
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por kortix-ai en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Kortix Harness Refinement en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/kortix-ai/CompanyOS/tree/dev/packages/starter/templates/managed/skills/kortix-harness-refinement
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kortix-ai/CompanyOS.git /tmp/CompanyOS
mkdir -p .claude/skills
cp -r /tmp/CompanyOS/packages/starter/templates/managed/skills/kortix-harness-refinement .claude/skills/kortix-harness-refinement
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Kortix Harness Refinement en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Kortix Harness Refinement automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Kortix Harness Refinement no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

ComponentLocationWhat it is
Promptsagents/<name>.md, named by agents.<name>.prompt_file in kortix.yaml (or inline agents.<name>.prompt)Each agent's instructions and strategy
Sub-agentsagents.<name> blocks with mode: subagent; an agent starts only the ones in its agents.<name>.subagentsSpecialist agents the orchestrator invokes
Skillsskills/<name>/SKILL.md, registered under skills:; an agent loads only the ones in its agents.<name>.skillsReusable routines: text heuristics and guides
Toolstools/<name>.ts, registered under tools:; pi packages under extensions:, enabled by agents.<name>.extensionsExecutable code: wrappers, scripts, automations
Memorymemory/Persistent facts, strategies, observations

An agent's model, permission and grants live in its agents.<name> block in kortix.yaml.

Refinement means: read your recent trajectory, find where the harness failed you, and fix the harness — not just the immediate task. A memory edit is readable on your next turn: memory is plain files. An edit to an agent prompt, skill, or tool reaches sessions once its change request merges; a running session loads it with kortix sessions reload <session id>. You do not restart, and the value compounds over the life of the workspace.

This protocol has two operating modes:

  1. In-session refinement (self-invoked) — YOU run it, inside your own working session, the moment a failure signature costs you twice. Also run a checkpoint on long sessions: after every ~25 turns of work, pause and scan your recent turns before continuing. You refine based on YOUR OWN trajectory, then resume the task.
  2. Workspace-level reflection (optional) — a new workspace has no reflection agent and no reflection trigger. A workspace may add one: an agent (for example agents/harness-reflector.md) that a cron trigger in kortix.yaml runs. It fans out read-only reviewer subagents to work through every recent session's full history, aggregates their findings, and refines the shared harness on main via a change request. Every run creates a sandbox. This skill is its protocol: the agent's prompt only needs to load it.
  • Repeated tool/command failures — the same command or tool errors more than once, or you retried a broken approach. → Repair the tool, or record the working alternative in a skill.
  • Rediscovery loops — you (or another session) re-derived something a past session already knew (an API quirk, a file location, a decision). → Memory entry.
  • Stalled objectives — turns pass without progress toward the stated goal; you circled, re-read, or re-planned without acting. → Prompt guidance for the responsible agent, or a decomposition sub-agent.
  • Repeated multi-step patterns — you performed the same 3+ step sequence more than twice by hand. → Codify it: a skill (if guidance) or a tool (if executable).
  • Exception-raising code — an executable tool or script (a tools: module or an extensions: package in kortix.yaml) raised; you worked around it instead of fixing it. → Repair the code now.
  • Missed opportunities — information or shortcuts visible in the trajectory that no component captured. → Whichever component fits.

Pass 1 — Prompts (Δp). Reread the responsible agent's prompt file against the identified failures. Tighten instructions that were ignored, add the missing rule, remove guidance that no longer earns its tokens. Keep prompts short; a prompt that only grows is a failing prompt.

Pass 2 — Sub-agents (ΔG). Create a sub-agent only for a pattern that recurred across the window AND needs its own scoped permissions or prompt: an agents.<name> block with mode: subagent, added to the orchestrator's subagents list. Edit sub-agents implicated in failures. Delete sub-agents that have not been invoked productively — check before keeping.

Pass 3 — Skills and tools (ΔK). Codify successful sequences from the trajectory into a skill (guidance) or a tool (executable). Repair every tool the trajectory shows raising exceptions. Prefer editing an existing skill over creating a near-duplicate. A new skill is a folder named after it (skills/<name>/SKILL.md), registered under skills: and added to the skills grant of each agent that needs it. A new tool is registered under tools: and reaches each agent whose tools grant includes it. An unregistered file reaches no agent.

Pass 4 — Memory (ΔM). Follow the kortix-memory skill's rubric with the file tools on memory/: fill gaps the trajectory exposed, update stale entries, demote or delete entries about areas the workspace has moved past. Keep MEMORY.md in sync.

Scope discipline: fix what the trajectory shows. Do not speculatively rewrite components with no observed failure. Most refinement runs should touch one or two components, not all five.

For workspace-level reflection, do not skim a digest and call it a review. Work through every session:

  1. Enumerate every session in the window: kortix sessions digest --since 24h --json (add --all for a first ever run). Note per session: id, agent, status, title, whether a live transcript is available.
  2. Fan out one read-only reviewer subagent per session with the agent tool (at most 4 at a time; review every session, skip none silently). Each reviewer gets the session id and returns a structured findings report. Reviewers gather the FULL picture for their session:
    • the transcript: kortix sessions log <id> --json (a stopped session reads its saved transcript),
    • the session's git branch: its commits, diffs, and files touched,
    • change requests the session opened and their review outcomes.
  3. Aggregate all reviewer reports. Deduplicate findings that recur across sessions — a failure signature seen in three sessions outranks one seen once. Rank by cost (turns wasted × sessions affected).
  4. Run the four passes on the ranked findings, then land per the rules below.

Sub-agent review is read-only: reviewers never edit the harness or open CRs. Only the orchestrating reflection agent writes.

  1. Apply the edits in your clone of the repository (kortix workspaces clone; /workspace has none at boot). They do not change the config this session runs: agents, skills and tools compile from the base branch. They take effect once the change request merges, in new sessions and in running ones when they are idle (kortix sessions reload <session id> applies it now).

  2. Commit them separately from task work:

    sh
    # Stages the harness files this project has. Add any other harness path you edited.
    git add -A -- $(ls -d kortix.yaml agents skills tools extensions commands memory 2>/dev/null)
    git commit -m "harness: <one-line summary of what failed and what changed>"
  3. Push and open (or update) ONE change request per session for harness promotion to main:

    sh
    git push origin HEAD
    kortix cr open --title "harness: <summary>" \
      --description "Failure signatures observed, edits per component, evidence (commands/turns)."

    If this session already has an open harness: CR, push to it instead of opening a second one.

  4. Return to the task. A refinement interruption ends with you resuming what you were doing, with the improved harness in effect.

Workspace-level reflection: all edits land only via a CR against main. Nothing applies immediately; the merged CR is what future sessions inherit.

Preguntas frecuentes

¿Qué hace la habilidad de IA Kortix Harness Refinement?

The continual-harness refinement protocol — how an agent inspects its recent trajectory for failure signatures and improves its own harness (agent prompts, sub-agents, skills, memory) in place, mid-session, landing changes on the session branch immediately and promoting them to `main` only through a change request. Load this skill when a refinement prompt arrives mid-session, when a workspace's scheduled reflection agent runs, or whenever you decide your own scaffolding needs repair. The sub-agent fan-out in this skill is for a top-level reflection run only; if you loaded this as a subagent...

¿Por qué usar Kortix Harness Refinement en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Kortix Harness Refinement está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Kortix Harness Refinement en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/kortix-ai/CompanyOS/tree/dev/packages/starter/templates/managed/skills/kortix-harness-refinement. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Kortix Harness Refinement?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Kortix Harness Refinement?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Kortix Harness Refinement con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Kortix Harness Refinement?

kortix-ai la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇