anthropics / anthropics/claude-code

Project session JSONL: 13+ record types, variable type placement, no schema/version marker — request for a documented record-type enum

Đang mở
#92,735 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
documentation enhancement
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

## Summary
We built fail-closed analytics over Claude Code project session files (`~/.claude/projects//.jsonl`; 128 sessions / 7 days in a multi-vendor orchestration). Observations from a tokenized structural specimen (all values replaced with type tokens; key sets and `type` placement preserved exactly):

https://github.com/oguzhanpisgin/ai-session-analytics/tree/main/specimens/claude

## Findings
1. **13+ record types** beyond `user`/`assistant`: `ai-title`, `atis-latch`, `last-prompt`, `queue-operation`, `custom-title`, `mode`, `frame-link`, `bridge-session`, `pr-link`, `artifact-comment-monitor`, `artifact-autoreact-ledger`, `agent-setting`, `attachment` (counts from a 7-day sample in the linked specimen README).
2. **`type` placement varies**: message lines carry `type` mid-object (after `parentUuid`, `isSidechain`, ...), while metadata lines carry it first. Type-first regex parsing silently misses all message lines — micro-benchmark here:
https://github.com/anthropics/claude-code — see benchmarks/claude-record-mix in the analytics repo above (2/4 lines recognized on a 4-line file).
3. **No schema/version marker** anywhere in the file.

## Request
A **documented, versioned record-type enum** for the project JSONL format (type names + key sets + placement rules, with a version field). This would let third-party analytics detect format evolution instead of silently mis-parsing.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with the linked specimens/claude README and the claude-record-mix benchmark to verify the listed record types, key sets, and type placement. Then locate the project session JSONL documentation in Claude Code and determine where a version field and record-type enum could be documented. Done means the format has a documented version, complete record-type coverage, key sets, and placement rules.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
json
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.