PTENES
Skip to content
TRACK 1

🪙 Logs Are Gold

Before measuring anything, you need to know where the gold is buried. This path maps where Claude Code conversations live, dissects the anatomy of a JSONL session, and separates the bloat of the gold.

session.jsonl append-only 1 event / line {"type":"user", ...} {"type":"assistant", ...} {"type":"assistant", ...} {"type":"system", ...} message.model the GOLD field
2
Modules
12
Topics
~50 min
Duration
Basic
Level
Track 1 Progress 0%
0 of 0

Track map

Detailed content

1.1 ~25 min

📂 Where Conversations Live and the Anatomy of a Session

The disk, the JSONL format, the anatomy of an event, and the field that distinguishes the models.

What it is:

Each session is one file ~/.claude/projects/<projeto>/<sessão>.jsonl; there are thousands in total.

Why learn:

It's the raw source of everything. Knowing the path is the first step to mining.

Key concepts:

One file per session; one folder per project; no database.

What it is:

It's not a single JSON: each line is an independent JSON object, appended as the conversation progresses.

Why learn:

You read line by line without loading the entire file—and parsing becomes trivial.

Key concepts:

Append-only; one line = one event; resilient to interruptions.

What it is:

Fields like type, message, timestamp, uuid, cwd, gitBranch.

Why learn:

Knowing what each field contains lets you filter, group, and measure.

Key concepts:

type ∈ user/assistant/system/summary; timestamp determines order; cwd/gitBranch provide context.

What it is:

The assistant speaks in blocks: text, thinking, tool_use, tool_result. Claude Code records EACH block on a separate LINE.

Why learn:

It’s the detail that changes everything in the count: “per line” dilutes the signal, so we group by turn.

Key concepts:

One physical turn = one line = one block; multiple blocks make up one logical turn.

What it is:

The field that says which model wrote each turn: claude-fable-5, claude-opus-4-8, claude-haiku-4-5...

Why learn:

It’s what lets you filter by model and separate each model’s corpus.

Key concepts:

Only assistant events have a model; it’s the key to comparing Fable vs. Opus.

What it is:

Physical turn = one line. Logical turn = 1 human prompt up to the next human prompt (everything in between).

Why learn:

Measuring by line dilutes the signal; the logical turn is the unit that reveals the work pace.

Key concepts:

Group by human prompt; count the presence of thinking and tool_use per logical turn.

View Full Version
1.2 ~25 min

⛏️ Fluff vs. Gold — and the Myth of Mineable Reasoning

What to discard, what to keep, why literal thought isn’t there, and the ethics of the corpus.

What it is:

tool_result echoed, full file dumps, command output, attachment blobs (base64), harness accounting (usage, sidechain, isMeta).

Why learn:

It’s most of the file’s size—and almost none of the behavioral signal.

Key concepts:

Fluff = echoed output + opaque bytes; discard it without losing the pace.

What it is:

Your prompts, the assistant’s text, the PRESENCE of reasoning, the sequence of tool_use and the timestamps.

Why learn:

It’s what reveals how each model works—the material for the playbook.

Key concepts:

Gold = decisions + action order + cadence, not output bytes.

What it is:

The thinking comes EMPTY/encrypted in the logs (only the signature). You don't mine literal thoughts.

Why learn:

It’s the course’s honest differentiator: you measure the presence and pace of reasoning, not its content.

Key concepts:

Presence ≠ content; signature proves that reasoning occurred without revealing it.

What it is:

Reasoning presence + tool cadence + action order reveal a model’s work “rhythm.”

Why learn:

That exact pace becomes an injectable playbook rule.

Key concepts:

Pace = think before acting + tool density + read before editing.

What it is:

Debloating reduces a typical session by about 74%—most of it is bloat.

Why learn:

Sets expectations: the signal fits in a small, readable file.

Key concepts:

−74% typical; the remaining gold is what you analyze.

What it is:

The logs contain YOUR code and data; treat the corpus as sensitive and redact it before sharing.

Why learn:

Mining is no excuse to leak secrets; the corpus may contain keys and paths.

Key concepts:

Treat it as personal data; redact secrets; the value is in the rhythm, not the data.

View Full Version