AGENTS.md — EventosTerceira.pt (Jekyll website)
This is the Terceira Events community website: a Jekyll site served from
main via GitHub Pages. Judge every change by task completion — finding
today’s events, finding weekly events, understanding an event, acting on
it. Compare against the existing UI first. Preserve or revert changes that
add taps, hide content or actions, truncate summaries, weaken contrast, or
introduce jargon without a demonstrated benefit.
Stack and checks
- The declared CI environment is Ruby 3.3 (
ruby/setup-rubywithbundler-cache: truein.github/workflows/validate-templates.ymlandvalidate-deployed.yml; dependencies inGemfile/github-pages). Run checks with that environment. Do not commit dependency changes solely to accommodate a local interpreter. - Loudest test first:
bundle exec jekyll build --traceplusbundle exec ruby scripts/tests/test_built_site.rb. - Fast suites:
node --test scripts/tests/test_discovery.js scripts/tests/test_detail_render.js scripts/tests/test_event_filter.js; token consistencynode scripts/check_discovery_tokens.mjs <native-theme>andnode --test scripts/tests/test_discovery_tokens.mjs. - Data suites:
scripts/tests/test_event_identity.rb,test_event_localities.rb,test_tag_vocabulary.rb,test_special_event_duplicates.rb,test_post_lang.rb,test_event_ranges.rb,test_postal_address.rb.
Product contract
- Primary navigation is exactly seven links — Home, Weekly, Events,
Venues, Blog, Contribute, Resources (
_layouts/default.html, PT labels Início, Semanal, Eventos, Locais, Blogue, Contribuir, Recursos). The bar scrolls horizontally (overflow-x: autoinassets/css/style.css) and keeps the language control and narrow-width keyboard access usable. Never add Today, Saved, or Get the app to the navbar, and never hide destinations behind a new hierarchy. - Home (
index.md,_includes/home_discovery.html) leads with date shortcuts (Today / Tomorrow / This weekend), then upcoming event previews, then weekly and exhibition links, then the blog preview. The Get-the-app section (#get-the-app) stays separate from event discovery. - The Events page (
special.md) lists Events and Exhibitions as plain listing types through the kind selector in_includes/event_search_bar.html. Filters stay compact: Tags holds Free, Family, and topics; More filters holds locality plus its coverage note (events without a confirmed locality are included under All places). No large combination instructions, no standalone checkbox blocks. - Filter behavior is AND across tags, locality, kind, range, and search
(
matchesinassets/js/discovery.js, inline filter script in_layouts/default.html): truthful live result counts, an empty state, Reset visible only when a filter is active, state shared and restored through the URL and the locale link, Escape closing open filter menus and returning focus to the summary. - Cards (
_includes/special_event_card.html) show full published summaries with direct actions: Open in Maps, source (Published source / Instagram), Suggest an edit. Titles open the exact detail page (/events/?id=via_includes/event_page.htmlandassets/js/event-details.js). Summary language order is requested language, then the bare field, then the other published language, with knownlangmetadata on the summary element. Never invent translations; never suppress a published language. - Detail Back reads “Back to results” / “Voltar aos resultados”: it steps
through history when the referrer is same-origin, otherwise falls back to
/special/?range=all. - The browser has no Saved workflow. Event discovery uses the compact filters described above; never add a Saved workflow.
Data and curator corrections
_data/special_events.ymlholds dated events,_data/weekly.ymlrecurring schedules,_data/venues.ymlbilingual venue copy,_data/event_tags.ymlthe tag vocabulary,_data/venue_localities.ymlvenue-to-locality mapping.- Curator corrections are authoritative within their stated scope: apply them to every duplicated copy (shared weekly data, bilingual venue fields; the bundled app copy lives in the app repository) without inventing another weekday. Never remove historical one-off dated events to satisfy a correction about recurring schedules. Distinguish a user correction from fresh organizer-source verification.
Event ingestion pipeline
- Seven ingest workflows (
.github/workflows/ingest-*.yml, scriptsscripts/ingest_*.py) read CMAH, CMPV, Museu de Angra, Ticketline, parish touradas, Visit Azores and Azores What’s On. Six run daily on a schedule; the Museu de Angra workflow runs only byworkflow_dispatchwhile the source site’s Cloudflare managed challenge blocks automated requests. They append new events to the end of_data/special_events.yml, deduplicating bysource_uidand same-date name similarity. Each one opens or refreshes anAuto-ingest: ...PR onauto/<x>-ingestand fails loudly when its source is degraded (scripts/ingest_health.py). - Three gates validate every change:
validate event data(validate-events.yml, data paths only),validate templates and structured data(validate-templates.yml, every PR) andvalidate event ingesters(validate-ingesters.yml, ingester and test paths). Each also acceptsworkflow_dispatch. - GITHUB_TOKEN opens the ingest PRs, so their
pull_requestgate runs wait for approval.merge-ingest-prs.yml(scripts/merge_ingest_prs.py) runs after each ingest workflow and every three hours. For each bot-authored ingest PR that touches only_data/special_events.yml, it does one of the following:- When main has changed files since the branch point, it re-runs the ingest workflow, which regenerates the branch.
- Otherwise it dispatches the three gates on the head commit. When all
three pass, it squash-merges with
--match-head-commitand then dispatches the gates on main. - When a gate fails, the PR stays open with one comment per head commit that links the failed runs.
- Regeneration replaces commits pushed to an
auto/*-ingestbranch. Merge hand-fixed ingest PRs before the next run of their ingest workflow. scripts/tests/test_event_locales.pyrequires English and Portuguese titles and descriptions. Ingesters keep the source text in the barename/descriptionand add the other language as_en/_ptthroughscripts/ingest_translate.py, an OpenAI-compatible chat-completions call configured by the repository variablesTRANSLATION_API_URLandTRANSLATION_MODELand the secretTRANSLATION_API_KEY; touradas use hand-written English templates. Without that configuration, or when a request fails, the ingest still opens its PR, logs a warning, and the locale gate stays red until someone adds the missing fields.Gemfile.lockpins the Ruby 3.3 bundle (github-pages 233, Jekyll 3.10).
Verification boundaries
- The current nine-issue completion scope prioritizes readable layouts, keyboard/focus access, labeled controls, touch targets, enlarged text and actual browser zoom. Speech-specific testing (pronunciation, automatic spoken output, audio recording or transcription) and speech-only features require an explicit new user request; the omitted speech checks are user-skipped, not unfinished device or simulator work. Existing assistive labels and semantics stay in place, and source/platform evidence boundaries from earlier runs still apply.
- Platform associations live in
.well-known/assetlinks.jsonand.well-known/apple-app-site-association;_config.ymlincludes that directory.scripts/tests/test_associations.rbchecks the verified publisher, route contract and built output.test_live_site.rbchecks direct association responses; ordinary page redirects have separate rules. Measure every declared host without following redirects, report MIME types, and check Apple’s CDN before claiming iOS OS acceptance. - Verify public signing identifiers in the exact app’s existing developer session when available: the Apple App ID prefix and Play app-signing certificate differ from upload/debug identities. Keep private keys out of the workflow. Native declarations, the Apple portal capability, refreshed provisioning profiles, hosted files and release-signed OS delivery are separate checks; valid JSON or a simulator custom-scheme pass proves only its own stage.
- Color and token checks:
docs/discovery-tokens.jsonmust matchassets/css/style.cssexactly, andscripts/tests/test_discovery_tokens.mjsis a bounded source regression over the known venue-button selector set (coverage, specificity order, and contrast values). It is not a general browser CSS-cascade engine and does not prove every focus or focus-visible state. Real rendered normal, visited, hover, and focus labels and colors still need browser verification, alongside destinations and keyboard focus. - Zoom claims require actual browser zoom: 400% zoom changes effective CSS
pixels and device-pixel ratio, which a narrow viewport alone does not
reproduce. Restore 100% afterwards. Chrome automatic translation can
rewrite labels and
html lang; verify against the original Portuguese and the rendered source without changing persistent user preferences. - Test clocks and cached fixtures share one deterministic island day. Keep assertions as written; never silence failures or loosen expectations to obtain green tests.
- Screen-reader speech claims require real assistive-technology runs with the observed utterances recorded. Source inspection and focus logs alone do not establish speech. Generated captions can establish the focused utterance strings and activation actually observed, but not audio pronunciation; automatic announcements still need an actual assistive-technology run.
- Keep task tooling and data isolated, restore settings to baseline, and delete only exact disposable QA records. New dependencies require a stated license and reason; this repository stays on Jekyll.