# Week 33 — labdocs ingestion and traceability

[**Full learning notebook: explanations, step-by-step challenges, stashes and evidence**](./learning-notebook.md) · [NotebookLM export](./notebooklm.txt)

Status: NOT_STARTED. Calendar dates: not assigned. Owner: Peter Ciancaglini. Planning authority: v5 Part 7 with retained v4 details. Deeper walkthrough: [v6 · Week 33 · Instrument 3 labdocs, part 1](../../../LABLOOP-Master-Plan-v6.md#week-33--instrument-3-labdocs-part-1). Active project/repository: labdocs.

[Programme](../../README.md) · [Model instructions](../../specs.md) · [Decisions](../../DECISIONS.md) · [Resources](../../SOURCES.md) · [**v6 walkthrough**](../../../LABLOOP-Master-Plan-v6.md#week-33--instrument-3-labdocs-part-1) · [Previous week review](../week-32-paper-3-gate-and-career-refresh/review.md) · [Next week](../week-34-labdocs-retrieval-evaluation/specs.md)

## 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: Define a synthetic document benchmark up to the v4 200-document target with ground truth, document IDs and realistic error cases.
- Public/profile priority: Prepare an educational record-traceability post with one measured example.
- Career/relationship/commercial priority: Prepare a QA/R&D feedback request and a recruiter explanation of local document systems and evidence integrity.

## Deeper walkthrough (v6)

Read [v6 · Week 33 · Instrument 3 labdocs, part 1](../../../LABLOOP-Master-Plan-v6.md#week-33--instrument-3-labdocs-part-1) before Monday. It expands this week's one-row v5 brief into daily build steps 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](../../../LABLOOP-Master-Plan-v6.md#prologue-3--the-resource-rules-so-you-never-waste-an-evening-on-a-bad-source), [NotebookLM protocol](../../../LABLOOP-Master-Plan-v6.md#prologue-4--the-notebooklm-protocol-one-notebook-per-week-zero-decisions), [chapter anatomy](../../../LABLOOP-Master-Plan-v6.md#prologue-5--how-to-read-a-chapter-the-anatomy-identical-for-all-41). v6 adds depth only; it does not change a goal, gate, output or the 600-minute cap, so this specification still governs execution.

**Act VII · Threads: M, $, R · Next gate: 36**

**Where this week sits.**
- ← **From:** v4 Part 5.3 (labdocs design), week 5-7 (extraction with provenance), week 15 (GROBID/Docling), your local-model setup from week 0.
- → **Feeds:** week 34 (retrieval over the same records), week 35 (deviation drafting + benchmark), archetype D companies (traceability/QMS), week 37 (pilot option), week 39 (fund package).
- ⟳ **Returns in:** any client with regulatory pressure.

**Goals.**
- 🎯 **This week:** eLabFTW running; ingestion pipeline with a local VLM; hash-chained audit log; 200 synthetic SOPs/protocols; L-Sun.
- 🏁 **Next milestone:** Gate 36 (journal + JOSS submissions).
- 🌟 **Final:** `labdocs v0.1` and the on-prem benchmark table.

**The plan (from v5 Part 7, expanded; gate and output unchanged).**
> *v5 row:* 33 | Instrument 3 labdocs, part 1 | 21 CFR Part 11 + ALCOA+ (v4 catalog 15) | eLabFTW on the Debian box; local VLM extraction; audit log (v4 week 14) | L-Sun
- **Goal:** a scanned page becomes an auditable ELN record without leaving the building.
- **Tue (study):** 21 CFR Part 11 (sections 11.10 and 11.50), FDA "Part 11, Electronic Records; Electronic Signatures — Scope and Application" guidance (2003), MHRA "GxP Data Integrity Guidance and Definitions" (2018) on ALCOA+.
- **Build:** [ ] Mon: eLabFTW via Docker on the Debian box; API key; `elabapi-python` creates an experiment. Done when a test experiment appears in the UI. [ ] Wed: 200 synthetic SOPs/protocols from public templates (never client data); local VLM (Qwen2.5-VL 3B or Gemma 3 4B on the 3050) extracts fields to JSON with page/region provenance. Done when 20 pages extract and are scored against hand labels. [ ] Fri: write to eLabFTW + append-only audit log with SHA-256 chaining; verification command detects a tampered entry. Done when `labdocs verify` fails on a modified record.
- **Sun:** L-Sun "What ALCOA+ means in code".
- **Only one thing:** the tamper-detecting audit log.

**Mentor check.** *"I can explain ALCOA+ to a QA manager and prove a tampered record is detected."*

## Required inputs and dependency check

- [Week 26](../week-26-trialkit-plate-module/specs.md): inspect its actual evidence and review; source/code artifacts must exist before the dependent task begins.
- [Week 32](../week-32-paper-3-gate-and-career-refresh/specs.md): inspect its actual evidence and review; source/code artifacts must exist before the dependent task begins.
- Read [commitment](./commitment.md), [evidence](./evidence.md), [review](./review.md) and the current root TODAY/PROGRESS/QUESTIONS files.
- Read this week's chapter, [v6 · Week 33 · Instrument 3 labdocs, part 1](../../../LABLOOP-Master-Plan-v6.md#week-33--instrument-3-labdocs-part-1), then the standing sections: [Part 0 · how to use the document](../../../LABLOOP-Master-Plan-v6.md#part-0--how-to-use-this-document-read-this-every-monday-for-the-first-month), [Part 3 · the scientific thesis](../../../LABLOOP-Master-Plan-v6.md#part-3--the-scientific-thesis-explained-twice-like-a-kid-then-like-a-reviewer), [Part 4 · curriculum](../../../LABLOOP-Master-Plan-v6.md#part-4--curriculum-from-zero-four-tracks-all-free-exact-units), [Part 8 · the prompt pack](../../../LABLOOP-Master-Plan-v6.md#part-8--the-prompt-pack-copy-paste-fill-the-brackets) and [Part 9 · branding and endorsement](../../../LABLOOP-Master-Plan-v6.md#part-9--branding-connection-ladder-endorsement). The same sections exist in the [v5 master](../../../LABLOOP-Master-Plan-v5.md), which remains the governing sequence; v6 reproduces them and adds depth. Retained commercial/instrument details come from [v4](../../../AI-Upskilling-Plan-Biotech-v4.md).
- Inspect the actual canonical repository state, available data, existing figures and required human/external inputs. Never assume a previous week succeeded from its folder name.
- Verify current resource links, versions, dataset rights and any live company/venue information before relying on them. Use [source catalog](../../SOURCES.md); explicitly record inaccessible resources.

## 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 | Define a synthetic document benchmark up to the v4 200-document target with ground truth, document IDs and realistic error cases. Stop when: Demonstrate one synthetic document becoming a traceable eLabFTW record with a documented audit event. |
| Tuesday | 90 min | Read current official 21 CFR Part 11 and MHRA data-integrity guidance sections relevant to records/audit trails; write a requirement-to-demo-boundary map. Produce: One concise applied note, a worked decision/example and unresolved questions. |
| Wednesday | 90 min | Specify eLabFTW deployment/API integration and local VLM extraction with provenance, retries and validation. Stop when: A small end-to-end extraction creates a traceable demo record. Reserve the last 10 minutes for the optional Wednesday note. |
| Thursday | 90 min | Apply eLabFTW documentation to the ingestion design and inspect synthetic-document truth labels. Last 30 minutes: a relevant public lab-method paper. Apply the Half 2 one-formal-study-block rule. |
| Friday | 90 min | Implement event identity, timestamps, revisions and hash-linked audit events; document access-control, retention and tampering limits. Stop when: The test demonstrates tamper detection and documents what it cannot prevent. |
| Saturday | 90 min | Resolve the earliest critical spillover or dependency. Prepare any long-form publication draft from existing figures here if needed. Sandbox only after commitments are met. |
| Sunday | 60 min | 20 min build-log draft/publication when authorized; 5 min evidence/checklist; 20 min source-grounded gap review; 15 min next week's six physical actions. |

Half 2: Tuesday is the formal study block unless this is a selling/submission/decision week. Thursday supports applied review, partner work or the market task; do not add another full course.

## Learning specification

### Biology/domain unit

Material: Read current official 21 CFR Part 11 and MHRA data-integrity guidance sections relevant to records/audit trails; write a requirement-to-demo-boundary map.

Produce: One concise applied note, a worked decision/example and unresolved questions.

Understanding check: The note directly supports this week's experiment, collaboration, delivery or career action.

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

Material: Apply eLabFTW documentation to the ingestion design and inspect synthetic-document truth labels. Last 30 minutes: a relevant public lab-method paper.

Produce: One concise applied note, a worked decision/example and unresolved questions.

Understanding check: The note directly supports this week's experiment, collaboration, delivery or career action.

Use the [prompt pack](../../../LABLOOP-Master-Plan-v6.md#part-8--the-prompt-pack-copy-paste-fill-the-brackets): 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](../../../LABLOOP-Master-Plan-v6.md#part-8--the-prompt-pack-copy-paste-fill-the-brackets); 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.

## 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 |
|---|---|---|
| `document-benchmark-manifest.csv` | Define a synthetic document benchmark up to the v4 200-document target with ground truth, document IDs and realistic error cases. Acceptance: Demonstrate one synthetic document becoming a traceable eLabFTW record with a documented audit event. | Model assists; Peter checks and owns the outcome |
| `labdocs-ingestion-runbook.md` | Specify eLabFTW deployment/API integration and local VLM extraction with provenance, retries and validation. Acceptance: A small end-to-end extraction creates a traceable demo record. | Model assists; Peter checks and owns the outcome |
| `traceability-design.md` | Implement event identity, timestamps, revisions and hash-linked audit events; document access-control, retention and tampering limits. Acceptance: The test demonstrates tamper detection and documents what it cannot prevent. | 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.

## Branding and opportunity execution brief

Branding: Prepare an educational record-traceability post with one measured example.

Opportunity action: Prepare a QA/R&D feedback request and a recruiter explanation of local document systems and evidence integrity.

Use [career asset contracts](../../CAREER-ASSETS.md). 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](../../../GridX%20Startups.csv) 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.

## Quality risks and week-specific constraints

Hash chaining alone does not establish regulatory compliance. Study current official rules and apply a requirements mapping; this remains a research demonstration.

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.

## Completion and gate review

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

- [ ] Monday artifact satisfies: Demonstrate one synthetic document becoming a traceable eLabFTW record with a documented audit event.
- [ ] Wednesday artifact satisfies: A small end-to-end extraction creates a traceable demo record.
- [ ] Friday artifact satisfies: The test demonstrates tamper detection and documents what it cannot prevent.
- [ ] 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.

## Minimum viable week and recovery

Expanded minimum derived from the source goal: Demonstrate one synthetic document becoming a traceable eLabFTW record with a documented audit event.

Operational first step if stalled: open `document-benchmark-manifest.csv`, 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](../../../LABLOOP-Master-Plan-v6.md#part-8--the-prompt-pack-copy-paste-fill-the-brackets): 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.

## 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.

## Ready-to-copy model prompt

```text
Prepare Week 33 of this LABLOOP execution plan.
Read execution-plan/specs.md, execution-plan/DECISIONS.md,
execution-plan/GATES.md and
execution-plan/weeks/week-33-labdocs-ingestion-and-traceability/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 33 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.
```

## Preserved original v5 weekly brief

v6 expands this row into a full brief, with the gate and output unchanged, inside [v6 · Week 33 · Instrument 3 labdocs, part 1](../../../LABLOOP-Master-Plan-v6.md#week-33--instrument-3-labdocs-part-1).
The following is source planning text, not a claim of completion. Apply the explicit evidence corrections in this specification and DECISIONS.md.

| Week | Goal | Study (Tue) | Build (Mon/Wed/Fri) | Output |
|---|---|---|---|---|
| 33 | Instrument 3 labdocs, part 1 | 21 CFR Part 11 + ALCOA+ (v4 catalog 15) | eLabFTW on the Debian box; local VLM extraction; audit log (v4 week 14) | L-Sun |
