Store learned repo state inside the repository (opt-in), so it can be committed and shared across machines

Aperta
#193 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start by locating the code that stores micro-skills facts, tool-pruning counters, and loop-guard state, then trace how it resolves TOKENECONOMIZER_HOME. The issue proposes an opt-in repository directory and separates portable data from private, machine-specific data, but does not name files or tests. Done means portable state can be shared safely, merges by fact id, and the local-only files have a documented .gitignore snippet.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

Everything TokenEconomizer learns about a repository (micro-skills facts, tool-pruning counters, loop-guard state) is stored under ~/.tokeneconomizer (or $TOKENECONOMIZER_HOME), outside the repository. It cannot be committed, reviewed, shared with teammates, or follow the repo to another machine. Anyone who works on the same repo from several PCs, or in a team, has to re-learn the same facts from scratch on each one, which is the cost the tool exists to reduce.

Request

Support an opt-in, per-repository state directory, for example <repo>/.tokeneconomizer/:

  • A setting (or auto-detection when that directory already exists) that makes the learned, repo-specific data live inside the repository instead of the user home.
  • Keep machine-specific and private data (errors.log, session transcripts, cost ledgers, absolute paths) in the home directory, and put only portable data (confirmed facts, pruned-tool list, thresholds) in the repo, in a diff-friendly format (JSON or Markdown, stable key order, no absolute paths).
  • Make it safe to commit: no secrets or transcript excerpts, and a documented .gitignore snippet for the parts that should stay local.
  • Merge-friendly: facts keyed by id so concurrent updates from two machines merge cleanly in git.

Why TOKENECONOMIZER_HOME is not enough

It is one global directory per user, not per repository, and it has to be an absolute path, so it cannot be set in a committed .claude/settings.json and work for different users or machines.

Context

Seen with the Claude Code plugin on Windows, where the same repo is used from several machines with different user names.

Lingua principale
Python
Stelle
5.6k
Fork
344
Merge medio
14h 41m
PR unite (30g)
54

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/TokenEconomizer

Tutte le issue di microsoft/TokenEconomizer

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.