{
  "product_id": "elyreon.workflow.diagnose",
  "version": "1.0.0",
  "status": "AVAILABLE",
  "billing_mode": "live",
  "title": "ELYREON Workflow Diagnostics — bounded agent-facing autopsy",
  "summary": "Runs the existing ELYRAON Workflow Autopsy engine over a bounded workflow export or canonical execution-event log and returns normalised findings. The engine is the shipped one; this product adds a schema, resource bounds, redaction reporting and a receipt, not a second diagnostic engine.",
  "capability": "workflow.diagnose",
  "customer": {
    "segment": "AI agents operating automation platforms",
    "buyer": "automation agency or platform team",
    "job_to_be_done": "explain why an automation run failed without a human reading the log"
  },
  "use_cases": [
    "n8n workflow static check",
    "failed-run event triage",
    "timeout and duplicate detection"
  ],
  "input_schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "artifact_kind": {
        "enum": [
          "n8n_workflow",
          "event_array",
          "event_object",
          "event_jsonl"
        ]
      },
      "content": {
        "type": "string",
        "maxLength": 1048576,
        "description": "raw artifact text (UTF-8), max 1 MiB at the gateway"
      },
      "include_markdown": {
        "type": "boolean",
        "default": false
      }
    },
    "required": [
      "artifact_kind",
      "content"
    ]
  },
  "output_schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "product_id": {
        "type": "string"
      },
      "version": {
        "type": "string"
      },
      "generated_at": {
        "type": "string"
      },
      "report_kind": {
        "type": "string"
      },
      "report_version": {
        "type": "string"
      },
      "findings": {
        "type": "array",
        "items": {
          "type": "object"
        }
      },
      "counts": {
        "type": "object"
      },
      "redaction": {
        "type": "object"
      },
      "markdown": {
        "type": [
          "string",
          "null"
        ]
      },
      "engine": {
        "type": "object"
      },
      "artifact": {
        "type": "object"
      },
      "limitations": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "provenance": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "source_id": {
              "type": "string"
            },
            "engine": {
              "type": "string"
            },
            "endpoint": {
              "type": "string"
            },
            "request_digest": {
              "type": "string"
            },
            "retrieved_at": {
              "type": "string"
            },
            "rows_examined": {
              "type": "integer"
            },
            "freshness": {
              "type": "object"
            }
          },
          "required": []
        }
      }
    },
    "required": [
      "product_id",
      "version",
      "generated_at",
      "report_kind",
      "findings",
      "counts",
      "redaction",
      "engine",
      "artifact"
    ]
  },
  "auth": {
    "schemes": [
      "api_key",
      "mcp_oauth"
    ],
    "scopes": [
      "arsenal.workflow.read"
    ],
    "tenant_isolation": "artifacts are processed per-request in a temp dir that is destroyed after the call; nothing is persisted across tenants and SQLite recording is disabled"
  },
  "pricing": {
    "model": "per_call",
    "unit": "call",
    "list_price_minor": 250,
    "ceiling_minor": 900,
    "approved": true,
    "approval_ref": "INTERNAL-REC-2026-11-14-OWNER-ARSENAL-LIST-PRICES",
    "minimum_charge_minor": 0
  },
  "resources": {
    "max_input_bytes": 1048576,
    "timeout_ms": 30000,
    "max_upstream_calls": 0,
    "max_output_rows": 2000,
    "max_concurrency": 4
  },
  "errors": [
    "invalid_input",
    "unauthorized",
    "forbidden_scope",
    "insufficient_credit",
    "service_disabled",
    "upstream_unavailable",
    "resource_limit_exceeded",
    "timeout",
    "idempotency_conflict",
    "internal_error"
  ],
  "retry": {
    "idempotency": "required",
    "safe_to_retry": true,
    "on_failure": "released, no charge"
  },
  "data": {
    "sources": [
      "ELYRAON Workflow Autopsy 0.2.x (offline engine, no network, no imported code execution)"
    ],
    "licensing": "ELYREON-owned engine; the product licence for the engine's own distribution is separate and still under legal review (EULA not approved) — this service does not grant a redistribution right",
    "restrictions": [
      "engine caps: 64 MiB input, 250000 events",
      "redaction is best-effort; reports may contain operational identifiers",
      "no vendor-specific run export parser"
    ]
  },
  "upstream": {
    "engine": "workflow_autopsy",
    "endpoints": [
      "workflow-autopsy CLI (subprocess)"
    ]
  },
  "limitations": [
    "no root-cause proof, only evidence",
    "markdown output is the engine's own text, not re-generated"
  ],
  "docs": "docs/products/workflow.md",
  "readiness": {
    "implementation": "present",
    "tests": "test/workflow.test.ts",
    "benchmark": "units in UNIT_ECONOMICS.md"
  }
}