Commit 511f5693 authored by Vacaliuc, Bogdan's avatar Vacaliuc, Bogdan
Browse files

slides/PLAN_2026-04-21: context-survival plan for the revision pass



Checkpoint document for the 2026-04-21 review feedback from the
scientists on the pre-hack-a-thon deck.  Captures:

- the no-fabricated-reflectivity rule (now in global CLAUDE.md)
- ref_core as the agreed canonical name (formerly mr_core)
- threshold vs stretch messaging, two-instrument emphasis
- per-slide disposition (edit/cut/archive/new)
- environment notes (which pixi envs work, which IPTS has live data)
- execution order for the revisions

Written so any future session that resumes after context compaction
can pick up exactly where this one left off.

Co-Authored-By: default avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent 674a42ea
Loading
Loading
Loading
Loading
+130 −0
Original line number Diff line number Diff line
# Pre-hack-a-thon slide revision plan — 2026-04-21

**User session:** 2026-04-21 review feedback after scientists saw
the initial 8-slide deck.  This file is a written plan so any future
session (including one that resumes after context compaction) can
pick up where we left off.

**Branch state:** `quicknxsv2-modularization-with-mantid-elaboration`
has been merged back into `quicknxsv2-modularization`; scientists
are reviewing from the latter.  Work should be committed on
`quicknxsv2-modularization-with-mantid-elaboration` unless
instructed otherwise.

## Golden feedback captured to memory

**Never fabricate reflectivity data.**  Added to
`~/.claude/CLAUDE.md` as a `[WHEN: this session produces a
reflectivity / R(Q) plot for a scientific audience]` rule.  Every
R(Q) plot in future slides must come from real reductions or be an
obvious hand-drawn cartoon.

## Naming change

- Everywhere: `mr_core``ref_core`.  Scientists have agreed on
  `ref_core` as the canonical name for the unified back-end.
  Applies to every `.md`, `.svg`, `.py` under
  `plan/quicknxsv2-modularization/`.

## Messaging updates (threshold vs stretch)

**Threshold goal (primary message) for the pre-hack-a-thon slides:**
*Is QuickNXSv2 conducive for refactoring/modularization into "front-end"
UI components and "back-end" reduction via mr_reduction?*  Yes, and
here's what would need to change.

**Stretch goal (secondary, aspirational):** unified `reduce()`
contract · equivalence test harness · actual code extraction.
Present these only when asked or when Day-1 discussion warrants.

**Two-instrument message:** the modularization must be done in a
way that will support *two instruments* (MR + LR) even if the
hackathon only works on one at a time.  The `ref_core` name reflects
this.

## Slide-by-slide disposition

| # | Title | Action |
|---:|---|---|
| 1 | Current vs ideal coupling | **Edit** — drop `lr_reduction (sibling)` box from TODAY side; label every arrow "Calls"; reduce density |
| 2 | API mapping | **Edit** — clarify `lr_reduction` means `next` branch (mantid-centric), NOT `new_workflow`; remove `new_workflow` references |
| 3 | 5 silent defaults | **Simplify** — keep Parameter / quicknxs / mr_reduction cols; replace physics/observable with icons; fix ErrorWeighted text per feedback |
| 3a–3e | Detail slides per parameter | **New** — one detail slide each for ErrorWeightedBackground, CropFirstAndLastPoints, RoundUpPixel, AcceptNullReflectivity, UseSANGLE |
| 4 | Curves disagree | **Rewrite** — real reductions only (no synthetic); demonstrate CropFirstAndLastPoints, ErrorWeightedBackground, RoundUpPixel; remove post-hoc scaling claim (it's wrong) |
| 5 | Peak drag sequence | **Edit** — move item 9 below item 8; indicate UI locked between 2 and 9 |
| 5a | Debt accumulation detail | **New** — extract the "where debt accumulates" bottom banner into its own slide for legibility |
| 6 | reduce() contract | **CUT** — discussion material for hack-a-thon, not pre-meeting |
| 7 | Debt triage matrix | **HIDE** (keep SVG but don't present) + **convert to .md table** in knowledge base |
| 8 | Equivalence harness | **HIDE** (keep SVG but don't present) — Day 4/5 material |
| NEW | Opening slide | **New** — "Battle of the Robots" theme; incorporate Rockem-Sockem-Robots imagery |
| NEW | Closing slide | **New** — playful tone, image-generated graphic reiterating threshold goals |

## Other artifacts

- **01-repo-structure.md** — add 4 live links (quicknxsv2,
  mr_reduction, lr_reduction, quicknxsv1:read_event_nexus); make
  assessment authoritative (remove hedging language).
- **Cross-ref doc** — new .md explaining mr_reduction ↔ lr_reduction
  (mantid-centric) relationship; keep `lr_reduction:new_workflow`
  and quicknxsv1 out of that discussion per user's wish to avoid
  muddling the message pre-hackathon.
- **Debt triage .md** — tabular format of the scatter plot data.
- **Every slide ships with an .md or .py** generator so content can
  be edited without SVG surgery.
- **PPTX packaging** — collect every live slide into a
  `Hack-A-Thon-Scientist-Assessment.pptx` file.

## Execution order (highest-fidelity → highest-risk last)

1. **Setup** (this doc committed + todo list + environments verified)
2. **Infrastructure text-only edits** — one commit:
   - rename `mr_core``ref_core` everywhere (sed-style)
   - update 01-repo-structure.md (links + authoritative tone)
   - create debt-triage.md from slide 7 content
   - create mr_lr_cross_reference.md (functional pairs, mantid-centric only)
3. **Slide 1 edits** — simplify, label arrows, drop lr_reduction box
4. **Slide 2 edits** — clarify lr_reduction identity
5. **Slide 3 simplification + 5 parameter detail slides**
6. **Slide 5 edits + debt accumulation detail slide**
7. **Slide 4 rewrite (real reductions)** — hardest; could delegate
   data-finding to an Agent.  Requires:
   - Run `mr_reduction.ReductionProcess.reduce()` on a real REF_M run
     via session-3 pixi env
   - Run the same reduction through quicknxs's parameter path
   - Overlay with matplotlib, real units, footer with run provenance
   - Find a run + options that exercises `RoundUpPixel` difference
     (requires `ConstantQBinning=True`)
8. **Opening slide** — Rockem-Sockem theme; fetch the Giphy asset or
   draw an equivalent cartoon
9. **Closing slide** — playful graphic reiterating threshold goals
10. **Hide slides 6/7/8** — move to `slides/archive/` (don't delete)
11. **Generate .md companion files for every slide**
12. **Generate PPTX**`python-pptx` via venv; script in `slides/`
13. **Commit in layers; bump parent gitlink at end**

## Environment notes (verified 2026-04-21)

- `/media/ssd2/Projects/Claude/3/quicknxsv2` — pixi env with
  mr_reduction 2.17.0 + Mantid 6.14 + quicknxs.  Works.
- `/media/ssd2/Projects/Claude/3/mr_reduction` — pixi env with
  mr_reduction `next` + Mantid 6.15.  Works.
- `/SNS/REF_M/IPTS-37057/` — recent live IPTS with `nexus/*.nxs.h5`
  plus `shared/autoreduce/*.dat` and `*.ort` outputs already
  computed.  Good baseline.
- Runs 46685–46700 in IPTS-37057 are candidates for slide 4.
- `cairosvg` installed via `uv tool install` (for SVG → PNG).
- matplotlib/numpy installed at `/tmp/slides-venv` (may need
  recreation since /tmp is ephemeral).

## Context management

Working in main session unless a task is open-ended.  Likely Agent
delegations:
- "Find REF_M runs in /SNS/REF_M that would produce a visible
  CropFirstAndLastPoints vs ErrorWeightedBackground difference
  between mr_reduction and quicknxs paths."  — subagent=Explore.
- "Find a REF_M run with valid data where ConstantQBinning=True
  exposes the RoundUpPixel default difference." — subagent=Explore.

If context runs low before finishing, pick up from the checked-off
items in this plan.