Scripts Reference

Maintenance helpers and build tools in the scripts/ directory.

Overview

The scripts/ directory contains maintenance helpers and build tools for CCO. These scripts provide functionality for validation, benchmarking, documentation building, and autonomous mission execution.

validate_crossrefs.py

Cross-reference validator for document integrity. Parses markdown links and inline code references, validates files exist, and skips known patterns.

Basic Usage

bash
python scripts/validate_crossrefs.py --repo /path/to/repo

JSON Output

bash
python scripts/validate_crossrefs.py --repo /path/to/repo --json

Features

  • Parses markdown links and inline code references
  • Validates that referenced files exist
  • Skips known patterns (glob, placeholders, run artifacts)

Exit Codes

  • 0 - All references are valid
  • 1 - Broken references found

scan_repo.py

Repository Knowledge Scanner. Extracts role specs from AGENTS.md and conventions from .context/*.md files, then generates a readiness score.

Basic Usage

bash
python scripts/scan_repo.py --repo /path/to/repo

Verbose JSON Output

bash
python scripts/scan_repo.py --repo /path/to/repo --json --verbose

Features

  • Extracts role specs from AGENTS.md
  • Extracts conventions from .context/*.md files
  • Calculates readiness score [0-100]

Required Files for 100% Score

  • AGENTS.md - Agent definitions
  • .context/architecture.md - System architecture
  • .context/decisions.md - Architectural decisions
  • .context/known-issues.md - Known issues
  • .context/deployment.md - Deployment guide

production_pilot.py

Full production workflow script. Autonomous mission runner that uses cco as the control plane.

Basic Usage

bash
python scripts/production_pilot.py --repo /path/to/repo --mission "task description"

Features

  • Autonomous mission runner above cco
  • Uses cco as control plane
  • Supports API key configuration
ℹ️

This script is the foundation for the cco-supervisor command used in autonomous workflows.

benchmark_num_ctx.py

Context benchmarking script. Measures context usage across different configurations.

Basic Usage

bash
python scripts/benchmark_num_ctx.py

Features

  • Measures context usage across different configs
  • Outputs results to docs/benchmarks/

build_user_guide_docx.py

Builds the user guide as a Word document (.docx).

Basic Usage

bash
python scripts/build_user_guide_docx.py
ℹ️

Generates a Word document from the HTML user guide sources for offline distribution.

build_report_dashboard.py

Builds the observatory dashboard for run tracking and analytics.

Basic Usage

bash
python scripts/build_report_dashboard.py
ℹ️

Updates the docs/observatory/index.html dashboard with latest benchmark and run data.