Skip to content
usv240Public

About

One skeleton, two apps: hold a document up against the law it must follow. Built with Kiro for Kiroween 2026.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Shall

Shall holds a document a business gave you up against a consumer law, quotes the law word for word, and shows the exact words in the document each result rests on.

Why it matters

No state law requires routine embalming for every death. Grieving families should not have to know that already to avoid paying for it.

The first sentence is the FTC's own, from FTC Consumer Advice, "The FTC Funeral Rule", https://consumer.ftc.gov/articles/ftc-funeral-rule.

221 of 278 funeral homes that FTC staff called in 2023 did not tell the caller about at least one extra fee until the caller asked. Source: FTC staff report "Calling for Information About Funeral Pricing", Nov 20, 2024, p. 20, https://www.ftc.gov/system/files/ftc_gov/pdf/staff-report_-calling-for-funeral-services.pdf.

3,072,666 people died in the United States in 2024 (CDC NCHS FastStats, https://www.cdc.gov/nchs/fastats/deaths.htm), and employers made 62,972,000 hires in 2025 (BLS State JOLTS, Table 13, https://www.bls.gov/news.release/jltst.t13.htm).

Measured by Shall on real documents (field study, Dec 3, 2026, docs/field-study.md): the FTC's embalming statement was found word for word in 16 of 77 (21%) price lists that California funeral homes post online; needs a look in 47 of 77 (61%), where the words are close to the law's; not found in 14 of 77 (18%). A pay range was found in 206 of 300 (69%) public Washington job postings; needs a look in 87 of 300 (29%); no pay range found in 7 of 300 (2%). These counts measure how Shall read the text. They are not findings about any business.

Shall lets a person check a funeral home's general price list against the FTC Funeral Rule, or a job posting against the California, Washington and New York State pay laws. Nothing you paste leaves the page, and nothing is saved.

This is information, not legal advice.

Judges: try it

These steps take about 2 minutes, with no login and nothing to install. The addresses run in any current browser.

  1. Open https://usv240.github.io/shall/. The start page opens with the FTC figure above, shows how one clause of law becomes a Kiro requirement, a line of a rule pack and a card, and links to the 2 apps.
  2. Press "Check a price list". This opens the funeral app, https://usv240.github.io/shall/funeral/.
  3. Press "Use the sample". A made-up price list, marked "Sample document, not a real business", fills the text box.
  4. Press "Check the price list". You see 4 cards: 1 possible violation and 3 pass. Each card quotes the clause with its citation and retrieval date, and your text appears beside the cards with each quoted passage marked by its card's number. Under the cards is "Questions for the arrangement meeting", with a print button.
  5. Open the pay-range app, https://usv240.github.io/shall/pay-range/, press "Use the sample", then "Check the posting". You see 1 possible violation, 1 needs human review, 1 pass and 1 not applicable. The needs human review card shows "Why this needs a person", with the 2 sides the hearing's arbiter wrote. Under the cards is "What to ask the employer", with a copy button, and a bar for the posting's pay range.
  6. Optional: paste your own price list or job posting, or press "Open a PDF". The page reads the PDF's text with pdf.js in your browser; the file is not sent anywhere.

Each card gives one of 4 verdicts:

  • possible violation: the document lacks something the clause asks for. The card quotes the clause, says what is missing and gives a step you can take yourself.
  • needs human review: the text does not settle it, for example the scope or a price is unclear. The card says why.
  • pass: the document shows what the clause asks for. The card quotes the words it found.
  • not applicable: the document shows the clause does not apply, for example the job is in another state.

Nothing you paste leaves the page. A Content-Security-Policy in each page blocks every connection, and npm run test:browser fails if a page asks for a file from another origin. The "i" buttons, the "New here?" guide, "Night reading" and the 2 tab flags are described in docs/readme-detail.md.

Features

  • 2 apps on one skeleton: apps/funeral and apps/pay-range, each a static folder with no server.
  • 4 rule packs with 11 clauses of law and 2 passages of agency guidance, each quoted word for word from a saved official copy in docs/sources/ with its SHA-256 in docs/sources.md.
  • 4 verdicts. A possible violation always carries the clause, its citation and the evidence; anything less becomes needs human review.
  • A word-by-word comparison when a required statement is close to the law's words but not the same.
  • "Open a PDF", read in the browser with pdf.js, loaded only when pressed.
  • A public API on AWS, POST /v1/check and POST /v1/keys, with a key page at https://usv240.github.io/shall/api/ (one click, no account). See api/openapi.json.
  • A stdio MCP server, skeleton/mcp/server.ts, with the tools list_packs, check_document and quote_clause.
  • A Kiro power, powers/add-a-law/, that adds a law as a new rule pack.

The packs:

  • "FTC Funeral Rule: general price list": 16 CFR 453.2(b)(4)(i)(C)(2), 16 CFR 453.4(b)(2)(i)(A), 16 CFR 453.3(a)(2)(ii) and 16 CFR 453.3(b)(2).
  • "California pay scale in job postings": Cal. Lab. Code 432.3(c)(3) and Cal. Lab. Code 432.3(m)(1).
  • "Washington wage or salary range in job postings": RCW 49.58.110(1)(a)(i), RCW 49.58.110(1)(a)(ii) and RCW 49.58.110(3).
  • "New York compensation disclosure in job advertisements": N.Y. Lab. Law 194-b(1)(a)(i) and N.Y. Lab. Law 194-b(6)(b)(i), added on Dec 3, 2026 with the add-a-law power.

The research

Field study. On Dec 3, 2026, at commit 5605b1a, each app ran unchanged on real public documents never used to write the extractor or the packs: 300 public Washington job postings from Greenhouse and Lever boards, and 100 price lists that California funeral homes post online (77 could be read). It measured whether Shall found the pay range, or the FTC's embalming statement word for word. Results are above; the most common case on real price lists is a reworded statement (47 of 77). The full method and every share are in docs/field-study.md, the counts in docs/field-study/pay-range.json and docs/field-study/funeral.json, and the script is scripts/field-study.mjs (node scripts/field-study.mjs pay-range or node scripts/field-study.mjs funeral). It reads robots.txt first, sends at most one request a second and keeps counts only.

Negative control. npm run negative-control runs both apps' checks on 1,338 synthetic documents with a fixed seed and writes docs/negative-control.json. It counts 0 possible violations without the clause, its citation and the evidence.

The hearing. 3 read-only Kiro agents heard 8 synthetic documents the checker passed and a careful reader doubted. The arbiter ruled differently on 7, and all 7 now give needs human review, each with a test. Records: docs/agent-runs/hearing-*-2026-12-04.md.

Public sources.

Every saved file, with its address, retrieval date and status, is listed under "Third-party material and pre-existing work" below and in docs/sources.md. Background notes: docs/research/judge-2.md.

Architecture

flowchart LR
  person[Person in a browser] --> page[App page on GitHub Pages]
  page --> pdf[pdf.js worker, on demand]
  page --> engine[Skeleton Check_Engine and rule packs]
  sources[Saved law texts in docs/sources] --> engine
  person --> keypage[Key page at /api/]
  keypage --> gateway[Amazon API Gateway]
  gateway --> lambda[AWS Lambda: check and keys]
  lambda --> engine
  lambda --> table[Amazon DynamoDB key counts]
  kiro[Kiro CLI or IDE] --> mcp[MCP server over stdio]
  mcp --> engine
  study[Field study script] --> boards[Public job boards and price lists]
  study --> engine
Loading

skeleton/ is the engine. It knows nothing about funerals or jobs. Each app supplies rule packs and a configuration, and esbuild bundles them with the engine into a static folder that .github/workflows/pages.yml publishes. The app pages run the check inside the page and make no network request. Only the key page connects, to the API in us-east-1 (infra/api/template.json, api/src/), where 2 Lambda functions run the same skeleton code and the key function counts keys in one DynamoDB table; no document text is stored or logged. The MCP server and the field study script run the same engine on your own computer.

Testing instructions

On the live site. Follow "Judges: try it" above. The 2 sample documents are in apps/funeral/src/sample.ts and apps/pay-range/src/sample.ts, and the 8 synthetic hearing documents are in docs/hearing/documents.json; paste any of them into the matching app. To try the API, get a key at https://usv240.github.io/shall/api/ and follow the example there.

On your own computer. You need Node.js 24 or later. From a clone of this repository:

npm install
npm run typecheck
npx vitest --run
npm run build
npm run serve

npm run serve serves dist/ at http://127.0.0.1:4173/ on your own computer only. Open the apps from there or from the GitHub Pages address, not from disk. npm run build runs npm run build:funeral, npm run build:pay-range and npm run build:site.

Browser checks, in Chromium with Playwright (install the browser once):

npx playwright install chromium
npm run test:browser

npm run test:live is opt-in and loads the published site. Without installing anything, you can call the MCP server with Node.js alone, from the repository root:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_packs","arguments":{}}}' | node skeleton/mcp/server.ts

The GitHub Actions workflow .github/workflows/ci.yml runs the type check, every test, the browser checks and the build on every push. More on each command: docs/readme-detail.md.

How Kiro built this

  • .kiro/specs/: one folder per spec, with EARS requirements, a design and tasks; each rule pack has its own Pack_Spec, and each clause is quoted and tagged [clause:<id>].
  • .kiro/hooks/: hooks that guard the evidence log, log finished tasks and run the pack-to-spec and source checks on save; each run is logged in docs/agent-runs/hook-runs.tsv.
  • .kiro/steering/: the product, legal, copy, testing, design, AWS and adversarial-documents rules.
  • .kiro/agents/: 5 read-only custom agents: clause-auditor, opposing-counsel and the 3 hearing agents.
  • .kiro/settings/mcp.json: configures the skeleton's own MCP server as shall; record in docs/agent-runs/mcp-calls-2026-12-03.md.
  • powers/add-a-law/: the Kiro power used to add the New York pack; record in docs/agent-runs/add-a-law-power-2026-12-03.md.
  • docs/agent-runs/: Kiro CLI runs, sub-agent research and the hearing, each saved as a Markdown record.
  • docs/agent-runs/cloud-judge-shall-2026-12-03.md: a Kiro cloud session that tested a fresh clone as a first-time judge.
  • .kiro/EVIDENCE.md: the append-only, hash-chained log of finished tasks and failing property runs, written only by scripts/evidence.mjs.

The full story, with each run and what it found, is in docs/readme-detail.md. Kiro friction met on the way is in docs/kiro-feedback.md.

Add a law

  1. Save the law's text in docs/sources/ and list it with its hash in docs/sources.md.
  2. Write one Pack_Spec under .kiro/specs/, with one EARS requirement per clause that quotes the clause word for word.
  3. Write the pack module and its extraction plan under apps/<app>/packs/<pack>/.
  4. Add the pack to apps/<app>/packs/index.ts. The test suite then runs every shared property on the new pack.

Next

  • spec 02 tasks 14 to 38: reading a web address, a scanned PDF or a photo, with Amazon Textract and one model on Amazon Bedrock, in the server package (server/);
  • Next.js and hosting on AWS Amplify;
  • deeds, the pre-filled requests and complaints you review and send yourself;
  • scope questions, so you can confirm facts such as headcount;
  • more of New York State Labor Law 194-b, then New York City and Colorado.

Third-party material and pre-existing work

All code in this repository was written from Nov 15, 2026, the date of the first commit, inside the Oct 30 to Dec 4, 2026 submission period. There is no pre-existing code beyond the packages listed below.

Packages

app.js holds no third-party code: the build refuses any bundled file under node_modules (spec 03 R20.4). Each app folder also holds pdf/, with pdf.js 6.5.438 (Apache-2.0) copied as published with its licence, loaded only when you press "Open a PDF". These packages are used to build and test, or by the server package that comes next. Their own dependencies are listed in package-lock.json.

Package Installed version Licence Used for
@axe-core/playwright 4.14.1 MPL-2.0 Accessibility checks in the browser tests (dev)
@playwright/test 1.65.2 Apache-2.0 Browser checks in Chromium (dev)
@types/node 24.19.2 MIT Node.js type definitions (dev)
esbuild 0.28.2 MIT Bundles each app into a static folder (dev)
fast-check 4.10.2 MIT Property-based tests (dev)
typescript 7.0.2 Apache-2.0 Type check (dev)
vitest 5.1.0 MIT Test runner (dev)
parse5 8.1.1 MIT HTML reading in skeleton/html/, for the web address intake that comes next; not in the apps
@aws-sdk/client-api-gateway 3.1172.0 Apache-2.0 The Key_API function in api/, bundled into it; not in the apps
@aws-sdk/client-dynamodb 3.1172.0 Apache-2.0 The Key_API function in api/, bundled into it; not in the apps
@aws-sdk/client-bedrock-runtime 3.1172.0 Apache-2.0 The server package that comes next; not in the apps
@aws-sdk/client-textract 3.1172.0 Apache-2.0 The server package that comes next; not in the apps
pdf-lib 1.17.1 MIT The server package that comes next; not in the apps
pdfjs-dist 6.5.438 Apache-2.0 "Open a PDF" in each app (copied to pdf/, loaded on demand), the field study, and the server package that comes next
server-only 0.0.1 MIT The server package that comes next; not in the apps

Legal sources

Every file was retrieved on 2026-11-15, except the 2 files of Cal. Bus. & Prof. Code 7685, retrieved on 2026-12-03. Statutes, regulations and enacted local laws are edicts of government, which copyright does not cover (Georgia v. Public.Resource.Org, 590 U.S. 255 (2020)); federal works are also public domain under 17 U.S.C. 105. Agency guidance is a government agency's publication, quoted with attribution; it names no licence. These 2 legal citations explain the copyright status of the sources; they are not clauses Shall checks or shows, so they have no file in docs/sources/. docs/sources.md gives the method and SHA-256 of each file. The California and New York State legislature sites show a browser check before the page, so an automated link checker gets a 403 from them; the addresses open in a normal browser. The eCFR address answers 406 to a client that sends no Accept-Encoding header; a browser, or curl with Accept-Encoding: gzip, deflate, gets the file.

File URL Retrieved Status
16-cfr-453_2026-11-15.xml https://www.ecfr.gov/api/versioner/v1/full/2026-11-12/title-16.xml?part=453 2026-11-15 Federal regulation, public domain
16-cfr-453_2026-11-15.txt same, text derived from the XML 2026-11-15 Federal regulation, public domain
ca-bpc-7685_2026-12-03.html https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=BPC&sectionNum=7685 2026-12-03 State statute, not covered by copyright; frames the funeral field study, not a clause of any pack
ca-bpc-7685_2026-12-03.txt same, text derived from the HTML 2026-12-03 State statute, not covered by copyright
ca-lab-432.3_2026-11-15.txt https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=LAB&sectionNum=432.3 2026-11-15 State statute, not covered by copyright
ny-lab-194-b_2026-11-15.txt https://www.nysenate.gov/legislation/laws/LAB/194-B 2026-11-15 State statute, not covered by copyright
wa-rcw-49.58.110_2026-11-15.html https://app.leg.wa.gov/RCW/default.aspx?cite=49.58.110 2026-11-15 State statute, not covered by copyright
wa-rcw-49.58.110_2026-11-15.txt same, text derived from the HTML 2026-11-15 State statute, not covered by copyright
wa-wac-296-123-010_2026-11-15.html https://app.leg.wa.gov/WAC/default.aspx?cite=296-123-010 2026-11-15 State regulation, not covered by copyright
wa-wac-296-123-010_2026-11-15.txt same, text derived from the HTML 2026-11-15 State regulation, not covered by copyright
wa-wac-296-123-060_2026-11-15.html https://app.leg.wa.gov/WAC/default.aspx?cite=296-123-060 2026-11-15 State regulation, not covered by copyright
wa-wac-296-123-060_2026-11-15.txt same, text derived from the HTML 2026-11-15 State regulation, not covered by copyright
wa-wac-296-123-105_2026-11-15.html https://app.leg.wa.gov/WAC/default.aspx?cite=296-123-105 2026-11-15 State regulation, not covered by copyright
wa-wac-296-123-105_2026-11-15.txt same, text derived from the HTML 2026-11-15 State regulation, not covered by copyright
nyc-local-law-59-2022_2026-11-15.pdf https://nyc.gov/assets/cchr/downloads/pdf/amendments/Local-Law-59.pdf 2026-11-15 Enacted local law, not covered by copyright; out of scope
nyc-local-law-59-2022_2026-11-15.txt same, text derived from the PDF 2026-11-15 Enacted local law, not covered by copyright; out of scope
co-session-law-2023-ch347-sb23-105_2026-11-15.pdf https://leg.colorado.gov/laws/session-laws/SB23-105/347/download 2026-11-15 State session law, not covered by copyright; out of scope
co-session-law-2023-ch347-sb23-105_2026-11-15.txt same, text derived from the PDF 2026-11-15 State session law, not covered by copyright; out of scope
co-session-law-2019-ch247-sb19-085_2026-11-15.pdf https://leg.colorado.gov/laws/session-laws/SB19-085/247/download 2026-11-15 State session law, not covered by copyright; out of scope
co-session-law-2019-ch247-sb19-085_2026-11-15.txt same, text derived from the PDF 2026-11-15 State session law, not covered by copyright; out of scope
guidance-ca-dlse-equal-pay-and-pay-transparency-faq_2026-11-15.html https://www.dir.ca.gov/dlse/california_equal_pay_act.htm 2026-11-15 State agency guidance, quoted with attribution
guidance-ca-dlse-equal-pay-and-pay-transparency-faq_2026-11-15.txt same, text derived from the HTML 2026-11-15 State agency guidance, quoted with attribution
guidance-ny-dol-p689-pay-transparency-faqs_2026-11-15.pdf https://dol.ny.gov/pay-transparency-law-faqs-p689 2026-11-15 State agency guidance, not quoted in this version
guidance-ny-dol-p689-pay-transparency-faqs_2026-11-15.txt same, text derived from the PDF 2026-11-15 State agency guidance, not quoted in this version
guidance-ny-dol-p687-pay-transparency-employers_2026-11-15.pdf https://dol.ny.gov/system/files/documents/2023/10/p687-pay-transparency-law-for-employers_0.pdf 2026-11-15 State agency guidance, not quoted in this version
guidance-ny-dol-p687-pay-transparency-employers_2026-11-15.txt same, text derived from the PDF 2026-11-15 State agency guidance, not quoted in this version
guidance-ny-dol-proposed-12-nycrr-194-2_2026-11-15.pdf https://dol.ny.gov/pay-transparency-proposed-regulatory-text 2026-11-15 Proposed rule, state agency publication, not quoted in this version
guidance-ny-dol-proposed-12-nycrr-194-2_2026-11-15.txt same, text derived from the PDF 2026-11-15 Proposed rule, state agency publication, not quoted in this version
guidance-wa-lni-es-e-2-job-posting-requirements_2026-11-15.pdf https://lni.wa.gov/workers-rights/_docs/ES.E.2.pdf 2026-11-15 State agency guidance, not quoted in this version
guidance-wa-lni-es-e-2-job-posting-requirements_2026-11-15.txt same, text derived from the PDF 2026-11-15 State agency guidance, not quoted in this version

Fonts and assets

None. The pages use the fonts already on your computer (a system sans and a system serif), and hold no images, icons or font files. The skeleton drawing on the root page is HTML and CSS.

Licence

Apache-2.0.

About

One skeleton, two apps: hold a document up against the law it must follow. Built with Kiro for Kiroween 2026.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages