Branchwell

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

Raw 67.4 KB on a0cd79699aaaf51f42df5291ac550c89fe01a443
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 EPA’s Section 608 requirements 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 U.S. Department of Labor’s apprenticeship finder. 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 ours(url):
365 """Only links to our own pages render: no outbound links (Brad 2026-12-03)."""
366 return url.startswith("/") or "jobley.ai" in url
367
368
369def learning_page(path, title, description, track, community, first_task, parent, formal=None, occupation=None, art_src=None):
370 if art_src is None:
371 art_src = ART["art"](write, "support", path.strip("/").split("/")[-1], ART["role_motif"](title, community))
372 project_role = PROJECT_ROLE_TRACKS.get(title)
373 concept, exercise, artifact, resource = project_role[3] if project_role else LEARNING["TRACKS"][track]
374 if formal is None:
375 formal = LEARNING["FORMAL"].get(track, (
376 "Look up the occupation, then compare entry qualifications and training where you live. Ask a provider which skills and supervised hours it covers.",
377 LEARNING["BLS"]))
378 d = f"Free starter curriculum, practice and next steps for {title}."
379 rendered_steps = (
380 ("Learn how the work fits together", concept, resource, "Read the learning resource"),
381 ("Do a first exercise", first_task, None, None),
382 ("Practice and compare", exercise, None, None),
383 ("Show what you learned", artifact + " Ask someone to review what you made and explain one thing you would improve.", None, None),
384 )
385 steps = "".join(
386 f'<li><h3>{escape(label)}</h3><p>{escape(copy)}</p>'
387 + (f'<a href="{escape(url)}">{escape(link)}</a>' if url and ours(url) else '') + '</li>'
388 for label, copy, url, link in rendered_steps)
389 next_heading = "Scope and next steps" if project_role else "Formal training and next steps"
390 training = (f"<p>{escape(project_role[2])}</p>" if project_role else
391 f'<p>{escape(formal[0])}</p>' + (f'\n <p><a href="{escape(formal[1])}">Explore the training route</a></p>' if ours(formal[1]) else ''))
392 refs = f'<p><a href="{escape(occupation)}">Read about the occupation and typical training</a></p>' if occupation and occupation != formal[1] and ours(occupation) else ''
393 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."
394 h = head(path, escape(title) + f" starter curriculum · {NAME}", escape(d), None, noindex=True, styles=(VOLUNTEER_CSS,)) + header()
395 h += f''' <main id="main" class="shell role-guide">
396 <div class="page-head">
397 <p><a href="{escape(parent)}">← Back to the directory</a></p>
398 {ART["image"](art_src, "guide")}
399 <span class="mark">Free starter curriculum</span>
400 <h1>{escape(title)}</h1>
401 <p class="lead">{escape(description)}</p>
402 <p>Read the whole learning path here. When you’re ready to help, email us.</p>
403 </div>
404 <section aria-labelledby="curriculum-heading">
405 <h2 id="curriculum-heading">Your starter curriculum</h2>
406 <ol class="curriculum-steps">{steps}</ol>
407 </section>
408 <section class="role-guide-next" aria-labelledby="training-heading">
409 <h2 id="training-heading">{next_heading}</h2>
410 {training}{refs}
411 <p>{escape(scope)}</p>
412 <p><a class="button secondary" href="{VOLUNTEER_MAIL}">Email us to volunteer</a></p>
413 </section>
414 </main>
415''' + footer()
416 write(path.strip("/") + "/index.html", h)
417
418
419def volunteer_track(group, title, trade):
420 lower = title.lower()
421 if title in PROJECT_ROLE_TRACKS: return None
422 if title in OPEN_DESIGN_ROLES: return OPEN_DESIGN_ROLES[title][2]
423 if group in NEW_RESEARCH: return trade.removeprefix("atom-")
424 if group == "Solar roof tiles": return "solar-roof-envelope" if "envelope" in lower else "solar-roof-pv"
425 if group == "Civilian nuclear energy":
426 if "licensing" in lower: return "civilian-energy-oversight"
427 if "grid" in lower: return "civilian-energy-grid"
428 return "civilian-energy-preparedness"
429 if any(x in lower for x in ("electrical", "electrician")): return "electrical"
430 if "plumb" in lower: return "plumbing"
431 if "cooling" in lower or "hvac" in lower: return "hvac"
432 if "veterinar" in lower: return "veterinary"
433 if "research" in lower and trade == "atom-health-veterinary": return "health-veterinary"
434 if "educat" in lower or "training" in lower: return "education"
435 if "budget" in lower or "finance" in lower: return "finance"
436 return trade.removeprefix("atom-")
437
438
439def volunteer_page():
440 t = f"Find volunteer work · {NAME}"
441 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."
442 graph = [webpage("/volunteer/", t, d), crumbs("Volunteer work", "/volunteer/"), ORG]
443 groups = VOLUNTEER_GROUPS
444 sl = lambda text: re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-")
445 titles = [sl(title) for _, roles in groups for title, _, _ in roles]
446 assert len(titles) == len(set(titles))
447 assert not START_IDS & (set(titles) | {sl(group) for group, _ in groups}), "a role or group slug collides with a Getting started id"
448 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)
449 sections = []
450 def trade_category(group, title):
451 if title in PROJECT_ROLE_TRACKS: return PROJECT_ROLE_TRACKS[title][1]
452 if group in PROJECT_GROUPS: return PROJECT_GROUPS[group][0]
453 if group in NEW_RESEARCH: return NEW_RESEARCH[group][0]
454 t = title.lower()
455 if title in OPEN_DESIGN_ROLES: return "atom-build-" + OPEN_DESIGN_ROLES[title][0]
456 if group == "Leadership and operations": return "atom-leadership-operations"
457 if group == "Community": return "atom-design-media" if "writer" in t or "design and media" in t else "atom-community"
458 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"
459 if group == "Free meals, farming and delivery":
460 if "farm" in t or "sourcing" in t: return "atom-farming"
461 if any(x in t for x in ("driver", "dispatch", "route")): return "atom-delivery-driving"
462 return "atom-kitchens-food"
463 if group == "Free movie and TV streaming": return "atom-film-tv-production"
464 if group == "Chip design and manufacturing": return "atom-chips-manufacturing"
465 if group == "Solar roof tiles": return "atom-build-solar-roof-tiles"
466 if group == "Civilian nuclear energy": return "atom-civilian-nuclear-energy"
467 if group == "Data centers, power and manufacturing": return "atom-data-centers-trades"
468 if group == "Health, veterinary care and research": return "atom-health-veterinary"
469 if group == "Motors, robotics and space": return "atom-motors" if any(x in t for x in ("vehicle", "ev ", "charging")) else "atom-robotics-space"
470 raise ValueError("Missing community category for " + group)
471 for group, roles in groups:
472 items = []
473 for title, description, exercise in roles:
474 title_html = escape(title)
475 trade = trade_category(group, title)
476 guide = f"/volunteer/learn/{sl(title)}/"
477 motif = PROJECT_ROLE_TRACKS[title][4] if title in PROJECT_ROLE_TRACKS else ART["role_motif"](title, trade)
478 role_src = ART["art"](write, "volunteer", sl(title), motif)
479 learning_page(guide, title, description, volunteer_track(group, title, trade), trade, exercise, "/volunteer/#" + sl(title), art_src=role_src)
480 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 ""
481 web_brief = ""
482 items.append(f'''<li class="job" id="{sl(title)}">
483 <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>
484 <p class="volunteer-description">{escape(description)}</p>
485 <details class="volunteer-learning"><summary>Getting started and learning path</summary><ol>
486 <li>{escape(exercise)}</li>
487 <li><a href="{guide}">Read the full starter curriculum for {title_html}</a>.</li>
488 <li>Email us what you tried or what you’d like to help with. Use public or sample material, not private records.</li>
489{formal} </ol>{web_brief}</details>
490 <div class="job-actions"><a class="button secondary" href="{VOLUNTEER_MAIL}" aria-label="Volunteer: {title_html}">Volunteer <span aria-hidden="true">↗</span></a></div>
491 </li>''')
492 scope = (
493 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>'
494 if group == "Civilian nuclear energy" else ""
495 )
496 if group == "Pet products and local distribution":
497 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>'
498 if group == "Solar roof tiles":
499 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>'
500 if group in PROJECT_GROUPS: scope = f'<p>{escape(PROJECT_GROUPS[group][1])}</p>'
501 if group == "Data centers, power and manufacturing":
502 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>'
503 if group == "Open Garden Design":
504 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">'
505 if group in NEW_RESEARCH: scope = f'<p>{escape(NEW_RESEARCH[group][1])}</p>'
506 sections.append(f'<section class="volunteer-section" id="{sl(group)}"><h2>{escape(group)}</h2>{scope}<ul class="board">{"".join(items)}</ul></section>')
507 h = head("/volunteer/", t, d, graph, styles=(VOLUNTEER_CSS,)) + header("/volunteer/") + f''' <main id="main">
508 <div class="shell page-head volunteer-head">
509 <span class="mark"><a href="/volunteer/">all volunteer roles</a></span>
510 <h1>Find volunteer work <em>you care about.</em></h1>
511{getting_started(on_board=True, indent=" ")}
512 <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>
513 {volunteer_switch("/volunteer/")}
514 <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>
515 <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>
516 <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>
517 <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>
518 </div>
519 <div class="shell board-wrap volunteer-board" id="{BOARD_ID}">{trade_training_section()}{"".join(sections)}</div>
520 </main>
521''' + footer()
522 write("volunteer/index.html", h)
523
524
525def careers_page():
526 t = f"Volunteer ideas by career · {NAME}"
527 d = "Find volunteer ideas by career and start organizing with others."
528 config = runpy.run_path(os.path.join(ROOT, "tools", "career-families.py"))
529 families = config["FAMILIES"]
530 source = json.load(open(os.path.join(ROOT, "tools", "career-titles.json")))
531 by_group = {code: 0 for code, *_ in families}
532 for code, title in source:
533 by_group[code[:2]] += 1
534 assert sum(by_group.values()) == 848
535 directory = [[code, title, next((trade for pattern, trade in config["ROUTES"] if re.search(pattern, title, re.I)), ""),
536 config["ALIASES"].get(code, "")] for code, title in source]
537 write("assets/career-directory.json", json.dumps({"careers": directory, "families": families}, ensure_ascii=False, separators=(",", ":")) + "\n")
538 by_code = {family[0]: family for family in families}
539 career_art = {}
540 for code, title, override, _ in directory:
541 career_art[code] = ART["art"](write, "career", code, ART["motif_for"](title, ART["FAMILIES"][code[:2]]))
542 family, community, family_idea = by_code[code[:2]][1:]
543 track = LEARNING["SPECIAL_CODES"].get(code) or override or LEARNING["FAMILY_TRACK"][code[:2]]
544 title_description, task, occupation = LEARNING["OCCUPATIONS"].get(code, (
545 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.",
546 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.",
547 LEARNING["BLS"],
548 ))
549 learning_page(f"/careers/{code}/", title, title_description, track, "atom-" + (override or community),
550 task, f"/careers/families/{code[:2]}/", occupation=occupation, art_src=career_art[code])
551 family_art = {}
552 for code, family, _, idea in families:
553 family_art[code] = ART["art"](write, "family", code, ART["FAMILIES"][code])
554 path = f"/careers/families/{code}/"
555 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 + "-"))
556 h = head(path, escape(family) + f" learning paths · {NAME}", escape(idea), None, noindex=True, styles=(VOLUNTEER_CSS,)) + header()
557 write(path.strip("/") + "/index.html", h + f'''<main id="main" class="shell role-guide">
558 <div class="page-head"><p><a href="/careers/">← All career families</a></p>
559 {ART["image"](family_art[code], "guide")}<h1>{escape(family)}</h1><p class="lead">Choose a career to open its starter curriculum.</p></div>
560 <ul class="career-list">{links}</ul>
561 </main>''' + footer())
562 cards = "\n".join(
563 f'<li class="career-family">{ART["image"](family_art[code], "family")}<h3>{escape(name)}</h3><p>{escape(idea)}</p><div>'
564 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>'
565 f'<a href="/careers/families/{code}/">View learning paths<span class="visually-hidden"> in {escape(name)}</span></a>'
566 '</div></li>'
567 for code, name, trade, idea in families
568 )
569 opts = "".join(f'<option value="{code}">{escape(name)}</option>' for code, name, *_ in families)
570 h = head("/careers/", t, d, [webpage("/careers/", t, d), crumbs("Volunteer ideas by career", "/careers/"), ORG],
571 scripts=("careers.js?v=20261201",), styles=(VOLUNTEER_CSS,)) + header()
572 h += f''' <main id="main">
573 <div class="shell page-head volunteer-head">
574 <span class="mark">Worldwide volunteer community</span>
575 <h1>Find a way to help <em>by career.</em></h1>
576 <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>
577 {volunteer_switch("/careers/")}
578 <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>
579 </div>
580 <section class="shell career-note" aria-labelledby="project-brief-title">
581 <h2 id="project-brief-title">Project briefs</h2>
582 <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>
583 <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>
584 </section>
585 <section class="shell career-directory" aria-labelledby="career-title">
586 <h2 id="career-title" tabindex="-1">Career directory</h2>
587 <div class="career-filters" hidden>
588 <div><label for="career-query">Search careers</label><input type="search" id="career-query" placeholder="Try electrician, teacher, or nurse"></div>
589 <div><label for="career-family">Career family</label><select id="career-family"><option value="">All career families</option>{opts}</select></div>
590 <button type="button" id="career-clear" class="button secondary">Clear filters</button>
591 </div>
592 <div class="career-results" hidden>
593 <p id="career-status" role="status" aria-atomic="true"></p>
594 <ul id="career-results" class="career-list"></ul>
595 <button type="button" id="career-more" class="button secondary" hidden>Show more results</button>
596 </div>
597 <p class="career-fallback" hidden>Search is unavailable. The career family learning paths below still work.</p>
598 <ul class="career-families">{cards}</ul>
599 </section>
600 <section class="shell career-note" aria-labelledby="career-scope">
601 <h2 id="career-scope">A starting point, not a limit</h2>
602 <p>Career names follow the U.S. government’s standard list of occupations. 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>
603 <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>
604 </section>
605 <section class="shell career-note" aria-labelledby="career-pay">
606 <h2 id="career-pay">How we pay our team</h2>
607 <p>Everyone is paid by the hour, part-time, with a bonus every day. Pay is mailed to each person in cash, in $100 bills, with a pay record showing their hours and the taxes withheld. Every payment is rounded up to the next $100, whether it comes in cash or in Bitcoin. If pay gets lost in the mail or does not arrive for any reason, we automatically send another. No questions asked.</p>
608 </section>
609 </main>
610''' + footer()
611 write("careers/index.html", h)
612
613
614
615def print_project_page() -> None:
616 title = "Print and fulfillment project"
617 desc = "Explore the skills behind an independent direct-factory pilot for cotton and performance tees."
618 roles = [
619 ("apparel-sourcing", "Apparel sourcing and factory qualification",
620 "Experience qualifying apparel factories, reviewing samples and negotiating realistic quantities and lead times.",
621 "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.",
622 "production-study"),
623 ("garment-printing", "Garment printing and quality",
624 "Experience with textile printing, cotton and performance fabrics, and repeatable production checks.",
625 "Evaluate one cotton tee and one performance tee against fit, print feel, stretch and repeated washing. Deliver an approval scorecard for samples.",
626 "printer-test"),
627 ("shipping-operations", "International fulfillment and customs",
628 "Experience with outbound parcels, customs, tracking, failed deliveries and returns.",
629 "Compare tested destinations for true delivered cost and recipient charges, then document which lanes can launch and how exceptions will be handled.",
630 "truck"),
631 ("print-prepress", "Card printing and prepress",
632 "Experience with digital production presses, uncoated card stock, cutting and QR print checks.",
633 "Specify a simple low-cost card and qualification tests for the future owned printer. No card purchasing, printing or distribution during the apparel pilot.",
634 "evidence"),
635 ]
636 cards = []
637 for slug, name, background, deliverable, motif in roles:
638 src = ART["art"](write, "project-print", slug, motif)
639 cards.append(f'''<li id="{slug}">
640 {ART["image"](src, "family")}
641 <h3>{escape(name)}</h3>
642 <p><strong>Relevant experience:</strong> {escape(background)}</p>
643 <p><strong>First milestone:</strong> {escape(deliverable)}</p>
644 </li>''')
645 graph = [webpage(PRINT_PROJECT, title, desc), crumbs(title, PRINT_PROJECT), ORG]
646 h = head(PRINT_PROJECT, f"{title} · {NAME}", desc, graph, styles=(VOLUNTEER_CSS,)) + header()
647 h += f''' <main id="main" class="shell role-guide">
648 <div class="page-head">
649 <span class="mark">Independent project brief</span>
650 <h1>Print and fulfillment</h1>
651 <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>
652 <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>
653 <p>Contact cards are on hold until a printer can be sourced, installed and qualified for in-house production.</p>
654 <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>
655 </div>
656 <div class="career-directory" aria-labelledby="print-project-roles">
657 <h2 id="print-project-roles">Role briefs</h2>
658 <ul class="career-families">{''.join(cards)}</ul>
659 </div>
660 <p class="role-guide-next"><a href="/careers/">Back to Career directory</a></p>
661 </main>
662''' + footer()
663 write("projects/print-and-fulfillment/index.html", h)
664
665
666def pet_food_project_page() -> None:
667 title = "Pet food and treats research"
668 desc = "Research roles for U.S.-sourced dog and cat treats and separate adult dog and cat foods."
669 roles = [
670 ("pet-food-science", "Pet-food scientist and process validation",
671 "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.",
672 "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.",
673 "production-study"),
674 ("veterinary-nutrition", "Veterinary nutrition and formulation",
675 "Board-certified veterinary nutrition or equivalent specialist credentials, with commercial canine and feline formulation experience.",
676 "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.",
677 "preventive-vet"),
678 ("us-sourcing", "U.S. sourcing and manufacturer qualification",
679 "Pet-food supplier assurance, ingredient traceability and U.S. co-manufacturer due diligence.",
680 "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.",
681 "truck"),
682 ("food-safety", "Quality, microbiology and shelf life",
683 "Animal-food preventive controls, poultry-product verification, post-process contamination control, and shelf-life and packaging studies.",
684 "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.",
685 "validation-study"),
686 ("palatability-research", "Humane palatability research",
687 "Veterinary or animal-welfare oversight and experience designing voluntary canine and feline food preference studies.",
688 "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.",
689 "animal"),
690 ]
691 cards = []
692 for slug, name, background, deliverable, motif in roles:
693 src = ART["art"](write, "project-pet-food", slug, motif)
694 cards.append(f'''<li id="{slug}">
695 {ART["image"](src, "family")}
696 <h3>{escape(name)}</h3>
697 <p><strong>Relevant experience:</strong> {escape(background)}</p>
698 <p><strong>First milestone:</strong> {escape(deliverable)}</p>
699 </li>''')
700 graph = [webpage(PET_FOOD_PROJECT, title, desc), crumbs(title, PET_FOOD_PROJECT), ORG]
701 h = head(PET_FOOD_PROJECT, f"{title} · {NAME}", desc, graph, styles=(VOLUNTEER_CSS,)) + header()
702 h += f''' <main id="main" class="shell role-guide">
703 <div class="page-head">
704 <span class="mark">Research project brief</span>
705 <h1>Pet food and treats</h1>
706 <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>
707 <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>
708 <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>
709 <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>
710 </div>
711 <div class="career-directory" aria-labelledby="pet-food-project-roles">
712 <h2 id="pet-food-project-roles">Role briefs</h2>
713 <ul class="career-families">{''.join(cards)}</ul>
714 </div>
715 <p class="role-guide-next"><a href="/careers/">Back to Career directory</a></p>
716 </main>
717''' + footer()
718 write("projects/pet-food-and-treats/index.html", h)
719
720
721def field(name, label, kind="text", hint=None, required=True, attrs=""):
722 opt = "" if required else " <small>(optional)</small>"
723 req = " required" if required else ""
724 hint_html = f'\n <span class="hint" id="{name}-hint">{hint}</span>' if hint else ""
725 described = f' aria-describedby="{name}-hint {name}-error"' if hint else f' aria-describedby="{name}-error"'
726 if kind == "textarea":
727 control = f'<textarea id="{name}" name="{name}"{req}{described} {attrs}></textarea>'
728 elif kind == "select":
729 control = f'<select id="{name}" name="{name}"{req}{described} {attrs}><option value="">Choose…</option></select>'
730 else:
731 control = f'<input id="{name}" name="{name}" type="{kind}"{req}{described} {attrs}>'
732 return f''' <div class="field">
733 <label for="{name}">{label}{opt}</label>
734 {control}{hint_html}
735 <span class="error" id="{name}-error" data-error="{name}" role="alert"></span>
736 </div>'''
737
738
739HONEYPOT = ''' <div class="hp" aria-hidden="true">
740 <label for="website">Leave this empty</label>
741 <input id="website" name="website" type="text" tabindex="-1" autocomplete="off">
742 </div>'''
743
744
745def form_foot(button, note):
746 return f''' <div class="turnstile"></div>
747 <div class="form-foot">
748 <button type="submit" class="button">{button}</button>
749 <p class="fineprint">{note}</p>
750 </div>
751 <p class="form-status" role="alert"></p>'''
752
753
754def moderators():
755 t = f"Become a moderator · {NAME}"
756 d = f"{NAME} has a separate request form for board moderator access. Community volunteers email us to join."
757 graph = [webpage("/moderators/", t, d), crumbs("Moderators", "/moderators/"), ORG]
758 h = head("/moderators/", t, d, graph, scripts=("forms.js",)) + header("/moderators/") + f''' <main id="main">
759 <div class="shell page-head">
760 <span class="mark">moderators</span>
761 <h1>Help us read. <em>Become a&nbsp;moderator.</em></h1>
762 <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>
763 </div>
764 <div class="shell form-page">
765 <div>
766 <form class="form" data-api="/api/moderators" novalidate>
767 <div class="field-row">
768{field("name", "Name", attrs='maxlength="100" autocomplete="name"')}
769{field("email", "Email", kind="email", attrs='maxlength="254" autocomplete="email"')}
770 </div>
771{field("message", "Message", kind="textarea", attrs='maxlength="3000"', hint="Why you want to moderate, in a few sentences.")}
772{form_foot("Apply to moderate", "We read every request ourselves.")}
773 </form>
774 <section class="done" data-done hidden aria-labelledby="done-title">
775 <h2 id="done-title">Thank you. We have your request.</h2>
776 <p>It is saved as <code data-ref></code>. We read every request ourselves and will write to the email you gave.</p>
777 <div class="actions"><a class="button secondary" href="/volunteer/">See the volunteer roster</a></div>
778 </section>
779 </div>
780 <aside class="aside-card" aria-labelledby="next-title">
781 <h2 id="next-title">How moderation works</h2>
782 <ul>
783 <li><strong>You read the whole post</strong> against the <a href="/help/#rules">volunteer listing guidelines</a>.</li>
784 <li><strong>You can flag or archive historical records</strong> with the reason in plain words. Moderation decisions are logged with your name.</li>
785 <li><strong>You decide, not software.</strong> An agent may tidy formatting. It never approves or rejects.</li>
786 <li><strong>We follow up privately.</strong> If your moderator request is approved, we will send instructions for your access.</li>
787
788 </ul>
789 </aside>
790 </div>
791 </main>
792''' + footer()
793 write("moderators/index.html", h)
794
795
796def faq():
797 return [(f"What is {NAME}?", "A worldwide board for unpaid volunteer work. All participation is optional."),
798 ("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.'),
799 ("Is it free?", "Yes. Browsing the board and choosing a role are free."),
800 ("Who posts listings?", "Only Jobley lists roles on this board."),
801 ("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.")]
802
803
804def help_page():
805 t = f"Help · {NAME}"
806 d = f"Answers about {NAME}: how to choose a volunteer role and get started."
807 qs = faq()
808 fq = {"@type": "FAQPage", "@id": f"{SITE}/help/#faq", "url": f"{SITE}/help/",
809 "mainEntity": [{"@type": "Question", "name": q, "acceptedAnswer": {"@type": "Answer", "text": a}} for q, a in qs]}
810 graph = [webpage("/help/", t, d), fq, crumbs("Help", "/help/"), APP, ORG]
811 qa = "\n".join(f" <h3>{q}</h3>\n <p>{a}</p>" for q, a in qs)
812 rules = "\n".join(f" <li><strong>{a}</strong> {b}</li>" for a, b in RULES)
813 h = head("/help/", t, d, graph) + header() + f''' <main id="main">
814 <div class="shell page-head">
815 <span class="mark">help</span>
816 <h1>{NAME} Help</h1>
817 <p class="lead">{d}</p>
818 <p class="guarantee"><strong>Our promise:</strong> {GUARANTEE}</p>
819 </div>
820 <div class="shell doc">
821 <nav class="toc" aria-label="On this page">
822 <strong>On this page</strong>
823 <a href="#questions">Common questions</a>
824 <a href="#rules">Volunteer listing guidelines</a>
825 </nav>
826 <div class="prose">
827 <section id="questions">
828 <h2>Common questions</h2>
829{qa}
830 </section>
831 <section id="rules">
832 <h2>Volunteer listing guidelines</h2>
833 <p>These rules apply throughout the volunteer board.</p>
834 <ul>
835{rules}
836 </ul>
837 <p>We remove misleading or unsafe listings.</p>
838 </section>
839 </div>
840 </div>
841 </main>
842''' + footer()
843 write("help/index.html", h)
844
845
846def compare():
847 t = f"Ways to help · {NAME}"
848 d = "Pick an unpaid volunteer role and email us to get started."
849 h = head("/compare/", t, d, [webpage("/compare/", t, d)]) + header() + f'''<main id="main">
850 <div class="shell page-head">
851 <h1>Ways to help</h1><p class="lead">{d}</p>
852 <a class="button" href="/volunteer/">Browse volunteer roles</a>
853 </div>
854 </main>''' + footer()
855 write("compare/index.html", h)
856
857
858def privacy():
859 t = f"Privacy · {NAME}"
860 d = f"How {NAME} handles volunteer browsing, the board moderator form, and private historical records."
861 graph = [webpage("/privacy/", t, d), crumbs("Privacy", "/privacy/"), ORG]
862 h = head("/privacy/", t, d, graph) + header() + f''' <main id="main">
863 <div class="shell page-head">
864 <span class="mark">privacy</span>
865 <h1>Privacy</h1>
866 <p class="lead">Choosing a volunteer role does not send personal details to Jobley. Updated November 27, 2026.</p>
867 </div>
868 <div class="shell doc single">
869 <div class="prose">
870 <section id="posts">
871 <h2>Historical submissions</h2>
872 <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>
873 </section>
874 <section id="moderators">
875 <h2>When you apply to moderate</h2>
876 <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>
877 </section>
878 <section id="abuse">
879 <h2>Keeping the forms clean</h2>
880 <p>The forms use a bot check from our hosting provider to tell people from bots, which may set a cookie and reads standard browser signals under that provider’s privacy policy. 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>
881 </section>
882 <section>
883 <h2 id="hosting">Where we host</h2>
884 <p>This site runs on a hosting provider that 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 that provider’s database, which handles the data under its privacy policy.</p>
885 </section>
886 <section id="contact">
887 <h2>Questions and changes</h2>
888 <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>
889 <p>If this page changes, the date at the top changes with it.</p>
890 </section>
891 </div>
892 </div>
893 </main>
894''' + footer()
895 write("privacy/index.html", h)
896
897
898def license_page():
899 t = "License · Jobley"
900 d = "Public-domain licensing and third-party notices for Jobley."
901 graph = [webpage("/licenses/", t, d), crumbs("License", "/licenses/"), ORG]
902 h = head("/licenses/", t, d, graph) + header() + ''' <main id="main">
903 <div class="shell page-head">
904 <span class="mark">license</span>
905 <h1>License</h1>
906 <p class="lead">Public-domain licensing for Jobley’s source code.</p>
907 </div>
908 <div class="shell doc single">
909 <div class="prose">
910 <section id="license">
911 <h2>Public domain</h2>
912 <p>Jobley’s code is free and open source, released into the public domain under the Unlicense. 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>
913 </section>
914 </div>
915 </div>
916 </main>
917''' + footer()
918 write("licenses/index.html", h)
919
920
921def notfound():
922 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">
923 <img src="/assets/icon.png?v={V}" width="66" height="66" alt="">
924 <h1>Page <em>not found.</em></h1>
925 <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>
926 <div class="actions">
927 <a class="button" href="/">{ICON_HOME}Back to Home</a>
928 <a class="button secondary" href="/volunteer/">{ICON_SEARCH}Browse volunteer roles</a>
929 <a class="button secondary" href="/help/">{ICON_HELP}Get Help</a>
930 </div>
931 </main>
932''' + footer()
933 write("404.html", h)
934
935
936def app_turnstile():
937 h = head("/app/turnstile/", f"Checking you’re a person · {NAME}", "", None, noindex=True, scripts=("app-turnstile.js",)) + f'''<body>
938 <main id="main" class="shell page-head">
939 <p class="lead">One moment. We’re checking you’re a person.</p>
940 <div id="challenge"></div>
941 </main>
942</body>
943</html>
944'''
945 write("app/turnstile/index.html", h)
946
947
948def llms():
949 return # NO SEO: no llms.txt
950 write("llms.txt", f"""# {NAME}
951
952> 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.
953
954- [Volunteer roster]({SITE}/volunteer/): all current roles
955- [Career directory]({SITE}/careers/): browse civilian career backgrounds and ways to contribute; these are ideas, not listings
956- [Help]({SITE}/help/): how to join
957- [Board moderator access]({SITE}/moderators/): a separate form for managing who can moderate the board
958- [Privacy]({SITE}/privacy/): volunteer browsing and historical records
959""")
960
961
962
963AI_BOTS = ["OAI-SearchBot", "ChatGPT-User", "GPTBot", "ClaudeBot", "Claude-SearchBot", "Claude-User", "PerplexityBot", "Perplexity-User",
964 "Google-Extended", "GoogleOther", "Applebot", "Applebot-Extended", "bingbot", "Amazonbot", "meta-externalagent",
965 "meta-externalfetcher", "DuckAssistBot", "MistralAI-User", "CCBot", "cohere-ai", "YouBot"]
966# A named group ignores *, so every Disallow goes in both groups.
967DISALLOW = "Disallow: /api/admin/\nDisallow: /job-template\nDisallow: /app/"
968
969
970def crawl_files():
971 write("robots.txt", "User-agent: *\nAllow: /\n" + DISALLOW + "\n") # NO SEO: no sitemap, no crawler courting
972 return
973 bots = "\n".join(f"User-agent: {b}" for b in AI_BOTS)
974 write("robots.txt", f"""# {NAME} welcomes search engines and AI assistants.
975# A plain-text summary for language models: {SITE}/llms.txt
976
977User-agent: *
978Allow: /
979{DISALLOW}
980
981# AI search, assistant and training crawlers, allowed by name.
982{bots}
983Allow: /
984{DISALLOW}
985
986Sitemap: {SITE}/sitemap.xml
987""")
988 urls = "\n".join(f" <url><loc>{SITE}{p}</loc><lastmod>{V[:4]}-{V[4:6]}-{V[6:]}</lastmod></url>" for p in PAGES)
989 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')
990
991
992def headers_file():
993 """_headers with the house CSP. The one inline <style> the shared share script adds is allowed by its hash."""
994 share_hash = subprocess.run(["node", os.path.join(ROOT, "tools", "csp-hash.mjs")], capture_output=True, text=True, check=True).stdout.strip()
995 cf = "https://challenges.cloudflare.com"
996 csp = (f"default-src 'self'; script-src 'self' {cf}; style-src 'self' {share_hash}; "
997 f"img-src 'self'; font-src 'self'; "
998 f"connect-src 'self' https://projectatom.ai; "
999 f"frame-src {cf}; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'none'")
1000 write("_headers", f"""# Cloudflare Pages response headers. Written by tools/build-site.py.
1001/*
1002 Referrer-Policy: strict-origin-when-cross-origin
1003 X-Content-Type-Options: nosniff
1004 Content-Security-Policy: {csp}
1005
1006/assets/fonts/*
1007 Cache-Control: public, max-age=31536000, immutable
1008
1009/job-template
1010 X-Robots-Tag: noindex
1011
1012/app/*
1013 X-Robots-Tag: noindex
1014
1015/favicon.png
1016 Cache-Control: public, max-age=3600
1017
1018/assets/icon.png
1019 Cache-Control: public, max-age=3600
1020
1021/assets/apple-touch-icon.png
1022 Cache-Control: public, max-age=3600
1023""")
1024 return csp
1025
1026
1027def social_card():
1028 tmpl = open(os.path.join(ROOT, "tools", "social-card.tmpl.html")).read()
1029 write("tools/social-card.html", tmpl.replace("{NAME}", NAME).replace("{DOMAIN}", DOMAIN.upper()))
1030
1031
1032if COMMUNITY_ONLY:
1033 volunteer_page()
1034 careers_page()
1035 print_project_page()
1036 pet_food_project_page()
1037 crawl_files()
1038 print("ok", NAME, "community pages only; public app release remains on hold")
1039 raise SystemExit(0)
1040
1041index(); volunteer_page(); careers_page(); print_project_page(); pet_food_project_page(); moderators(); help_page(); compare(); privacy(); license_page(); notfound()
1042app_turnstile(); llms(); crawl_files(); CSP = headers_file(); social_card()
1043print("ok", NAME, DOMAIN, "website-only")