{"uid":"cap_I6RqR0dwhywGIPxTIOSpu","slug":"cms-widow-orphan-page-plan-validator-c73571bc","name":"CMS Widow-Orphan Page Plan Validator","description":"An agent that paginates an exported CMS document needs its proposed page breaks checked against orphan widow and keep-next constraints and the minimum possible page count.","url":"https://detect.halowerk.com/v1/cms/cms-widow-orphan-page-plan?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"artifact":{"type":"object","required":["paragraphs","page_lines","claimed_breaks"],"properties":{"page_lines":{"type":"integer","maximum":128,"minimum":1},"paragraphs":{"type":"array","items":{"type":"object","required":["lines","orphans","widows","keep_next"],"properties":{"lines":{"type":"integer","maximum":64,"minimum":1},"widows":{"type":"integer","maximum":64,"minimum":1},"orphans":{"type":"integer","maximum":64,"minimum":1},"keep_next":{"type":"boolean"}},"additionalProperties":false},"maxItems":16,"minItems":1},"claimed_breaks":{"type":"array","items":{"type":"integer","maximum":1024,"minimum":1},"maxItems":1024,"minItems":1}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OkoPGyJHUQLf0PISKEh4q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates proposed page break positions in a CMS document against widow, orphan, and keep-next constraints and returns the minimum valid page count.","exampleAgentPrompt":"Check whether these page breaks are valid for my CMS document: I have 3 paragraphs (8 lines with orphan/widow min 2, keep-next false; 5 lines with orphan/widow min 2, keep-next true; 4 lines with orphan/widow min 2, keep-next false), a page capacity of 10 lines, and claimed breaks at lines 10 and 20 — are the breaks valid and what's the minimum page count?","exampleUseCases":[{"title":"Paginating a multi-section article export","prompt":"I'm exporting a 12-paragraph CMS article with a page capacity of 40 lines. My pagination engine proposed breaks at lines 40, 80, and 120. Can you verify those breaks don't create any orphans or widows (minimum 2 lines each) and confirm the minimum number of pages needed?"},{"title":"Enforcing keep-next for heading-body pairs","prompt":"My CMS layout has headings that must stay with the following paragraph using keep-next. I have 8 paragraphs, some with keep-next true, with a page line limit of 32. Check whether my claimed breaks at positions 32 and 64 respect all keep-next, orphan, and widow constraints."},{"title":"Finding minimum page count for a dense document","prompt":"I have a dense CMS document with 16 paragraphs at 10 lines each, with orphan and widow minimums of 3, and a page capacity of 25 lines. My tool claimed it fits in 7 pages with breaks at certain positions — can you validate those breaks and tell me the true minimum page count?"}],"resultDescription":"Returns whether the claimed page break positions satisfy all widow, orphan, and keep-next constraints for the given paragraphs and page line capacity, and reports the minimum possible page count required for the content.","failureModes":["Invalid paragraph line counts outside 1-64 range return a validation error","claimed_breaks containing values outside 1-1024 are rejected","page_lines outside 1-128 causes a schema error","More than 16 paragraphs or 1024 claimed breaks exceed schema limits and are rejected","Malformed or missing required fields return a 400-level error"],"whenToPreferThis":"Use this endpoint when an AI agent or CMS pipeline has proposed page breaks for an exported document and needs an authoritative check that those breaks satisfy typographic constraints (widow lines, orphan lines, keep-next paragraph pairs) and to confirm the minimum page count. Prefer this over manual logic when the constraint interactions between keep-next, widow, and orphan rules across multiple paragraphs make correctness difficult to guarantee without exhaustive checking.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:41:00.028Z","isFirstParty":false,"canonicalSlug":"cms-widow-orphan-page-plan-validator-c73571bc"}