@graffiticode/l0175 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/compiler.d.ts +12 -0
  2. package/dist/compiler.d.ts.map +1 -0
  3. package/dist/compiler.js +1285 -0
  4. package/dist/compiler.js.map +1 -0
  5. package/dist/embedding.d.ts +64 -0
  6. package/dist/embedding.d.ts.map +1 -0
  7. package/dist/embedding.js +294 -0
  8. package/dist/embedding.js.map +1 -0
  9. package/dist/index.d.ts +7 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +8 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/lexicon.d.ts +644 -0
  14. package/dist/lexicon.d.ts.map +1 -0
  15. package/dist/lexicon.js +101 -0
  16. package/dist/lexicon.js.map +1 -0
  17. package/dist/static/instructions.md +527 -0
  18. package/dist/static/language-info.json +85 -0
  19. package/dist/static/lexicon.json +1112 -0
  20. package/dist/static/schema.json +162 -0
  21. package/dist/static/scope.json +28 -0
  22. package/dist/static/spec.html +572 -0
  23. package/dist/static/stems.md +374 -0
  24. package/dist/static/template.gc +67 -0
  25. package/dist/static/usage-guide.md +111 -0
  26. package/package.json +33 -0
  27. package/spec/README.md +18 -0
  28. package/spec/data/examples.gc +84 -0
  29. package/spec/data/examples_with_explanations.md +124 -0
  30. package/spec/data/training_examples.json +122 -0
  31. package/spec/docs.md +102 -0
  32. package/spec/examples.md +91 -0
  33. package/spec/instructions.md +337 -0
  34. package/spec/language-info.json +78 -0
  35. package/spec/schema.json +162 -0
  36. package/spec/scope.json +28 -0
  37. package/spec/spec.md +277 -0
  38. package/spec/stems.md +374 -0
  39. package/spec/template.gc +67 -0
  40. package/spec/unparse-hints.json +3 -0
  41. package/spec/usage-guide.md +111 -0
@@ -0,0 +1,85 @@
1
+ {
2
+ "revised": "2026-06-24",
3
+ "id": "0175",
4
+ "description": "Composes 5th-grade English Language Arts assessment items (Smarter Balanced · Grade 5 · Claim 1) for multiple learning targets — DIFFERENT reading skills: c1-t4 (Reasoning & Evidence, literary, RL) and c1-t11 (Reasoning & Evidence, informational, RI) ask students to infer/conclude and justify with evidence; c1-t9 (Central Ideas, informational, RI-1/RI-2) asks them to determine the main idea, the key details that build it, or summarize; c1-t8 (Key Details, informational, RI-1/RI-7) GIVES the inference in the stem and asks them to select the supporting evidence (the options are passage sources, not statements; item types multiple-choice/multi-select/single-part-hot-text); c1-t10 (Word Meanings, informational, RI-4/L-4) asks for the meaning of a targeted word/phrase in context (the options are MEANINGS, authored as a `word` with candidate `meaning`s — not claims; item types multiple-choice/multi-select, plus a click-the-word hot-text — for that, author the candidate `word`s as a top-level `words` list: the correct one is the outcome's `focus` (give it the `line` of its paragraph) and the others are distractor candidate words; ALL candidates must be words that appear in that one paragraph (they need only `text` — no `meanings`). The compiler shows the whole paragraph and makes the authored candidate words clickable, with the focus word correct (if you author only the correct word, every content word in the paragraph becomes a choice). The `stem` is only the instruction + the definition (e.g. 'Read the paragraph below. Click the word that means …') — never paste the paragraph into the stem). Every program declares a top-level `target` selecting the dimension/standard/error-type/DOK/stem vocabulary. Item-first: a program authors the questions (outcomes) first — each with a unique id, a focus correct claim (a list on multi-select), and a stem from the target's guideline catalog — then supported and distractor claims (each distractor targets the question(s) it foils) and evidence sources for one passage. Item types: ebsr (two-part), hot-text, short-text, multiple-choice (one correct), multi-select (exact correct set). T9 distractors are a significance taxonomy (too-narrow/too-broad/misreads-detail/insignificant) — usually true statements that just aren't central — vs R&E's reasoning-error taxonomy. Supply the passage text already split into paragraphs (keep the paragraph breaks). The compiler takes each outcome's focus and the foils that target it and assembles the item; it selects and validates authored content, it does not generate content or stems. Author the passage and all question text at the target reading level (Grade 5; overridable with a top-level `grade <n>`); the compiler estimates the passage's reading level and warns when it runs above the target grade.",
5
+ "supported_item_types": [
6
+ "ebsr",
7
+ "hot-text",
8
+ "short-text",
9
+ "multiple-choice",
10
+ "multi-select"
11
+ ],
12
+ "example_prompts": [
13
+ {
14
+ "prompt": "From a short story about a girl named Mara at a tide pool, write an EBSR item about what Mara cares about, standard rl-1.",
15
+ "produces": "ebsr",
16
+ "notes": "Literary text -> target c1-t4. Two-part selected response: Part A inference statement, Part B supporting line; needs a supported claim plus at least 5 viable error-typed distractor claims (the item draws 3; a deeper pool gives selection real choice)."
17
+ },
18
+ {
19
+ "prompt": "From an informational article about the history of bridge design, write an EBSR item about how each design solved a problem the previous one could not.",
20
+ "produces": "ebsr",
21
+ "notes": "Informational text -> target c1-t11, dimension relationships-interactions, RI standards (ri-1 + ri-3). Same item-first structure; pick stems from the T11 section of stems.md."
22
+ },
23
+ {
24
+ "prompt": "From the same tide-pool passage, also produce a short-text constructed-response item asking for an inference about Mara with evidence.",
25
+ "produces": "short-text",
26
+ "notes": "Reuses the same pool; emits a prompt and a 0/1/2 rubric, no distractors."
27
+ },
28
+ {
29
+ "prompt": "Make a hot-text item where students click the sentences that show Mara's focus on the tide pool.",
30
+ "produces": "hot-text",
31
+ "notes": "Part B exposes every passage line as selectable; the correct claim's directly-supporting lines are the answer."
32
+ },
33
+ {
34
+ "prompt": "Add a faulty-reasoning distractor that mistakes Mara's quiet whisper for fear of her family.",
35
+ "produces": "ebsr",
36
+ "notes": "A distractor claim with error-type faulty-reasoning, a rationale, and targets naming the question(s) it foils; composition uses it for Part A error-type coverage."
37
+ },
38
+ {
39
+ "prompt": "Write an item about the narrator's point of view in a first-person diary entry, standard rl-6.",
40
+ "produces": "ebsr",
41
+ "notes": "Dimension point-of-view; the outcome's focus names the supported claim and the item reports rl-6 alongside rl-1."
42
+ },
43
+ {
44
+ "prompt": "Compose an item comparing how two characters in the story react to the same event, standard rl-3.",
45
+ "produces": "ebsr",
46
+ "notes": "Dimension character-relationship; the companion standard rl-3 is emitted with rl-1."
47
+ },
48
+ {
49
+ "prompt": "Write the tide-pool EBSR but keep it at a 4th-grade reading level.",
50
+ "produces": "ebsr",
51
+ "notes": "User named a grade -> add a top-level `grade 4`; author shorter sentences and simpler vocabulary than the Grade-5 default. The compiler checks the passage against the resolved grade and warns if it reads above it."
52
+ },
53
+ {
54
+ "prompt": "Here is the passage (4 paragraphs, blank-line separated): <text>. Write an EBSR item about the narrator's feelings.",
55
+ "produces": "ebsr",
56
+ "notes": "The request supplies paragraph-chunked text -> emit one `lines` entry per paragraph, preserving the breaks, so the rendered passage keeps its 4 numbered paragraphs. Do not merge the text into a single line."
57
+ },
58
+ {
59
+ "prompt": "From an informational article about honeybees, write a multiple-choice item asking for the main idea.",
60
+ "produces": "multiple-choice",
61
+ "notes": "Central Ideas -> target c1-t9, type multiple-choice, dimension central-idea, standards ri-1+ri-2, DOK r-dok2. The focus claim is the central idea; distractors use the significance taxonomy (too-narrow: a true supporting detail; too-broad: an overgeneralization; insignificant: a minor detail), i.e. true statements that aren't the main idea."
62
+ },
63
+ {
64
+ "prompt": "Make a multi-select asking which two sentences belong in a summary of the article.",
65
+ "produces": "multi-select",
66
+ "notes": "target c1-t9, type multi-select, dimension summary. `focus` is a LIST of the two correct claims; the compiler emits 5-6 options and the student must select exactly the correct set."
67
+ },
68
+ {
69
+ "prompt": "The article concludes that aqueducts let distant cities get fresh water — make a multiple-choice item asking which detail best supports that conclusion.",
70
+ "produces": "multiple-choice",
71
+ "notes": "Given inference -> evidence selection: target c1-t8, type multiple-choice, dimension supporting-evidence, standards ri-1+ri-7. Author ONE supported claim (the conclusion) at `focus` and state it in the stem; the OPTIONS are sources -- the directly-supports source is correct, supports-wrong-claim/irrelevant sources are foils. No distractor claims."
72
+ },
73
+ {
74
+ "prompt": "What does the word 'aqueduct' most likely mean as it is used in the article? (multiple choice)",
75
+ "produces": "multiple-choice",
76
+ "notes": "Word meaning in context: target c1-t10, type multiple-choice, dimension word-meaning, standard ri-4 + l-4a (context). Author a top-level `words` list with a `word` (text the targeted word, line/quote its context) whose `meanings` are the OPTIONS -- one `status correct` + `status distractor` meanings (error-type other-meaning/misinterprets/wrong-context + rationale). The outcome's `focus` names the word; state the word + its sentence in the stem."
77
+ },
78
+ {
79
+ "prompt": "Make a click-the-word item: in the paragraph about the city's water supply, the target word is 'aqueduct' (it means a system of pipes/canals that carries water). Stem: 'Read the paragraph below. Click the word that means a system of pipes or canals that carries water.'",
80
+ "produces": "hot-text",
81
+ "notes": "T10 Task Model 3 (click-the-word): target c1-t10, type hot-text, dimension word-meaning, standard ri-4 + l-4a. Author the focus `word` (e.g. { id \"w1\" text \"aqueduct\" line <paragraph #> }) as the outcome's `focus`, then the DISTRACTOR CANDIDATE WORDS either way: (a) as more single-word `word`s in the `words` list, OR (b) as the focus word's distractor `meanings` whose `text` IS the candidate word — a single word, with error-type + rationale (e.g. text \"causeways\", text \"canals\"). For hot-text the meaning text must be the literal word to click, NOT a definition. ALL candidates must be words that appear in the focus word's paragraph. The compiler shows the whole paragraph (from the focus word's `line`) and makes the candidate words clickable, focus correct. Do NOT put the paragraph in the stem; the stem is only the instruction + definition. (If you author only the focus word with a real multi-word definition, the compiler can't find candidates and falls back to making EVERY content word clickable — avoid that by listing the candidate words.)"
82
+ }
83
+ ],
84
+ "authoring_guide": "L0175 is a content-composition language for 5th-grade English Language Arts assessment items (Smarter Balanced spec ELA · Grade 5 · Claim 1 · Reasoning & Evidence). One language serves **multiple learning targets**; **every program first declares a top-level `target`**: `c1-t4` (Target 4 — *literary* texts, RL standards, dimensions like character/theme/point-of-view) or `c1-t11` (Target 11 — *informational* texts, RI standards, dimensions like relationships-interactions/author-use-of-information/point-of-view/purpose). Choose the target from the request (literary vs. informational text and the skill assessed); the dimensions, standards, and stem catalog (`stems.md`) are then scoped to that target, and mixing targets' vocabularies is a compile error. It is **item-first**: after picking the target you compose the questions (`outcome`s) first — each with a unique `id`, a `focus` naming its correct claim, and an explicit `stem` (and `stem-b` on EBSR) instantiated from the guideline's Appropriate-Stem catalog (`stems.md`) — then author the supported `claim`s and a *superset* of distractor `claim`s, each tagging the question(s) it foils via `targets`, plus evidence `source`s. The compiler then *composes* each outcome deterministically: it takes the correct claim from `focus`, draws that question's foils ONLY from the distractors that `targets` it, uses the authored stem, and assembles a finished item in one of three task models: `ebsr` (two-part evidence-based selected response), `hot-text` (select-text), or `short-text` (constructed response). One passage + superset can yield several items, each with its own bound foil set. The compiler performs no generation and no stem synthesis — it selects, validates against the guideline, and warns when a question's pool falls short. Distractors are tagged by the SBAC error taxonomy (Part A: `misreads-detail`, `erroneous-inference`, `faulty-reasoning`; Part B: `supports-wrong-claim`, `irrelevant`), each carrying a rationale; composition picks foils for error-type coverage and couples Part B evidence to the claims it plausibly supports. **For each EBSR/Hot-Text question author at least 5 viable distractors that `targets` it (aim for 5–8, over-generating since some are filtered as near-duplicates or accidentally correct) — covering all three error types with ≥2 alternatives in at least two of them, and giving each a `plausibility` score (0–1). An item draws only 3 foils, so a richer targeted pool yields stronger items; fewer than 3 targeting a question is a hard error, fewer than 5 a warning. Likewise, for EBSR Part B author at least 5 non-supporting evidence lines (`supports-wrong-claim` + `irrelevant`) so the compiler can choose the most tempting 3 foil options. No-giveaway rule: at least one of those `supports-wrong-claim` lines must list BOTH the correct claim's id AND a distractor's id in its `supports` (a line that seems to support the right answer but actually backs a misreading) — otherwise the correct evidence line stands alone, Part B telegraphs Part A, and the compiler warns \"possible A↔B giveaway.\" Do not make every wrong-claim line point only at distractors.**\n\n**Targets are different skills — pick the one the request assesses.** Beyond the two Reasoning &\nEvidence targets above (`c1-t4` literary, `c1-t11` informational — infer/conclude and justify with\nevidence), L0175 also composes **`c1-t9` — Central Ideas** (informational): a *different* skill —\nsynthesize and condense (the main/central idea, the key details that build it, and summary), NOT\ninference. Use `c1-t9` when the request is about the **main idea**, **most important details**, or a\n**summary**; dimensions `central-idea`/`key-detail`/`summary`, standards `ri-1`+`ri-2`, DOK 2 (3 for\nthe written summary). Its distractors are a **significance** taxonomy — usually *true* statements\nthat simply aren't central: `too-narrow` (a supporting detail mistaken for the main idea),\n`too-broad` (an overgeneralization/off-topic), `misreads-detail`, `insignificant` (a minor detail\nthat doesn't belong in a summary). T9 item types are `multiple-choice` (pick the central idea),\n`multi-select` (choose the two sentences that belong in a summary — `focus` is a **list**), `ebsr`\n(central idea → supporting detail), `short-text` (summary), and single-part `hot-text` (click the\nsentence(s) that show the main idea — the `focus` claim's directly-supporting `source`s are the\ncorrect selection). Two new item types — `multiple-choice` (4 options, one correct) and\n`multi-select` (5–6 options, an exact correct set) — are single-part: author the `stem` and a\n`focus`, no Part B.\n\nL0175 also composes **`c1-t8` — Key Details** (informational): the inference/conclusion is **GIVEN\nin the stem** and the student selects the supporting **evidence** (the answer is *evidence*, not a\nchosen statement). Use `c1-t8` when the request **states an idea and asks which detail/sentence\nsupports it**; dimension `supporting-evidence`, standards `ri-1`+`ri-7`, DOK 1–2, item types\n`multiple-choice`, `multi-select`, and **single-part `hot-text`** (no Part A). Author ONE supported\n`claim` = the given inference (its `focus`), state it in the `stem`, and author `source`s as the\noptions: `directly-supports` = correct evidence (with a `quote`), `supports-wrong-claim`/`irrelevant`\n= distractor evidence. No distractor claims.\n\nL0175 also composes **`c1-t10` — Word Meanings** (informational): the question asks for the\n**meaning of a targeted word/phrase in context**, so the answer choices are **meanings**, authored\nas a dedicated `word`/`meaning` structure (not claims). Use `c1-t10` when the request asks **what a\nword/phrase means**; dimension `word-meaning`, standards `ri-4` + the L-4 family (`l-4a` context /\n`l-4b` roots & affixes / `l-5c` word relationships / `l-4c` reference), DOK 1–2, item types\n`multiple-choice`, `multi-select`, and `hot-text` (click the word matching a given definition — the correct word is `focus` with its paragraph's `line`; author the distractor candidate words either as more single-word `word`s OR as the focus word's distractor `meanings` whose `text` is the candidate word itself (a single word, not a definition), ALL appearing in that one paragraph. The compiler shows the paragraph and makes the candidate words clickable, focus correct; if no candidate words are found it falls back to making every content word a choice. The `stem` is only the instruction + definition — never paste the paragraph into the stem). Author a top-level\n`words` list: a `word` (the targeted word, `line`/`quote` for context) with `meanings` — one (MC) or\n≥2 (Multi-Select) `status correct` meanings + `status distractor` meanings (each with a T10\n`error-type` — `other-meaning`/`misinterprets`/`wrong-context` — and a `rationale`). The outcome's\n`focus` names the word; state the word and its context sentence in the `stem`.\n\n**Write at the target grade level.** The grade is the guideline's grade (the target's — Grade 5 for `c1-t4`/`c1-t11`) unless the user's prompt asks for a different grade, in which case author a top-level `grade <n>`. Match the passage AND all question text to that grade: short, mostly simple/compound sentences; concrete, high-frequency vocabulary; an inference drawn from **specific details in the text**, not college-style literary or rhetorical analysis. DOK 3 means strategic reasoning *within* grade-level text — not harder text. The compiler estimates the passage's reading level and warns when it runs above the target grade. See **Grade-appropriate reading level** below.\n\n**Supply the passage already split into paragraphs.** When a request includes or describes the passage text, break it into its paragraphs and keep those breaks — each paragraph becomes one numbered `lines` entry and the rendered passage preserves that paragraph structure. The code generator maintains the paragraphs you provide; it does not re-flow a wall of text into one block or re-chunk it. Separate paragraphs with a blank line (or clearly mark each one) so they survive into the final passage. **Keep paragraphs even for Hot Text** — the compiler segments each paragraph into sentences and makes each one individually selectable in Part B, so the passage keeps its paragraph layout; do not author the passage as one-sentence lines.\n\nWhen composing a request, declare the `target`, then author the passage and outcomes (with their stems) first, then the inference graph (supported claims, then the targeted distractors), then the evidence. The program is one flat builder chain: top-level forms (`target`, `passage`, `type`, `lines`, `claims`, `evidence`, `outcomes`) thread a single continuation and the whole program ends with one `{}..`. Inside the `claims`/`evidence`/`outcomes` lists, each element (`claim`/`source`/`outcome`) is its own attribute chain terminated by its own `{}`. Attribute values that are free text (`text`, `rationale`, `subject`, `stem`, the passage heading) or id labels (`id`, `focus`, `cites`, `supports`, `targets`) are quoted strings; closed-enum values (`target`, `type`, `status`, `dimension`, `error-type`, `standard`, `dok`) are bare kebab-case identifiers (e.g. `c1-t11`, `ebsr`, `directly-supports`, `ri-1`).\n\nIn scope: SBAC Grade 5 · Claim 1 for targets **T4** (Reasoning & Evidence, literary, RL), **T11** (Reasoning & Evidence, informational, RI), **T9** (Central Ideas, informational, RI-1/RI-2), **T8** (Key Details, informational, RI-1/RI-7 — given-inference → evidence selection), and **T10** (Word Meanings, informational, RI-4/L-4 — meaning of a targeted word, authored as `word`/`meaning`); a single passage; the per-target dimensions and distractor taxonomy; item types `ebsr`, `hot-text`, `short-text`, `multiple-choice`, `multi-select` (allowed set varies by target); DOK r-dok1..r-dok3. Out of scope: other claims/grades or Claim-1 targets beyond T4/T11/T9/T8/T10; multi-word-phrase candidates in T10 click-the-word; dual-text stimuli; compile-time LLM generation; auto-scoring of short text; cross-language composition."
85
+ }