Files
threshing-atlas/core/spec/form.yaml
T
kathleenandClaude Opus 5.5 47da9f1f82 Code the sheet's new answers; a failed build opens an issue instead of crashing the rebuild
The evening source check stopped (correctly) on two answers the coding rules did not know:
- first sighting "2 Greens": a new form option. Coded as Green, with a data flag that keeps the
  original answer (first_sighting_alias in core/spec/form.yaml).
- row label "Unknown" on a bulk-pasted row: added to the entry values in data/dictionary.yaml.

Workflow: when `collection update` reports the build failed, skip the rebuild (it would only fail
again) and always open the "Source check failed" issue, so new answers are reported, not lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
2026-11-17 23:48:47 +00:00

163 lines
9.4 KiB
YAML

# The community "Threshing Routes" form: how each question is found in an export and how every answer is coded.
#
# This file is the single source of truth for the coding rules' tables. core/atlas/coding.py reads it; the logic
# that combines answers (which branch a run took, how it ended) lives there and is described on the page's
# Methods tab. To support a new or renamed answer, add it here and add a case to tests/core/test_coding.py.
version: 1
colours: [Red, Green, Orange, Brown, Blue, Black]
# Answers that carry no information about the choice. They are kept in the coded data for transparency, but every
# analysis treats them as missing: never shown or compared as if they were a choice.
missing_values: ["Unknown", "Unsure", "Unsure/unknown", "Multiple", "(not recorded)", "(not asked)",
"(not asked/blank)", "Unknown/lost count", "Blank/not asked"]
# Free-text answers sometimes contain an email address; it is replaced before anything is displayed or exported.
redact:
pattern: '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}'
replacement: "[email removed]"
# Columns are found by words in the question text (case-insensitive), so the coding keeps working when the form
# owner reorders, renames slightly or adds questions. A word starting with "!" must NOT appear in the header.
columns:
timestamp: { match: ["timestamp"] }
wing_First: { match: ["wing and section", "[first]"] }
wing_Second: { match: ["wing and section", "[second]"] }
wing_Third: { match: ["wing and section", "[third]"] }
wing_Fourth: { match: ["wing and section", "[fourth]"] }
squad: { match: ["what squad"] }
attempt: { match: ["attempt number"] }
company: { match: ["who accompanied"] }
dir_East: { match: ["initial direction", "[east"], replaced_by: first_dir }
dir_West: { match: ["initial direction", "[west"], replaced_by: first_dir }
dir_Center: { match: ["initial direction", "[forest center"], replaced_by: first_dir }
cadet: { match: ["outcome of your cadet encounter"] }
post: { match: ["path did you take after the bully"] }
hour: { match: ["after walking an hour"] }
enc_Red: { match: ["attempt to bond", "[red"] }
enc_Green: { match: ["attempt to bond", "[green"] }
enc_Orange: { match: ["attempt to bond", "[orange"] }
enc_Brown: { match: ["attempt to bond", "[brown"] }
enc_Blue: { match: ["attempt to bond", "[blue"] }
enc_Black: { match: ["attempt to bond", "[black"] }
death_note: { match: ["those who died"] }
bond_note: { match: ["those who bonded"] }
goal: { match: ["colour dragon are you trying"], replaced_by: goal_v2 }
combat: { match: ["combat choice"], replaced_by: cadet_actions }
# Questions added in the redesigned form (late October 2026)
first_dir: { match: ["what was your first direction"], replaced_by: dir_Center }
first_colour: { match: ["colour was your initial dragon sighting", "!["], replaced_by: dir_Center }
leg_West: { match: ["colour was your initial dragon sighting", "[west"], optional: true }
leg_Center: { match: ["colour was your initial dragon sighting", "[forest center"], optional: true }
sighting_action: { match: ["action did you take during the first dragon sighting"], optional: true }
cadet_actions: { match: ["during your cadet encounter"], replaced_by: combat }
goal_v2: { match: ["why are you doing this run"], replaced_by: goal }
malek: { match: ["seek malek"], optional: true }
rare: { match: ["encounter a rare dragon"], optional: true }
tail: { match: ["what tail does your dragon have"], optional: true }
# Answer → coded value, one table per question.
answers:
# Older form: one answer for the whole cadet encounter → [scream, resolution]
cadet_legacy:
"Bullies > You dealt with them": ["Investigate & help", "Killed the bullies yourself"]
"Bullies > Squadmate's revenge": ["Investigate & help", "Squadmate's revenge"]
"Bullies > Left to the Dragons": ["Investigate & help", "Left bullies to the dragons"]
"Bullies > Assessed the situation": ["Investigate & help", "Unknown"]
"Injured Cadet > Tourniquet": ["Ignore the scream", "Tourniquet"]
"Injured Cadet > Left them there": ["Ignore the scream", "Left injured cadet"]
"Injured Cadet > Took their weapons": ["Ignore the scream", "Took their weapons"]
"Avoided combat (Investigated scream > Left them to it)": ["Investigate & leave", "Left them to it"]
"You died in combat": ["Investigate & help", "DIED in combat"]
"N/A - You died with initial dragon sighting": ["DIED at first sighting", "DIED at first sighting"]
# Older form: the first move in the fight
combat_legacy:
"Bullies > Assessed the situation": "Assess the situation"
"Bullies > Even the numbers (Rushed the smaller cadet)": "Even the numbers (smaller cadet)"
"Bullies > Put yourself in the middle (Rushed the bigger cadet attacking your squadmate)": "Put yourself in the middle (bigger cadet)"
# Redesigned form: the encounter as a path of actions → [scream, first move, second move, resolution or null]
# (null resolution: the separate outcome question decides it, see cadet_outcome)
cadet_actions:
"Bullies > Assess > Unknown": ["Investigate & help", "Assess the situation", null, null]
"Bullies > Assess > Smaller Cadet": ["Investigate & help", "Assess the situation", "Engage the smaller cadet", null]
"Bullies > Assess > Daggers or not": ["Investigate & help", "Assess the situation", "Daggers or not (protect squadmate)", null]
"Bullies > Unknown": ["Investigate & help", null, null, null]
"Bullies > Smaller Cadet (Did not assess)": ["Investigate & help", "Even the numbers (smaller cadet)", null, null]
"Bullies > Bigger Cadet (Did not assess)": ["Investigate & help", "Put yourself in the middle (bigger cadet)", null, null]
"Injured Cadet > Tourniquet": ["Ignore the scream", null, null, "Tourniquet"]
"Injured Cadet > Left them there": ["Ignore the scream", null, null, "Left injured cadet"]
"Injured Cadet > Took their weapons": ["Ignore the scream", null, null, "Took their weapons"]
"Avoided combat (Investigated scream > Left them to it)": ["Investigate & leave", null, null, "Left them to it"]
"N/A - You died with initial dragon sighting": ["DIED at first sighting", null, null, "DIED at first sighting"]
"Unsure": ["Unknown", null, null, "Unknown"]
cadet_outcome:
"Squadmate's revenge": "Squadmate's revenge"
"You ended the bullies yourself": "Killed the bullies yourself"
"Left to the Dragons": "Left bullies to the dragons"
"You died in combat": "DIED in combat"
direction:
"Forest Center": Center
"West / Scent": West
"East / Roar": East
goal_v2:
"Hoping for a Rare Dragon (Blue or Black)": "Blue or Black"
"Trying to bond the Red dragon under the tree": "Red (tree)"
"Daily Run Assignment data": "Daily run data"
"Just here for fun, and maybe a dragon": "Any (for fun)"
# Squad: matched ignoring case and spaces (riders type it); an answer not listed still stops the build
squad_any_case:
"first": "First"
"second": "Second"
"third": "Third"
"don't know": "Don't know"
sighting_action:
"Hold Ground / Stay Still": "Hold still"
"Respect / Face it": "Respect / face it"
"Retreat / Run / Back Away": "Retreat / run"
"Hide / Duck": "Hide"
"Protect / Help Squadmate": "Protect squadmate"
"Draw / Drop Weapon": "Weapon"
"Meet Gaze": "Meet its gaze"
"Protect / Help Sqaudmate": "Protect squadmate"
"Approach": "Approach"
"Stand on your own": "Stand alone"
"Unsure": "Unknown"
"Unsure - You don't remember": "Unknown"
rare:
"Yes - A blue dragon in the valley": "Blue (valley)"
"Yes - Shadow!!!": "Shadow"
"No": "No"
hour:
"Continued to Valley Centre": Valley
"Climbed the tallest tree": Tree
"N/A - You're dead": "DIED before the hour"
# Suffix on the company answer that means the rider later left their squadmates. The answer was only offered from
# this date (none of the 504 squad runs before it chose it; 40 of 144 after it did): earlier and undated squad runs
# are coded as unknown (empty), not as "stayed together".
company_left_suffix: " > Left them"
left_squadmates_asked_from: "2026-10-27"
# The encounter answers in the "attempt to bond" grid
encounter_answers: { bonded: "Bonded!", burned: "Incinerated", passed: "Changed my mind", rescued: "Saved by another" }
# When more than one dragon is marked Incinerated, the run ended on the last one met, in this order.
burn_order:
tree: [Red, Green, Orange, Brown, Blue, Black]
valley: [Red, Orange, Brown, Blue, Green, Black]
# First-dragon pools per company and direction, from the community PDF. Only used to FLAG rows that report a
# dragon outside the documented pool. Leaving your squadmates sends you into the solo pools too.
sighting_pool:
Alone: { East: [Red, Orange], West: [Red, Brown, Green], Center: [Red, Brown] }
1 Squadmate: { East: [Green, Orange, Red], West: [Red, Brown, Green], Center: [Red, Brown] }
2 Squadmates: { East: [Red, Orange], West: [Green, Brown, Red], Center: [Red, Brown] }
# First-sighting answers that are not a single colour: coded as this colour, and the row is flagged with the
# original answer (data_flags), so nothing is lost.
first_sighting_alias:
"2 Greens": Green
# How a bulk-pasted row's attempt answer is read
attempt_words: { first: 1, second: 2, third: 3, fourth: 4, fifth: 5 }