logcat-triage
Kiến thức domain + kỹ thuật để phát triển/mở rộng F01 Logcat Analyzer và F02 Bug Analysis. Kích hoạt khi dev làm việc với logcat/bugreport/dmesg/tombstone: parse log, nhận diện crash/ANR, cluster severity, dựng timeline, root-cause, hoặc hỏi "logcat pattern", "regex log", "crash signature", "sao detect ANR", "tối ưu token khi phân tích log lớn". Nhấn mạnh pre-parse LOCAL để tiết kiệm token FCI.
- License 许可
- MIT
- 最近更新
- 2026-07-21
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- logcat-triage
- description
- Kiến thức domain + kỹ thuật để phát triển/mở rộng F01 Logcat Analyzer và F02 Bug Analysis. Kích hoạt khi dev làm việc với logcat/bugreport/dmesg/tombstone: parse log, nhận diện crash/ANR, cluster severity, dựng timeline, root-cause, hoặc hỏi "logcat pattern", "regex log", "crash signature", "sao detect ANR", "tối ưu token khi phân tích log lớn". Nhấn mạnh pre-parse LOCAL để tiết kiệm token FCI.
03 SKILL.md 正文
Logcat Triage — Skill (FAG3CoworkLocal-native, cho F01/F02)
Khi nào dùng
Khi phát triển/sửa parser, analyzer, hoặc prompt cho F01 (Logcat Analyzer) / F02 (Bug Analysis).
Nguyên tắc số 1: pre-parse LOCAL trước, FCI sau
Không đẩy nguyên file 50MB lên FCI. Trình tự:
file → parse (regex, local) → filter >= WARN → cluster theo signature → detect crash
→ CHỈ gửi phần nghi ngờ (top clusters + crash stacks) lên FCI để root-cause
Mục tiêu: token gửi FCI < 20% kích thước file gốc → nhanh + rẻ + là khác biệt so với "paste vào ChatGPT".
Crash signatures cần nhận diện (knowledge/AUTOMOTIVE_REFERENCE.md)
| Dấu hiệu | Loại | Ưu tiên |
|---|---|---|
FATAL EXCEPTION |
java_crash | 🔴 |
ANR in <pkg> |
anr | 🔴 |
*** *** *** ... tombstone |
tombstone | 🔴 |
signal 11 (SIGSEGV) |
native_sigsegv | 🔴 |
WATCHDOG KILLING SYSTEM |
watchdog | 🔴 |
CarNotConnected |
car disconnect | 🟡 |
lowmemorykiller |
OOM | 🟡 |
Kỹ thuật parser
- Format logcat threadtime:
MM-DD HH:MM:SS.mmm PID TID LEVEL TAG: msg+ fallback brief. - Cluster: chuẩn hoá message (bỏ số/hex/địa chỉ) → signature → gom đếm.
- Timeline: giữ mốc thời gian của mỗi sự cố.
Prompt root-cause (F01)
Chỉ dựa dữ liệu đã cluster; output: tóm tắt counts → root cause 5-Why (độ tin cậy) → fix + file/tag. Không bịa.
Sequence diagram (F02)
Tool gen_sequence_diagram sinh mermaid sequenceDiagram; validate cú pháp local trước khi render → fallback text nếu lỗi (never crash live).
Tham chiếu code
src/fag3coworklocal/features/F01_logcat/parser.py·analyze.py·prompts.pylogs/samples/sample_crash.log(case NPE + CarNotConnected + Watchdog)tests/test_logcat_parser.py- Skill bổ trợ:
android-senior-aaos(phân tích bug sâu),fci-integration(routing glm-5.1 cho file lớn).
Checklist
- [ ] Parse đúng ≥3 format mẫu; xử lý empty/non-logcat không crash.
- [ ] Detect crash không false-positive trên log sạch.
- [ ] Token gửi FCI đã được pre-filter.
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.