Logo de Kortix Harness Refinement

Kortix Harness Refinement

OrganizaçãoPopular
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.

Visão geral

Publicado porkortix-ai
RepositórioCompanyOS
Nome da habilidadekortix-harness-refinement
Estrelas
20.8K
Forks
3.5K
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por kortix-ai no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Kortix Harness Refinement no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/kortix-ai/CompanyOS/tree/dev/packages/starter/templates/managed/skills/kortix-harness-refinement
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Kortix Harness Refinement em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Kortix Harness Refinement automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Kortix Harness Refinement não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu 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.

Perguntas frequentes

O que a habilidade de IA Kortix Harness Refinement faz?

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 que usar Kortix Harness Refinement no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Kortix Harness Refinement é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Kortix Harness Refinement no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/kortix-ai/CompanyOS/tree/dev/packages/starter/templates/managed/skills/kortix-harness-refinement. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Kortix Harness Refinement?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Kortix Harness Refinement?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Kortix Harness Refinement com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Kortix Harness Refinement é gratuita?

A habilidade é publicada no GitHub por kortix-ai. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇