← Receivers

factory:size

factory family

How big is this change — the tier `.claude/scripts/do-tier.sh` returns for the same paths, answered where a Worker can ask (a Worker cannot run a shell script, which is the only reason the Size card at factory flow.ts:306 is a gap). Zero real paths is REFUSED as `unsized`, mirroring the script's exit 3: absence of recon must not read as simplicity. The pin ladder in the response is a pure function of the tier; the surfaces are additive obligation, never a second gate selector

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
public
The class of authority the caller must already hold, decided from the attested context with no round trip.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/factory:size \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "paths": <string[]> }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • paths string[] required
  • intent string optional

Response

What comes back from the call.

  • ok boolean
  • tier PATCH | FIX | FEATURE | SCHEMA
  • spine string
  • classifier string
  • ceilingTokens number
  • pins string[]
  • surfaces string[]
  • risk string
  • ratcheted boolean
  • produces object[]
  • gates object[]
  • error string

Traffic

Every call to factory:size, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names factory:size, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:173
Workflow 5
  • one.ie/web/src/lib/factory/flow.ts:274
  • one.ie/web/src/lib/factory/recon.ts:11
  • one.ie/web/src/lib/factory/signal-gates.ts:24
  • one.ie/web/src/lib/factory/tier.ts:249
  • one.ie/web/src/lib/resolvers/factory.ts:179
Tests 2
  • one.ie/web/src/lib/factory/gap-parity.test.ts:14
  • one.ie/web/src/lib/factory/signal-gates.test.ts:45
→

Answered by

factory:size one.ie/web/src/lib/resolvers/factory.ts:651 Dispatched through POST /api/ask/factory:size, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "paths": {
      "maxItems": 2000,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "intent": {
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "paths"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "tier": {
      "type": "string",
      "enum": [
        "PATCH",
        "FIX",
        "FEATURE",
        "SCHEMA"
      ]
    },
    "spine": {
      "type": "string"
    },
    "classifier": {
      "type": "string"
    },
    "ceilingTokens": {
      "type": "number"
    },
    "pins": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "surfaces": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "risk": {
      "type": "string"
    },
    "ratcheted": {
      "type": "boolean"
    },
    "produces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "what": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "what",
          "source"
        ]
      }
    },
    "gates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "what": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "what",
          "source"
        ]
      }
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}