convez.ai
AgenteAutomaçãoIntermediário
adaline-ankit

ONMC - Compilador de Memória e Contexto para Agentes de Código

adaline-ankit/oh-no-my-claudecode

Memória adaptativa para agentes: objetivo, restrições e decisões sem redundância

Ver no GitHub
BomPluginScore · de 0 a 100

Agent que mantém a memória de trabalho adaptativa do Claude Code sincronizada com mudanças no repositório, sem chamadas à API. Armazena em SQLite contexto específico da sessão (objetivo, restrições, decisões) e retira automaticamente informações obsoletas quando arquivos-fonte mudam, garantindo contexto sempre relevante e atualizado.

Instalação

$npx convez-ai adaline-ankit/oh-no-my-claudecode

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
100%
Último commit
há 6 dias
Versão
v0.113.0
Issues abertas
28
Contribuidores
2

Casos de uso

  • Manter contexto consistente em sessões longas de coding com Claude
  • Automatizar remoção de informações obsoletas quando código fonte muda
  • Rastrear decisões arquiteturais e próximos passos com âncoras no repositório
  • Integrar memória persistente em agentes MCP e Codex

Veredito

Solução técnica madura que resolve um problema real: agentes de coding perdem contexto relevante ou carregam informação obsoleta. ONMC traz transparência (inspecionável via CLI/hooks) e eficiência (SQLite local, zero overhead de modelo), ideal para fluxos de desenvolvimento iterativo com IA. Requer Python 3.11+ e familiaridade com hooks do Claude.

README

A tradução para o português deste README ainda está na fila.

oh-no-my-claudecode (onmc)

CI Latest release Python 3.11+ License: MIT

Your code changed. Your agent's memory should too.

Keep the task. Refresh the evidence. ONMC gives Claude Code an adaptive working context: the goal, constraints, decisions, and next step survive compaction; recalled claims lose eligibility when their source files change.

Local SQLite. No model calls to compile working context. Inspect every inclusion, exclusion, and withdrawal. Use native Claude hooks, or the same state through CLI and MCP with other coding agents.

ONMC demo: a remembered 30-second TTL is withdrawn after its source changes to 60 seconds; constraints and next step are restored, repeated context emits zero characters.

Animated rendering of real Git, SQLite, and hook results. Eight checks, no model calls. Static image · Run it yourself

What changes in your workflow

When this happensONMC supplies
You start a taskA session-specific goal and explicit constraints
You move between filesRelevant repository memory within a fixed character budget
A recalled fact's source changes, even before commitA withdrawal notice and a refreshed packet
Claude compacts or resumesCurrent goal, constraints, saved decisions, and next step
Nothing relevant changedNo duplicate packet
You need to inspect the decisionSource anchors and inclusion/exclusion reasons

This is advisory context. ONMC cannot erase old conversation text or guarantee that an agent follows instructions. Source freshness is not semantic correctness. Read the exact behavior and limits.

Try it in your repo

Adaptive working context is on main; it is not in the latest PyPI release, v0.113.0. Install from Git for this feature. Python 3.11+, Git, and uv required.

uv tool install --force 'git+https://github.com/adaline-ankit/oh-no-my-claudecode.git@main'
cd your-repo
onmc init
onmc ingest --no-llm
onmc working enable \
  --constraint "Preserve existing public APIs" \
  --constraint "Add no new runtime dependencies"
claude

Start or resume Claude after enabling so it reloads project hooks and MCP settings. Existing custom hooks are preserved. Automatic CLAUDE.md refresh preserves user-authored or edited files. onmc working disable stops adaptive injection.

Claude can save decisions and next steps with record_working_note. A new session gets a separate goal and notes; working notes are not automatically promoted to repository memory.

Codex and other MCP clients: use start_working_context, get_working_context, and record_working_note with an explicit session ID. Native automatic working-context hooks currently target Claude Code. CLI examples and MCP setup · Codex integration

For the latest released package and its existing memory/runtime features:

uv tool install oh-no-my-claudecode
onmc setup --no-llm

More than a context packet

Working context sits on ONMC's existing repository memory and execution harness. Use the pieces independently.

CapabilityEntry pointWhat it provides
Repository memoryonmc ingest, onmc brief, onmc guardProvenance, ranked recall, and recorded failed approaches
Adaptive working contextonmc workingSession state, source checks, bounded packets, repeat suppression
Controlled executiononmc runPlan preview, explicit execution, configured verifier, durable run state
Inspectable evidenceReceipts, trace, eval, replayTamper-evident records and reproducible checks
Portable knowledgeonmc syncGit-portable repository memory in .agent-memory
Agent accessCLI, Python API, hooks, MCPMultiple interfaces to the same local store

Preview a task without invoking a model:

onmc run "fix cache expiration"

Then explicitly execute with an installed, authenticated agent and a verifier appropriate to your project:

onmc run "fix cache expiration" --execute \
  --agent codex \
  --verifier "python -m pytest -q --cov=your_package --cov-report=json" \
  --max-iterations 3 \
  --isolate

Replace your_package with your package name; the example needs pytest-cov. A passing command alone may not satisfy the configured proof requirements. ONMC evaluates repository evidence rather than accepting the agent's claim of completion. The verifier still needs to test the behavior you care about.

Mutation checks, full adjudication, external attestation, and optional provider integrations have their own configuration and dependencies. They do not all run by default. Cost is only known when the selected provider reports it. Execution guide · Capability catalog

What the measurements show

All numbers below come from internal experiments with published protocols and artifacts. They are not a general coding-accuracy claim.

ExperimentResultWhat it establishes
Synthetic working-context event suite117/117 eligibility/delivery checks; legacy path 99/117Covered transitions behave as specified; legacy delivered 18 stale/deleted claims
Adaptive vs forced-refresh delivery36.5% fewer injected charactersRepeat suppression in this event suite; adaptive still used more characters than legacy
10,000-memory synthetic corpus2.48 ms p50, 20.20 ms p95In-process packet compilation on one Apple M4; excludes process startup
Live Codex pilot, three tasks per arm3/3 vs 3/3; 18 grader tests passed per armSuccessful pilot execution; no demonstrated accuracy improvement
Frozen code retrieval, 40 queriesBM25 R@5 0.950; hybrid 0.875BM25 won this corpus; it remains the default

Working-context protocol · Raw results and limitations · Broader harness evidence

The broader publication gate remains blocked. ONMC publishes ties, losses, and missing evidence alongside favorable component results. Larger held-out, long-session coding evaluations are still needed.

Try the demo without an API key

From a source checkout:

git clone https://github.com/adaline-ankit/oh-no-my-claudecode.git
cd oh-no-my-claudecode
uv sync --extra dev --locked
uv run --locked python scripts/demo-working-context.py \
  --output /tmp/working-context-demo.json

The demo creates a temporary Git repo, remembers a 30-second cache TTL, changes the source to 60 seconds without changing its timestamp, and checks that the old claim is withdrawn. It also checks restoration, session isolation, budgets, and zero-character repeat delivery. It does not run Claude or Codex.

Explore or contribute

Useful contributions: a held-out long-session benchmark, independent child-agent working state, richer source anchors, and failure cases where context was fresh but the agent still made the wrong decision. Open an issue with a reproducible case. The project is MIT licensed and welcomes independent replication.

Ver o original no GitHub

Bom para

Relacionados