Root-level scripts are generic orchestrators for the research pipeline. They coordinate setup, tests, analysis, rendering, validation, copying, LLM review, and executive reporting without implementing project-specific business logic.
./run.sh
./run.sh --pipeline --resume
./run.sh --all-projects --pipeline
./secure_run.sh --project template_code_projectuv run python scripts/execute_pipeline.py --project template_code_project --core-only
uv run python scripts/execute_multi_project.py --no-llm
uv run python scripts/07_generate_executive_report.py| Stage | Script | Responsibility |
|---|---|---|
| 00 | 00_setup_environment.py |
Validate Python, dependencies, build tools, and directories |
| 01 | 01_run_tests.py |
Run infrastructure and project tests. Project pipelines use --infra-scope pipeline-smoke for a focused real infrastructure contract; explicit repo verification uses --infra-scope full for the coverage-bearing infrastructure suite. With --project-only --all-projects, delegates to infrastructure.core.test_runner.run_per_project_pytest (one pytest process per project, --cov-append, combined coverage gate for local all-project/release sweeps). |
| 02 | 02_run_analysis.py |
Discover and run projects/{name}/scripts/ |
| 03 | 03_render_pdf.py |
Render manuscripts to PDF |
| 04 | 04_validate_output.py |
Validate PDFs, markdown, and integrity reports |
| 05 | 05_copy_outputs.py |
Copy final deliverables to output/ |
| 06 | 06_llm_review.py |
Generate LLM reviews or translations when Ollama is available |
| 07 | 07_generate_executive_report.py |
Build multi-project executive summaries and dashboards |
execute_pipeline.py also supports single-stage execution with keys such as setup, tests, analysis, render_pdf, validate, copy, llm_reviews, llm_translations, and executive_report.
execute_pipeline.py/execute_multi_project.py- single- and multi-project pipeline runnersgenerate_active_projects_doc.py- regeneratesdocs/_generated/active_projects.mdgenerate_api_reference_doc.py- regenerates the API reference (CIvalidate --check)generate_architecture_overview.py- regeneratesdocs/_generated/architecture_overview.{mmd,svg}generate_coverage_history.py- regenerates the coverage-history page from CI artefactsgenerate_stage_table_doc.py- regenerates the canonical stage-table marker blockgenerate_exemplar_roster_doc.py- regenerates the public exemplar roster doc (infrastructure.project.exemplar_roster)generate_publication_records_doc.py- regenerates the publication-records doc (infrastructure.documentation.publication_records)10_repro_bundle.py- builds/verifies reproduction bundles (infrastructure.publishing.repro_bundle)lint_docs.py- runs Mermaid, link, consistency, and doc-pair documentation checksaudit_documentation.py- emits the advisory public documentation RedTeam auditverify_no_mocks.py- checks tests for mock usageaudit_filepaths.py- repository filepath and reference auditcheck_tracked_generated_artifacts.py- rejects tracked generated outputs and package metadataci_local.sh- local CI reproduction (actwhen available, otherwise a pure-Python CI fallback; see../docs/maintenance/ci-local.md)- Maintenance helpers now live under
maintenance/-manage_workspace.py,show_project_info.py,render_working_projects.py,rerender_working_pdfs.py,organize_executive_outputs.py,merge_test_supplements.py,batch_cogsec_improve.py,setup_pre_commit.py,codegraph_local.py(seemaintenance/README.mdandmaintenance/AGENTS.md).show_project_info.pyis a standalone project metadata CLI; it is not invoked byrun.sh(the menu'sikey prints only the current project name). bash_utils.sh- shared shell helpers for backup/health scripts and integration tests (not sourced byrun.sh/secure_run.sh)shell_bootstrap.sh- shareduvbootstrap and sandbox env vars sourced byrun.shandsecure_run.shbackup-daily.sh/backup-weekly.sh/backup-full.sh- rsync backup tiersrestore-test.sh- non-destructive backup-restore verificationhealth-check.sh- pre-flight system health check (Python, uv, disk, Docker, repo)
| Gate | Command |
|---|---|
| Exemplar drift | uv run python scripts/check_template_drift.py --strict |
| Documentation RedTeam audit | uv run python scripts/audit_documentation.py --format markdown |
| Module line count | uv run python scripts/gates/module_line_count_check.py |
| Tracked projects guard | uv run python scripts/check_tracked_projects.py |
| Tracked generated artifacts | uv run python scripts/check_tracked_generated_artifacts.py |
| CodeGraph local scope | codegraph files "$(pwd)" --json | uv run python scripts/maintenance/codegraph_local.py verify-scope |
| Unified health | uv run python -m infrastructure.core.health |
| Opt-in Stage 10 bundle | uv run python scripts/08_executable_bundle.py --project {name} |
| Opt-in Stage 11 archival | uv run python scripts/09_archive_publication.py --project {name} |
See docs/architecture/thin-orchestrator-summary.md and gates/AGENTS.md.
projects/{name}/output/reports/test_results.{json,md}projects/{name}/output/reports/validation_report.{json,md}projects/{name}/output/reports/log_summary.txtoutput/executive_summary/consolidated_report.{json,html,md}output/executive_summary/dashboard.{png,pdf,html}
- Project-specific analysis scripts belong in
projects/{name}/scripts/. - The root scripts stay generic and work with any active project discovered from
projects/. - Use
uv runfor direct Python entry points (execute_pipeline.py,execute_multi_project.py,07_generate_executive_report.py). run.shandsecure_run.share thin bootstrap shells: they sourceshell_bootstrap.sh, thenexec uv run python -m infrastructure.orchestration(menu, pipeline, and secure subcommands live in Python). Bare./run.shrelies onuv runto sync the workspace; pipeline-flag invocations also runuv syncwhen.venvis missing.