@mark1russell7/guidebook-preparedness 0.2.2 → 0.3.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@mark1russell7/guidebook-preparedness",
4
- "version": "0.2.2",
4
+ "version": "0.3.0",
5
5
  "description": "The preparedness content of the guidebook: cited sources, the steps and marked gaps of 12 cases and 6 cuts, 40 topics in 12 areas, and the catalog of offline bundles.",
6
6
  "keywords": [
7
7
  "guidebook",
@@ -0,0 +1,95 @@
1
+ // The master chart: one chart for any disaster. A reader starts at a signal, answers at most 2 questions and goes to a tab.
2
+ // The chart asks for needs, not for kinds of event, so an event that nobody foresaw still has a route.
3
+ // A broadcast is one source of information. No answer of the chart waits for officials.
4
+
5
+ import type { ChartNode, Phase, Tab } from "@mark1russell7/guidebook-plans";
6
+
7
+ const ALL: readonly Phase[] = ["ready", "warned", "P0", "P1", "P2", "P3", "P4", "P5"];
8
+
9
+ /**
10
+ * The tabs of the printed plan, in the sequence of the binder. Each tab is for one need or one subject.
11
+ * Each state of society is a section in each tab. The page budgets come from the print.
12
+ */
13
+ export function tabsOf(cases: readonly string[]): readonly Tab[] {
14
+ return [
15
+ { id: "start", title: "Start: the master chart", keys: [], phases: [], pages: 2 },
16
+ { id: "first-72h", title: "The first 72 hours", keys: cases, phases: ["P0", "P1", "P2"], pages: 4 },
17
+ { id: "stay", title: "Stay: the home and the building", keys: ["home.dwelling"], phases: ALL, pages: 8 },
18
+ { id: "go", title: "Go: the routes and the other places", keys: ["road.local"], phases: ALL, pages: 4 },
19
+ { id: "water", title: "Water and sanitation", keys: ["water.main", "sewer.main", "hydration.drink"], phases: ALL, pages: 6 },
20
+ { id: "heat", title: "Heat, shelter and power", keys: ["power.grid", "gas.main", "fuel.retail", "power.electric"], phases: ALL, pages: 6 },
21
+ { id: "health", title: "Health and medicine", keys: ["care.local", "health.medicine", "health.medical-emergency"], phases: ALL, pages: 8 },
22
+ { id: "food", title: "Food", keys: ["food.retail", "food.energy"], phases: ALL, pages: 6 },
23
+ { id: "security", title: "The safety of the people", keys: ["security.civil-unrest", "security.armed-conflict"], phases: ALL, pages: 6 },
24
+ { id: "group", title: "Contact, the group and trade", keys: ["phone.network", "network.access", "cash.retail"], phases: ALL, pages: 6 },
25
+ { id: "long-term", title: "The long term: 5 weeks to 5 years", keys: cases, phases: ["P3", "P4", "P5"], pages: 10 },
26
+ { id: "hazards", title: "The hazards, case by case", keys: cases, phases: ALL, pages: 24 },
27
+ { id: "appendices", title: "The appendices", keys: [], phases: [], pages: 40 },
28
+ ];
29
+ }
30
+
31
+ /** The tab of the chart itself. It is the entry of the binder, so no path of the chart goes to it. */
32
+ export const START_TAB = "start";
33
+
34
+ const NEEDS_FIRST = "Do the needs by their danger. Safety comes in minutes, heat and water in hours and days, food in weeks.";
35
+
36
+ /** The nodes of the master chart: 3 signals, 5 questions and 12 ends. */
37
+ export const MASTER: readonly ChartNode[] = [
38
+ // The signals: what a reader sees, hears, smells, feels or learns.
39
+ { id: "sense", kind: "signal", text: "You see, hear, smell or feel a danger: fire, smoke, gas, shaking, a flash, rising water, a siren or shots.", next: "life" },
40
+ { id: "threat", kind: "signal", text: "You learn of a threat that comes: a storm, a flood, a fire, a disease, unrest, an attack or a war.", next: "known" },
41
+ { id: "supply", kind: "signal", text: "A supply stops, or help does not come: power, water, sewer, gas, phone, internet, fuel, food, cash, care or the law.", next: "society" },
42
+
43
+ // The questions. Each one has an answer that a reader can see without help.
44
+ {
45
+ id: "life", kind: "question", text: "Can the danger hurt you in the next minutes?", sources: [],
46
+ reasoning: "A danger of minutes leaves no time to read. Do the reflex first, then come back to the chart.",
47
+ answers: [{ label: "Yes", next: "to-72h" }, { label: "No", next: "place" }],
48
+ },
49
+ {
50
+ id: "known", kind: "question", text: "Does the hazards tab have a page for this event?", sources: [],
51
+ reasoning: "A page for the event gives its special risks. An event with no page still breaks down into needs, so the chart continues.",
52
+ answers: [{ label: "Yes", next: "to-hazards" }, { label: "No", next: "place" }],
53
+ },
54
+ {
55
+ id: "place", kind: "question", text: "Is your place safe to stay in: no fire, gas, flood water, damage or bad air?", sources: [],
56
+ reasoning: "Your place holds your supplies, so stay when it is safe. Go when the place itself is the danger.",
57
+ answers: [{ label: "Yes", next: "to-stay" }, { label: "No", next: "to-go" }],
58
+ },
59
+ {
60
+ id: "society", kind: "question", text: "Does society work: does help come when you call, and do the shops, the pharmacies and the grid operate?", sources: [],
61
+ reasoning: "With no help and no shops, each need depends on your group and your supplies for weeks or more. Then the long plan comes first.",
62
+ answers: [
63
+ { label: "Yes", next: "need", society: "works" },
64
+ { label: "In part", next: "need", society: "partly" },
65
+ { label: "No", next: "to-long", society: "none" },
66
+ ],
67
+ },
68
+ {
69
+ id: "need", kind: "question", text: "Which need is short first? Use the section of the tab for the state of society.", sources: [],
70
+ reasoning: NEEDS_FIRST,
71
+ answers: [
72
+ { label: "Safety of the people", next: "to-security" },
73
+ { label: "Heat, shelter or power", next: "to-heat" },
74
+ { label: "Water or a toilet", next: "to-water" },
75
+ { label: "Health or medicine", next: "to-health" },
76
+ { label: "Food", next: "to-food" },
77
+ { label: "Contact, money or trade", next: "to-group" },
78
+ { label: "A skill or a fact", next: "to-appendices" },
79
+ ],
80
+ },
81
+
82
+ // The ends: each one goes to a tab of the binder.
83
+ { id: "to-72h", kind: "goto", text: "Go to the tab: the first 72 hours.", tab: "first-72h" },
84
+ { id: "to-hazards", kind: "goto", text: "Go to the page of the event in the hazards tab.", tab: "hazards" },
85
+ { id: "to-stay", kind: "goto", text: "Go to the tab: stay.", tab: "stay" },
86
+ { id: "to-go", kind: "goto", text: "Go to the tab: go.", tab: "go" },
87
+ { id: "to-long", kind: "goto", text: "Go to the tab: the long term.", tab: "long-term" },
88
+ { id: "to-security", kind: "goto", text: "Go to the tab: the safety of the people.", tab: "security" },
89
+ { id: "to-heat", kind: "goto", text: "Go to the tab: heat, shelter and power.", tab: "heat" },
90
+ { id: "to-water", kind: "goto", text: "Go to the tab: water and sanitation.", tab: "water" },
91
+ { id: "to-health", kind: "goto", text: "Go to the tab: health and medicine.", tab: "health" },
92
+ { id: "to-food", kind: "goto", text: "Go to the tab: food.", tab: "food" },
93
+ { id: "to-group", kind: "goto", text: "Go to the tab: contact, the group and trade.", tab: "group" },
94
+ { id: "to-appendices", kind: "goto", text: "Go to the appendices.", tab: "appendices" },
95
+ ];
package/src/data/rules.ts CHANGED
@@ -15,17 +15,17 @@ export const RULES: readonly Rule[] = [
15
15
  { id: "reflex.fire", kind: "reflex", rank: 1, on: ["fire.structure"], target: { on: "fire.structure", phases: NOW }, sources: ["ready-fire"], when: "There is smoke or fire in the building.", then: "Get out, stay out and call 911." },
16
16
  { id: "reflex.gas", kind: "reflex", rank: 2, on: ["gas.main"], target: { on: "gas.main", phases: NOW }, sources: ["ready-safety"], when: "You smell gas or hear a hiss.", then: "Open a window, and get all persons out quickly." },
17
17
  { id: "reflex.medical", kind: "reflex", rank: 3, on: ["health.medical-emergency"], target: { on: "health.medical-emergency", phases: NOW }, sources: ["cdc-heart", "cdc-stroke"], when: "A person has the signs of a heart attack or a stroke.", then: "Call 911 immediately." },
18
- { id: "reflex.attack", kind: "reflex", rank: 4, on: ["civic.ai-collapse"], target: { on: "civic.ai-collapse", phases: NOW }, sources: ["fi-72h-shelter"], when: "Officials warn of a drone threat or an attack, or a general warning sounds.", then: "Go into the nearest building, and obey the instructions of the officials." },
19
- { id: "reflex.radiation", kind: "reflex", rank: 5, on: ["cbrne.radiological"], target: { on: "cbrne.radiological", phases: ["warned", "P0"] }, sources: ["ready-radiation"], when: "Officials warn of a radiation emergency or a nuclear detonation.", then: "Get inside, stay inside and stay tuned." },
18
+ { id: "reflex.attack", kind: "reflex", rank: 4, on: ["civic.ai-collapse"], target: { on: "civic.ai-collapse", phases: NOW }, sources: ["fi-72h-shelter"], when: "A warning tells of a drone threat or an attack, a general warning sounds, or you hear explosions.", then: "Go into the nearest building, away from the windows, and listen to the radio." },
19
+ { id: "reflex.radiation", kind: "reflex", rank: 5, on: ["cbrne.radiological"], target: { on: "cbrne.radiological", phases: ["warned", "P0"] }, sources: ["ready-radiation"], when: "A warning tells of a radiation emergency, or you see the flash of a nuclear detonation.", then: "Get inside, stay inside and keep a radio on for news." },
20
20
  { id: "reflex.flash", kind: "reflex", rank: 5, on: ["cbrne.nuclear-detonation"], target: { on: "cbrne.nuclear-detonation", phases: NOW }, sources: ["fema-nd-guide", "ready-radiation"], when: "You see a sudden, very bright flash of light.", then: "Take cover at once, away from windows. If you are outside, lie face down." },
21
21
  { id: "reflex.air-raid", kind: "reflex", rank: 5, on: ["security.nuclear-war"], target: { on: "security.nuclear-war", phases: ["warned", "P0"] }, sources: ["se-brochure-en"], when: "An air raid warning sounds.", then: "Take cover at once in the nearest shelter, cellar or room without windows." },
22
22
  { id: "reflex.armed-attack", kind: "reflex", rank: 5, on: ["security.armed-conflict"], target: { on: "security.armed-conflict", phases: NOW }, sources: ["se-brochure-en"], when: "There is shooting or an armed attack near you.", then: "Get far away. If you cannot, lock yourself in a room, and put your phone on silent." },
23
- { id: "reflex.chemical", kind: "reflex", rank: 6, on: ["cbrne.hazardous-materials"], target: { on: "cbrne.hazardous-materials", phases: NOW }, sources: ["ready-hazmat"], when: "Officials warn of a chemical release near you.", then: "Obey the officials: shelter in place, or leave." },
23
+ { id: "reflex.chemical", kind: "reflex", rank: 6, on: ["cbrne.hazardous-materials"], target: { on: "cbrne.hazardous-materials", phases: NOW }, sources: ["ready-hazmat"], when: "A warning, a cloud or a strange odor tells of a chemical release near you.", then: "Outside, go upwind and away. Inside, close a room and stay in it." },
24
24
  { id: "reflex.tornado", kind: "reflex", rank: 7, on: ["met.tornado"], target: { on: "met.tornado", phases: ["warned", "P0"] }, sources: ["ready-tornadoes"], when: "A tornado warning comes.", then: "Go to your safe shelter immediately, away from windows, doors and outside walls." },
25
25
  { id: "reflex.earthquake", kind: "reflex", rank: 8, on: ["geo.earthquake"], target: { on: "geo.earthquake", phases: NOW }, sources: ["ready-earthquakes"], when: "The ground shakes.", then: "Drop to your hands and knees, cover your head and neck, and hold on." },
26
26
  { id: "reflex.flood", kind: "reflex", rank: 9, on: ["met.flood"], target: { on: "met.flood", phases: NOW }, sources: ["ready-floods"], when: "Flood water rises near you.", then: "Go to a safe shelter. Do not walk, swim or drive through flood water." },
27
- { id: "reflex.wildfire", kind: "reflex", rank: 10, on: ["fire.wildfire"], target: { on: "fire.wildfire", phases: NOW }, sources: ["ready-wildfires"], when: "Officials tell of a wildfire near you.", then: "Obey the evacuation orders immediately." },
28
- { id: "reflex.call", kind: "reflex", rank: 11, on: ["civic.ai-collapse"], target: { on: "civic.ai-collapse", phases: NOW }, sources: ["ftc-voice", "ic3-genai"], when: "A call or a message from family asks for money now.", then: "Hang up. Call the person back at a number that you know." },
27
+ { id: "reflex.wildfire", kind: "reflex", rank: 10, on: ["fire.wildfire"], target: { on: "fire.wildfire", phases: NOW }, sources: ["ready-wildfires"], when: "A warning or the smoke tells of a wildfire near you.", then: "Leave immediately, before the fire or the smoke closes the roads." },
28
+ { id: "reflex.call", kind: "reflex", rank: 11, on: ["civic.ai-collapse"], target: { on: "civic.ai-collapse", phases: NOW }, sources: ["ftc-voice", "ic3-genai"], when: "A call or a message from family asks for money immediately.", then: "Hang up. Call the person back at a number that you know." },
29
29
 
30
30
  // What is cut? Each rule goes to the module of a cut.
31
31
  { id: "module.power", kind: "module", rank: 1, on: ["power.grid"], target: { on: "power.grid", phases: FIRST_DAYS }, sources: ["ready-power"], when: "There is no power from the grid.", then: "Use the module: no power from the grid." },
@@ -43,17 +43,17 @@ export const RULES: readonly Rule[] = [
43
43
  { id: "module.home", kind: "module", rank: 12, on: ["home.dwelling"], target: { on: "home.dwelling", phases: FIRST_DAYS }, sources: ["ready-recover","epa-coming-home"], when: "Your home is damaged, or you cannot stay in it.", then: "Use the module: damaged home." },
44
44
 
45
45
  // When do I stay?
46
- { id: "stay.order", kind: "stay", rank: 1, on: [], target: { on: "cbrne.radiological", phases: ["warned", "P0"] }, sources: ["ready-shelter", "uk-hazards"], when: "Officials tell you to shelter in place, or to go in, stay in and tune in.", then: "Stay inside. Close the doors, the windows and the vents, and listen to the radio." },
47
- { id: "stay.air", kind: "stay", rank: 2, on: [], target: { on: "cbrne.hazardous-materials", phases: ["P1"] }, sources: ["ready-shelter"], when: "The air outside has much debris, or officials say that it is badly contaminated.", then: "Go to an inner room with few windows, and seal it." },
48
- { id: "stay.safe", kind: "stay", rank: 3, on: [], target: { on: "power.grid", phases: FIRST_DAYS }, sources: ["uk-hazards", "ready-shelter"], when: "The officials give no order to leave, and the building has no obvious risk.", then: "Stay where you are, and use your supplies." },
46
+ { id: "stay.release", kind: "stay", rank: 1, on: [], target: { on: "cbrne.radiological", phases: ["warned", "P0"] }, sources: ["ready-shelter", "uk-hazards"], when: "A warning tells of a release of radiation or chemicals, and your building has no obvious risk.", then: "Stay inside. Close the doors, the windows and the vents, and listen to the radio." },
47
+ { id: "stay.air", kind: "stay", rank: 2, on: [], target: { on: "cbrne.hazardous-materials", phases: ["P1"] }, sources: ["ready-shelter"], when: "The air outside has much debris, smoke or dust, or the news tells that it is badly contaminated.", then: "Go to an inner room with few windows, and seal it." },
48
+ { id: "stay.safe", kind: "stay", rank: 3, on: [], target: { on: "power.grid", phases: FIRST_DAYS }, sources: ["uk-hazards", "ready-shelter"], when: "The building has no obvious risk, and the danger outside is larger than the danger inside.", then: "Stay where you are, and use your supplies." },
49
49
 
50
50
  // When do I go?
51
- { id: "go.order", kind: "go", rank: 1, on: [], target: { on: "met.tropical.hurricane", phases: NOW }, sources: ["uk-hazards", "ready-evacuation"], when: "Officials tell you to leave.", then: "Leave immediately. A delay can put your life at risk." },
51
+ { id: "go.danger", kind: "go", rank: 1, on: [], target: { on: "met.tropical.hurricane", phases: NOW }, sources: ["uk-hazards", "ready-evacuation"], when: "The danger comes to your place or your route: water, fire, smoke, a cloud or fighting.", then: "Leave immediately. A delay can put your life at risk." },
52
52
  { id: "go.risk", kind: "go", rank: 2, on: [], target: { on: "fire.structure", phases: NOW }, sources: ["uk-hazards"], when: "The building has an obvious risk: fire, gas or damage.", then: "Get out, and go to a safe place." },
53
53
  { id: "go.early", kind: "go", rank: 3, on: [], target: { on: "met.tropical.hurricane", phases: ["warned"] }, sources: ["ready-evacuation"], when: "A storm comes, and an evacuation seems likely.", then: "Leave early, so that the weather does not trap you." },
54
54
 
55
55
  // When do I go to a fallback place?
56
- { id: "fallback.heat-cold", kind: "fallback", rank: 1, on: ["power.grid"], target: { on: "power.grid", phases: ["P2"] }, sources: ["ready-power"], when: "There is no power, and the heat or the cold is extreme.", then: "Go to a community place with power. Ask the officials which places are open." },
56
+ { id: "fallback.heat-cold", kind: "fallback", rank: 1, on: ["power.grid"], target: { on: "power.grid", phases: ["P2"] }, sources: ["ready-power"], when: "There is no power, and the heat or the cold is extreme.", then: "Go to a place with heat or cooling: a public building, a library or friends with power." },
57
57
  { id: "fallback.home", kind: "fallback", rank: 2, on: [], target: { on: "met.tropical.hurricane", phases: ["ready"] }, sources: ["ready-evacuation", "ready-shelter"], when: "You cannot stay at home or go back to it.", then: "Go to a fallback place of your plan. To find an open shelter, text SHELTER and your ZIP code to 43362." },
58
58
 
59
59
  // When do I change to the long plan?
@@ -61,5 +61,5 @@ export const RULES: readonly Rule[] = [
61
61
  { id: "long.medicine", kind: "long-plan", rank: 2, on: ["power.grid", "health.medicine"], target: { on: "power.grid", phases: ["P2", "P3"] }, sources: ["ready-power"], when: "The power is off for more than 1 day, and a medicine needs a refrigerator.", then: "Speak to your doctor or pharmacist immediately to get a new supply." },
62
62
  { id: "long.days", kind: "long-plan", rank: 3, on: [], target: { on: "power.grid", phases: ["P3"] }, sources: ["uk-ready"], when: "A cut continues past 3 days.", then: "Use the steps of P3 of each cut, and of the case." },
63
63
  { id: "long.income", kind: "long-plan", rank: 4, on: ["civic.economy.collapse"], target: { on: "civic.economy.collapse", phases: ["P2", "P3"] }, sources: ["dol-ui"], when: "You lose your job or your income.", then: "File an unemployment claim immediately, and use the plan of a financial collapse." },
64
- { id: "long.pandemic", kind: "long-plan", rank: 5, on: ["health.outbreak.pandemic"], target: { on: "health.outbreak.pandemic", phases: ["warned", "P1", "P2"] }, sources: ["ready-pandemic"], when: "Officials say that a pandemic spreads in your community.", then: "Stay at home as much as possible, and use the plan of a pandemic." },
64
+ { id: "long.pandemic", kind: "long-plan", rank: 5, on: ["health.outbreak.pandemic"], target: { on: "health.outbreak.pandemic", phases: ["warned", "P1", "P2"] }, sources: ["ready-pandemic"], when: "The news or the persons near you tell of a pandemic that spreads in your community.", then: "Stay at home as much as possible, and use the plan of a pandemic." },
65
65
  ];