# Shorts automation control

Dashboard: `https://shorts.archivedpiece.com`

## Current state

The service is production-safe for the credential-free preparation stage:

- SQLite queue and candidate records
- YouTube source setting
- Six independent rating lanes: hook, retention, clarity, shareability, platform fit, safety/rights
- Threshold gate (default 85)
- Safety/rights veto at 90
- Readiness endpoint
- Publishing hard-disabled until integrations are explicitly configured

## API smoke test

```bash
curl -u control:... https://shorts.archivedpiece.com/api/health
curl -u control:... https://shorts.archivedpiece.com/api/readiness
curl -u control:... https://shorts.archivedpiece.com/api/agents
curl -u control:... https://shorts.archivedpiece.com/api/summary
```

## Required values before enabling publishing

Do not paste secrets into the dashboard or chat. Store them in a protected environment file used by the worker:

```env
SOURCE_URL=https://www.youtube.com/@your-authorized-source
AGENT_API_KEY=
YOUTUBE_CLIENT_ID=
YOUTUBE_CLIENT_SECRET=
TIKTOK_CLIENT_KEY=
TIKTOK_CLIENT_SECRET=
```

YouTube requires OAuth for the destination channel. TikTok requires an approved Content Posting API app and `video.publish` authorization. The system must only process source material you own or have permission to republish.

## Gate contract

A candidate needs exactly six ratings, each 0–100:

1. hook
2. retention
3. clarity
4. shareability
5. platform_fit
6. safety_rights

Approval requires average >= threshold, median >= threshold - 3, at least four scores >= 80, safety_rights >= 90, and no warnings. `publishing_enabled` remains false until the platform adapters are installed and verified.
