Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Priority Score Calculator

business.priority_score

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

You send one item's criterion values and the weights that matter to you; we return the score together with the contribution of every criterion, so the number can be checked rather than trusted. Scoring is absolute: each value is mapped onto its own fixed rubric, so the same item scores the same today, tomorrow and next quarter, whatever else is waiting to be done. That is the whole difference from business.decision_matrix, which ranks options against each other and therefore moves when the set changes. A criterion can be inverted so that less is better, weighted at zero to document that it was deliberately ignored, or declared missing-tolerant so an incomplete item still scores. Everything runs on decimal arithmetic at 34 digits and rounds HALF_UP to the decimal places you ask for, and the contributions always add up to exactly the score.

Prioritisation arguments are rarely about the weights and almost always about the arithmetic: two spreadsheets disagree, nobody can say which cell is wrong, and the answer changes when a row is added. A scoring service that publishes the contribution of every criterion and guarantees they add up to the total moves the discussion back to the weights, where it belongs.

Reliability

Fully deterministic and reproducible to the digit: everything runs on BigDecimal at 34 significant digits, HALF_UP, then rounds once to your declared decimal places. No floating point is used anywhere, so the same request gives the same score on every machine. Contributions are reconciled to the score by largest remainder — each is rounded, and the leftover unit of the last decimal place goes to the criteria that lost the most in rounding, ties to the earlier one you declared — so a breakdown never drifts from the total beside it. A value outside its rubric is clamped to the rubric and noted rather than refused, because a rubric that breaks the first time reality exceeds it is useless. With normalizeWeights true and every weight zero the score is zero rather than a division by zero. Failures: SCORE_ITEM_INVALID means item is missing, empty, or carries something that is not a decimal. SCORE_WEIGHTS_INVALID means weights is empty, repeats a criterion, or declares a negative weight. SCORE_CRITERION_UNKNOWN means item.values names a criterion weights does not. SCORE_VALUE_MISSING means a criterion has no value and missing is REJECT. SCORE_SCALE_INVALID means a rubric's min is not below its max. SCORE_LIMIT_EXCEEDED means more than 64 values or 64 criteria. None is worth retrying unchanged.

Context footprint

The answer is one row per criterion plus five scalars, so it is bounded by your 64-criterion ceiling and never by your data volume. A successful call costs 1 execution credit.

When to use it

When you need one comparable, reproducible number per item from criteria you can write down, and you want to be able to explain it afterwards.

When the point is to rank a specific set of options against each other, or when the criteria cannot be reduced to numbers with rubrics.

Scope

Note
Turn one item's criterion values into a single weighted score against a fixed rubric, with every contribution shown and reconciled to the total.

Non-goals

  • Does not rank several items, and does not normalise against a population — that is business.decision_matrix, which shares this skill's weighted-sum engine but answers a comparative question
  • Does not invent weights, rubrics or defaults you did not send
  • Does not decide what to work on: a score is an input to that decision
  • Does not store the score or the item

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

math

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
itemobjectYesClosed item being scored, with values and an optional echoed id.
weightsarrayYesBounded array of 1 through 64 closed criteria with unique ids and weights.
normalizeWeightsbooleanNoWhether weights are divided by their total; omit it for true.
scaleintegerNoPublished decimal places; omit it for 4.

Output schema

FieldTypeRequiredDescription
scorenumberYesPublished weighted total at the declared decimal places.
breakdownarrayYesBounded array of 0 through 64 closed contributions that sum to the score.
weightTotalnumberYesSum of weights that took part, skipped criteria excluded.
criteriaUsedintegerYesHow many criteria contributed, equal to breakdown length.
criteriaSkippedarrayYesBounded array of 0 through 64 skipped criterion ids; empty when every criterion took part.
itemIdstringNoEchoed item.id, present only when you supplied one.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"business.priority_score","input":{"item":{"id":"TCK-4711","values":{"impact":8,"effort":3}},"weights":[{"criterion":"impact","weight":0.7,"scale":{"min":0,"max":10}},{"criterion":"effort","weight":0.3,"direction":"LOWER_IS_BETTER","scale":{"min":0,"max":10}}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("business.priority_score", {"item":{"values":{"impact":8,"reach":1000,"effort":3},"id":"TCK-4711"},"weights":[{"criterion":"impact","weight":0.5,"scale":{"min":0,"max":10}},{"criterion":"effort","weight":0.3,"direction":"LOWER_IS_BETTER","scale":{"min":0,"max":10}},{"criterion":"reach","weight":0.2,"scale":{"min":0,"max":2000}}]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
SCORE_ITEM_INVALID400NoThe request payload failed this skill's input validation.
SCORE_WEIGHTS_INVALID400NoThe request payload failed this skill's input validation.
SCORE_CRITERION_UNKNOWN400NoThe request payload failed this skill's input validation.
SCORE_VALUE_MISSING400NoThe request payload failed this skill's input validation.
SCORE_SCALE_INVALID400NoThe request payload failed this skill's input validation.
SCORE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not rank several items, and does not normalise against a population — that is business.decision_matrix, which shares this skill's weighted-sum engine but answers a comparative question
  • Does not invent weights, rubrics or defaults you did not send
  • Does not decide what to work on: a score is an input to that decision
  • Does not store the score or the item
  • Ranking a shortlist of options against each other — use business.decision_matrix
  • Any scoring where the score should move when other items appear
  • Free-form judgement that cannot be written as weighted criteria

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "business.priority_score",
  "input": {
    "item": {
      "values": {
        "impact": 8,
        "reach": 1000,
        "effort": 3
      },
      "id": "TCK-4711"
    },
    "weights": [
      {
        "criterion": "impact",
        "weight": 0.5,
        "scale": {
          "min": 0,
          "max": 10
        }
      },
      {
        "criterion": "effort",
        "weight": 0.3,
        "direction": "LOWER_IS_BETTER",
        "scale": {
          "min": 0,
          "max": 10
        }
      },
      {
        "criterion": "reach",
        "weight": 0.2,
        "scale": {
          "min": 0,
          "max": 2000
        }
      }
    ]
  }
}

Examples

A ticket scored on impact, effort and reach, with effort inverted

Inputjson
{
  "item": {
    "values": {
      "impact": 8,
      "reach": 1000,
      "effort": 3
    },
    "id": "TCK-4711"
  },
  "weights": [
    {
      "criterion": "impact",
      "weight": 0.5,
      "scale": {
        "min": 0,
        "max": 10
      }
    },
    {
      "criterion": "effort",
      "weight": 0.3,
      "direction": "LOWER_IS_BETTER",
      "scale": {
        "min": 0,
        "max": 10
      }
    },
    {
      "criterion": "reach",
      "weight": 0.2,
      "scale": {
        "min": 0,
        "max": 2000
      }
    }
  ]
}
Expected outputjson
{
  "score": 0.41,
  "itemId": "TCK-4711",
  "criteriaUsed": 3,
  "breakdown": [
    {
      "criterion": "impact",
      "rawValue": 8,
      "scaledValue": 0.8,
      "weight": 0.5,
      "normalizedWeight": 0.5,
      "contribution": 0.4,
      "direction": "HIGHER_IS_BETTER"
    },
    {
      "criterion": "effort",
      "rawValue": 3,
      "scaledValue": -0.3,
      "weight": 0.3,
      "normalizedWeight": 0.3,
      "contribution": -0.09,
      "direction": "LOWER_IS_BETTER"
    },
    {
      "criterion": "reach",
      "rawValue": 1000,
      "scaledValue": 0.5,
      "weight": 0.2,
      "normalizedWeight": 0.2,
      "contribution": 0.1,
      "direction": "HIGHER_IS_BETTER"
    }
  ],
  "criteriaSkipped": [],
  "weightTotal": 1
}

An incomplete item on raw weights: one value clamped to its rubric, one criterion skipped, one counted as zero

Inputjson
{
  "weights": [
    {
      "criterion": "impact",
      "weight": 2,
      "scale": {
        "min": 0,
        "max": 10
      }
    },
    {
      "criterion": "effort",
      "weight": 1,
      "missing": "SKIP"
    },
    {
      "criterion": "risk",
      "weight": 1,
      "missing": "ZERO"
    }
  ],
  "normalizeWeights": false,
  "item": {
    "values": {
      "impact": 12
    }
  }
}
Expected outputjson
{
  "breakdown": [
    {
      "criterion": "impact",
      "rawValue": 12,
      "scaledValue": 1,
      "weight": 2,
      "normalizedWeight": 2,
      "contribution": 2,
      "direction": "HIGHER_IS_BETTER",
      "note": "VALUE_CLAMPED_TO_RUBRIC"
    },
    {
      "criterion": "risk",
      "rawValue": 0,
      "scaledValue": 0,
      "weight": 1,
      "normalizedWeight": 1,
      "contribution": 0,
      "direction": "HIGHER_IS_BETTER",
      "note": "MISSING_TREATED_AS_ZERO"
    }
  ],
  "score": 2,
  "weightTotal": 3,
  "criteriaUsed": 2,
  "criteriaSkipped": [
    "effort"
  ]
}
  • Score a ticket or a request the same way every time, so two people agree on the number
  • Publish the arithmetic behind a priority to whoever asks why
  • Keep one rubric in configuration and score against it from several services
  • Score an item whose data is incomplete, deliberately and visibly

Avoid for

  • Ranking a shortlist of options against each other — use business.decision_matrix
  • Any scoring where the score should move when other items appear
  • Free-form judgement that cannot be written as weighted criteria

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysisscoringbusinessprioritization