docs
DocumentaçãoDocumentation
Tudo o que a Helena faz, onde cada coisa fica e como desligar. Ela é feita de arquivos, git e hooks: nenhum banco, nenhum container, nenhum serviço rodando, e nenhum LLM dentro de hook.Everything Helena does, where each thing lives and how to turn it off. She is made of files, git and hooks: no database, no container, no running service, and no LLM inside a hook.
instalarinstall
Quatro comandos.Four commands.
Precisa de Claude Code logado, Node.js 18+ e Python 3.10+. O verificador de contraste usa o Edge ou o Chrome que já está instalado. Obsidian é opcional: a memória é Markdown numa pasta. Windows, macOS e Linux.Needs Claude Code logged in, Node.js 18+ and Python 3.10+. The contrast checker uses the Edge or Chrome already installed. Obsidian is optional: the memory is Markdown in a folder. Windows, macOS and Linux.
git clone https://github.com/vijcoelho/project-helena.git cd project-helena/helena/tools && npm install && cd ../../.. claude plugin marketplace add ./project-helena claude plugin install helena@helena
Opcional, e recomendadoOptional, and recommended
# onde a memória fica (padrão: ~/Helena)where the memory lives (default: ~/Helena) mkdir -p ~/.helena && echo "/path/to/your/obsidian/vault" > ~/.helena/vault # os seus kits, a partir do exemployour kits, from the example cp project-helena/helena/kits.example.json ~/.helena/kits.json # barra de status, em ~/.claude/settings.jsonstatus line, in ~/.claude/settings.json "statusLine": { "type": "command", "command": "node ~/.helena/statusline.js" }
Reinicie o Claude Code. Na próxima sessão o resumo da Helena aparece no topo.Restart Claude Code. On the next session Helena's brief shows at the top.
primeiro diafirst day
Ela chega vazia e aprende com você.She arrives empty and learns from you.
- Rode
/helena:setupuma vez. Ela pergunta onde fica o seu vault e lê as suas 10 últimas sessões (alguns centavos, no Haiku).Run/helena:setuponce. She asks where your vault is and reads your last 10 sessions (a few cents, on Haiku). - Trabalhe normalmente e corrija quando ela errar ("não, o deploy é com Docker"). A cada 6 pedidos e no fim da sessão, o que vale lembrar vira uma nota.Work as usual and correct her when she is wrong ("no, we deploy with Docker"). Every 6 requests and when the session ends, what is worth remembering becomes a note.
- Diga uma regra de git no chat ("não commita vídeo aqui") e ela grava em
.helena/git. Dali em diante o hook barra.Say a git rule in chat ("don't commit videos here") and she saves it to.helena/git. From then on the hook enforces it. - Antes de parar, peça pra salvar onde parou. O
HANDOFF.mdentra sozinho na próxima vez que você abrir a pasta, conferido contra o repositório.Before you stop, ask her to save where you stopped.HANDOFF.mdcomes in by itself the next time you open the folder, checked against the repo.
comandoscommands
O que você pode pedir.What you can ask for.
| COMANDOCOMMAND | O QUE FAZWHAT IT DOES |
|---|---|
| /helena:setup | Primeiro dia: aponta o vault e aprende com as suas sessões passadas.First day: points at your vault and learns from your past sessions. |
| /helena:remember | Ensina um fato agora (regra, preferência, fato do projeto).Teaches a fact right now (a rule, a preference, a project fact). |
| /helena:forget | Apaga uma memória errada ou velha.Removes a memory that is wrong or outdated. |
| /helena:status | O que ela aprendeu: memórias, kits, biblioteca, candidatas a skill.What she has learned: memories, kits, library, skill candidates. |
| /helena:budget [dias] | Pra onde os tokens foram, com cache e custo efetivo ponderado (1× input cheio, 1,25×/2× escrita, 0,1× leitura) na manchete e sessões forkadas/resumidas deduplicadas entre arquivos. Mostra quebras de cache por causa, por dia, por projeto, arquivo lido duas vezes, subagentes por modelo e esforço, custo da Helena e "Requests checked by tests".Where the tokens went, with cache & weighted effective cost (1× fresh input, 1.25×/2× write, 0.1× read) as the headline and forked/resumed transcripts deduplicated across files. Shows cache breaks by cause, per day, per project, files read twice, subagents by model and effort, Helena's own cost and "Requests checked by tests". |
| /helena:limits | Uso de cada plano (5 horas e semana) e se a semana dura nesse ritmo.Every plan's usage (5 hours and week) and whether the week lasts at this pace. |
| /helena:rewind [n] | Desfaz: a pasta como estava antes do último pedido (ou n atrás).Undo: the folder as it was before the last request (or n back). |
| /helena:recall | Busca nas suas sessões gravadas, sem LLM e sem índice: data, projeto e o turno em que aquilo foi dito.Searches your recorded sessions, no LLM and no index: date, project and the turn where it was said. |
| /helena:audit [dias] | O que os hooks barraram ou perguntaram, e pra onde a IA saiu da máquina.What the hooks blocked or asked about, and where the AI reached outside the machine. |
| /helena:orchestrate | Planeja na sessão e passa o código pra um worker mais barato por vez; os testes rodam antes de o diff ser lido. Em ondas: passos que não dividem arquivo, não precisam do resultado um do outro e cujos arquivos não têm mudança sem commit rodam lado a lado, até 3 builders, cada um num git worktree; o resto, um por vez. helena/wave.js land <worktree>... aplica tudo com um comando: cada worktree vira patch, conferido contra a árvore principal; nada é staged nem commitado; patch que colide fica NOT LANDED e o worktree é mantido. Briefings abaixo de 10 linhas. Passo que falha sobe um degrau: novo builder (em opus se a sessão roda acima de Opus), depois a sessão principal. Mudança grande (mais de 3 arquivos ou 150 linhas) ganha uma revisão: um worker novo lê só a tarefa e o diff e devolve até 5 achados; um segundo worker novo tenta provar cada um errado; só os que ficam de pé são corrigidos ou mostrados. Uma rodada.Plans in the session and hands the coding to one cheaper worker at a time; the tests run before the diff is read. In waves: steps that share no file, do not need each other's result and whose files have no uncommitted changes run side by side, up to 3 builders, each in its own git worktree; the rest one at a time. helena/wave.js land <worktree>... lands them with one command: each worktree becomes a patch, checked against the main tree; nothing is staged or committed; a patch that collides is NOT LANDED and its worktree is kept. Briefs under 10 lines. A failed step climbs one rung: a new builder (on opus when the session runs above Opus), then the main session. A large change (over 3 files or 150 lines) gets one review: a fresh worker reads only the task and the diff and returns up to 5 findings; a second fresh worker tries to prove each one wrong; only the findings that stand are fixed or shown. One round. |
| /helena:app | Abre o app da Helena: um chat sobre o Claude Code, o Codex e o Gemini que você já usa, com cada subagente visível ao vivo, até quatro painéis lado a lado, /model para trocar de IA no meio da conversa, e o que ela barrou, conferiu, lembrou e gastou. Fecha sozinho quando você fecha a janela. No Windows, fica no Menu Iniciar depois da primeira vez; PT / EN no topo troca o idioma.Opens the Helena app: a chat over the Claude Code, Codex and Gemini you already use, with every subagent visible live, up to four panes side by side, /model to switch AI mid-conversation, and what she blocked, checked, remembered and spent. It shuts down when you close the window. On Windows it sits in the Start menu after the first time; PT / EN at the top switches the language. |
| /helena:race | Dois workers tentam duas abordagens em worktrees separados; a que passa nos testes é aplicada aqui (empate: o menor diff). Só quando a tarefa tem dois caminhos reais; custa dois workers. O vencedor é aplicado com o mesmo script.Two workers try two approaches in separate worktrees; the one that passes the tests is applied here (tie: smaller diff). Only when the task has two real ways to do it; costs two workers. Its winner lands with the same script. |
| /helena:diet | O que já está no contexto antes de você digitar: servidores MCP (estimativa mediana ~3k ou schema exato via --probe-mcp em cache), cada plugin, suas skills e agentes e o CLAUDE.md, com usos em 30 dias. --off <plugin> e --off-mcp <servidor> desligam só neste projeto. Também faz lint de CLAUDE.md / AGENTS.md (script npm repetido, árvore de diretórios, lista longa de "não faça" e 25+ diretivas ALWAYS/NEVER). Sem LLM. Na máquina do criador: 21,9k tokens listados e 5 MCPs com zero chamadas em 30 dias (~15k/mensagem).What sits in the context before you type: MCP servers (~3k median estimate or exact cached schema via --probe-mcp), each plugin, your own skills and agents, and CLAUDE.md, with 30-day uses. --off <plugin> and --off-mcp <server> disable one in this project only. Also lints CLAUDE.md / AGENTS.md (restated npm scripts, directory trees, long "do not" lists and 25+ ALWAYS/NEVER directives). No LLM. On the creator's machine: 21.9k tokens listed and 5 MCPs with zero calls in 30 days (~15k/message). |
| /helena:routines | Rotinas que ela roda sozinha, só leitura e com teto de gasto. Prontas: CI e dependências.Routines she runs by herself, read-only and with a spending cap. Ready-made: CI and dependencies. |
| /helena:skills | As skills que ela criou dos seus pedidos repetidos, e o uso de cada uma.The skills she created from your repeated requests, and how often each was used. |
| /helena:undo | Apaga uma skill que ela criou; com learned tira a última lição; com fold volta a skill de antes.Deletes a skill she created; with learned drops the last lesson; with fold restores the skill from before. |
| /helena:share | Copia uma nota sua pra .helena/memory/ do repositório, revisada como código.Copies one of your notes into the repo's .helena/memory/, reviewed like code. |
| /painel | Painel com o contexto por categoria e o gasto da Helena (Claude Code 2.1.287+).A pane with context by category and Helena's spending (Claude Code 2.1.287+). |
hooks
O que roda sem você pedir.What runs without being asked.
Hook não é sugestão: roda fora do modelo, em milissegundos, e não gasta token até ter algo a dizer. São guardas pra IA, não uma sandbox: quem é dono da máquina pode desligar.A hook is not a suggestion: it runs outside the model, in milliseconds, and spends no tokens until it has something to say. They are guardrails for the AI, not a sandbox: whoever owns the machine can turn them off.
| HOOK | QUANDOWHEN | O QUE FAZWHAT IT DOES |
|---|---|---|
| start.js | início da sessãosession start | Entrega o HANDOFF.md conferido contra o repositório (acima de 4 KB, só a seção "Next"; o resto a IA lê quando precisa), o resumo do projeto tirado do git e o índice da memória. Nota que depende de código que sumiu vem marcada STALE. Lê a config de IA do próprio repo (CLAUDE.md, .mcp.json, settings) e avisa o que parece errado; olha também os CLAUDE.md / AGENTS.md versionados em subpastas e os .claude/rules/*.md (até 40 arquivos). No 2.0 o início sempre cabe: 9,5 KB no máximo, porque o Claude Code só mostra 2 KB de um hook acima de 10.000 caracteres. O índice de memória é um orçamento de 1 KB: notas do projeto e do time primeiro, depois as mais entregues, e uma linha com quantas ficaram de fora; o router.js ainda entrega a nota inteira quando o pedido bate.Hands over HANDOFF.md checked against the repo (past 4 KB, only its "Next" section; the AI reads the rest when needed), the project brief built from git and the memory index. A note that depends on code that is gone comes marked STALE. Reads the repo's own AI config (CLAUDE.md, .mcp.json, settings) and says what looks wrong; it also scans tracked CLAUDE.md / AGENTS.md in subfolders and .claude/rules/*.md (40 files at most). Since 2.0 the start always fits: 9.5 KB at most, because Claude Code shows only 2 KB of a hook output past 10,000 characters. The memory index is a 1 KB budget: this project's and the team's notes first, then the ones handed over most, and a line saying how many are not listed; router.js still hands a note over whole when a request matches it. |
| router.js | cada pedidoevery request | Carrega só os kits que o pedido precisa (uma vez por sessão), busca notas com BM25 leve + stemming PT/EN + 1 salto de [[wikilinks]], avisa em 120k / 250k / 500k de contexto e perto do limite do plano, e tira o snapshot do /helena:rewind.Loads only the kits the request needs (once per session), retrieves notes with lightweight BM25 + PT/EN stemming + 1-hop [[wikilinks]], warns at 120k / 250k / 500k of context and near the plan limit, and takes the /helena:rewind snapshot. |
| guard.js | Bash · PowerShell | Barra chave de API e .env em commit ou push, e aplica as regras de .helena/git.Blocks API keys and .env in a commit or push, and enforces the rules in .helena/git. |
| trim.js | Bash · PowerShell · Read | Põe a flag enxuta no comando e deixa rodar (rtk rewrite agora é opcional via HELENA_RTK=1); barra o que nenhuma flag resolve (lockfile, build, arquivo acima de 100 KB, devolvendo esboço com até 40 funções/títulos). Saída: # helena:full ou limit no Read. Detalhes.Adds the quiet flag to the command and lets it run (rtk rewrite is now opt-in via HELENA_RTK=1); blocks what no flag fixes (lockfiles, build output, files over 100 KB, returning an outline of up to 40 functions/headings). Way out: # helena:full or limit on Read. Details. |
| squeeze.js | depois de Bash · PowerShell · MCPafter Bash · PowerShell · MCP | Comprime saída longa de Bash (>4k) e de MCP externo (>12k, corte ≥30%, via updatedMCPToolOutput, pulando o MCP da Helena e imagens, e mascarando segredos). A saída inteira vai pra ~/.helena/out/ (3 dias) com o caminho na resposta. Comandos de conteúdo e # helena:full são ignorados.Compresses long Bash (>4k) and external MCP (>12k, ≥30% cut, via updatedMCPToolOutput, skipping Helena's own MCP and images, and scrubbing secrets). The full output goes to ~/.helena/out/ (3 days) with its path in the reply. Content commands and # helena:full are untouched. |
| brief.js | ao criar subagentestarting a subagent | Todo worker, de qualquer tipo, já começa com o formato do relatório (20 linhas no máximo, path:line, a versão longa num arquivo), o comando de checagem do projeto, a seção ## Decisions do HANDOFF.md (últimos 1.500 caracteres) e tests: spec-only quando definido. O orquestrador não gasta token repetindo isso.Every worker of any type starts with the report format (20 lines at most, path:line, the long version in a file), the project's check command, the ## Decisions section of HANDOFF.md (last 1,500 characters) and tests: spec-only when set. The orchestrator no longer spends output tokens repeating them. |
| compact.js | antes de compactarbefore compaction | Diz ao resumo o que guardar (as regras do usuário nas palavras dele, decisões e abordagens rejeitadas, arquivos como path:line, o comando de checagem e o último resultado, o próximo passo) e o que deixar de fora (conteúdo de arquivo, saída de comando). O start.js continua devolvendo as regras depois.Tells the compaction summary what to keep (the user's rules in their words, decisions and rejected approaches, files as path:line, the check command and its last result, the next step) and what to leave out (file contents, command output). start.js still restores the rules afterwards. |
| gate.js | antes de ferramentasbefore tools | Nega leitura de .env (só nomes das chaves), credenciais em argumentos de MCP externo e pacotes inexistentes no npm/PyPI. Pergunta antes: comando destrutivo, teste enfraquecido/apagado, apagar log, pacote <72h ou npm com postinstall (--ignore-scripts passa) e edição das próprias regras em .helena/. Aplica .helena/policy e pr: receipt. Entrega memória ligada ao arquivo (checks:/paths:) no Read/Edit, avisa após 20 chamadas pesadas, após 6+ leituras seguidas (Code Mode), e na mesma falha de teste repetida.Denies .env reads (key names only), credentials in external MCP arguments and made-up npm/PyPI packages. Asks first: destructive commands, weakened/deleted tests, erasing audit logs, <72h releases or npm postinstall scripts (--ignore-scripts passes), and edits to Helena's own rule files in .helena/. Enforces .helena/policy and pr: receipt. Delivers path-scoped memory (checks:/paths:) on Read/Edit, nudges past 20 heavy calls, past 6+ consecutive reads (Code Mode), and on repeated test failures. |
| lifecycle.js | PreModelSwitch · StopFailure · PostToolUseFailure | Avisa antes de um /model descartar ≥40k de cache quente; sugere handoff pra outra IA quando um turno morre por rate/plan limit; injeta uma nota de fix conhecido (error_pattern: ou assinatura do erro) quando uma ferramenta falha.Warns before /model drops ≥40k of warm prompt cache; suggests a handoff to another AI when a turn dies on rate/plan limits; injects a known-fix note (error_pattern: or error signature) when a tool fails. |
| nudge.js | depois de Edit · Writeafter Edit · Write | Roda checagem sintática instantânea em JS (node --check) e Python (ast.parse em memória, sem __pycache__) e, a cada 3 edições de código sem teste, pede o teste mais próximo.Runs an instant syntax check on JS (node --check) and Python (in-memory ast.parse, no __pycache__) and, after every 3 code edits with no test, asks for the nearest test. |
| delegate.js | ao criar subagentestarting a subagent | Subagente sem modelo roda num modelo abaixo do principal. Com .helena/delegate, limita quantos rodam juntos e quantos nascem por pedido. Detalhes. Teto de relatório: worker cuja última mensagem passa de 8.000 caracteres volta uma vez pra pôr o texto inteiro num arquivo e reportar em 20 linhas. report: <caracteres> ou report: off em .helena/delegate.A subagent started without a model runs on one below the main. With .helena/delegate, caps how many run at once and how many start per request. Details. Report cap: a worker whose last message passes 8,000 characters is sent back once to put the full text in a file and report in 20 lines. report: <characters> or report: off in .helena/delegate. |
| outside.js | depois de web, MCP e ghafter web, MCP and gh | Linha escrita pra IA num texto de fora ("ignore as instruções anteriores") é marcada como dado, também em caracteres invisíveis ou comentário HTML. No Bash usa filtro if: "Bash(gh *)" (sem spawn à toa). Nunca barra. Cada host alcançado fica no log.A line written for the AI in outside text ("ignore previous instructions") is flagged as data, also in invisible characters or an HTML comment. On Bash uses handler filter if: "Bash(gh *)" (avoids unnecessary spawns). Never blocks. Every host reached goes to the log. |
| done.js | fim do turno e do subagenteend of turn and of a subagent | O turno mexeu em código? Roda testes (ou tsc), holdout, differential check, confere testes enfraquecidos contra HEAD, trava uma vez em debugger / breakpoint() adicionados em código e exige recibo quando não há comando de teste.Did the turn touch code? Runs tests (or tsc), holdout, differential check, catches weakened tests against HEAD, blocks once on added debugger / breakpoint() traps and checks receipts when there is no test command. |
| check.js | fim do turnoend of turn | Confere o contraste do texto nas páginas mexidas no turno.Checks the text contrast of the pages touched in the turn. |
| end.js | fim da sessão (async)session end (async) | Destila a sessão em notas, no Haiku, em segundo plano com async: true.Distills the session into notes, on Haiku, in the background with async: true. |
economia de tokenstoken savings
Cada mensagem relê o contexto inteiro.Every message re-reads the whole context.
A conta de uma sessão é o tamanho do contexto vezes o número de chamadas. Por isso a Helena ataca três coisas: o que entra no contexto, quantas chamadas acontecem e se o contexto é lido do cache ou pago inteiro.A session's bill is the context size times the number of calls. So Helena goes after three things: what enters the context, how many calls happen, and whether the context is read from the cache or paid in full.
Comando reescrito, não recusadoRewritten, not refused
Recusar um comando custa mais uma chamada ao modelo, e cada chamada relê tudo. Quando basta uma flag, a flag entra e o comando roda. Só flags são acrescentadas: o código de saída e o sentido do comando ficam iguais. Quando algo é cortado, a IA é avisada na mesma hora.Refusing a command costs one more model call, and every call re-reads everything. When a flag is enough, the flag goes in and the command runs. Only flags are added: the exit code and the meaning of the command stay the same. When something is cut, the AI is told right away.
| A IA PEDETHE AI ASKS FOR | RODA COMORUNS AS | POR QUÊWHY |
|---|---|---|
| git log | git log --oneline -n 20 | o histórico inteiro não cabe; a IA é avisada do cortethe whole history does not fit; the AI is told about the cut |
| git status | git status -sb | mesma informação, sem as dicassame information, without the hints |
| pytest | pytest -q --tb=short | um traceback inteiro por teste que falha é quase toda a saídaa full traceback per failing test is most of the output |
| pip install x | pip install -q x | só erros e avisoserrors and warnings only |
| npm install | npm install --no-fund --loglevel=error | o resumo fica, os avisos de pacote antigo saemthe summary stays, the deprecation warnings go |
| cargo build · test · check | cargo test -q | sem a linha por crate compiladowithout the line per compiled crate |
| grep -r foo . | grep --exclude-dir=node_modules --exclude-dir=.git -r foo . | só quando existe node_modulesonly when there is a node_modules |
Nada é mexido quando o comando já diz o que quer (-v, -n 5), quando a saída vai pra um arquivo ou pra outro comando, dentro de texto entre aspas, ou com # helena:full. O rtk é opcional via HELENA_RTK=1 (desligado por padrão porque reescritas agressivas podem omitir detalhes e forçar voltas extras).Nothing is touched when the command already says what it wants (-v, -n 5), when the output goes to a file or to another command, inside quoted text, or with # helena:full. rtk is opt-in via HELENA_RTK=1 (off by default because aggressive rewrites can hide details and trigger extra round trips).
Ainda barradoStill blocked
O que nenhuma flag deixa enxuto sem mudar o sentido: despejar um arquivo acima de 100 KB, um lockfile, saída de build, git log -p sem limite, listagem recursiva com node_modules. A recusa já diz o jeito enxuto.What no flag makes lean without changing its meaning: dumping a file over 100 KB, a lockfile, build output, an unbounded git log -p, a recursive listing with node_modules. The refusal names the lean way.
A barra de statusThe status line
helena · ctx 85k · cache until 14:32 · limit 12% · Opus
- ctx: o tamanho do contexto, relido a cada mensagem. A partir de 120k aparece
heavy; de 250k,/clear?.ctx: the context size, re-read on every message. From 120k it showsheavy; from 250k,/clear?. - cache until: o cache do contexto vive 5 minutos ou 1 hora depois da última chamada. Responder depois dessa hora paga o contexto inteiro de novo. Se o assunto mudou, é a hora do
/clear.cache until: the context's cache lives 5 minutes or 1 hour after the last call. Answering after that time pays for the whole context again. If the subject changed, that is the moment for/clear. - model changed: cada modelo tem o seu cache. Depois de um
/modelno meio da sessão, a próxima mensagem relê tudo sem cache; a barra diz quantos tokens.model changed: each model has its own cache. After a/modelmid-session the next message re-reads everything uncached; the line says how many tokens. - limit: quanto do plano já foi (o maior entre 5 horas e semana).limit: how much of the plan is gone (the larger of 5 hours and week).
/helena:budget
Lê o uso que o Claude Code já grava em cada sessão. Não chama modelo, não custa nada. Além do total por dia e por projeto, mostra o que procurar:Reads the usage Claude Code already writes in every session. Calls no model, costs nothing. Besides the totals per day and per project, it shows where to look:
Same file read again with no edit in between: 30 times, 169k characters that were already in the context Cache: the context was paid in full again 2 times, 454k tokens pause longer than the cache 2 454k answer before `cache until` in the status line, or /clear first Subagents: 42 workers, 86.3M tokens haiku-5-5 max 25 705 81.3M 379 A worker starts at 34k of context (median), 34k of it written to the cache on that first call
Esse é um relatório real, de 14 dias de uso do criador. Ele mostra onde não vale mexer também: o cache quase nunca quebrou, então o problema ali eram os subagentes.That is a real report, from 14 days of the creator's use. It also shows where not to spend effort: the cache almost never broke, so the problem there was the subagents.
subagentessubagents
Subagente na rédea.Subagents on a leash.
Um subagente criado sem modelo roda no modelo principal, e nasce com dezenas de milhares de tokens de contexto antes de fazer qualquer coisa. Sempre ligado: worker general-purpose sem modelo roda no Sonnet e o Explore no Haiku. Um pin nunca sobe o modelo: numa sessão Sonnet só o Explore muda, numa sessão Haiku nada muda. Tipo de agente com modelo próprio e chamada que nomeia um modelo ficam como estão.A subagent started without a model runs on the main one, and starts with tens of thousands of context tokens before it does anything. Always on: a general-purpose worker without a model runs on Sonnet and Explore on Haiku. A pin never moves a model up: on a Sonnet session only Explore changes, on a Haiku session nothing does. An agent type with its own model and a call that names one are left alone.
Os limites são opcionais. Crie .helena/delegate no repositório (ou ~/.helena/delegate pra todos). Arquivo vazio usa estes valores; off desliga a linha.The caps are optional. Create .helena/delegate in the repo (or ~/.helena/delegate for all of them). An empty file uses these values; off turns a line off.
model: sonnet # worker sem modeloa worker without a model search: haiku # o ExploreExplore parallel: 3 # rodando ao mesmo temporunning at the same time workers: 8 # criados por pedido seustarted per request of yours effort: medium # opcional, sem padrão: esforço do worker fixadooptional, no default: the pinned worker's effort
O worker recusado recebe o motivo, e a recusa fica no /helena:audit. Código escrito por subagente passa pelos testes antes de ele reportar. Pra desligar os pins em tudo: model: off e search: off em ~/.helena/delegate.A refused worker is told why, and the refusal is in /helena:audit. Code written by a subagent goes through the tests before it reports. To turn the pins off everywhere: model: off and search: off in ~/.helena/delegate.
configuraçãoconfiguration
Arquivos de texto, versionados com o código.Text files, versioned with the code.
| ARQUIVOFILE | PRA QUÊWHAT FOR |
|---|---|
| .helena/git | Regras de git do projeto: main: no nega commit direto na main; never: *.mp4 renders/ usa globs como o .gitignore; pr: receipt (opcional) faz gh pr create ser negado uma vez com a linha "Checked by Helena: ..." para o corpo do PR.The project's git rules: main: no denies direct commits on main; never: *.mp4 renders/ takes globs like .gitignore; pr: receipt (opt-in) makes gh pr create be denied once with the "Checked by Helena: ..." line for the PR body. |
| .helena/policy | Regras do time pra IAs: deny: e ask: com regex por linha, mcp: com os servidores MCP permitidos.The team's rules for AIs: deny: and ask: with a regex per line, mcp: with the MCP servers allowed. |
| .helena/test | O comando de teste que roda no fim do turno, ou off. Sem ele, usa o que o projeto tem (npm test, pytest, cargo test, go test; num projeto TypeScript sem teste, npx tsc --noEmit).The test command run at the end of a turn, or off. Without it, what the project has is used (npm test, pytest, cargo test, go test; in a TypeScript project with no tests, npx tsc --noEmit). |
| .helena/delegate | Limites e pins de subagente. Ver acima.Subagent caps and pins. See above. |
| tests: spec-only | Uma linha em .helena/delegate (ou ~/.helena/delegate), opcional. O gate pergunta antes de a IA criar um arquivo de teste novo (test_*.py, *_test.py, *.test.*, *.spec.*, *_test.go); editar teste existente não pergunta.An optional line in .helena/delegate (or ~/.helena/delegate). The gate asks before the AI creates a new test file (test_*.py, *_test.py, *.test.*, *.spec.*, *_test.go); editing an existing test is not asked. |
| .helena/holdout/ | Testes de aceitação só seus (pytest ou node --test). A IA não lê: o gate nega qualquer comando que cite a pasta. Com os testes normais passando, o done roda esses e devolve só os nomes dos que falharam. Symlink não é coberto; no jest ou vitest, ponha a pasta no exclude.Acceptance tests only you write (pytest or node --test). The AI cannot read them: the gate denies any command that names the folder. Once the normal tests pass, done runs these and returns only the names of the ones that failed. Symlinks are not covered; in jest or vitest, add the folder to the exclude. |
| differential check | No done, só quando o diff muda arquivos de teste e de código e os testes passam: guarda o código no stash (helena-differential), roda o mesmo comando de teste e devolve o código. Só mexe na própria entrada do stash, nunca na sua; se não conseguir devolver, bloqueia e diz como fazer git stash pop. Se a suíte passa sem a mudança, os testes não a checam: bloqueia uma vez por diff (num refactor puro, é só parar de novo). Custa uma rodada extra de testes, sem tokens. Por quê: arXiv 2610.03984, a busca guiada com diferencial de duas árvores foi de 46,8% a 52,8% no SWE-bench Verified, com metade dos passos.In done, only when the diff changes test files and code files and the tests pass: it stashes the code files (helena-differential), reruns the same test command and puts them back. It only touches its own stash entry, never yours; if it cannot put them back, it blocks and says how to git stash pop. If the suite still passes without the change, the tests do not check it: it blocks once per diff (for a pure refactor, just stop again). Costs one extra test run, no tokens. Why: arXiv 2610.03984, guided search with a two-tree differential went from 46.8% to 52.8% on SWE-bench Verified, with about half the steps. |
| .helena/memory/ | Notas de memória do time, commitadas com o código.The team's memory notes, committed with the code. |
| ~/.helena/kits.json | Os seus kits: um gatilho (regex) e as skills que ele traz. Nada carrega se o pedido não bater.Your kits: a trigger (regex) and the skills it brings in. Nothing loads unless the request matches. |
| ~/.helena/vault | Uma linha: o caminho do vault. HELENA_VAULT no ambiente passa por cima.One line: the vault path. HELENA_VAULT in the environment overrides it. |
onde ficam os dadoswhere the data lives
Tudo nas suas pastas.All in your folders.
| CAMINHOPATH | O QUÊWHAT |
|---|---|
| <vault>/Memory/ | uma nota por fato; o índice entra em cada início de sessãoone note per fact; the index comes in at every session start |
| <vault>/Projects/ · Weekly/ · Archive/ | uma nota por projeto, o resumo da semana, notas fundidasone note per project, the weekly review, merged notes |
| <vault>/Routines/ | um log por rotina; o que precisa de você vai pra Inbox/needs-you.mdone log per routine; what needs you goes to Inbox/needs-you.md |
| ~/.helena/library/ | skills que custam zero de contexto até um kit pedirskills that cost zero context until a kit asks for them |
| ~/.helena/audit.jsonl | cada decisão de hookevery hook decision |
| ~/.helena/egress.jsonl | cada host, busca e servidor MCP que a IA alcançouevery host, search and MCP server the AI reached |
| ~/.helena/ledger.jsonl | o que o trabalho em segundo plano da Helena custouwhat Helena's background work cost |
| <projeto>/HANDOFF.md | onde você parouwhere you stopped |
| refs/helena/turns | os snapshots do desfazer, no reflog de cada repositório (nunca vão no push)the undo snapshots, in each repo's reflog (never pushed) |
outras IAsother AIs
Uma memória, qualquer modelo.One memory, every model.
python project-helena/helena/connect.py # conecta cada CLI que achar (+ hooks nativos no Codex e Cursor)connects every CLI it finds (+ native hooks for Codex & Cursor) python project-helena/helena/connect.py --cursor # também grava ~/.cursor/hooks.json e mcp.jsonalso writes ~/.cursor/hooks.json and mcp.json python project-helena/helena/connect.py --remove # desfazundoes it
- Codex recebe
~/.codex/hooks.jsonnativo (os 5 eventos suportados, semmodulesdo Claude),AGENTS.mde o servidor MCP.Codex gets native~/.codex/hooks.json(the 5 supported events, without Claude-onlymodules),AGENTS.mdand the MCP server. - Cursor (automático quando
~/.cursorexiste, ou com--cursor) recebe os hooks portáteis e o servidor MCP.Cursor (automatic when~/.cursorexists, or with--cursor) gets portable hooks and the MCP server. - Antigravity (Gemini), Qwen Code, Kimi, Grok CLI, opencode recebem o
helena/mcp.js, um servidor MCP sem dependências com sete ferramentas.Antigravity (Gemini), Qwen Code, Kimi, Grok CLI, opencode gethelena/mcp.js, a dependency-free MCP server with seven tools. - Qualquer outro cliente MCP (Claude Desktop, Windsurf, LM Studio): cole o JSON que o
connect.pyimprime.Any other MCP client (Claude Desktop, Windsurf, LM Studio): paste the JSONconnect.pyprints.
Perto do limite do plano (80%) ela pede o HANDOFF.md; em 95% salva e entrega o comando pronto pra IA que tem folga.Near the plan limit (80%) she asks for HANDOFF.md; at 95% she saves it and hands you the ready command for the AI with room.
benchmark
Só fica o que ganha.Only what wins stays.
Cada tarefa roda como uma sessão inteira do Claude Code, uma vez sem a Helena e uma vez com. Cada rodada registra acerto, turnos, custo e os tokens em quatro partes (sem cache, escrita de cache, leitura de cache, saída). Com várias rodadas, as colunas se revezam em quem vai primeiro. Uma sessão barata que falha não é economia: o que conta é o custo por tarefa resolvida.Every task runs as a full Claude Code session, once without Helena and once with her. Each run records pass or fail, turns, cost and its tokens in four parts (uncached, cache write, cache read, output). With several rounds, the columns take turns going first. A cheap session that fails is not a saving: what counts is the cost per solved task.
python eval/run.py -n 1 # todas as tarefas, 1 rodadaevery task, 1 round python eval/run.py noisy-tests -n 3 # uma tarefa, 3 rodadasone task, 3 rounds python eval/run.py --model opus # outro modeloanother model python eval/run.py --probe # o peso fixo da Helena: um "Reply OK" por colunaHelena's fixed weight: one "Reply OK" per column python eval/registry.py # a tabela do registro do sitethe site's registry table
Uma tarefa é uma pasta: prompt.md, fixture/, check.py (saída 0 = passou) e um arquivo uses que diz qual peça ela mede. Duas delas são de custo (noisy-tests, release-notes): as duas colunas devem passar, e a diferença é o que a sessão custou. Os testes dos hooks não chamam modelo: python eval/test_trim.py e os outros (27 suítes no total), mais eval/test_falseblock.py (34 chamadas comuns que nunca podem ser bloqueadas) e eval/replay.py (repete chamadas de transcrições reais no gate.js daqui e de outra versão, sem rodar nada).A task is a folder: prompt.md, fixture/, check.py (exit 0 = pass) and a uses file naming the piece it measures. Two of them are cost tasks (noisy-tests, release-notes): both columns should pass, and the difference is what the session cost. The hook tests call no model: python eval/test_trim.py and the others (27 suites in total), plus eval/test_falseblock.py (34 ordinary calls that must never be blocked) and eval/replay.py (replays calls from real transcripts through this gate.js and another version's, running nothing).
atualizar e removerupdate and remove
Sai tão fácil quanto entra.Out as easily as in.
cd project-helena && git pull claude plugin marketplace update helena claude plugin update helena@helena claude plugin uninstall helena@helena claude plugin marketplace remove helena
Memória, kits e biblioteca ficam nas suas pastas. Pra apagar tudo, remova ~/.helena e as pastas do vault você mesmo.Memory, kits and library stay in your folders. To delete everything, remove ~/.helena and the vault folders yourself.