Agent Runtime Scripts

May 3, 2026 ยท View on GitHub

These entrypoints are the optional repo-side execution surface for the checkout when you are working from Claude Code, Codex CLI, and similar coding-agent CLIs.

Role split:

  • skills/ defines how to do something well and what it should produce
  • flows/ defines how 45ck/prompt-language orchestrates multiple skills
  • scripts/harness/ executes the work over JSON stdin/stdout

Each script reads JSON from stdin and writes a single JSON response to stdout. The reusable logic lives under src/harness/; these files are thin launchers so the repo can run them with Node's tsx loader when an agent wants the package to execute a step directly:

node --import tsx scripts/harness/ingest.ts < request.json

Installed-package users should prefer npx --no-install cm-agent <tool>. Do not use repo-local node --import tsx scripts/harness/*.ts commands unless you are working inside the Content Machine checkout.

Entrypoint Groups

GroupEntrypointsUse
Discoveryskill-catalog.ts, flow-catalog.ts, doctor-report.tsInspect available skills, flows, and environment readiness
Full flowsrun-flow.ts, generate-short.ts, longform-to-shorts.ts, reverse-engineer-winner.tsRun multi-step or run-scoped work
Stage runnersbrief-to-script.ts, script-to-audio.ts, timestamps-to-visuals.ts, video-render.tsExecute a known stage directly
Review/provenanceasset-ledger.ts, caption-export.ts, publish-prep.ts, publish-prep-review.tsValidate outputs and preserve rights/review evidence
Source and libraryingest.ts, source-media-analyze.ts, media-index.ts, style-profile-library.tsPrepare or catalog reusable inputs
Longform selectionlongform-highlight-select.ts, highlight-approval.ts, boundary-snap.tsPick, approve, and clean clip boundaries before render
Longform extractionlongform-clip-extract.tsCut approved source ranges into clip-local video, audio, timestamps, and visuals
Story assetsreddit-story-assets.tsGenerate reusable Reddit/story visual assets
Install/packageinstall-skill-pack.tsMaterialize .content-machine/ into another agent-aware repository

Most 45ck/prompt-language flows write under runs/<run-id>/. Direct skills may instead write to explicit output paths provided in the request. Humans normally ask Claude Code, Codex CLI, Cursor, or another agent harness for the outcome; these JSON-stdio scripts are the execution surface the harness can call when it needs deterministic repo-side work.

Fallback when npm bins are unavailable: node ./node_modules/@45ck/content-machine/agent/run-tool.mjs <tool>.

When using a materialized pack in another project, pass the installed directories explicitly:

cat <<'JSON' | npx --no-install cm-agent run-flow
{
  "flowsDir": ".content-machine/flows",
  "flow": "generate-short",
  "runId": "demo-run",
  "input": { "topic": "Example short" }
}
JSON

Longform planning uses the same installed flow surface:

cat <<'JSON' | npx --no-install cm-agent run-flow
{
  "flowsDir": ".content-machine/flows",
  "flow": "longform-to-shorts",
  "runId": "source-clips",
  "input": {
    "timestampsPath": "input/source/timestamps.json",
    "sourceMediaPath": "input/source/source.mp4",
    "maxCandidates": 3
  }
}
JSON

See skills/*/SKILL.md for skill guides and flows/* for flow guides.