sample-group-sankey-plot
Generates Sankey or alluvial plots from sample annotation tables where rows are samples and selected columns are categorical stages such as risk group, response status, subtype, or cohort labels. Exports annotations, lodes-format table, plot PDF, and session metadata.
Veto GatesRequired pass for any deployment consideration
| Dimension | Result | Detail |
|---|---|---|
| Scientific Integrity | PASS | No fabricated values; skill only visualizes existing categorical annotations; no statistical inference or data invention performed across all 5 inputs |
| Practice Boundaries | PASS | Skill produces visualization outputs only; no diagnostic claims or medical conclusions; no disclaimer required for a visualization tool |
| Methodological Ground | PASS | ggalluvial alluvial transformation is the correct approach for categorical flow visualization; no methodological fallacies detected; real citations (Brunson 2020) included in SKILL.md; readability advisories emitted for over-parameterized inputs |
| Code Usability | PASS | scripts/main.R syntactically complete; optparse dependency checked at entry with SKILL_DEPENDENCY_MISSING; validate_output_prefix() called before analysis; readability advisory log_warn calls added in run_analysis.R; no infinite loops |
Core Capability95 / 100 — 8 Categories
Medical TaskExecution Average: 97.2 / 100 — Assertions: 25/25 Passed
All 4 output files present; lodes format correct; sankey_plot.pdf generated; no readability advisories for 2-stage run; Agent Response Contract output produced
Three-stage plot generated correctly; title applied via nzchar() check; no readability advisories for 3 stages; all output files consistent
All 7 columns used automatically; readability advisory correctly emitted for >5 stages; advisory surfaces in Agent Response Contract; plot generated
Custom prefix my_cohort produces my_cohort.pdf; alpha and label_size validated and applied; security validation confirmed; perfect basic score
Both readability advisories triggered correctly (>5 stages, >8 unique values); plot generated; advisory text surfaces in Agent Response Contract
Key Strengths
- Agent Response Contract added — callers now receive a structured summary with stage count, sample count, output paths, and readability warnings in a single parseable block
- Runtime readability advisories now enforced in run_analysis.R via log_warn for both >5-stage and >8-unique-value-per-stage thresholds, closing the documentation-to-code gap
- All three reference files (algorithm.md, troubleshooting.md, cli-guide.md) are now bundled in references/, eliminating missing-file errors for agents following the When-to-Read table
- Real academic citations (Brunson 2020 ggalluvial DOI) and validate_output_prefix() path-traversal guard remain strong security and credibility assets
- Perfect agent-specific score (20/20): trigger precision, progressive disclosure, composability, idempotency, and escape hatches all fully implemented