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

Đang mở
#193 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
5.6k
Fork
344
Merge trung bình
14 giờ 41 phút
Pull request đã merge (30 ngày)
54

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/TokenEconomizer

Tất cả issue của microsoft/TokenEconomizer

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.