Skip to main content

suken-cite

Mỗi khẳng định đều kèm ảnh chụp nguồn của nó. suken-cite giúp một LLM agent (như Claude Code) trả lời bằng một tuyến truyện ngắn, trong đó mỗi bước có một link 📷 dẫn tới ảnh chụp nguồn:

  • Trường hợp chung (trang web, PDF, Word .docx, CSV, file chữ): nguồn được hiện giống bản gốc, đoạn trích khoanh đỏ, bên dưới là một dòng dịch. Truyện được vẽ trên khung UI có sẵn — trục thời gian hoặc chuỗi nhân quả, cùng các khung so sánh, mâu thuẫn, trạng thái, chỗ hổng… — thay cho đoạn văn; người đọc nhận một link và đi từng bước bằng ◀ ▶.
  • Giải thích code: thẻ giải thích gom vị trí trong flow, class, hàm, thư viện, biến và giá trị thật lúc chạy, thể hiện bằng màu, icon và sơ đồ thay cho chữ. Nhiều hàm gọi nhau thì đi từng bước bằng ◀ ▶.

Agent chụp ảnh bằng chrome-devtools. Người đọc chỉ cần bấm link.

Dùng thế nào

Cài gói, rồi bảo agent đọc hướng dẫn và làm theo:

pip install suken-cite
suken-cite usage        # hướng dẫn chung: tuyến truyện + trích dẫn khoanh đỏ
suken-cite usage code   # hướng dẫn giải thích code: 1 thẻ cho 1 dòng code, tuyến truyện + thẻ cho cả flow

Hai hướng dẫn viết cho LLM agent, cùng một khung: luật vàng, checklist, review. suken-cite --help chỉ agent chọn đúng hướng dẫn. Agent tự cài reviewer, tự dựng trích dẫn, tự chụp ảnh, và chỉ giao kết quả khi reviewer chấm ĐẠT.

Các lệnh

Lệnh Làm gì
suken-cite usage [code|renderer] in hướng dẫn: chung / giải thích code / tự làm renderer cho loại file khác
suken-cite install-agent cài 2 subagent reviewer vào .claude/agents/: suken-story-review (truyện chung) và suken-code-review (truyện giải thích code)
suken-cite init --dir ./cites tạo thư mục dự án trích dẫn
suken-cite serve --dir ./cites bật server để xem ảnh (mặc định cổng 8123)
suken-cite snapshot <url> --id <id> lưu bản sao trang web, dùng Chrome đã đăng nhập; thêm --tab để lưu đúng tab đang mở (đã bấm mở rộng, đã cuộn)
suken-cite register --id <id> --file … --url … ghi nguồn gốc của file (SharePoint, email đính kèm…)
suken-cite text --file … | --doc … in chữ của nguồn để chép đoạn trích nguyên văn
suken-cite skeleton --file … --lines … thẻ giải thích code: in khung JSON đã điền sẵn class, hàm kèm tham số, biến của các dòng code (Python); agent chỉ điền ý nghĩa và giá trị
suken-cite add … thêm trích dẫn: --lines / --rows / --page + --quote / --doc, hoặc thẻ code --explain <json> — thẻ code còn thiếu mục nào thì add từ chối và nói rõ thiếu gì
suken-cite story --template timeline|argument in khung truyện trống; điền xong thì story --id … --json … kiểm và lưu — còn thiếu trường hay chữ quá dài thì từ chối và nói rõ ô nào
suken-cite urls in link trang cần chụp và link cho người đọc
suken-cite check kiểm mọi trích dẫn, mọi truyện và báo ảnh còn thiếu

Ví dụ một trích dẫn:

suken-cite init --dir ./cites
suken-cite serve --dir ./cites &
suken-cite add --dir ./cites --id price --file prices.csv --rows 3 --vi "Lê giá 2,40 mỗi kg."
# trang cần chụp     : http://127.0.0.1:8123/render/csv.html?cite=price
# lưu ảnh vào        : ./cites/shots/price.png
# link cho người đọc : http://127.0.0.1:8123/c.html?id=price

Yêu cầu

  • Python 3.9+ (không cần thư viện Python nào khác; phần chạy trên trình duyệt đã đóng gói sẵn).
  • Chrome, và Claude Code có MCP server chrome-devtools để chụp ảnh.
  • Trang web: Chrome đó phải mở cổng DevTools; SingleFile CLI được tự tải ở lần dùng đầu.
  • Linux hoặc macOS.

Giấy phép

MIT. Các thư viện trình duyệt đi kèm và giấy phép của chúng nằm trong THIRD_PARTY_NOTICES.md.

Metadata

Release files for suken-cite 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suken-cite 0.1.14
File Size Uploaded Provenance Actions
suken_cite-0.1.14.tar.gz 776.1 kB Without provenance Details for suken_cite-0.1.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for suken-cite 0.1.14
File Interpreter ABI Platform Actions
suken_cite-0.1.14-py3-none-any.whl Python 3 none any Details for suken_cite-0.1.14-py3-none-any.whl

Total release size: 1.6 MB

Release files / suken_cite-0.1.14.tar.gz

Download URL suken_cite-0.1.14.tar.gz
Size 776.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6c3e16129b942634ce3362184e431eb3e479c306b12b9fd3b64a98367f853ea5
BLAKE2b-256 checksum
How to use checksums
7e95447ea38ad626dea296b47932534d2491f0199a3b07a9fa188fbe3462657d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / suken_cite-0.1.14-py3-none-any.whl

Download URL suken_cite-0.1.14-py3-none-any.whl
Size 792.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d6d7269a4660b4138dbcaca621d793afca3a60ad5cb258bb52c29624b71177e
BLAKE2b-256 checksum
How to use checksums
de8d2fe587b916c49242b022fb5b3ce3e32115139c239ac5b28bab29c3424f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for suken-cite 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page