#!/bin/bash
echo "  === thư mục bài học kỹ thuật:"
ls -1t "C:/Claw 2/QC/Bai-hoc-ky-thuat/" 2>/dev/null | head -20 | sed 's/^/    /' || echo "    (chưa có thư mục)"
echo "  === CSDL C — bảng kinh_nghiem:"
PYTHONIOENCODING=utf-8 "C:/Users/admin/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe" -c "
import sqlite3
c = sqlite3.connect('file:C:/Claw-Zalo/CSDLC/CSDLC.db?mode=ro', uri=True)
print('    bảng:', [r[0] for r in c.execute(\"select name from sqlite_master where type='table'\")])
for t in ('kinh_nghiem',):
    try:
        cols = [r[1] for r in c.execute('pragma table_info(%s)' % t)]
        print('    %s cột:' % t, cols)
        print('    tổng dòng:', c.execute('select count(*) from %s' % t).fetchone()[0])
    except Exception as e:
        print('    lỗi', t, e)
"
echo "  === sổ QC: các mục tháng 10 (bóc nhanh để chọn nguồn bài học):"
for f in "Locqc.md" "Tri qc.md"; do
  printf "    %s:\n" "$f"
  grep -o 'CẬP NHẬT ../../2026' "C:/Claw 2/QC/$f" 2>/dev/null | sort -u | tr '\n' ' ' | sed 's/^/      tháng 10: /'
  echo
done
