commit-gate-guard
Thực thi Commit/Push Gate của FAG3CoworkLocal — AI KHÔNG tự commit/push. Kích hoạt khi dev nói "commit", "push", "lên git", "xong rồi đẩy code", "tạo PR", hoặc khi vừa hoàn tất + test một feature/task. Ép quy trình: self-review → chạy test → tóm tắt diff → HỎI dev xác nhận → mới commit (Conventional Commits) + push. Test FAIL hoặc dev chưa đồng ý → dừng, không commit.
- License 许可
- MIT
- 最近更新
- 2026-07-21
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- commit-gate-guard
- description
- Thực thi Commit/Push Gate của FAG3CoworkLocal — AI KHÔNG tự commit/push. Kích hoạt khi dev nói "commit", "push", "lên git", "xong rồi đẩy code", "tạo PR", hoặc khi vừa hoàn tất + test một feature/task. Ép quy trình: self-review → chạy test → tóm tắt diff → HỎI dev xác nhận → mới commit (Conventional Commits) + push. Test FAIL hoặc dev chưa đồng ý → dừng, không commit.
03 SKILL.md 正文
Commit Gate Guard — Skill (FAG3CoworkLocal-native)
Khi nào dùng
Mỗi khi sắp commit/push, hoặc vừa hoàn tất một task/feature. Đây là luật quan trọng nhất dự án (AGENTS.md §5, rules/REVIEW_AND_COMMIT_RULES.md).
Quy trình Gate (bắt buộc)
1. Self-review (skill automotive-code-review + rules/REVIEW_AND_COMMIT_RULES.md §3)
2. Chạy test (unit + manual theo Acceptance của task card)
├─ FAIL → sửa, KHÔNG commit. Quay lại B1.
└─ PASS → B3
3. Tóm tắt cho developer:
• Đã đổi file gì (diff summary)
• Test nào PASS + cách test
• Rủi ro / ảnh hưởng feature khác
4. HỎI rõ: "Đã test PASS. Bạn xác nhận cho commit + push lên feature/Fxx-… không?"
5. Dev trả lời:
├─ CHƯA / KHÔNG → dừng, giữ nguyên working tree
└─ ĐỒNG Ý → git add → git commit → git push
Commit message (Conventional Commits, giải thích WHY)
feat(F01): add severity clustering for logcat lines
fix(F03): handle CarNotConnectedException in generated stub
Types: feat | fix | docs | refactor | test | chore | perf.
Nhánh
feature/Fxx-short-name → PR vào dev (≥1 review) → chỉ ToanTV merge vào main (sau khi chạy demo flow).
Sau khi push
Cập nhật docs/DEVELOPMENT_LOG.md (1 dòng) + tick docs/TASK_BOARD.md.
Tuyệt đối KHÔNG
- Tự động commit/push khi chưa hỏi.
- Commit khi test FAIL hoặc còn nghi ngờ.
- Commit secret (.env). Lỡ commit → báo ToanTV + rotate key ngay.
Tham chiếu
rules/REVIEW_AND_COMMIT_RULES.md·rules/GIT_RULES.md·rules/PR_CHECKLIST.md·AGENTS.md §5.
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-shape
Writing, exploit — shape raw material into an article, paragraph by paragraph.
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
writing-great-skills
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
writing-fragments
Writing, explore — mine raw fragments, no structure yet.
writing-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.