← What YES Means
API
Tokens

Drive What YES Means from your own code

Both metered steps - the decode and the who-decides read - are available over HTTP. A natural use is a newsroom or library voter-guide page: your code sends each measure's official text, shows the quoted answer, and links every claim to its sentence.

The split first: the page does the counting; the model writes the explanation; the page checks it. Sentence numbering, reading grades, negation traps, figures, kinds and jargon come from measurekit.js, which runs in node as well as in the browser. Its reconcile function then checks every quote in a reply word for word against the text, and every figure against the figures in the measure. The app explains; it never recommends a vote.

Base URL and the envelope

Every endpoint lives under https://api.skillsafe.ai/v1/app-api, and every response uses one envelope:

{ "ok": true,  "data":  { ... } }
{ "ok": false, "error": { "code": "...", "message": "...", "status": 402, "details": { ... } } }

The token is minted for this app (the guest call takes {"slug":"what-yes-means"}), so no slug header is needed afterwards. Send it as Authorization: Bearer …. The run body is the input object, sent bare: never wrap it as {"input": {…}}.

StatusCodeMeaning
400validation_errorThe body is not a JSON object, or a required field is missing.
401unauthorizedNo token, or a stale one. Mint a guest token or sign in again.
402insufficient_creditsThe balance is under min_credits. Price with /estimate first.
403forbiddenA guest token tried to run: both tasks are metered and need a personal token.
404not_foundUnknown job id.
429rate_limitedBack off and retry.
5xxserver_errorTransient. Retry with the same Idempotency-Key so a retry never double-bills.

The task field comes first

Every run sends task, which routes the one system prompt to one of two contracts:

taskWhat it returnsVerdict field
decodeWhat YES and NO each change: a title, a summary, a grade_note; today, 2–5 yes and 1–4 no claims; every dollar figure as a money claim; 2–6 terms {term, plain}; unknowns (what the text does not say); check (where to verify).wording: plain, dense, double-negative
weighWho decides: a title, a summary; 2–6 power claims with actor and shift (gains, loses, shares); 1–4 rules claims; 2–4 tradeoffs {issue, yes_side, no_side}; general patterns; questions to look up.scope: narrow, moderate, sweeping

A claim is always {text, cite, quote}: a plain explanation, the ids of the sentences it rests on (S1… or Q for the ballot question), and an exact excerpt from one of them.

The declared input schema carries scalars only, so object- and array-valued fields travel JSON-encoded as strings (MeasureKit.toWire does this). task, measure_title and sentences are required.

Input fields

FieldTypeNotes
taskstringdecode or weigh.
measure_titlestringThe name on the ballot, e.g. "Proposition 4".
jurisdictionstringState, county or city (may be empty).
election_datestringYYYY-MM-DD.
ballot_questionstringThe words printed on the ballot; cited as Q.
sentencesstring (JSON)[{id, text}] from MeasureKit.splitSentences. Over 12,000 characters the middle is dropped on whole sentences, with a {id: "CUT"} marker.
scanstring (JSON){question_grade, text_grade, target_grade, words, traps[], figures[], kinds[], jargon[], shall_sentences[], sentences_omitted}. Lists are capped at 40 figures and 30 shall-sentences; when a cap bites, figures_total / shall_total carry the full count.
notesstringThe voter's own question; over 1,200 characters keeps the first 900 and last 300 around a marker.
decodedstring (JSON)weigh only, optional: {wording, summary, today, yes[], no[], unknowns[]} from an earlier decode.
retry_notestringOnly on a reformat retry.

The reply

The job's output.output is a string holding one JSON object. Parse it with MeasureKit.parseReply, then normalize, then check it with reconcile(reply, scan): it flags a quote that is not in the text word for word, a quote found in a different sentence than the one cited, a cited sentence id that does not exist, a dollar figure or percentage that does not appear in the measure, wording that reads like voting advice, a one-sided trade-off, a missing YES or NO road, a "plain" rating on text the page scores above grade 12, and a constitutional amendment the rules section never mentions.

Worked examples

Replies produced against the app's prompt for three fictional sample measures (long lists shortened here; the full replies ship in example-result.js). The page replays each of them free from its sample buttons. Inputs are shown with the sentence list trimmed.

task: decode - a county library bond (sample) (plain)

Input:

{
 "task": "decode",
 "measure_title": "Measure L (sample) - Library Branch Bond",
 "jurisdiction": "Riverbend County (fictional)",
 "election_date": "2026-11-03",
 "ballot_question": "Shall Riverbend County borrow up to $48 million by selling bonds to fix and expand its four library branches? A property tax would repay the bonds. A citizens' committee would check the spending each year.",
 "sentences": "[{\"id\":\"S1\",\"text\":\"Section 1. Purpose. The four library branches in Riverbend County were built between 1961 and 1978.\"},{\"id\":\"S2\",\"text\":\"Under current law, the County has no dedicated money for major library repairs, and repairs are paid from the general fund when money is available.\"},\"...\"]",
 "scan": "{\"question_grade\":6.8,\"text_grade\":11.7,\"target_grade\":8,\"words\":216,\"traps\":[],\"figures\":[{\"id\":\"Q\",\"kind\":\"money\",\"value\":\"$48 million\"},{\"id\":\"S1\",\"kind\":\"year\",\"value\":\"1961\"},\"...\"],\"kinds\":[\"bond\",\"tax\",\"dedicated-funds\"],\"jargon\":[\"ad valorem\",\"general obligation bonds\",\"...\"],\"shall_sentences\":[\"S3\",\"S4\",\"S5\",\"S7\",\"S8\",\"S9\"],\"sentences_omitted\":0}",
 "notes": "I rent an apartment, so does the property tax affect me?"
}

Reply:

{
 "task": "decode",
 "title": "Riverbend County library bond: borrow up to $48 million for repairs",
 "wording": "plain",
 "summary": "This measure lets Riverbend County borrow up to $48 million by selling bonds to fix and expand its four library branches. A property tax would repay the bonds over a period of up to 25 years. A citizens' committee would check how the money is spent each year.",
 "grade_note": "The ballot question reads at about a 6.8 grade level, but the full measure text is harder to read, at about an 11.7 grade level.",
 "today": {
  "text": "Today, the County has no set-aside money for big library repairs. Repairs are paid from the general fund, the county's main pool of money, only when money happens to be available.",
  "cite": [
   "S2"
  ],
  "quote": "the County has no dedicated money for major library repairs"
 },
 "yes": [
  {
   "text": "A YES vote lets the County borrow money by selling bonds, up to $48 million total, to pay for library building projects.",
   "cite": [
    "S3"
   ],
   "quote": "authorized to issue general obligation bonds in an amount not to exceed $48 million"
  },
  {
   "text": "The bond money could only be used to repair roofs and heating systems, make the branches easier to use for people with disabilities, and add study and meeting rooms at the four branches that already exist.",
   "cite": [
    "S4"
   ],
   "quote": "used only to repair roofs and heating systems, make the branches accessible to people with disabilities"
  },
  "..."
 ],
 "no": [
  {
   "text": "A NO vote means the County could not issue these bonds, so it could not borrow this $48 million under this measure.",
   "cite": [],
   "quote": ""
  },
  {
   "text": "The four library branches would not get the specific repairs and additions listed in this measure, such as new study and meeting rooms, through this bond.",
   "cite": [],
   "quote": ""
  },
  "..."
 ],
 "money": [
  {
   "text": "The measure allows the County to issue bonds totaling no more than $48 million for this project.",
   "cite": [
    "S3"
   ],
   "quote": "not to exceed $48 million"
  },
  {
   "text": "The County's own estimate is that the tax to repay the bonds would average $19 per year for every $100,000 of a property's assessed value.",
   "cite": [
    "S6"
   ],
   "quote": "$19 per $100,000 of assessed value per year"
  },
  "..."
 ],
 "terms": [
  {
   "term": "ad valorem",
   "plain": "based on value - here, a property tax charged based on how much a property is worth"
  },
  {
   "term": "general obligation bonds",
   "plain": "a kind of loan the government takes out and promises to repay using its taxing power"
  },
  "..."
 ],
 "unknowns": [
  "The text does not say whether a property tax increase would be passed on to renters through higher rent; it only describes a tax on property owners, so the reader's question about renting cannot be answered from this text.",
  "The text does not state the County's current property tax rate, so it does not say how much higher the total tax bill would actually be.",
  "..."
 ],
 "check": [
  "The official voter guide's fiscal impact statement for this measure",
  "The full text of the ballot measure and its bond authorization language",
  "..."
 ]
}

task: weigh - a county library bond (sample) (narrow)

Input:

{
 "task": "weigh",
 "measure_title": "Measure L (sample) - Library Branch Bond",
 "jurisdiction": "Riverbend County (fictional)",
 "election_date": "2026-11-03",
 "ballot_question": "Shall Riverbend County borrow up to $48 million by selling bonds to fix and expand its four library branches? A property tax would repay the bonds. A citizens' committee would check the spending each year.",
 "sentences": "[{\"id\":\"S1\",\"text\":\"Section 1. Purpose. The four library branches in Riverbend County were built between 1961 and 1978.\"},{\"id\":\"S2\",\"text\":\"Under current law, the County has no dedicated money for major library repairs, and repairs are paid from the general fund when money is available.\"},\"...\"]",
 "scan": "{\"question_grade\":6.8,\"text_grade\":11.7,\"target_grade\":8,\"words\":216,\"traps\":[],\"figures\":[{\"id\":\"Q\",\"kind\":\"money\",\"value\":\"$48 million\"},{\"id\":\"S1\",\"kind\":\"year\",\"value\":\"1961\"},\"...\"],\"kinds\":[\"bond\",\"tax\",\"dedicated-funds\"],\"jargon\":[\"ad valorem\",\"general obligation bonds\",\"...\"],\"shall_sentences\":[\"S3\",\"S4\",\"S5\",\"S7\",\"S8\",\"S9\"],\"sentences_omitted\":0}",
 "notes": "I rent an apartment, so does the property tax affect me?",
 "decoded": "{\"wording\":\"dense\",\"summary\":\"This measure would let Riverbend County borrow up to $48 million by selling bonds to fix and expand its four library branches. The county would repay the bonds over time using a property tax, and a citizens' committee would check the spending each year.\",\"today\":\"The county does not have money set aside just for major library repairs. Repairs are paid for out of the county's general spending money only when that money is available.\",\"yes\":[\"The county could borrow up to $48 million by selling bonds to pay for the library work.\",\"That money could only be used to repair roofs and heating, make the branches accessible to people with disabilities, and add study and meeting rooms.\",\"...\"],\"no\":[\"The county would not borrow the $48 million described in this measure, and the repairs and additions it would pay for would not happen under this bond.\",\"Library repairs would keep being paid for only out of the county's general fund, when that money happens to be available, the same as today.\",\"...\"],\"unknowns\":[\"The voter asked if renting affects them: the text only describes a property tax based on a property's assessed value, paid by property owners, and does not say whether or how it would affect people who rent.\",\"The text does not say the total dollar cost for a typical home over the life of the bonds, only an estimated yearly rate per $100,000 of assessed value.\",\"...\"]}"
}

Reply:

{
 "task": "weigh",
 "title": "A $48 million bond to repair and expand four library branches",
 "scope": "narrow",
 "summary": "This measure shifts how library repairs get paid for: instead of competing each year for discretionary general-fund money, the work would be guaranteed funding through a one-time bond that the Board of Supervisors is authorized to issue and repay with a dedicated property tax. It also creates a new, specific check on that spending by giving a resident committee and an independent audit a formal role they do not have today.",
 "power": [
  {
   "actor": "the Board of Supervisors",
   "shift": "gains",
   "text": "gains authority to issue up to $48 million in bonds for library work, money it does not have the power to raise this way today.",
   "cite": [
    "S3"
   ],
   "quote": "authorized to issue general obligation bonds in an amount not to exceed $48 million"
  },
  {
   "actor": "county officials who set the annual general-fund budget",
   "shift": "loses",
   "text": "lose some future discretion, since library repairs that used to compete each year for discretionary general-fund money would instead be funded separately through the bond.",
   "cite": [
    "S2"
   ],
   "quote": "repairs are paid from the general fund when money is available"
  },
  "..."
 ],
 "rules": [
  {
   "text": "The Board of Supervisors, the same body authorized to issue the bonds, would also appoint all seven members of the new oversight committee.",
   "cite": [
    "S7"
   ],
   "quote": "shall appoint a citizens' oversight committee of seven residents"
  },
  {
   "text": "The property tax repaying the bonds is set for up to 25 years, a long window that commits future budgets and future officeholders to the repayment.",
   "cite": [
    "S5"
   ],
   "quote": "over a period not to exceed 25 years"
  },
  "..."
 ],
 "tradeoffs": [
  {
   "issue": "Whether a dedicated bond is the right way to pay for library repairs",
   "yes_side": "Supporters tend to stress that a bond makes the money available now, instead of waiting for general-fund surpluses that may never come.",
   "no_side": "Opponents tend to stress that locking in a new tax for up to 25 years removes future flexibility, even if repair needs or county finances change."
  },
  {
   "issue": "The size and length of the new property tax",
   "yes_side": "Supporters tend to stress that the estimated rate, about $19 per $100,000 of assessed value each year, is a modest cost for addressing long-needed repairs.",
   "no_side": "Opponents tend to stress that any new tax adds an ongoing cost to property owners' bills for up to 25 years."
  },
  "..."
 ],
 "patterns": [
  "In general, bonds repaid through a dedicated property tax commit future taxpayers and budgets for the life of the bond, which is harder to undo than a year-to-year spending choice.",
  "In general, earmarking money for one purpose protects that purpose from competing budget pressures, but it also reduces the flexibility of elected officials to redirect the funds later.",
  "..."
 ],
 "questions": [
  "How much does Riverbend County currently spend on library repairs from its general fund each year?",
  "What would the total property tax cost be for a typical home over the full 25-year repayment period?",
  "..."
 ]
}

task: decode - repealing a Sunday-hours ban (sample) (double-negative)

Input:

{
 "task": "decode",
 "measure_title": "Question 3 (sample) - Sunday Retail Hours",
 "jurisdiction": "State of Lakeshore (fictional)",
 "election_date": "2026-11-03",
 "ballot_question": "Shall the law prohibiting retail stores larger than 5,000 square feet from opening before noon on Sundays be repealed?",
 "sentences": "[{\"id\":\"S1\",\"text\":\"Section 1. Current law. Under existing law, a retail store with more than 5,000 square feet of floor space may not open to the public before 12:00 noon on a Sunday.\"},{\"id\":\"S2\",\"text\":\"Pharmacies, grocery stores and gas stations are exempt from this restriction.\"},\"...\"]",
 "scan": "{\"question_grade\":11.7,\"text_grade\":11.1,\"target_grade\":8,\"words\":166,\"traps\":[{\"id\":\"Q\",\"kind\":\"double-negative\",\"words\":[\"repealed\",\"prohibiting\"]},{\"id\":\"S3\",\"kind\":\"double-negative\",\"words\":[\"repeal\",\"repealed\",\"prohibits\"]}],\"figures\":[{\"id\":\"S7\",\"kind\":\"year\",\"value\":\"2027\"}],\"kinds\":[\"repeal\"],\"jargon\":[\"ordinance\",\"hereby\",\"...\"],\"shall_sentences\":[\"S1\",\"S3\",\"S4\",\"S5\",\"S6\",\"S7\"],\"sentences_omitted\":0}",
 "notes": "I work at a big-box store. Would I have to start working Sunday mornings?"
}

Reply:

{
 "task": "decode",
 "title": "Repeals ban on large stores opening before noon on Sundays",
 "wording": "double-negative",
 "summary": "This measure would repeal the state law that bans large retail stores from opening before noon on Sundays. A YES vote lets these stores open earlier on Sundays, while a NO vote keeps today's rule and keeps them closed until noon. The same law also lets employees ask in writing not to work before noon on Sundays and stops employers from punishing them for asking.",
 "grade_note": "Both the ballot question (about an 11.7 grade level) and the full text (about an 11.1 grade level) are harder to read than the grade 8 target, mostly because of legal phrases and a chapter cross-reference.",
 "today": {
  "text": "Today, a retail store bigger than 5,000 square feet cannot open to the public before noon on Sunday. Pharmacies, grocery stores and gas stations do not have to follow this rule.",
  "cite": [
   "S1",
   "S2"
  ],
  "quote": "a retail store with more than 5,000 square feet of floor space may not open to the public before 12:00 noon on a Sunday"
 },
 "yes": [
  {
   "text": "A YES vote would repeal the law that stops stores bigger than 5,000 square feet from opening before noon on Sundays, so they could open earlier.",
   "cite": [
    "S3"
   ],
   "quote": "which prohibits large retail stores from opening before noon on Sundays, is hereby repealed"
  },
  {
   "text": "A city or town could still pass its own local rule limiting Sunday retail hours, even after the state ban is repealed.",
   "cite": [
    "S4"
   ],
   "quote": "Nothing in this act shall prevent a city or town from adopting a local ordinance that limits Sunday retail hours within its borders"
  },
  "..."
 ],
 "no": [
  {
   "text": "A NO vote would keep the current law. Stores bigger than 5,000 square feet could not open to the public before noon on Sunday.",
   "cite": [
    "S1"
   ],
   "quote": "may not open to the public before 12:00 noon on a Sunday"
  },
  {
   "text": "A NO vote means pharmacies, grocery stores and gas stations would keep being exempt from this rule, the same as today.",
   "cite": [
    "S2"
   ],
   "quote": "Pharmacies, grocery stores and gas stations are exempt from this restriction"
  },
  "..."
 ],
 "money": [],
 "terms": [
  {
   "term": "repeal",
   "plain": "to officially cancel a law."
  },
  {
   "term": "ordinance",
   "plain": "a law passed by a city or town."
  },
  "..."
 ],
 "unknowns": [
  "The text does not say whether a big-box store would schedule you for Sunday mornings by default; it only says you could ask in writing not to work before noon and the employer could not punish you for asking.",
  "The text does not say whether your city or town already has, or plans to pass, its own local limit on Sunday retail hours.",
  "..."
 ],
 "check": [
  "The official voter guide's explanation of this measure.",
  "The full text of Chapter 14, Section 6 of the General Laws, as currently written.",
  "..."
 ]
}

task: weigh - repealing a Sunday-hours ban (sample) (moderate)

Input:

{
 "task": "weigh",
 "measure_title": "Question 3 (sample) - Sunday Retail Hours",
 "jurisdiction": "State of Lakeshore (fictional)",
 "election_date": "2026-11-03",
 "ballot_question": "Shall the law prohibiting retail stores larger than 5,000 square feet from opening before noon on Sundays be repealed?",
 "sentences": "[{\"id\":\"S1\",\"text\":\"Section 1. Current law. Under existing law, a retail store with more than 5,000 square feet of floor space may not open to the public before 12:00 noon on a Sunday.\"},{\"id\":\"S2\",\"text\":\"Pharmacies, grocery stores and gas stations are exempt from this restriction.\"},\"...\"]",
 "scan": "{\"question_grade\":11.7,\"text_grade\":11.1,\"target_grade\":8,\"words\":166,\"traps\":[{\"id\":\"Q\",\"kind\":\"double-negative\",\"words\":[\"repealed\",\"prohibiting\"]},{\"id\":\"S3\",\"kind\":\"double-negative\",\"words\":[\"repeal\",\"repealed\",\"prohibits\"]}],\"figures\":[{\"id\":\"S7\",\"kind\":\"year\",\"value\":\"2027\"}],\"kinds\":[\"repeal\"],\"jargon\":[\"ordinance\",\"hereby\",\"...\"],\"shall_sentences\":[\"S1\",\"S3\",\"S4\",\"S5\",\"S6\",\"S7\"],\"sentences_omitted\":0}",
 "notes": "I work at a big-box store. Would I have to start working Sunday mornings?",
 "decoded": "{\"wording\":\"double-negative\",\"summary\":\"This measure would repeal the state law that bans large retail stores from opening before noon on Sundays. A YES vote lets these stores open earlier on Sundays, while a NO vote keeps today's rule and keeps them closed until noon. The same law also lets employees ask in writing not to work before noon on Sundays and stops employers from punishing them for asking.\",\"today\":\"Today, a retail store bigger than 5,000 square feet cannot open to the public before noon on Sunday. Pharmacies, grocery stores and gas stations do not have to follow this rule.\",\"yes\":[\"A YES vote would repeal the law that stops stores bigger than 5,000 square feet from opening before noon on Sundays, so they could open earlier.\",\"A city or town could still pass its own local rule limiting Sunday retail hours, even after the state ban is repealed.\",\"...\"],\"no\":[\"A NO vote would keep the current law. Stores bigger than 5,000 square feet could not open to the public before noon on Sunday.\",\"A NO vote means pharmacies, grocery stores and gas stations would keep being exempt from this rule, the same as today.\",\"...\"],\"unknowns\":[\"The text does not say whether a big-box store would schedule you for Sunday mornings by default; it only says you could ask in writing not to work before noon and the employer could not punish you for asking.\",\"The text does not say whether your city or town already has, or plans to pass, its own local limit on Sunday retail hours.\",\"...\"]}"
}

Reply:

{
 "task": "weigh",
 "title": "Repeals ban on large stores opening before noon on Sundays",
 "scope": "moderate",
 "summary": "This measure shifts the Sunday-hours decision away from one uniform statewide rule and toward each large store, while confirming that cities and towns can still set their own local limits. It also gives individual retail employees, not just their employers, a say over whether they work before noon on Sundays. Because this is an ordinary law rather than a constitutional change, the state legislature could still revisit the rule later.",
 "power": [
  {
   "actor": "Large retail stores (over 5,000 square feet)",
   "shift": "gains",
   "text": "These stores gain the choice to open to the public before noon on Sundays, a choice they do not have under the law today.",
   "cite": [
    "S3"
   ],
   "quote": "which prohibits large retail stores from opening before noon on Sundays, is hereby repealed"
  },
  {
   "actor": "The state legislature",
   "shift": "loses",
   "text": "The state gives up the single statewide rule it set on this question, since the specific ban it passed is being cancelled.",
   "cite": [
    "S3"
   ],
   "quote": "Chapter 14, Section 6 of the General Laws, which prohibits large retail stores from opening before noon on Sundays, is hereby repealed"
  },
  "..."
 ],
 "rules": [
  {
   "text": "This is a change to an ordinary statute, not a constitutional amendment, so a future legislature could pass a new law changing these rules again without a separate constitutional process.",
   "cite": [
    "S3"
   ],
   "quote": "Chapter 14, Section 6 of the General Laws, which prohibits large retail stores from opening before noon on Sundays, is hereby repealed"
  },
  {
   "text": "The repeal explicitly preserves local lawmaking power, so individual cities and towns stay free to adopt their own Sunday-hours ordinance after the state ban ends.",
   "cite": [
    "S4"
   ],
   "quote": "Nothing in this act shall prevent a city or town from adopting a local ordinance that limits Sunday retail hours within its borders"
  },
  "..."
 ],
 "tradeoffs": [
  {
   "issue": "Store hours versus a shared day off",
   "yes_side": "People who favor the repeal tend to stress that store owners and shoppers should be free to choose Sunday morning hours just like any other day.",
   "no_side": "People who oppose the repeal tend to stress that keeping Sunday mornings closed protects a predictable day of rest for workers and families."
  },
  {
   "issue": "Statewide rule versus local control",
   "yes_side": "Supporters tend to stress that the repeal still lets each city or town set its own Sunday-hours rule to fit local preferences.",
   "no_side": "Opponents tend to stress that one statewide rule is simpler and more predictable than a patchwork of different local ordinances."
  },
  "..."
 ],
 "patterns": [
  "In general, repealing an ordinary statute is easier to reverse later than repealing a constitutional provision, because an ordinary legislature can revisit it with a simple majority vote.",
  "In general, a law that pairs a statewide rule with an explicit local option shifts some decision-making power downward, from the state to cities and towns.",
  "..."
 ],
 "questions": [
  "Does your city or town already have, or is it considering, its own ordinance on Sunday retail hours?",
  "How many retail stores in your area have more than 5,000 square feet of floor space and would be affected by this repeal?",
  "..."
 ]
}

task: decode - a constitutional wildfire fund (sample) (dense)

Input:

{
 "task": "decode",
 "measure_title": "Amendment K (sample) - Wildfire Prevention Trust Fund",
 "jurisdiction": "State of Cascadia (fictional)",
 "election_date": "2026-11-03",
 "ballot_question": "Shall there be an amendment to the state constitution establishing a Wildfire Prevention Trust Fund, financed by a dedicated sales and use tax of 0.25 percent, administered by a newly created Wildfire Resilience Commission, and prohibiting the legislature from transferring money out of the fund?",
 "sentences": "[{\"id\":\"S1\",\"text\":\"Section 1. Article IX of the Constitution of the State of Cascadia is amended by adding a new Section 14 to read as follows.\"},{\"id\":\"S2\",\"text\":\"(a) There is hereby created in the state treasury the Wildfire Prevention Trust Fund, which shall be separate from and not part of the general fund.\"},\"...\"]",
 "scan": "{\"question_grade\":23.2,\"text_grade\":14.2,\"target_grade\":8,\"words\":336,\"traps\":[{\"id\":\"Q\",\"kind\":\"negative-question\",\"words\":[\"prohibiting\"]}],\"figures\":[{\"id\":\"Q\",\"kind\":\"percent\",\"value\":\"0.25 percent\"},{\"id\":\"S3\",\"kind\":\"percent\",\"value\":\"0.25 percent\"},\"...\"],\"kinds\":[\"constitutional\",\"tax\",\"dedicated-funds\",\"new-body\",\"sunset\"],\"jargon\":[\"appropriate\",\"general fund\",\"...\"],\"shall_sentences\":[\"S2\",\"S3\",\"S4\",\"S5\",\"S6\",\"S7\",\"S8\",\"S9\"],\"sentences_omitted\":0}",
 "notes": ""
}

Reply:

{
 "task": "decode",
 "title": "Constitutional amendment creating a Wildfire Prevention Trust Fund",
 "wording": "dense",
 "summary": "This measure would add a new section to the state constitution. It would create a Wildfire Prevention Trust Fund paid for by a new 0.25 percent sales and use tax, and set up a Wildfire Resilience Commission to plan how the fund's money is spent on wildfire prevention. The legislature could not move money out of the fund for other uses.",
 "grade_note": "The official ballot question is written at roughly a 23rd-grade reading level and the rest of the amendment's text at roughly a 14th-grade level, both far above an 8th-grade plain-language target.",
 "today": {
  "text": "Today, there is no separate Wildfire Prevention Trust Fund. Wildfire prevention work is paid for out of the state's general fund, through the regular state budget the legislature approves each year.",
  "cite": [
   "S10"
  ],
  "quote": "wildfire prevention is funded through annual legislative appropriations from the general fund"
 },
 "yes": [
  {
   "text": "A new tax equal to 0.25 percent of the price of many purchases would be added. All of the money this tax raises would be deposited into the new Trust Fund, not the general fund.",
   "cite": [
    "S3"
   ],
   "quote": "a sales and use tax of 0.25 percent is hereby imposed on the sale of tangible personal property"
  },
  {
   "text": "A new Wildfire Prevention Trust Fund would be created inside the state treasury, kept apart from the general fund that pays for most other state spending.",
   "cite": [
    "S2"
   ],
   "quote": "the Wildfire Prevention Trust Fund, which shall be separate from and not part of the general fund"
  },
  "..."
 ],
 "no": [
  {
   "text": "No new 0.25 percent sales and use tax would be created, and the statewide sales tax rate would not change because of this measure.",
   "cite": [],
   "quote": ""
  },
  {
   "text": "No Wildfire Prevention Trust Fund or Wildfire Resilience Commission would be created. Wildfire prevention would keep being paid for the way it is now, out of the general fund through the legislature's yearly budget.",
   "cite": [
    "S10"
   ],
   "quote": "wildfire prevention is funded through annual legislative appropriations from the general fund"
  },
  "..."
 ],
 "money": [
  {
   "text": "A new tax equal to 0.25 percent of the price of many purchases would be added, with all of the money going into the Trust Fund.",
   "cite": [
    "S3"
   ],
   "quote": "a sales and use tax of 0.25 percent is hereby imposed on the sale of tangible personal property"
  },
  {
   "text": "No more than 5 percent of the money spent from the Trust Fund in a year could go toward running the program itself.",
   "cite": [
    "S5"
   ],
   "quote": "Not more than 5 percent of the moneys appropriated in any fiscal year shall be used for administrative costs"
  },
  "..."
 ],
 "terms": [
  {
   "term": "appropriate",
   "plain": "to officially set aside money to be spent on something"
  },
  {
   "term": "general fund",
   "plain": "the state's main pool of money used to pay for most everyday government spending"
  },
  "..."
 ],
 "unknowns": [
  "The text does not say whether the new 0.25 percent tax would be added on top of existing state and local sales taxes or what the combined rate would be.",
  "The text does not say who decides which counties count as \"high fire risk\" for picking Commission members.",
  "..."
 ],
 "check": [
  "The official voter guide's fiscal impact statement for this measure.",
  "The full text of the proposed constitutional amendment as filed with election officials.",
  "..."
 ]
}

task: weigh - a constitutional wildfire fund (sample) (sweeping)

Input:

{
 "task": "weigh",
 "measure_title": "Amendment K (sample) - Wildfire Prevention Trust Fund",
 "jurisdiction": "State of Cascadia (fictional)",
 "election_date": "2026-11-03",
 "ballot_question": "Shall there be an amendment to the state constitution establishing a Wildfire Prevention Trust Fund, financed by a dedicated sales and use tax of 0.25 percent, administered by a newly created Wildfire Resilience Commission, and prohibiting the legislature from transferring money out of the fund?",
 "sentences": "[{\"id\":\"S1\",\"text\":\"Section 1. Article IX of the Constitution of the State of Cascadia is amended by adding a new Section 14 to read as follows.\"},{\"id\":\"S2\",\"text\":\"(a) There is hereby created in the state treasury the Wildfire Prevention Trust Fund, which shall be separate from and not part of the general fund.\"},\"...\"]",
 "scan": "{\"question_grade\":23.2,\"text_grade\":14.2,\"target_grade\":8,\"words\":336,\"traps\":[{\"id\":\"Q\",\"kind\":\"negative-question\",\"words\":[\"prohibiting\"]}],\"figures\":[{\"id\":\"Q\",\"kind\":\"percent\",\"value\":\"0.25 percent\"},{\"id\":\"S3\",\"kind\":\"percent\",\"value\":\"0.25 percent\"},\"...\"],\"kinds\":[\"constitutional\",\"tax\",\"dedicated-funds\",\"new-body\",\"sunset\"],\"jargon\":[\"appropriate\",\"general fund\",\"...\"],\"shall_sentences\":[\"S2\",\"S3\",\"S4\",\"S5\",\"S6\",\"S7\",\"S8\",\"S9\"],\"sentences_omitted\":0}",
 "notes": "",
 "decoded": "{\"wording\":\"dense\",\"summary\":\"This measure would add a new section to the state constitution. It would create a Wildfire Prevention Trust Fund paid for by a new 0.25 percent sales and use tax, and set up a Wildfire Resilience Commission to plan how the fund's money is spent on wildfire prevention. The legislature could not move money out of the fund for other uses.\",\"today\":\"Today, there is no separate Wildfire Prevention Trust Fund. Wildfire prevention work is paid for out of the state's general fund, through the regular state budget the legislature approves each year.\",\"yes\":[\"A new tax equal to 0.25 percent of the price of many purchases would be added. All of the money this tax raises would be deposited into the new Trust Fund, not the general fund.\",\"A new Wildfire Prevention Trust Fund would be created inside the state treasury, kept apart from the general fund that pays for most other state spending.\",\"...\"],\"no\":[\"No new 0.25 percent sales and use tax would be created, and the statewide sales tax rate would not change because of this measure.\",\"No Wildfire Prevention Trust Fund or Wildfire Resilience Commission would be created. Wildfire prevention would keep being paid for the way it is now, out of the general fund through the legislature's yearly budget.\",\"...\"],\"unknowns\":[\"The text does not say whether the new 0.25 percent tax would be added on top of existing state and local sales taxes or what the combined rate would be.\",\"The text does not say who decides which counties count as \\\"high fire risk\\\" for picking Commission members.\",\"...\"]}"
}

Reply:

{
 "task": "weigh",
 "title": "Shifting wildfire funding power from the legislature to a new fund",
 "scope": "sweeping",
 "summary": "This measure would move decisions about wildfire funding out of the legislature's normal yearly budget process and into a dedicated trust fund the legislature could not redirect. A new nine-member commission, appointed by the Governor and confirmed by the Senate, would set the fund's spending plan each year within limits the constitution itself sets. Because the change would be written into the constitution, undoing it later would take another statewide vote rather than an ordinary law.",
 "power": [
  {
   "actor": "the legislature",
   "shift": "shares",
   "text": "Each year the legislature would have to appropriate Trust Fund money according to a spending plan the new Commission adopts, rather than setting the wildfire budget entirely on its own.",
   "cite": [
    "S7"
   ],
   "quote": "the legislature shall appropriate moneys in accordance with that plan"
  },
  {
   "actor": "the legislature",
   "shift": "loses",
   "text": "The legislature would lose the ability to move Trust Fund money to other purposes or to cut existing general-fund wildfire spending below the 2026 level, narrowing a budget choice it currently has.",
   "cite": [
    "S8"
   ],
   "quote": "The legislature shall not transfer, borrow or divert moneys from the Trust Fund for any other purpose"
  },
  "..."
 ],
 "rules": [
  {
   "text": "This change would be written into the state constitution rather than an ordinary law, so undoing it later would need another constitutional amendment and a public vote, not just a new act of the legislature.",
   "cite": [
    "S1"
   ],
   "quote": "Article IX of the Constitution of the State of Cascadia is amended by adding a new Section 14"
  },
  {
   "text": "The tax and the fund would not continue forever on their own. The tax is set to expire in 2047 unless voters choose to extend it.",
   "cite": [
    "S9"
   ],
   "quote": "The tax imposed by this section shall expire on June 30, 2047"
  },
  "..."
 ],
 "tradeoffs": [
  {
   "issue": "Locking in a dedicated tax",
   "yes_side": "Supporters tend to stress that guaranteed funding, protected from being redirected to other uses, lets wildfire prevention work be planned for years rather than refought in the budget every year.",
   "no_side": "Opponents tend to stress that locking tax money into one purpose removes the legislature's flexibility to shift funds toward whatever need is most urgent in a given year."
  },
  {
   "issue": "A new appointed commission",
   "yes_side": "Supporters tend to stress that giving spending decisions to a commission focused only on wildfire risk can bring more technical focus than a general legislature.",
   "no_side": "Opponents tend to stress that an appointed body answers to voters less directly than elected lawmakers do."
  },
  "..."
 ],
 "patterns": [
  "In general, dedicating a specific tax to a specific purpose makes that spending harder for lawmakers to redirect later, compared with money that sits in a general fund.",
  "In general, provisions written into a constitution are harder to change or repeal than ordinary statutes, since they usually require another amendment and a public vote rather than a simple legislative majority.",
  "..."
 ],
 "questions": [
  "What is the combined state and local sales tax rate where I live today, and what would it become with this added 0.25 percent?",
  "How much does the state currently spend on wildfire prevention programs out of the general fund each year?",
  "..."
 ]
}

Build the input yourself

Load the script in node (global.window = {}; require("./measurekit.js")), then:

const K = MeasureKit;
const state = { title: "Measure L", jurisdiction: "Riverbend County", election_date: "2026-11-03",
  question: "Shall the county borrow up to $48 million ...?", text: "Section 1. ..." };
const scan = K.scan(state);                        // sentences, grades, traps, figures, kinds, jargon, checks
const { input } = K.buildInput("decode", { scan, notes: "I rent - does this affect me?" });
const wire = K.toWire(input);                      // POST this to /estimate and /run
// later: const reply = K.normalize(K.parseReply(job.output.output));
// K.reconcile(reply, scan) -> [{level, text}] - every quote and figure checked against the text
// weigh: K.buildInput("weigh", { scan, decoded: reply })

Step 1 — a tiny client helper

One function that sends JSON and unwraps the envelope. Paste a personal token from /tokens.html, or leave it empty and mint a guest token in step 2.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://what-yes-means.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs a personal token: sign in on /tokens.html and copy it from there.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"what-yes-means"}' | jq -r '.data.token')

Step 3 — GET /me

Who the token is (subject_type: user or guest) and the credit balance.

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — POST /estimate

Free. The body is the run input itself, the bare object (never wrapped in {"input": ...}). hold_credits is a reservation, not the price; min_credits is what the balance must cover; model_alias reads gpt-terra.

# input.json: the run input object - {"task": "decode", "measure_title": "Measure L", "ballot_question": "Shall ...", "sentences": "[...]", "scan": "{...}"}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — POST /run, then poll the job

Send an Idempotency-Key built from the lane and the input: a retry with the same key never bills twice. The page uses what-yes-means:<task>:<inputHash>:a<attempt>, and its one reformat retry (with retry_note added) is attempt 2, a new key and a second run. The job's output.output is the reply text; truncated: true means the balance cut it short.

KEY="what-yes-means:decode:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object, the reply contract
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — POST /run-stream

The same run as Server-Sent Events, with the same input.json. Browsers receive progress ticks rather than text deltas; the final done event carries the reply.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: what-yes-means:decode:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json