execution-plan/weeks/week-03-statistical-batch-monitoring/specs.md

execution-plan/weeks/week-03-statistical-batch-monitoring/specs.md · UPDATED 2026-10-01

Week 03 — statistical batch monitoring

13 parts2,524 words 8 checkboxes — tick them, they save to the file

Full learning notebook: explanations, step-by-step challenges, stashes and evidence · NotebookLM export

Status: NOT_STARTED. Calendar dates: not assigned. Owner: Peter Ciancaglini. Planning authority: v5 Part 6 with retained v4 details. Deeper walkthrough: v6 · Week 3 · Golden batch, with statistics. Active project/repository: batchlens.

Programme · Model instructions · Decisions · Resources · v6 walkthrough · Materials: read & watch · Previous week review · Next week

01

01

Outcome and relevance

This week delivers the three concrete artifacts below and the supporting learning/branding/opportunity pack. The scientific or commercial outcome follows the preserved source brief, while the acceptance checks make its evidence testable. The career objective is to turn this work into something a scientist, hiring manager or buyer can inspect.

  • Scientific/build priority: Estimate PCA Hotelling T2 and SPE control limits using only training/calibration normal batches; choose alarm persistence before evaluating faults.
  • Public/profile priority: Draft a golden-batch envelope explanation with measured examples and visible false-alarm limitations.
  • Career/relationship/commercial priority: Prepare a useful technical comment for one founder/peer and keep the connection-ladder stage in the private tracker.
↑ Back to top
02

02

Deeper walkthrough (v6)

Read v6 · Week 3 · Golden batch, with statistics before Monday. It carries this week's v5 brief unchanged and adds the Welcome analogy, Learn it (▶ core and + deeper sources), Run it (repos with a 20-40 minute exercise), the NotebookLM kit and the mentor check below. Standing v6 rules: resource rules, NotebookLM protocol, chapter anatomy. v6 adds depth only; it does not change a goal, gate, output or the 600-minute cap, so this specification still governs execution.

Verified links, exact scopes and durations for this week's reading and watching: materials.md.

Act I · Threads: B, M, BL · Next gate: 4

Where this week sits. - ← From: week 2 PCA on normal batches; week 1 injected fault. - → Feeds: week 4 (hours-to-detection and false-alarm rate), week 8 (technical report "golden batch" section), week 17 (hours-to-detection per model in Paper 2), week 33-35 (batchlens alarms trigger labdocs deviation drafts). - ⟳ Returns in: every Loop Audit (week 29): "how early would you have known?"

Goals. - 🎯 This week: T² and SPE limits computed from data; batchlens monitor --batch 87 alarms on a faulty batch and not on a normal one; CI green. - 🏁 Next milestone: Gate 4. - 🌟 Final: the early-warning headline number that opens founder conversations in archetype A.

Mentor check. "I can explain to a plant manager why their golden batch is not a control limit, and what T² and SPE each catch."

↑ Back to top
03

03

Required inputs and dependency check

↑ Back to top
04

04

Seven-day plan: 600 minutes maximum

The model must turn these into exact physical actions using the observed files and available inputs. Each 90-minute block includes start/stop rituals. All calls, posts, debugging, reading and exercises consume this same capacity.

Day Budget Work and stopping condition
Monday 90 min 🚨 Draw the alarm line. Hook: what should count as abnormal? Do: compute Hotelling T² and SPE limits from normal training batches only, with the NIST formula cited above the code; choose the alarm rule before looking at any fault. Done when: the limits reproduce from one command.
Tuesday 90 min 🌱 The growth curve, for real. Hook: put your week 1 plot next to a textbook curve. Learn (45 min): OpenStax Microbiology ch. 9 growth-curve section only, then draw the curve by hand with lag, log, stationary and death. Done when: you can show which phase Monod explains and which it does not. Then stop studying and continue Monday's limits.
Wednesday 90 min 🎯 Replay and catch the fault. Hook: will your alarm fire on the broken batch? Do: replay batches with timestamped alarms, and compare your limits with the erdogant/pca README. Done when: alarm times and missed cases are saved, with no cherry-picking.
Thursday 90 min 🧭 What PCA really found. Hook: 3Blue1Brown eigenvectors (17 min). Learn: StatQuest bias-variance (7) and linear regression (13), then fit one regression on two IndPenSim variables. Done when: you can explain bias vs variance and read a regression line aloud. ISLP is parked. Last 30 min: founder paper.
Friday 90 min 🛡 Make it trustworthy. Hook: try to break your own pipeline. Do: check leakage and missing channels; one command produces the monitoring report offline. Done when: the smoke run works without network or credentials and the numbers check out.
Saturday 90 min Catch up, then reward. First: finish the earliest unfinished mission (only its Done when). Then the rabbit-hole slot: anything from PARKING or the Deeper list, guilt-free. Done when: no mission from this week is half-open, or it is logged as moved.
Sunday 60 min Show it. 20 min: post the alarm chart catching the fault with three lines (what, how, one honest limitation). 5 min: tick evidence. 20 min: write what was hard and why. 15 min: write next Monday's first action, startable in 2 minutes. Done when: the post is drafted and Monday's action is written.

Each day is one mission: the Hook gets you in, Done when tells you to stop. Study stops at the understanding check. If a piece feels pointless, ask whether Done when needs it: no → skip and log; yes → let AI do the boring part and review it; still stuck → smallest version in 25 minutes.

↑ Back to top
05

05

Learning specification

Biology/domain unit

Source unit: B3 · Microbial growth

Material: OpenStax Microbiology ch. 9, growth-curve section only — openstax.org/details/books/microbiology

Produce: Notes + the growth curve drawn by hand with lag, log, stationary, death

Understanding check: You can connect the log phase to the Monod equation in your simulator

During preparation, write one worked example connected to the week's actual task, one exercise with a separate answer key and five questions. Peter supplies answers; score explanation quality and flag misconceptions in QUESTIONS. Numeric/scientific conclusions require actual data or explicitly synthetic teaching values.

AI/scientific-method unit

Source unit: M3 · Statistical learning I

Material: 3Blue1Brown "Eigenvectors and eigenvalues" + StatQuest bias-variance and linear regression (trimmed 2026-09-29; ISLP is Deeper)

Produce: one regression fitted on two IndPenSim variables

Understanding check: You know bias-variance and can fit and read a regression

Use the prompt pack: P1 explanation ladder, P2 concept-to-project bridge and P3 quiz. Coding practice belongs within the allocated study/build block. Where the source asks for a favorable scientific result, substitute an honest measured comparison as explained below.

Founder/scientist paper

Select one verified founder/scientific-lead paper relevant to this week's domain. Use P11; save the question, method, numerical result with context, data workflow, three author questions and one connection sentence in founder-paper.md. Keep abstract-only access limitations explicit. On source weeks with no study, prioritize the commercial/submission task and log any skipped digest.

↑ Back to top
06

06

Artifact contracts

These filenames are outputs to prepare during this week's execution; this scaffold does not claim they already exist. Drafts and measured results have different states. Technical code/data stay in the canonical project repository and are referenced from these coordinating files.

Artifact Required content / acceptance Primary responsibility
monitoring-protocol.md Estimate PCA Hotelling T2 and SPE control limits using only training/calibration normal batches; choose alarm persistence before evaluating faults. Acceptance: Limit estimator, sample support and nominal alarm policy are reproducible. Model assists; Peter checks and owns the outcome
alarm-examples.csv Implement batch replay with timestamped alarms and compare normal/fault cases selected independently of results. Acceptance: Event timing and undetected cases are retained; no cherry-picked pass rule. Model assists; Peter checks and owns the outcome
verification-report.md Check leakage, missing channels and fake-data reproducibility; prepare a one-command monitoring report. Acceptance: The smoke run works without network or credentials and numerical invariants are checked. Model assists; Peter checks and owns the outcome
study-notes.md Selected exact free resources; bounded lesson/exercise; separate solution; quiz and grading rubric; Peter's answers and gaps when executed Model prepares; Peter learns
founder-paper.md Verified source and P11 digest; authentic question and connection sentence; access limitations Model assists; Peter checks
branding-pack.md Wednesday note, Sunday build log, X adaptation, figure/caption/alt text and the week's special asset; each claim linked to real proof Model drafts; Peter owns voice/public claims
opportunity-actions.md Qualified target/role, source/date, ladder stage, next action, message/interview/proposal draft and actual status Model prepares; Peter owns external relationships
evidence.md Actual paths/URLs, versions, checks/metrics, preparation versus execution state and external receipts when applicable Updated after each deliverable
review.md Checklist, learning assessment, gate status, shortfalls, next actions and carryover Peter and reviewing model

During preparation, future measured tables get column definitions, input requirements and run instructions with PENDING status. During execution, replace pending values only with measured outputs. Do not create realistic-looking fake evidence.

↑ Back to top
07

07

Branding and opportunity execution brief

Branding: Draft a golden-batch envelope explanation with measured examples and visible false-alarm limitations.

Opportunity action: Prepare a useful technical comment for one founder/peer and keep the connection-ladder stage in the private tracker.

Use career asset contracts. Publish at most the agreed cadence; one figure and one supported number or admitted failure can support multiple drafts. In long-form weeks, prepare a 1,500–2,500-word article from existing evidence within the build/buffer allocation. In release/demo weeks, prepare a 60-second script: problem, input, command/action, result, limitation and proof link.

Verify individuals, jobs and affiliations at execution time. The GridX list and v4 company map are research seeds, not current facts. Do not reveal named company weaknesses or employer/client confidential information. Keep drafted/sent/replied/booked/held statuses separate. The planning request alone does not authorize external messages or publication; honor explicit authorization in the execution session.

↑ Back to top
08

08

Quality risks and week-specific constraints

Unfolding a whole batch can leak the future into early warning. Require causal feature availability for every alarm timestamp.

Apply the root scientific evidence contract: provenance; meaningful independent splits; no future-data leakage; baseline comparison; actual denominators/uncertainty; failed cases; human review where required. State whether data are simulated, public experimental, synthetic or partner-provided.

Keep source gates intact, and log scope/time conflicts in review. Missing people, money, access or results must not be replaced with invented evidence. Reduce optional polish first. A specific essential external dependency stays pending while independent preparation continues.

↑ Back to top
09

09

Completion and gate review

This is an enabling week. Its deliverables feed the next scheduled gate: 4. Complete the acceptance checklist below; do not promote reputation from a draft.

  • Monday artifact satisfies: Limit estimator, sample support and nominal alarm policy are reproducible.
  • Wednesday artifact satisfies: Event timing and undetected cases are retained; no cherry-picked pass rule.
  • Friday artifact satisfies: The smoke run works without network or credentials and numerical invariants are checked.
  • Study pack is prepared; Peter's actual learning/quiz result is recorded separately.
  • Branding and opportunity drafts use supported claims and the correct external-action state.
  • Reproduction or document checks are recorded with file/version references.
  • This week's special gate, if any, has real evidence or remains explicitly pending.
  • Review, root progress/log and the next physical action are updated.
↑ Back to top
10

10

Minimum viable week and recovery

Source-preserving minimum: T² limits computed.

Operational first step if stalled: open monitoring-protocol.md, write the required inputs and produce the smallest checkable example in ten minutes. If a more urgent missing gate dependency controls the week, use the source minimum above.

If the full week does not fit, use P14: retain one gate-critical deliverable and one directly supporting study exercise; record what is skipped versus moved. Do not mark the original full gate passed merely because the minimum was completed. After a missed week, reforecast from actual evidence and avoid a second unexamined lost week.

↑ Back to top
11

11

Handoff to the next model

In review, state exactly what exists, what was verified, what Peter can now explain, which external events remain pending, where the canonical code/data live, and the next file/function or draft paragraph to touch. Link each fact to evidence. Carry scientific assumptions, split definitions and rights constraints forward explicitly.

↑ Back to top
12

12

Ready-to-copy model prompt

Prepare Week 03 of this LABLOOP execution plan.
Read execution-plan/specs.md, execution-plan/DECISIONS.md,
execution-plan/GATES.md and
execution-plan/weeks/week-03-statistical-batch-monitoring/specs.md, commitment.md, evidence.md and review.md.
Read prior prerequisite reviews and inspect actual repository/data state.
Use v5 as the governing sequence, the v6 Week 03 chapter
(LABLOOP-Master-Plan-v6.md) as the deeper walkthrough, and v4 only for
retained details.
Produce the full local preparation pack and the exact week-specific files named
in the artifact table. Give me a bounded lesson with exercises/answer key,
daily physical actions, technical runbook or draft, branding drafts and
career/commercial actions. Keep the total to 600 minutes.
Separate prepared artifacts from measured results and my learning completion.
Verify sources and do not invent metrics, citations, papers, people or outcomes.
Do not execute external communications, publication or spending unless the
current session already authorizes the specific action.
Finish by updating evidence/review and TODAY with the next physical action.
↑ Back to top
13

13

Preserved original v5 weekly brief

v6 reproduces this brief unchanged inside v6 · Week 3 · Golden batch, with statistics. The following is source planning text, not a claim of completion. Apply the explicit evidence corrections in this specification and DECISIONS.md.

Week 3 · Golden batch, with statistics

  • Goal: control limits that are statistics, not thresholds.
  • Tue (B3): Microbiology ch. 9. Draw the growth curve.
  • Thu (M3): ISLP ch. 2-3. Redo Lab 3 on IndPenSim.
  • Build: [ ] Mon: Hotelling T² and SPE with limits from the normal batches (NIST ch. 6.5 as reference). Done when limits are computed, not typed. [ ] Wed: batchlens monitor --batch 87 replays a batch and prints alarms with time stamps. Done when a faulty batch alarms and a normal one does not. [ ] Fri: tests for the two commands; make report FAKE=1 works on simulator data. Done when CI is green.
  • Sun: L-Sun: "Golden batch: what 80 normal fermentations look like as one envelope". L-Wed.
  • Only one thing: T² limits computed.
↑ Back to top
⏱ Focus Focus25:00 0 min today