mirror of
https://github.com/K-Dense-AI/scientific-agent-skills.git
synced 2026-12-04 17:53:59 +08:00
Add analytical-method-validation skill
New skill for bench analytical scientists in regulated labs: planning,
evaluating, and documenting validation, verification, and transfer of
analytical procedures under whichever framework governs.
Frameworks. ICH Q2(R2) and Q14 and ICH M10 are encoded directly from their
openly licensed text, read from the adopted PDFs rather than from secondary
summaries. USP <1220>/<1225>/<1226>, the CLSI EP series, and ISO/IEC 17025 are
paywalled, so they are cited by designation and scope only and never
reproduced or reconstructed; edition numbers taken from listings rather than
the documents are marked for confirmation.
Q2(R2) content covers the restructured characteristics (range as the parent of
response and lower range limits), Table 1 tests by measured attribute, Table 2
reportable ranges, the recommended-data minima, and the 30 Nov 2023 error
correction. M10's chromatographic and ligand-binding-assay criteria are kept
strictly separate, including the LBA-only total-error limit and the differing
ISR tolerances.
Scripts. Six standard-library CLIs, no numpy and no network, computing the
statistics that decide fitness for purpose rather than the ones that look
reassuring:
- plan_validation.py framework selection and a protocol whose
acceptance criteria must be pre-stated
- check_response.py lack-of-fit F against pure error, residual runs
test, back-calculated error per level, and a
heteroscedasticity check for weighting
- check_accuracy_precision.py recovery with confidence intervals, and
precision decomposed per level into repeatability
and intermediate precision
- check_detection_limits.py DL/QL by every approach Q2(R2) allows, compared
against the reporting threshold
- check_bioanalytical_run.py M10 run acceptance including the per-level QC rule
- compare_methods.py Deming and Passing-Bablok regression plus TOST
equivalence against a pre-stated margin
Distributions are built from the regularised incomplete beta and gamma
functions and checked against published quantiles.
Scope. The skill reports and computes. It does not decide that a procedure is
validated, accept or reject a run, close an investigation, or replace the
analyst, technical reviewer, quality unit, or regulator.
Also adds 111 tests in tests/analytical-method-validation, a docs/skills.md
entry, examples.md Example 36b, and updates the README skill count to 156.
This commit is contained in:
1 parent
e608baad6e
commit
844f4a35cc
43 files changed
+5902
-11
No files matched your search
+90
-1
@@ -5367,6 +5367,95 @@ Expected Output:
|
||||
|
||||
---
|
||||
|
||||
### Example 36b: Validating a Stability-Indicating Impurity Method, and Transferring It
|
||||
|
||||
**Objective**: Design a validation study for an HPLC related-substances procedure under ICH Q2(R2), evaluate the resulting data with the statistics that actually test the claims, then transfer the procedure to a second site on an equivalence basis. The workflow does not conclude that the procedure is validated — that decision belongs to the analyst and the quality unit.
|
||||
|
||||
**Disciplines**: analytical chemistry · pharmaceutical quality control · applied statistics · regulatory documentation
|
||||
|
||||
**Skills Used**:
|
||||
- `analytical-method-validation` - Framework selection, protocol, and the validation statistics
|
||||
- `statistical-analysis` - Supporting diagnostics and assumption checks
|
||||
- `scientific-visualization` - Residual plots, recovery plots, Bland-Altman and difference plots
|
||||
- `xlsx` - Raw-data and traceability tables
|
||||
- `docx` - Formatted protocol and report deliverables
|
||||
|
||||
**Starting prompt**:
|
||||
|
||||
```text
|
||||
Use the analytical-method-validation, statistical-analysis,
|
||||
scientific-visualization, xlsx, and docx skills.
|
||||
|
||||
Goal: a validation protocol and report for an HPLC related-substances procedure,
|
||||
plus a transfer assessment to our second site.
|
||||
Context: impurity specification 0.15%, reporting threshold 0.05%, three
|
||||
specified impurities, stability-indicating claim required.
|
||||
Criteria: state every acceptance criterion before any data is evaluated, and say
|
||||
where each one comes from. Use the framework that actually governs and name it.
|
||||
Deliver: protocol, evaluated data with the diagnostics that test the model
|
||||
(not just r-squared), a transfer equivalence assessment, and a report with raw
|
||||
data traceability.
|
||||
Report: list anything the data do not support, plainly.
|
||||
Do not: declare the procedure validated, set criteria after seeing results,
|
||||
reproduce paywalled USP or CLSI text, or invent a threshold from memory.
|
||||
```
|
||||
|
||||
**Workflow**:
|
||||
|
||||
```text
|
||||
Step 1: Framework and required characteristics
|
||||
- python3 plan_validation.py --framework ich-q2r2 --attribute impurity \
|
||||
--technique hplc --range-use impurity-quantitative
|
||||
- Confirm the attribute drives the requirement: a quantitative impurity test needs
|
||||
specificity, response, QL, accuracy, repeatability, and intermediate precision
|
||||
- Note that robustness belongs to development under ICH Q14, not to this protocol
|
||||
|
||||
Step 2: Protocol with criteria fixed in advance
|
||||
- python3 plan_validation.py --framework ich-q2r2 --attribute impurity --protocol
|
||||
- Derive each criterion from the 0.15% specification and the 0.05% reporting
|
||||
threshold, and record the derivation next to the number
|
||||
- Fix the calibration model and any weighting now, not after seeing the residuals
|
||||
|
||||
Step 3: Response across the reportable range
|
||||
- python3 check_response.py -i calibration.csv --max-back-calc-error 5 \
|
||||
--weight 1/x
|
||||
- Read the lack-of-fit F test and the residual pattern, not the r-squared
|
||||
- If the low end is biased, that is the reporting-threshold region — fix the model
|
||||
|
||||
Step 4: Accuracy and precision
|
||||
- python3 check_accuracy_precision.py -i ap.csv --accuracy-limit 10 \
|
||||
--rsd-limit 5 --design-check impurity
|
||||
- Compare repeatability against intermediate precision: if the between-day
|
||||
component dominates, routine performance is the larger number
|
||||
- Report recovery with its confidence interval, per Q2(R2) 3.3.1.4
|
||||
|
||||
Step 5: Quantitation limit against the reporting threshold
|
||||
- python3 check_detection_limits.py --calibration lowrange.csv --blanks blanks.csv \
|
||||
--confirm-ql 0.05 --confirm-data ql_check.csv --reporting-threshold 0.05
|
||||
- Name the approach used, and confirm the estimate with real determinations
|
||||
- The QL must be at or below 0.05%
|
||||
|
||||
Step 6: Transfer to the second site
|
||||
- python3 compare_methods.py -i paired.csv --margin 10 --relative \
|
||||
--slope-tolerance 0.10
|
||||
- Pre-state the equivalence margin from the specification; TOST, not a t test
|
||||
- Deming and Passing-Bablok rather than ordinary least squares, because both
|
||||
sites' results carry error
|
||||
|
||||
Step 7: Report and traceability
|
||||
- Fill assets/validation-report-template.md; every number traces to raw data
|
||||
- Include out-of-criteria individual results rather than dropping them
|
||||
- Route to the technical reviewer and quality unit for the actual decision
|
||||
```
|
||||
|
||||
Expected Output:
|
||||
- Validation protocol with pre-stated, derived acceptance criteria
|
||||
- Evaluated data with model diagnostics, variance components, and named DL/QL approach
|
||||
- Transfer equivalence assessment against a pre-stated margin
|
||||
- Validation report with raw-data traceability, and an explicit list of what the data do not support
|
||||
|
||||
---
|
||||
|
||||
## Scientific Communication & Tooling
|
||||
|
||||
### Example 37: Publication Packaging — Diagrams, Infographics, and Venue Formatting
|
||||
@@ -5659,7 +5748,7 @@ OpenAlex, Crossref, Semantic Scholar, CORE, Unpaywall)
|
||||
|
||||
**Clinical & regulatory documentation** — all bounded, none clinical decision-making
|
||||
`clinical-reports` · `clinical-decision-support` · `treatment-plans` · `pyhealth` ·
|
||||
`iso-standards-readiness`
|
||||
`iso-standards-readiness` · `analytical-method-validation`
|
||||
|
||||
**Tooling**
|
||||
`autoskill` · `pi-agent`
|
||||
|
||||
Reference in new issue
Block a user