Branchwell

Jobley / website · jobley.ai / tools / build-site.py

Raw 67.7 KB on 7c5608f36ec102be22fa1bbdb6c6a6683917542b
1#!/usr/bin/env python3
2"""Generate the Jobley volunteer website and legacy verification page."""
3import json, os, re, runpy, subprocess, sys
4from html import escape
5
6ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
7VOLUNTEER_GROUPS = runpy.run_path(os.path.join(ROOT, "tools", "atom-volunteer-roles.py"))["GROUPS"]
8NEW_RESEARCH = {'Baby products': ('atom-baby-products', 'Research and education only. No product is available and no children participate in prototype tests.'), 'Sell your home by owner': ('atom-sell-your-home-by-owner', 'Create free guides for owners who choose to sell without a listing agent. No brokerage, listings, personalized advice, transactions or lender referrals.'), 'Online banking research': ('atom-online-banking-research', 'Unpaid, pre-charter research using fictional data only. No bank is open. No customer accounts, money movement, loans, or applications.'), 'Litter, recycling and clean waterways': ('atom-clean-waterways', 'Volunteer with public-source research or permitted dry-land cleanup. No entering water, handling hazardous items or installing equipment.'), 'Mosquito control research': ('atom-mosquito-control-research', 'Research-only. No pesticide formulation, spraying, biological releases, animal testing or extermination service.')}
9PROJECT_WORK = runpy.run_path(os.path.join(ROOT, "tools", "project-roles.py"))["ROLES"]
10PROJECT_ROLE_TRACKS = {title: (group, route, scope, curriculum, motif)
11 for group, title, route, scope, _, _, curriculum, motif in PROJECT_WORK}
12# Extend an existing workstream without replacing its group-wide routes or scope.
13PROJECT_GROUPS = {}
14for group, title, route, scope, description, first_task, *_ in PROJECT_WORK:
15 existing = next((roles for name, roles in VOLUNTEER_GROUPS if name == group), None)
16 if existing is None:
17 existing = []
18 PROJECT_GROUPS[group] = (route, scope)
19 VOLUNTEER_GROUPS.append((group, existing))
20 existing.append((title, description, first_task))
21VOLUNTEER_COUNT = sum(len(roles) for _, roles in VOLUNTEER_GROUPS)
22OPEN_DESIGN_ROLES = {
23 "Cat tree and pet furniture designer": ("cat-tree", "cat-tree", "pet-furniture"),
24 "Scratching post product designer": ("scratching-post", "scratching-post", "pet-furniture"),
25 "Leash and collar hardware sourcing volunteer": ("dog-walking-gear", "dog-walking-gear", "pet-gear"),
26 "Pet-friendly textile materials developer": ("pet-friendly-fabrics", "pet-friendly-fabrics", "pet-textiles"),
27 "Local vehicle distribution and service planner": ("global-distribution", "global-product-distribution", "local-distribution"),
28 "Local delivery network and driver operations planner": ("global-distribution", "global-product-distribution", "delivery-network"),
29 "Shipping platform software and reliability volunteer": ("global-distribution", "global-product-distribution", "shipping-software"),
30 "Cross-border freight, customs and sourcing specialist": ("global-distribution", "global-product-distribution", "freight-documentation"),
31}
32
33# ---- The product, in one place -------------------------------------------------------------
34NAME = "Jobley" # pending Brad's pick; see the PRD
35DOMAIN = "jobley.ai"
36SLUG = "jobley" # Pages project, analytics data-site, bundle id suffix, MCP server name
37SITE = f"https://{DOMAIN}"
38GSC = "ALCOIlR4g2OrItSH5QfWIxAIl7dadEQ8OxE6f5WoFa0" # google-site-verification token for the home page, once Search Console has one
39BING = "E2001B47E91F72A19BB1E8E642B26928" # account-wide msvalidate.01 token
40V = "20261127" # cache-buster for the icon, favicon and social card
41VOLUNTEER_CSS_V = "20261129d" # bump whenever assets/volunteer.css changes; only /volunteer/ and /careers/ load it
42VOLUNTEER_CSS = f"volunteer.css?v={VOLUNTEER_CSS_V}"
43VOLUNTEER_MAIL = "mailto:hello@jobley.ai?subject=Volunteer"
44# The promise every page that takes a post makes. The API keeps it true: only a person's token can publish.
45GUARANTEE = "Only Jobley posts here. Volunteer work is open to everyone. Just email us."
46JOB_DAYS = 45 # keep in step with LIMITS.jobDaysLive in src/config.js
47READ = "November 27, 2026" # the day the competitor pages on /compare/ were read
48# ---------------------------------------------------------------------------------------------
49
50
51if "--release" in sys.argv:
52 raise SystemExit("Jobley is website-only; native release publishing is disabled.")
53
54COMMUNITY_ONLY = sys.argv[1:] == ["--community-pages"]
55LEARNING = runpy.run_path(os.path.join(ROOT, "tools", "learning-paths.py"))
56ART = runpy.run_path(os.path.join(ROOT, "tools", "role-illustrations.py"))
57
58
59LINE = "Find open volunteer work. Pick something you want to help with and email us to get started. No forms or permission needed."
60DESC = f"{NAME} is a board for volunteer work. Open to people anywhere in the world. Every role is unpaid and optional."
61TITLE = f"{NAME} · Volunteer work"
62
63ORG = {"@type": "Organization", "@id": f"{SITE}/#org", "name": NAME, "url": f"{SITE}/",
64 "logo": f"{SITE}/assets/icon.png"}
65APP = {"@type": "WebApplication", "@id": f"{SITE}/#app", "name": NAME, "url": f"{SITE}/", "description": DESC,
66 "applicationCategory": "BusinessApplication", "applicationSubCategory": "Volunteer board",
67 "browserRequirements": "A web browser.", "isAccessibleForFree": True,
68 "image": f"{SITE}/assets/icon.png?v={V}",
69 "featureList": ["Volunteer opportunities open to people anywhere in the world",
70 "No volunteer forms or résumé collection"],
71 "author": {"@id": f"{SITE}/#org"}, "publisher": {"@id": f"{SITE}/#org"}}
72
73ICON_ARROW = '<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4"/></svg>'
74ICON_SEARCH = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>'
75ICON_PEN = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z"/></svg>'
76ICON_HAND = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M19 8v6"/><path d="M22 11h-6"/></svg>'
77ICON_BELL = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></svg>'
78ICON_PLUG = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 22v-5"/><path d="M15 8V2"/><path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z"/><path d="M9 8V2"/></svg>'
79ICON_BOOK = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 7v14"/><path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"/></svg>'
80ICON_HOME = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>'
81ICON_HELP = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>'
82ICON_SHIELD = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/></svg>'
83
84NAV = [("/volunteer/", "Volunteer work", ""), ("/careers/", "Careers", "nav-hide-sm")]
85FOOT_NAV = [("/volunteer/", "Volunteer work"), ("/research/", "Research"), ("/careers/", "Careers"), ("/moderators/", "Moderate"),
86 ("/help/", "Help"), ("/privacy/", "Privacy"), ("/licenses/", "License")]
87PRINT_PROJECT = "/projects/print-and-fulfillment/"
88PET_FOOD_PROJECT = "/projects/pet-food-and-treats/"
89PAGES = ["/", "/volunteer/", "/careers/", PRINT_PROJECT, PET_FOOD_PROJECT, "/moderators/", "/help/", "/compare/", "/privacy/", "/licenses/", "/research/"]
90
91
92def ld(graph):
93 return "" # NO SEO: no schema.org structured data
94
95
96def head(path, title, desc, graph, noindex=False, home=False, scripts=(), raw_meta=None, styles=()):
97 url = SITE + path
98 meta = []
99 if raw_meta is not None:
100 meta += raw_meta
101 elif noindex:
102 meta.append(' <meta name="robots" content="noindex">')
103 else:
104 meta.append(f' <meta name="description" content="{desc}">')
105 meta += [' <meta name="theme-color" content="#faf6ee" media="(prefers-color-scheme: light)">',
106 ' <meta name="theme-color" content="#0d1511" media="(prefers-color-scheme: dark)">']
107 if not noindex:
108 meta += [' <meta property="og:type" content="website">', f' <meta property="og:site_name" content="{NAME}">',
109 ' <meta property="og:locale" content="en_US">',
110 f' <meta property="og:title" content="{title}">', f' <meta property="og:description" content="{desc}">',
111 f' <meta property="og:url" content="{url if raw_meta is None else "{{CANONICAL}}"}">', f' <meta property="og:image" content="{SITE}/social-card.png?v={V}">',
112 ' <meta property="og:image:type" content="image/png">',
113 ' <meta property="og:image:width" content="1200">', ' <meta property="og:image:height" content="630">',
114 f' <meta property="og:image:alt" content="{NAME}. Open volunteer work.">',
115 ' <meta name="twitter:card" content="summary_large_image">',
116 f' <meta name="twitter:title" content="{title}">', f' <meta name="twitter:description" content="{desc}">',
117 f' <meta name="twitter:image" content="{SITE}/social-card.png?v={V}">',
118 f' <meta name="author" content="{NAME}">']
119 if home:
120 if GSC:
121 meta.append(f' <meta name="google-site-verification" content="{GSC}">')
122 meta.append(f' <meta name="msvalidate.01" content="{BING}">')
123 meta += [f' <link rel="icon" href="/favicon.png?v={V}" type="image/png">', f' <link rel="apple-touch-icon" href="/assets/apple-touch-icon.png?v={V}">',
124 ' <link rel="stylesheet" href="/assets/site.css?v=20261129-touch">',
125 *[f' <link rel="stylesheet" href="/assets/{s}">' for s in styles],
126 ]
127 meta += [f' <script src="/assets/{s}" defer></script>' for s in scripts]
128 if home:
129 meta += [' <link rel="stylesheet" href="/assets/visitor-odometer.v1.css">',
130 ' <script defer src="/assets/visitor-odometer.v1.js"></script>']
131 meta += [' <script src="/assets/share.js" defer></script>' if home else None,
132 f' <title>{title}</title>', (' ' + (graph if isinstance(graph, str) else ld(graph))) if graph else None]
133 return '<!doctype html>\n<html lang="en">\n<head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n' + "\n".join(m for m in meta if m) + "\n <!-- no-orphans --><link rel=\"stylesheet\" href=\"/no-orphans.css\"><script src=\"/no-orphans.js\" defer></script><!-- /no-orphans -->\n</head>\n"
134
135
136def header(current=None, body_class=None):
137 current_attr = ' aria-current="page"'
138 links = "\n".join(f' <a class="{c}" href="{h}"{current_attr if h == current else ""}>{t}</a>' for h, t, c in NAV)
139 cta = f'<a class="nav-cta" href="/volunteer/"{current_attr if current == "/volunteer/" else ""}>Find volunteer work</a>'
140 body = f'<body class="{body_class}">' if body_class else "<body>"
141 return f'''{body}
142 <a class="skip" href="#main">Skip to content</a>
143 <header class="site-header">
144 <div class="shell nav">
145 <a class="wordmark" href="/" aria-label="{NAME} home"><img src="/assets/icon.png?v={V}" alt="" width="30" height="30">{NAME}</a>
146 <nav aria-label="Main">
147{links}
148 {cta}
149 </nav>
150 </div>
151 </header>
152'''
153
154
155def footer():
156 nav = "".join(f'<a href="{h}">{t}</a>' for h, t in FOOT_NAV)
157 return f''' <footer>
158 <div class="shell footer">
159 <nav aria-label="Footer">{nav}</nav>
160 </div>
161 <div class="shell footer-credit">
162 <span>Jobley</span>
163 </div>
164 </footer>
165 <script src="/assets/pm-year.js" defer></script>
166</body>
167</html>
168'''
169
170
171def crumbs(name, path):
172 return {"@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": NAME, "item": SITE + "/"},
173 {"@type": "ListItem", "position": 2, "name": name, "item": SITE + path}]}
174
175
176def webpage(path, name, desc):
177 return {"@type": "WebPage", "@id": f"{SITE}{path}#webpage", "url": SITE + path, "name": name, "description": desc,
178 "isPartOf": {"@id": f"{SITE}/#website"}, "inLanguage": "en-US", "publisher": {"@id": f"{SITE}/#org"},
179 "about": {"@id": f"{SITE}/#app"}}
180
181
182def write(rel_path, text):
183 p = os.path.join(ROOT, rel_path)
184 os.makedirs(os.path.dirname(p) or ROOT, exist_ok=True)
185 open(p, "w").write(text)
186
187
188TOOLS = [("get_status", "Whether the app is signed in, who as (curator or moderator), and how many posts are waiting."),
189 ("list_jobs · get_job", "Legacy compatibility tools. Volunteer opportunities are on the web roster."),
190 ("list_review_queue", "Posts waiting for a person, oldest first, with what the poster wrote."),
191 ("get_review_item", "One waiting post in full, with its notes and history."),
192 ("get_house_rules", "Legacy moderation rules; they do not govern volunteering."),
193 ("tidy_job_post", "Fix the formatting of a waiting post: spacing, paragraphs, an obvious typo in the title. It cannot change publication status. Off until you allow changes."),
194 ("add_review_note", "Leave a note on a waiting post for the person reviewing it. Off until you allow changes.")]
195
196RULES = [("Jobley listings only.", "The board lists only roles Jobley posts."),
197 ("Open to everyone.", "Pick a role and email us to start. No forms or résumé."),
198 ("Clear scope.", "Each role describes the contribution and identifies planning work as such."),
199 ("Privacy and safety.", "Do not ask for money, sensitive personal information, or confidential work.")]
200
201
202def closing():
203 return f''' <section class="section" aria-labelledby="closing-title">
204 <div class="shell">
205 <h2 id="closing-title">Start working together.</h2>
206 <p class="lead">Browse here, pick a role, and email us. Say what you can help with and we’ll help you pick a first task.</p>
207 <div class="actions">
208 <a class="button" href="{VOLUNTEER_MAIL}">Email us to volunteer {ICON_ARROW}</a>
209 <a class="button secondary" href="/volunteer/">Browse volunteer work</a>
210 </div>
211 </div>
212 </section>
213'''
214
215
216BOARD_ID = "volunteer-board" # the roster wrapper on /volunteer/; the browse link scrolls here
217START_IDS = {"getting-started", "getting-started-title", BOARD_ID} # volunteer_page() asserts no role or group slug takes one
218
219
220def getting_started(on_board=False, indent=" "):
221 """Offer two starting points."""
222 if on_board:
223 go = (f'<a class="button secondary" href="#{BOARD_ID}">Browse volunteer work'
224 ' <span aria-hidden="true">↓</span></a>')
225 else:
226 go = f'<a class="button secondary" href="/volunteer/">Browse volunteer work {ICON_ARROW}</a>'
227 lines = [
228 '<section class="getting-started" id="getting-started" aria-labelledby="getting-started-title">',
229 ' <div class="gs-head">',
230 ' <h2 class="gs-title" id="getting-started-title">Getting started</h2>',
231 ' <p class="gs-kicker">No forms needed.</p>',
232 ' </div>',
233 ' <ul class="gs-steps" role="list">',
234 ' <li class="gs-step gs-step-primary">',
235 ' <h3><span class="gs-label">Ready?</span> Email us</h3>',
236 ' <p>Tell us what you’d like to help with and we’ll get you started.</p>',
237 f' <a class="button download-button" href="{VOLUNTEER_MAIL}">Email us to volunteer {ICON_ARROW}</a>',
238 ' </li>',
239 ' <li class="gs-step">',
240 ' <h3><span class="gs-label">Just looking?</span> Find your first role</h3>',
241 ' <p>Pick a role and select <strong>Volunteer</strong>. You can browse without an account.</p>',
242 f' {go}',
243 ' </li>',
244 ' </ul>',
245 ' <p class="gs-note">All roles are unpaid and optional.</p>',
246 '</section>',
247 ]
248 return "\n".join(indent + line for line in lines)
249
250
251def index():
252 graph = [{"@type": "WebSite", "@id": f"{SITE}/#website", "url": SITE + "/", "name": NAME, "description": DESC, "inLanguage": "en-US",
253 "publisher": {"@id": f"{SITE}/#org"}},
254 {**webpage("/", TITLE, DESC), "mainEntity": {"@id": f"{SITE}/#app"}}, APP, ORG]
255 share = (f'<button type="button" class="pm-share-btn app-share" data-pm-share data-share-url="{SITE}/" data-share-title="{NAME}" '
256 f'data-share-text="Find open volunteer work." aria-haspopup="menu" aria-label="Share {NAME}">'
257 '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'
258 '<path d="M12 3v12"/><path d="m7.5 7.5 4.5-4.5 4.5 4.5"/><path d="M5 12v6.5A2.5 2.5 0 0 0 7.5 21h9a2.5 2.5 0 0 0 2.5-2.5V12"/></svg><span data-pm-share-label>Share</span></button>')
259 rules = "\n".join(f' <article><h3>{a.rstrip(".")}</h3><p>{b}</p></article>' for a, b in RULES[:4])
260 h = head("/", TITLE, DESC, graph, home=True) + header()
261 h += f'''
262 <main id="main">
263 <section class="hero" aria-labelledby="hero-title">
264 <div class="shell">
265 <p class="pill"><i></i>Volunteer work</p>
266 <div class="visitor-welcome" data-visitor-odometer data-visitor-site="jobley"></div>
267 <h1 id="hero-title">Find work you want <em>to help with.</em></h1>
268{getting_started()}
269 <p class="lead">{LINE} <strong>No AI screens, scores or ranks anyone.</strong></p>
270 <p class="guarantee"><strong>Our promise:</strong> {GUARANTEE}</p>
271 <div class="actions">
272 <a class="button secondary" href="/careers/">Explore by career</a>
273 {share}
274 </div>
275
276 </div>
277 </section>
278
279 <section id="how" class="section">
280 <div class="shell">
281 <div class="section-head">
282 <span class="mark">how it works</span>
283 <h2>Pick something useful. <em>Build it together.</em></h2>
284 <p class="lead">Jobley posts the kinds of work that need help. Drivers, farmers, engineers, data scientists, and people from every trade are welcome. You can learn with others or get straight to work on something you know.</p>
285 </div>
286 <ol class="steps">
287 <li><h3>Pick what you want to help with</h3><p>Start with the volunteer roster. There are no forms, résumés or approvals to wait for.</p></li>
288 <li><h3>Email us</h3><p>Tell us what you’d like to do, share an idea, or ask who is already working on it.</p></li>
289 <li><h3>Organize with others</h3><p>Share a concrete next step and coordinate so people aren’t duplicating work.</p></li>
290 <li><h3>Share useful progress</h3><p>Post what you tried, what you learned, and what someone else can pick up.</p></li>
291 </ol>
292 </div>
293 </section>
294
295 <section id="good-jobs" class="section band" aria-labelledby="good-title">
296 <div class="shell">
297 <div class="section-head">
298 <span class="mark">the rules</span>
299 <h2 id="good-title">What belongs <em>on the board.</em></h2>
300 <p class="lead">Every listing follows the same volunteer guidelines. <a href="/help/#rules">Read all the rules</a></p>
301 </div>
302 <div class="connect">
303{rules}
304 </div>
305 </div>
306 </section>
307
308 <section id="moderators" class="section band">
309 <div class="shell">
310 <div class="section-head">
311 <span class="mark">moderators</span>
312 <h2>Help us read. <em>We’re looking for&nbsp;moderators.</em></h2>
313 <p class="lead">Board moderation is separate from volunteering.</p>
314 <div class="actions actions-left"><a class="button" href="/moderators/">{ICON_SHIELD}Board moderation</a></div>
315 </div>
316 </div>
317 </section>
318
319 <section id="privacy" class="section band" aria-labelledby="privacy-title">
320 <div class="shell">
321 <div class="section-head">
322 <span class="mark">promises</span>
323 <h2 id="privacy-title">People first, <em>in&nbsp;writing.</em></h2>
324 </div>
325 <div class="trio">
326 <div><h3>No AI screening, ever</h3><p>No screening stands between you and the volunteer community. Join in directly.</p></div>
327 <div><h3>Only what we need</h3><p>Jobley does not collect forms or résumés from volunteers. <a href="/privacy/">What we keep</a></p></div>
328 <div><h3>Free to browse</h3><p>Use the site without an account. Email us when you’re ready to start.</p></div>
329 </div>
330 </div>
331 </section>
332
333{closing()}'''
334 h += " </main>\n" + footer()
335 write("index.html", h)
336
337
338
339def volunteer_switch(current):
340 """The roster / by-career switch at the top of /volunteer/ and the career directory."""
341 cur = lambda path: ' aria-current="page"' if path == current else ""
342 return (f'<nav class="volunteer-switch" aria-label="Volunteer directories">'
343 f'<a href="/volunteer/"{cur("/volunteer/")}><strong>Volunteer roster</strong><span>{VOLUNTEER_COUNT} roles</span></a>'
344 f'<a href="/careers/"{cur("/careers/")}><strong>Ideas by career</strong><span>848 titles in 22 families</span></a></nav>')
345
346
347def trade_training_section():
348 return """<section class="volunteer-section trade-training" id="skilled-trades-training" aria-labelledby="skilled-trades-heading">
349 <h2 id="skilled-trades-heading">Electrical, plumbing and HVAC learning paths</h2>
350 <p>Start with free introductory learning. It is peer learning, not accredited training, an apprenticeship, a license or a certification. Learn at your own pace and take those skills wherever you choose. The paths are open whether or not you volunteer, and do not promise placement or authorization to do trade work.</p>
351 <ol class="board">
352 <li class="job trade-path" id="electrical-training"><div><h3><a href="#electrical-training">Electrical</a></h3>
353 <p>Start with electrical safety and reading simple diagrams. For hands-on training, look for a recognized electrical trade program or registered apprenticeship. Ask your local licensing authority about required classroom hours, supervised experience and exams.</p></div></li>
354 <li class="job trade-path" id="plumbing-training"><div><h3><a href="#plumbing-training">Plumbing</a></h3>
355 <p>Start with water supply, drainage and reading plans. For hands-on training, look for a recognized plumbing program or registered apprenticeship. Confirm supervised experience, exams, license levels and permitted work with the authority where you live.</p></div></li>
356 <li class="job trade-path" id="hvac-training"><div><h3><a href="#hvac-training">Heating, ventilation and air conditioning (HVAC)</a></h3>
357 <p>Start with ventilation and cooling fundamentals. Look for a recognized HVAC program or registered apprenticeship. In the United States, check the <a href="https://www.epa.gov/section608/section-608-technician-certification-requirements">EPA’s Section 608 requirements</a> before refrigerant-related work, and check any separate local license requirements.</p></div></li>
358 </ol>
359 <p>Use your national or regional apprenticeship office or licensing authority to verify a provider, entry requirements, supervised hours and any tuition, materials or exam fees. In the United States, start with the <a href="https://www.apprenticeship.gov/career-seekers">U.S. Department of Labor’s apprenticeship finder</a>. Formal training and exams are separate from Jobley.</p>
360 <p>As a volunteer, stick to learning, planning and peer review. Do not do hands-on or regulated work unless you are qualified, authorized and supervised as required.</p>
361 </section>"""
362
363
364def learning_page(path, title, description, track, community, first_task, parent, formal=None, occupation=None, art_src=None):
365 if art_src is None:
366 art_src = ART["art"](write, "support", path.strip("/").split("/")[-1], ART["role_motif"](title, community))
367 project_role = PROJECT_ROLE_TRACKS.get(title)
368 concept, exercise, artifact, resource = project_role[3] if project_role else LEARNING["TRACKS"][track]
369 if formal is None:
370 formal = LEARNING["FORMAL"].get(track, (
371 "Look up the occupation, then compare entry qualifications and training where you live. Ask a provider which skills and supervised hours it covers.",
372 LEARNING["BLS"]))
373 d = f"Free starter curriculum, practice and next steps for {title}."
374 rendered_steps = (
375 ("Learn how the work fits together", concept, resource, "Read the learning resource"),
376 ("Do a first exercise", first_task, None, None),
377 ("Practice and compare", exercise, None, None),
378 ("Show what you learned", artifact + " Ask someone to review what you made and explain one thing you would improve.", None, None),
379 )
380 steps = "".join(
381 f'<li><h3>{escape(label)}</h3><p>{escape(copy)}</p>'
382 + (f'<a href="{escape(url)}">{escape(link)}</a>' if url and 'projectatom' not in url else '') + '</li>'
383 for label, copy, url, link in rendered_steps)
384 next_heading = "Scope and next steps" if project_role else "Formal training and next steps"
385 training = (f"<p>{escape(project_role[2])}</p>" if project_role else
386 f'<p>{escape(formal[0])}</p>\n <p><a href="{escape(formal[1])}">Explore the training route</a></p>')
387 refs = f'<p><a href="{escape(occupation)}">Read about the occupation and typical training</a></p>' if occupation and occupation != formal[1] else ''
388 scope = "These are free introductory exercises, not a credential or a job offer. Keep practice to public or sample material. Regulated or hazardous tasks require independent qualifications, authorization and supervision where applicable."
389 h = head(path, escape(title) + f" starter curriculum · {NAME}", escape(d), None, noindex=True, styles=(VOLUNTEER_CSS,)) + header()
390 h += f''' <main id="main" class="shell role-guide">
391 <div class="page-head">
392 <p><a href="{escape(parent)}">← Back to the directory</a></p>
393 {ART["image"](art_src, "guide")}
394 <span class="mark">Free starter curriculum</span>
395 <h1>{escape(title)}</h1>
396 <p class="lead">{escape(description)}</p>
397 <p>Read the whole learning path here. When you’re ready to help, email us.</p>
398 </div>
399 <section aria-labelledby="curriculum-heading">
400 <h2 id="curriculum-heading">Your starter curriculum</h2>
401 <ol class="curriculum-steps">{steps}</ol>
402 </section>
403 <section class="role-guide-next" aria-labelledby="training-heading">
404 <h2 id="training-heading">{next_heading}</h2>
405 {training}{refs}
406 <p>{escape(scope)}</p>
407 <p><a class="button secondary" href="{VOLUNTEER_MAIL}">Email us to volunteer</a></p>
408 </section>
409 </main>
410''' + footer()
411 write(path.strip("/") + "/index.html", h)
412
413
414def volunteer_track(group, title, trade):
415 lower = title.lower()
416 if title in PROJECT_ROLE_TRACKS: return None
417 if title in OPEN_DESIGN_ROLES: return OPEN_DESIGN_ROLES[title][2]
418 if group in NEW_RESEARCH: return trade.removeprefix("atom-")
419 if group == "Solar roof tiles": return "solar-roof-envelope" if "envelope" in lower else "solar-roof-pv"
420 if group == "Civilian nuclear energy":
421 if "licensing" in lower: return "civilian-energy-oversight"
422 if "grid" in lower: return "civilian-energy-grid"
423 return "civilian-energy-preparedness"
424 if any(x in lower for x in ("electrical", "electrician")): return "electrical"
425 if "plumb" in lower: return "plumbing"
426 if "cooling" in lower or "hvac" in lower: return "hvac"
427 if "veterinar" in lower: return "veterinary"
428 if "research" in lower and trade == "atom-health-veterinary": return "health-veterinary"
429 if "educat" in lower or "training" in lower: return "education"
430 if "budget" in lower or "finance" in lower: return "finance"
431 return trade.removeprefix("atom-")
432
433
434def volunteer_page():
435 t = f"Find volunteer work · {NAME}"
436 d = "Explore unpaid community work in chip design and manufacturing, worldwide data centers, software, AI, and more. Pick a task and email us to get started."
437 graph = [webpage("/volunteer/", t, d), crumbs("Volunteer work", "/volunteer/"), ORG]
438 groups = VOLUNTEER_GROUPS
439 sl = lambda text: re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-")
440 titles = [sl(title) for _, roles in groups for title, _, _ in roles]
441 assert len(titles) == len(set(titles))
442 assert not START_IDS & (set(titles) | {sl(group) for group, _ in groups}), "a role or group slug collides with a Getting started id"
443 toc ='<li><a href="#skilled-trades-training">Electrical, plumbing and HVAC training</a></li>' + "".join(f'<li><a href="#{sl(group)}">{escape(group)}</a></li>' for group, _ in groups)
444 sections = []
445 def trade_category(group, title):
446 if title in PROJECT_ROLE_TRACKS: return PROJECT_ROLE_TRACKS[title][1]
447 if group in PROJECT_GROUPS: return PROJECT_GROUPS[group][0]
448 if group in NEW_RESEARCH: return NEW_RESEARCH[group][0]
449 t = title.lower()
450 if title in OPEN_DESIGN_ROLES: return "atom-build-" + OPEN_DESIGN_ROLES[title][0]
451 if group == "Leadership and operations": return "atom-leadership-operations"
452 if group == "Community": return "atom-design-media" if "writer" in t or "design and media" in t else "atom-community"
453 if group == "Software and AI": return "atom-ai-data" if any(x in t for x in ("ai ", "model", "data scientist", "distillation")) else "atom-software"
454 if group == "Free meals, farming and delivery":
455 if "farm" in t or "sourcing" in t: return "atom-farming"
456 if any(x in t for x in ("driver", "dispatch", "route")): return "atom-delivery-driving"
457 return "atom-kitchens-food"
458 if group == "Free movie and TV streaming": return "atom-film-tv-production"
459 if group == "Chip design and manufacturing": return "atom-chips-manufacturing"
460 if group == "Solar roof tiles": return "atom-build-solar-roof-tiles"
461 if group == "Civilian nuclear energy": return "atom-civilian-nuclear-energy"
462 if group == "Data centers, power and manufacturing": return "atom-data-centers-trades"
463 if group == "Health, veterinary care and research": return "atom-health-veterinary"
464 if group == "Motors, robotics and space": return "atom-motors" if any(x in t for x in ("vehicle", "ev ", "charging")) else "atom-robotics-space"
465 raise ValueError("Missing community category for " + group)
466 for group, roles in groups:
467 items = []
468 for title, description, exercise in roles:
469 title_html = escape(title)
470 trade = trade_category(group, title)
471 guide = f"/volunteer/learn/{sl(title)}/"
472 motif = PROJECT_ROLE_TRACKS[title][4] if title in PROJECT_ROLE_TRACKS else ART["role_motif"](title, trade)
473 role_src = ART["art"](write, "volunteer", sl(title), motif)
474 learning_page(guide, title, description, volunteer_track(group, title, trade), trade, exercise, "/volunteer/#" + sl(title), art_src=role_src)
475 formal = '<li>See the <a href="#skilled-trades-training">formal electrical, plumbing and HVAC paths</a> for supervised training and credential guidance.</li>\n' if sl(title) in {"cleanroom-facilities-and-trades-adviser", "data-center-electrical-facilities-volunteer", "data-center-cooling-and-mechanical-volunteer", "data-center-field-trades-adviser"} else ""
476 web_brief = ""
477 items.append(f'''<li class="job" id="{sl(title)}">
478 <div class="role-card-heading">{ART["image"](role_src)}<div><h3><a href="{guide}">{title_html}</a></h3><p class="co">Volunteer work · Unpaid</p></div></div>
479 <p class="volunteer-description">{escape(description)}</p>
480 <details class="volunteer-learning"><summary>Getting started and learning path</summary><ol>
481 <li>{escape(exercise)}</li>
482 <li><a href="{guide}">Read the full starter curriculum for {title_html}</a>.</li>
483 <li>Email us what you tried or what you’d like to help with. Use public or sample material, not private records.</li>
484{formal} </ol>{web_brief}</details>
485 <div class="job-actions"><a class="button secondary" href="{VOLUNTEER_MAIL}" aria-label="Volunteer: {title_html}">Volunteer <span aria-hidden="true">↗</span></a></div>
486 </li>''')
487 scope = (
488 f'<p>Public-source research and education only. There is no construction, facility work, fuel processing, weapons work, or use of restricted information. No forms are needed.</p>'
489 if group == "Civilian nuclear energy" else ""
490 )
491 if group == "Pet products and local distribution":
492 scope = '<p>These are unpaid design and planning roles. No forms are needed. No products, sales, deliveries or appointments are available through these listings.</p>'
493 if group == "Solar roof tiles":
494 scope = f'<p>Help plan and review one shared open tile design. If the design is validated, independent local teams can make it themselves. There is no working prototype, product, installation service, or sign-up process.</p>'
495 if group in PROJECT_GROUPS: scope = f'<p>{escape(PROJECT_GROUPS[group][1])}</p>'
496 if group == "Data centers, power and manufacturing":
497 scope += '<p>Study first-party internet hosting and potential future owned data centers. No facility or hosting service is open. These roles are unpaid research only.</p><figure><img class="role-art" src="/assets/first-party-hosting-concept.png" width="1536" height="1024" alt="Concept illustration of an imagined server hall with separate incoming fiber paths" loading="lazy" decoding="async"><figcaption>Illustrative concept only, not an existing facility.</figcaption></figure>'
498 if group == "Open Garden Design":
499 scope += '<img class="role-art" src="/assets/open-garden-design.svg" width="1200" height="630" alt="Isometric illustration of a native editor arranging plants around a house" loading="lazy" decoding="async">'
500 if group in NEW_RESEARCH: scope = f'<p>{escape(NEW_RESEARCH[group][1])}</p>'
501 sections.append(f'<section class="volunteer-section" id="{sl(group)}"><h2>{escape(group)}</h2>{scope}<ul class="board">{"".join(items)}</ul></section>')
502 h = head("/volunteer/", t, d, graph, styles=(VOLUNTEER_CSS,)) + header("/volunteer/") + f''' <main id="main">
503 <div class="shell page-head volunteer-head">
504 <span class="mark"><a href="/volunteer/">all volunteer roles</a></span>
505 <h1>Find volunteer work <em>you care about.</em></h1>
506{getting_started(on_board=True, indent=" ")}
507 <p class="lead">People anywhere in the world can volunteer. Pick work that interests you, email us, and organize together. Every opportunity here is unpaid and optional.</p>
508 {volunteer_switch("/volunteer/")}
509 <p>Some programs are still in planning. You can help design them now. Working on a planning task does not mean a facility, delivery shift or medical service is open. The health roles are advisory; no patient or animal care is offered through this board.</p>
510 <p>Chip manufacturing, worldwide data centers and AI infrastructure are planned programs. These listings are for research, design and planning. No fabrication or data center shifts are available now. Please do not share confidential designs, proprietary documents or other nonpublic information.</p>
511 <p>Pick a role for a practical first task and a learning path. Select <strong>Volunteer</strong> to email us about it. No forms, résumé, or approval is required. Want ideas based on your background? <a href="/careers/">Explore by career</a>.</p>
512 <nav class="workstreams" aria-label="Volunteer workstreams"><p class="workstreams-label" aria-hidden="true">Jump to a workstream</p><ul class="tags">{toc}</ul></nav>
513 </div>
514 <div class="shell board-wrap volunteer-board" id="{BOARD_ID}">{trade_training_section()}{"".join(sections)}</div>
515 </main>
516''' + footer()
517 write("volunteer/index.html", h)
518
519
520def careers_page():
521 t = f"Volunteer ideas by career · {NAME}"
522 d = "Find volunteer ideas by career and start organizing with others."
523 config = runpy.run_path(os.path.join(ROOT, "tools", "career-families.py"))
524 families = config["FAMILIES"]
525 source = json.load(open(os.path.join(ROOT, "tools", "career-titles.json")))
526 by_group = {code: 0 for code, *_ in families}
527 for code, title in source:
528 by_group[code[:2]] += 1
529 assert sum(by_group.values()) == 848
530 directory = [[code, title, next((trade for pattern, trade in config["ROUTES"] if re.search(pattern, title, re.I)), ""),
531 config["ALIASES"].get(code, "")] for code, title in source]
532 write("assets/career-directory.json", json.dumps({"careers": directory, "families": families}, ensure_ascii=False, separators=(",", ":")) + "\n")
533 by_code = {family[0]: family for family in families}
534 career_art = {}
535 for code, title, override, _ in directory:
536 career_art[code] = ART["art"](write, "career", code, ART["motif_for"](title, ART["FAMILIES"][code[:2]]))
537 family, community, family_idea = by_code[code[:2]][1:]
538 track = LEARNING["SPECIAL_CODES"].get(code) or override or LEARNING["FAMILY_TRACK"][code[:2]]
539 title_description, task, occupation = LEARNING["OCCUPATIONS"].get(code, (
540 f"Explore the {title.lower()} career in {family.lower()}. This starter path covers shared fundamentals, with a first exercise to connect them to this role.",
541 f"Look up {title.lower()} in a public occupation profile. Pick one common task, describe its inputs and output in your own words, then sketch a paper or sample-data version you can do safely.",
542 LEARNING["BLS"],
543 ))
544 learning_page(f"/careers/{code}/", title, title_description, track, "atom-" + (override or community),
545 task, f"/careers/families/{code[:2]}/", occupation=occupation, art_src=career_art[code])
546 family_art = {}
547 for code, family, _, idea in families:
548 family_art[code] = ART["art"](write, "family", code, ART["FAMILIES"][code])
549 path = f"/careers/families/{code}/"
550 links = "".join(f'<li class="career-guide-card"><a href="/careers/{cid}/">{ART["image"](career_art[cid])}<span>{escape(title)}</span></a></li>' for cid,title,*_ in directory if cid.startswith(code + "-"))
551 h = head(path, escape(family) + f" learning paths · {NAME}", escape(idea), None, noindex=True, styles=(VOLUNTEER_CSS,)) + header()
552 write(path.strip("/") + "/index.html", h + f'''<main id="main" class="shell role-guide">
553 <div class="page-head"><p><a href="/careers/">← All career families</a></p>
554 {ART["image"](family_art[code], "guide")}<h1>{escape(family)}</h1><p class="lead">Choose a career to open its starter curriculum.</p></div>
555 <ul class="career-list">{links}</ul>
556 </main>''' + footer())
557 cards = "\n".join(
558 f'<li class="career-family">{ART["image"](family_art[code], "family")}<h3>{escape(name)}</h3><p>{escape(idea)}</p><div>'
559 f'<button class="career-browse" type="button" data-career-browse="{code}" hidden>Browse {by_group[code]} titles<span class="visually-hidden"> in {escape(name)}</span></button>'
560 f'<a href="/careers/families/{code}/">View learning paths<span class="visually-hidden"> in {escape(name)}</span></a>'
561 '</div></li>'
562 for code, name, trade, idea in families
563 )
564 opts = "".join(f'<option value="{code}">{escape(name)}</option>' for code, name, *_ in families)
565 h = head("/careers/", t, d, [webpage("/careers/", t, d), crumbs("Volunteer ideas by career", "/careers/"), ORG],
566 scripts=("careers.js?v=20261201",), styles=(VOLUNTEER_CSS,)) + header()
567 h += f''' <main id="main">
568 <div class="shell page-head volunteer-head">
569 <span class="mark">Worldwide volunteer community</span>
570 <h1>Find a way to help <em>by career.</em></h1>
571 <p class="lead">Explore {len(directory)} civilian career titles across {len(families)} families. Search for what you know or browse a field you want to learn. These are unpaid volunteer ideas, not openings, shifts, or commitments.</p>
572 {volunteer_switch("/careers/")}
573 <p>Open any title to read its starter curriculum here. When you’re ready, <a href="{VOLUNTEER_MAIL}">email us</a> what you’d like to contribute. No forms or résumé are needed. <a href="/volunteer/">See the separate roster of {VOLUNTEER_COUNT} curated volunteer roles</a>.</p>
574 </div>
575 <section class="shell career-note" aria-labelledby="project-brief-title">
576 <h2 id="project-brief-title">Project briefs</h2>
577 <p><a href="{PRINT_PROJECT}">Print and fulfillment</a>: explore the expertise needed for a direct manufacturing pilot. This independent project is not a job opening or a volunteer listing.</p>
578 <p><a href="{PET_FOOD_PROJECT}">Pet food and treats</a>: explore five research roles in formulation, U.S. sourcing, manufacturing safety and palatability.</p>
579 </section>
580 <section class="shell career-directory" aria-labelledby="career-title">
581 <h2 id="career-title" tabindex="-1">Career directory</h2>
582 <div class="career-filters" hidden>
583 <div><label for="career-query">Search careers</label><input type="search" id="career-query" placeholder="Try electrician, teacher, or nurse"></div>
584 <div><label for="career-family">Career family</label><select id="career-family"><option value="">All career families</option>{opts}</select></div>
585 <button type="button" id="career-clear" class="button secondary">Clear filters</button>
586 </div>
587 <div class="career-results" hidden>
588 <p id="career-status" role="status" aria-atomic="true"></p>
589 <ul id="career-results" class="career-list"></ul>
590 <button type="button" id="career-more" class="button secondary" hidden>Show more results</button>
591 </div>
592 <p class="career-fallback" hidden>Search is unavailable. The career family learning paths below still work.</p>
593 <ul class="career-families">{cards}</ul>
594 </section>
595 <section class="shell career-note" aria-labelledby="career-scope">
596 <h2 id="career-scope">A starting point, not a limit</h2>
597 <p>Career names come from the <a href="https://www.bls.gov/soc/2018/major_groups.htm">U.S. Bureau of Labor Statistics’ 2018 Standard Occupational Classification</a>. It organizes the list; it does not limit where you can join or cover every title used worldwide. Don’t see yours? <a href="{VOLUNTEER_MAIL}">Email us</a>.</p>
598 <p>For licensed or safety-critical fields, stick to appropriate planning, general education and coordination. Do not do regulated or hazardous work unless you are independently qualified and authorized, with supervision where required. The directory does not authorize work or offer services.</p>
599 </section>
600 </main>
601''' + footer()
602 write("careers/index.html", h)
603
604
605
606def print_project_page() -> None:
607 title = "Print and fulfillment project"
608 desc = "Explore the skills behind an independent direct-factory pilot for cotton and performance tees."
609 roles = [
610 ("apparel-sourcing", "Apparel sourcing and factory qualification",
611 "Experience qualifying apparel factories, reviewing samples and negotiating realistic quantities and lead times.",
612 "Compare factories that print directly and can ship from their own site. Document in-house and subcontracted steps, size ranges, sample terms and repeat-run capacity.",
613 "production-study"),
614 ("garment-printing", "Garment printing and quality",
615 "Experience with textile printing, cotton and performance fabrics, and repeatable production checks.",
616 "Evaluate one cotton tee and one performance tee against fit, print feel, stretch and repeated washing. Deliver an approval scorecard for samples.",
617 "printer-test"),
618 ("shipping-operations", "International fulfillment and customs",
619 "Experience with outbound parcels, customs, tracking, failed deliveries and returns.",
620 "Compare tested destinations for true delivered cost and recipient charges, then document which lanes can launch and how exceptions will be handled.",
621 "truck"),
622 ("print-prepress", "Card printing and prepress",
623 "Experience with digital production presses, uncoated card stock, cutting and QR print checks.",
624 "Specify a simple low-cost card and qualification tests for the future owned printer. No card purchasing, printing or distribution during the apparel pilot.",
625 "evidence"),
626 ]
627 cards = []
628 for slug, name, background, deliverable, motif in roles:
629 src = ART["art"](write, "project-print", slug, motif)
630 cards.append(f'''<li id="{slug}">
631 {ART["image"](src, "family")}
632 <h3>{escape(name)}</h3>
633 <p><strong>Relevant experience:</strong> {escape(background)}</p>
634 <p><strong>First milestone:</strong> {escape(deliverable)}</p>
635 </li>''')
636 graph = [webpage(PRINT_PROJECT, title, desc), crumbs(title, PRINT_PROJECT), ORG]
637 h = head(PRINT_PROJECT, f"{title} · {NAME}", desc, graph, styles=(VOLUNTEER_CSS,)) + header()
638 h += f''' <main id="main" class="shell role-guide">
639 <div class="page-head">
640 <span class="mark">Independent project brief</span>
641 <h1>Print and fulfillment</h1>
642 <p class="lead">Qualify a factory that can print durable cotton and performance tees and ship from its own facility, without a print-on-demand marketplace in the middle.</p>
643 <p>Start remotely with two printed samples, one in each fabric. Approve samples before a small pilot, and open destinations only after confirming delivered cost, tracking, duties and returns. Worldwide fulfillment is a goal, not current coverage.</p>
644 <p>Business cards are on hold until a printer can be sourced, installed and qualified for in-house production.</p>
645 <p><strong>Planning only.</strong> These briefs describe expertise the independent venture may need. They are not employment offers, unpaid work requests or an invitation to sign up. No sign-ups are open or collected here.</p>
646 </div>
647 <div class="career-directory" aria-labelledby="print-project-roles">
648 <h2 id="print-project-roles">Role briefs</h2>
649 <ul class="career-families">{''.join(cards)}</ul>
650 </div>
651 <p class="role-guide-next"><a href="/careers/">Back to Career directory</a></p>
652 </main>
653''' + footer()
654 write("projects/print-and-fulfillment/index.html", h)
655
656
657def pet_food_project_page() -> None:
658 title = "Pet food and treats research"
659 desc = "Research roles for U.S.-sourced dog and cat treats and separate adult dog and cat foods."
660 roles = [
661 ("pet-food-science", "Pet-food scientist and process validation",
662 "Hands-on development of meat-based pet treats and complete dog or cat food, with experience transferring a prototype into a U.S. food plant.",
663 "Write a brief for separate, cooked duck treat prototypes. Compare consistent portion size, texture, yield, packaging and cost, and identify the evidence a plant must provide before release.",
664 "production-study"),
665 ("veterinary-nutrition", "Veterinary nutrition and formulation",
666 "Board-certified veterinary nutrition or equivalent specialist credentials, with commercial canine and feline formulation experience.",
667 "Define separate specifications for one adult dog food and one adult cat food, including the evidence for nutritional adequacy. Do not treat a snack as a complete diet.",
668 "preventive-vet"),
669 ("us-sourcing", "U.S. sourcing and manufacturer qualification",
670 "Pet-food supplier assurance, ingredient traceability and U.S. co-manufacturer due diligence.",
671 "Build a supplier screen that distinguishes where the duck and other ingredients originate from where the product is made. Specify domestic-origin records, lot traceability and backup supply before a purchase decision.",
672 "truck"),
673 ("food-safety", "Quality, microbiology and shelf life",
674 "Animal-food preventive controls, poultry-product verification, post-process contamination control, and shelf-life and packaging studies.",
675 "Design a manufacturer and lab release checklist that covers microbial checks, packaging integrity and shelf-life evidence. No tentative stability claims and no feeding unreleased samples.",
676 "validation-study"),
677 ("palatability-research", "Humane palatability research",
678 "Veterinary or animal-welfare oversight and experience designing voluntary canine and feline food preference studies.",
679 "Separate dog and cat observations, define opt-out and stop criteria, and distinguish preference from nutrition or safety. Home taste feedback is optional only after professional safety release and a veterinarian confirms suitability for each pet.",
680 "animal"),
681 ]
682 cards = []
683 for slug, name, background, deliverable, motif in roles:
684 src = ART["art"](write, "project-pet-food", slug, motif)
685 cards.append(f'''<li id="{slug}">
686 {ART["image"](src, "family")}
687 <h3>{escape(name)}</h3>
688 <p><strong>Relevant experience:</strong> {escape(background)}</p>
689 <p><strong>First milestone:</strong> {escape(deliverable)}</p>
690 </li>''')
691 graph = [webpage(PET_FOOD_PROJECT, title, desc), crumbs(title, PET_FOOD_PROJECT), ORG]
692 h = head(PET_FOOD_PROJECT, f"{title} · {NAME}", desc, graph, styles=(VOLUNTEER_CSS,)) + header()
693 h += f''' <main id="main" class="shell role-guide">
694 <div class="page-head">
695 <span class="mark">Research project brief</span>
696 <h1>Pet food and treats</h1>
697 <p class="lead">Explore meat-based pet treats manufactured in the United States with U.S.-sourced ingredients. Duck is the first protein to evaluate, not a proven preference for every pet.</p>
698 <p>The first treat study compares dried pieces with a cooked, portioned format, using separate dog and cat prototypes. Consistent size, lower cost and longer shelf life are targets to test, not product claims.</p>
699 <p>Next, research one complete adult dog food and one separate complete adult cat food. Nutritional adequacy and manufacturing safety need their own evidence. A household taste check cannot establish either, and no comparison to another brand is claimed.</p>
700 <p><strong>Planning only.</strong> These briefs describe expertise the project may need, not employment offers or requests for unpaid work. No sign-ups are open or collected here.</p>
701 <p>References: <a href="https://www.fda.gov/animal-veterinary/animal-health-literacy/complete-and-balanced-pet-food">FDA on complete and balanced pet food</a>, <a href="https://www.fda.gov/regulatory-information/search-fda-guidance-documents/cvm-gfi-245-hazard-analysis-and-risk-based-preventive-controls-food-animals">FDA animal food preventive controls</a>, and <a href="https://www.aafco.org/consumers/understanding-pet-food/treats-and-chews/">AAFCO on treats and chews</a>.</p>
702 </div>
703 <div class="career-directory" aria-labelledby="pet-food-project-roles">
704 <h2 id="pet-food-project-roles">Role briefs</h2>
705 <ul class="career-families">{''.join(cards)}</ul>
706 </div>
707 <p class="role-guide-next"><a href="/careers/">Back to Career directory</a></p>
708 </main>
709''' + footer()
710 write("projects/pet-food-and-treats/index.html", h)
711
712
713def field(name, label, kind="text", hint=None, required=True, attrs=""):
714 opt = "" if required else " <small>(optional)</small>"
715 req = " required" if required else ""
716 hint_html = f'\n <span class="hint" id="{name}-hint">{hint}</span>' if hint else ""
717 described = f' aria-describedby="{name}-hint {name}-error"' if hint else f' aria-describedby="{name}-error"'
718 if kind == "textarea":
719 control = f'<textarea id="{name}" name="{name}"{req}{described} {attrs}></textarea>'
720 elif kind == "select":
721 control = f'<select id="{name}" name="{name}"{req}{described} {attrs}><option value="">Choose…</option></select>'
722 else:
723 control = f'<input id="{name}" name="{name}" type="{kind}"{req}{described} {attrs}>'
724 return f''' <div class="field">
725 <label for="{name}">{label}{opt}</label>
726 {control}{hint_html}
727 <span class="error" id="{name}-error" data-error="{name}" role="alert"></span>
728 </div>'''
729
730
731HONEYPOT = ''' <div class="hp" aria-hidden="true">
732 <label for="website">Leave this empty</label>
733 <input id="website" name="website" type="text" tabindex="-1" autocomplete="off">
734 </div>'''
735
736
737def form_foot(button, note):
738 return f''' <div class="turnstile"></div>
739 <div class="form-foot">
740 <button type="submit" class="button">{button}</button>
741 <p class="fineprint">{note}</p>
742 </div>
743 <p class="form-status" role="alert"></p>'''
744
745
746def moderators():
747 t = f"Become a moderator · {NAME}"
748 d = f"{NAME} has a separate request form for board moderator access. Community volunteers email us to join."
749 graph = [webpage("/moderators/", t, d), crumbs("Moderators", "/moderators/"), ORG]
750 h = head("/moderators/", t, d, graph, scripts=("forms.js",)) + header("/moderators/") + f''' <main id="main">
751 <div class="shell page-head">
752 <span class="mark">moderators</span>
753 <h1>Help us read. <em>Become a&nbsp;moderator.</em></h1>
754 <p class="lead">Board moderator access is separate from volunteering. To volunteer in community moderation without a form, see the <a href="/volunteer/">volunteer roster</a>.</p>
755 </div>
756 <div class="shell form-page">
757 <div>
758 <form class="form" data-api="/api/moderators" novalidate>
759 <div class="field-row">
760{field("name", "Name", attrs='maxlength="100" autocomplete="name"')}
761{field("email", "Email", kind="email", attrs='maxlength="254" autocomplete="email"')}
762 </div>
763{field("message", "Message", kind="textarea", attrs='maxlength="3000"', hint="Why you want to moderate, in a few sentences.")}
764{form_foot("Apply to moderate", "We read every request ourselves.")}
765 </form>
766 <section class="done" data-done hidden aria-labelledby="done-title">
767 <h2 id="done-title">Thank you. We have your request.</h2>
768 <p>It is saved as <code data-ref></code>. We read every request ourselves and will write to the email you gave.</p>
769 <div class="actions"><a class="button secondary" href="/volunteer/">See the volunteer roster</a></div>
770 </section>
771 </div>
772 <aside class="aside-card" aria-labelledby="next-title">
773 <h2 id="next-title">How moderation works</h2>
774 <ul>
775 <li><strong>You read the whole post</strong> against the <a href="/help/#rules">volunteer listing guidelines</a>.</li>
776 <li><strong>You can flag or archive historical records</strong> with the reason in plain words. Moderation decisions are logged with your name.</li>
777 <li><strong>You decide, not software.</strong> An agent may tidy formatting. It never approves or rejects.</li>
778 <li><strong>We follow up privately.</strong> If your moderator request is approved, we will send instructions for your access.</li>
779
780 </ul>
781 </aside>
782 </div>
783 </main>
784''' + footer()
785 write("moderators/index.html", h)
786
787
788def faq():
789 return [(f"What is {NAME}?", "A worldwide board for unpaid volunteer work. All participation is optional."),
790 ("How do I join?", 'Pick a role on the <a href="/volunteer/">volunteer roster</a> and select <strong>Volunteer</strong> to email us. No forms, résumé or approval is required.'),
791 ("Is it free?", "Yes. Browsing the board and choosing a role are free."),
792 ("Who posts listings?", "Only Jobley lists roles on this board."),
793 ("Do you collect my details?", "Not when you choose a volunteer role. The separate board-moderator form is for managing access to the board only.")]
794
795
796def help_page():
797 t = f"Help · {NAME}"
798 d = f"Answers about {NAME}: how to choose a volunteer role and get started."
799 qs = faq()
800 fq = {"@type": "FAQPage", "@id": f"{SITE}/help/#faq", "url": f"{SITE}/help/",
801 "mainEntity": [{"@type": "Question", "name": q, "acceptedAnswer": {"@type": "Answer", "text": a}} for q, a in qs]}
802 graph = [webpage("/help/", t, d), fq, crumbs("Help", "/help/"), APP, ORG]
803 qa = "\n".join(f" <h3>{q}</h3>\n <p>{a}</p>" for q, a in qs)
804 rules = "\n".join(f" <li><strong>{a}</strong> {b}</li>" for a, b in RULES)
805 h = head("/help/", t, d, graph) + header() + f''' <main id="main">
806 <div class="shell page-head">
807 <span class="mark">help</span>
808 <h1>{NAME} Help</h1>
809 <p class="lead">{d}</p>
810 <p class="guarantee"><strong>Our promise:</strong> {GUARANTEE}</p>
811 </div>
812 <div class="shell doc">
813 <nav class="toc" aria-label="On this page">
814 <strong>On this page</strong>
815 <a href="#questions">Common questions</a>
816 <a href="#rules">Volunteer listing guidelines</a>
817 </nav>
818 <div class="prose">
819 <section id="questions">
820 <h2>Common questions</h2>
821{qa}
822 </section>
823 <section id="rules">
824 <h2>Volunteer listing guidelines</h2>
825 <p>These rules apply throughout the volunteer board.</p>
826 <ul>
827{rules}
828 </ul>
829 <p>We remove misleading or unsafe listings.</p>
830 </section>
831 </div>
832 </div>
833 </main>
834''' + footer()
835 write("help/index.html", h)
836
837
838def compare():
839 t = f"Ways to help · {NAME}"
840 d = "Pick an unpaid volunteer role and email us to get started."
841 h = head("/compare/", t, d, [webpage("/compare/", t, d)]) + header() + f'''<main id="main">
842 <div class="shell page-head">
843 <h1>Ways to help</h1><p class="lead">{d}</p>
844 <a class="button" href="/volunteer/">Browse volunteer roles</a>
845 </div>
846 </main>''' + footer()
847 write("compare/index.html", h)
848
849
850def privacy():
851 t = f"Privacy · {NAME}"
852 d = f"How {NAME} handles volunteer browsing, the board moderator form, and private historical records."
853 graph = [webpage("/privacy/", t, d), crumbs("Privacy", "/privacy/"), ORG]
854 h = head("/privacy/", t, d, graph) + header() + f''' <main id="main">
855 <div class="shell page-head">
856 <span class="mark">privacy</span>
857 <h1>Privacy</h1>
858 <p class="lead">Choosing a volunteer role does not send personal details to Jobley. Updated November 27, 2026.</p>
859 </div>
860 <div class="shell doc single">
861 <div class="prose">
862 <section id="posts">
863 <h2>Historical submissions</h2>
864 <p>Historical submissions are private and no longer appear on the board. Access is limited to authorized people; connected agents cannot see personal records. You can request access, correction or deletion using the contact details below. We retain historical submissions for up to 12 months.</p>
865 </section>
866 <section id="moderators">
867 <h2>When you apply to moderate</h2>
868 <p>We store your request and read it ourselves. If you become a moderator, the decisions you make (publish, send back, edit, note) are logged with your name so every decision has a person behind it.</p>
869 </section>
870 <section id="abuse">
871 <h2>Keeping the forms clean</h2>
872 <p>The forms use Cloudflare Turnstile to tell people from bots, which may set a cookie and reads standard browser signals under <a href="https://www.cloudflare.com/privacypolicy/">Cloudflare’s privacy policy</a>. To limit how many submissions one connection can send in an hour, we store a salted, one-way hash of the IP address with each submission. We do not store the IP address itself.</p>
873 </section>
874 <section>
875 <h2 id="hosting">Where we host</h2>
876 <p>This site runs on <a href="https://www.cloudflare.com/">Cloudflare</a>. Cloudflare serves every page and manages our traffic, so it handles standard request details such as your IP address and browser to deliver the site and protect it from abuse. Form submissions are stored in a Cloudflare D1 database. Cloudflare handles that data under its <a href="https://www.cloudflare.com/privacypolicy/">privacy policy</a>.</p>
877 <p>We&rsquo;re not a Cloudflare sponsor. We chose them because we think they&rsquo;re the best value and the best service, and we&rsquo;ll keep using them for as long as that stays true.</p>
878 </section>
879 <section id="contact">
880 <h2>Questions and changes</h2>
881 <p>We don’t sell your information, and we don’t use it for advertising. To ask what we hold, or to have it corrected or deleted, email <a href="mailto:hello@jobley.ai">hello@jobley.ai</a>. We answer within 30 days.</p>
882 <p>If this page changes, the date at the top changes with it.</p>
883 </section>
884 </div>
885 </div>
886 </main>
887''' + footer()
888 write("privacy/index.html", h)
889
890
891def license_page():
892 t = "License · Jobley"
893 d = "Public-domain licensing and third-party notices for Jobley."
894 graph = [webpage("/licenses/", t, d), crumbs("License", "/licenses/"), ORG]
895 h = head("/licenses/", t, d, graph) + header() + ''' <main id="main">
896 <div class="shell page-head">
897 <span class="mark">license</span>
898 <h1>License</h1>
899 <p class="lead">Public-domain licensing for Jobley’s source code.</p>
900 </div>
901 <div class="shell doc single">
902 <div class="prose">
903 <section id="license">
904 <h2>Public domain</h2>
905 <p>Jobley’s code is free and open source, released into the public domain under the <a href="https://unlicense.org/">Unlicense</a>. Anyone may copy, change, share or sell it, for any purpose, without asking. We claim no copyright in it. Parts made by others, such as open source libraries, keep their own licenses.</p>
906 </section>
907 </div>
908 </div>
909 </main>
910''' + footer()
911 write("licenses/index.html", h)
912
913
914def notfound():
915 h = head("/404", f"Page not found · {NAME}", "", None, noindex=True) + header(body_class="missing-page") + f''' <main id="main" class="hero missing-hero shell">
916 <img src="/assets/icon.png?v={V}" width="66" height="66" alt="">
917 <h1>Page <em>not found.</em></h1>
918 <p class="lead">The page may have moved, or the link may have changed. You can still get back to the board or find help.</p>
919 <div class="actions">
920 <a class="button" href="/">{ICON_HOME}Back to Home</a>
921 <a class="button secondary" href="/volunteer/">{ICON_SEARCH}Browse volunteer roles</a>
922 <a class="button secondary" href="/help/">{ICON_HELP}Get Help</a>
923 </div>
924 </main>
925''' + footer()
926 write("404.html", h)
927
928
929def app_turnstile():
930 h = head("/app/turnstile/", f"Checking you’re a person · {NAME}", "", None, noindex=True, scripts=("app-turnstile.js",)) + f'''<body>
931 <main id="main" class="shell page-head">
932 <p class="lead">One moment. We’re checking you’re a person.</p>
933 <div id="challenge"></div>
934 </main>
935</body>
936</html>
937'''
938 write("app/turnstile/index.html", h)
939
940
941def llms():
942 return # NO SEO: no llms.txt
943 write("llms.txt", f"""# {NAME}
944
945> Jobley is a worldwide volunteer board. Every role is unpaid and optional. Pick a role and email us to start. No forms, résumé or approval is required.
946
947- [Volunteer roster]({SITE}/volunteer/): all current roles
948- [Career directory]({SITE}/careers/): browse civilian career backgrounds and ways to contribute; these are ideas, not listings
949- [Help]({SITE}/help/): how to join
950- [Board moderator access]({SITE}/moderators/): a separate form for managing who can moderate the board
951- [Privacy]({SITE}/privacy/): volunteer browsing and historical records
952""")
953
954
955
956AI_BOTS = ["OAI-SearchBot", "ChatGPT-User", "GPTBot", "ClaudeBot", "Claude-SearchBot", "Claude-User", "PerplexityBot", "Perplexity-User",
957 "Google-Extended", "GoogleOther", "Applebot", "Applebot-Extended", "bingbot", "Amazonbot", "meta-externalagent",
958 "meta-externalfetcher", "DuckAssistBot", "MistralAI-User", "CCBot", "cohere-ai", "YouBot"]
959# A named group ignores *, so every Disallow goes in both groups.
960DISALLOW = "Disallow: /api/admin/\nDisallow: /job-template\nDisallow: /app/"
961
962
963def crawl_files():
964 write("robots.txt", "User-agent: *\nAllow: /\n" + DISALLOW + "\n") # NO SEO: no sitemap, no crawler courting
965 return
966 bots = "\n".join(f"User-agent: {b}" for b in AI_BOTS)
967 write("robots.txt", f"""# {NAME} welcomes search engines and AI assistants.
968# A plain-text summary for language models: {SITE}/llms.txt
969
970User-agent: *
971Allow: /
972{DISALLOW}
973
974# AI search, assistant and training crawlers, allowed by name.
975{bots}
976Allow: /
977{DISALLOW}
978
979Sitemap: {SITE}/sitemap.xml
980""")
981 urls = "\n".join(f" <url><loc>{SITE}{p}</loc><lastmod>{V[:4]}-{V[4:6]}-{V[6:]}</lastmod></url>" for p in PAGES)
982 write("sitemap.xml", f'<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n{urls}\n</urlset>\n')
983
984
985def headers_file():
986 """_headers with the house CSP. The one inline <style> the shared share script adds is allowed by its hash."""
987 share_hash = subprocess.run(["node", os.path.join(ROOT, "tools", "csp-hash.mjs")], capture_output=True, text=True, check=True).stdout.strip()
988 cf = "https://challenges.cloudflare.com"
989 csp = (f"default-src 'self'; script-src 'self' {cf}; style-src 'self' {share_hash}; "
990 f"img-src 'self'; font-src 'self'; "
991 f"connect-src 'self' https://projectatom.ai; "
992 f"frame-src {cf}; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'none'")
993 write("_headers", f"""# Cloudflare Pages response headers. Written by tools/build-site.py.
994/*
995 Referrer-Policy: strict-origin-when-cross-origin
996 X-Content-Type-Options: nosniff
997 Content-Security-Policy: {csp}
998
999/assets/fonts/*
1000 Cache-Control: public, max-age=31536000, immutable
1001
1002/job-template
1003 X-Robots-Tag: noindex
1004
1005/app/*
1006 X-Robots-Tag: noindex
1007
1008/favicon.png
1009 Cache-Control: public, max-age=3600
1010
1011/assets/icon.png
1012 Cache-Control: public, max-age=3600
1013
1014/assets/apple-touch-icon.png
1015 Cache-Control: public, max-age=3600
1016""")
1017 return csp
1018
1019
1020def social_card():
1021 tmpl = open(os.path.join(ROOT, "tools", "social-card.tmpl.html")).read()
1022 write("tools/social-card.html", tmpl.replace("{NAME}", NAME).replace("{DOMAIN}", DOMAIN.upper()))
1023
1024
1025if COMMUNITY_ONLY:
1026 volunteer_page()
1027 careers_page()
1028 print_project_page()
1029 pet_food_project_page()
1030 crawl_files()
1031 print("ok", NAME, "community pages only; public app release remains on hold")
1032 raise SystemExit(0)
1033
1034index(); volunteer_page(); careers_page(); print_project_page(); pet_food_project_page(); moderators(); help_page(); compare(); privacy(); license_page(); notfound()
1035app_turnstile(); llms(); crawl_files(); CSP = headers_file(); social_card()
1036print("ok", NAME, DOMAIN, "website-only")