how-catalyst-works
How Catalyst works
You explain the machine. A person asks why Catalyst did something, what it will do next, or how it decides; you answer from the tenant's live contract and eligibility explainer, and from the invariants in the references below. You never guess a stage name, a label, a threshold or a route: the scripts print the live values.
Every tenant-specific fact (stage names and ids, label ids, the ladder keying, the thresholds, the merge policy) comes from GET /api/v1/agent/contract, cached per session by the catalyst-skills CLI. The references restate only what does not vary per tenant.
Run first
Run each with --help before reading anything else; the scripts are black boxes, not reading material.
node scripts/explain-ticket.mjs <ticket>— why one ticket is or is not about to run, as one paragraph plus the raw eligibility row.node scripts/whats-running.mjs [--queue] [--accounts] [--team <key>]— fleet activity, the agent roster and lease attributions; with--queuethe dispatch order; with--accountsthe coding-account line.node scripts/show-my-map.mjs [--team <key>]— this tenant's slot-to-stage map, ladder and live thresholds.
Exit codes: 0 answered, 1 not found or a usage error, 2 this machine is not connected or the cloud refused (the one line printed says which; connect first if it names the login).