name: ma-end-to-end description: End-to-end AI-assisted meta-analysis pipeline orchestration from TOPIC.txt to final manuscript and reviewer responses. Use when the user provides a topic and wants the full meta-analysis workflow, tracking, and final paper.
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-intakeskill - Write to
01_protocol/pico.yaml,01_protocol/eligibility.md,01_protocol/outcomes.md,01_protocol/search-plan.md,01_protocol/decision-log.md1b. Preliminary analysis type: ≥3 treatments →nma_candidate, 2 treatments →pairwise. - Record in
01_protocol/pico.yaml(L22: analysis_type.preliminary field) - Record in
01_protocol/analysis-type-decision.md(Stage 1 section)
- Read from
- Plan and run database searches, then save round-based
.bibfiles in02_search/.- Use
/ma-search-bibliographyskill - Write to
02_search/round-01/queries.txt,02_search/round-01/results.bib,02_search/round-01/dedupe.bib,02_search/round-01/log.md
- Use
- Screen titles and abstracts, record decisions, and generate included
.bibin03_screening/.- Use
/ma-screening-qualityskill - Write to
03_screening/round-01/decisions.csv,03_screening/round-01/included.bib,03_screening/round-01/agreement.md3b. Analysis Type Confirmation Gate (ifnma_candidate): - Tally study designs, assess network connectivity and transitivity
- If >30% single-arm → strongly consider downgrading to pairwise + pooled proportions
- Confirm in
01_protocol/analysis-type-decision.md(Stage 2 section) - Update
01_protocol/pico.yaml(L23: analysis_type.confirmed field) - Do NOT proceed to Stage 06 without confirmed analysis type
- Use
- Collect full texts and build a manifest in
04_fulltext/.- Use
/ma-fulltext-managementskill - Write to
04_fulltext/manifest.csv,04_fulltext/*.pdf4b. Full-text eligibility screening (PRISMA 2020 item 16 — mandatory). - Use
/ma-fulltext-managementskill (Stage 04b section) - Run
uv run tooling/python/ai_screen.py --project <name> --stage fulltext --reviewer 1 - Run
uv run tooling/python/ai_screen.py --project <name> --stage fulltext --reviewer 2 - Compute kappa:
uv run ma-screening-quality/scripts/dual_review_agreement.py --file 04_fulltext/fulltext_decisions.csv --col-a FT_Reviewer1_Decision --col-b FT_Reviewer2_Decision --out 04_fulltext/ft_agreement.md - Resolve conflicts, then only
FT_Final_Decision = includerows proceed to Stage 05 - Write to
04_fulltext/fulltext_decisions.csv,04_fulltext/ft_agreement.md
- Use
- Extract data into a normalized database in
05_extraction/.- Input: Only studies with
FT_Final_Decision = includefrom04_fulltext/fulltext_decisions.csv - Use
/ma-data-extractionskill - Write to
05_extraction/extraction.sqlite,05_extraction/extraction.csv,05_extraction/data-dictionary.md
- Input: Only studies with
- Run meta-analysis in R with
renv, generate figures and tables in06_analysis/.- Route by
analysis_type.confirmed:pairwise|nma|pooled_proportion|narrative - Use
/ma-meta-analysisskill for pairwise - Use
/ma-network-meta-analysisskill for NMA - NMA extensions (run after nma_01-10 if applicable):
- If combination treatments exist →
nma_11_cnma.R(Component NMA) - If study-level covariates available →
nma_12_meta_regression.R - Always for NMA →
nma_13_transitivity_tests.R(statistical transitivity assessment)
- If combination treatments exist →
- Write to
06_analysis/*.R,06_analysis/figures/*.png,06_analysis/tables/*.csv,06_analysis/renv.lock
- Route by
- Draft and render Quarto manuscript in
07_manuscript/.- Use
/ma-manuscript-quartoskill - Write to
07_manuscript/*.qmd,07_manuscript/index.html,07_manuscript/index.pdf
- Use
- Perform Reviewer 1 and Reviewer 2 checks and save notes in
08_reviews/.- Use
/ma-peer-reviewskill - Write to
08_reviews/grade_summary.csv,08_reviews/rob2_assessment.csv
- Use
- Maintain cross-step validation logs in
09_qa/.- Write to
09_qa/pipeline-checklist.md
- Write to
- Add robustness checks: GRADE profiles, dual-review agreement stats, and PRISMA flow summary.
- Use
scripts/run_robustness_checks.py
- Use
- Optionally run
scripts/run_robustness_checks.pyviauv runto generate all robustness artifacts at once.- Use
scripts/run_robustness_checks.py
- Use
- Apply publication-quality checks (PRISMA/MOOSE, HK, influence, SoF, claim audit, crossref).
- Use
/ma-publication-qualityskill - Write to
09_qa/claim_audit.md,09_qa/crossref_report.md,09_qa/reporting_checklist_audit.md
- Use
- Validate stage transitions with
scripts/validate_stage_transition.pyand store reports in09_qa/.- Use
scripts/validate_stage_transition.py - Write to
09_qa/stage_transition_report.md
- Use
- Create checkpoints before major steps with
scripts/checkpoint.py.- Use
scripts/checkpoint.py - Creates
.checkpoint/snapshots
- Use
Agent Teams (Parallel Mode)
When running with agent teams enabled (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=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/run_robustness_checks.pyruns agreement stats, PRISMA flow, and GRADE summaries.scripts/validate_pipeline.pyenforces checklist completion before final render.scripts/final_qa_report.pygenerates a final QA report and blocks on failures.scripts/validate_stage_transition.pyvalidates continuity between stages.scripts/checkpoint.pycreates and restores pipeline checkpoints.scripts/hash_artifacts.pycomputes SHA-256 hashes for reproducibility audit.scripts/validate_module_registry.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.