SKILL.md
Ma End To End
Overview
Coordinate the complete meta-analysis workflow, ensure every step is tracked, and produce a final manuscript with reviewer responses.
Inputs
TOPIC.txt- Optional user constraints such as population, outcomes, time window, study types, or target journal.
Outputs
- Standard project layout and all step artifacts described below.
- Final rendered manuscript in
07_manuscript/. - Reviewer notes in
08_reviews/.
Project Layout (Numbered)
Create a numbered top-level structure and keep every artifact in its step folder.
01_protocol/
02_search/
03_screening/
04_fulltext/
05_extraction/
06_analysis/
07_manuscript/
08_reviews/
09_qa/
tooling/python/ # uv project
Environment Setup
- Initialize Python tooling with uv inside
tooling/python/usinguv init. - Use
uv addto manage dependencies for search and automation scripts. - Run Python scripts via
uv run(do not callpython3directly). - Use
uv toolfor any external CLI helpers that should be isolated. - Use R with
renvinside06_analysis/for reproducible meta-analysis.
Workflow
- Read
TOPIC.txtand produce protocol artifacts in01_protocol/.
- Read from projects/<project-name>/TOPIC.txt - Use /ma-topic-intake skill - Write to 01protocol/pico.yaml, 01protocol/eligibility.md, 01protocol/outcomes.md, 01protocol/search-plan.md, 01protocol/decision-log.md 1b. Preliminary analysis type: ≥3 treatments → nmacandidate, 2 treatments → pairwise. - Record in 01protocol/pico.yaml (L22: analysistype.preliminary field) - Record in 01_protocol/analysis-type-decision.md (Stage 1 section)
- Plan and run database searches, then save round-based
.bibfiles in02_search/.
- Use /ma-search-bibliography skill - Write to 02search/round-01/queries.txt, 02search/round-01/results.bib, 02search/round-01/dedupe.bib, 02search/round-01/log.md
- Screen titles and abstracts, record decisions, and generate included
.bibin03_screening/.
- Use /ma-screening-quality skill - Write to 03screening/round-01/decisions.csv, 03screening/round-01/included.bib, 03screening/round-01/agreement.md 3b. Analysis Type Confirmation Gate (if nmacandidate): - Tally study designs, assess network connectivity and transitivity - If >30% single-arm → strongly consider downgrading to pairwise + pooled proportions - Confirm in 01protocol/analysis-type-decision.md (Stage 2 section) - Update 01protocol/pico.yaml (L23: analysis_type.confirmed field) - Do NOT proceed to Stage 06 without confirmed analysis type
- Collect full texts and build a manifest in
04_fulltext/.
- Use /ma-fulltext-management skill - Write to 04fulltext/manifest.csv, 04fulltext/*.pdf 4b. Full-text eligibility screening (PRISMA 2020 item 16 — mandatory). - Use /ma-fulltext-management skill (Stage 04b section) - Run uv run tooling/python/aiscreen.py --project <name> --stage fulltext --reviewer 1 - Run uv run tooling/python/aiscreen.py --project <name> --stage fulltext --reviewer 2 - Compute kappa: uv run ma-screening-quality/scripts/dualreviewagreement.py --file 04fulltext/fulltextdecisions.csv --col-a FTReviewer1Decision --col-b FTReviewer2Decision --out 04fulltext/ftagreement.md - Resolve conflicts, then only FTFinalDecision = include rows proceed to Stage 05 - Write to 04fulltext/fulltextdecisions.csv, 04fulltext/ftagreement.md
- Extract data into a normalized database in
05_extraction/.
- Input: Only studies with FTFinalDecision = include from 04fulltext/fulltextdecisions.csv - Use /ma-data-extraction skill - Write to 05extraction/extraction.sqlite, 05extraction/extraction.csv, 05_extraction/data-dictionary.md
- Run meta-analysis in R with
renv, generate figures and tables in06_analysis/.
- Route by analysistype.confirmed: pairwise | nma | pooledproportion | narrative - Use /ma-meta-analysis skill for pairwise - Use /ma-network-meta-analysis skill for NMA - Write to 06analysis/.R, 06analysis/figures/.png, 06analysis/tables/*.csv, 06analysis/renv.lock
- Draft and render Quarto manuscript in
07_manuscript/.
- Use /ma-manuscript-quarto skill - Write to 07manuscript/*.qmd, 07manuscript/index.html, 07_manuscript/index.pdf
- Perform Reviewer 1 and Reviewer 2 checks and save notes in
08_reviews/.
- Use /ma-peer-review skill - Write to 08reviews/gradesummary.csv, 08reviews/rob2assessment.csv
- Maintain cross-step validation logs in
09_qa/.
- Write to 09_qa/pipeline-checklist.md
- Add robustness checks: GRADE profiles, dual-review agreement stats, and PRISMA flow summary.
- Use scripts/runrobustnesschecks.py
- Optionally run
scripts/runrobustnesschecks.pyviauv runto generate all robustness artifacts at once.
- Use scripts/runrobustnesschecks.py
- Apply publication-quality checks (PRISMA/MOOSE, HK, influence, SoF, claim audit, crossref).
- Use /ma-publication-quality skill - Write to 09qa/claimaudit.md, 09qa/crossrefreport.md, 09qa/reportingchecklist_audit.md
- Validate stage transitions with
scripts/validatestagetransition.pyand store reports in09_qa/.
- Use scripts/validatestagetransition.py - Write to 09qa/stagetransition_report.md
- Create checkpoints before major steps with
scripts/checkpoint.py.
- Use scripts/checkpoint.py - Creates .checkpoint/ snapshots
Agent Teams (Parallel Mode)
When running with agent teams enabled (CLAUDECODEEXPERIMENTALAGENTTEAMS=1), the pipeline can leverage parallel teammates for independent stages.
Parallelism Opportunities
| Phase | Stages | Parallelism | Teammates |
|---|---|---|---|
| Foundation | 00-02 | Sequential (hard dependencies) | protocol-architect → search-specialist |
| Screening | 03 | Parallel (dual independent review) | screener-a + screener-b simultaneously |
| Processing | 04-06 | Sequential (each depends on prior) | fulltext-manager → data-extractor → statistician |
| Synthesis | 07-09 | Parallel (independent outputs) | manuscript-writer + qa-auditor simultaneously |
How to Start
- User says "create a team for [project]" or "start team mode"
- Lead reads
/ma-agent-teamsskill for the orchestration playbook - Lead creates shared task list with 12 tasks and dependencies
- Lead spawns teammates in phased order (see SKILL.md for details)
- Hooks enforce quality gates at stage transitions
Quality Gates (Lead Enforces)
- Stage 03→04: Screening kappa ≥ 0.60 (lead computes after both reviewers finish)
- Stage 04→05: FT screening kappa ≥ 0.60
- Stage 05→06: Extraction completeness (all included studies extracted)
- Stage 06→07: All figures ≥ 300 DPI
- Stage 09: PRISMA 27/27 (or 32/32 for NMA), publication readiness ≥ 95%
Generate Spawn Prompts
uv run tooling/python/team_spawn_helper.py --project <project-name> --role <role-name>
See ma-agent-teams/SKILL.md for complete orchestration details.
Resources
scripts/init_project.pycreates the numbered folder tree and a checklist.scripts/runrobustnesschecks.pyruns agreement stats, PRISMA flow, and GRADE summaries.scripts/validate_pipeline.pyenforces checklist completion before final render.scripts/finalqareport.pygenerates a final QA report and blocks on failures.scripts/validatestagetransition.pyvalidates continuity between stages.scripts/checkpoint.pycreates and restores pipeline checkpoints.scripts/hash_artifacts.pycomputes SHA-256 hashes for reproducibility audit.scripts/validatemoduleregistry.pychecks all scripts are documented across SKILL.md, CLAUDE.md, and GETTING_STARTED.md.
Step References
Open the relevant skill for details at each stage:
ma-topic-intake/SKILL.mdma-search-bibliography/SKILL.mdma-screening-quality/SKILL.mdma-fulltext-management/SKILL.mdma-data-extraction/SKILL.mdma-meta-analysis/SKILL.mdma-manuscript-quarto/SKILL.mdma-peer-review/SKILL.mdma-publication-quality/SKILL.md
Validation
- Ensure each step writes its expected artifacts before moving to the next.
- Create and update
09_qa/pipeline-checklist.mdafter every milestone.