# DATA-MAP.md — how an agent traverses this person's local record

You are an agent with READ access to the `.data/` directory of a Polymath installation.
This map tells you what lives where, what the artifacts mean, and how to answer questions
by going to the source. TRUST THE FILESYSTEM OVER THIS MAP — layouts evolve; `ls`/Glob a
directory before assuming its contents. Everything is local; nothing you read may be sent
anywhere, and third parties are referred to by their initials in your replies.

## The two corpora

1. **Life corpus** — the person's imported chat history (ChatGPT, claude.ai), notes
   (Obsidian, Apple Notes), and the analysis the engine built from them.
2. **Coding corpus** — their Claude Code / Codex session logs and the deterministic +
   graded analysis built from those.

When BOTH exist, the strongest answers cross-reference them: a rule declared in the notes
can be checked against measured coding behavior; a life event can explain a low-output
week. Prefer cross-corpus receipts when the question allows it.

## Life corpus layout

- `.data/signals/index.jsonl` — one JSON per signal. Fields: `docId`, `date` (ISO,
  the field is `date`, NOT `ts`), `source` (`chatgpt` | `claude` | `obsidian` |
  `apple-notes`), `title` (an LLM one-line summary — semantically rich, safe to scan in
  bulk), `paragraph` (a longer summary), `evidence`, `userChars`, `userMessages`.
  THIS IS YOUR PRIMARY INDEX for the life corpus: grep it by date range, theme keywords,
  or source before reading anything heavier. Caveats: notes without dates in their path
  cluster on their import date (a huge one-day spike is an import artifact, not activity);
  a title "touching" a theme is an upper bound, not proof of deliberation.
- `.data/signals/timeline.json` — the same signals arranged as a timeline.
- `.data/sources/…` — raw imported conversation content (large). Only dip in when a
  specific conversation matters; quote at most a line or two.
- `grades/<lens>/_person.json` (under `.data/`, engine output) — the person-level
  aggregation per lens (ocean, agency, reasoning, growth, interpersonal…): facet scores
  with reasoning. `grades/<lens>/*.allfacets.json` — per-conversation grades: score or
  null per facet plus verbatim receipt quotes. A facet with ~0 direct grades while its
  siblings have many means coverage failed, not that the person lacks the trait.
- `growth-latest.json` / analysis agents' outputs — growth axes (used-to → now milestone
  timelines anchored on the person's deliberate moves), drivers, circumstances.

## Coding corpus layout (`.data/coding/`)

- `sessions.json` — every session: title, times, `activeMin`, `durationMin`, `humanTurns`,
  tool counts, `klass` (only `interactive` sessions are the person; the rest are machine
  runs), `duplicateOf` (fork copies — skip them or you double-count).
- `focus.json` — the flow analysis: per-day half-hour cells (`S` in-flow / `N` nudging /
  `G` away), steering runs, run-end boundaries with the person's next messages, gaps,
  false starts, semantic `features` (LLM-clustered workstreams with day maps and flow
  share), and `llm` (causal findings, triggers in/out, priority verdicts, leverage,
  a personalized CLAUDE.md snippet). Flow definition: typed-message gaps ≤6 min sustained
  ≥20 min; supervision is "nudging", never flow.
- `flow.json` — the older, looser engaged-time metric (5-min gap tolerance). The report
  calls this "engaged time", NOT flow. Do not conflate the two.
- `day-chart.json` — per day, each conversation's active intervals (timestamps).
- `grades/*.json` — per-session grades against the coding rubric: per criterion a score
  on the 1–11 ladder, the keyed instance, why, and verbatim quotes. 6 is strong-normal;
  10–11 are frontier outliers. Scores across different `rubricVersion` values are not
  comparable.
- `aggregate.json` (ability ceilings + `bigPicture` nutshell), `expertise.json` (domain
  knowledge map), `gap.json` (ranked technique recommendations), `frontier.json`,
  `delegation-rollup.json`, `projects.json`, `concurrency.json` — each self-describing;
  read the file before citing it.

## Raw Claude Code session JSONL (only if an artifact can't answer)

`~/.claude/projects/<project>/<sessionId>.jsonl`. If you must read one: only `type:"user"`
entries are candidate person-text, and you MUST skip `isMeta:true`, injected blocks
(`<task-notification>`, command wrappers, system reminders), compact-continuation
summaries, and "[Request interrupted…]" markers; fork copies duplicate whole transcripts
(dedupe by timestamp+text). Prefer the artifacts — they already did this correctly.

## What the gradations mean

Engine facets and coding criteria use a 1–11 ladder where each rung has concrete
requirements (the rubric text in your context is the authority). "Top X%" bands come from
a single calibration source; do not invent percentile mappings. Confidence markers
("tentative") mean thin evidence, and honesty about that beats a confident guess.

## Traversal recipes

- "How often do I X / when did I last X" → grep `signals/index.jsonl` titles by keyword +
  date; count by month; report the shape (spans, spikes, gaps) with dates.
- "Why did I get this score" → the grades file for that criterion/facet: rung, keyed
  instance, verbatim quote. Name the session/conversation and date.
- "What was I doing on <date>" → signals index for that date (all sources) +
  `day-chart.json` + `focus.json` day cells. Coding-log silence usually means selling,
  deciding, or living, not idleness — say so when the coding record is empty but the
  life corpus isn't.
- "Did my habit/rule actually happen" → find declarations in the life corpus, then check
  the MEASURED coding artifacts (start times, flow, features) for execution. Declared vs
  measured is the highest-value answer shape this dataset supports.
- Anything about loops → count recurrences across months in the index; three receipts or
  it isn't a pattern; one is noise.

## Traversal budget

You have a hard turn limit. Budget 2-4 lookups per question: one Glob/ls to orient (only
if needed), one or two Greps on an index, one Read of the specific artifact. Then ANSWER.
If you have not found the receipt after 4 lookups, answer with what you have and say what
you could not find. Running out of turns mid-traversal means the person gets nothing.

## Answer rules

- Receipts on every claim: dates, counts, short quotes (≤2 lines). Never fabricate a
  file, score, session, or quote. If a lookup comes up empty, say "insufficient data".
- Plain speech, at most one number per sentence, verdicts not questions, no em dashes.
- Patterns, never psychology: describe what the record shows; the person decides meaning.
- Be honest about instrument limits: logs under-observe a life. Absence in one corpus is
  not absence in the life; check the other corpus before concluding.
