module-regression
Skill này làm gì
Giúp đảm bảo rằng thay đổi ở một phần của dự án lớn không làm hỏng những phần khác. Công cụ ghi lại phần nào phụ thuộc vào phần nào, và cách test để kiểm tra mọi thứ vẫn hoạt động.
Khi nào nên dùng
- ✓Khi bạn thay đổi một phần của dự án lớn và muốn chắc chắn không làm hỏng chỗ khác.
- ✓Khi một lỗi ở một phần của dự án xuất hiện vài ngày sau khi phần khác được thay đổi.
- ✓Khi cần sắp xếp các test phụ thuộc lẫn nhau trong dự án phức tạp.
Liên kết skill
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/module-regression/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra xem thay đổi ở module 'xác thực người dùng' có làm hỏng 'quản lý hồ sơ' không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Nó dùng một tệp tên REGRESSION.md để liệt kê các phụ thuộc giữa các phần của dự án. Sau mỗi thay đổi, nó chạy test cho các phần bị ảnh hưởng để xem có gì bị lỗi không.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Module Regression Ledger
When to Activate
- The repository has at least three interdependent modules, or a previous change to A has broken B.
- A change modifies a module's externally observable behavior and must prove both that module and downstream consumers still work.
- The project already has executable tests or reconciliation commands that should be organized by dependency.
Anti-Patterns
- Creating a regression ledger for a small repository with no cross-module dependencies.
- Guessing dependencies manually or treating one scan as permanent truth.
- Replacing executable acceptance-command exit codes with model review.
Related Skills
test-collaboration: TEST-IDs, test assets, and defect-regression evidence.ai-regression-testing: executable regression tests derived from important defects.contract-first: cross-service or cross-client contract verification.change-impact: pre- and post-implementation blast-radius analysis.
Problem
In large projects, modules depend on one another. People and agents often verify only the changed module while downstream consumers fail silently. The defect appears days later when an aggregate, export, or external behavior is wrong.
The remedy is a regression ledger (REGRESSION.md) plus a deterministic audit: after any relevant change, run the changed module and all affected downstream consumers. Delivery requires every command to pass.
Three Required Fields per Module
## Module 03 — Shop Data Cleaning
Downstream consumers: 05-aggregation, 07-final-export
Dependency evidence: `<repository dependency graph or reproducible scan command>`
Regression acceptance command: `pytest tests/test_03.py && python scripts/reconcile.py --module 03`
Propagation rule: external behavior change → run 05 and 07; internal-only change with a green module check → downstream may be exempted
- Downstream consumers — derive them from the repository's dependency graph, build tooling, or a reproducible import/call scan, and record the command or tool. Extraction differs by ecosystem; this skill does not pretend a universal scanner can parse every language. Mark edges
unverifiedwhen they cannot be established mechanically. An affected unverified edge blocks an all-green verdict until a human confirms its scope or the related module is included in the run. - Regression acceptance command — the ledger's core asset. Each module needs an executable command that proves it still works: tests, reconciliation scripts, or golden-sample diffs. Without it, the audit collapses into “the model looked and found no problem.”
- Propagation rule — state which downstream modules must run after a change and when an exemption is justified.
Connection to TESTS.md
REGRESSION.md does not maintain business rules or test gaps. It references stable TEST-IDs from the test-registry artifact:
Related test points: TEST-ORDER-001, TEST-REFUND-003
- What rules must be protected, their coverage state, and the evidence location belong to
test-collaborationand the test registry. - Which modules and commands must rerun after a change belong to this skill and the regression ledger.
- The current session plans the ledger commands. Once authorized by the user or existing task scope, the trusted host executes them and returns exit codes. This skill adds no dedicated agent or slash command.
Ledger Discipline
- Prefer reconciliation-style acceptance commands over assertion-only checks. External facts such as golden samples, upstream totals, and accounting relationships are harder to weaken accidentally than mocks or loose assertions.
- Refresh downstream lists only from reproducible evidence. When dependencies change, rerun the recorded repository tool or scan; do not hand-edit an edge without evidence.
- Keep the ledger at the repository root or under
docs/, and link it from the project's instruction/map artifact so it does not become an orphan.
Audit Flow
Invoke module-regression through the host's skill entry point, such as $module-regression in Codex. The current session plans and reports the audit. Repository commands run through the trusted host runner within existing user authorization; ask only when a command needs new authority. Successful exit codes are regression evidence, never canonical ECC completion or integration authority.
…
Câu hỏi thường gặp
'Regression ledger' là gì?
Đây là một bản ghi (như sổ cái) ghi lại phần nào của dự án phụ thuộc vào phần nào, và cần chạy lệnh nào để kiểm tra mọi thứ vẫn hoạt động sau một thay đổi.
Tại sao không thể chỉ test phần vừa thay đổi?
Trong dự án lớn, thay đổi một phần có thể ảnh hưởng đến các phần khác không được test trực tiếp. Sổ ghi chép đảm bảo mọi phần bị ảnh hưởng đều được kiểm tra.
Điều gì xảy ra nếu một test thất bại?
Nếu test của các phần bị ảnh hưởng thất bại, nghĩa là thay đổi đã gây ra vấn đề (hồi quy), và thay đổi đó không nên được chấp nhận cho đến khi lỗi được sửa.
Chi tiết
Mô tả gốc của tác giả
Govern cross-module regression in large repositories with a REGRESSION.md ledger that records each module's downstream consumers and executable acceptance command. After a change, run the changed module and every affected downstream command, and use observed exit codes as regression evidence under the project's delivery policy. Use for module regression, regression ledgers, impact audits, downstre
repo: affaan-m/ECC
Độ phổ biến
- Sao GitHub
- 280k
- Vị trí xếp hạng
- #210
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
accessibility
280kGiúp agent của bạn tạo giao diện mà ai cũng dùng được, đảm bảo website và app hoạt động tốt với người khuyết tật như người mù hoặc khó vận động.
agent-architecture-audit
280kGiúp agent của bạn kiểm tra xem mọi thứ có hoạt động đúng không, đồng thời tìm và sửa các lỗi trong hệ thống AI để chúng chạy như mong đợi.
agent-eval
280kGiúp agent của bạn so sánh các công cụ lập trình AI khác nhau, đo xem công cụ nào nhanh hơn, rẻ hơn và đáng tin cậy hơn cho từng tác vụ.
agent-harness-construction
280kGiúp agent của bạn hiểu rõ hơn cách thực hiện tác vụ, tối ưu các công cụ và chỉ dẫn mà agent dùng để tăng khả năng thành công.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.