# sc-orchestrator

Control-only, package-first orchestrator for:
- Project management automation
- vCISO daily posture checks
- Quoting / lifecycle proposals
- Backup monitoring

## Quick Start

### Using the Reusable Workflow

For child repositories, use the reusable workflow to run the orchestrator:

```yaml
# .github/workflows/orchestrator.yml
name: Run Orchestrator

on:
  schedule:
    - cron: '0 9 * * *'  # Daily at 9 AM
  workflow_dispatch:

jobs:
  orchestrate:
    uses: Szymanski-Consulting-Inc/Orchestrator/.github/workflows/run-orchestrator.yml@release/v0
    with:
      config_path: 'orchestrator.yaml'
      outputs_dir: 'outputs'
      state_dir: 'state'
      logs_dir: 'logs'
      upload_logs: true
```

**Note**: The workflow automatically uploads logs as artifacts named `logs-<repo>-<run-id>` with 14-day retention.

### Direct CLI Usage

```bash
sc-orchestrate --config config/policy.yaml --state-dir .bot/state --outputs-dir outputs --logs-dir logs
```

## Extensibility
- Add new agents under `sc_orchestrator/agents/` (expose `run(...)`).
- Add new connectors under `sc_orchestrator/connectors/` (expose fetchers).
- The orchestrator loads agents enabled in YAML, and fetches each connector once.
