architectural-decisions
Skill này làm gì
Skill này giúp AI của bạn giải thích lý do đằng sau cách xây dựng mã của dự án. Dành cho lập trình viên làm việc trong dự án đã lập chỉ mục bằng Repowise và muốn tránh hoàn tác các lựa chọn có chủ đích.
Khi nào nên dùng
- ✓Khi một tác vụ hỏi vì sao một phần mã được xây dựng theo cách cụ thể.
- ✓Khi một thay đổi đề xuất sẽ đổi một mẫu, tái cấu trúc module hoặc so sánh các cách tiếp cận.
- ✓Khi chú thích mã hoặc thông điệp commit chứa các dấu hiệu quyết định như WHY, DECISION hay TRADEOFF.
Liên kết skill
https://github.com/repowise-dev/repowise/blob/main/plugins/codex/skills/architectural-decisions/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
“Vì sao bộ nhớ đệm được thêm vào dịch vụ này? Hãy tìm quyết định đã ghi trước khi đề xuất thay đổi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill hỏi Repowise các quyết định khớp với câu hỏi hoặc file của bạn. Nó trình bày các lý do đã ghi trước mọi thay đổi và cho biết khi chưa có gì được ghi lại.
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.
Architectural Decisions with Repowise
Repowise captures architectural decisions — the why behind how code is built.
get_why has four modes — pick by what you pass:
get_why(query="why is auth using JWT?")— keyword + semantic decision search.get_why(query="src/auth/service.py")— decisions governing that file, plus its origin story and an alignment score (does the file still follow its own ADRs?).get_why(query="why was caching added?", targets=["src/auth/cache.py"])— target-anchored search; decisions touching the targets get boosted.get_why()— the decision-health dashboard.
Decisions are mined from five sources (ADR files, PR and squash-commit bodies,
inline markers, git archaeology, and centrality-bounded code comments). Each
rationale traces to a verbatim source span, stamped exact / fuzzy / unverified.
When no decision exists for a path, get_why falls back to git archaeology so
the call is never empty.
When the user asks "why is X built this way?"
Call get_why(query="X").
When about to make an architectural change
- Call
get_why(query="the specific area you're changing")to find existing decisions that govern that area. - If decisions are found, present them to the user before proceeding — they may not want to contradict an existing architectural choice.
- If no decisions are found, proceed but note that no recorded decision governs this area.
When called with no specific query
Call get_why() with no arguments to get the decision-health dashboard:
- Stale decisions that may no longer apply
- Proposed decisions awaiting confirmation
- Ungoverned hotspots (high-churn files with no recorded decisions)
The same signals surface in the CLI via repowise decision health /
/prompts:repowise-decision, and you can query why mid-task with repowise why /
/prompts:repowise-why (the get_why adapter). repowise decision candidates --format json
lists proposed decisions with what each still needs;
repowise decision confirm <id> --agent <your slug> --evidence <commit|file>
accepts one (see /prompts:repowise-decision).
When a file has decision markers
If you see # WHY:, # DECISION:, # TRADEOFF:, or # ADR: comments in code, call get_context(targets=["that_file.py"]) to see the full decision record with context and affected modules.
Recording new decisions
When you settle an architectural choice yourself (you weighed options and picked one), record it:
repowise decision add --agent <your slug> --title "..." --decision "..." --rationale "<why, and what you rejected>" --affects <path>
Add --evidence-commit <sha> once it is committed. The record lands as a candidate: it never governs until accepted, so recording is safe.
Reviewing candidates
You may review and accept candidates yourself. repowise decision candidates --format json lists each with its blockers. Accept one with repowise decision confirm <id> --agent <your slug>, adding --reason, --scope <path>, --evidence <commit|file|link> or --decision for whatever a blocker names. Dismiss a wrong one with repowise decision dismiss <id> --agent <your slug> --reason ... --yes, fold a duplicate with repowise decision merge <id> <into-id> --agent <your slug> (the target must already be accepted; confirm it first), and retire one with repowise decision deprecate <id> --agent <your slug> --reason .... When an accepted decision is needs_review and still holds, renew it with repowise decision reaffirm <id> --agent <your slug>; confirm is for candidates only. With --format json every review command returns results[], even for one id. Your acceptances are recorded as yours, never a person's. If the repository turned agent acceptance off, the confirm is refused; leave it for a person and mention it.
If the user states a decision, offer to record it the same way without --agent.
Câu hỏi thường gặp
Các quyết định lấy từ đâu?
Từ bản ghi quyết định kiến trúc, thông điệp pull request và commit, dấu hiệu nội tuyến, lịch sử git và một số chú thích mã.
Nếu một file không có quyết định được ghi thì sao?
Skill quay về lịch sử git của file, nên câu trả lời vẫn hữu ích.
Nó có cần dự án Repowise không?
Có. Nó hoạt động trong dự án có thư mục .repowise.
Chi tiết
Mô tả gốc của tác giả
Use when a task asks why code is built a certain way, proposes architectural changes, compares implementation approaches, or mentions decision markers such as WHY, DECISION, TRADEOFF, or ADR in a Repowise-indexed repository.
repo: repowise-dev/repowise
Độ phổ biến
- Sao GitHub
- 8.1k
- Vị trí xếp hạng
- #12570
- Giấy phép
- AGPL-3.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
architectural-decisions
8.1kGiúp agent của bạn tìm hiểu vì sao mã được xây dựng theo một cách nhất định, dựa trên các quyết định đã ghi và lịch sử, trước khi thay đổi kiến trúc.
change-review
8.1kGiúp agent của bạn rà soát pull request hoặc tập thay đổi trước khi hợp nhất, chỉ ra rủi ro, các file bị ảnh hưởng và việc cần làm tiếp.
code-health
8.1kGiúp agent của bạn chấm điểm sức khỏe mã từng file, tìm file rủi ro nhất và chọn việc tái cấu trúc tiếp theo, dựa trên phân tích Repowise.
codebase-exploration
8.1kGiúp agent của bạn hiểu nhanh một dự án lạ bằng cách trả lời cách mã hoạt động, ai gọi cái gì và các phần được xây dựng ở đâu.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.