Move the audit-sessions epoch, positive-int and store-dir helpers into census.py

Đang mở Phù hợp với người mới
#15,539 5 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, shell
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu với plugins/session-flow/skills/audit-sessions/scripts/census.py, sau đó kiểm tra các định nghĩa helper được nêu và những vị trí gọi chúng trong collect.py, friction_scan.py, sweep.py và audit-friction/scripts/friction.py. Giữ nguyên tên kiểu argparse dùng chung là _positive để nội dung lỗi CLI không thay đổi, đồng thời giữ nguyên census.store_dir. Công việc hoàn tất khi mỗi helper chỉ xuất hiện một lần trong census.py, các script sử dụng chúng, những import không dùng đến được xóa và đoạn patch được yêu cầu được thêm vào.

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

Mô tả

Agent Brief

Type: Task
Summary: Move the audit-sessions epoch and positive-int helpers into census.py and drop the duplicate store_dir (part of restructuring pass #14802).

Current behavior:

  • _epoch is defined three times: plugins/session-flow/skills/audit-sessions/scripts/collect.py:183-190, friction_scan.py:85-92 and sweep.py:595-602.
  • The argparse type _positive is defined three times: collect.py:1010-1014, sweep.py:699-703 and plugins/session-flow/skills/audit-friction/scripts/friction.py:614-618.
  • store_dir is defined in census.py:69-70 and again in collect.py:167-168.

All four scripts already import census.

Desired behavior:
census.py holds one epoch helper and one positive-int argparse type, and the four scripts call them in place of their copies. collect.py calls census.store_dir and its own store_dir is deleted. Imports left unused are dropped.

Files:

  • plugins/session-flow/skills/audit-sessions/scripts/census.py
  • plugins/session-flow/skills/audit-sessions/scripts/collect.py
  • plugins/session-flow/skills/audit-sessions/scripts/friction_scan.py
  • plugins/session-flow/skills/audit-sessions/scripts/sweep.py
  • plugins/session-flow/skills/audit-friction/scripts/friction.py
  • a new patch fragment in .changes/session-flow/: ### Changed, "Internal restructuring, no behavior change."

Key interfaces:

  • argparse names the type function in its error for a non-integer value (invalid _positive value: 'abc'), so the shared type's __name__ stays _positive and every CLI's error text stays byte-identical.
  • census.store_dir is unchanged.

Acceptance criteria:

  • The epoch helper, the positive-int type and store_dir each exist once, in census.py, and the four scripts use them.
  • Behavior is unchanged: the same outputs, exit codes and printed results for the same inputs, including argparse errors.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • scripts/run-ruff.sh check passes on the changed files.
  • The pytest suites in audit-sessions/scripts/tests/ and audit-friction/scripts/, and audit-friction.test.sh, pass.
  • ci-status is green.

Out of scope:

  • Other session-flow helpers, other duplication, eval cases, fixtures, and skill and agent text.
Ngôn ngữ chính
Shell
Star
22
Fork
2
Merge trung bình
1 giờ 18 phút
Pull request đã merge (30 ngày)
975

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

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 melodic-software/claude-code-plugins

Tất cả issue của melodic-software/claude-code-plugins

Issue tương tự

Thêm issue về Shell/Bash

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.