execution-plan/weeks/week-01-fermentation-simulator/specs.md

execution-plan/weeks/week-01-fermentation-simulator/specs.md Β· UPDATED 2026-10-01

Week 01 β€” fermentation simulator

13 parts2,664 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 1 Β· A tank in 80 lines. 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: Implement X/S/P/DO balances, feed and volume terms, named parameters and units; document the scope of the simplified simulator.
  • Public/profile priority: Draft one simulation plot post and a brief explanation of the measurement-to-decision loop.
  • Career/relationship/commercial priority: Digest one verified Michroma or Levya author paper; save a question about measurement workflows and one potential feedback contact.
↑ Back to top
02

02

Deeper walkthrough (v6)

Read v6 Β· Week 1 Β· A tank in 80 lines 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 0 cockpit and batchlens repo. - β†’ Feeds: week 2 (you will recognise X, S, P and DO in 100 real batches), week 3 (your fake fault becomes the first thing your alarms must catch), week 9-11 (the same equations reappear as mass balances in NPTEL), week 12 (your Monod model becomes the "mechanistic half" of the hybrid model), week 17 (Paper 2 learning curves). - ⟳ Returns in: week 12 and Paper 2. The 80 lines you write this week are literally the physics inside Paper 2's hybrid model.

Goals. - 🎯 This week: a simulator that shows lag, log and stationary phases, streamed live, plus 20 seeded batches with one labelled fault. - 🏁 Next milestone: Gate 4 (batchlens v0.1 with DOI). - 🌟 Final: Paper 2 and JOSS: a hybrid soft sensor whose mechanistic core is the model you start today.

Mentor check. "I can draw the growth curve, point at each phase, and show the line of code that creates it."

↑ 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 🎯 Make the tank grow. Hook (5 min): watch the LearnChemE Monod video and sketch the curve you expect. Do: build monod.py from the SciPy solve_ivp example with X, S, P, DO, feed and volume; every parameter named with its unit (let AI draft the skeleton, you name and check every term). Done when: one plot shows lag, log and stationary, and a mass-balance check prints OK.
Tuesday 90 min 🧬 Why growth has a speed limit. Hook: point at S/(Ks+S) in your code and ask what Ks is, physically. Learn (35 min): OpenStax 6.5 Enzymes only, then five lines in notes/bio/B1.md: protein, enzyme, substrate, and why growth saturates. Done when: you explain the Monod term aloud without notes. Then stop studying and finish Monday's plot. Lipids and carbohydrates are parked.
Wednesday 90 min πŸ“‘ Stream the tank like a plant. Hook: see your own curve move live. Do: publish one sample per simulated minute over MQTT and draw it (CSV replay if the Debian box is off; let AI write the MQTT boilerplate from the paho example). Done when: one timestamped sample can be traced from the generator to the rendered curve.
Thursday 90 min πŸ“ A matrix is a machine. Hook: 3Blue1Brown ch. 1 (10 min, it is beautiful). Learn: ch. 2-3, then redo one example in NumPy. Done when: you can say what a matrix does to a vector. Chapters 4-7 are parked. Last 30 min: founder paper, abstract and figures only.
Friday 90 min πŸ’₯ Break the tank on purpose. Hook: decide how the feed pump will fail. Do: generate 20 seeded batches with noise and one labelled feed-stop fault; save config, label and generator version behind one command (make sim). Done when: 20 files reproduce identically and you know which one is broken.
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 growth-curve screenshot 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: B1 Β· Molecules of life and enzymes

Material: OpenStax Biology 2e 6.5 Enzymes only (trimmed 2026-09-29; ch. 3 and Crash Course are Deeper)

Produce: five lines in notes/bio/B1.md

Understanding check: You can say what a protein, an enzyme and a substrate are without looking

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: M1 Β· Linear algebra, intuitively

Material: 3Blue1Brown "Essence of Linear Algebra" ch. 1-3 (trimmed 2026-09-29; ch. 4-7 are Deeper)

Produce: one example redone in NumPy

Understanding check: You can say what a matrix does to a vector

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
simulator-design.md Implement X/S/P/DO balances, feed and volume terms, named parameters and units; document the scope of the simplified simulator. Acceptance: A repeatable trajectory and balance checks exist; any lag-phase behavior is explicitly modeled. Model assists; Peter checks and owns the outcome
telemetry-demo.md Replay simulator measurements through MQTT to a local time-series store and a minimal graph; provide CSV replay if the Debian box is unavailable. Acceptance: A timestamped sample can be traced from generator to rendered curve. Model assists; Peter checks and owns the outcome
simulation-manifest.csv Generate 20 seeded batches including a labeled feed-stop fault; save configuration, label and generator version. Acceptance: Twenty reproducible outputs have known ground truth and no implied plant validation. 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 one simulation plot post and a brief explanation of the measurement-to-decision loop.

Opportunity action: Digest one verified Michroma or Levya author paper; save a question about measurement workflows and one potential feedback contact.

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

A basic Monod model does not automatically produce lag and death phases. Eighty lines is a presentation idea, not a correctness criterion; do not force artificial physiology to match the title.

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: A repeatable trajectory and balance checks exist; any lag-phase behavior is explicitly modeled.
  • Wednesday artifact satisfies: A timestamped sample can be traced from generator to rendered curve.
  • Friday artifact satisfies: Twenty reproducible outputs have known ground truth and no implied plant validation.
  • 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: monod.py with the plot.

Operational first step if stalled: open simulator-design.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 01 of this LABLOOP execution plan.
Read execution-plan/specs.md, execution-plan/DECISIONS.md,
execution-plan/GATES.md and
execution-plan/weeks/week-01-fermentation-simulator/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 01 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 1 Β· A tank in 80 lines. The following is source planning text, not a claim of completion. Apply the explicit evidence corrections in this specification and DECISIONS.md.

Week 1 Β· A tank in 80 lines

  • Goal: a fed-batch simulator that streams like a plant.
  • Tue (B1): Biology 2e ch. 3 + 6.5. Notes.
  • Thu (M1): 3Blue1Brown linear algebra ch. 1-7. Notes. Last 30 min: founder paper 1 (Michroma or Levya author).
  • Build: [ ] Mon: batchlens/sim/monod.py: ODEs for biomass X, substrate S, product P, dissolved oxygen; batch and fed-batch. Done when a plot shows lag, log, stationary. [ ] Wed: MQTT publisher (paho-mqtt) sending one sample per simulated minute to the Debian box; InfluxDB + Grafana dashboard. Done when you see the curve live. [ ] Fri: 20 batches with random noise and one injected fault (feed pump stops); saved as CSV. Done when make sim writes 20 files.
  • Sun: L-Sun: "A fermentation in 80 lines, streamed like a plant" with the Grafana screenshot. L-Wed (Wednesday): "what a blind bioreactor costs" (archetype note).
  • Only one thing: monod.py with the plot.
↑ Back to top
⏱ Focus Focus25:00 0 min today