---
name: clock-anything
description: Compute deterministic Critical Path Method (CPM) timelines, backward launch cutoffs, parallelizable prep checklists, expedite fee-vs-days ROI comparisons, US/UK/SG/HK/EU holiday & leap-year roll-forwards, and read-only official portal checks across entity/EIN, IP/USPTO/PCT, FDA/CE/FCC, freight/customs, and cloud/app-store launch gates via REST, MCP, or Treg Hub. Strictly $0 billed on HTTP 422, DAG cycles, invalid dates/jurisdictions, or errors.
---

# Clock-Anything — AI Agent Integration Skill

Use **Clock-Anything** (`https://clock.fastmesh.dev`) whenever an agent or operations pipeline needs deterministic critical-path scheduling, backward cutoff dates from a target launch date, parallel-vs-serial days-saved math, expedite ROI comparisons, statutory holiday roll-forwards, or read-only official agency portal status checks.

> **Disclaimer**: Informational timeline planning and public portal checks only; NOT licensed legal, regulatory, customs, tax, or CPA advice.

## Core Endpoints & Channels

- **5-Second Try-Now Gantt UI**: `https://clock.fastmesh.dev/`
- **Remote MCP Server (JSON-RPC 2.0)**: `POST https://clock.fastmesh.dev/mcp`
- **Plan Critical Path (`POST`)**: `https://clock.fastmesh.dev/api/plan` (`$0.025` / `25,000` micros)
- **Compare Standard vs Expedited (`POST`)**: `https://clock.fastmesh.dev/api/compare` (`$0.035` / `35,000` micros)
- **Official Public Portal Check (`POST`)**: `https://clock.fastmesh.dev/api/portal-check` (`$0.020` / `20,000` micros; `$0.002` / `10%` repeat-tenant cache tier)
- **Multi-Jurisdiction Batch (`POST`)**: `https://clock.fastmesh.dev/api/batch` (`$0.015` / `15,000` micros per item, capped by `max_budget_micros`)
- **Catalog & Scenarios (`GET`)**: `https://clock.fastmesh.dev/api/catalog`
- **Holidays & Leap-Year Lookup (`GET`)**: `https://clock.fastmesh.dev/api/holidays?jurisdiction=US&year=2026` (`$0.010` / `10,000` micros)
- **Pricing & Creem Credit Packs (`GET`)**: `https://clock.fastmesh.dev/api/pricing`
- **Tenant Balance (`GET`)**: `https://clock.fastmesh.dev/api/balance`
- **OpenAPI 3.1.0 Specification (`GET`)**: `https://clock.fastmesh.dev/openapi.json`
- **Creem Webhook Ingress (`POST`)**: `https://clock.fastmesh.dev/webhooks/creem` (HMAC-SHA256 via `CREEM_WEBHOOK_SECRET`)
- **Treg Hub Package (`0%` commission)**: `clock-anything` (`treg_hub/recipe.json`)
- **Full Discovery Index (`GET`)**: `https://clock.fastmesh.dev/llms.txt`

## Guarantees for Autonomous Agents

1. **Strict `$0` on HTTP `422`, Cycles & Errors**: Cyclic custom DAGs, invalid ISO dates (e.g., `2025-02-29` non-leap year or `2026-02-30`), unsupported jurisdictions, unknown scenarios, and upstream portal failures return `{ "ok": false, "charged_micros": 0, "billed_micros": 0 }`.
2. **Prepaid Non-Expiring Creem Credits (Zero Negative Balance)**: Credits are managed in micro-USD (`1 USD = 1,000,000 micros`) on a SQLite WAL (`BEGIN IMMEDIATE`) ledger (`$9` Starter, `$29` Pro +20%, `$99` Scale +30%, `$299` Enterprise +40%). No monthly minimums or overage surprises.
3. **Deterministic CPM + Exact Calendar Math**: Forward pass (`ES`/`EF`), backward pass (`LS`/`LF`), total/free float, critical chain extraction, `serial_total_days - parallel_critical_days`, and statutory roll-forwards (`35 U.S.C. 21`, OPM observed holidays, UK Bank Holidays, EUIPO Rule 134, SG MOM, HK General Holidays, leap-year Feb 29 month clamping).
4. **7d-30d Cross-Tenant Archive Cache**: `POST /api/portal-check` probes only allowlisted official `https://` public portals (zero credentials required, `$2.00` global external spend cap) and caches verified hits for 7–30 days (`10%` recheck tier on repeat tenant hits; `$0` on upstream failure).

---

## Option 1: Calling via Remote MCP (`POST https://clock.fastmesh.dev/mcp`)

Six JSON-RPC 2.0 tools are exposed via `tools/list` and `tools/call`:

| MCP Tool | Purpose | Key Arguments |
| :--- | :--- | :--- |
| `clock_plan` | Forward or backward CPM critical-path schedule | `category`, `scenario`, `jurisdiction`, `start_date`, `target_date`, `expedite`, `tasks` |
| `clock_compare` | Standard vs expedited ROI comparison & ranking | `scenario`, `category`, `jurisdiction`, `start_date`, `daily_delay_cost_usd`, `scenarios` |
| `clock_portal_check` | Read-only official portal check (7d-30d cache) | `portal_id`, `max_age_s`, `no_cache`, `confirm` |
| `clock_batch` | Concurrent multi-jurisdiction evaluation with budget cap | `items`, `max_budget_micros`, `max_workers` |
| `clock_holidays` | Statutory holiday calendar & leap-year lookup | `jurisdiction`, `year` |
| `clock_catalog` | List all 5 categories and 18 built-in scenarios | *(none)* |

### MCP `tools/call` Example

```bash
curl -fsSL -X POST "https://clock.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $CLOCK_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "clock_plan",
      "arguments": {
        "category": "ip_trademark_patent",
        "scenario": "uspto_office_action",
        "jurisdiction": "US",
        "start_date": "2026-06-01",
        "expedite": false
      }
    }
  }'
```

---

## Option 2: Calling via REST API

### 1. Entity Formation + IRS EIN + PSP (`entity_tax_psp`)

```bash
curl -fsSL -X POST "https://clock.fastmesh.dev/api/plan" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $CLOCK_API_KEY" \
  -d '{
    "category": "entity_tax_psp",
    "scenario": "us_de_llc_ein_psp",
    "jurisdiction": "US",
    "start_date": "2026-06-01",
    "expedite": false,
    "daily_delay_cost_usd": 400
  }'
```

### 2. Trademark & Patent Deadlines + Expedite ROI (`ip_trademark_patent`)

```bash
curl -fsSL -X POST "https://clock.fastmesh.dev/api/compare" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $CLOCK_API_KEY" \
  -d '{
    "category": "ip_trademark_patent",
    "scenario": "uspto_trademark",
    "jurisdiction": "US",
    "start_date": "2026-06-01",
    "daily_delay_cost_usd": 200
  }'
```

### 3. Product Compliance + Official Portal Check (`product_compliance`)

```bash
curl -fsSL -X POST "https://clock.fastmesh.dev/api/portal-check" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $CLOCK_API_KEY" \
  -d '{
    "portal_id": "fda_openfda"
  }'
```

### 4. Trade & Logistics Backward Launch Cutoff (`trade_logistics`)

```bash
curl -fsSL -X POST "https://clock.fastmesh.dev/api/plan" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $CLOCK_API_KEY" \
  -d '{
    "category": "trade_logistics",
    "scenario": "peak_season_backward",
    "jurisdiction": "US",
    "target_date": "2026-11-15",
    "expedite": false
  }'
```

### 5. Multi-Jurisdiction Batch Comparison (`POST /api/batch`)

```bash
curl -fsSL -X POST "https://clock.fastmesh.dev/api/batch" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $CLOCK_API_KEY" \
  -d '{
    "max_budget_micros": 100000,
    "items": [
      { "category": "entity_tax_psp", "scenario": "us_de_llc_ein_psp", "jurisdiction": "US", "start_date": "2026-06-01" },
      { "category": "entity_tax_psp", "scenario": "uk_ltd_vat_psp", "jurisdiction": "UK", "start_date": "2026-06-01" },
      { "category": "entity_tax_psp", "scenario": "sg_acra_corp_psp", "jurisdiction": "SG", "start_date": "2026-06-01" },
      { "category": "digital_infra", "scenario": "a2p_10dlc_sms", "jurisdiction": "US", "start_date": "2026-06-01" }
    ]
  }'
```

---

## Option 3: Calling via QuickJS `treg hub` (`0%` Commission)

```bash
treg call clock-anything --data '{
  "action": "plan",
  "category": "trade_logistics",
  "scenario": "matson_fast_boat",
  "jurisdiction": "US",
  "target_date": "2026-11-15",
  "max_cost_micros": 50000
}'
```

---

## Error Recovery Rules for Autonomous Agents

- **HTTP `422` (`charged_micros: 0`)**: Inspect `error_code` (`dag_cycle`, `invalid_date`, `invalid_jurisdiction`, `invalid_scenario`, `invalid_category`). Fix the offending field or remove the cycle in `tasks` before retrying; cost was `$0`.
- **HTTP `402` (`insufficient_funds`)**: Top up prepaid credits via `GET /api/pricing` Creem checkout links (`$9` Starter, `$29` Pro, `$99` Scale, `$299` Enterprise); webhook credits settle via `/webhooks/creem`.
- **Batch Budget Control**: Always set `max_budget_micros` on `POST /api/batch` and `X-Max-Cost-Micros` on Treg Hub calls so multi-jurisdiction sweeps never exceed your task budget.
- **Support**: `ops@fastmesh.dev`
