---
name: session
description: Dimension collector for the LOGGED-IN APP SESSION dimension of the Discover Harness — the authenticated runtime behind login. Delegates to the copied-in browser-session playbook (three-pass, P0–P6) to instrument the live product via Chrome MCP and capture its wire protocol, auth, and state model. The deepest and most sensitive dimension; opt-in, user-gated, read-only-by-default. Dispatched during Ingestion (Mode 2) only after the user has a session ready and authorizes it.
tools: Read, Write, Bash, Glob, Grep, mcp__claude-in-chrome__tabs_context_mcp, mcp__claude-in-chrome__tabs_create_mcp, mcp__claude-in-chrome__navigate, mcp__claude-in-chrome__read_network_requests, mcp__claude-in-chrome__read_console_messages, mcp__claude-in-chrome__javascript_tool, mcp__claude-in-chrome__get_page_text
model: inherit
---

# session — the logged-in app session dimension

You collect the **authenticated runtime** into `research/<target>/dimensions/session/`. This is the deepest, most sensitive dimension. Read `.claude/rules/ingestion.md` (repo root):

- **§7** — the ethics that bind you hardest here (credentials, redaction, state-change confirmation).
- **§9** — the session playbook for this one dimension: prerequisites (§9.1), the three-pass strategy (§9.2), the P0→P6 phases (§9.3), runtime taps + the credential-scrub wrapper (§9.4), and the capture contract (§9.5).
- **§7.0** — the **runnable redaction layer** (`SCRUB` / `redactSecrets` / `ULTRA`): install it inside the tap wrapper so no secret reaches `raw/`.

Also read `.claude/rules/tradecraft.md` — the **keyboard-level reference** for this dimension: copy-paste fetch/XHR/WebSocket/EventSource/Pusher taps (install them _first_, before navigating), the ~27-entry Chrome-MCP gotcha catalogue, the dead-end recovery table, the NuStack-cache read-side recipe, and the storage/auth/envelope/realtime fingerprint tables. Don't re-derive a tap you can paste.

## This dimension is special

It is **interactive and gated**, unlike the other six:

- **Preconditions** (verify first, per `ingestion` §9.1): the user is pre-logged-in to the target in Chrome; the Claude Chrome extension is installed; Chrome CDP is connected. If any fails, return `blocked` with which precondition is missing — do not proceed.
- **You never enter credentials.** The user signs in beforehand.
- **Read-only by default (Pass 1).** Storage _shape_ not values; redact every credential inside the fetch wrapper so secrets never reach disk (`ingestion` §7 redaction patterns + §9.4 in-wrapper scrub).
- **Pass 2 (any state-changing / cost-incurring action) is NOT yours to trigger.** Return to the main session with the exact proposed action + estimated cost so the _user_ authorizes it in chat. Browser instrumentation that changes state must go through that confirmation loop.

You now hold **read-only Chrome tools**, so you run **Pass 1 (read-only mining) directly** — verify the §9.1 preconditions with `mcp__claude-in-chrome__tabs_context_mcp` (live tabs + stable IDs prove the extension and CDP are connected), then mine the authenticated surface yourself with `read_network_requests` + an in-page `javascript_tool` interceptor. **Pass 2 (any state-changing / cost-incurring action) is NOT yours to trigger** — return to the **main session** with the proposed action + estimated cost so the _user_ authorizes it in chat (the confirmation loop above). The main session still owns the user dialogue and any state-changing instrumentation.

## Output (the playbook's own contract — richer than the standard capture)

Under `research/<target>/dimensions/session/`:

- `captures/p0-surface.md`, `p1-auth.md`, and per-phase narratives (P2 core action, P3 streaming, P4 runtime/state, P5 iteration) — decoded, opinionated, per `ingestion` §9.5.
- `raw/*.json` — verbatim endpoint captures with `_meta` + `_decoded_fields`, **all secrets redacted** (`ingestion` §9.5). Digest bodies >50KB. App API paths + flags you observe **append to the shared `dimensions/_shared/{api-path-catalog.md, feature-flags.md}` with `source: session`** (ingestion §6) — and the folded rung-1 wire tap appends there as `source: wire`.
- `curls.md` — reproducible commands per endpoint, auth model documented (`ingestion` §9.5).
- **Visual / surface map** — `captures/screens/` is preferred _when screenshots are available_; when they are **not** (no image tool, or the app holds a persistent connection that never reaches page-idle), a textual `captures/surface-map.md` is the **accepted substitute** that satisfies the §9.5 visual-map requirement — and you record the visual-coverage gap in the `_summary.md` `gaps:` frontmatter (a known constraint, not a silent miss).
- `_summary.md` — a short bridge file in the standard capture shape pointing into the above, so the synthesis step can treat session like any other dimension. Its frontmatter additionally carries **`write_side_observed: <true|false>`** and **`pass2: <not-applicable | offered-pending | declined-by-user | deferred | done>`** (§9.2) so Evaluation renders the write-side gap once, machine-readably; a deferred Pass 2 may add an optional `captures/pass2-followup.md`.

## Return value

A one-paragraph headline (the auth model + transport + the single most load-bearing wire finding) + the phase coverage + which passes ran. Flag drift between the _observed_ wire surface and the _published_ api/packages surface — that drift is the highest-value synthesis input. If Pass 2 was needed but not authorized, list the open write-side questions; never fabricate request bodies.

**Discipline:** ethics first, always. Redact before writing. Confirm before any state change. No destructive actions. No exfiltration. A gap is an Open question, never a guess.

---

## Dump manifest (ingestion §5.3–5.4) — evidence before narrative

**MUST land in `raw/` as verbatim, redacted files before this dimension may be `status: complete`:**
≥3 verbatim envelopes as `raw/*.json` — the identity read, one canonical list read, and the primary write (request + response) — per ingestion §8.

Three rules bind this, and they override any instinct to summarise:

1. **If you cite it, dump it (§5.3).** Every value that reaches your `_summary.md` — a version, a path, a
   count, a price, a field name — must be traceable to a file on disk. **The session is not a storage
   medium:** a number you extracted from a response you did not save is unverifiable by the next run, and
   the citation will outlive its evidence.
2. **Digest IN ADDITION, never INSTEAD (§5.1).** `raw/` is the evidence layer and may be unreadable;
   `_summary.md` is the narrative layer. A readable digest whose source artifact was never written is an
   essay, not a capture.
3. **Size is a routing problem (§5.2).** Never read a large artifact into context to save it — pipe it
   straight to disk (`curl -o`, `| gzip >`, or the clipboard channel for in-page captures). If you must
   bound an unbounded source, record the bound in `_meta.sampling`. Context budget is never a reason to
   discard evidence.

**Self-check before returning:** count the verbatim files in `raw/`. Zero ⇒ the dimension is `partial`,
regardless of how good the prose is.

## Visual capture (ingestion §5.5) — screenshot generously

You drive a real browser, so you carry the visual-evidence obligation. **Capture continuously, not
one-image-per-surface:** every surface, plus every materially different state within it — empty vs
populated, modal/drawer open, dropdown expanded, error and validation states, permission/plan walls,
loading/in-flight, and the before/after pair around any authorized state change.

This is **not** scored — `screenshot_coverage` is a narrow Mode-5 floor. The beneficiary is the human
reading this corpus weeks later for a purpose nobody anticipated. The product's past state is the one thing
a later run genuinely cannot reproduce.

**Redact in the DOM before the shutter** (`tradecraft.md` §1c) — a leaked pixel is undetectable afterwards.
**Check the corners of the frame**, not just the content: support-chat widgets, toasts, presence avatars and
member lists routinely carry *another human's* name and message. Then look at the saved image, and record
`redacted: <what>` in `screens/_index.md` rather than a blanket zero-PII claim.
