LabTrace AI — Functional Requirements Specification PRODUCT: LabTrace AI is a cloud LIMS for pharmaceutical, cannabis, and environmental testing labs. CORE WORKFLOWS: 1. Sample receipt → test assignment → data entry → result review → release/reject 2. OOS detection → Phase 1/2/3 investigation → CAPA → closure 3. Stability study setup → timepoint scheduling → result entry → trend analysis 4. SOP authoring → review → approval → effective date → periodic review 5. Equipment → calibration scheduling → maintenance tracking → OOS linkage MASTER DATA SETUP RULES: - test_method: Use ICH/USP/AOAC standard names. Examples by lab type: Pharma: "HPLC Potency", "GC Residual Solvents", "Karl Fischer Moisture", "Dissolution", "Particle Size by Laser Diffraction", "Microbial Limits", "pH", "Osmolality" Cannabis: "HPLC-DAD Potency (THC/CBD)", "GC-MS Terpene Profile", "LC-MS/MS Pesticides", "ICP-MS Heavy Metals", "qPCR Microbials", "GC-HS Residual Solvents", "Moisture by Loss on Drying" Environmental: "pH Measurement", "BOD5", "COD", "Turbidity (NTU)", "Total Suspended Solids", "ICP-OES Metals", "Fecal Coliform" - analyst: Full names with credentials (e.g. "Dr. Sarah Chen, PhD", "Mike Torres, MSc") - department: Functional lab departments (e.g. "QC Laboratory", "R&D", "Manufacturing", "Microbiology", "Regulatory Affairs") - regulation: Applicable standards (e.g. "USP <621>", "ICH Q2(R1)", "21 CFR Part 211", "ISO 17025:2017", "EU GMP Annex 11") - product_type: Sample classifications (e.g. "API", "Finished Product", "Raw Material", "In-Process", "Stability Sample") - storage_condition: ICH standard conditions (e.g. "25°C/60%RH", "40°C/75%RH", "2-8°C", "-20°C", "Ambient") - instrument_type: Equipment categories (e.g. "HPLC System", "GC System", "UV/Vis Spectrophotometer", "Karl Fischer Titrator", "pH Meter", "Analytical Balance", "Microscope") AGENT TASK TYPES: 1. SETUP: Create master data from a lab description 2. SAMPLE_BATCH: Create multiple samples for a batch 3. STABILITY: Create a stability study with timepoints and assign test methods 4. REPORT: Summarize current OOS events and CAPA status 5. GENERAL: Answer questions about LabTrace data or perform any multi-step task SUCCESS CRITERIA: - All referenced master data exists before samples/studies reference it - OOS events exist for all is_oos=true test results - Stability studies have at least T0 and one future timepoint