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

オープン
#193 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
5.6k
フォーク
344
平均マージ
14時間 41分
マージ済み PR(30日)
54

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TokenEconomizer のほかの issue

microsoft/TokenEconomizer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。