---
name: evolve-anything
description: Polymorphic 5-operation product evolution and portfolio allocation engine for AI agents and SaaS builders (gap_discovery, combo_synthesizer, zombie_auditor, sibling_mutator, portfolio_allocator). Returns tamper-evident SHA-256 EvolutionReceipt JSON with strict $0 billing on HTTP 422 invalid inputs, cyclic dependencies, $0 zombie rejections, misses, or upstream errors.
---

# Evolve-Anything Agent Skill

`Evolve-Anything` (`https://evolve.fastmesh.dev`) is a flat, polymorphic, deterministic product evolution and portfolio allocation engine built for autonomous AI agents, SaaS founders, FinOps pipelines, and API marketplace operators.

Every evolution request returns a standardized, tamper-evident **`EvolutionReceipt`** sealed with **`payload_sha256`**, **`result_sha256`**, and **`attestation_sha256`**, plus **`zero_trace_resale_attestation`**.

## Hard Guarantees

1. **Strict `$0` Billing on Miss, Rejection & HTTP `422`**: Charges apply **only** for deterministic `EVOLVED` (`http_status: 200`) verdicts backed by a non-empty `result` object and a valid 64-hex `attestation_sha256`. Empty inputs, malformed JSON, cyclic graphs (`A->B->A`, `A->B->C->A`), zero/negative-margin combos, `$0`-revenue sibling requests (`HTTP 422`), or upstream outages strictly record `billed_micros: 0` with a non-empty `zero_bill_reason`.
2. **Cross-Tenant Adaptive ArchiveCache (7d-30d) & 10% Recheck Tier**: Verified runs enter a SQLite WAL `ArchiveCache` (7d initial TTL expanding 1.5x up to 30d). New-tenant cache hits bill `100%` (`$0` upstream compute cost); same-tenant rechecks (`recheck: true`) bill **`10%`** of base operation pricing; `no_cache: true` forces live execution.
3. **Zero Conversation, Ledger & Trajectory Resale**: Customer catalogs, unit COGS tables, revenue ledgers, and execution traces are never sold, licensed, or used to train third-party models. Sensitive credentials are automatically redacted (`trace_redaction.pii_and_secrets_stripped: true`).

## Supported Operations, MCP Tools & Micro-USD Pricing

| Operation (`operation`) | Flat MCP Tool | Use When You Need To | Base Price | 10% Recheck |
| :--- | :--- | :--- | :---: | :---: |
| `gap_discovery` | `evolve_gap_discovery` | Cross-check catalog supply, miss search logs, and open bounties into ranked zero-supply gaps | `$0.025` (`25000`) | `$0.0025` |
| `combo_synthesizer` | `evolve_combo_synthesizer` | Synthesize acyclic 2-to-3-step typed DAGs with COGS/margin proof (rejects cycles & `<=0%` margin) | `$0.035` (`35000`) | `$0.0035` |
| `zombie_auditor` | `evolve_zombie_auditor` | Audit 72h public HTTPS + checkout gates (`FREEZE_LAUNCH_GATE`), 14d `$0` kills (`KILL`), and salvageable modules | `$0.020` (`20000`) | `$0.0020` |
| `sibling_mutator` | `evolve_sibling_mutator` | Expand proven (`revenue_usd > 0`) earners into `vertical`, `bundle`, and `mcp-enterprise` siblings (blocks `$0` zombies) | `$0.040` (`40000`) | `$0.0040` |
| `portfolio_allocator` | `evolve_portfolio_allocator` | Compute `net_profit / (token_cost + infra_cost)`, normalized weights (`1.0`), `19.5%` cap, and bottom-30% prune order | `$0.025` (`25000`) | `$0.0025` |

Batch execution (`evolve_batch` / `POST /evolve/batch`) processes heterogeneous arrays concurrently under a hard `max_budget_micros` ceiling, billing `$0` for any rejected or HTTP `422` row.

## Quick Invocation

### 1. Native Streamable MCP (`POST https://evolve.fastmesh.dev/mcp`)

Discover all 6 flat tools (`evolve_gap_discovery`, `evolve_combo_synthesizer`, `evolve_zombie_auditor`, `evolve_sibling_mutator`, `evolve_portfolio_allocator`, `evolve_batch`):

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}
```

Execute `evolve_combo_synthesizer`:

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "evolve_combo_synthesizer",
    "arguments": {
      "use_default_snapshot": true,
      "min_steps": 2,
      "max_steps": 3,
      "min_margin_pct": 60.0
    }
  }
}
```

Execute `evolve_portfolio_allocator`:

```json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "evolve_portfolio_allocator",
    "arguments": {
      "portfolio": [
        {"product_id": "verify_anything", "net_profit_usd": 420.0, "token_cost_usd": 4.0, "infra_cost_usd": 8.0, "current_price_usd": 29.0},
        {"product_id": "diff_anything", "net_profit_usd": 190.0, "token_cost_usd": 3.0, "infra_cost_usd": 7.0, "current_price_usd": 19.0}
      ],
      "prune_fraction": 0.30
    }
  }
}
```

### 2. HTTP REST API (`POST https://evolve.fastmesh.dev/evolve`)

Single operation call (`gap_discovery` against the fleet harvest snapshot):

```bash
curl -sS -X POST https://evolve.fastmesh.dev/evolve \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ${EVOLVE_API_KEY}" \
  -d '{
    "operation": "gap_discovery",
    "payload": {"use_default_snapshot": true, "top_k": 5}
  }'
```

Concurrent heterogeneous batch with hard budget cap (`POST /evolve/batch`):

```bash
curl -sS -X POST https://evolve.fastmesh.dev/evolve/batch \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ${EVOLVE_API_KEY}" \
  -d '{
    "max_budget_micros": 150000,
    "items": [
      {"operation": "gap_discovery", "payload": {"use_default_snapshot": true, "top_k": 3}},
      {"operation": "zombie_auditor", "payload": {"products": [{"product_id": "draft_1", "age_hours": 80, "public_https": false, "creem_checkout_live": false, "revenue_usd": 0.0}]}},
      {"operation": "sibling_mutator", "payload": {"species": {"product_id": "a01_verify_anything", "slug": "verify_anything", "revenue_usd": 450.0, "our_price_usd": 29.0}}}
    ]
  }'
```

### 3. Via `treg hub` (0% Seller Commission, `$0` on Miss/422)

```bash
treg call evolve-anything \
  --data '{"operation":"combo_synthesizer","payload":"{\"use_default_snapshot\":true}"}'
```

## Creem Prepaid Credit Packs (Non-Expiring, One-Time)

| Pack | Price | Bonus | Credit Value | Checkout |
| :--- | :---: | :---: | :---: | :--- |
| **Starter** (`sku_evolve_starter_9`) | `$9` | `+11%` | `$10.00` (`10,000,000` micros) | `https://www.creem.io/product/prod_evolve_anything_starter_9` |
| **Builder (Recommended)** (`sku_evolve_builder_29`) | `$29` | `+21%` | `$35.00` (`35,000,000` micros) | `https://www.creem.io/product/prod_evolve_anything_builder_29` |
| **Scale** (`sku_evolve_scale_99`) | `$99` | `+31%` | `$130.00` (`130,000,000` micros) | `https://www.creem.io/product/prod_evolve_anything_scale_99` |
| **Enterprise** (`sku_evolve_enterprise_299`) | `$299` | `+40%` | `$420.00` (`420,000,000` micros) | `https://www.creem.io/product/prod_evolve_anything_enterprise_299` |

## Offline Tamper-Evident Receipt Verification (Python 3 Stdlib)

Every `EvolutionReceipt` seals `result_sha256` and `attestation_sha256` so agents and finance auditors can detect tampering offline:

```python
import hashlib
import hmac
import json

def verify_receipt_result_hash(receipt: dict) -> bool:
    """Verify canonical SHA-256 integrity of the EvolutionReceipt result payload."""
    expected = str(receipt.get("result_sha256") or "").strip().lower()
    if len(expected) != 64:
        return False
    canonical = json.dumps(
        receipt.get("result") or {},
        sort_keys=True,
        separators=(",", ":"),
        ensure_ascii=False,
    )
    actual = hashlib.sha256(canonical.encode("utf-8")).hexdigest()
    return hmac.compare_digest(actual, expected)
```

Full attestation verification (including `receipt_id`, `payload_sha256`, `billed_micros`, and `timestamp_utc`) is also exposed via `EvolveAnythingEngine.verify_receipt_signature(receipt)` in `src/engine.py`.

## Support & Links

- Web Console & Try-Now: `https://evolve.fastmesh.dev/`
- Remote MCP: `https://evolve.fastmesh.dev/mcp`
- OpenAPI 3.1.0: `https://evolve.fastmesh.dev/openapi.json`
- AI Discovery Index: `https://evolve.fastmesh.dev/llms.txt`
- Support: `ops@fastmesh.dev`
