Summarize Redline Statistics
legal.redline_statistics
Overview
You send INSERT, DELETE, REPLACE and MOVE changes with their old and new text. We count changes, words and characters by type, section and author, using ICU word boundaries when you ask for UNICODE. Raw text is not returned and materiality is not judged. A successful call costs 2 execution credits.
Redline summaries are counting problems; returning the edited prose or a materiality score would be a different product.
Reliability
REDLINE_LIMIT_EXCEEDED — trigger: more than 100000 changes; retryable: no; next: split the list. REDLINE_TEXT_LIMIT_EXCEEDED — trigger: more than 10 MiB of oldText plus newText; retryable: no; next: trim the text.
Context footprint
Counts only; source phrases stay off the result. A successful call costs 2 execution credits.
When to use it
When the change list is already computed and you need counts by type, section and author.
When you still need a diff engine or a view on whether a change is material.
Powered by ICU4J UAX#29 word boundaries when wordSegmentation is UNICODE, otherwise whitespace splits.
Scope
Non-goals
- Does not generate a diff
- Does not judge materiality
- Does not parse track-changes markup
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| changes | array | No | Already computed redline changes, 0 through 100001 entries; runtime accepts at most 100000. Omit it for none. |
| wordSegmentation | string | No | UNICODE or WHITESPACE; omit it for UNICODE. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| changeCount | integer | Yes | Number of change objects counted. |
| byType | object | Yes | Closed per-type totals keyed by INSERT, DELETE, REPLACE and MOVE, each with changes, words, oldWords and newWords. |
| bySection | object | Yes | Per-section INSERT, DELETE, REPLACE and MOVE counts keyed by the supplied section label or (none). |
| byAuthor | object | Yes | Per-author INSERT, DELETE, REPLACE and MOVE counts keyed by the supplied author label or (none). |
| insertedCharacters | integer | Yes | Inserted character total. |
| deletedCharacters | integer | Yes | Deleted character total. |
| changeRatio | number | No | Length-weighted change ratio; omit it when the oldText denominator is zero. |
| changeRatioUndefinedReason | string | No | ZERO_DENOMINATOR when changeRatio is omitted. |
| wordSegmentation | string | Yes | UNICODE or WHITESPACE that was applied. |
| assumptions | array | Yes | Caller-visible mechanical assumptions for this answer, such as default weekend days or a grammar version, never a legal conclusion. |
| limitations | string | Yes | Fixed notice that only supplied parameters are applied and that validity, compliance and enforceability are not determined. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"legal.redline_statistics","input":{"changes":[{"type":"INSERT","newText":"payment term"}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("legal.redline_statistics", {"changes":[{"newText":"payment term","section":"5","type":"INSERT","author":"alex"},{"author":"alex","oldText":"ten days","type":"REPLACE","newText":"thirty days","section":"5"}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| REDLINE_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| REDLINE_TEXT_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not generate a diff
- Does not judge materiality
- Does not parse track-changes markup
- Creating the redline
- Scoring negotiating intent
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "legal.redline_statistics",
"input": {
"changes": [
{
"newText": "payment term",
"section": "5",
"type": "INSERT",
"author": "alex"
},
{
"author": "alex",
"oldText": "ten days",
"type": "REPLACE",
"newText": "thirty days",
"section": "5"
}
]
}
}Examples
One insert and one replace in section 5
{
"changes": [
{
"newText": "payment term",
"section": "5",
"type": "INSERT",
"author": "alex"
},
{
"author": "alex",
"oldText": "ten days",
"type": "REPLACE",
"newText": "thirty days",
"section": "5"
}
]
}{
"bySection": {
"5": {
"INSERT": 1,
"DELETE": 0,
"REPLACE": 1,
"MOVE": 0
}
},
"deletedCharacters": 8,
"byAuthor": {
"alex": {
"INSERT": 1,
"DELETE": 0,
"REPLACE": 1,
"MOVE": 0
}
},
"byType": {
"INSERT": {
"changes": 1,
"words": 2,
"oldWords": 0,
"newWords": 2
},
"DELETE": {
"changes": 0,
"words": 0,
"oldWords": 0,
"newWords": 0
},
"REPLACE": {
"changes": 1,
"words": 4,
"oldWords": 2,
"newWords": 2
},
"MOVE": {
"changes": 0,
"words": 0,
"oldWords": 0,
"newWords": 0
}
},
"changeCount": 2,
"changeRatio": 3.875,
"limitations": "Calculations use only the parameters supplied in this call. No implicit legal rule is applied, and the answer does not determine validity, compliance or enforceability.",
"insertedCharacters": 23,
"wordSegmentation": "UNICODE",
"assumptions": [
"Word counts use ICU UAX#29 boundaries when wordSegmentation is UNICODE, otherwise whitespace splits.",
"REPLACE contributes oldWords and newWords separately; MOVE is counted as a relocation, not as insert plus delete words."
]
}No changes leaves the ratio undefined
{
"changes": []
}{
"bySection": {},
"deletedCharacters": 0,
"changeRatioUndefinedReason": "ZERO_DENOMINATOR",
"byAuthor": {},
"byType": {
"INSERT": {
"changes": 0,
"words": 0,
"oldWords": 0,
"newWords": 0
},
"DELETE": {
"changes": 0,
"words": 0,
"oldWords": 0,
"newWords": 0
},
"REPLACE": {
"changes": 0,
"words": 0,
"oldWords": 0,
"newWords": 0
},
"MOVE": {
"changes": 0,
"words": 0,
"oldWords": 0,
"newWords": 0
}
},
"changeCount": 0,
"limitations": "Calculations use only the parameters supplied in this call. No implicit legal rule is applied, and the answer does not determine validity, compliance or enforceability.",
"insertedCharacters": 0,
"wordSegmentation": "UNICODE",
"assumptions": [
"Word counts use ICU UAX#29 boundaries when wordSegmentation is UNICODE, otherwise whitespace splits.",
"REPLACE contributes oldWords and newWords separately; MOVE is counted as a relocation, not as insert plus delete words."
]
}Recommended use cases
- Summarize an already extracted redline list
- Split REPLACE word counts into old and new
Avoid for
- Creating the redline
- Scoring negotiating intent
Related skills
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.